[ENH] Mapa modificat
[NEW] Capacitat per a habilitar/deshabilitar el hint al obrir una porta
This commit is contained in:
@@ -127,6 +127,7 @@ function stages.stage1_init()
|
||||
--
|
||||
table.insert( actors, trigger.new(55,1,3,triggers.escena_lluita_imp,"lluita imp"))
|
||||
|
||||
-- La definició de les portes en en inici 1, la del trigger en inici 0
|
||||
table.insert( actors, trigger.new(10,8,1,triggers.open_door,"","primera porta","switch",{11, 57,45}) )
|
||||
table.insert( actors, trigger.new(34,1,1,triggers.open_door,"","dos portes casa abad","switch",{32, 50,38,26,53,41,29},{"TR03","TR04"}) )
|
||||
table.insert( actors, trigger.new(52,1,1,triggers.open_door,"","porta casa abad","switch",{72, 42,30},{"TR05"}) )
|
||||
@@ -135,6 +136,9 @@ function stages.stage1_init()
|
||||
table.insert( actors, trigger.new(75,9,1,triggers.open_door,"","acces inf casa batman","switch",{57, 53,41},{"TR07"}) )
|
||||
table.insert( actors, trigger.new(79,5,1,triggers.open_door,"","sotan casa batman","switch",{36, 56,44}) )
|
||||
table.insert( actors, trigger.new(38,2,2,triggers.open_door,"","","switch",{39, 62,63}) )
|
||||
table.insert( actors, trigger.new(35,1,3,triggers.open_door,"","batman a casa abad (1/2)","invisible",{36, 12,24 }) )
|
||||
table.insert( actors, trigger.new(35,1,3,triggers.open_door,"","batman a casa abad (2/2)","invisible",{35, 23,35 }) )
|
||||
|
||||
-- table.insert( actors, trigger.new(1, 1,1,triggers.open_door,"","acces cacaus","switch",{20, 53,41},{"TR08"}))
|
||||
|
||||
-- table.insert(actors,trigger.new(14,40,32,triggers.teleport_a))
|
||||
@@ -174,6 +178,10 @@ function stages.stage1_init()
|
||||
|
||||
tiles_layer2.new(13,11,3,144,144,16,16)
|
||||
tiles_layer2.new(13,11,4,144,144,16,16)
|
||||
tiles_layer2.new(34,11,1,128,144,16,16)
|
||||
tiles_layer2.new(34,11,2,128,144,16,16)
|
||||
tiles_layer2.new(35, 0,1,128,144,16,16)
|
||||
tiles_layer2.new(35, 0,2,128,144,16,16)
|
||||
tiles_layer2.new(69,4,2,160,144,16,16)
|
||||
tiles_layer2.new(69,5,2,176,144,16,16)
|
||||
tiles_layer2.new(69,4,3,160,144,16,16)
|
||||
|
||||
+4
-2
@@ -1,11 +1,12 @@
|
||||
trigger={}
|
||||
|
||||
function trigger.new(_hab,_x,_y,_action,_escena,_id,_type,_doors,_linked_id)
|
||||
function trigger.new(_hab,_x,_y,_action,_escena,_id,_type,_doors,_linked_id,_remote_view)
|
||||
local world_x, world_y = coords.room_to_world(_hab,_x,_y)
|
||||
_bb={x=0,y=0,w=16,h=16} --default
|
||||
-- if _type=="switch" then _bb={x=0,y=0,w=16,h=17} end
|
||||
-- if _id then print("NEW => ".._id) end
|
||||
_type = _type or "invisible"
|
||||
if _remote_view==nil then _remote_view=true end
|
||||
return {
|
||||
name="trigger",
|
||||
type=_type,
|
||||
@@ -18,6 +19,7 @@ function trigger.new(_hab,_x,_y,_action,_escena,_id,_type,_doors,_linked_id)
|
||||
h=16,
|
||||
fun=_action,
|
||||
doors=_doors,
|
||||
remote_view=_remote_view,
|
||||
update=trigger.update,
|
||||
draw=trigger.draw,
|
||||
linked_id=_linked_id,
|
||||
@@ -76,7 +78,7 @@ triggers={}
|
||||
|
||||
function triggers:open_door()
|
||||
local hab= self.doors[1]-1
|
||||
if hab~=abad.hab then
|
||||
if hab~=abad.hab and self.remote_view then
|
||||
remote_view(hab)
|
||||
end
|
||||
for i=2,#self.doors do
|
||||
|
||||
Reference in New Issue
Block a user