Fixed more plugins (embark/friendship/simple_embark)

develop
Warmist 2012-03-25 01:31:58 +02:00
parent b8210a4cc7
commit e36ed9ac07
5 changed files with 9 additions and 9 deletions

@ -366,8 +366,8 @@ function findVectors()
end
function GetRaceToken(p) --actually gets token...
local vec=df.world.raws.creatures.all
return vec[p]:deref().creature_id
local vec=df.global.world.raws.creatures.all
return vec[p].creature_id
end
function BuildNameTable()
local rtbl={}

@ -2,8 +2,8 @@ if not(FILE) then
--sanity test
--print("race num:"..engine.peekw(offsets.getEx("CurrentRace")))
--print(string.format("%x vs %x",offsets.getEx("CurrentRace"),VersionInfo.getGroup("Creatures"):getAddress("current_race")))
print("Race num:"..df.ui.race_id)
print("Your current race is:"..GetRaceToken(df.ui.race_id))
print("Race num:"..df.global.ui.race_id)
print("Your current race is:"..GetRaceToken(df.global.ui.race_id))
print("If this is wrong please type 'q'")
if(getline()=='q') then
return

@ -60,9 +60,9 @@ dofile("dfusion/editor.lua")
--dofile("dfusion/xml_struct.lua")
unlockDF()
plugins={}
--table.insert(plugins,{"simple_embark","A simple embark dwarf count editor"})
table.insert(plugins,{"simple_embark","A simple embark dwarf count editor"})
--table.insert(plugins,{"tools","some misc tools"})
--table.insert(plugins,{"embark","Multi race embark"})
table.insert(plugins,{"embark","Multi race embark"})
table.insert(plugins,{"friendship","Multi race fort enabler"})
--[=[table.insert(plugins,{"items","A collection of item hacking tools"})
table.insert(plugins,{"offsets","Find all offsets"})

@ -13,4 +13,4 @@ WorldData : 0x1306148
Xpointer : 0x7347f0
vtableLegends : 0x6e7594
Buildings : 0x12C4DA8
StartDwarfs : 0x5A5170
StartDwarfs : 0x5DA790

@ -275,9 +275,9 @@ function tools.empregnate(unit)
local arr1=unit.appearance.unk_51c
local arr2=unit.appearance.unk_51c
local created=false
if unit.relations.pregnancy_ptr:tonumber()==0 then
if unit.relations.pregnancy_ptr == nil then
print("creating preg ptr.")
unit.relations.pregnancy_ptr:newref()
unit.relations.pregnancy_ptr=unit.relations:_field("pregnancy_ptr"):new()--=df.new(unit.relations.pregnancy_ptr._kind)
created=true
end
local tarr1=unit.relations.pregnancy_ptr:deref().anon_1