Skip to content

Commit 24994be

Browse files
committed
make alarm setting and clearing functions public
1 parent 9fd678d commit 24994be

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

gui/civ-alert.lua

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,22 @@ local function get_civ_alert()
1818
return list[1]
1919
end
2020

21-
local function can_sound_alarm()
21+
-- public API section
22+
function can_sound_alarm()
2223
return df.global.plotinfo.alerts.civ_alert_idx == 0 and
2324
#get_civ_alert().burrows > 0
2425
end
2526

26-
local function sound_alarm()
27+
function sound_alarm()
2728
if not can_sound_alarm() then return end
2829
df.global.plotinfo.alerts.civ_alert_idx = 1
2930
end
3031

31-
local function can_clear_alarm()
32+
function can_clear_alarm()
3233
return df.global.plotinfo.alerts.civ_alert_idx ~= 0
3334
end
3435

35-
local function clear_alarm()
36+
function clear_alarm()
3637
df.global.plotinfo.alerts.civ_alert_idx = 0
3738
end
3839

0 commit comments

Comments
 (0)