From 277612327427c60cd45532b3e420ff7365042699 Mon Sep 17 00:00:00 2001 From: jj Date: Mon, 8 Apr 2013 23:16:49 +0200 Subject: [PATCH] add scripts/devel/unforbidall and scanitemother --- scripts/devel/scanitemother.rb | 10 ++++++++++ scripts/devel/unforbidall.rb | 3 +++ 2 files changed, 13 insertions(+) create mode 100644 scripts/devel/scanitemother.rb create mode 100644 scripts/devel/unforbidall.rb diff --git a/scripts/devel/scanitemother.rb b/scripts/devel/scanitemother.rb new file mode 100644 index 000000000..e026f926b --- /dev/null +++ b/scripts/devel/scanitemother.rb @@ -0,0 +1,10 @@ +# list indexes in world.item.other[] where current selected item appears + +tg = df.item_find +raise 'select an item' if not tg + +o = df.world.items.other +# discard ANY/BAD +o._indexenum::ENUM.sort.transpose[1][1..-2].each { |k| + puts k if o[k].find { |i| i == tg } +} diff --git a/scripts/devel/unforbidall.rb b/scripts/devel/unforbidall.rb new file mode 100644 index 000000000..565f46a58 --- /dev/null +++ b/scripts/devel/unforbidall.rb @@ -0,0 +1,3 @@ +# unforbid all items + +df.world.items.all.each { |i| i.flags.forbid = false }