Dammit, that's where it was!
I knew I wasn't insane, I just couldn't figure out where those went.
Hmmm, I was trying to make it so I could have two reactions, one to make a 2x1 and one to make a 1x2 but I think I did something wrong.
I added in the relevant reactions, I've got the init.lua saved into df/hack/scripts (should it go in gui or something?), made a new world with the reactions, used it, produced the small rock, nothing else.
No error or anything either.
local eventful=require("plugins.eventful")
function add_site(size,civ,site_type,name)
local x=(df.global.world.map.region_x+1)%16;
local y=(df.global.world.map.region_y+1)%16;
local minx,miny,maxx,maxy
if(x<size) then
minx=0
maxx=1*size
elseif(x+size>16) then
maxx=16
minx=16-1*size
else
minx=x-size
maxx=x+size
end
if(y<size) then
miny=0
maxy=0
elseif(y+size>16) then
maxy=16
miny=16
else
miny=y-size
maxy=y+size
end
require("plugins.dfusion.adv_tools").addSite(nil,nil,maxx,minx,maxy,miny,civ,name,site_type)
end
function reaction(reaction,reaction_product,unit,input_items,input_reagents,output_items,call_native)
require("gui.dialogs").showInputPrompt("Site name", "Select a name for a new site:", nil,nil, dfhack.curry(add_site,1,unit.civ_id,0))
call_native.value=false
end
eventful.registerReaction("LUA_HOOK_MAKE_SITE2x1",reaction)
local eventful=require("plugins.eventful")
function add_site(size,civ,site_type,name)
local x=(df.global.world.map.region_x+1)%16;
local y=(df.global.world.map.region_y+1)%16;
local minx,miny,maxx,maxy
if(x<size) then
minx=0
maxx=0
elseif(x+size>16) then
maxx=16
minx=16
else
minx=x-size
maxx=x+size
end
if(y<size) then
miny=0
maxy=1*size
elseif(y+size>16) then
maxy=16
miny=16-1*size
else
miny=y-size
maxy=y+size
end
require("plugins.dfusion.adv_tools").addSite(nil,nil,maxx,minx,maxy,miny,civ,name,site_type)
end
function reaction(reaction,reaction_product,unit,input_items,input_reagents,output_items,call_native)
require("gui.dialogs").showInputPrompt("Site name", "Select a name for a new site:", nil,nil, dfhack.curry(add_site,1,unit.civ_id,0))
call_native.value=false
end
eventful.registerReaction("LUA_HOOK_MAKE_SITE1x2",reaction)
Oh wait, I see, the init.lua goes in df/raw!