Rename can_talk_to to can_trigger

This commit is contained in:
Robert Miles 2018-08-28 23:11:57 -04:00
parent 053de00c3c
commit 531cc5de4f
2 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@ A puzzle game, for the PICO-8.
`change_map(n)` - purely descriptive function, sets `mapn` to `n`
`can_talk_to(tx,ty,tf)` - checks if there is a trigger in front of the player, assuming `x=tx,y=ty,f=tf`.
`can_trigger(tx,ty,tf)` - checks if there is a trigger in front of the player, assuming `x=tx,y=ty,f=tf`.
`activate(tx,ty,tf)` - activates the trigger in front of the player, assuming `x=tx,y=ty,f=tf`.

View File

@ -36,7 +36,7 @@ function change_map(n)
if mapdata[n].onload then mapdata[n].onload(mapdata[n]) end
end
function can_talk_to(tx,ty,tf)
function can_trigger(tx,ty,tf)
tx = tx+(tf==2 and 8 or (tf==3 and -8 or 0))
ty = ty+(tf==1 and 8 or (tf==0 and -8 or 0))
t = mapdata[mapn].triggers
@ -133,7 +133,7 @@ function _update()
textbox.open = false
textbox.cb()
else
if can_talk_to(x,y,f) then
if can_trigger(x,y,f) then
activate(x,y,f)
end
end