2016-10-05 19:44:40 -07:00
|
|
|
local get_node_or_nil = minetest.get_node_or_nil
|
|
|
|
local get_item_group = minetest.get_item_group
|
|
|
|
local light_max = 12
|
|
|
|
local max_depth = 31000
|
|
|
|
|
|
|
|
|
2016-03-31 16:11:15 -07:00
|
|
|
minetest.register_node("loud_walking:scrith", {
|
|
|
|
description = "Scrith",
|
|
|
|
paramtype = "light",
|
|
|
|
tiles = {"default_obsidian.png"},
|
|
|
|
use_texture_alpha = true,
|
|
|
|
is_ground_content = false,
|
|
|
|
groups = {},
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
2016-04-01 15:16:27 -07:00
|
|
|
|
2016-04-08 13:01:33 -07:00
|
|
|
minetest.register_node("loud_walking:sky_scrith", {
|
|
|
|
description = "Transparent Scrith",
|
|
|
|
drawtype = "glasslike",
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
tiles = {"loud_walking_sky_glass.png"},
|
|
|
|
light_source = 1,
|
|
|
|
use_texture_alpha = true,
|
|
|
|
is_ground_content = false,
|
|
|
|
groups = {},
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
local node = loud_walking.clone_node("loud_walking:sky_scrith")
|
|
|
|
node.tiles = {"loud_walking_cloud_glass.png"}
|
|
|
|
minetest.register_node("loud_walking:cloud_scrith", node)
|
2016-09-18 16:38:12 -07:00
|
|
|
node = loud_walking.clone_node("loud_walking:sky_scrith")
|
2016-04-08 13:01:33 -07:00
|
|
|
node.tiles = {"loud_walking_glass_detail.png"}
|
2016-04-01 15:16:27 -07:00
|
|
|
minetest.register_node("loud_walking:transparent_scrith", node)
|
|
|
|
|
2016-09-29 20:40:48 -07:00
|
|
|
node = loud_walking.clone_node("air")
|
2016-10-05 19:14:31 -07:00
|
|
|
node.light_source = minetest.LIGHT_MAX
|
2016-09-29 20:40:48 -07:00
|
|
|
minetest.register_node("loud_walking:light_air", node)
|
|
|
|
|
2016-04-09 16:42:00 -07:00
|
|
|
minetest.register_node("loud_walking:control_floor", {
|
2016-04-09 03:25:47 -07:00
|
|
|
description = "Floor",
|
|
|
|
paramtype = "light",
|
2016-04-09 16:42:00 -07:00
|
|
|
tiles = {"loud_walking_control_floor.png"},
|
2016-10-05 19:14:31 -07:00
|
|
|
light_source = minetest.LIGHT_MAX,
|
2016-04-09 16:42:00 -07:00
|
|
|
use_texture_alpha = true,
|
|
|
|
is_ground_content = false,
|
|
|
|
groups = {},
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
2016-09-18 16:38:12 -07:00
|
|
|
node = loud_walking.clone_node("loud_walking:control_floor")
|
2016-04-09 16:42:00 -07:00
|
|
|
node.tiles = { "loud_walking_control_floor.png", "loud_walking_control_floor_alert.png", "loud_walking_control_floor.png"}
|
|
|
|
minetest.register_node("loud_walking:control_floor_alert_down", node)
|
2016-09-18 16:38:12 -07:00
|
|
|
node = loud_walking.clone_node("loud_walking:control_floor")
|
2016-04-09 16:42:00 -07:00
|
|
|
node.tiles = {"loud_walking_control_floor_alert.png", "loud_walking_control_floor.png", "loud_walking_control_floor.png"}
|
|
|
|
minetest.register_node("loud_walking:control_floor_alert_up", node)
|
|
|
|
node.tiles = {"loud_walking_control_floor_alert.png", "loud_walking_control_floor_alert.png", "loud_walking_control_floor.png"}
|
|
|
|
minetest.register_node("loud_walking:control_floor_alert_both", node)
|
|
|
|
node.tiles = {"loud_walking_strange_growth.png", "loud_walking_control_floor.png", "loud_walking_control_floor.png"}
|
|
|
|
minetest.register_node("loud_walking:control_floor_growth", node)
|
|
|
|
|
|
|
|
minetest.register_node("loud_walking:control_wall", {
|
|
|
|
description = "Wall",
|
|
|
|
paramtype = "light",
|
|
|
|
tiles = {"loud_walking_control_wall.png"},
|
2016-04-09 03:25:47 -07:00
|
|
|
use_texture_alpha = true,
|
2016-10-05 19:14:31 -07:00
|
|
|
light_source = minetest.LIGHT_MAX,
|
2016-04-09 03:25:47 -07:00
|
|
|
is_ground_content = false,
|
|
|
|
groups = {},
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
})
|
|
|
|
|
2016-10-03 19:21:05 -07:00
|
|
|
loud_walking.control_fun = function(pos, node, puncher, pointed_thing)
|
|
|
|
if not puncher:is_player() then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
local sr = math.random(20)
|
|
|
|
if sr < 3 then
|
|
|
|
puncher:set_hp(puncher:get_hp() - sr)
|
|
|
|
elseif sr < 6 then
|
|
|
|
minetest.chat_send_player(puncher:get_player_name(), "Prepare for transport...")
|
|
|
|
local pos = {x=50000, y=50000, z=50000}
|
|
|
|
while pos.x > 31000 or pos.x < -31000 do
|
|
|
|
pos.x = math.random(-100, 100) * loud_walking.fcsize.x + math.floor(loud_walking.pod_size.x / 2)
|
|
|
|
end
|
|
|
|
while pos.y > 31000 or pos.y < -31000 do
|
2017-06-25 08:31:21 -07:00
|
|
|
pos.y = loud_walking.baseline + math.floor(loud_walking.pod_size.y / 2) - 3
|
2016-10-03 19:21:05 -07:00
|
|
|
end
|
|
|
|
while pos.z > 31000 or pos.z < -31000 do
|
|
|
|
pos.z = math.random(-100, 100) * loud_walking.fcsize.z + math.floor(loud_walking.pod_size.z / 2)
|
|
|
|
end
|
|
|
|
puncher:setpos(pos)
|
|
|
|
elseif sr == 6 then
|
|
|
|
minetest.chat_send_player(puncher:get_player_name(), "Infectious organism detected. Sterilizing area...")
|
|
|
|
for z1 = -4, 4 do
|
|
|
|
for y1 = -4, 4 do
|
|
|
|
for x1 = -4, 4 do
|
|
|
|
local p = {x = pos.x + x1, y = pos.y + y1, z = pos.z + z1}
|
|
|
|
local node = minetest.get_node(p)
|
|
|
|
if node and node.name == "air" then
|
|
|
|
minetest.set_node(p, {name="fire:basic_flame"})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
elseif sr == 7 then
|
|
|
|
minetest.chat_send_player(puncher:get_player_name(), "Repairing injured animal...")
|
|
|
|
puncher:set_hp(20)
|
|
|
|
elseif sr == 8 then
|
|
|
|
minetest.chat_send_player(puncher:get_player_name(), "Reseting chronometers...")
|
|
|
|
minetest.set_timeofday(math.random(100)/100)
|
|
|
|
elseif sr == 9 then
|
|
|
|
minetest.chat_send_player(puncher:get_player_name(), "Escaped animal detected. Ejecting...")
|
|
|
|
local pos = puncher:getpos()
|
|
|
|
for z1 = -1, 1 do
|
|
|
|
for x1 = -1, 1 do
|
|
|
|
minetest.set_node({x = pos.x + x1, y = pos.y - 1, z = pos.z + z1}, {name="air"})
|
|
|
|
end
|
|
|
|
end
|
|
|
|
elseif sr == 10 then
|
|
|
|
minetest.set_node(pos, {name="air"})
|
|
|
|
else
|
|
|
|
minetest.chat_send_player(puncher:get_player_name(), "Please do not press this button again.")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2016-04-01 15:16:27 -07:00
|
|
|
minetest.register_node("loud_walking:controls", {
|
|
|
|
description = "Alien control system",
|
|
|
|
paramtype = "light",
|
|
|
|
tiles = {"loud_walking_controls.png"},
|
|
|
|
use_texture_alpha = true,
|
|
|
|
is_ground_content = false,
|
|
|
|
groups = {},
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
2016-10-03 19:21:05 -07:00
|
|
|
on_punch = loud_walking.control_fun,
|
2016-04-01 15:16:27 -07:00
|
|
|
})
|
2016-04-03 00:08:13 -07:00
|
|
|
|
2016-04-08 21:35:14 -07:00
|
|
|
minetest.register_node("loud_walking:air_ladder", {
|
|
|
|
description = "Air Ladder",
|
|
|
|
drawtype = "glasslike",
|
|
|
|
tiles = {"loud_walking_air_ladder.png"},
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
walkable = false,
|
|
|
|
use_texture_alpha = true,
|
|
|
|
climbable = true,
|
|
|
|
is_ground_content = false,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {0, 0, 0, 0, 0, 0},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
2016-04-09 16:42:00 -07:00
|
|
|
minetest.register_node("loud_walking:control_plant_1", {
|
|
|
|
description = "Strange Plant",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
waving = 1,
|
|
|
|
tiles = {"loud_walking_strange_plant_1.png"},
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
groups = {},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {0, 0, 0, 0, 0, 0},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("loud_walking:control_plant_2", {
|
|
|
|
description = "Strange Plant",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
waving = 1,
|
|
|
|
tiles = {"loud_walking_strange_plant_2.png"},
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
groups = {},
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {0, 0, 0, 0, 0, 0},
|
|
|
|
},
|
|
|
|
})
|
2017-06-25 08:31:21 -07:00
|
|
|
|
|
|
|
|
|
|
|
do
|
|
|
|
local n = loud_walking.clone_node('air')
|
|
|
|
n.drowning = 1
|
|
|
|
minetest.register_node('loud_walking:vacuum', n)
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
-- Polluted dirt
|
|
|
|
newnode = loud_walking.clone_node("default:dirt")
|
|
|
|
newnode.description = "Polluted Dirt"
|
|
|
|
newnode.tiles = {"default_dirt.png^[colorize:#100020:100"}
|
|
|
|
newnode.groups.soil = 0
|
|
|
|
minetest.register_node("loud_walking:polluted_dirt", newnode)
|
|
|
|
|
|
|
|
-- Bare branches
|
|
|
|
minetest.register_node('loud_walking:sticks_default', {
|
|
|
|
description = 'Sticks',
|
|
|
|
drawtype = 'allfaces_optional',
|
|
|
|
waving = 1,
|
|
|
|
visual_scale = 1.3,
|
|
|
|
tiles = {'loud_walking_dry_twigs.png'},
|
|
|
|
paramtype = 'light',
|
|
|
|
is_ground_content = false,
|
|
|
|
drop = 'default:stick 2',
|
|
|
|
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Black leaves
|
|
|
|
newnode = loud_walking.clone_node("default:leaves")
|
|
|
|
newnode.description = "Blackened Leaves"
|
|
|
|
newnode.tiles = {"default_leaves.png^[colorize:#100020:200"}
|
|
|
|
newnode.special_tiles = {"default_leaves_simple.png^[colorize:#100020:200"}
|
|
|
|
newnode.groups = {snappy = 3, flammable = 2}
|
|
|
|
minetest.register_node("loud_walking:leaves_black", newnode)
|
|
|
|
|
|
|
|
|
|
|
|
newnode = loud_walking.clone_node("default:water_source")
|
|
|
|
newnode.description = "Poisonous Water"
|
|
|
|
newnode.groups.poison = 3
|
|
|
|
--newnode.light_source = 6
|
|
|
|
newnode.liquid_alternative_flowing = "loud_walking:water_poison_flowing"
|
|
|
|
newnode.liquid_alternative_source = "loud_walking:water_poison_source"
|
|
|
|
newnode.post_effect_color = {a = 103, r = 108, g = 128, b = 64}
|
|
|
|
newnode.special_tiles[1].name = "loud_walking_water_poison_source_animated.png"
|
|
|
|
newnode.tiles[1].name = "loud_walking_water_poison_source_animated.png"
|
|
|
|
minetest.register_node("loud_walking:water_poison_source", newnode)
|
|
|
|
|
|
|
|
newnode = loud_walking.clone_node("default:water_flowing")
|
|
|
|
newnode.description = "Poisonous Water"
|
|
|
|
newnode.groups.poison = 3
|
|
|
|
--newnode.light_source = 6
|
|
|
|
newnode.liquid_alternative_flowing = "loud_walking:water_poison_flowing"
|
|
|
|
newnode.liquid_alternative_source = "loud_walking:water_poison_source"
|
|
|
|
newnode.post_effect_color = {a = 103, r = 108, g = 128, b = 64}
|
|
|
|
newnode.special_tiles[1].name = "loud_walking_water_poison_flowing_animated.png"
|
|
|
|
newnode.tiles[1] = "loud_walking_water_poison.png"
|
|
|
|
minetest.register_node("loud_walking:water_poison_flowing", newnode)
|
|
|
|
|
|
|
|
|
|
|
|
minetest.register_node("loud_walking:basalt_raw", {
|
|
|
|
description = "Basalt",
|
|
|
|
tiles = {"loud_walking_basalt.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {cracky=1, level=2},
|
|
|
|
drop = {max_items=2, items={ {items={"loud_walking:basalt"},}, {items={"default:gold_lump",}, rarity=30,}, {items={"default:diamond",}, rarity=60,}, {items={"default:mese_crystal",}, rarity=60,},},},
|
|
|
|
sounds = default.node_sound_stone_defaults({
|
|
|
|
footstep = {name="default_stone_footstep", gain=0.25},
|
|
|
|
}),
|
|
|
|
})
|
|
|
|
newnode = loud_walking.clone_node("loud_walking:basalt_raw")
|
|
|
|
newnode.drop = nil
|
|
|
|
minetest.register_node('loud_walking:basalt', newnode)
|
|
|
|
|
|
|
|
|
|
|
|
minetest.register_node("loud_walking:granite_raw", {
|
|
|
|
description = "Granite",
|
|
|
|
tiles = {"loud_walking_granite.png"},
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {cracky=1, level=3},
|
|
|
|
drop = {max_items=2, items={ {items={"loud_walking:granite"},}, {items={"default:gold_lump",}, rarity=15,}, {items={"default:diamond",}, rarity=20,}, {items={"default:mese_crystal",}, rarity=20,},},},
|
|
|
|
sounds = default.node_sound_stone_defaults({
|
|
|
|
footstep = {name="default_stone_footstep", gain=0.25},
|
|
|
|
}),
|
|
|
|
})
|
|
|
|
newnode = loud_walking.clone_node("loud_walking:granite_raw")
|
|
|
|
newnode.drop = nil
|
|
|
|
minetest.register_node('loud_walking:granite', newnode)
|
|
|
|
|
|
|
|
|
|
|
|
newnode = loud_walking.clone_node("default:stone")
|
|
|
|
newnode.tiles = {'loud_walking_cracked_stone.png'}
|
|
|
|
minetest.register_node('loud_walking:cracked_stone', newnode)
|
|
|
|
|
|
|
|
|
|
|
|
minetest.register_ore({
|
|
|
|
ore_type = "scatter",
|
|
|
|
ore = "default:lava_source",
|
|
|
|
wherein = "loud_walking:cracked_stone",
|
|
|
|
clust_scarcity = 10 * 10 * 10,
|
|
|
|
clust_num_ores = 1,
|
|
|
|
clust_size = 1,
|
|
|
|
y_min = 1,
|
|
|
|
y_max = 10,
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
newnode = loud_walking.clone_node("default:dry_shrub")
|
|
|
|
newnode.tiles = {'loud_walking_black_shrub.png'}
|
|
|
|
minetest.register_node('loud_walking:blackened_shrub', newnode)
|
|
|
|
|
|
|
|
|
|
|
|
do
|
|
|
|
local size_name = 1
|
|
|
|
for size = 1, 4 do
|
|
|
|
local name = 'loud_walking:stone_spike_'..size_name
|
|
|
|
minetest.register_node(name, {
|
|
|
|
description = "Stone Spike",
|
|
|
|
tiles = {"loud_walking_spike_1.png"},
|
|
|
|
inventory_image = "loud_walking_spike_1.png",
|
|
|
|
wield_image = "loud_walking_spike_1.png",
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {cracky=3},
|
|
|
|
sounds = default.node_sound_stone_defaults(),
|
|
|
|
--light_source = 3,
|
|
|
|
paramtype = "light",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
walkable = true,
|
|
|
|
buildable_to = true,
|
|
|
|
visual_scale = size,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.3*size, -0.5, -0.3*size, 0.3*size, -5/16, 0.3*size},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
size_name = size_name + 1
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
minetest.register_node('loud_walking:fur_tree', {
|
|
|
|
description = "Fur Fronds",
|
|
|
|
tiles = {"loud_walking_fur_frond.png"},
|
|
|
|
inventory_image = "loud_walking_fur_frond.png",
|
|
|
|
wield_image = "loud_walking_fur_frond.png",
|
|
|
|
is_ground_content = true,
|
|
|
|
groups = {choppy=3},
|
|
|
|
sounds = default.node_sound_wood_defaults(),
|
|
|
|
paramtype = "light",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
--visual_scale = 2,
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.1, -0.5, -0.1, 0.1, 0.5, 0.1},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
newnode = loud_walking.clone_node("default:dirt_with_grass")
|
|
|
|
newnode.groups.spreading_dirt_type = nil
|
|
|
|
newnode.tiles = {"loud_walking_odd_grass_1.png", "default_dirt.png",
|
|
|
|
{name = "default_dirt.png^loud_walking_odd_grass_1.png",
|
|
|
|
tileable_vertical = false}}
|
|
|
|
minetest.register_node('loud_walking:dirt_with_odd_grass', newnode)
|
|
|
|
|
|
|
|
|
|
|
|
minetest.register_node("loud_walking:strange_plant_1", {
|
|
|
|
description = "Strange Plant",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
waving = 1,
|
|
|
|
tiles = {"loud_walking_strange_plant_1.png"},
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
groups = { snappy = 3, flower = 1, flora = 1, attached_node = 1, },
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
minetest.register_node("loud_walking:strange_plant_2", {
|
|
|
|
description = "Strange Plant",
|
|
|
|
drawtype = "plantlike",
|
|
|
|
waving = 1,
|
|
|
|
tiles = {"loud_walking_strange_plant_2.png"},
|
|
|
|
paramtype = "light",
|
|
|
|
sunlight_propagates = true,
|
|
|
|
walkable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
groups = { snappy = 3, flora = 1, attached_node = 1, },
|
|
|
|
sounds = default.node_sound_leaves_defaults(),
|
|
|
|
selection_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
|
|
|
|
},
|
|
|
|
})
|