diff options
author | Jude Brown <bookofjude@users.sourceforge.net> | 2009-12-04 22:20:48 +1000 |
---|---|---|
committer | Jude Brown <bookofjude@users.sourceforge.net> | 2009-12-04 22:20:48 +1000 |
commit | d680acf00f9b3586b4db7b648f2fb35116752e03 (patch) | |
tree | 2fca7e989f4f85cb3c4304472a679f7ef95f81b7 | |
parent | f26b0447e7dea6029ba9d125ce1d3d536f95e67a (diff) | |
download | crawl-ref-d680acf00f9b3586b4db7b648f2fb35116752e03.tar.gz crawl-ref-d680acf00f9b3586b4db7b648f2fb35116752e03.zip |
Let message_at_spot accept props; function_at_spot.
-rw-r--r-- | crawl-ref/source/dat/clua/lm_trig.lua | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/crawl-ref/source/dat/clua/lm_trig.lua b/crawl-ref/source/dat/clua/lm_trig.lua index 994976f656..2088c6b967 100644 --- a/crawl-ref/source/dat/clua/lm_trig.lua +++ b/crawl-ref/source/dat/clua/lm_trig.lua @@ -459,6 +459,15 @@ function TriggerableFunction:read(marker, th) return self end +function function_at_spot(func, data, repeated, props) + local tf = TriggerableFunction:new + { func = func, data = data, repeated = repeated, props = props } + + tf:add_triggerer( DgnTriggerer:new { type = "player_move" } ) + + return tf +end + -------------------------- -- A simple class to give out messages. Should be split out into own @@ -484,6 +493,7 @@ function TriggerableMessage:new(pars) tm.msg = pars.msg tm.channel = pars.channel tm.repeated = pars.repeated + tm.props = pars.props return tm end @@ -516,9 +526,9 @@ function TriggerableMessage:read(marker, th) return self end -function message_at_spot(msg, channel, repeated) +function message_at_spot(msg, channel, repeated, props) local tm = TriggerableMessage:new - { msg = msg, channel = channel, repeated = repeated } + { msg = msg, channel = channel, repeated = repeated, props = props } tm:add_triggerer( DgnTriggerer:new { type = "player_move" } ) |