make aviator tnt resistant
This commit is contained in:
parent
74e7e292b3
commit
49e1469bf4
11
init.lua
11
init.lua
@ -1,8 +1,9 @@
|
|||||||
-- aviator, place block and fly
|
-- aviator, place block and fly, now also TNT resistant
|
||||||
|
|
||||||
aviation = {}
|
aviation = {}
|
||||||
aviator_hud_id = {}
|
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 flength = 1800 -- how many seconds you can fly
|
||||||
local checktime = 1 -- check interval
|
local checktime = 1 -- check interval
|
||||||
local maxdistance = 50 -- maxradius
|
local maxdistance = 50 -- maxradius
|
||||||
@ -10,6 +11,10 @@ local timer = 0
|
|||||||
local trans = true -- no permanent forceload block if server shuts down
|
local trans = true -- no permanent forceload block if server shuts down
|
||||||
local force = false
|
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
|
if maxdistance > getsetting then force = true end
|
||||||
|
|
||||||
|
|
||||||
@ -88,6 +93,8 @@ minetest.register_node("aviator:aviator", {
|
|||||||
groups = {oddly_breakable_by_hand=3},
|
groups = {oddly_breakable_by_hand=3},
|
||||||
light_source = 12,
|
light_source = 12,
|
||||||
|
|
||||||
|
on_blast = function() end, -- TNT resistant
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
local name = placer:get_player_name()
|
local name = placer:get_player_name()
|
||||||
local meta = minetest.deserialize(itemstack:get_metadata()) or {}
|
local meta = minetest.deserialize(itemstack:get_metadata()) or {}
|
||||||
|
7
mod.conf
7
mod.conf
@ -1 +1,8 @@
|
|||||||
name = aviator
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user