-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Comments
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. |
I agree, I spent hours trying to sort out something better when I extended
it from metal gates to... barn doors I think? Unfortunately I didn't come
up with anything better.
|
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. |
@vache: +infinity for flag based gates/controls. |
Yea, that sounds like it'll work, cool.
|
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 is still reproducible. Currently barns use t_door_metal_locked for doors. They require t_barndoor to open them. Cataclysm-DDA/data/json/gates.json Lines 56 to 61 in 9d7ed7d
Currently t_barndoor can not be constructed. t_palisade_pulley can be constructed, but requires the door to be t_palisade_gate. Cataclysm-DDA/data/json/gates.json Lines 71 to 75 in 9d7ed7d
Both t_barndoor and t_palisade_pulley are displayed as "rope and pulley" in the UI. This causes confusion. |
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. |
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.
The text was updated successfully, but these errors were encountered: