Skip to content

Commit

Permalink
random
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildTools committed May 2, 2023
1 parent 81e858c commit ecd7413
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions eggtoast_factorit/machine/crafttable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,40 +134,40 @@ crafttable={
end,
draw = function (i)
if inv.open == 1 then
love.graphics.setColor(1,1,1)
love.graphics.print(lang.gettxt("item.crafttable.name"),55,245,0,0.5,0.5)
insqp=craftbenchsquarepos
mx,my = mouse.getPos()
for i = 1, #craftbenchsquarepos do
if ((mx - insqp[i].x) > 0) and ((mx - insqp[i].x) <= 25) and ((my - insqp[i].y) > 0) and ((my - insqp[i].y) <= 25) then
craftbenchsquareposhover[i].hover=0
else
craftbenchsquareposhover[i].hover=1
end
gr.draw.square(craftbenchsquarepos[i].x,craftbenchsquarepos[i].y,30,30,"fill",craftbenchsquareposhover[i].hover,craftbenchsquareposhover[i].hover,craftbenchsquareposhover[i].hover)
ai=i
for i = 1,#craftbenchx do
gr.draw.square(craftbenchx[i],craftbenchsquarepos[ai].y,30,30,"fill",1,1,1)
love.graphics.setColor(1,1,1)
love.graphics.print(lang.gettxt("item.crafttable.name"),55,245,0,0.5,0.5)
insqp=craftbenchsquarepos
mx,my = mouse.getPos()
for i = 1, #craftbenchsquarepos do
if ((mx - insqp[i].x) > 0) and ((mx - insqp[i].x) <= 25) and ((my - insqp[i].y) > 0) and ((my - insqp[i].y) <= 25) then
craftbenchsquareposhover[i].hover=0
else
craftbenchsquareposhover[i].hover=1
end
gr.draw.square(craftbenchsquarepos[i].x,craftbenchsquarepos[i].y,30,30,"fill",craftbenchsquareposhover[i].hover,craftbenchsquareposhover[i].hover,craftbenchsquareposhover[i].hover)
ai=i
for i = 1,#craftbenchx do
gr.draw.square(craftbenchx[i],craftbenchsquarepos[ai].y,30,30,"fill",1,1,1)
end
end
crtdrawrec()
love.graphics.setColor(1,1,1)
end
crtdrawrec()
love.graphics.setColor(1,1,1)
end
end,
toggleopen = function(i)
if obj.list[i].nbt.craftopen==true then
obj.list[i].nbt.craftopen=false
plr.craftopen=false
crafteruse=false
plr.craftopeni=nil
print("craftoff")
print("craftoff "..i)
else
if plr.craftopen==false then
obj.list[i].nbt.craftopen=true
plr.craftopen=true
crafteruse=false
plr.craftopeni=i
print("crafton")
print("crafton "..i)
end
end
end
Expand Down

0 comments on commit ecd7413

Please sign in to comment.