Update fire and cleanup mods
parent
5f3b8c767b
commit
0e7f6299a9
|
@ -1,20 +1,10 @@
|
|||
local world_path = minetest.get_worldpath()
|
||||
local org_file = world_path .. "/beds_spawns"
|
||||
local file = world_path .. "/beds_spawns"
|
||||
local bkwd = false
|
||||
|
||||
-- check for PA's beds mod spawns
|
||||
local cf = io.open(world_path .. "/beds_player_spawns", "r")
|
||||
if cf ~= nil then
|
||||
io.close(cf)
|
||||
file = world_path .. "/beds_player_spawns"
|
||||
bkwd = true
|
||||
end
|
||||
|
||||
function beds.read_spawns()
|
||||
local spawns = beds.spawn
|
||||
local input = io.open(file, "r")
|
||||
if input and not bkwd then
|
||||
if input then
|
||||
repeat
|
||||
local x = input:read("*n")
|
||||
if x == nil then
|
||||
|
@ -26,12 +16,6 @@ function beds.read_spawns()
|
|||
spawns[name:sub(2)] = {x = x, y = y, z = z}
|
||||
until input:read(0) == nil
|
||||
io.close(input)
|
||||
elseif input and bkwd then
|
||||
beds.spawn = minetest.deserialize(input:read("*all"))
|
||||
input:close()
|
||||
beds.save_spawns()
|
||||
os.rename(file, file .. ".backup")
|
||||
file = org_file
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -42,7 +26,7 @@ function beds.save_spawns()
|
|||
return
|
||||
end
|
||||
local data = {}
|
||||
local output = io.open(org_file, "w")
|
||||
local output = io.open(file, "w")
|
||||
for k, v in pairs(beds.spawn) do
|
||||
table.insert(data, string.format("%.1f %.1f %.1f %s\n", v.x, v.y, v.z, k))
|
||||
end
|
||||
|
|
|
@ -34,20 +34,20 @@ Copyright (C) 2012-2016 thetoon
|
|||
Copyright (C) 2012-2016 PavelS(SokolovPavel)
|
||||
|
||||
You are free to:
|
||||
Share — copy and redistribute the material in any medium or format.
|
||||
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
|
||||
Share — copy and redistribute the material in any medium or format.
|
||||
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
|
||||
The licensor cannot revoke these freedoms as long as you follow the license terms.
|
||||
|
||||
Under the following terms:
|
||||
|
||||
Attribution — You must give appropriate credit, provide a link to the license, and
|
||||
Attribution — You must give appropriate credit, provide a link to the license, and
|
||||
indicate if changes were made. You may do so in any reasonable manner, but not in any way
|
||||
that suggests the licensor endorses you or your use.
|
||||
|
||||
ShareAlike — If you remix, transform, or build upon the material, you must distribute
|
||||
ShareAlike — If you remix, transform, or build upon the material, you must distribute
|
||||
your contributions under the same license as the original.
|
||||
|
||||
No additional restrictions — You may not apply legal terms or technological measures that
|
||||
No additional restrictions — You may not apply legal terms or technological measures that
|
||||
legally restrict others from doing anything the license permits.
|
||||
|
||||
Notices:
|
||||
|
|
|
@ -60,7 +60,7 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
|
|||
if pointed_thing.type ~= "node" then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
local node = minetest.get_node_or_nil(pointed_thing.under)
|
||||
local ndef = node and minetest.registered_nodes[node.name]
|
||||
|
||||
|
@ -223,4 +223,3 @@ minetest.register_craft({
|
|||
burntime = 60,
|
||||
replacements = {{"bucket:bucket_lava", "bucket:bucket_empty"}},
|
||||
})
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@ license).
|
|||
|
||||
Authors
|
||||
---------
|
||||
|
||||
klankbeeld (CC-BY 3.0)
|
||||
http://freesound.org/people/klankbeeld/sounds/174042/
|
||||
cart_rail.*.ogg
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
This mod offers improved minecarts and a few more rail types.
|
|
@ -25,4 +25,4 @@ minetest.register_alias("railtrack:switchrail", "carts:startstoprail")
|
|||
minetest.register_alias("boost_cart:detectorrail", "carts:detectorrail")
|
||||
minetest.register_alias("boost_cart:startstoprail", "carts:startstoprail")
|
||||
minetest.register_alias("railtrack:fixer", "default:stick")
|
||||
minetest.register_alias("railtrack:inspector", "default:stick")
|
||||
minetest.register_alias("railtrack:inspector", "default:stick")
|
||||
|
|
|
@ -38,12 +38,6 @@ if other license is mentioned.
|
|||
|
||||
Authors
|
||||
---------
|
||||
Originally from PixelBOX (Gambit):
|
||||
carts_cart_side.png
|
||||
carts_cart_top.png
|
||||
carts_cart_front.png*
|
||||
carts_cart.png*
|
||||
|
||||
sofar + stujones11:
|
||||
carts_cart.b3d and carts_cart.blend
|
||||
|
||||
|
|
|
@ -3,4 +3,4 @@ boost_cart.speed_max (Maximal speed) int 10 1 100
|
|||
|
||||
# Maximal speed to which the driving player can accelerate the cart by punching
|
||||
# from inside the cart. -1 will disable this feature. (min=-1, max=100)
|
||||
boost_cart.punch_speed_max (Maximal punch speed) int 7 -1 100
|
||||
boost_cart.punch_speed_max (Maximal punch speed) int 7 -1 100
|
||||
|
|
|
@ -13,7 +13,7 @@ for i = 1, #dyes do
|
|||
paramtype2 = "glasslikeliquidlevel",
|
||||
paramtype = "light",
|
||||
tiles = {"glass_" .. name .. ".png"},
|
||||
paramtype = "light",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
use_texture_alpha = true,
|
||||
|
@ -28,7 +28,7 @@ for i = 1, #dyes do
|
|||
{"default:glass", "group:dye,color_" .. name}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:glass_" .. name,
|
||||
recipe = {
|
||||
|
|
|
@ -213,10 +213,10 @@ local function get_creative_formspec(player_name, start_i, pagenum, page, pagema
|
|||
|
||||
"image_button["..ofs_tab["blocks"]..";1.3,1.3;creative_tab.png;build;;;false;creative_tab_pressed.png]"..
|
||||
"item_image["..ofs_img["blocks"]..";1,1;"..bg["blocks"].."]"..
|
||||
|
||||
|
||||
"image_button["..ofs_tab["stairs"]..";1.3,1.3;creative_tab.png;stairs;;;false;creative_tab_pressed.png]"..
|
||||
"item_image["..ofs_img["stairs"]..";1,1;"..bg["stairs"].."]"..
|
||||
|
||||
|
||||
"image_button["..ofs_tab["bluestone"]..";1.3,1.3;creative_tab.png;bluestone;;;false;creative_tab_pressed.png]"..
|
||||
"item_image["..ofs_img["bluestone"]..";1,1;"..bg["bluestone"].."]"..
|
||||
|
||||
|
@ -225,7 +225,7 @@ local function get_creative_formspec(player_name, start_i, pagenum, page, pagema
|
|||
|
||||
"image_button["..ofs_tab["misc"]..";1.3,1.3;creative_tab.png;misc;;;false;creative_tab_pressed.png]"..
|
||||
"item_image["..ofs_img["misc"]..";1,1;"..bg["misc"].."]"..
|
||||
|
||||
|
||||
"image_button["..ofs_tab["food"]..";1.3,1.3;creative_tab.png;food;;;false;creative_tab_pressed.png]"..
|
||||
"item_image["..ofs_img["food"]..";1,1;"..bg["food"].."]"..
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ http://freesound.org/people/Ryding/sounds/94337/
|
|||
|
||||
Ferk (CC0 1.0):
|
||||
default_item_smoke.ogg, based on a sound by http://opengameart.org/users/bart
|
||||
|
||||
|
||||
wool_coat_movement.ogg from freeSFX.co.uk and has a Creative Commons license
|
||||
|
||||
player_damage.1.ogg
|
||||
|
@ -111,13 +111,13 @@ wool_coat_movement.ogg from freeSFX.co.uk and has a Creative Commons license
|
|||
http://www.freesound.org/people/thecheeseman/sounds/44428/
|
||||
http://www.freesound.org/people/thecheeseman/sounds/44429/
|
||||
http://www.freesound.org/people/thecheeseman/sounds/44430/
|
||||
|
||||
|
||||
player_damage.1.ogg from TenPlus1 mobs_redo mod (Creative Commons sounds from Freesound.org)
|
||||
|
||||
|
||||
sonictechtonic (CC BY 3.0):
|
||||
https://www.freesound.org/people/sonictechtonic/sounds/241872/
|
||||
player_damage.2.ogg
|
||||
|
||||
|
||||
|
||||
Models
|
||||
------
|
||||
|
|
|
@ -261,5 +261,4 @@ minetest.register_craftitem("default:snowball", {
|
|||
stack_max = 16,
|
||||
groups = {flammable = 3},
|
||||
on_use = default.snow_shoot_snowball
|
||||
|
||||
})
|
||||
|
|
|
@ -114,7 +114,7 @@ function default.register_ores()
|
|||
persist = 0.0
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
-- Red Sand
|
||||
|
||||
minetest.register_ore({
|
||||
|
@ -262,7 +262,7 @@ function default.register_ores()
|
|||
y_max = -24,
|
||||
y_min = -48,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "scatter",
|
||||
ore = "default:stone_with_gold",
|
||||
|
@ -424,7 +424,7 @@ function default.register_biomes()
|
|||
heat_point = 0,
|
||||
humidity_point = 73,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_biome({
|
||||
name = "icesheet_ocean",
|
||||
node_dust = "default:snowblock",
|
||||
|
@ -721,7 +721,7 @@ function default.register_biomes()
|
|||
heat_point = 92,
|
||||
humidity_point = 16,
|
||||
})
|
||||
|
||||
|
||||
-- Sandstone desert
|
||||
|
||||
minetest.register_biome({
|
||||
|
|
|
@ -20,7 +20,7 @@ dungeon_loot.registered_loot = {
|
|||
{name = "default:cactus", chance = 0.4, count = {1, 4}, types = {"sandstone", "desert"}},
|
||||
|
||||
-- trees sappling
|
||||
|
||||
|
||||
{name = "default:sapling", chance = 0.5, count = {1, 2}},
|
||||
{name = "default:pine_sapling", chance = 0.5, count = {1, 2}},
|
||||
{name = "default:junglesapling", chance = 0.5, count = {1, 2}},
|
||||
|
@ -37,11 +37,11 @@ dungeon_loot.registered_loot = {
|
|||
{name = "default:sword_steel", chance = 0.6},
|
||||
{name = "default:sword_gold", chance = 0.3},
|
||||
{name = "default:sword_diamond", chance = 0.05},
|
||||
|
||||
|
||||
{name = "default:pick_steel", chance = 0.3},
|
||||
{name = "default:pick_gold", chance = 0.2},
|
||||
{name = "default:pick_diamond", chance = 0.05},
|
||||
|
||||
|
||||
{name = "default:shovel_steel", chance = 0.3},
|
||||
{name = "default:shovel_gold", chance = 0.2},
|
||||
{name = "default:shovel_diamond", chance = 0.05},
|
||||
|
|
|
@ -45,7 +45,7 @@ hud.register("xp_bar", {
|
|||
text = "expbar_full.png",
|
||||
background = "expbar_empty.png",
|
||||
number = 0,
|
||||
max = MAX_HUD_XP,
|
||||
max = MAX_HUD_XP,
|
||||
})
|
||||
|
||||
hud.register("zlvl", {
|
||||
|
@ -171,7 +171,7 @@ minetest.register_entity("experience:orb", {
|
|||
visual_size = {x = 0.1, y = 0.1},
|
||||
collisionbox = {-0.1, -0.1, -0.1, 0.1, 0.1, 0.1},
|
||||
collide_with_objects = false,
|
||||
|
||||
|
||||
on_activate = function(self, staticdata)
|
||||
local obj = self.object
|
||||
obj:set_armor_groups({immortal = 1})
|
||||
|
|
|
@ -1,39 +1,20 @@
|
|||
MutliCraft mod: fire (redo with changes by TenPlus1)
|
||||
MutliCraft Game mod: fire
|
||||
=========================
|
||||
See license.txt for license information.
|
||||
|
||||
=======================
|
||||
|
||||
License of source code
|
||||
Authors of source code
|
||||
----------------------
|
||||
Copyright (C) 2012 Perttu Ahola (celeron55) <celeron55@gmail.com>
|
||||
Originally by Perttu Ahola (celeron55) <celeron55@gmail.com> (LGPLv3.0+)
|
||||
Various Minetest developers and contributors (LGPLv3.0+)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 3.0 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
http://www.gnu.org/licenses/lgpl-3.0.html
|
||||
|
||||
License of media (textures and sounds)
|
||||
Authors of media (textures and sounds)
|
||||
--------------------------------------
|
||||
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||
http://creativecommons.org/licenses/by-sa/3.0/
|
||||
Copyright (C) 2012 Perttu Ahola (celeron55) <celeron55@gmail.com> (CC BY-SA 3.0)
|
||||
|
||||
Authors of media files
|
||||
-----------------------
|
||||
Everything not listed in here:
|
||||
Copyright (C) 2012 Perttu Ahola (celeron55) <celeron55@gmail.com>
|
||||
|
||||
fire_small.ogg sampled from:
|
||||
http://www.freesound.org/people/dobroide/sounds/4211/
|
||||
fire_small.ogg
|
||||
|
||||
fire_large.ogg sampled from:
|
||||
http://www.freesound.org/people/Dynamicell/sounds/17548/
|
||||
fire_large.ogg
|
||||
Dynamicell (CC BY 3.0)
|
||||
http://www.freesound.org/people/Dynamicell/sounds/17548/
|
||||
fire_fire.*.ogg
|
||||
|
||||
fire_small.ogg and fire_large.ogg are unused but kept temporarily to not break
|
||||
other mods that may use them.
|
||||
|
||||
fire_basic_flame_animated.png:
|
||||
Muadtralk
|
||||
Benboncan (CC BY 3.0)
|
||||
https://www.freesound.org/people/Benboncan/sounds/66457/
|
||||
fire_flint_and_steel.ogg
|
||||
|
|
|
@ -1,19 +1,9 @@
|
|||
-- Global namespace for functions
|
||||
|
||||
fire = {}
|
||||
|
||||
-- 'Enable fire' setting
|
||||
|
||||
local fire_enabled = minetest.settings:get_bool("enable_fire")
|
||||
if fire_enabled == nil then
|
||||
-- enable_fire setting not specified, check for disable_fire
|
||||
local fire_disabled = minetest.settings:get_bool("disable_fire")
|
||||
if fire_disabled == nil then
|
||||
-- Neither setting specified, check whether singleplayer
|
||||
fire_enabled = minetest.is_singleplayer()
|
||||
else
|
||||
fire_enabled = not fire_disabled
|
||||
end
|
||||
-- Neither setting specified, check whether singleplayer
|
||||
fire_enabled = minetest.is_singleplayer()
|
||||
end
|
||||
|
||||
--
|
||||
|
@ -21,7 +11,6 @@ end
|
|||
--
|
||||
|
||||
-- Flood flame function
|
||||
|
||||
local function flood_flame(pos, oldnode, newnode)
|
||||
-- Play flame extinguish sound if liquid is not an 'igniter'
|
||||
local nodedef = minetest.registered_items[newnode.name]
|
||||
|
@ -35,7 +24,6 @@ local function flood_flame(pos, oldnode, newnode)
|
|||
end
|
||||
|
||||
-- Flame nodes
|
||||
|
||||
minetest.register_node("fire:basic_flame", {
|
||||
drawtype = "firelike",
|
||||
tiles = {
|
||||
|
@ -59,7 +47,7 @@ minetest.register_node("fire:basic_flame", {
|
|||
damage_per_second = 4,
|
||||
groups = {igniter = 2, dig_immediate = 3, not_in_creative_inventory = 1},
|
||||
drop = "",
|
||||
|
||||
|
||||
on_timer = function(pos)
|
||||
local f = minetest.find_node_near(pos, 1, {"group:flammable"})
|
||||
if not fire_enabled or not f then
|
||||
|
@ -78,7 +66,7 @@ minetest.register_node("fire:basic_flame", {
|
|||
end
|
||||
end,
|
||||
|
||||
on_flood = flood_flame,
|
||||
on_flood = flood_flame
|
||||
})
|
||||
|
||||
minetest.register_node("fire:permanent_flame", {
|
||||
|
@ -106,66 +94,64 @@ minetest.register_node("fire:permanent_flame", {
|
|||
groups = {igniter = 2, dig_immediate = 3, not_in_creative_inventory = 1},
|
||||
drop = "",
|
||||
|
||||
on_flood = flood_flame,
|
||||
on_flood = flood_flame
|
||||
})
|
||||
|
||||
|
||||
-- Flint and steel
|
||||
|
||||
minetest.register_tool("fire:flint_and_steel", {
|
||||
description = "Flint and Steel",
|
||||
inventory_image = "fire_flint_steel.png",
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
if fire_enabled then
|
||||
minetest.register_tool("fire:flint_and_steel", {
|
||||
description = "Flint and Steel",
|
||||
inventory_image = "fire_flint_steel.png",
|
||||
sound = {breaks = "default_tool_breaks"},
|
||||
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
local sound_pos = pointed_thing.above or user:get_pos()
|
||||
minetest.sound_play(
|
||||
"fire_flint_and_steel",
|
||||
{pos = sound_pos, gain = 0.5, max_hear_distance = 8}
|
||||
)
|
||||
local player_name = user:get_player_name()
|
||||
if pointed_thing.type == "node" then
|
||||
local node_under = minetest.get_node(pointed_thing.under).name
|
||||
local nodedef = minetest.registered_nodes[node_under]
|
||||
if not nodedef then
|
||||
return
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
local sound_pos = pointed_thing.above or user:get_pos()
|
||||
minetest.sound_play("fire_flint_and_steel",
|
||||
{pos = sound_pos, gain = 0.5, max_hear_distance = 8})
|
||||
local player_name = user:get_player_name()
|
||||
if pointed_thing.type == "node" then
|
||||
local node_under = minetest.get_node(pointed_thing.under).name
|
||||
local nodedef = minetest.registered_nodes[node_under]
|
||||
if not nodedef then
|
||||
return
|
||||
end
|
||||
if minetest.is_protected(pointed_thing.under, player_name) then
|
||||
minetest.chat_send_player(player_name, "This area is protected")
|
||||
return
|
||||
end
|
||||
if nodedef.on_ignite then
|
||||
nodedef.on_ignite(pointed_thing.under, user)
|
||||
elseif minetest.get_item_group(node_under, "flammable") >= 1
|
||||
and minetest.get_node(pointed_thing.above).name == "air" then
|
||||
minetest.set_node(pointed_thing.above, {name = "fire:basic_flame"})
|
||||
end
|
||||
end
|
||||
if minetest.is_protected(pointed_thing.under, player_name) then
|
||||
minetest.chat_send_player(player_name, "This area is protected")
|
||||
return
|
||||
end
|
||||
if nodedef.on_ignite then
|
||||
nodedef.on_ignite(pointed_thing.under, user)
|
||||
elseif minetest.get_item_group(node_under, "flammable") >= 1
|
||||
and minetest.get_node(pointed_thing.above).name == "air" then
|
||||
minetest.set_node(pointed_thing.above, {name = "fire:basic_flame"})
|
||||
if not (creative and creative.is_enabled_for
|
||||
and creative.is_enabled_for(player_name)) then
|
||||
-- Wear tool
|
||||
local wdef = itemstack:get_definition()
|
||||
itemstack:add_wear(1000)
|
||||
-- Tool break sound
|
||||
if itemstack:get_count() == 0 and wdef.sound and wdef.sound.breaks then
|
||||
minetest.sound_play(wdef.sound.breaks, {pos = sound_pos, gain = 0.5})
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
if not (creative and creative.is_enabled_for
|
||||
and creative.is_enabled_for(player_name)) then
|
||||
-- Wear tool
|
||||
local wdef = itemstack:get_definition()
|
||||
itemstack:add_wear(1000)
|
||||
-- Tool break sound
|
||||
if itemstack:get_count() == 0 and wdef.sound and wdef.sound.breaks then
|
||||
minetest.sound_play(wdef.sound.breaks, {pos = sound_pos, gain = 0.5})
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "fire:flint_and_steel",
|
||||
recipe = {
|
||||
{"default:flint", "default:steel_ingot"}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "fire:flint_and_steel",
|
||||
recipe = {
|
||||
{"default:flint", "default:steel_ingot"}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-- Override coalblock to enable permanent flame above
|
||||
-- Coalblock is non-flammable to avoid unwanted basic_flame nodes
|
||||
|
||||
minetest.override_item("default:coalblock", {
|
||||
after_destruct = function(pos, oldnode)
|
||||
pos.y = pos.y + 1
|
||||
|
@ -193,17 +179,14 @@ if flame_sound == nil then
|
|||
end
|
||||
|
||||
if flame_sound then
|
||||
|
||||
local handles = {}
|
||||
local timer = 0
|
||||
|
||||
-- Parameters
|
||||
|
||||
local radius = 8 -- Flame node search radius around player
|
||||
local cycle = 3 -- Cycle time for sound updates
|
||||
|
||||
-- Update sound for player
|
||||
|
||||
function fire.update_player_sound(player)
|
||||
local player_name = player:get_player_name()
|
||||
-- Search for flame nodes in radius around player
|
||||
|
@ -255,16 +238,13 @@ if flame_sound then
|
|||
fposmid = vector.divide(vector.add(fposmin, fposmax), 2)
|
||||
end
|
||||
-- Play sound
|
||||
local handle = minetest.sound_play(
|
||||
"fire_fire",
|
||||
{
|
||||
pos = fposmid,
|
||||
to_player = player_name,
|
||||
gain = math.min(0.06 * (1 + flames * 0.125), 0.18),
|
||||
max_hear_distance = 32,
|
||||
loop = true, -- In case of lag
|
||||
}
|
||||
)
|
||||
local handle = minetest.sound_play("fire_fire", {
|
||||
pos = fposmid,
|
||||
to_player = player_name,
|
||||
gain = math.min(0.06 * (1 + flames * 0.125), 0.18),
|
||||
max_hear_distance = 32,
|
||||
loop = true, -- In case of lag
|
||||
})
|
||||
-- Store sound handle for this player
|
||||
if handle then
|
||||
handles[player_name] = handle
|
||||
|
@ -273,7 +253,6 @@ if flame_sound then
|
|||
end
|
||||
|
||||
-- Cycle for updating players sounds
|
||||
|
||||
local cycles = {}
|
||||
minetest.register_playerstep(function(dtime, playernames)
|
||||
for _, name in pairs(playernames) do
|
||||
|
@ -290,7 +269,6 @@ if flame_sound then
|
|||
end, true) -- We can force this since it is already rate-limited
|
||||
|
||||
-- Stop sound and clear handle on player leave
|
||||
|
||||
minetest.register_on_leaveplayer(function(player)
|
||||
local player_name = player:get_player_name()
|
||||
if handles[player_name] then
|
||||
|
@ -302,12 +280,6 @@ if flame_sound then
|
|||
end
|
||||
|
||||
|
||||
-- Deprecated function kept temporarily to avoid crashes if mod fire nodes call it
|
||||
|
||||
function fire.update_sounds_around(pos)
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- ABMs
|
||||
--
|
||||
|
@ -315,7 +287,6 @@ end
|
|||
if fire_enabled then
|
||||
|
||||
-- Ignite neighboring nodes, add basic flames
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Ignite flame",
|
||||
nodenames = {"group:flammable"},
|
||||
|
@ -332,7 +303,6 @@ if fire_enabled then
|
|||
})
|
||||
|
||||
-- Remove flammable nodes around basic flame
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Remove flammable nodes",
|
||||
nodenames = {"fire:basic_flame"},
|
||||
|
@ -342,33 +312,32 @@ if fire_enabled then
|
|||
catch_up = false,
|
||||
action = function(pos)
|
||||
local p = minetest.find_node_near(pos, 1, {"group:flammable"})
|
||||
if not p then
|
||||
return
|
||||
if not p then
|
||||
return
|
||||
end
|
||||
local flammable_node = minetest.get_node(p)
|
||||
local def = minetest.registered_nodes[flammable_node.name]
|
||||
if def.on_burn then
|
||||
def.on_burn(p)
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
minetest.add_particlespawner({
|
||||
amount = 3,
|
||||
time = 0.1,
|
||||
minpos = {x = p.x - 0.1, y = p.y + 0.1, z = p.z - 0.1 },
|
||||
maxpos = {x = p.x + 0.1, y = p.y + 0.2, z = p.z + 0.1 },
|
||||
minvel = {x = 0, y = 2.5, z = 0},
|
||||
maxvel = {x = 0, y = 2.5, z = 0},
|
||||
minacc = {x = -0.15, y = -0.02, z = -0.15},
|
||||
maxacc = {x = 0.15, y = -0.01, z = 0.15},
|
||||
minexptime = 4,
|
||||
maxexptime = 6,
|
||||
minsize = 2,
|
||||
maxsize = 4,
|
||||
texture = "item_smoke.png"
|
||||
})
|
||||
minetest.check_for_falling(p)
|
||||
end
|
||||
local flammable_node = minetest.get_node(p)
|
||||
local def = minetest.registered_nodes[flammable_node.name]
|
||||
if def.on_burn then
|
||||
def.on_burn(p)
|
||||
else
|
||||
minetest.remove_node(p)
|
||||
minetest.add_particlespawner({
|
||||
amount = 3,
|
||||
time = 0.1,
|
||||
minpos = {x = p.x - 0.1, y = p.y + 0.1, z = p.z - 0.1 },
|
||||
maxpos = {x = p.x + 0.1, y = p.y + 0.2, z = p.z + 0.1 },
|
||||
minvel = {x = 0, y = 2.5, z = 0},
|
||||
maxvel = {x = 0, y = 2.5, z = 0},
|
||||
minacc = {x = -0.15, y = -0.02, z = -0.15},
|
||||
maxacc = {x = 0.15, y = -0.01, z = 0.15},
|
||||
minexptime = 4,
|
||||
maxexptime = 6,
|
||||
minsize = 2,
|
||||
maxsize = 4,
|
||||
texture = "item_smoke.png"
|
||||
})
|
||||
minetest.check_for_falling(p)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
end
|
||||
|
|
|
@ -0,0 +1,81 @@
|
|||
License of source code
|
||||
----------------------
|
||||
|
||||
GNU Lesser General Public License, version 3.0
|
||||
Copyright (C) 2012-2016 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
Copyright (C) 2012-2016 Various Minetest developers and contributors
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under the terms
|
||||
of the GNU Lesser General Public License as published by the Free Software Foundation;
|
||||
either version 3.0 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU Lesser General Public License for more details:
|
||||
http://www.gnu.org/licenses/lgpl-3.0.html
|
||||
|
||||
|
||||
Licenses of media (textures and sounds)
|
||||
---------------------------------------
|
||||
|
||||
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||
Copyright (C) 2012-2016 Perttu Ahola (celeron55) <celeron55@gmail.com>
|
||||
|
||||
You are free to:
|
||||
Share — copy and redistribute the material in any medium or format.
|
||||
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
|
||||
The licensor cannot revoke these freedoms as long as you follow the license terms.
|
||||
|
||||
Under the following terms:
|
||||
|
||||
Attribution — You must give appropriate credit, provide a link to the license, and
|
||||
indicate if changes were made. You may do so in any reasonable manner, but not in any way
|
||||
that suggests the licensor endorses you or your use.
|
||||
|
||||
ShareAlike — If you remix, transform, or build upon the material, you must distribute
|
||||
your contributions under the same license as the original.
|
||||
|
||||
No additional restrictions — You may not apply legal terms or technological measures that
|
||||
legally restrict others from doing anything the license permits.
|
||||
|
||||
Notices:
|
||||
|
||||
You do not have to comply with the license for elements of the material in the public
|
||||
domain or where your use is permitted by an applicable exception or limitation.
|
||||
No warranties are given. The license may not give you all of the permissions necessary
|
||||
for your intended use. For example, other rights such as publicity, privacy, or moral
|
||||
rights may limit how you use the material.
|
||||
|
||||
For more details:
|
||||
http://creativecommons.org/licenses/by-sa/3.0/
|
||||
|
||||
-----------------------
|
||||
|
||||
Attribution 3.0 Unported (CC BY 3.0)
|
||||
Copyright (C) 2006 Dynamicell
|
||||
Copyright (C) 2009 Benboncan
|
||||
|
||||
You are free to:
|
||||
Share — copy and redistribute the material in any medium or format.
|
||||
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
|
||||
The licensor cannot revoke these freedoms as long as you follow the license terms.
|
||||
|
||||
Under the following terms:
|
||||
|
||||
Attribution — You must give appropriate credit, provide a link to the license, and
|
||||
indicate if changes were made. You may do so in any reasonable manner, but not in any way
|
||||
that suggests the licensor endorses you or your use.
|
||||
|
||||
No additional restrictions — You may not apply legal terms or technological measures that
|
||||
legally restrict others from doing anything the license permits.
|
||||
|
||||
Notices:
|
||||
|
||||
You do not have to comply with the license for elements of the material in the public
|
||||
domain or where your use is permitted by an applicable exception or limitation.
|
||||
No warranties are given. The license may not give you all of the permissions necessary
|
||||
for your intended use. For example, other rights such as publicity, privacy, or moral
|
||||
rights may limit how you use the material.
|
||||
|
||||
For more details:
|
||||
http://creativecommons.org/licenses/by/3.0/
|
|
@ -180,7 +180,7 @@ minetest.register_node("flowers:mushroom_red", {
|
|||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0, 0.3}
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node("flowers:mushroom_brown", {
|
||||
|
|
|
@ -136,7 +136,7 @@ function ts_furniture.register_furniture(recipe, description, texture)
|
|||
end
|
||||
|
||||
local groups = {falling_node = 1}
|
||||
|
||||
|
||||
for k, v in pairs(recipe_def.groups) do
|
||||
if not ignore_groups[k] then
|
||||
groups[k] = v
|
||||
|
|
|
@ -26,8 +26,8 @@ https://github.com/BlockMen/hunger
|
|||
|
||||
Code:
|
||||
Licensed under the GNU LGPL version 3.0 or higher.
|
||||
You can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License
|
||||
You can redistribute it and/or modify it under
|
||||
the terms of the GNU Lesser General Public License
|
||||
as published by the Free Software Foundation;
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
|
|
|
@ -109,7 +109,7 @@ end
|
|||
minetest.register_node("itemframes:frame",{
|
||||
description = "Item frame",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 7/16, 0.5, 0.5, 0.5}
|
||||
},
|
||||
|
|
|
@ -1,38 +1,9 @@
|
|||
|
||||
MONSTER MOBS
|
||||
|
||||
Dirt Monster
|
||||
|
||||
- Spawning at night on green grass (or grey in ethereal) these mobs wander around looking for a player to eat. Drops 1-5 dirt when killed.
|
||||
|
||||
Dungeon Master
|
||||
|
||||
- Spawning below -70 underground DM's have a tendency to hurl fire balls at unsuspecting players and can cause major damage, but get too close and he will switch to dogfight attack. Can drop mese or diamond when killed.
|
||||
|
||||
Lava Flan
|
||||
|
||||
- Cute as they may look lava flan wallow in their namesake (no, not flans) and get curious about players who wander by, forgetting that they can burn you and cause damage. They have a 1 in 5 chance of dropping lava orb when killed.
|
||||
|
||||
Mese Monster
|
||||
|
||||
- These mobs are territorial and spawn below -20 and will fire mese shards at passers by, so best avoided. Will drop mese when killed.
|
||||
|
||||
Oerkki
|
||||
|
||||
- Found in dark areas like most monsters Oerkki wander the caverns stealing away torches on the ground and attacking anyone found in that area. 1 in 3 chance of dropping obsidian.
|
||||
|
||||
Sand Monster
|
||||
|
||||
- The hot deserts are home to these guys who spawn at any time of the day to attack players. They drop 3-5 desert sand when killed.
|
||||
|
||||
Spider
|
||||
|
||||
- Found in dark holes inside desertstone (crystal biomes in ethereal), spiders wait for prey to amble past and strike. They are mostly docile during the day though unless hit. Will drop string when killed.
|
||||
|
||||
Stone Monster
|
||||
Zombie
|
||||
|
||||
- Found underground in dark caves these mobs seem to be zombie-like in fashion with a tendency to rush a player in the area. can drop torch, iron or coal when killed.
|
||||
|
||||
Tree Monster
|
||||
|
||||
- Found atop tree's at night time they drop down and look for food in the form of players and animals. Can drop saplings and sometimes an apple or three.
|
||||
Skeleton
|
||||
|
|
|
@ -50,6 +50,6 @@ mobs:spawn({
|
|||
max_light = 10,
|
||||
chance = 15000,
|
||||
min_height = -64,
|
||||
})
|
||||
})
|
||||
|
||||
mobs:register_egg("mobs_monster:zombie", "Zombie Head", "zombie_head.png", 0)
|
||||
|
|
|
@ -62,7 +62,7 @@ Changelog:
|
|||
- 1.13- Added capture function (thanks blert2112) chance of picking up mob with hand; net; magic lasso, replaced some .x models with newer .b3d one's
|
||||
- 1.12- Added animal ownership so that players cannot steal your tamed animals
|
||||
- 1.11- Added flying mobs (and swimming), fly=true and fly_in="air" or "deafult:water_source" for fishy
|
||||
- 1,10- Footstep removed (use replace), explosion routine added for exploding mobs.
|
||||
- 1,10- Footstep removed (use replace), explosion routine added for exploding mobs.
|
||||
- 1.09- reworked breeding routine, added mob rotation value, added footstep feature, added jumping mobs with sounds feature, added magic lasso for picking up animals
|
||||
- 1.08- Mob throwing attack has been rehauled so that they can damage one another, also drops and on_die function added
|
||||
- 1.07- Npc's can now be set to follow player or stand by using self.order and self.owner variables
|
||||
|
|
|
@ -232,5 +232,3 @@ These commands apply (or try to) apply an effect to you. You will get a response
|
|||
|
||||
#### Testing
|
||||
* `stresstest [number]`: Applies `number` dummy effects which don’t do anything to you. Iff omitted, `number` is assumed to be 100. This command is there to test the performance of this mod for absurdly large effect numbers.
|
||||
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ do
|
|||
-- minetest.debug("[playereffects] inactive_effects = "..dump(playereffects.inactive_effects))
|
||||
playereffects.last_effect_id = savetable.last_effect_id
|
||||
-- minetest.debug("[playereffects] last_effect_id = "..dump(playereffects.last_effect_id))
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -91,7 +91,7 @@ function playereffects.register_effect_type(effect_type_id, description, icon, g
|
|||
effect_type.hidden = false
|
||||
end
|
||||
if cancel_on_death ~= nil then
|
||||
effect_type.cancel_on_death = cancel_on_death
|
||||
effect_type.cancel_on_death = cancel_on_death
|
||||
else
|
||||
effect_type.cancel_on_death = true
|
||||
end
|
||||
|
@ -183,7 +183,7 @@ function playereffects.apply_effect_type(effect_type_id, duration, player, repea
|
|||
end
|
||||
|
||||
local effect = {
|
||||
playername = playername,
|
||||
playername = playername,
|
||||
effect_id = effect_id,
|
||||
effect_type_id = effect_type_id,
|
||||
start_time = start_time,
|
||||
|
@ -296,7 +296,7 @@ function playereffects.get_player_effects(playername)
|
|||
end
|
||||
return effects
|
||||
else
|
||||
return {}
|
||||
return {}
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -507,7 +507,7 @@ function playereffects.hud_effect(effect_type_id, player, pos, time_left, repeat
|
|||
alignment = { x = -1, y = 0 },
|
||||
direction = 1,
|
||||
number = color,
|
||||
offset = { x = -5, y = pos*30 }
|
||||
offset = { x = -5, y = pos*30 }
|
||||
})
|
||||
if(playereffects.effect_types[effect_type_id].icon ~= nil) then
|
||||
icon_id = player:hud_add({
|
||||
|
@ -520,7 +520,7 @@ function playereffects.hud_effect(effect_type_id, player, pos, time_left, repeat
|
|||
direction = 0,
|
||||
offset = { x = -200, y = pos*30 },
|
||||
})
|
||||
end
|
||||
end
|
||||
else
|
||||
text_id = nil
|
||||
icon_id = nil
|
||||
|
|
|
@ -115,9 +115,5 @@ playerphysics.add_physics_factor(player, "jump", "sleeping", 0)
|
|||
|
||||
This works regardless of the other factors because 0 times anything equals 0.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## License
|
||||
This mod is free software, released under the MIT License.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2018
|
||||
Copyright (c) 2018 Benjie/Fiftysix
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -9,7 +9,7 @@ They turn in to wet sponges when used, so to use them again, they have to be coo
|
|||
### How it works:
|
||||
* sponges create a 5x5 area of air-like nodes that water can't flow through (checks for protection)
|
||||
* if sponges have cleared more than 3 nodes of liquid, they become wet sponges
|
||||
* removing a sponge or wet sponge will turn a 5x5 area of air-like nodes back into air.
|
||||
* removing a sponge or wet sponge will turn a 5x5 area of air-like nodes back into air.
|
||||
*(Air-like nodes can be removed in protection by removing a sponge outside the protection, they are not meant to be permanent)*
|
||||
|
||||
[Forum topic](https://forum.minetest.net/viewtopic.php?f=9&t=20729)
|
||||
|
|
|
@ -30,10 +30,10 @@ minetest.register_node("sponge:sponge", { -- dry sponge
|
|||
description = "Sponge",
|
||||
tiles = {"sponge_sponge.png"},
|
||||
groups = {snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, flammable = 3},
|
||||
|
||||
|
||||
after_place_node = function(pos, placer, itemstack, pointed_thing)
|
||||
local name = placer:get_player_name()
|
||||
|
||||
|
||||
if not minetest.is_protected(pos, name) then
|
||||
local count = 0
|
||||
for x = pos.x-area, pos.x+area do
|
||||
|
@ -59,7 +59,7 @@ minetest.register_node("sponge:sponge", { -- dry sponge
|
|||
end
|
||||
end
|
||||
end,
|
||||
|
||||
|
||||
after_dig_node = destruct
|
||||
})
|
||||
|
||||
|
|
|
@ -22,4 +22,3 @@ wieldview.transform = {
|
|||
["vessels:drinking_glass"]="R270",
|
||||
["vessels:steel_bottle"]="R270",
|
||||
}
|
||||
|
||||
|
|
|
@ -328,7 +328,7 @@ for _, d in pairs(workbench.defs) do
|
|||
},
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -177,7 +177,7 @@ for i = 1, #dyes do
|
|||
},
|
||||
recipe_items = "8"
|
||||
})
|
||||
|
||||
|
||||
for i = 1, 15 do
|
||||
minetest.register_alias("xpanes:pane_glass_" .. name .. "_" .. i, "xpanes:pane_" .. name .. "_flat")
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue