Skip to content

Commit 7bba53b

Browse files
committed
firestarter: use cursor anywhere, set all temperature fields, only modify new fires
1 parent 4c69f49 commit 7bba53b

1 file changed

Lines changed: 11 additions & 14 deletions

File tree

firestarter.lua

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,15 @@ elseif dfhack.gui.getSelectedUnit(true) then
1515
for k,v in ipairs(tinder) do
1616
tinder[k].item.flags.on_fire=true
1717
end
18-
elseif df.global.ui_advmode.menu==1 then
19-
local curpos=df.global.cursor
20-
df.global.world.fires:insert('#',{new=df.fire})
21-
local hot = df.global.world.fires
22-
for _,k in ipairs(hot) do
23-
if k.temperature==0 then
24-
local spot = k
25-
k.pos.x=curpos.x
26-
k.pos.y=curpos.y
27-
k.pos.z=curpos.z
28-
k.timer=1000
29-
k.temperature=60000
30-
end
31-
end
18+
elseif df.global.cursor.x ~= -30000 then
19+
local curpos = xyz2pos(pos2xyz(df.global.cursor))
20+
df.global.world.fires:insert('#', {
21+
new=df.fire,
22+
timer=1000,
23+
pos=curpos,
24+
temperature=60000,
25+
temp_unk1=60000,
26+
temp_unk2=60000,
27+
temp_unk3=60000,
28+
})
3229
end

0 commit comments

Comments
 (0)