File: main.lua

package info (click to toggle)
cataclysm-dda 0.C%2Bgit20190228.faafa3a-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 181,636 kB
  • sloc: cpp: 256,609; python: 2,621; makefile: 862; sh: 495; perl: 37; xml: 33
file content (16 lines) | stat: -rw-r--r-- 373 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
local MOD = {}
mods["lua_test_activity"] = MOD

function message(...)
    local s = string.format(...)
    game.add_msg(s)
end

function MOD.on_minute_passed()
    local act = player.activity
    if not act:is_null() then
        -- Show your current activity
        message("activity_id: %s", act:id():str())
        message("moves_left: %d", act.moves_left)
    end
end