Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constructions: pulley & rope system #13562

Closed
drbig opened this issue Sep 15, 2015 · 9 comments · Fixed by #59485
Closed

Constructions: pulley & rope system #13562

drbig opened this issue Sep 15, 2015 · 9 comments · Fixed by #59485
Labels
<Bug> This needs to be fixed Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. old issue - still valid?

Comments

@drbig
Copy link
Contributor

drbig commented Sep 15, 2015

You're at your dream ranch near the garage, your careless driving made you rip off the lever to open the garage doors... But no problem! You can rebuild it!...

22:31:36 < dRbiG> t_barndoor[207] vs t_palisade_pulley[208]

Nope, it won't work, because you built the latter instead.

A sane 'quick' fix would be to ask what 'type' the player wants to build.

The long-term/better solution is an actual look over the constructions and then figuring out a sane way to handle it (e.g. 'What should this pulley & rope system be connected to?'). I'm quite positive there will be other cases like this one. 'Bob the builder stuff' is obviously one of the least play-tested things.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@drbig drbig added <Bug> This needs to be fixed (P5 - Long-term) Long-term WIP, may stay on the list for a while. labels Sep 15, 2015
@vache
Copy link
Contributor

vache commented Sep 15, 2015

The gate opening system in general is annoying. There are only a few combinations of wall/floor/door types that work (see https://github.com/CleverRaven/Cataclysm-DDA/blob/master/src/activity_handlers.cpp#L1133). I understand why this is, but I still feel like there should be a better way.

@kevingranade
Copy link
Member

kevingranade commented Sep 15, 2015 via email

@vache
Copy link
Contributor

vache commented Sep 16, 2015

I was thinking about this a bit more last night, and it seems like the wall_type check could be replaced with something like terrain.has_flag("WALL"), since it doesn't seem like we care exactly what type of wall is there, only that what is there is a wall. This would get rid of the need for the separate t_gate_controls_concrete. Next, we could change the controls to furniture instead of terrain, and use floor_type = the terrain under the controls. This seems like it would get rid of the need for t_gates_control_metal. To fix the rest, I think we could add a new flag, "GATE". When you activate gate controls, it checks the diagonals for a terrain with the flag and if it finds it, start setting it to the floor type we determined, or if it finds the floor type (with the correct wall orientation) it tries to close it by setting it back to the terrain, which might have to be defined somewhere in the gate controls JSON as well, just add a "gate_type" field to every gate controls. Now we can look up that "gate_type" field and say "this gate controls blah blah" in the construction menu. Although, if we associate the controls with the gate in json, the flag may not actually be necessary.

We could just add "open" terrains for every "GATE" terrain, like the palisade gate and have them automatically preserve the association between open/closed gates, then we would just need one set of controls that just search for the flag.

It still doesn't solve the problem of a proliferation of gates and their controls, but I think something like that would help a bit.

@Zireael07
Copy link
Contributor

@vache: +infinity for flag based gates/controls.

@kevingranade
Copy link
Member

kevingranade commented Sep 17, 2015 via email

@eliotcougar
Copy link

eliotcougar commented Oct 14, 2016

How hard would it be to assign a unique ID to every "toggle-able" terrain and have a list of IDs attached to every "lever-type" furniture?.. Linking existing adjacent levers/doors could be made during mapgen, and when building levers/pulleys there could be a Dwarf Fortress-ish action "attach pulley to..." that would bring the list of available attach points nearby... Different control mechanisms (lever, pulley, terminal) can have different range, material and skill requirements...
This approach could also allow easier control of doors and possibly other things (turrets/stairs/alarms/elevators) from computer terminals and NPC dialogues...
PS: just a funny thought - regular doors can be described as being their own opening levers... Multi-tile fences can be described as each fence connected as a lever to every segment of the multi-fence... So that activating any segment opens/closes the whole row...
Bonus points for verb-based control channels between controls and actors... Connecting a switch to a turret asks a turret for available commands it understands... Player chooses an action the switch is supposed to do... Activating a switch sends a predetermined verb to the ID associated with a turret... Turret performs the verb (or does not)...
It is opening a possibility of Turing-completedness in the future (think minecart computers in DF, redstone shennanigans in Minecraft)...

@Night-Pryanik
Copy link
Contributor

Will #16368 and #16441 fix this?

@int-ua int-ua added (S1 - Need confirmation) Report waiting on confirmation of reproducibility and removed (P5 - Long-term) Long-term WIP, may stay on the list for a while. <Bug> This needs to be fixed labels Jan 26, 2021
@hexagonrecursion
Copy link
Contributor

This is still reproducible.

Currently barns use t_door_metal_locked for doors. They require t_barndoor to open them.

{
"type": "gate",
"id": "t_barndoor",
"door": "t_door_metal_locked",
"floor": "t_dirtfloor",
"walls": "t_wall_wood",

Currently t_barndoor can not be constructed. t_palisade_pulley can be constructed, but requires the door to be t_palisade_gate.

{
"type": "gate",
"id": "t_palisade_pulley",
"door": "t_palisade_gate",
"floor": "t_palisade_gate_o",

Both t_barndoor and t_palisade_pulley are displayed as "rope and pulley" in the UI. This causes confusion.

@actual-nh actual-nh added <Bug> This needs to be fixed Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Aug 9, 2021
@I-am-Erk
Copy link
Member

If this still exists it can be solved just by calling the barndoor rope and pulley a "barn door opener", or by making these openers into a single pulley system that can open either type of door.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. old issue - still valid?
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants