Closed mlangsdorf closed 6 years ago
If you're looking for easy but not-so-great suggestions, you can always implement it the way I was using computers to unlock doors in the labs. It would just convert all t_door_locked to t_door_closed_unlocked, or whatever, that fell within range x of the control device. You'd build your draw bridge on all the pit tiles and call them all up or all down. Works well for RPing but I doubt the players would like it since the bridge doesn't go "up" in a tile, it just disappears and re-appears.
Perhaps a secondary "build" that counts as a Drawbridge Tile, but when you activate the Drawbridge Winch "folds" (like the Foldable Vehicles mod) all those tiles into a single length "Raised Drawbridge" band of tiles as wide as the Drawbridge Base tiles that you initially set, that counts as a wall, blocking line of sight as well as line of effect?
The trick is how to determine the number of tiles that a raised drawbridge supports, because there's no way to save state about a terrain tile. Furniture tiles can have inventories that are saved, but some of the furniture interactions are limited.
That's why I suggested having it work like the Folding Vehicles mod; as far as I understand it, it remembers the vehicle blueprint in the folded vehicle's information, and upon unfolding it, recreates the vehicle. Or is that an impossibility?
Closing this because I don't have time to work on it.
I want to add a drawbridge, a construction similar to a palisade gate, but that would instead over multiple rows and columns of pits (including spiked or glass pits). Basically, I'd like to have a 2x7 row of pits with an easy way to get my vehicle across it.
I would need to add the following terrain:
controls_drawbridge would be a combination of the existing open_gate and pit_covered functions, converting the existing pit terrain to pit_bridged. unfortunately, there's no way to store a flag or quality for terrain, so there's no way to indicate that the drawbridge is N rows wide. short of creating t_drawbridge_up1 through t_drawbridge_up6 (or so) terrains and having controls_drawbridge know how many rows of spits to cover based on the number, which is inelegant at best.