diff options
author | gpcf <gpcf@gpcf.eu> | 2023-05-14 19:46:44 +0200 |
---|---|---|
committer | gpcf <gpcf@gpcf.eu> | 2023-05-14 19:46:44 +0200 |
commit | bfc0425797e83dd27002e28f79f683a5537844fe (patch) | |
tree | 70e497f4c925006edd94e45093064049c59401e2 | |
parent | 636bcacee9cf127f9bd59944b6364a5d2e6d19ab (diff) | |
download | departureboards-bfc0425797e83dd27002e28f79f683a5537844fe.tar.gz departureboards-bfc0425797e83dd27002e28f79f683a5537844fe.tar.bz2 departureboards-bfc0425797e83dd27002e28f79f683a5537844fe.zip |
Add ABM to refresh departureboard, for integration with LuaATC
-rw-r--r-- | init.lua | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -19,7 +19,7 @@ local function render_depboard(pos, objref) c = tb end for k,v in pairs(c) do - if not tb[k] or tb[k] ~= v then + if not tb[k] or tb[k] ~= tostring(v) then changed = true end tb[k] = tostring(v) @@ -112,3 +112,11 @@ minetest.register_node("departureboards:departureboard", { }, }, }) + + +minetest.register_abm({ + nodenames = {"departureboards:departureboard"}, + interval = 5, + chance = 1, + action = display_api.update_entities, +}) |