diff options
| author | Warmist | 2012-03-26 18:12:32 +0300 |
|---|---|---|
| committer | Warmist | 2012-03-26 18:12:32 +0300 |
| commit | 61f0bc66af21de12fa3254abbc75a44463ac6a03 (patch) | |
| tree | 4697250c2ab5a86e1686b1d2c1b54ea21cea2a56 /plugins/Dfusion | |
| parent | 63634de8d5920246ce0b8af3cd5e3e754fc049db (diff) | |
| download | dfhack-61f0bc66af21de12fa3254abbc75a44463ac6a03.tar.gz dfhack-61f0bc66af21de12fa3254abbc75a44463ac6a03.tar.bz2 dfhack-61f0bc66af21de12fa3254abbc75a44463ac6a03.tar.xz | |
small changes to tools(lua)
Diffstat (limited to 'plugins/Dfusion')
| -rw-r--r-- | plugins/Dfusion/luafiles/tools/init.lua | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/plugins/Dfusion/luafiles/tools/init.lua b/plugins/Dfusion/luafiles/tools/init.lua index 6f1384ba..2d86cec0 100644 --- a/plugins/Dfusion/luafiles/tools/init.lua +++ b/plugins/Dfusion/luafiles/tools/init.lua @@ -260,7 +260,7 @@ function tools.changesite(names) print(string.format("%x->%d",off,n2)) engine.poke(off,ptr_site.type,n2) end -function tools.empregnate(unit) +function tools.project(unit) if unit==nil then unit=getSelectedUnit() end @@ -270,10 +270,25 @@ function tools.empregnate(unit) end if unit==nil then - error("Failed to empregnate. Unit not selected/valide") + error("Failed to project unit. Unit not selected/valid") + end + -- todo: add projectile to world, point to unit, add flag to unit, add gen-ref to projectile. +end +function tools.empregnate(unit) + if unit==nil then + unit=getSelectedUnit() end - print(string.format("%x %x",df.sizeof(unit))) + if unit==nil then + unit=getCreatureAtPos(getxyz()) + end + + if unit==nil then + error("Failed to empregnate. Unit not selected/valid") + end + if unit.curse then + unit.curse.add_tags2.STERILE=false + end local arr1=unit.appearance.unk_51c local arr2=unit.appearance.unk_51c local created=false |
