Skip to content

Commit

Permalink
new inv handler(tweaked)
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildTools committed Oct 14, 2022
1 parent 27ddff2 commit 1029dc4
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions eggtoast_factorit/sys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,7 @@ function love.keypressed(key)
if key=="escape" or key=="e" then
love.event.quit()
else
if key=="f11" then
love.graphics.captureScreenshot("factorit-"..tostring(os.time))
end
if key=="p" then
--[[if key=="p" then
if ftd then else
readres = conf.fullscreen
if readres=="true" then
Expand All @@ -135,7 +132,7 @@ function love.keypressed(key)
love.filesystem.write("cfg.json",json.encode(conf))
ftd =true
end
end
end]]--
end
else
gamekey(key)
Expand Down Expand Up @@ -173,6 +170,17 @@ function gamekey(key)
title=true
else
plr.craftopen=false
crafteruse=false
plr.craftopeni=nil
print("craftoff")
plr.craftopen=false
for i = 1,#obj.list do
if table.haskey(obj.list[i].nbt,"craftopen") then
if obj.list[i].nbt.craftopen==true then
obj.list[i].nbt.craftopen=false
end
end
end
inv.open = 0
end
end
Expand All @@ -189,8 +197,10 @@ function gamedraw()
else
love.graphics.setBackgroundColor(255,255,255)
if plr.rot=="left"then
---@diagnostic disable-next-line: param-type-mismatch
love.graphics.draw(gr.texture.gettex("character1"),plr.x,plr.y,0,0.1,0.1)
else
---@diagnostic disable-next-line: param-type-mismatch
love.graphics.draw(gr.texture.gettex("character1reverse"),plr.x,plr.y,0,0.1,0.1)
end
if plr.handrot==1 then
Expand Down Expand Up @@ -232,9 +242,9 @@ cam:attach()
if loading==1 then
else
love.graphics.setBackgroundColor(255,255,255)
if plr.rot=="left"then
if plr.rot=="left"then ---@diagnostic disable-next-line: param-type-mismatch
love.graphics.draw(gr.texture.gettex("character1"),plr.x,plr.y,0,0.1,0.1)
else
else ---@diagnostic disable-next-line: param-type-mismatch
love.graphics.draw(gr.texture.gettex("character1reverse"),plr.x,plr.y,0,0.1,0.1)
end
if plr.handrot==1 then
Expand Down

0 comments on commit 1029dc4

Please sign in to comment.