Commit graph

355 commits

Author SHA1 Message Date
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
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
d9fd8d4590
Fix DestroyItem() crash when passing a multi (#506) 2023-02-28 16:26:25 +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
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
Kevin Eady
b37bcd7811
Fix, add tests for boat custom method scripts (#496) 2023-01-02 15:59:31 +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
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
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
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
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
turleypol
cfb41d986b
workflow to sync docs to webserver (#438)
adapted docs to new webhost
2021-10-19 21:31:15 +02:00
Kevin Eady
8e5859c97d
Fix party.addmember implementation for candidates, npcs (#423)
Co-authored-by: Fernando Rozenblit <rozenblit@gmail.com>
2021-09-12 10:32:55 +02:00
Fernando Rozenblit
cd8b8e1cd5
Fixes bug where attack hook was recursively called if a character was moved by the hook (#415)
When a character is ready to swing, it will attack after being moved. Moving the character from within the attack hook could thus cause an infinite recursion.
2021-08-31 08:06:39 +02:00
Kevin Eady
0db4b97ede
Move remaining drop errors to suspicious acts (#409) 2021-08-14 09:28:54 +02:00
Kevin Eady
3bd1fdd32a
Throw compile error on function name conflict (#408)
Fixes: #407
2021-08-11 23:01:14 +02:00
turleypol
ec9cd8026b
Descriptorbugs (#406)
* tests for several descriptor loading related problems

* fixed copy of cprops from descriptor to intrinsic items
fixed container test

* added shield npcdesc entry

* fixed nodrop/exception loading from itemdesc

* fixed compilation error

* attackdelay should later also trigger creation of npc weapon, added test for it

* intrinsic weapon gets created when AttackSpeed or AttackDelay is set.

* added docs

* changed doc entry

* fixed typo
2021-08-03 14:58:50 +02:00
turleypol
0fab3e17e1
Boat pkt encoding len (#405)
* guessing game, does encoding can take more space?

* corrected comment to explain fix

* fixed compiler warning

* added corechanges
2021-07-22 21:18:19 +02:00
Kevin Eady
808bb07ef2
Fixed target cancelling bug (#404)
* Fixed target cancelling bug

* address review comments

* remove fixme
2021-07-21 19:01:03 +02:00
turleypol
aa6b0ec3ba
Smooth Boat pkt: overflow/invis objects (#403)
* Test: move boat while client on ship
* added f3 pkt
* pkt id on assert failure
* 7090 pkts
* smooth boat pkt
* silent the spam
* syncpoint for moveobjecttolocation of char
* added sync point for silent item updates
* starting actual test for boat movement to check correcr coords
* read z coord as signed short
* clarified names

* smooth boat pkt rewrite. dont include invis objs, send the correct obj count in case of overflows

* core changes
2021-06-21 18:13:15 +02:00
AsY!um-
ff9b2c043a
Fixed invalid value for LOS_ANY flag. (#397)
* Fixed invalid value for LOS_ANY flag. It was duplicated with SPEEDHACK flag.

* Updated core changes.
2021-04-10 11:23:35 +02:00
turleypol
8b7ece1c18
Testclient (#390)
* first testclient version
fixed dangling pointer in openconnection
added option to keep connection alive

* movement tests
OpenConnection do not start socketclient on connection error
changed communication pkts between testclient and server
send every event to server from testclient

* add new item event
serialize method
check move position

* added openconnection docs

* test if the ci can fail to find python3

* explicit add python3

* added multiclient support

* debug logs

* more debug

* id out of sync?

* cleanup fixed typo

* transfer client id

* send todos to the correct brain

* addee core changes
2021-03-25 19:26:09 +01:00
AsY!um-
c4bb083354
Documentation: fixed invalid value range for ApplyRawDamage(). Fixes #125 (#391) 2021-03-25 11:15:37 +01:00
Kevin Eady
0ca7912fcd
Add support for conditional operator (#387)
* Grammar update

* AST generation

* Emit instructions

* Add initial tests

* Additional tests

* Rename to ConditionalOperator

* Add docs
2021-03-14 23:20:20 +01:00
Kevin Eady
e41f70d72e
Add support for interpolated strings ("interstrings") (#369)
* Update grammar to support interpolated strings

* Struct initializers, case switchs are regular strings

* Initial stub for interpolated string in AST
This splits the previous STRING_LITERAL terminal into a production,
stringLiteral, to handle REGULAR_STRING terminal and interpolatedString
production.

* Change interpolated strings to expressions

* Fix mode handling in grammar

* Grammar fixes
- Fix mode handling in lexer
- Interpolated strings only have one expression

* Can successfully parse, stub compile interstrings
$"He {there + print("hello")}";

* Add formatting string to grammar

* Fix tests, and add test stubs

* Rename curleys to brace; better AST generation

* initial work interstring instruction

* Initial work on formatted string instruction: emit

* Formatted string instruction: execution

* Add simple formatted string test

* Add formatted string test src

* Review changes #1
- Rename `FormattedString` to `FormatExpression`
- Rename overloaded `try_to_format()` to `get_formatted()`

* Review changes part 2
- Rename `InterpolatedString` ast node to `InterpolateString`

* Review changes part 3
- Modify `ins_interpolate_string`

* Review changes part 4
- Remove unused formal parameter

* Add negative tests

* Spruce up positive tests

* Fix braces, escape chars inside interstring

* Fix, add tests for escaped char and double brace

* Address differences for new lines in tests

* Update Escript version

* Make empty expression an error

* Add documentation for interpolated strings

* Quick touchup on docs
2021-03-11 22:48:16 +01:00
Fernando Rozenblit
f3a362a151
Fix boat packet overflow and add setting to control the refresh of decay timer for items on a boat's deck (#354)
* Fix overflow of new HSA packets when a boat has too many items on the deck. These packets will now be truncated.
* Added setting in ssopt to control the refresh of the decay timer for items on deck after a boat movement
2021-03-08 16:05:22 +01:00
Kevin Eady
9c36b977cd
Internal work to remove OGC (#384)
* Remove LegacyFunctionOrder

* Remove compiler.cpp, compiler.h

* Remove parser.cpp/h and wordlist generation

* Update breaking-changes, core-changes
2021-03-06 01:39:26 +01:00
Kevin Eady
ae96ecbf77
Remove OGC from EcompileMain, testsuites (#383)
* Remove OGC from escript testsuite

* Remove compiler options

* Remove Facility::Compiler

* Update docs and options in ecompile help usage

* Update core-changes, breaking-changes
2021-03-04 17:39:14 +01:00
Kevin Eady
37c65cfb0a
Version bump to start work on v100.1.0 (#382) 2021-03-04 12:53:52 +01:00
Fernando Rozenblit
9e2d3b0e9b
This commit marks the release of 100.0.0 and makes a few adjustments before the release (#381)
- Adjust copyright year
- Mark development settings in CMakeLists.txt as advanced
- Update README.md with the new stable version
2021-02-28 23:15:45 +01:00