* extend tests
* more tests for world save
* explicit handle the special layers in wornitem
* add Location variant and relocate() methods
* refactor GottenItem and ensure Chr, not wornitems, is saved
* deflake escript watch test
* dropitem and undo refactoring
* uomod changes
* add more item tests (buy, sell, hair...)
* use location for undoing trade container properly
* rewrite loaddata to use relocate, fixing startup crashes
* do remaining location changes
* fix CI tests
* remove container pointer from item and add wearer() reference
* remove layer writes and explicit intrinsic weapon handling
* add preparing state for fresh items without serial number
* move wornitems to detached state only when it has a serial number
* load corpse items into the correct layer
* do not set a layer on load before the item is equipped
* add more tests to equipped and intrinsic items
* remove layer and substitute with the location()
* add core-changes summary
* mark items as being worn on corpse if they only moved within the corpse
* block Preparing from being reached, just to be sure
* added integrity sweep check
* Reduce direect changes to item location
* Add Item::move_into() and rewrite calling sites
* Fix container slots
* get rid of the slot_index on the item, because Location() already has it
* fix race in test leading to macos issues
* fix dangling pointer
* remove corpse can_equip_list and rely on the GottenItem rules to dress the corpse again
* let item->destroy() detach the item
* make integrity checks fail the tests
* use place_at(item, newpos) for changing item position InWorld
* add boat test for item moved out of boat that should not be visible anymore
* use place_at() in more places
* ensure CreateItemAtLocation really does
* fix Claude instructions
* remove state we didn't need
* fine tuning
* reduce test flakiness
* introduced Attackable wrapper class for opponents to be able to also
attack items
* changed set_opponent to use Attackable
moved first logic into Attackable
* added dynamic property which returns a pointer of the object instead of
a copy like the current imp.
needed to be able to eg store a vector
* send engage/disengage events
send hp status bar
* send attackable item flag in world item pkt
* apply damage for items + evid_damaged
* react to statrequests
* adapted is_attackable and do attack_effects
* fixed clear_opponent_of
* fixed clear_opponent_of
* allow attack pkt
* apply damage
* items need to keep track of the opponents to be able to cleanup on
destroy
* updated dynproperties
* updated dynprops a bit more.
made the structs trivial copyable
updated concept to not repeat the types
* run hitscript, cleanup
* listhostiles and attack_once accept now Attackable
* set opponent when dblclicked
* dont let hp underflow
* only attack if you are in warmode
* evid_opponent_moved for attackable items
* if its the same opponent dont send engaged events again
added test for listhostiles with two mobs
* allow attackable item for setopponent
* some tests npc vs item
* missing files
* fixed clang tidy complain
* test for enter/left area
* do not send hp updates while char gets created and not yet added to the
world
* testclient fight packets
* client event constants
* added client tests for attacking npc and item
* increase damage
* removed leftover comment
* when an attackable item was destroyed the opponents where not correctly cleared
* orphan check for is_attackable
* moved statmsg for items
* init member
* moved send_hightlight back into if statement
check before dereferencing
* use range version of statmsg
* adapted em params
* comparison operator
made explicit constructors
for symmetry return damage in Item::apply_damage
* get rid of bools
* split attack method a bit
* use constants for F3 flag
* destroy item on hit if hp reaches 0 if no controlscript exists
* only toplevel items are attackable
small refactoring
more tests
* more tests
* even more tests
* docs
* add DNS resolver to OpenConnection() and proper timeout handling
* use _WIN32 instead of other headers
* add option to bind with localhost only, use it for DebugLocalOnly
* Make WebServerLocalOnly also bind to localhost-only
* only let webserver settings be loaded at the initial load to avoid race conditions
* refactor gump pkt creation
* testclient returns buttonid 1 pressed when 'button' is contained in the
commands
* extended test
* cleanup destructor mess a bit
* store gumps as pair to decide if the executor needs to be revived
more refactoring
* disallow copy, if used creates nasty bugs
* helper method to convert imp to character
* gumpevent
* new non-blocking dialog function, sends event instead
* test closegump
* test if serialnumber gets correctly converted and invalid entries get
skipped
* removed unused BApplicPtr class
added BApplicObjBase to impptrIf convert function
* use impptrIf
* CloseGump accepts now also an array of characters
extended tests
* moved deleted copy constructor to the public part
* by default clang tidy will check .inc files, removed this filter
* the last tidy run with modernize-loop wasnt added to the PR check
* keep vector with chr and gumpid per uomod
to prevent growing dont add to the cache if same chr with same id
already exists.
* docs
* core-changes
* implementation
* tests
* maybe fix windows compilation?
* undo change of match_flag_type
* switch to boost regex
* move flags to BRegExp object
* fix tests due to cmake 4 update
* update grammar
* update prettifier
* move flag parsing to BRegExp ctor
* add AST nodes, update instr generation and execution
* copy tests but use regular expression literals
* fix grammar for handling division correctly
* modify return values a bit, update tests
- string.match: make groups hold structs of matched, offset
- string.match: add offset
- string.replace: use a groups array like string.match vs individual arguments
* bundle of changes
- standardize error messages
- add more tests for coverage
- move BRegExp creation to static method: previous implementation had
ctor throwing, which was no good inside executor since it didn't have
a try/catch
* more tests; add OT_REGEXP to basic.em
* move string regex stuff to bregexp and support regex/wregex via std::visit
* maybe fix compilation errors?
* add unicode escape sequence handling
* really maybe fix compilation error?
* fix compiler warnings
* refactor a bit to remove duplicate code
* address discord comments
- just return wstring, no need for vector<wchar_t> method
* Add string.split by string and regexp
* Use Max_Split instead of Limit
This makes it match basic::SplitWords
* add support for empty string delim in SplitWords
* remove duplicate code across string.split and mf_SplitWords
* Squashed commit of the following:
commit b3148e069f
Author: turleypol <turley@polserver.com>
Date: Sat Sep 27 17:02:22 2025 +0200
memorylocation of input string is not allowed to changed, switched back
to uniqueptr
commit 5a4d1c8fcb
Author: turleypol <turley@polserver.com>
Date: Sat Sep 27 10:18:01 2025 +0200
no need to use ptr for input
commit 90fa0edc66
Author: turleypol <turley@polserver.com>
Date: Sat Sep 27 09:56:29 2025 +0200
fixed typo
commit bed4ff3ac9
Author: turleypol <turley@polserver.com>
Date: Sat Sep 27 09:47:36 2025 +0200
make Callback for BContinuation move only
* use uninit when group isn't matched
* fix multiline flag handling; add test
* add docs and doc example tests
* some cleanup
* address review comments
- allow move assignment
* add core-changes
* first working short curcuit for && and or
creates jumps after each expressions to skip the following
* fixed valuestack when short circuit jmp does not jump
* use specialized instructions for short circuit && and ||
1: lhs
2: logical jump if false/true goto 4 <- if jmp do logical convert
3: rhs
4: logical convert
5: rest
logical convert is needed since "normal" && || operations convert isTrue
to BLong
added BObjectRef BObjectImp set specialization to remove noise
* fixed converted objimp when jump on false values
* first version of short circuit warning
should be moved to analyzer
added whitelist of module functions which have no sideeffect to reduce
the number of warnings
* moved warning visitor to analyzer and added it as extra compile step
fixed sourceline print and cache the content
* missing include, unused member
* included the correct header
* ecompile.cfg to activate and warn
ecompile cmdline arg to activate it
run all tests also with it active
fixed that only the most right side statement was checked
* ecompile cmdline
* increase ecompile version
cleanup
* compilation error
* missing header
* allow -S- to deactivate shortcircuit like the other params do
* extended whitelist functions
* revert fileformat version increase
fixed escript test cmake
* use the correct arg
* escript testoutput can now be different if shortcircuit is active
* docs
* additional test
* addressed comments
* wip implementation
* maybe add tests...
* fix dependencies
* fix windows and mac deps
* attempt #3 for mac deps
* add --break-system-packages because WHY NOT
* add raii wrapper for curl_slist and curl_mime
* add content_type; fix incorrect recipient variable; more tests
* put smtpd log in file; add curl_easy_setopt_return_error; fix parsing email from display string
* remove some debugging
* catch exceptions in polsys::ReloadConfiguration; tests; smtpd cleanup
* Fix xslt validation erorrs in osem.xml
- `HTTPRequest`` did not have the `<code>` block inside `<explain>` so
it was not rendered.
- `LoadExportedScript` needed `<return>` after `<explain>`
- `GetEnvironmentVariable` needed `<return>` after `<explain>`
* Address review comments
- remove openssl test dep by generating cert, valid for 100 years
- only run test if asiosmtpd module is installed
* Address review comments
- remove `pChild`
- remove `curl_easy_setopt_return_error` macro
- return `new BLong( 0 )` for temp object replaced by background thread
* Address review comments
- use `Clib::localtime` + `fmt::format` for date header
* Address review comments
- Early exit on failures
* Address review comments
- Move suspend to immediately before background thread creation
* Address review comments
- better handling of curl_slist and curl_mimes
* Address Discord comments
- remove env check in test_email program
* attempt to fix timezone issue in date header
* additional tests for invalid params
* add docs, core changes
* smtpd: fix event loop, only run if not filtered out
* put stacktrace in "no signal received" error
* fix stacktrace call in testutil; add default param to os.environ.get in smtpd
* Format escript testsuite
* Manual formatting for escript testsuite
- Add format-off to places where formatter does what it should, but we don't like the results
- Manually change places where formatter outputs weird things _without_ format-off, so next format-all would show changes if not fixed
* Update .err files; add update_err.py helper script
Use the format `:line:col: message` for all .err file checks. This
allows us to change the file names without needing to edit the .err
contents.
Note that `in/inc0{1,2}.err` need have error messages between POSIX and
Windows, so their messages are a bit more "generic" than the other errs.
* Format pol testsuite
* Manual formatting for pol testsuite
* Format pol-core modules
* Manual formatting for pol-core modules
* Additional format pol-core modules
Use FormatterLineWidth=10000 since module functions must be on one line
because of the parse_modules target
* Address Discord comments
- Support multi-line module function declarations in parse_modules
* Format on df07831
* more formatting improvements:
replace inside of comments tabs with spaces if UseTabs is false
do not strip whitespaces at the beginning of linecomments
better handling of long lines eg string additions
"binpack":
if an array fits equally into up to 3 lines use this instead of having each element in a newline
struct/dicts get only packed if they fit into a single line, or half of the room for two lines
align comments in statements
* fixed linecomment forcing newline in simple splits
formatting of functionexpressions
```
@(blubb) {
blah;
};
```
* fixed windows lineendings
fixed extra newline before long comment in certain situations
added option FormatterFormatInsideComments to deactivate trimming and
replacing of tabs
* fixed typo..
ecompile cfg is now FormatterIndentLevel
* FormatterBracketAttachToType: array{} vs array {}
FormatterAllowSingleLines: allow single line case/functionrefs
* align case label expressions
comments at the end still make the expression packable
other bugs
* better detection of case labels, by buffering the text. fixed more
problems with comments while packing lines
* do not allow more then 3 lines to be packed to a single one
* fixed hopefully last bug with comments and packing
removed FormatterAllowSingleLines
added
FormatterAlignTrailingComments
FormatterAlignConsecutiveShortCaseStatements
FormatterAllowShortCaseLabelsOnASingleLine
FormatterAllowShortFuncRefsOnASingleLine
* better linesplits when prefferedBreak is used (functions with params)
* fixed unalign lines with comments in arrays
* simplified ecompile code, use callback for compilation during iteration
through the directories.
use for pkgs recursive_directory_iterator
* core-changes
* onlinedocs
* onlinedocs-typo
* corrected cfg
* do not touch comments at all when disabled
detect aligned */
* fixed group formatting in var statements in more complicated situations
* when packing finishes right before the last element check if this
element also fit into the last line
* remaining ); or similar parts dont start a new line during group
formatting
* fixed edge cases of preferredBreak tactic with paranthesis alignment
* changed defaults, updated docs
* Add libefsw at 3419347
* saving work
* some cleanup
* move to fs::paths
* saving work.. maybe hitting a limit with number of watched dirs?
* migrate to watching only ecompile.cfg specified folders, cleanup/doc
* Display summary between compilations in watch mode; fix cache reuse
* Fix inf loop; some cmake, format changes...
* some windows compilation fixes... tweaks to windows cmake?
* Update Efsw.cmake for build lib changes
* removed debug flag
* silence efsw build
dont add antlr project if it already exists
* Address review comments:
- use std::move on efswwatcher add_*
* add docs
* Add WatchModeByDefault ecompile.cfg option
* iniital work on tests
* Add CI actions
* some changes (passes locally on win, mac, linux)
* Fix fixtures dependency; use ecompile verbose mode
* Add core-changes
* Send ctrl+c instead of killing process
* Proper Python file naming
* Kill ecompile process on windows, SIGINT otherwise
---------
Co-authored-by: turleypol <turley@polserver.com>
* added sql tests (linux only)
* add mysql_escape_string module function
its now possible to define a port for sql connection. (0 means default
sql port like before)
* escape string can fail, return error in this case
* rebuild antlr
* added docs
* Squash only prettify changes from escript_formating_try
* support of "format-off" / "format-on" comments to mark areas without
formatting
* fix typo
* added FormatterIdentLevel, FormatterMergeEmptyLines cfg entry
better line splits for dicts/arrays
* added several spacing options. the current setting list is now:
//LineWidth
FormatterLineWidth 80
// keep original keyword spelling
FormatterKeepKeywords 0
// number of spaces for ident
FormatterIdentLevel 2
// multiple newlines get merged to a single
FormatterMergeEmptyLines 1
// space between emtpy parenthesis eg foo() vs foo( )
FormatterEmptyParenthesisSpacing 0
// space between emtpy brackets eg struct{} vs struct{ }
FormatterEmptyBracketSpacing 0
// space after/before parenthesis in conditionals
// eg if ( true ) vs if (true)
FormatterConditionalParenthesisSpacing 1
// space after/before parenthesis
// eg foo( true ) vs foo(true)
FormatterParenthesisSpacing 1
// space after/before brackets
// eg array{ true } vs array{true}
FormatterBracketSpacing 1
// add space after delimiter comma or semi in for loops
// eg {1, 2, 3} vs {1,2,3}
FormatterDelimiterSpacing 1
// add space around assignment
// eg a := 1; vs a:=1;
FormatterAssignmentSpacing 1
// add space around comparison
// eg a == 1 vs a==1
FormatterComparisonSpacing 1
// add space around operations
// eg a + 1 vs a+1
FormatterOperatorSpacing 1
// use \r\n as newline instead of \n
FormatterWindowsLineEndings 0
* added tab support
// use tabs instead of spaces
FormatterUseTabs 0
// tab width
FormatterTabWidth 4
* extended example ecompile.cfg with formatter settings
* cleanup
* program args comma is optional...
fixed line comments in group splitting
* since tokenids are now correct no more guessing for linecomments needed
* comments use as start tokenid the whitespace token if its on the same
line
* splitted processing from linebuilding
* renamed TokenPart to FmtToken better matches the purpose.
Comments get directly stored as FmtToken
started with a context enum
* better(?) formatting for groups
* fix eof rawlines
added check that all comments/rawlines got parsed
* const correctness
* datatype adapted to antlr
* fixed warnings
* added InsertNewlineAtEOF
* add newline at the end if the original file had one
dont strip comment whitespace if its somejind of "header block"
use the defined lineending for /* */ comments
* docs
* \r\n is default on windows \n otherwise
* fixed warning
---------
Co-authored-by: Kevin Eady <8634912+KevinEady@users.noreply.github.com>
* Make GetStandingLayer recognize items & fix bug affecting the z-coordinates returned.
* Oblige oppressive line length requirements
* Don't need this workaround anymore
* Add includeitems parameter to GetStandingLayers.
* Add GetStandingCoordinates EScript function.
* Remove semicolon from documentation.
* Fix line length nags.
* Add "x", "y" members to documentation.
* Reformat code.
* Update corechanges.
* Fix line break in core changes.
* Remove dummy parameter by removing broken reinterpret_cast.
* Update GetStandingLayers documentation.
* Remove x,y parameter overload of get_walkheights.
* mf_GetStandingLayers: use Pos2d instead of x, y params.
* Remove x,y param overloads of readdynamics. Rename flagless version to read_walkable_dynamics.
* mf_GetStandingCoordinates: Refactor to use Core::Pos2d, Core::Range2d and Realms::Realm.
* Clarify GetStandingCoordinates documentation.
* Use correct error message in documentation.
* Fix function signature in uo.em
* Add test script for GetStandingCoordinates.
Adds a simple test script for GetStandingCoordinates which
compares the function's return value to known good data
from the test map.
* Update changelog
* Fix test
* Add a commented out block into test script to generate expected data
* Fix clearance check.
Walls and other tall shapes were not getting detected correctly.
* rewrite of FindPath
added parameter for movemode, before it was only possible to use
findpath on land
* unknown movemode is now an explicit error.
extended tests
docu
* added core changes
* typo
* 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
* 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
* 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
* Add force parameter to CreateNPCFromTemplate()
* Update documentation
* Rename parameter to forcelocation
* Fix parameter name in docs
* Fix parameter name in docs (again)
* 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
* Add option to receive only PC or NPC area events: EnableEvents(ev, range, evmask)
where evmask can be:
0 -> accepts events from both PC or NPC (as it is now)
1 -> accepts events from PC only
2 -> accepts events from NPC only
* Add docs and entry in uo.em
* Add entered/leftarea tests
* added os:GetEnvironmentVariable to list all environs or get a single one
* first version of restarting the core to test save/load
added environment variable to filter tests
* fixed string constructor (size_t instead of signed int)
* added string_view constructor
* splitted and extended restart tests
* added docs
* added pol.cfg setting to disallow environment variable access
* Change environmental variable access rules
Instead of defaulting to all values allowed, now defaults to none. May
specify either `*` to allow all variables, or a comma-delimited list.
* Address review changes
- Use Clib lower instead of boost
- const auto references
- Separate tests for access and finding env vars
* Update documentation
* Apply suggestions from code review
Co-authored-by: Kevin Eady <8634912+KevinEady@users.noreply.github.com>
Co-authored-by: Fernando Rozenblit <rozenblit@gmail.com>
* Added an additional package root to ecompile.cfg.example
Added PackageRoot=D:\DistroDev\pkgopt to PackageRoot setting.
* Update pol-core/support/scripts/ecompile.cfg.example
Co-authored-by: Eric Swanson <eric.the.unicorn@gmail.com>
Co-authored-by: Eric Swanson <eric.the.unicorn@gmail.com>
* restructured pol testscripts
pkg based (dedicated pkgroot)
runs per pkg:
setup.ecl if exists
all scripts starting with "test"
cleanup.ecl if exists
return 1 for success everything else is an error
* Scripts can now be loaded and exported functions called
adapted testscripts to use this feature
critical script handling missing
* added support for used in critical scripts
* use weakptr instead of pid
moved keep_alive flag to uoexecutor
* Function and nethod accept now a argument list
* added docs
* missing docs
* faster shutdown time
* fixed typo
* fixed weird cornercase
* shorter test functions names, the length is limited, renamed
loadexported test script to have a dedicated testscript
* generate tiledata/multi for small boat
added generate scripts for generation..
adapted testdata set
* boat tests
* extended scripttests
scheduler will now always know about the loaded script
secured scheduler api
* cleanuo scripts for boat and npc
* shorter function for error return
fixed cleanup: npcs have gravestones, chars was one off and scripted
create of a char made it permanent logged in (until next restart),
which also means that it cannot be deleted
* bypass windows specific ecompile.cfg logic
* fix for parallel execution
* on windows its called .exe ..
* use target binary directly, so cmake can replace it with the actual path
use absolute path to testsuite
disabled temporary the copy of ecompile
* configure ecompile.cfg to add absolute path
* early sleepms calls can lead to endless waiting
* Code coverage (#260)
* play with coverage reports
* fix yml
* use 0 as default for gcov cmake var
* fixed used cov version, hopefully fixed now cmake
* demangle function names
* removed debug msg
* added a few polcore tests (basically just for coverage)
first set executor to noncritical before blocking
* added https://coveralls.io/github/polserver/polserver
* added a stackable item
added a few backpack insert tests
do coverage build only on push events not also for PR merge builds
* added storage tests..
docs need fixes, the Imps are not working at all
* fixed storage test to really move items
* added a house
corrected static/dynamic flag
created a few house tests
* updated yml file to new github api
* corrected coverage discord job name
* always put to runlist even if not necessary
* extended aos prop tests
* equip/unequip aos mod
* extra ci step for shard test fixtures and activated verbose shard test
* use extra ci step for all build configs, sorted testscripts for
execution
* fixed sorting
* added param to syslog to not print the context (cleaner testscript
visualization)
* added build targets for tests
* sleep api cleanup
* more aos property tests
* build for coveralls also on pullrequest
* readded debug state reset on schedule
* updated checkout ci action
* updated checkout in all ci runs
* origin/master:
Style...
Getting rid of a warning
Fixed wrong return type
style issues :p
Fixed the check for max line length and some other minor issues
Added SocketLineReader class, which is responsible for reading lines from a socket in a more efficient way. Modified Aux, Debug and WWW to use the new class.
removed some ancient macros from clib.h
Added error for if NaN sent as PID
Update docs to use different wording to prevent confusion.
Updated Docs.
Fix for GetProcess() not actually loading the parent PID.
Update docs to use different wording to prevent confusion.
updated travis build clang and ninja
Updated Docs.
Fix for GetProcess() not actually loading the parent PID.
Improved network code used by http and aux servers
Conflicts:
pol-core/doc/core-changes.txt