aboutsummaryrefslogtreecommitdiff
path: root/advtrains_train_subway/init.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2020-02-15 22:19:22 +0100
committerorwell96 <orwell@bleipb.de>2020-02-15 22:19:22 +0100
commit9d7b21c451ac5ae9475236814f33e5627061ece1 (patch)
tree93b9d28e8ce2edf748d08f7571a38ed0aa79fe10 /advtrains_train_subway/init.lua
parent1bb1d825f46af3562554c12fba35a31b9f7973ff (diff)
downloadadvtrains-9d7b21c451ac5ae9475236814f33e5627061ece1.tar.gz
advtrains-9d7b21c451ac5ae9475236814f33e5627061ece1.tar.bz2
advtrains-9d7b21c451ac5ae9475236814f33e5627061ece1.zip
Relicense under AGPLv3 and update information in readme.txt
Diffstat (limited to 'advtrains_train_subway/init.lua')
0 files changed, 0 insertions, 0 deletions
tc.pcnaming.save() return atlatc.pcnaming.name_map end function atlatc.pcnaming.resolve_pos(pos, func_name) if type(pos)=="string" then local e = atlatc.pcnaming.name_map[pos] if e then return e end elseif type(pos)=="table" and pos.x and pos.y and pos.z then return pos end error("Invalid position supplied to " .. (func_name or "???")..": " .. dump(pos)) end minetest.register_craftitem("advtrains_luaautomation:pcnaming",{ description = attrans("Passive Component Naming Tool\n\nRight-click to name a passive component."), groups = {cracky=1}, -- key=name, value=rating; rating=1..3. inventory_image = "atlatc_pcnaming.png", wield_image = "atlatc_pcnaming.png", stack_max = 1, on_place = function(itemstack, placer, pointed_thing) local pname = placer:get_player_name() if not pname then return end if not minetest.check_player_privs(pname, {atlatc=true}) then minetest.chat_send_player(pname, "Missing privilege: atlatc") return end if pointed_thing.type=="node" then local pos=pointed_thing.under if advtrains.is_protected(pos, pname) then minetest.record_protection_violation(pos, pname) return end local node = advtrains.ndb.get_node(pos)