From 7315f8cec4ebdd86c52af5c9a05a4682a234285d Mon Sep 17 00:00:00 2001 From: jj Date: Wed, 12 Dec 2012 16:43:34 +0100 Subject: [PATCH] scripts/devel/create-items.rb --- NEWS | 1 + scripts/devel/create-items.rb | 161 ++++++++++++++++++++++++++++++++++ 2 files changed, 162 insertions(+) create mode 100644 scripts/devel/create-items.rb diff --git a/NEWS b/NEWS index a0e01dba1..fdde16e77 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,7 @@ DFHack future - lever: list and pull fort levers from the dfhack console. - stripcaged: mark items inside cages for dumping, eg caged goblin weapons. - soundsense-season: writes the correct season to gamelog.txt on world load. + - devel/create-items: spawn items New GUI scripts: - gui/guide-path: displays the cached path for minecart Guide orders. - gui/workshop-job: displays inputs of a workshop job and allows tweaking them. diff --git a/scripts/devel/create-items.rb b/scripts/devel/create-items.rb new file mode 100644 index 000000000..a1f85cc4c --- /dev/null +++ b/scripts/devel/create-items.rb @@ -0,0 +1,161 @@ +# create arbitrary items under cursor + +category = $script_args[0] || 'help' +mat_raw = $script_args[1] || 'list' +count = $script_args[2] + + +category = df.match_rawname(category, ['help', 'bars', 'boulders', 'plants', 'logs', 'webs']) || 'help' + +if category == 'help' + puts <