File: preload.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 (14 lines) | stat: -rw-r--r-- 392 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
local MOD = {}

mods["LUAPlayerTakeoff"] = MOD

function playertakeoff()
        if (player:i_at(-2):display_name() ~= "none") then
                game.add_msg("Taking off: "..player:i_at(-2):display_name())
                player:takeoff(player:i_at(-2))
        else
                game.add_msg("Nothing in that slot!")
        end
end

game.register_iuse("PLAYERTAKEOFF", playertakeoff)