diff --git a/README.md b/README.md index c453023..74bd0b5 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,10 @@ two-stage repairable sink (repair, then gather water). ## Features -- **Searchable furniture** — medical cabinet, fridge, and vending machine yield - random items from weighted, config-defined loot tables. Per-object cooldown. +- **Searchable furniture** — medical cabinet and fridge yield random items from + weighted, config-defined loot tables. Per-object cooldown. - **Repairable sink** — repair with a `Wrench`/`PipeWrench`, then gather water - into a held/inventory container. Per-player cooldown, configurable amount. + into a held container. Per-player cooldown, configurable amount. - **JSON-configured** — interactables, loot tables and scalar tunables live in JSON under `/YAInteraction/`. Defaults are written on first start and read (overriding defaults) on every start after. No target/loot @@ -21,12 +21,17 @@ two-stage repairable sink (repair, then gather water). ## Target objects (v1) -| Classname | Action | Loot table | -|-----------|--------|-----------| -| `StaticObj_Furniture_case_sink_a` | Repair → Gather Water | — | -| `StaticObj_Furniture_lekarnicka` | Search | MedTable | -| `StaticObj_Furniture_fridge` | Search | FoodTable | -| `StaticObj_Furniture_vending_machine` | Search | VendingTable | +Identified by their YAProxy proxy name (substring match): + +| Proxy | Action | Loot table | +|-------|--------|-----------| +| `case_sink_a` | Repair → Gather Water | — | +| `lekarnicka` | Search | MedTable | +| `fridge` | Search | FoodTable | + +> Vending machines (`vending_machine`) are **deferred**: in tested buildings the +> proxy exposes no targetable object, so it can't be detected. `VendingTable` is +> still defined for when that's solved or its loot is moved to another furniture. ## Configuration files diff --git a/scripts/4_World/YAInteraction/Config/YAInteractionConfigLoader.c b/scripts/4_World/YAInteraction/Config/YAInteractionConfigLoader.c index 5c00af8..7bd7aa6 100644 --- a/scripts/4_World/YAInteraction/Config/YAInteractionConfigLoader.c +++ b/scripts/4_World/YAInteraction/Config/YAInteractionConfigLoader.c @@ -113,7 +113,10 @@ class YAInteractionConfigLoader d.Interactables.Insert(MakeEntry("case_sink_a", YAInteractionConfig.ACTION_REPAIR_WATER, "", Settings.SinkPlayerCooldownSec)); d.Interactables.Insert(MakeEntry("lekarnicka", YAInteractionConfig.ACTION_SEARCH, YAInteractionConfig.TABLE_MED, Settings.ObjectCooldownSec)); d.Interactables.Insert(MakeEntry("fridge", YAInteractionConfig.ACTION_SEARCH, YAInteractionConfig.TABLE_FOOD, Settings.ObjectCooldownSec)); - d.Interactables.Insert(MakeEntry("vending_machine", YAInteractionConfig.ACTION_SEARCH, YAInteractionConfig.TABLE_VENDING, Settings.ObjectCooldownSec)); + // Vending machines deferred: in tested buildings the proxy has no targetable + // object (target.GetObject()==null), so it can't be detected/overridden + // cleanly. VendingTable below is kept for when that's solved or moved to a + // detectable furniture. Re-add: MakeEntry("vending_machine", ACTION_SEARCH, TABLE_VENDING, ObjectCooldownSec) // --- Loot tables (classnames verified in P:\DZ) --- YALootTable med = MakeTable(YAInteractionConfig.TABLE_MED);