* 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
* initial repsys tests
* prevent division by zero, dont build statmsg when char is offline and cleanup
* fixed race in auxconnection transmity the order wasnt guaranteed
* fixed datastore loading
* xml and binaryfile tests
fixed small bugs
* fixed platform specifics
* fixed use-after-free when the document went out of scope.The document is
now shared accross all objects
* 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
* simplify winsock init
* improve hostname resolving
* refactor ip checks into an IpMatch class
* remove default constructor and do formatting
* tighten corechanges text
The AOS tooltip applied the ServSpecOpt title separators to parts a mobile does
not have, and skipped the race and guild separators in the combinations that
needed them. With the default single space this was invisible, but it made the
options unusable: TitleSuffixSeparator=", " gave every suffix-less mobile a
dangling "Name, ". The paperdoll was already correct, so both renderers now
build the title through Character::displayed_title( bool with_guild ).
The tooltip pads any cliloc 1050045 argument that would be empty with a space,
since clients drop a zero-length argument and shift the rest; output with the
default separators is therefore unchanged. The new shard test covers all 16
combinations of set title parts against both renderers under three separator
configurations.
Co-authored-by: murderinc <3738856+murderinc@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* make aux nonblocking
* fix webserver stall if client stops reading
* add StallBudget and make web sockets also non-blocking
* set small buffer size before accepting
* increase payload to force send waits
* Add configurable title separators (ServSpecOpt)
The core assembles a mobile's displayed title (paperdoll + AOS tooltip) as
title_prefix + " " + name + " " + title_suffix, with a " " before "(race)"
and "[guild]". Those separating spaces were hardcoded, so a shard whose
title_prefix/title_suffix already carry their own separator (a trailing
space, or a leading ", ") ends up with a doubled space or a " ,".
Add four ServSpecOpt string options - TitlePrefixSeparator,
TitleSuffixSeparator, TitleRaceSeparator, TitleGuildSeparator - each
defaulting to a single space, so existing output is byte-for-byte
unchanged. Setting one empty lets the title strings supply their own
separator (e.g. a suffix of ", Guildmaster" rendered directly against
the name).
Docs (configfiles.xml) and corechanges.xml updated.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* Title separators: source changelog + bare-distro template
Follow-up to the ServSpecOpt title-separator change:
- move the changelog entry to its source pol-core/doc/core-changes.txt and
regenerate docs/.../corechanges.xml via doctools/buildcorechanges.py
(the .xml is generated, not hand-authored)
- document the four options in the bare-distro servspecopt.cfg template
(poltool/baredistrofiles.cpp)
- bump configfiles.xml datemodified
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: murderinc <3738856+murderinc@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* isolate uofile globals into a singleton
* refactor singleton into object instance in uoconvert
* get rid of lazy loading and singleton, move singleton to uotool
* move files
* fix includes
* delete dead code
* relocate singleton
* move functions into uotool
* move uotool only static functions
* get rid of uofilei.h
* get rid of uofile.h
* extract tiledatacache class
* extract staticscache class and file handle UniqueFile
* clean map reading
* fix uoconvert errors with map2
* fix line length
* C style to std::array
* light modernization
* Fix ShortCircuit jump optimization corrupting assignments
The short-circuit jump optimizer threaded a logical jump past an
opposite-type logical jump (offset++). That target pops the value on
fall-through (Executor::ins_logical_jump), so skipping it left a stray
value on the stack, which corrupts a following stack-addressed assignment:
var x := ( a && b ) || ( c && d );
left x uninitialized whenever the first clause was false (i.e. the
deciding clause is not the first operand). The same chain works as an
if() condition or when declaration and assignment are split
( var x; x := ... ).
Only thread same-type logical jumps; keep targeting opposite-type ones so
their fall-through pop still runs.
Adds testsuite/escript/opt/shortcircuit7 exercising the value / assignment
context (companion to shortcircuit6's if()-condition tests).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* removed other unsafe jump merges
additional test
* adapted testdata
* core changes xml
---------
Co-authored-by: Oleksii Rebreniuk <oleksii.rebreniuk@shopit.se>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix old Tokuno map issue
* quick fixes
* restructure mapwriter to store files in memory until a write is needed
* add dirty flag to only flush files which changed
* change uoconvert use of mapwriter to a stack variable
* added detailed timers to uoconvert map
* precalculate lowest adjacent z so we dont need to calculate again for each tile
* syntax formatting
* read landtiles directly instead of using safe_getmapinfo
* encapsulate the solid block processing result for a single block
* make processing parallel - 5 sec to 2,7 sec for britannia
* add changelog entry
* reduce redundant per-tile work in the solid-block loop
* bucket each static block once instead of rescanning it per tile
readstatics_block() presorts a block's statics by cell in a single pass
(storage order preserved); each tile's bucket then serves directly as the
per-tile scratch, dropping the 64x whole-block rescan and the per-tile copy.
Outputs byte-identical (SHA256 gate, map+maptile, both realms).
* extract merge_shapes and flatten the water-type lookup
- the shape-consolidation loop moves verbatim into merge_shapes(), with
its invariants and comments; ComputeSolidBlock now reads as
collect -> filter -> sort -> merge -> emit
- DiscardedWaterTypes is snapshotted into a flat per-graphic table after
config load; the hot per-static probe drops the tree lookup
Outputs byte-identical (SHA256 gate, map+maptile, both realms).
* name the conversion's magic numbers
MAX_LANDTILE_ID joins LANDTILE_COUNT in plib; wall height, water-discard
window and sand-over-water gap become named constexprs. Landtile classifiers become constexpr in
terrainplane.h with their id lists sourced. Outputs byte-identical.
* unify the block-index math into one helper per layout
realm_block_index (8x8 row-major: base.dat/solidx1/statics.dat),
maptile_index (64x64, rounded-up stride), and staticblock_from_coords
(client mul column-major, reused in RawMap::rawinfo) replace eight
hand-rolled copies of the stride dance. SOLIDX_* macros become constexpr;
dead mapblob.h (wrong 16x16 sizes, never included) is deleted.
Outputs byte-identical; unittest_pol+escript suites pass.
* refactor file writing
* add file RAII
* fix macos
* document uofiles and MORE_SOLIDS flag
* modernize: span for extract_planes, set contains, const/constexpr fixes
* update changelog
* probe landtile classes through a compile-time table and change push_back to emplace_back
* fix corechanges.xml mismatch
* add erorr handling to ReadEntireFile
* 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
* Improve webserver performance and add more tests
* add more tests and use fmt library
* attempt MacOS fix for OpenConnection
* add changelog for connection fix
* store globals as weakptr in class/funcs to prevent memleak when stored
as global WIP
* let it crash if globals are no longer valid?
* typo
* removed debug prints
* let only the current executor crash
* fixed logic
* added and corrected tests
* cleanup
* use emplace_back
* classes also need to switch to weakptr
* docs
* fixed problem when sending vitals bigger then 0xffff to other clients.
The percent value was calculated based on the already capped values
* directly use the correct type
* docs
* Restore NPC cold_resist_cap from its own orig on refresh_ar - tests
* Restore NPC cold_resist_cap from its own orig on refresh_ar - actual fix
* Update core-changes and make comments more concise
* silence cppdap lib
* refornat curl flags for readabilty
* zlib was build with the wrong runtime mode. Updated version
* use mariadb connector instead of mysql
* removed mysql define
* removed mysql
* removed installation of mysqlclient in workflow runs
* fixed curl install dir
* missing zstd on macos
* fixed module parsing for cmake 4.x
* docs
* added mariadb build to tidy_pr_check
* test sql on all platforms
some plugins need to included on windows
* 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
* dont use a static buffer for reading cfgfile to be threadsafe
eg config/www.cfg can load in the background
cleanup the file: deleted ancient define, simplified logic
* docs
* uoconvert: fixed wrong coordinates error msgs when too many static items exist in a
block
* fix gcc?
* since we have it.. use the correct literal
* fixed wrong format and warning
* docs and slightly changed msgs
* addressed comments
* dynamic items with height 0 (floor) didnt blocked LOS like static items
does
optimized los check by using multimap for faster lookup of dynamic items
added test
* revert multimap usage, benchmark showed that the original solution is
way faster
* docs
* ListingWriter prints filepath, filelineno and source line
the old compiler did it, now again in the new compiler
since shortcircuit the original sourcelines are available during compilation
* remove listfile.inc function from test result
* prefix output
* custom formatting
* docs
* impptr_if now accepts also const BObjectImp*
* cfg::GetConfigInt returns error if the value would produce an overflow
code cleanup of cfgmod
added tests
* increase test coverage
* added comment why the exception should be catched without reaction
fixed member_id test
* added corechanges
its 2026
removed else
Added uoconvert.cfg element StaticOptions extended by DiscardedWaterTiles. Lists
the tiles that will be discarded during the processing of solid statics, where
the map is at or below the same Z level as the static, allowing boats to bump
into shores. Defaults to tiles in the range from 0x1796 to 0x17B2 if not present
in the config file.
* added debugs for boatmove
* log component send
* added option to resend components
* compilation fix
* activate by default
* cleanup fix no1
more debug logs
* test client now ignores/removes objects out of range
lets see what explodes
* syntax fix
* syntax fix..
* need a copy of the keys
* handle equipped items
* handle server side view range change
* test char on boat and move to npc
* compilation fix?
* more logs
* corrected logs
* the boat needs to move more
* change order, first smooth move then new objects
* correct fix I think
send new objects for all newer clients on the boat after the boat pkt is
send (which also updates the position for the client)
* cleanup, fixed first test by sending also the playerposition when a new
obj appears
* test for item on boat
* need to move the boat further so that components are in range
* is the test wrong or is it a bug?
* move further
* ability to disable auto delete of objects to be able to test serverside
remove pkts
* change start position of the boat
* cleanup and fixed tests?
* more cleanup
* docs