-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Summary
Furniture and terrain pages show the items obtained by deconstruction but omit the required tools when the deconstruction requires "advanced" techniques (e.g., dismantling a fireplace, capacitor bank, or broken console).
reported at https://discord.com/channels/830879262763909202/830916329053487124/1478949066187477015
Context
src/types/Furniture.svelte– Deconstruct sectionsrc/types/Terrain.svelte– Deconstruct sectionsrc/types.ts–Constructiontype
Impact
Users cannot find what tools they need to perform advanced deconstruction on specific furniture/terrain (e.g. fireplace, electrical conduit, capacitor). The guide shows the loot but not the tools. This was reported by a player via Discord.
Steps to reproduce
- Navigate to the Fireplace (
f_fireplace) page in the guide. - Observe the "Deconstruct" section – it lists items dropped, but no tools required.
- In-game, deconstructing a fireplace requires HAMMER 2, CHISEL 2, PRY 3, SCREW 1.
Tech details
Root cause – two related gaps:
1. Constructions that deconstruct an item are not surfaced on Furniture/Terrain pages.
Both Furniture.svelte and Terrain.svelte compute a constructions list by filtering for constructions whose post_terrain matches the page's item id (i.e., constructions that build it). They never query for constructions whose pre_terrain or pre_furniture matches the id (i.e., constructions that deconstruct it).
The fix is to add a derived reactive variable in both components:
let deconstructingConstructions = $derived.by(() =>
data.byType("construction").filter(
(c) => c.pre_terrain === item.id || c.pre_furniture === item.id
)
);Then render these under a new "Deconstruct via" section using the existing <Construction> component, which already handles tool rendering via <RequirementDataTools>.
2. pre_furniture is missing from the Construction type.
The JSON data uses a pre_furniture field on construction objects (distinct from pre_terrain), but the Construction type in src/types.ts only declares pre_terrain. Add:
pre_furniture?: string; // furniture_idRelevant data structures:
- Advanced deconstruct constructions use
group: "advanced_object_deconstruction"andusing: [["object_deconstruction_advanced", 1]]. object_deconstruction_advancedis arequirementthat resolves to: HAMMER 2, CHISEL 2, PRY 3, SCREW 1.- Regular deconstruction (
constr_deconstruct, withdeny_flags: ["ADV_DECONSTRUCT"]) and easy deconstruction (constr_deconstruct_simple, requiring flagEASY_DECONSTRUCT) are separate constructions that also firepre_special: "check_deconstruct". Their tools are also not currently shown on Furniture/Terrain pages; this fix would surface them as well.
Examples
f_fireplace→ deconstructed byconstr_remove_object_fireplacef_electrical_conduit→ deconstructed byconstr_remove_electrical_conduitf_capacitor→ deconstructed byconstr_remove_capacitor_bankt_console→ deconstructed byconstr_remove_t_consolet_console_broken→ deconstructed byconstr_remove_t_console_broken
(All from nightly build, _test/all.json)
Acceptance criteria
- The Fireplace (
f_fireplace) detail page shows a section listing the tools required to deconstruct it (HAMMER 2, CHISEL 2, PRY 3, SCREW 1) alongside the existing drop list. - The same is true for other furniture/terrain with advanced deconstruction constructions.
- No regression for pages where no such deconstruction construction exists.