Skip to content

Instantly share code, notes, and snippets.

@warmist
Created January 11, 2013 21:49
Show Gist options
  • Save warmist/4514230 to your computer and use it in GitHub Desktop.
Save warmist/4514230 to your computer and use it in GitHub Desktop.
Fills the arena mode spawn table
--add races to the arena spawn list
local arena_spawn=df.global.world.arena_spawn
arena_spawn.race:resize(0)
arena_spawn.caste:resize(0)
for num,race in pairs(df.global.world.raws.creatures.all) do
for caste_id,caste in pairs(race.caste) do
arena_spawn.race:insert("#",num)
arena_spawn.caste:insert("#",caste_id)
end
end
arena_spawn.creature_cnt:resize(#arena_spawn.race)
--todo populate items
--arena_spawn.item_types[0]:insert("#",{new=true,item_type=0})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment