diff options
| author | Alexander Gavrilov | 2012-04-21 12:46:55 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-04-21 12:46:55 +0400 |
| commit | adbd351462f71db6a98b681eb9336524cc530092 (patch) | |
| tree | 774f2a4206ea487acfb1af183f9d49b8e5730dfd /plugins/Dfusion | |
| parent | 0a6982f4041f43d571bd2690f148ff369f2d8038 (diff) | |
| download | dfhack-adbd351462f71db6a98b681eb9336524cc530092.tar.gz dfhack-adbd351462f71db6a98b681eb9336524cc530092.tar.bz2 dfhack-adbd351462f71db6a98b681eb9336524cc530092.tar.xz | |
Rename units.other[0] to units.active.
Diffstat (limited to 'plugins/Dfusion')
| -rw-r--r-- | plugins/Dfusion/luafiles/adv_tools/init.lua | 2 | ||||
| -rw-r--r-- | plugins/Dfusion/luafiles/common.lua | 4 | ||||
| -rw-r--r-- | plugins/Dfusion/luafiles/tools/init.lua | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/plugins/Dfusion/luafiles/adv_tools/init.lua b/plugins/Dfusion/luafiles/adv_tools/init.lua index f5fd9a47..5504f32b 100644 --- a/plugins/Dfusion/luafiles/adv_tools/init.lua +++ b/plugins/Dfusion/luafiles/adv_tools/init.lua @@ -5,7 +5,7 @@ function adv_tools.reincarnate(swap_soul) --only for adventurer i guess if swap_soul==nil then swap_soul=true end - local adv=df.global.world.units.other[0][0] + local adv=df.global.world.units.active[0] if adv.flags1.dead==false then error("You are not dead (yet)!") end diff --git a/plugins/Dfusion/luafiles/common.lua b/plugins/Dfusion/luafiles/common.lua index 7e41dc4e..951468bc 100644 --- a/plugins/Dfusion/luafiles/common.lua +++ b/plugins/Dfusion/luafiles/common.lua @@ -472,8 +472,8 @@ function getSelectedUnit() return nil end local unit_indx=df.global.ui_selected_unit - if unit_indx<#df.global.world.units.other[0]-1 then - return df.global.world.units.other[0][unit_indx] + if unit_indx<#df.global.world.units.active-1 then + return df.global.world.units.active[unit_indx] else return nil end diff --git a/plugins/Dfusion/luafiles/tools/init.lua b/plugins/Dfusion/luafiles/tools/init.lua index b01157c8..e3a4607c 100644 --- a/plugins/Dfusion/luafiles/tools/init.lua +++ b/plugins/Dfusion/luafiles/tools/init.lua @@ -113,7 +113,7 @@ function tools.change_adv(unit,nemesis) if unit==nil then error("Invalid unit!") end - local other=df.global.world.units.other[0] + local other=df.global.world.units.active local unit_indx for k,v in pairs(other) do if v==unit then @@ -157,7 +157,7 @@ function tools.MakeFollow(unit,trgunit) error("Invalid creature") end if trgunit==nil then - trgunit=df.global.world.units.other[0][0] + trgunit=df.global.world.units.active[0] end unit.relations.group_leader_id=trgunit.id local u_nem=getNemesis(unit) |
