- Reestructuració completa

This commit is contained in:
2026-03-12 21:04:15 +01:00
parent 6c5d7a305a
commit 88de5f262b
27 changed files with 696 additions and 707 deletions

15
data/modules/ia/clau.lua Normal file
View File

@@ -0,0 +1,15 @@
function ia.update_clau(spr)
if spr.state == templates.ALIVE then
local x1,y1,w1,h1 = util.aabb(spr)
local x2,y2,w2,h2 = util.aabb(sprites.hero)
if util.check_aabb_collision(x1,y1,w1,h1, x2,y2,w2,h2) then
if sprites.hero.give_key(spr.color) then
local tx, ty = (spr.pos.x)>>3, (spr.pos.y)>>3
map.surf(rooms.surf_items)
map.tile(tx,ty,0)
sprites.remove(spr)
end
end
end
end