Commit graph

3819 commits

Author SHA1 Message Date
Jonathan Morland-Barrett
28ce14ce6f Add ResyncCharacter( chr ) uo module function 2023-05-18 22:43:23 +08:00
Kevin Eady
8cc1c6cade
Improve WarmodeInhibitsRegen functionality (#523)
* Improve WarmodeInhibitsRegen
- Change implementation
- Update documentation

* Add tests, core-changes

* Change test waiting times
2023-05-15 13:27:07 +02:00
turleypol
830daf726e
Fix crash when event queue is full (#521)
* each SpeechEvent needs to contain a copy of the speechtokens

* added core changes

* prevent memoryleak

* add basic pol test

* Remove extraneous prints in test

* Address review comments
- Refactor token encoding into a method

---------

Co-authored-by: Kevin Eady <8634912+KevinEady@users.noreply.github.com>
2023-05-12 20:45:40 +02:00
Kevin Eady
469a454446
Add prettify argument to PackJSON() (#520)
* Add prettify argument to PackJson()

* simplify test
2023-04-28 09:44:22 +02:00
Kevin Eady
6f84b07bc8
Fix uninit member on AuxClientThread ctor (#516) 2023-03-25 22:12:51 +01:00
Kevin Eady
ccc6213c6f
Add ignore_line_breaks option to os::OpenConnection (#512)
* Add use_byte_reader option to OpenConnection

* Fix formatting

* fix incorrect param number

* Do not include on writes CRLF if using byte reader

* Rename to ignore_line_breaks

* Update docs

* Add core-changes
2023-03-20 19:54:39 +01:00
Kevin Eady
84d5048efa
Include items on exterior stairs of custom houses in MultiRef.items (#507)
* include items on exterior stairs to MultiRef.items

* only use extra search area in custom houses

* Mutli search_box returns current_box()

* address discord review comments

* Store item list for item visibility changes

* fix styling, typedef

* Remove old CustomHouseStopEditing prototype

* Add helper UHouse::get_working_design_items
2023-03-18 13:17:00 +01:00
Kevin Eady
a85131f28e
Fix DynTaskThreadPool create_thread thread safety (#509) 2023-03-07 20:00:51 +01:00
Kevin Eady
d9fd8d4590
Fix DestroyItem() crash when passing a multi (#506) 2023-02-28 16:26:25 +01:00
AsYlum-
c6ced9b39c
Fix crash related to item position in multi houses (#505) 2023-02-24 20:38:18 +01:00
Kevin Eady
f892bf2ced
Add flag to os::HTTPRequest() for additional response data; Add http::WriteStatus() and http::WriteHeader() (#504)
* Add flag to HTTPRequest() for addl response data

* Add ability to change status and headers in www scripts

* Add tests for new webserver features

* Update docs and core-changes
2023-02-08 21:13:48 +01:00
Kevin Eady
07a9420fa0
Fix saving item via item descriptor with SaveOnExit set to 0 (#503) 2023-02-05 02:24:58 +01:00
AsYlum-
6f0db1810a
Fix crash related to item position. (#502) 2023-01-20 07:15:14 +01:00
turleypol
8ded067688
place item los check (#501)
* place item did not used toplevel_pos for distance check

* added corechanges entry
2023-01-11 21:49:53 +01:00
Kevin Eady
1b879bc59f
Add script helpers to implement stealing skill (#493)
* add item.character_owner

* Address review comments
- Cleanup chr_from_wornitems
- Return BError if no character owner

* Add Target option TGTOPT_ALLOW_NONLOCAL

* Address review comments
- Remove `Core::chr_from_wornitems`

* Add pol tests for snooping

* Add tests for TGTOPT_ALLOW_NONLOCAL

* target_nonlocal_checklos pol test debugging

* target_nonlocal_checklos pol test debugging
- Remove destroy of obstacle
- Add a CheckLosAt call to error return

* target_nonlocal_checklos pol test debugging
- Enable USAN build

* undo test debugging changes

* use mobile for los when targetting snoopable items

* Update core-changes

* Persist SnoopScript for items on save

* Add snoop_script_ to Item::estimatedSize

* document SnoopScript script type
2023-01-08 16:59:28 +01:00
turleypol
eeb57d489a
Drop/getitem related pos refactoring (#497)
* refactored move_item

* container location methods

* dropitem position refactors

* addressed pr comments.
fixed comment
more readable algo for random location
2023-01-05 00:10:51 +01:00
Kevin Eady
b37bcd7811
Fix, add tests for boat custom method scripts (#496) 2023-01-02 15:59:31 +01:00
Kevin Eady
9145ced4c1
Enable USAN build (#495) 2022-12-23 13:54:18 +01:00
Kevin Eady
4950f7e410
Change SystemState Tile to vector (#494)
* Zero out memory for Tiles in SystemState

* Change SystemState Tile to vector
2022-12-22 21:53:54 +01:00
Kevin Eady
999ca84aea
Add Support for Snooping via Item Descriptor element SnoopScript (#491)
* Initial work on adding SnoopScript

* use message "That doesn't belong to you..." if lifting a snoopable item

* fix configfile changes

* Update core-changes
2022-12-20 21:32:47 +01:00
turleypol
83de33adfb
Potential login crash (#492)
* fix potential crash during login.
initial client loop can fail and thus the client will be deleted.
leading to an access violation if the delete thread is faster then the login thread.

* added docs
2022-12-17 18:35:58 +01:00
Kevin Eady
ab151728d0
Add x, y parameters to create item function calls (#490) 2022-12-13 23:08:02 +01:00
turleypol
1b2cdabd31
fix ci action for nightly build (#485) 2022-12-04 16:42:58 +01:00
turleypol
5db01e5dec
Client related threading issues (#482)
* busy flag for DynTaskPool needs to be atomic
client SocketMutex is no more static
replaced Client::Delete with a deconstructor
Client::disconnect needs to be atomic
Multiple threads want to know UOClientListener::login_clients size.
CI action which runs with Thread/AddressSanitizer
updated some github actions

* listener client size getter
corrected sanitizer build name

* ubuntu22

* Jobnames

* jobname fix, workaround for ci link error?

* use dos cmd for workaround

* fix also winnopch ci

* more unique job names
2022-11-29 07:02:53 +01:00
turleypol
c3207c5249
updated clang CI (#484)
* updated clang CI

* gcc on mac is also outdated, update in general to 11

* disable gcc on mac due to linker crash

* updated ci action versions since it will fail in the future (eg node
version)

* remove vim swp file
2022-11-28 08:01:50 +01:00
che666
5bd51780d6
Update uo.em (#481)
* Update uo.em

* Fixes for Broadcast and BroadcastUC required_cmdlevel parameter

* updated changelog

* updated changelog
2022-10-24 13:30:42 +02:00
Jonathan Morland-Barrett
b17d07e92e
Potential patch for executable process path bug (#479)
* Potential patch for executable process path bug

* Update ProgramConfig.cpp

Remove additional character stripping from the erase method
2022-10-18 12:21:12 +02:00
turleypol
37c2fb0299
Method function crash (#477)
* Crash reproducer with methods

* potential crash fix

* removed ASan build, added core changes

* do not store valuestack reference before calling method to fix potential
dangling reference

* Take into account that the ValueStack can grow due to method calls.
2022-10-16 19:39:25 +02:00
Peter Wedder
3ea8fc55ea
Add force parameter to CreateNPCFromTemplate() (#475)
* Add force parameter to CreateNPCFromTemplate()

* Update documentation

* Rename parameter to forcelocation

* Fix parameter name in docs

* Fix parameter name in docs (again)
2022-10-13 19:59:07 +02:00
Kevin Eady
7346c9b443
Add POLCore().poldir returning POL executable directory (#474) 2022-09-21 13:49:08 +02:00
Admin-Yukiko
fcadf1428f
Added to uoconvert: Surface the partial hue flag in tiles.cfg for art that has the flag et in tiledata, eg. PartialHue 1. (#473)
Co-authored-by: Admin-Yukiko <hopelivesproject@gmail.com>
2022-08-26 08:18:42 +02:00
turleypol
23ac3bcded
Fixed popupmenu request when an old canceled request has to be revived. (#468) 2022-08-22 16:45:35 +02:00
Admin-Yukiko
6167f19d72
Clarification of how the Trim() function uses the "to_trim" parameter. (#470)
Co-authored-by: Admin-Yukiko <hopelivesproject@gmail.com>
2022-08-22 08:43:39 +02:00
turleypol
b1536d30a4
SendPopUpMenu update (#467)
* SendPopUpMenu supports now the newer format which removes the limitation
of the cliloc values

* fixed build errors

* revision increase when insurance gets reset on death.
added core changes

* updated online docs

* using enum for flag values
2022-08-14 11:35:38 +02:00
Kevin Eady
52c24101b9
Add support for cursed items (#466)
* Add support for cursed items

* Fix poldbg localvarmembers
2022-08-03 01:05:12 -04:00
turleypol
737db933ac
OpenXMLFile return value for not existing files or parsing errors (#463)
* OpenXMLFile: return error if file does not exist instead of xmlobject in
error state

* added docs

* translate every xml open/parsing error to BError

* updated core changes entry, to reflect the latest changes
2022-06-21 21:07:41 +02:00
Kevin Eady
458356fc9d
Fix crash on unknown member access on Client; add Client.acct (#462)
* Fix crash on unknown member access on Client

* Update tests

* Update core-changes

* Add client.acct; fix objref docs

* Fix tests
2022-06-16 19:49:39 +02:00
Kevin Eady
78a60be06d
Ensure client has a character in SendOverallSeason (#459) 2022-04-29 17:07:35 +02:00
Kevin Eady
5c969ede36
Add support for programmatically disabling inactivity timeout on a client (#458)
* Implementation of disable_inactivity_timeout

* Add documentation

* move client idle check

* fix core-changes date
2022-04-24 23:48:26 +02:00
Kevin Eady
8be5cc3110
Fix scoop install (#457) 2022-04-08 02:08:04 +02:00
Jakub Kalita
67acb43264
Fixed reading map properties + VS2022 boost update (#455)
* Fixed reading map properties.
* Updated boost version to enable VS2022 builds.
2022-02-18 19:01:40 +01:00
Jakub Kalita
b34a9de0e1
Fixed ecompile summary output (#450) 2022-01-16 08:47:34 +01:00
Admin-Yukiko
7ecaa1d205
Edited the description for TextEntry. (#449)
Added "The maximum number of characters for a TextEntry element is 239." to the end of the Description line for TextEntry.
2022-01-10 17:37:41 +01:00
turleypol
0eb6aa624d
use std::filesystem to iterate over directories (#448)
* use std::filesystem to iterate over directories
realms folder can now contain files

* Ignore unix like hidden dir entries

* simplified recursive compilation
2021-12-30 07:21:20 +01:00
turleypol
591c5eade9
removed installation of already installed mysql-client, caused a conflict. Splitted install, so one failure does not cause failure for every installation (#447) 2021-12-20 09:48:07 +01:00
turleypol
99667711af
Fixed move of mobiles/items between realms (#446)
* MoveObject fix between realms for mobiles and items

* missing poltool changes
2021-12-15 07:47:54 +01:00
turleypol
3306c5e206
converted multidef (#441)
* converted multidef
added to the testsuite a big multi
ListMultisInBox now uses the update range, but since its the only spot
and the chances are low that someone really has such a big multi
corechanges are not really worth it I would say

* Fixed a few grid bugs, one endless loop and changed the range a chr can move while customhouse is active
2021-11-09 20:01:16 +01:00
Peter Wedder
62638190a6
Change outgoing packet handlers to write CP-1252 when appropriate (#443)
* - Change all (most?) outgoing packet handlers that should write CP-1252 to convert UTF-8 to CP-1252.
- Update Clib::sanitizeUnicodeWithIso() to sanitize with CP-1252, which is what UO uses instead of ISO-8859.
- Add a test for Clib::sanitizeUnicodeWithIso() to check if it's performing the conversion correctly (currently it is not).

* Fix stylecheck

* Revert changes to sanitizeUnicodeWithIso()

* Change test so it matches acceptable sanitizeUnicodeWithIso behavior.

* Fix warnings.

* Add corechanges.
2021-11-09 08:01:31 +01:00
Admin-Yukiko
5b1187c437
Updating the references where standard and optional packages might be placed. (#434)
Since adding /pkg/optional as the new location for optional packages, the eScript guide needed updating.
2021-11-07 10:07:27 +01:00
Peter Wedder
f404591b1d
Fix SetString packet hook method writing UTF-8 instead of CP-1252 (#442)
* Fix SetString packet hook method writing UTF-8 instead of CP-1252. Add a new method, SetUtf8String, for writing UTF-8.

* Add functions that operate on whole strings.

* Fix a couple of bugs and add unit tests.

* Do not convert if the string doesn't contain any UTF-8

* Convert 0x80..0x9f control characters, which don't exist in cp1252, to question marks

* Fix SetUtf8String writing too few bytes if the string contained multi-byte UTF-8 characters

* Remove extraneous parameter from TextCommandScript documentation

* Update changes and docs
2021-11-02 22:00:36 +01:00