make aviator tnt resistant

This commit is contained in:
berengma 2019-03-10 18:46:46 +01:00
parent 74e7e292b3
commit 49e1469bf4
2 changed files with 16 additions and 2 deletions

View File

@ -1,8 +1,9 @@
-- aviator, place block and fly
-- aviator, place block and fly, now also TNT resistant
aviation = {}
aviator_hud_id = {}
local getsetting = (minetest.settings:get("active_block_range") or 1) * 32
local getsetting = tonumber((minetest.settings:get("active_block_range")) or 1) * 32
local flength = 1800 -- how many seconds you can fly
local checktime = 1 -- check interval
local maxdistance = 50 -- maxradius
@ -10,6 +11,10 @@ local timer = 0
local trans = true -- no permanent forceload block if server shuts down
local force = false
if minetest.get_modpath("mesecons_mvps") then -- pull and push resistant
mesecon.register_mvps_stopper("aviator:aviator")
end
if maxdistance > getsetting then force = true end
@ -88,6 +93,8 @@ minetest.register_node("aviator:aviator", {
groups = {oddly_breakable_by_hand=3},
light_source = 12,
on_blast = function() end, -- TNT resistant
on_place = function(itemstack, placer, pointed_thing)
local name = placer:get_player_name()
local meta = minetest.deserialize(itemstack:get_metadata()) or {}

View File

@ -1 +1,8 @@
name = aviator
title = Aviator
author = Gundul
description = Adds a craftable node to minetest. You get fly priv 50 nodes around that node
optional_depends = technic,moreores,basic_machines
license = WTFPL
forum = https://forum.minetest.net/viewtopic.php?f=11&t=16661
version = 1.3