YALootBoxes/scripts/4_World
smthspec ff51bde976 Fix open action (register custom action), stop restart-stacking, numeric log level, config docs
Action (the real "no action" cause):
- DayZ does not auto-discover custom actions; ActionConstructor holds a
  hardcoded list and AddAction() silently drops anything missing from it.
  Added a modded ActionConstructor that registers YALB_ActionOpenLootbox, so
  the open action finally attaches to the box.
- Switched the action target condition CCTObject -> CCTCursor (the look-at
  pattern vanilla uses for world-object interactions).

Restart stacking:
- Spawn boxes with CreateObjectEx + ECE_NOPERSISTENCY_WORLD so they are never
  saved to the world DB and don't survive restarts.
- Added CleanupOrphanedBoxes(): on init, scan each spawn location and delete
  any leftover YALootBoxes_Base before spawning (clears boxes persisted before
  this change).

Logging:
- DebugLogLevel changed from a string to a numeric field (0=off 1=ERROR
  2=WARN 3=INFO 4=DEBUG 5=VERBOSE), clamped at load. Removed the string parser.
  NOTE: existing main_config.json has a string value and must be regenerated.

Config docs:
- Each generated JSON now includes a "_comment" array describing every field
  and its range (ignored by the loader). README + configfiles.readme updated.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 11:31:20 +03:00
..
YALootBoxes_ActionOpen.c Fix open action (register custom action), stop restart-stacking, numeric log level, config docs 2026-06-20 11:31:20 +03:00
YALootBoxes_Config.c Fix open action (register custom action), stop restart-stacking, numeric log level, config docs 2026-06-20 11:31:20 +03:00
YALootBoxes_Lootbox.c Phase 3: leveled logging + green cleanups 2026-06-19 21:57:31 +03:00
YALootBoxes_Manager.c Fix open action (register custom action), stop restart-stacking, numeric log level, config docs 2026-06-20 11:31:20 +03:00