Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign up[Feature request] Make a debug function that deletes items. #12908
Comments
This comment has been minimized.
This comment has been minimized.
|
Could be also integrated with the editmap edit items on square option. Currently editmap allows only editing items on a single square, doesn't allow wishing quantities, deleting items, displaying items from multiple squares etc. |
This comment has been minimized.
This comment has been minimized.
|
I'm sceptical that this is needed for debugging.
|
This comment has been minimized.
This comment has been minimized.
|
Of course it isn't really needed for debugging, but it could help people to do whatever they want in this sandbox of ours. I have seen the request pop up before. |
This comment has been minimized.
This comment has been minimized.
|
Well, you can just create an acid field on the pile of items you want to remove. |
This comment has been minimized.
This comment has been minimized.
|
Use the Lua debug console (in the debug menu) and enter |
This comment has been minimized.
This comment has been minimized.
|
Would it be possible to have bindable Lua "macros"? Could be useful for some debugging cases. |
This comment has been minimized.
This comment has been minimized.
You mean with configurable key bindings accessible from withing the main game environment? That would require some code with the main input context. Add an action and let it trigger some Lua code. But I think it's not that much useful. Calling the debug menu is one key press (I mapped it to The Lua console stores the last few entered strings (like the filter menu in "list items around you" view), you can press the up-key to access them. Alternatively, you can put big function in data/json/main.lua or data/json/preload.lua, they can be called from the debug console. |
This comment has been minimized.
This comment has been minimized.
|
Useful or not, it's a debug menu, not a "cheat" menu or "convenience" menu, cluttering it up with cheat options sets a bad precedent. |
This comment has been minimized.
This comment has been minimized.
|
Well, as you can use the Lua commands to already do this, you don't really need it. So, don't go implementing this. Not closing the issue right now as I have some more questions. Is there a Lua guide for CDDA? Or something like that? I sadly don't have a lot of Lua experience. Probably I should do something about that. So I have no idea what the capabilities of Lua are. |
This comment has been minimized.
This comment has been minimized.
What do you need? Programming in Lua (http://www.lua.org/pil/contents.html) should give you enough information to understand the syntax, and there is doc/LUA_SUPPORT.md. |
This comment has been minimized.
This comment has been minimized.
|
Well, was thinking that for other players it might be useful to have some of the more requested commands listed somewhere. But for myself, reading those will be enough. |
kevingranade
closed this
Jul 18, 2015
This comment has been minimized.
This comment has been minimized.
|
Debug in a lava tile (which is currently only terrain with DESTROY_ITEM), drop items on it, remove lava tile. |
Soyweiser commentedJul 12, 2015
We have an option to spawn items, but no way of removing items reliably. It would be great if we could remove them using a debug item. Perhaps a simple "remove all items from a square" option, that allows you to target a square and remove everything.
Edit: http://smf.cataclysmdda.com/index.php?topic=10688.0 (posted link to this issue here).