Compare commits
No commits in common. "16da62e7e4e1ce5d26ee18c6674ad117f472dbe4" and "5461ae70b722235385ee02042d48b7d926649edb" have entirely different histories.
16da62e7e4
...
5461ae70b7
@ -1,6 +1,5 @@
|
||||
|
||||
local reverse = true
|
||||
local is_54 = minetest.has_feature("direct_velocity_on_players") or false
|
||||
|
||||
local function destruct_bed(pos, n)
|
||||
local node = minetest.get_node(pos)
|
||||
@ -30,7 +29,6 @@ function beds.register_bed(name, def)
|
||||
wield_image = def.wield_image,
|
||||
drawtype = "nodebox",
|
||||
tiles = def.tiles.bottom,
|
||||
use_texture_alpha = (is_54 and "clip" or true),
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
@ -151,7 +149,6 @@ function beds.register_bed(name, def)
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
use_texture_alpha = (is_54 and "clip" or true),
|
||||
pointable = false,
|
||||
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 2},
|
||||
sounds = def.sounds or default.node_sound_wood_defaults(),
|
||||
|
@ -1,7 +1,4 @@
|
||||
-- Fancy shaped bed
|
||||
local is_54 = minetest.has_feature("direct_velocity_on_players") or false
|
||||
|
||||
print("is 54 "..(is_54 and 'x' or 'nil'))
|
||||
|
||||
beds.register_bed("beds:fancy_bed", {
|
||||
description = "Fancy Bed",
|
||||
@ -25,7 +22,6 @@ beds.register_bed("beds:fancy_bed", {
|
||||
"default_wood.png",
|
||||
}
|
||||
},
|
||||
use_texture_alpha = (is_54 and "clip" or true),
|
||||
nodebox = {
|
||||
bottom = {
|
||||
{-0.5, -0.5, -0.5, -0.375, -0.065, -0.4375},
|
||||
@ -77,7 +73,6 @@ beds.register_bed("beds:bed", {
|
||||
"beds_transparent.png",
|
||||
}
|
||||
},
|
||||
use_texture_alpha = (is_54 and "clip" or true),
|
||||
nodebox = {
|
||||
bottom = {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5},
|
||||
top = {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5},
|
||||
|
@ -65,7 +65,6 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
|
||||
end
|
||||
|
||||
local node = minetest.get_node_or_nil(pointed_thing.under)
|
||||
if not node then return end
|
||||
local ndef = node and minetest.registered_nodes[node.name]
|
||||
|
||||
-- Call on_rightclick if the pointed node defines it
|
||||
@ -126,7 +125,6 @@ minetest.register_craftitem("bucket:bucket_empty", {
|
||||
end
|
||||
-- Check if pointing to a liquid source
|
||||
local node = minetest.get_node(pointed_thing.under)
|
||||
if not node then return end
|
||||
local liquiddef = bucket.liquids[node.name]
|
||||
local item_count = user:get_wielded_item():get_count()
|
||||
|
||||
@ -150,7 +148,7 @@ minetest.register_craftitem("bucket:bucket_empty", {
|
||||
if inv:room_for_item("main", {name=liquiddef.itemname}) then
|
||||
inv:add_item("main", liquiddef.itemname)
|
||||
else
|
||||
local pos = user:get_pos()
|
||||
local pos = user:getpos()
|
||||
pos.y = math.floor(pos.y + 0.5)
|
||||
minetest.add_item(pos, liquiddef.itemname)
|
||||
end
|
||||
|
@ -121,7 +121,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if inv:room_for_item("main", new_stack) then
|
||||
inv:add_item("main", new_stack)
|
||||
else
|
||||
minetest.add_item(player:get_pos(), new_stack)
|
||||
minetest.add_item(player:getpos(), new_stack)
|
||||
end
|
||||
else
|
||||
stack:get_meta():from_table({ fields = data })
|
||||
@ -216,8 +216,7 @@ minetest.register_craftitem("default:skeleton_key", {
|
||||
return itemstack
|
||||
end
|
||||
|
||||
local node_reg = minetest.registered_nodes[node.name]
|
||||
local on_skeleton_key_use = node_reg and node_reg.on_skeleton_key_use
|
||||
local on_skeleton_key_use = minetest.registered_nodes[node.name].on_skeleton_key_use
|
||||
if not on_skeleton_key_use then
|
||||
return itemstack
|
||||
end
|
||||
|
@ -562,7 +562,7 @@ minetest.register_abm({
|
||||
--
|
||||
|
||||
function default.can_interact_with_node(player, pos)
|
||||
if player and player:is_player() then
|
||||
if player then
|
||||
if minetest.check_player_privs(player, "protection_bypass") then
|
||||
return true
|
||||
end
|
||||
|
@ -48,11 +48,7 @@ local item = {
|
||||
if self.ignite_timer > 10 then
|
||||
self.ignite_timer = 0
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
if pos == nil then
|
||||
return -- object already deleted
|
||||
end
|
||||
local node = minetest.get_node_or_nil(pos)
|
||||
local node = minetest.get_node_or_nil(self.object:getpos())
|
||||
if not node then
|
||||
return
|
||||
end
|
||||
|
@ -1,5 +1,4 @@
|
||||
-- mods/default/legacy.lua
|
||||
local is_54 = minetest.has_feature("direct_velocity_on_players") or false
|
||||
|
||||
-- Horrible stuff to support old code registering falling nodes
|
||||
-- Don't use this and never do what this does, it's completely wrong!
|
||||
@ -17,11 +16,10 @@ function default.spawn_falling_node(p, nodename)
|
||||
end
|
||||
|
||||
-- Liquids
|
||||
WATER_ALPHA = minetest.registered_nodes["default:water_source"].alpha or true
|
||||
WATER_ALPHA = minetest.registered_nodes["default:water_source"].alpha
|
||||
WATER_VISC = minetest.registered_nodes["default:water_source"].liquid_viscosity
|
||||
LAVA_VISC = minetest.registered_nodes["default:lava_source"].liquid_viscosity
|
||||
LIGHT_MAX = default.LIGHT_MAX
|
||||
if is_54 then WATER_ALPHA = minetest.registered_nodes["default:water_source"].use_texture_alpha or "opaque" end
|
||||
|
||||
-- Formspecs
|
||||
default.gui_suvival_form = default.gui_survival_form
|
||||
@ -49,14 +47,3 @@ else
|
||||
player_api.set_animation = default.player_set_animation
|
||||
end
|
||||
|
||||
-- Chests
|
||||
default.register_chest = default.chest.register_chest
|
||||
|
||||
-- Check for a volume intersecting protection
|
||||
if minetest.is_area_protected then
|
||||
function default.intersects_protection(minp, maxp, player_name, interval)
|
||||
minetest.log("warning", "default.intersects_protection() is " ..
|
||||
"deprecated, use minetest.is_area_protected() instead.")
|
||||
return minetest.is_area_protected(minp, maxp, player_name, interval)
|
||||
end
|
||||
end
|
||||
|
@ -208,11 +208,6 @@ default:cloud
|
||||
-- Stone
|
||||
--
|
||||
|
||||
local is_54 = minetest.has_feature("direct_velocity_on_players") or false
|
||||
local alpha_use_texture_alpha = true
|
||||
|
||||
if is_54 then alpha_use_texture_alpha = "blend" end
|
||||
|
||||
minetest.register_node("default:stone", {
|
||||
description = "Stone",
|
||||
tiles = {"default_stone.png"},
|
||||
@ -1512,7 +1507,7 @@ minetest.register_node("default:water_source", {
|
||||
backface_culling = false,
|
||||
},
|
||||
},
|
||||
use_texture_alpha = alpha_use_texture_alpha,
|
||||
alpha = 160,
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
@ -1556,7 +1551,7 @@ minetest.register_node("default:water_flowing", {
|
||||
},
|
||||
},
|
||||
},
|
||||
use_texture_alpha = alpha_use_texture_alpha,
|
||||
alpha = 160,
|
||||
paramtype = "light",
|
||||
paramtype2 = "flowingliquid",
|
||||
walkable = false,
|
||||
@ -1603,7 +1598,7 @@ minetest.register_node("default:river_water_source", {
|
||||
backface_culling = false,
|
||||
},
|
||||
},
|
||||
use_texture_alpha = alpha_use_texture_alpha,
|
||||
alpha = 160,
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
pointable = false,
|
||||
@ -1649,7 +1644,7 @@ minetest.register_node("default:river_water_flowing", {
|
||||
},
|
||||
},
|
||||
},
|
||||
use_texture_alpha = alpha_use_texture_alpha,
|
||||
alpha = 160,
|
||||
paramtype = "light",
|
||||
paramtype2 = "flowingliquid",
|
||||
walkable = false,
|
||||
@ -2180,7 +2175,6 @@ local function register_sign(material, desc, def)
|
||||
sunlight_propagates = true,
|
||||
is_ground_content = false,
|
||||
walkable = false,
|
||||
use_texture_alpha = (is_54 and "opaque" or true),
|
||||
node_box = {
|
||||
type = "wallmounted",
|
||||
wall_top = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
|
||||
@ -2322,7 +2316,6 @@ minetest.register_node("default:glass", {
|
||||
description = "Glass",
|
||||
drawtype = "glasslike_framed_optional",
|
||||
tiles = {"default_glass.png", "default_glass_detail.png"},
|
||||
use_texture_alpha = (is_54 and "clip" or true),
|
||||
paramtype = "light",
|
||||
paramtype2 = "glasslikeliquidlevel",
|
||||
sunlight_propagates = true,
|
||||
@ -2335,7 +2328,6 @@ minetest.register_node("default:obsidian_glass", {
|
||||
description = "Obsidian Glass",
|
||||
drawtype = "glasslike_framed_optional",
|
||||
tiles = {"default_obsidian_glass.png", "default_obsidian_glass_detail.png"},
|
||||
use_texture_alpha = (is_54 and "clip" or true),
|
||||
paramtype = "light",
|
||||
paramtype2 = "glasslikeliquidlevel",
|
||||
is_ground_content = false,
|
||||
@ -2373,7 +2365,6 @@ minetest.register_node("default:mese_post_light", {
|
||||
tiles = {"default_mese_post_light_top.png", "default_mese_post_light_top.png",
|
||||
"default_mese_post_light_side_dark.png", "default_mese_post_light_side_dark.png",
|
||||
"default_mese_post_light_side.png", "default_mese_post_light_side.png"},
|
||||
use_texture_alpha = (is_54 and "clip" or true),
|
||||
wield_image = "default_mese_post_light_side.png",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
|
@ -35,8 +35,6 @@ See LICENSE.txt and http://www.gnu.org/licenses/lgpl-2.1.txt
|
||||
|
||||
--]]
|
||||
|
||||
local is_54 = minetest.has_feature("direct_velocity_on_players") or false
|
||||
|
||||
minetest.register_node("default:torch", {
|
||||
description = "Torch",
|
||||
drawtype = "mesh",
|
||||
@ -47,7 +45,6 @@ minetest.register_node("default:torch", {
|
||||
name = "default_torch_on_floor_animated.png",
|
||||
animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3}
|
||||
}},
|
||||
use_texture_alpha = (is_54 and "clip" or true),
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
@ -97,7 +94,6 @@ minetest.register_node("default:torch_wall", {
|
||||
name = "default_torch_on_floor_animated.png",
|
||||
animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3}
|
||||
}},
|
||||
use_texture_alpha = (is_54 and "clip" or true),
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
@ -110,9 +106,6 @@ minetest.register_node("default:torch_wall", {
|
||||
wall_side = {-1/2, -1/2, -1/8, -1/8, 1/8, 1/8},
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
floodable = true,
|
||||
on_flood = on_flood,
|
||||
on_rotate = false
|
||||
})
|
||||
|
||||
minetest.register_node("default:torch_ceiling", {
|
||||
@ -122,7 +115,6 @@ minetest.register_node("default:torch_ceiling", {
|
||||
name = "default_torch_on_floor_animated.png",
|
||||
animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 3.3}
|
||||
}},
|
||||
use_texture_alpha = (is_54 and "clip" or true),
|
||||
paramtype = "light",
|
||||
paramtype2 = "wallmounted",
|
||||
sunlight_propagates = true,
|
||||
@ -135,9 +127,6 @@ minetest.register_node("default:torch_ceiling", {
|
||||
wall_top = {-1/8, -1/16, -5/16, 1/8, 1/2, 1/8},
|
||||
},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
floodable = true,
|
||||
on_flood = on_flood,
|
||||
on_rotate = false
|
||||
})
|
||||
|
||||
minetest.register_lbm({
|
||||
|
@ -1,5 +1,3 @@
|
||||
local is_54 = minetest.has_feature("direct_velocity_on_players") or false
|
||||
|
||||
-- our API object
|
||||
doors = {}
|
||||
|
||||
@ -82,7 +80,6 @@ minetest.register_node("doors:hidden", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
use_texture_alpha = (is_54 and "clip" or true),
|
||||
-- has to be walkable for falling nodes to stop falling.
|
||||
walkable = true,
|
||||
pointable = false,
|
||||
@ -323,9 +320,6 @@ function doors.register(name, def)
|
||||
meta:set_int("state", state)
|
||||
|
||||
if def.protected then
|
||||
|
||||
local pn = placer:get_player_name()
|
||||
|
||||
meta:set_string("owner", pn)
|
||||
meta:set_string("infotext", "Owned by " .. pn)
|
||||
end
|
||||
@ -429,7 +423,6 @@ function doors.register(name, def)
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = "facedir"
|
||||
def.sunlight_propagates = true
|
||||
def.use_texture_alpha = def.use_texture_alpha or (is_54 and "clip" or true)
|
||||
def.walkable = true
|
||||
def.is_ground_content = false
|
||||
def.buildable_to = false
|
||||
@ -571,7 +564,6 @@ function doors.register_trapdoor(name, def)
|
||||
def.drawtype = "nodebox"
|
||||
def.paramtype = "light"
|
||||
def.paramtype2 = "facedir"
|
||||
def.use_texture_alpha = def.use_texture_alpha or (is_54 and "clip" or true)
|
||||
def.is_ground_content = false
|
||||
|
||||
if def.protected then
|
||||
|
@ -1,7 +1,6 @@
|
||||
-- minetest.clear_registered_biomes() -- do not regenerate, we want to combine it!
|
||||
|
||||
-- Get setting or default
|
||||
local is_54 = minetest.has_feature("direct_velocity_on_players") or false
|
||||
local mgv7 = minetest.get_mapgen_setting("mg_name") or nil
|
||||
local mgv7_spflags = minetest.get_mapgen_setting("mgv7_spflags") or "mountains, ridges, floatlands, caverns"
|
||||
local captures_float = string.match(mgv7_spflags, "floatlands")
|
||||
@ -71,7 +70,7 @@ minetest.register_node("floatland:sand_crystal_block", {
|
||||
paramtype = "light",
|
||||
paramtype2 = "glasslikeliquidlevel",
|
||||
param2 = 255,
|
||||
use_texture_alpha = (is_54 and "blend" or true),
|
||||
use_texture_alpha = "blend",
|
||||
sunlight_propagates = false,
|
||||
groups = {cracky = 2},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
flowers = {}
|
||||
|
||||
local is_54 = minetest.has_feature("direct_velocity_on_players") or false
|
||||
|
||||
-- Map Generation
|
||||
|
||||
@ -272,7 +271,6 @@ minetest.register_node("flowers:waterlily", {
|
||||
tiles = {"flowers_waterlily.png", "flowers_waterlily_bottom.png"},
|
||||
inventory_image = "flowers_waterlily.png",
|
||||
wield_image = "flowers_waterlily.png",
|
||||
use_texture_alpha = (is_54 and "clip" or true),
|
||||
liquids_pointable = true,
|
||||
walkable = false,
|
||||
buildable_to = true,
|
||||
|
@ -41,8 +41,9 @@ minetest.register_node("mobs:spawner", {
|
||||
end,
|
||||
|
||||
on_right_click = function(pos, placer)
|
||||
if placer and type(placer) == "userdata" then
|
||||
if minetest.is_protected(pos, placer:get_player_name()) then return end
|
||||
|
||||
if minetest.is_protected(pos, placer:get_player_name()) then
|
||||
return
|
||||
end
|
||||
end,
|
||||
|
||||
|
@ -376,4 +376,4 @@ mobs:register_egg("mobs_jam:balrog",
|
||||
|
||||
mobs:alias_mob("mobs_balrog:balrog", "mobs_jam:balrog")
|
||||
|
||||
print("[Mod] Mobs JAM (Balrog) loaded.")
|
||||
print("[Mod] Mobs Balrog (from mobs_jam) loaded.")
|
||||
|
@ -262,8 +262,8 @@ minetest.register_node(":mobs:egg", {
|
||||
},
|
||||
groups = {food_egg = 1, snappy = 2, dig_immediate = 3},
|
||||
after_place_node = function(pos, placer, itemstack)
|
||||
if placer then
|
||||
if placer:is_player() then minetest.set_node(pos, {name = "mobs:egg", param2 = 1}) end
|
||||
if placer:is_player() then
|
||||
minetest.set_node(pos, {name = "mobs:egg", param2 = 1})
|
||||
end
|
||||
end,
|
||||
on_use = mobs_shoot_egg
|
||||
|
@ -16,7 +16,6 @@ function place_spore(itemstack, placer, pointed_thing, name, topoint, soilblock)
|
||||
end
|
||||
|
||||
-- if not protected then add node and remove 1 item from the itemstack
|
||||
if not placer then return end
|
||||
if not minetest.is_protected(pt.under, placer:get_player_name()) then
|
||||
if (under.name == topoint) and (minetest.get_node(uu).name == soilblock) then
|
||||
minetest.set_node(uu, {name = name})
|
||||
|
@ -1,7 +1,6 @@
|
||||
-- Minetest 0.4 mod: stairs
|
||||
-- See README.txt for licensing and other information.
|
||||
|
||||
local is_54 = minetest.has_feature("direct_velocity_on_players") or false
|
||||
|
||||
-- Global namespace for functions
|
||||
|
||||
@ -71,7 +70,6 @@ function stairs.register_stair(subname, recipeitem, groups, images, description,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
use_texture_alpha = (is_54 and "clip" or true),
|
||||
groups = new_groups,
|
||||
sounds = sounds,
|
||||
selection_box = {
|
||||
@ -149,7 +147,6 @@ function stairs.register_slab(subname, recipeitem, groups, images, description,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
use_texture_alpha = (is_54 and "clip" or true),
|
||||
groups = new_groups,
|
||||
sounds = sounds,
|
||||
node_box = {
|
||||
|
@ -589,9 +589,9 @@ function tnt.register_tnt(def)
|
||||
groups = {dig_immediate = 2, mesecon = 2, tnt = 1, flammable = 5},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
after_place_node = function(pos, placer)
|
||||
if placer then
|
||||
if placer:is_player() then
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("owner", placer and placer:get_player_name() or "")
|
||||
meta:set_string("owner", placer:get_player_name())
|
||||
end
|
||||
end,
|
||||
on_punch = function(pos, node, puncher)
|
||||
|
@ -1,7 +1,6 @@
|
||||
local workbench = {}
|
||||
local nodes = {}
|
||||
|
||||
local is_54 = minetest.has_feature("direct_velocity_on_players") or false
|
||||
screwdriver = screwdriver or {}
|
||||
local min, ceil = math.min, math.ceil
|
||||
local S = xdecor.S
|
||||
@ -344,7 +343,7 @@ for i = 1, #nodes do
|
||||
drawtype = "nodebox",
|
||||
sounds = def.sounds,
|
||||
tiles = tiles,
|
||||
use_texture_alpha = def.use_texture_alpha or (is_54 and "clip" or true),
|
||||
use_texture_alpha = def.use_texture_alpha,
|
||||
groups = groups,
|
||||
-- `unpack` has been changed to `table.unpack` in newest Lua versions
|
||||
node_box = xdecor.pixelbox(16, {unpack(d, 3)}),
|
||||
|
@ -1,6 +1,4 @@
|
||||
|
||||
local is_54 = minetest.has_feature("direct_velocity_on_players") or false
|
||||
|
||||
local function is_pane(pos)
|
||||
return minetest.get_item_group(minetest.get_node(pos).name, "pane") > 0
|
||||
end
|
||||
@ -106,7 +104,6 @@ function xpanes.register_pane(name, def)
|
||||
groups = flatgroups,
|
||||
drop = "xpanes:" .. name .. "_flat",
|
||||
sounds = def.sounds,
|
||||
use_texture_alpha = def.use_texture_alpha or (is_54 and "opaque" or false),
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}},
|
||||
@ -131,7 +128,6 @@ function xpanes.register_pane(name, def)
|
||||
groups = groups,
|
||||
drop = "xpanes:" .. name .. "_flat",
|
||||
sounds = def.sounds,
|
||||
use_texture_alpha = def.use_texture_alpha or (is_54 and "opaque" or false),
|
||||
node_box = {
|
||||
type = "connected",
|
||||
fixed = {{-1/32, -1/2, -1/32, 1/32, 1/2, 1/32}},
|
||||
|
Loading…
x
Reference in New Issue
Block a user