cataclysmbnteam / Cataclysm-BN

Cataclysm: Bright Nights, A fork/variant of Cataclysm:DDA by CleverRaven.
https://docs.cataclysmbn.org
Other
703 stars 273 forks source link

Item-ify other furniture #1561

Open Secret-Cisco opened 2 years ago

Secret-Cisco commented 2 years ago

Is your feature request related to a problem? Please describe.

Furniture such as chairs and tables can't be transported long distances without dragging or completely scrapping.

Describe the solution you'd like

Make it so that furniture like lamps, chairs, etc* can be "deconstructed" similarly to ovens and refrigerators so they can be put in vehicles or otherwise more readily transported.

Describe alternatives you've considered

Include stuff that is nailed down, by un-nailing/bolting. An even faster "deconstruction" method for things like chairs which simply requires reconceptualizing the furniture as an item, this would have the added benefit of allowing you to do something like grab a dining chair and use it as a makeshift weapon. Could also very quickly"take down" chairs/etc like camp chairs but with a much larger volume item resulting.

Additional context

Near as I can tell this can be done purely in the JSONs, if so I can do this myself and have a prototype ready soonish. The hardest part is choosing the volume and weight, how big is a "chair"?

Secret-Cisco commented 2 years ago

Yeah, lamps #1395

Proxiehunter commented 2 years ago

Lamps yes, but chairs and a lot of etc. are valuable sources of resources when traditionaly disassembled. Lamps are mostly only good for assembling another lamp if you take them apart.

Using take down as you sugest in your alternative though might preserve the ability to take them apart for resources.

Secret-Cisco commented 2 years ago

As I understand it from the _f_campchair entry, taking down deployed furniture is just deconstructing it through an action rather than construction and has to use the same "deconstruct" property anyways.

But you can still dismantle items and smash furniture so at worst it'd add an extra step to taking apart chair/etc which is a bit annoying but the materials are still available. I'm pretty sure allowing a furniture item to be directly scrapped and taken down would require coding which is beyond my abilities.

{ "type": "furniture", "id": "f_camp_chair", "name": "camp chair", "symbol": "#", "looks_like": "f_chair", "description": "Sit down, have a drink. It can folded for easy transportation.", "color": "brown", "move_cost_mod": 1, "coverage": 35, "floor_bedding_warmth": -1000, "bonus_fire_warmth_feet": 1000, "required_str": 3, "deployed_item": "camp_chair", "examine_action": "deployed_furniture", "flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "CAN_SIT" ], "max_volume": "875 L", "deconstruct": { "items": [ { "item": "camp_chair", "count": 1 } ] } },