diff --git a/plugins/Dfusion/luafiles/tools/init.lua b/plugins/Dfusion/luafiles/tools/init.lua index 6f1384baa..2d86cec07 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