Lua: location-specific timers
Expose map-location specific timers to lua scripts. For example: nh.start_timer_at(x,y, "melt-ice", 10); Currently only available timer type is "melt-ice".
This commit is contained in:
36
doc/lua.adoc
36
doc/lua.adoc
@@ -158,6 +158,15 @@ Example:
|
||||
local t = nh.gettrap(x, y);
|
||||
|
||||
|
||||
=== has_timer_at
|
||||
|
||||
Does location at x,y have a timer?
|
||||
|
||||
Example:
|
||||
|
||||
local has_melttimer = nh.has_timer_at(x,y, "melt-ice");
|
||||
|
||||
|
||||
=== deltrap
|
||||
|
||||
Delete a trap at x,y
|
||||
@@ -245,6 +254,15 @@ Example:
|
||||
nh.pline("Line: " .. errors[1].line .. ", " .. errors[1].error);
|
||||
|
||||
|
||||
=== peek_timer_at
|
||||
|
||||
When does timer at location at x,y trigger?
|
||||
|
||||
Example:
|
||||
|
||||
local melttime = nh.peek_timer_at(x,y, "melt-ice");
|
||||
|
||||
|
||||
=== pline
|
||||
|
||||
Show the text in the message area.
|
||||
@@ -308,6 +326,24 @@ Example:
|
||||
end
|
||||
|
||||
|
||||
=== start_timer_at
|
||||
|
||||
Start a timer at location x,y, with trigger time of `when` - relative to current turn.
|
||||
|
||||
Example:
|
||||
|
||||
nh.start_timer_at(x,y, "melt-ice", when);
|
||||
|
||||
|
||||
=== stop_timer_at
|
||||
|
||||
Stop a timer at location x,y.
|
||||
|
||||
Example:
|
||||
|
||||
nh.stop_timer_at(x,y, "melt-ice");
|
||||
|
||||
|
||||
=== verbalize
|
||||
|
||||
Show the text in the message area as if someone said it, obeying eg. hero's deafness.
|
||||
|
||||
Reference in New Issue
Block a user