add multicmd script

develop
jj 2013-04-12 15:07:42 +02:00
parent b2e22a2c42
commit 2375f12fb7
3 changed files with 18 additions and 3 deletions

@ -3,9 +3,11 @@ DFHack future
New scripts: New scripts:
- masspit: designate caged creatures in a zone for pitting - masspit: designate caged creatures in a zone for pitting
- locate_ore: scan the map for unmined ore veins - locate_ore: scan the map for unmined ore veins
- multicmd: run a sequence of dfhack commands, separated by ';'
Misc improvements: Misc improvements:
- exterminate: renamed from slayrace, add help message, add butcher mode - exterminate: renamed from slayrace, add help message, add butcher mode
- autoSyndrome: disable by default - autoSyndrome: disable by default
- ruby: add df.dfhack_run "somecommand"
DFHack v0.34.11-r3 DFHack v0.34.11-r3

@ -1847,7 +1847,7 @@ use in your farming plots.
With a seed type, the script will grow 100 of these seeds, ready to be With a seed type, the script will grow 100 of these seeds, ready to be
harvested. You can change the number with a 2nd argument. harvested. You can change the number with a 2nd argument.
For exemple, to grow 40 plump helmet spawn: For example, to grow 40 plump helmet spawn:
:: ::
growcrops plump 40 growcrops plump 40
@ -2056,7 +2056,7 @@ Note that the script does not enforce anything, and will let you create
boulders of toad blood and stuff like that. boulders of toad blood and stuff like that.
However the ``list`` mode will only show 'normal' materials. However the ``list`` mode will only show 'normal' materials.
Exemples:: Examples::
create-items boulders COAL_BITUMINOUS 12 create-items boulders COAL_BITUMINOUS 12
create-items plant tail_pig create-items plant tail_pig
@ -2074,7 +2074,7 @@ Only works for native metal ores, does not handle reaction stuff (eg STEEL).
When invoked with the ``list`` argument, lists metal ores available on the map. When invoked with the ``list`` argument, lists metal ores available on the map.
Exemples:: Examples::
locate-ore list locate-ore list
locate-ore hematite locate-ore hematite
locate-ore iron locate-ore iron
@ -2090,6 +2090,15 @@ This script registers a hook that prints the appropriate string
to gamelog.txt on every map load to fix this. For best results to gamelog.txt on every map load to fix this. For best results
call the script from ``dfhack.init``. call the script from ``dfhack.init``.
multicmd
========
Run multiple dfhack commands. The argument is split around the
character ; and all parts are run sequencially as independent
dfhack commands. Useful for hotkeys.
Example::
multicmd locate-ore iron ; digv
======================= =======================
In-game interface tools In-game interface tools
======================= =======================

@ -0,0 +1,4 @@
# run many dfhack commands separated by ;
# ex: multicmd locate-ore IRON ; digv ; digcircle 16
$script_args.join(' ').split(/\s*;\s*/).each { |cmd| df.dfhack_run cmd }