polserver/pol-core/support/scripts
Fernando Rozenblit 721e4fefe0
Refactor Item states to be explicit instead of implicit (#919)
* 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
2026-08-10 18:17:53 +00:00
..
attributes.em Format testsuite scripts, pol-core support modules (#713) 2024-10-04 10:29:55 +02:00
basic.em Add support for regular expressions (#818) 2025-11-17 18:02:45 +01:00
basicio.em Format testsuite scripts, pol-core support modules (#713) 2024-10-04 10:29:55 +02:00
boat.em Format testsuite scripts, pol-core support modules (#713) 2024-10-04 10:29:55 +02:00
cfgfile.em Format testsuite scripts, pol-core support modules (#713) 2024-10-04 10:29:55 +02:00
cliloc.em Format testsuite scripts, pol-core support modules (#713) 2024-10-04 10:29:55 +02:00
datafile.em Format testsuite scripts, pol-core support modules (#713) 2024-10-04 10:29:55 +02:00
ecompile.cfg.example Fix a typo in ecompile.cfg.example (#833) 2025-12-21 09:25:43 +01:00
file.em Format testsuite scripts, pol-core support modules (#713) 2024-10-04 10:29:55 +02:00
guilds.em Format testsuite scripts, pol-core support modules (#713) 2024-10-04 10:29:55 +02:00
http.em Format testsuite scripts, pol-core support modules (#713) 2024-10-04 10:29:55 +02:00
math.em Format testsuite scripts, pol-core support modules (#713) 2024-10-04 10:29:55 +02:00
npc.em Attackable item (#884) 2026-07-30 20:27:36 +02:00
os.em Multiple network improvements (#894) 2026-07-13 06:47:24 +02:00
party.em Add module function party::ListParties() (#886) 2026-05-23 08:27:16 +02:00
polsys.em Refactor Item states to be explicit instead of implicit (#919) 2026-08-10 18:17:53 +00:00
sql.em Format testsuite scripts, pol-core support modules (#713) 2024-10-04 10:29:55 +02:00
storage.em Format testsuite scripts, pol-core support modules (#713) 2024-10-04 10:29:55 +02:00
unicode.em Format testsuite scripts, pol-core support modules (#713) 2024-10-04 10:29:55 +02:00
uo.em Attackable item (#884) 2026-07-30 20:27:36 +02:00
util.em Add module function util::RandomUUID() (#803) 2025-08-16 13:39:34 +02:00
vitals.em Attackable item (#884) 2026-07-30 20:27:36 +02:00