* 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
* added guild and party tests
found a small bug in party, a scripted client could try to add an
offline char. Not worth it to mention in the docs I think
* dont kill the client if a stale target exists
* cancel leftover target
fix summary parsing script
* reduced timeouts
* made client faster
* added possibility to cancel a target, secured client more
* removed additional file
* fixed list_objs not beeing flanky due to different timings
* 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
* all except pol
* pol and includes under defines
* something weird has happened
* remove own folder from include searchpath
* fixed remaining, adapted include style for external headers
* missing include
* docs(CLAUDE.md): document config-file mechanism and changelog generation
- Add a "Config files" section: all config/*.cfg use the same
ConfigFile/ConfigElem remove_* reader (grep the filename to find its
reader); options are documented in configfiles.xml. Worked example for
adding a servspecopt.cfg server flag covers all five wiring sites
(ssopt.h / ssopt.cpp / settingsManager.ssopt / configfiles.xml +
datemodified / baredistrofiles.cpp) and the cfg quoting rule.
- Fix the changelog convention: core-changes.txt is the source and
corechanges.xml is generated by doctools/buildcorechanges.py (with its
datemodified) -- do not hand-edit the XML.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* docs(CLAUDE.md): cross-reference changelog step from the flag workflow
Doc-comprehension review found the "wired in five places" list reads as a
complete checklist, so a contributor could ship a user-visible flag without
the changelog entry (which lives under Conventions). Add a one-line pointer.
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>
* 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
* fixed_allocator cleanup
template argument is now the type and not the size
general cleanup, rewrote refill loop to better understand whats
happening
possibility to use different alignments (not needed for the used types)
* adapted fixed_allocator usage
* simplified message_queue conditial wait, removed unused header
* use moveonlyfunction for logging queue
* cleanup and performance improvment for clienttransmit
* use moveonlyfunction for sql
* fixed use after move
* TaskThreadPool uses moveonlyfunction
* catch exception locally without stopping the complete workerthread
* message_queue pop with timeout
* DynTaskThreadPool changes
- using move_only_function
- general simplification
- minimum of 4 threads
- added idle timeout to get rid of workers
* simplified auxpoolthread usage
* fixed threadmap initialization
* to avoid static initialization problem dont prefill worker threada in
the constructor
update macos to latest which hopefully supports jthreads
* removed debug logs
* seems macos-latest is not always 26, explicitly use it
* added jitter for timeout
secured the logic when to spawn a new thread more
busyguard is now used to track a message compare value against
live_threads to decide if a new thread should be spawned
unique name per poolworker
* 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
- escript tests: pass $<TARGET_FILE:ecompile|runecl> instead of
${output_bin_dir}/... - with the Visual Studio generator binaries land
in bin/<config>/, so every escript_* test failed locally while Ninja CI
passed
- message(ERROR) is not an error mode; clang-tidy-missing is now FATAL_ERROR
- git_rev target: "BYPRODUCTS=path" was a literal command argument, not the
BYPRODUCTS keyword; pol_revision.h is now properly declared
- source_group_by_folder: read the computed relative_file variable
(relative_path was never set, absolute-path sources got an empty group)
- shard_test_2: the second FIXTURES_REQUIRED overwrote the first; merged
into one property value
- remove dead code: unused DEBUG_VERSION/RELEASE_VERSION defines, unused
msvc_ide variable, no-op link_directories in set_compile_flags,
compiler-predefined _WIN32/_WIN64
- guard add_dependencies(lib* lib*_ext) with if(TARGET ...) consistently
(Antlr/Boost/Efsw/Cppdap already did; the target only exists when the
prebuilt lib is absent)
- replace deprecated TestBigEndian with CMAKE_CXX_BYTE_ORDER; warn that
big-endian is unsupported
- restore Boost unknown-toolset FATAL_ERROR (empty toolset made
bootstrap fail much later with a cryptic error)
- OUTPUT_BINARY_DIR/EXT_DOWNLOAD_DIR are CACHE PATH, not STRING
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* Improve webserver performance and add more tests
* add more tests and use fmt library
* attempt MacOS fix for OpenConnection
* add changelog for connection fix