Mineur_Tycoon/script/test.lua
2025-04-12 13:57:32 +02:00

24 lines
450 B
Lua

mtprint("hello")
machine = add_machine(10, 10)
mtprint(machine.id)
machine.type = 2
mtprint(machine.type)
pos = machine.pos
machine.pos = pos
mtprint(pos.x)
machine.pos.x = 50
machine.storage[0] = 1
function on_tick(game)
-- Ceci va drainer la sortie de la machine 2
-- (Le premier fourneau)
local mach = get_machine_from_id(2)
if mach.storage[4] > 0 then
mach.storage[4] = mach.storage[4]-1
end
end
function on_frame(game)
end