So yea, the grappling hooks again. The way I understand it, currently they are pretty useless, also the implementation is strange. So I wanted to to make it even stranger
This is how I was imagining it: you climb up on the deployed grappling hook (which, as I understood, is a “furniture” with the t_rope_up ID), and after that it just “magically” appears in your inventory, or under your feet, if it’s full (or maybe in your hands?). The deployed t_rope_up disappears, of course. There are no additional menus or prompts asking you anything, the annoying “do you want to use your grappling hook?” when you try to climb down is already enough.
But staring at the code for some time made me understand that it will take too much of my time to figure it out, so HELP! Whoever has good understanding of the code, please point me into the right direction. So far I came up with these:
-
game.cpp: game::vertical_move()
at the end of function, before callingcata_event_dispatch::avatar_moves( old_abs_pos, u, m );
maybe check if your old position had at_rope_up
on it, then callhere.ter_set(t_none)
or something like that, then try adding the item to your inventory. Here is where I gave up, no idea about the inventory. -
maybe it is possible to un-deploy the
t_rope_up
, but IDK if it works across z-levels, then again, it would add another prompt/menu, which I really don’t need. But I could live with that, if it comes to this. -
if the feature turns out interesting or useful enough, it could become a PR