develop #35
|
@ -529,12 +529,14 @@ armor.remove_all = function(self, player)
|
||||||
self:save_armor_inventory(player)
|
self:save_armor_inventory(player)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local skin_mod
|
||||||
|
|
||||||
armor.get_player_skin = function(self, name)
|
armor.get_player_skin = function(self, name)
|
||||||
if (self.skin_mod == "skins" or self.skin_mod == "simple_skins") and skins.skins[name] then
|
if (skin_mod == "skins" or skin_mod == "simple_skins") and skins.skins[name] then
|
||||||
return skins.skins[name]..".png"
|
return skins.skins[name]..".png"
|
||||||
elseif self.skin_mod == "u_skins" and u_skins.u_skins[name] then
|
elseif skin_mod == "u_skins" and u_skins.u_skins[name] then
|
||||||
return u_skins.u_skins[name]..".png"
|
return u_skins.u_skins[name]..".png"
|
||||||
elseif self.skin_mod == "wardrobe" and wardrobe.playerSkins and wardrobe.playerSkins[name] then
|
elseif skin_mod == "wardrobe" and wardrobe.playerSkins and wardrobe.playerSkins[name] then
|
||||||
return wardrobe.playerSkins[name]
|
return wardrobe.playerSkins[name]
|
||||||
end
|
end
|
||||||
return armor.default_skin..".png"
|
return armor.default_skin..".png"
|
||||||
|
@ -678,5 +680,5 @@ end
|
||||||
--
|
--
|
||||||
-- Useful for skin mod forks that do not use the same name.
|
-- Useful for skin mod forks that do not use the same name.
|
||||||
armor.set_skin_mod = function(mod)
|
armor.set_skin_mod = function(mod)
|
||||||
armor.skin_mod = mod
|
skin_mod = mod
|
||||||
end
|
end
|
||||||
|
|
|
@ -96,7 +96,7 @@ for _, mod in pairs(skin_mods) do
|
||||||
armor:add_preview(fn)
|
armor:add_preview(fn)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
armor.skin_mod = mod
|
armor.set_skin_mod(mod)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if not minetest.get_modpath("moreores") then
|
if not minetest.get_modpath("moreores") then
|
||||||
|
|
|
@ -11,6 +11,7 @@ local gui_count2 = {} --mapping of player names to a quantity (arbitrary strings
|
||||||
local gui_count3 = {} --mapping of player names to a quantity (arbitrary strings may also appear as values)
|
local gui_count3 = {} --mapping of player names to a quantity (arbitrary strings may also appear as values)
|
||||||
local gui_angle = {} --mapping of player names to an angle (one of 90, 180, 270, representing the angle in degrees clockwise)
|
local gui_angle = {} --mapping of player names to an angle (one of 90, 180, 270, representing the angle in degrees clockwise)
|
||||||
local gui_filename = {} --mapping of player names to file names
|
local gui_filename = {} --mapping of player names to file names
|
||||||
|
local gui_param2 = {} --mapping of player names to param2 values
|
||||||
|
|
||||||
--set default values
|
--set default values
|
||||||
setmetatable(gui_nodename1, {__index = function() return "Cobblestone" end})
|
setmetatable(gui_nodename1, {__index = function() return "Cobblestone" end})
|
||||||
|
@ -25,6 +26,7 @@ setmetatable(gui_count2, {__index = function() return "6" end})
|
||||||
setmetatable(gui_count3, {__index = function() return "4" end})
|
setmetatable(gui_count3, {__index = function() return "4" end})
|
||||||
setmetatable(gui_angle, {__index = function() return 90 end})
|
setmetatable(gui_angle, {__index = function() return 90 end})
|
||||||
setmetatable(gui_filename, {__index = function() return "building" end})
|
setmetatable(gui_filename, {__index = function() return "building" end})
|
||||||
|
setmetatable(gui_param2, {__index = function() return "0" end})
|
||||||
|
|
||||||
local axis_indices = {["X axis"]=1, ["Y axis"]=2, ["Z axis"]=3, ["Look direction"]=4}
|
local axis_indices = {["X axis"]=1, ["Y axis"]=2, ["Z axis"]=3, ["Look direction"]=4}
|
||||||
local axis_values = {"x", "y", "z", "?"}
|
local axis_values = {"x", "y", "z", "?"}
|
||||||
|
@ -904,3 +906,31 @@ worldedit.register_gui_function("worldedit_gui_clearobjects", {
|
||||||
execute_worldedit_command("clearobjects", name, "")
|
execute_worldedit_command("clearobjects", name, "")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
worldedit.register_gui_function("worldedit_gui_param2", {
|
||||||
|
name = "Set Param2",
|
||||||
|
privs = we_privs("param2"),
|
||||||
|
get_formspec = function(name)
|
||||||
|
local value = gui_param2[name] or "0"
|
||||||
|
return "size[6.5,3]" .. worldedit.get_formspec_header("worldedit_gui_param2") ..
|
||||||
|
"textarea[0.5,1;5,2;;;Some values may break the node!]"..
|
||||||
|
string.format("field[0.5,2.5;2,0.8;worldedit_gui_param2_value;New Param2;%s]", minetest.formspec_escape(value)) ..
|
||||||
|
"field_close_on_enter[worldedit_gui_param2_value;false]" ..
|
||||||
|
"button_exit[3.5,2.5;3,0.8;worldedit_gui_param2_submit;Set Param2]"
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
worldedit.register_gui_handler("worldedit_gui_param2", function(name, fields)
|
||||||
|
local cg = {
|
||||||
|
worldedit_gui_param2_value = gui_param2,
|
||||||
|
}
|
||||||
|
local ret = handle_changes(name, "worldedit_gui_param2", fields, cg)
|
||||||
|
if fields.worldedit_gui_param2_submit then
|
||||||
|
copy_changes(name, fields, cg)
|
||||||
|
worldedit.show_page(name, "worldedit_gui_param2")
|
||||||
|
|
||||||
|
execute_worldedit_command("param2", name, gui_param2[name])
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return ret
|
||||||
|
end)
|
||||||
|
|
|
@ -1,14 +1,290 @@
|
||||||
--couple.lua
|
--couple.lua
|
||||||
--defines couple entities.
|
--Handles coupling and discoupling of trains, and defines the coupling entities
|
||||||
|
--Rework June 2021 - some functions from trainlogic.lua have been moved here
|
||||||
|
|
||||||
--advtrains:discouple
|
-- COUPLING --
|
||||||
--set into existing trains to split them when punched.
|
-- During coupling rework, the behavior of coupling was changed to make automation easier. It is now as follows:
|
||||||
--they are attached to the wagons.
|
-- Coupling is only ever initiated when a train is standing somewhere (not moving) and another train drives onto one of its ends
|
||||||
--[[fields
|
-- with a speed greater than 0
|
||||||
wagon
|
-- "stationary" train is the one standing there - in old code called "train2"
|
||||||
|
-- "initiating" train is the one that approached it and bumped into it - typically an engine - in old code called "train1"
|
||||||
|
-- When the initiating train has autocouple set, trains are immediately coupled
|
||||||
|
-- When not, a couple entity is spawned and coupling commences on click
|
||||||
|
-- Coupling MUST preserve the train ID of the initiating train, so it is done like this:
|
||||||
|
-- initiating train is reversed
|
||||||
|
-- stationary train is reversed if required, so that it points towards the initiating train
|
||||||
|
-- do_connect_trains(initiating, stationary)
|
||||||
|
-- As a result, the coupled train is reversed in direction. Alternative way of doing things (might be considered later):
|
||||||
|
-- stationary train is reversed if required, so that it points away from the initiating train
|
||||||
|
-- index of initiating train is set so that it matches the front pos of stationary train
|
||||||
|
-- wagons of stationary train are inserted at the beginning of initiating train
|
||||||
|
-- remove stationary train
|
||||||
|
|
||||||
wagons keep their couple entity minetest-internal id inside the field discouple_id. if it refers to nowhere, they will spawn a new one if player is near
|
-- train.couple_* contain references to ObjectRefs of couple objects, which contain all relevant information
|
||||||
]]
|
-- These objectRefs will delete themselves once the couples no longer match (see below)
|
||||||
|
local function create_couple_entity(pos, train1, t1_is_front, train2, t2_is_front)
|
||||||
|
local id1 = train1.id
|
||||||
|
local id2 = train2.id
|
||||||
|
|
||||||
|
-- delete previous couple entities
|
||||||
|
if t1_is_front then
|
||||||
|
if train1.cpl_front then train1.cpl_front:remove() end
|
||||||
|
else
|
||||||
|
if train1.cpl_back then train1.cpl_back:remove() end
|
||||||
|
end
|
||||||
|
if t2_is_front then
|
||||||
|
if train2.cpl_front then train2.cpl_front:remove() end
|
||||||
|
else
|
||||||
|
if train2.cpl_back then train2.cpl_back:remove() end
|
||||||
|
end
|
||||||
|
|
||||||
|
local obj=minetest.add_entity(pos, "advtrains:couple")
|
||||||
|
if not obj then error("Failed creating couple object!") return end
|
||||||
|
local le=obj:get_luaentity()
|
||||||
|
le.train_id_1=id1
|
||||||
|
le.t1_is_front=t1_is_front
|
||||||
|
le.train_id_2=id2
|
||||||
|
le.t2_is_front=t2_is_front
|
||||||
|
--atdebug("created couple between",train1.id,train2.id,t2_is_front)
|
||||||
|
|
||||||
|
if t1_is_front then
|
||||||
|
train1.cpl_front = obj
|
||||||
|
else
|
||||||
|
train2.cpl_back = obj
|
||||||
|
end
|
||||||
|
if t2_is_front then
|
||||||
|
train2.cpl_front = obj
|
||||||
|
else
|
||||||
|
train2.cpl_back = obj
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Old static couple checking. Never used for autocouple, only used for standing trains if train did not approach
|
||||||
|
local CPL_CHK_DST = -1
|
||||||
|
local CPL_ZONE = 2
|
||||||
|
function advtrains.train_check_couples(train)
|
||||||
|
--atdebug("rechecking couples")
|
||||||
|
if train.cpl_front then
|
||||||
|
if not train.cpl_front:get_yaw() then
|
||||||
|
-- objectref is no longer valid. reset.
|
||||||
|
train.cpl_front = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not train.cpl_front then
|
||||||
|
-- recheck front couple
|
||||||
|
local front_trains, pos = advtrains.occ.get_occupations(train, atround(train.index) + CPL_CHK_DST)
|
||||||
|
if advtrains.is_node_loaded(pos) then -- if the position is loaded...
|
||||||
|
for tid, idx in pairs(front_trains) do
|
||||||
|
local other_train = advtrains.trains[tid]
|
||||||
|
if not advtrains.train_ensure_init(tid, other_train) then
|
||||||
|
atwarn("Train",tid,"is not initialized! Couldn't check couples!")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
--atdebug(train.id,"front: ",idx,"on",tid,atround(other_train.index),atround(other_train.end_index))
|
||||||
|
if other_train.velocity == 0 then
|
||||||
|
if idx>=other_train.index and idx<=other_train.index + CPL_ZONE then
|
||||||
|
create_couple_entity(pos, train, true, other_train, true)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
if idx<=other_train.end_index and idx>=other_train.end_index - CPL_ZONE then
|
||||||
|
create_couple_entity(pos, train, true, other_train, false)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if train.cpl_back then
|
||||||
|
if not train.cpl_back:get_yaw() then
|
||||||
|
-- objectref is no longer valid. reset.
|
||||||
|
train.cpl_back = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not train.cpl_back then
|
||||||
|
-- recheck back couple
|
||||||
|
local back_trains, pos = advtrains.occ.get_occupations(train, atround(train.end_index) - CPL_CHK_DST)
|
||||||
|
if advtrains.is_node_loaded(pos) then -- if the position is loaded...
|
||||||
|
for tid, idx in pairs(back_trains) do
|
||||||
|
local other_train = advtrains.trains[tid]
|
||||||
|
if not advtrains.train_ensure_init(tid, other_train) then
|
||||||
|
atwarn("Train",tid,"is not initialized! Couldn't check couples!")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
--atdebug(train.id,"back: ",idx,"on",tid,atround(other_train.index),atround(other_train.end_index))
|
||||||
|
if other_train.velocity == 0 then
|
||||||
|
if idx>=other_train.index and idx<=other_train.index + CPL_ZONE then
|
||||||
|
create_couple_entity(pos, train, false, other_train, true)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
if idx<=other_train.end_index and idx>=other_train.end_index - CPL_ZONE then
|
||||||
|
create_couple_entity(pos, train, false, other_train, false)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Deletes couple entities from the train
|
||||||
|
function advtrains.couple_invalidate(train)
|
||||||
|
if train.cpl_back then
|
||||||
|
train.cpl_back:remove()
|
||||||
|
train.cpl_back = nil
|
||||||
|
end
|
||||||
|
if train.cpl_front then
|
||||||
|
train.cpl_front:remove()
|
||||||
|
train.cpl_front = nil
|
||||||
|
end
|
||||||
|
train.couples_up_to_date = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Called from train_step_b() when the current train (init_train) just stopped at one of the end indices of another train (stat_train)
|
||||||
|
-- Depending on autocouple, either couples immediately or spawns a couple entity
|
||||||
|
function advtrains.couple_initiate_with(init_train, stat_train, stat_is_front)
|
||||||
|
--atdebug("Initiating couplign between init=",init_train.id,"stat=",stat_train.id,"backside=",stat_is_backside)
|
||||||
|
if init_train.autocouple then
|
||||||
|
advtrains.couple_trains(init_train, true, stat_train, stat_is_front)
|
||||||
|
else
|
||||||
|
local pos = advtrains.path_get_interpolated(init_train, init_train.index)
|
||||||
|
create_couple_entity(pos, init_train, true, stat_train, stat_is_front)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
-- check if the player has permission for the first/last wagon of the train
|
||||||
|
local function check_twagon_owner(train, b_first, pname)
|
||||||
|
local wtp = b_first and 1 or #train.trainparts
|
||||||
|
local wid = train.trainparts[wtp]
|
||||||
|
local wdata = advtrains.wagons[wid]
|
||||||
|
if wdata then
|
||||||
|
return advtrains.check_driving_couple_protection(pname, wdata.owner, wdata.whitelist)
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Perform coupling, but check if the player is authorized to couple
|
||||||
|
function advtrains.safe_couple_trains(train1, t1_is_front, train2, t2_is_front, pname)
|
||||||
|
|
||||||
|
if pname and not minetest.check_player_privs(pname, "train_operator") then
|
||||||
|
minetest.chat_send_player(pname, "Missing train_operator privilege")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local wck_t1, wck_t2
|
||||||
|
if pname then
|
||||||
|
wck_t1 = check_twagon_owner(train1, t1_is_front, pname)
|
||||||
|
wck_t2 = check_twagon_owner(train2, t2_is_front, pname)
|
||||||
|
end
|
||||||
|
if (wck_t1 or wck_t2) or not pname then
|
||||||
|
advtrains.couple_trains(train1, t1_is_front, train2, t2_is_front)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Actually performs the train coupling. Always retains train ID of train1
|
||||||
|
function advtrains.couple_trains(train1, t1_is_front, train2, t2_is_front)
|
||||||
|
--atdebug("Couple trains init=",init_train.id,"stat=",stat_train.id,"statreverse=",stat_must_reverse)
|
||||||
|
-- see comment on top of file
|
||||||
|
if t1_is_front then
|
||||||
|
advtrains.invert_train(train1.id)
|
||||||
|
end
|
||||||
|
if not t2_is_front then
|
||||||
|
advtrains.invert_train(train2.id)
|
||||||
|
end
|
||||||
|
|
||||||
|
advtrains.do_connect_trains(train1, train2)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Adds the wagons of first to second and deletes second_id afterwards
|
||||||
|
-- Assumes that second_id stands right behind first_id and both trains point to the same direction
|
||||||
|
function advtrains.do_connect_trains(first, second)
|
||||||
|
|
||||||
|
if not advtrains.train_ensure_init(first.id, first) then
|
||||||
|
atwarn("Coupling: first train",first.id,"is not initialized! Operation aborted!")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if not advtrains.train_ensure_init(second.id, second) then
|
||||||
|
atwarn("Coupling: second train",second.id,"is not initialized! Operation aborted!")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local first_wagoncnt=#first.trainparts
|
||||||
|
local second_wagoncnt=#second.trainparts
|
||||||
|
|
||||||
|
for _,v in ipairs(second.trainparts) do
|
||||||
|
table.insert(first.trainparts, v)
|
||||||
|
end
|
||||||
|
|
||||||
|
advtrains.remove_train(second.id)
|
||||||
|
|
||||||
|
first.velocity = 0
|
||||||
|
|
||||||
|
advtrains.update_trainpart_properties(first.id)
|
||||||
|
advtrains.couple_invalidate(first)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- DECOUPLING --
|
||||||
|
function advtrains.split_train_at_fc(train, count_empty, length_limit)
|
||||||
|
-- splits train at first different current FC by convention,
|
||||||
|
-- locomotives have empty FC so are ignored
|
||||||
|
-- count_empty is used to split off locomotives
|
||||||
|
-- length_limit limits the length of the first train to length_limit wagons
|
||||||
|
local train_id = train.id
|
||||||
|
local fc = false
|
||||||
|
local ind = 0
|
||||||
|
for i = 1, #train.trainparts do
|
||||||
|
local w_id = train.trainparts[i]
|
||||||
|
local data = advtrains.wagons[w_id]
|
||||||
|
if length_limit and i > length_limit then
|
||||||
|
ind = i
|
||||||
|
break
|
||||||
|
end
|
||||||
|
if data then
|
||||||
|
local wfc = advtrains.get_cur_fc(data)
|
||||||
|
if wfc ~= "" or count_empty then
|
||||||
|
if fc then
|
||||||
|
if fc ~= wfc then
|
||||||
|
ind = i
|
||||||
|
break
|
||||||
|
end
|
||||||
|
else
|
||||||
|
fc = wfc
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if ind > 0 then
|
||||||
|
return advtrains.split_train_at_index(train, ind), fc
|
||||||
|
end
|
||||||
|
if fc then
|
||||||
|
return nil, fc
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function advtrains.train_step_fc(train)
|
||||||
|
for i=1,#train.trainparts do
|
||||||
|
local w_id = train.trainparts[i]
|
||||||
|
local data = advtrains.wagons[w_id]
|
||||||
|
if data then
|
||||||
|
advtrains.step_fc(data)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- split_train_at_index() is in trainlogic.lua because it needs access to two local functions
|
||||||
|
|
||||||
|
function advtrains.split_train_at_wagon(wagon_id)
|
||||||
|
--get train
|
||||||
|
local data = advtrains.wagons[wagon_id]
|
||||||
|
advtrains.split_train_at_index(advtrains.trains[data.train_id], data.pos_in_trainparts)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- COUPLE ENTITIES --
|
||||||
|
|
||||||
local couple_max_dist=3
|
local couple_max_dist=3
|
||||||
|
|
||||||
|
@ -36,8 +312,6 @@ minetest.register_entity("advtrains:discouple", {
|
||||||
if pname and pname~="" and self.wagon then
|
if pname and pname~="" and self.wagon then
|
||||||
if advtrains.safe_decouple_wagon(self.wagon.id, pname) then
|
if advtrains.safe_decouple_wagon(self.wagon.id, pname) then
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
else
|
|
||||||
minetest.add_entity(self.object:getpos(), "advtrains:lockmarker")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
@ -60,10 +334,6 @@ minetest.register_entity("advtrains:discouple", {
|
||||||
|
|
||||||
-- advtrains:couple
|
-- advtrains:couple
|
||||||
-- Couple entity
|
-- Couple entity
|
||||||
local function lockmarker(obj)
|
|
||||||
minetest.add_entity(obj:get_pos(), "advtrains:lockmarker")
|
|
||||||
obj:remove()
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_entity("advtrains:couple", {
|
minetest.register_entity("advtrains:couple", {
|
||||||
visual="sprite",
|
visual="sprite",
|
||||||
|
@ -75,107 +345,71 @@ minetest.register_entity("advtrains:couple", {
|
||||||
is_couple=true,
|
is_couple=true,
|
||||||
static_save = false,
|
static_save = false,
|
||||||
on_activate=function(self, staticdata)
|
on_activate=function(self, staticdata)
|
||||||
if staticdata=="COUPLE" then
|
if staticdata=="COUPLE" then
|
||||||
--couple entities have no right to exist further...
|
--couple entities have no right to exist further...
|
||||||
atprint("Couple loaded from staticdata, destroying")
|
--atdebug("Couple loaded from staticdata, destroying")
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self.object:set_armor_groups({immmortal=1})
|
self.object:set_armor_groups({immmortal=1})
|
||||||
end,
|
end,
|
||||||
get_staticdata=function(self) return "COUPLE" end,
|
get_staticdata=function(self) return "COUPLE" end,
|
||||||
on_rightclick=function(self, clicker)
|
on_rightclick=function(self, clicker)
|
||||||
if not self.train_id_1 or not self.train_id_2 then return end
|
if not self.train_id_1 or not self.train_id_2 then return end
|
||||||
|
|
||||||
local pname=clicker
|
|
||||||
if type(clicker)~="string" then pname=clicker:get_player_name() end
|
|
||||||
|
|
||||||
if advtrains.safe_couple_trains(self.train_id_1, self.train_id_2, self.t1_is_front, self.t2_is_front, pname) then
|
|
||||||
self.object:remove()
|
|
||||||
else
|
|
||||||
lockmarker(self.object)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
on_step=function(self, dtime)
|
|
||||||
if advtrains.wagon_outside_range(self.object:getpos()) then
|
|
||||||
self.object:remove()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if not self.train_id_1 or not self.train_id_2 then atprint("Couple: train ids not set!") self.object:remove() return end
|
local pname=clicker
|
||||||
local train1=advtrains.trains[self.train_id_1]
|
if type(clicker)~="string" then pname=clicker:get_player_name() end
|
||||||
local train2=advtrains.trains[self.train_id_2]
|
|
||||||
if not train1 or not train2 then
|
local train1=advtrains.trains[self.train_id_1]
|
||||||
atprint("Couple: trains missing, destroying")
|
local train2=advtrains.trains[self.train_id_2]
|
||||||
self.object:remove()
|
|
||||||
return
|
advtrains.safe_couple_trains(train1, self.t1_is_front, train2, self.t2_is_front, pname)
|
||||||
end
|
self.object:remove()
|
||||||
|
|
||||||
--shh, silence here, this is an on-step callback!
|
|
||||||
if not advtrains.train_ensure_init(self.train_id_1, train1) then
|
|
||||||
--atwarn("Train",self.train_id_1,"is not initialized! Operation aborted!")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if not advtrains.train_ensure_init(self.train_id_2, train2) then
|
|
||||||
--atwarn("Train",self.train_id_2,"is not initialized! Operation aborted!")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if train1.velocity>0 or train2.velocity>0 then
|
|
||||||
if not self.position_set then --ensures that train stands a single time before check fires. Using flag below
|
|
||||||
return
|
|
||||||
end
|
|
||||||
atprint("Couple: train is moving, destroying")
|
|
||||||
self.object:remove()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if not self.position_set then
|
|
||||||
local tp1
|
|
||||||
if self.t1_is_front then
|
|
||||||
tp1=advtrains.path_get_interpolated(train1, train1.index)
|
|
||||||
else
|
|
||||||
tp1=advtrains.path_get_interpolated(train1, train1.end_index)
|
|
||||||
end
|
|
||||||
local tp2
|
|
||||||
if self.t2_is_front then
|
|
||||||
tp2=advtrains.path_get_interpolated(train2, train2.index)
|
|
||||||
else
|
|
||||||
tp2=advtrains.path_get_interpolated(train2, train2.end_index)
|
|
||||||
end
|
|
||||||
local pos_median=advtrains.pos_median(tp1, tp2)
|
|
||||||
if not vector.equals(pos_median, self.object:getpos()) then
|
|
||||||
self.object:set_pos(pos_median)
|
|
||||||
end
|
|
||||||
self.position_set=true
|
|
||||||
end
|
|
||||||
advtrains.atprint_context_tid=nil
|
|
||||||
end,
|
end,
|
||||||
})
|
|
||||||
minetest.register_entity("advtrains:lockmarker", {
|
|
||||||
visual="sprite",
|
|
||||||
textures = {"advtrains_cpl_lock.png"},
|
|
||||||
collisionbox = {-0.3,-0.3,-0.3, 0.3,0.3,0.3},
|
|
||||||
visual_size = {x=0.7, y=0.7},
|
|
||||||
initial_sprite_basepos = {x=0, y=0},
|
|
||||||
|
|
||||||
is_lockmarker=true,
|
|
||||||
static_save = false,
|
|
||||||
on_activate=function(self, staticdata)
|
|
||||||
if staticdata=="COUPLE" then
|
|
||||||
--couple entities have no right to exist further...
|
|
||||||
atprint("Couple loaded from staticdata, destroying")
|
|
||||||
self.object:remove()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
self.object:set_armor_groups({immmortal=1})
|
|
||||||
self.life=5
|
|
||||||
end,
|
|
||||||
get_staticdata=function(self) return "COUPLE" end,
|
|
||||||
on_step=function(self, dtime)
|
on_step=function(self, dtime)
|
||||||
self.life=(self.life or 5)-dtime
|
if advtrains.wagon_outside_range(self.object:getpos()) then
|
||||||
if self.life<0 then
|
--atdebug("Couple Removing outside range")
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if not self.train_id_1 or not self.train_id_2 then
|
||||||
|
--atdebug("Couple Removing ids missing")
|
||||||
|
self.object:remove()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local train1=advtrains.trains[self.train_id_1]
|
||||||
|
local train2=advtrains.trains[self.train_id_2]
|
||||||
|
if not train1 or not train2 then
|
||||||
|
--atdebug("Couple Removing trains missing")
|
||||||
|
self.object:remove()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.position_set and train1.velocity>0 or train2.velocity>0 then
|
||||||
|
--atdebug("Couple: train is moving, destroying")
|
||||||
|
self.object:remove()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if not self.position_set then
|
||||||
|
local tp1
|
||||||
|
if self.t1_is_front then
|
||||||
|
tp1=advtrains.path_get_interpolated(train1, train1.index)
|
||||||
|
else
|
||||||
|
tp1=advtrains.path_get_interpolated(train1, train1.end_index)
|
||||||
|
end
|
||||||
|
local tp2
|
||||||
|
if self.t2_is_front then
|
||||||
|
tp2=advtrains.path_get_interpolated(train2, train2.index)
|
||||||
|
else
|
||||||
|
tp2=advtrains.path_get_interpolated(train2, train2.end_index)
|
||||||
|
end
|
||||||
|
local pos_median=advtrains.pos_median(tp1, tp2)
|
||||||
|
if not vector.equals(pos_median, self.object:getpos()) then
|
||||||
|
self.object:set_pos(pos_median)
|
||||||
|
end
|
||||||
|
self.position_set=true
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -569,11 +569,13 @@ advtrains.mainloop_runcnt=0
|
||||||
advtrains.global_slowdown = 1
|
advtrains.global_slowdown = 1
|
||||||
|
|
||||||
local t = 0
|
local t = 0
|
||||||
|
local within_mainstep = false
|
||||||
minetest.register_globalstep(function(dtime_mt)
|
minetest.register_globalstep(function(dtime_mt)
|
||||||
if no_action then
|
if no_action then
|
||||||
-- the advtrains globalstep is skipped by command. Return immediately
|
-- the advtrains globalstep is skipped by command. Return immediately
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
within_mainstep = true
|
||||||
|
|
||||||
advtrains.mainloop_runcnt=advtrains.mainloop_runcnt+1
|
advtrains.mainloop_runcnt=advtrains.mainloop_runcnt+1
|
||||||
--atprint("Running the main loop, runcnt",advtrains.mainloop_runcnt)
|
--atprint("Running the main loop, runcnt",advtrains.mainloop_runcnt)
|
||||||
|
@ -586,6 +588,7 @@ minetest.register_globalstep(function(dtime_mt)
|
||||||
if GENERATE_ATRICIFIAL_LAG then
|
if GENERATE_ATRICIFIAL_LAG then
|
||||||
dtime = HOW_MANY_LAG
|
dtime = HOW_MANY_LAG
|
||||||
if os.clock()<t then
|
if os.clock()<t then
|
||||||
|
within_mainstep = false
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -616,7 +619,7 @@ minetest.register_globalstep(function(dtime_mt)
|
||||||
if advtrains.lines then
|
if advtrains.lines then
|
||||||
advtrains.lines.step(dtime)
|
advtrains.lines.step(dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
--trigger a save when necessary
|
--trigger a save when necessary
|
||||||
save_timer=save_timer-dtime
|
save_timer=save_timer-dtime
|
||||||
if save_timer<=0 then
|
if save_timer<=0 then
|
||||||
|
@ -626,6 +629,9 @@ minetest.register_globalstep(function(dtime_mt)
|
||||||
save_timer = advtrains.SAVE_INTERVAL
|
save_timer = advtrains.SAVE_INTERVAL
|
||||||
atprintbm("saving", t)
|
atprintbm("saving", t)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
within_mainstep = false
|
||||||
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
--if something goes wrong in these functions, there is no help. no pcall here.
|
--if something goes wrong in these functions, there is no help. no pcall here.
|
||||||
|
@ -678,7 +684,13 @@ function advtrains.save(remove_players_from_wagons)
|
||||||
--TODO very simple yet hacky workaround for the "green signals" bug
|
--TODO very simple yet hacky workaround for the "green signals" bug
|
||||||
advtrains.invalidate_all_paths()
|
advtrains.invalidate_all_paths()
|
||||||
end
|
end
|
||||||
minetest.register_on_shutdown(advtrains.save)
|
minetest.register_on_shutdown(function()
|
||||||
|
if within_mainstep then
|
||||||
|
atwarn("Crash during advtrains main step - skipping the shutdown save operation to not save inconsistent data!")
|
||||||
|
else
|
||||||
|
advtrains.save()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
-- This chat command provides a solution to the problem known on the LinuxWorks server
|
-- This chat command provides a solution to the problem known on the LinuxWorks server
|
||||||
-- There are many players that joined a single time, got on a train and then left forever
|
-- There are many players that joined a single time, got on a train and then left forever
|
||||||
|
|
|
@ -417,3 +417,42 @@ function advtrains.path_lookup(train, pos)
|
||||||
end
|
end
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Projects the path of "train" onto the path of "onto_train_id", and returns the index on onto_train's path
|
||||||
|
-- that corresponds to "index" on "train"'s path, as well as whether both trains face each other
|
||||||
|
-- index may be fractional
|
||||||
|
-- returns: res_index, trains_facing
|
||||||
|
-- returns nil when path can not be projected, either because trains are on different tracks or
|
||||||
|
-- node at "index" happens to be on a turnout and it's the wrong direction
|
||||||
|
-- Note - duplicate with similar functionality is in train_step_b() - that code combines train detection with projecting
|
||||||
|
function advtrains.path_project(train, index, onto_train_id)
|
||||||
|
local base_idx = atfloor(index)
|
||||||
|
local frac_part = index - base_idx
|
||||||
|
local base_pos = advtrains.path_get(train, base_idx)
|
||||||
|
local base_cn = train.path_cn[base_idx]
|
||||||
|
local otrn = advtrains.trains[onto_train_id]
|
||||||
|
-- query occupation
|
||||||
|
local occ = advtrains.occ.get_trains_over(base_pos)
|
||||||
|
-- is wanted train id contained?
|
||||||
|
local ob_idx = occ[onto_train_id]
|
||||||
|
if not ob_idx then
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- retrieve other train's cn and cp
|
||||||
|
local ocn = otrn.path_cn[ob_idx]
|
||||||
|
local ocp = otrn.path_cp[ob_idx]
|
||||||
|
|
||||||
|
if base_cn == ocn then
|
||||||
|
-- same direction
|
||||||
|
return ob_idx + frac_part, false
|
||||||
|
elseif base_cn == ocp then
|
||||||
|
-- facing trains - subtract index frac
|
||||||
|
return ob_idx - frac_part, true
|
||||||
|
else
|
||||||
|
-- same path item but no common connections - deny
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -56,3 +56,8 @@ advtrains_dtime_limit (DTime Limit for slow-down) float 0.2 0 5
|
||||||
# Time interval in seconds in which advtrains stores its save data to disk
|
# Time interval in seconds in which advtrains stores its save data to disk
|
||||||
# Nevertheless, advtrains saves all data when shutting down the server.
|
# Nevertheless, advtrains saves all data when shutting down the server.
|
||||||
advtrains_save_interval (Save Interval) int 60 20 3600
|
advtrains_save_interval (Save Interval) int 60 20 3600
|
||||||
|
|
||||||
|
# Enable forgiving collision mode
|
||||||
|
# If enabled, trains only collide with nodes with "normal" drawtype.
|
||||||
|
advtrains_forgiving_collision (Forgiving Collision mode) bool false
|
||||||
|
|
||||||
|
|
|
@ -139,6 +139,7 @@ minetest.register_on_joinplayer(function(player)
|
||||||
advtrains.hhud[player:get_player_name()] = nil
|
advtrains.hhud[player:get_player_name()] = nil
|
||||||
--independent of this, cause all wagons of the train which are loaded to reattach their players
|
--independent of this, cause all wagons of the train which are loaded to reattach their players
|
||||||
--needed because already loaded wagons won't call reattach_all()
|
--needed because already loaded wagons won't call reattach_all()
|
||||||
|
local pname = player:get_player_name()
|
||||||
local id=advtrains.player_to_train_mapping[pname]
|
local id=advtrains.player_to_train_mapping[pname]
|
||||||
if id then
|
if id then
|
||||||
for _,wagon in pairs(minetest.luaentities) do
|
for _,wagon in pairs(minetest.luaentities) do
|
||||||
|
@ -394,7 +395,7 @@ function advtrains.train_step_b(id, train, dtime)
|
||||||
local back_off_track=train.end_index<train.path_trk_b
|
local back_off_track=train.end_index<train.path_trk_b
|
||||||
train.off_track = front_off_track or back_off_track
|
train.off_track = front_off_track or back_off_track
|
||||||
|
|
||||||
if back_off_track and (not v_cap or v_cap > 1) then
|
if back_off_track and (not sit_v_cap or sit_v_cap > 1) then
|
||||||
--atprint("in train_step_b: applying back_off_track")
|
--atprint("in train_step_b: applying back_off_track")
|
||||||
sit_v_cap = 1
|
sit_v_cap = 1
|
||||||
elseif front_off_track then
|
elseif front_off_track then
|
||||||
|
@ -587,12 +588,76 @@ function advtrains.train_step_b(id, train, dtime)
|
||||||
else
|
else
|
||||||
--atprint("in train_step_b: movement calculation reusing from LZB newindex=",new_index_curr_tv)
|
--atprint("in train_step_b: movement calculation reusing from LZB newindex=",new_index_curr_tv)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- if the zeroappr mechanism has hit, go no further than zeroappr index
|
-- if the zeroappr mechanism has hit, go no further than zeroappr index
|
||||||
if lzb_next_zero_barrier and new_index_curr_tv > lzb_next_zero_barrier then
|
if lzb_next_zero_barrier and new_index_curr_tv > lzb_next_zero_barrier then
|
||||||
--atprint("in train_step_b: Zero barrier hit, clipping to newidx_tv=",new_index_curr_tv, "zb_idx=",lzb_next_zero_barrier)
|
--atprint("in train_step_b: Zero barrier hit, clipping to newidx_tv=",new_index_curr_tv, "zb_idx=",lzb_next_zero_barrier)
|
||||||
new_index_curr_tv = lzb_next_zero_barrier
|
new_index_curr_tv = lzb_next_zero_barrier
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- New same-track collision system - check for any other trains within the range we're going to move
|
||||||
|
-- do the checks if we either are moving or about to start moving
|
||||||
|
if new_index_curr_tv > train.index or accelerating then -- only if train is actually advancing
|
||||||
|
-- Note: duplicate code from path_project() because of subtle differences: no frac processing and scanning all occupations
|
||||||
|
--[[train.debug = ""
|
||||||
|
local atdebug = function(t, ...)
|
||||||
|
local text=advtrains.print_concat_table({t, ...})
|
||||||
|
train.debug = train.debug..text.."\n"
|
||||||
|
end]]
|
||||||
|
local base_idx = atfloor(new_index_curr_tv + 1)
|
||||||
|
local base_pos = advtrains.path_get(train, base_idx)
|
||||||
|
local base_cn = train.path_cn[base_idx]
|
||||||
|
--atdebug(id,"Begin Checking for on-track collisions new_idx=",new_index_curr_tv,"base_idx=",base_idx,"base_pos=",base_pos,"base_cn=",base_cn)
|
||||||
|
-- query occupation
|
||||||
|
local occ = advtrains.occ.get_trains_over(base_pos)
|
||||||
|
-- iterate other trains
|
||||||
|
for otid, ob_idx in pairs(occ) do
|
||||||
|
if otid ~= id then
|
||||||
|
--atdebug(id,"Found other train",otid," with matching index ",ob_idx)
|
||||||
|
-- Phase 1 - determine if trains are facing and which is the relefant stpo index
|
||||||
|
local otrn = advtrains.trains[otid]
|
||||||
|
|
||||||
|
-- retrieve other train's cn and cp
|
||||||
|
local ocn = otrn.path_cn[ob_idx]
|
||||||
|
local ocp = otrn.path_cp[ob_idx]
|
||||||
|
|
||||||
|
local target_is_inside, ref_index, facing
|
||||||
|
|
||||||
|
if base_cn == ocn then
|
||||||
|
-- same direction
|
||||||
|
ref_index = otrn.end_index
|
||||||
|
same_dir = true
|
||||||
|
target_is_inside = (ob_idx >= ref_index)
|
||||||
|
--atdebug("Same direction: ref_index",ref_index,"inside=",target_is_inside)
|
||||||
|
elseif base_cn == ocp then
|
||||||
|
-- facing trains - subtract index frac
|
||||||
|
ref_index = otrn.index
|
||||||
|
same_dir = false
|
||||||
|
target_is_inside = (ob_idx <= ref_index)
|
||||||
|
--atdebug("Facing direction: ref_index",ref_index,"inside=",target_is_inside)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Phase 2 - project ref_index back onto our path and check again (necessary because there might be a turnout on the way and we are driving into the flank
|
||||||
|
if target_is_inside then
|
||||||
|
local our_index = advtrains.path_project(otrn, ref_index, id)
|
||||||
|
--atdebug("Backprojected our_index",our_index)
|
||||||
|
if our_index and our_index <= new_index_curr_tv then
|
||||||
|
-- ON_TRACK COLLISION IS HAPPENING
|
||||||
|
-- the actual collision is handled in train_step_c, so set appropriate signal variables
|
||||||
|
train.ontrack_collision_info = {
|
||||||
|
otid = otid,
|
||||||
|
same_dir = same_dir,
|
||||||
|
}
|
||||||
|
-- clip newindex
|
||||||
|
--atdebug("-- Collision detected!")
|
||||||
|
new_index_curr_tv = our_index
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- ## Movement happens here ##
|
||||||
train.index = new_index_curr_tv
|
train.index = new_index_curr_tv
|
||||||
|
|
||||||
recalc_end_index(train)
|
recalc_end_index(train)
|
||||||
|
@ -638,21 +703,42 @@ function advtrains.train_step_c(id, train, dtime)
|
||||||
advtrains.spawn_wagons(id)
|
advtrains.spawn_wagons(id)
|
||||||
train.check_trainpartload=2
|
train.check_trainpartload=2
|
||||||
end
|
end
|
||||||
|
|
||||||
--- 8. check for collisions with other trains and damage players ---
|
|
||||||
|
|
||||||
local train_moves=(train.velocity~=0)
|
local train_moves=(train.velocity~=0)
|
||||||
|
local very_short_train = train.trainlen < 3
|
||||||
--- Check whether this train can be coupled to another, and set couple entities accordingly
|
|
||||||
if not train.was_standing and not train_moves then
|
--- On-track collision handling - detected in train_step_b, but handled here so all other train movements have already happened.
|
||||||
advtrains.train_check_couples(train)
|
if train.ontrack_collision_info then
|
||||||
|
train.velocity = 0
|
||||||
|
train.acceleration = 0
|
||||||
|
advtrains.atc.train_reset_command(train)
|
||||||
|
|
||||||
|
local otrn = advtrains.trains[train.ontrack_collision_info.otid]
|
||||||
|
|
||||||
|
if otrn.velocity == 0 then -- other train must be standing, else don't initiate coupling
|
||||||
|
advtrains.couple_initiate_with(train, otrn, not train.ontrack_collision_info.same_dir)
|
||||||
|
end
|
||||||
|
|
||||||
|
train.ontrack_collision_info = nil
|
||||||
|
train.couples_up_to_date = true
|
||||||
end
|
end
|
||||||
train.was_standing = not train_moves
|
|
||||||
|
-- handle couples if on_track collision handling did not fire
|
||||||
if train_moves then
|
if train_moves then
|
||||||
|
train.couples_up_to_date = nil
|
||||||
|
elseif not train.couples_up_to_date then
|
||||||
|
if not very_short_train then -- old coupling system is buggy for short trains
|
||||||
|
advtrains.train_check_couples(train) -- no guarantee for train order here
|
||||||
|
end
|
||||||
|
train.couples_up_to_date = true
|
||||||
|
end
|
||||||
|
|
||||||
|
--- 8. check for collisions with other trains and damage players ---
|
||||||
|
if train_moves then
|
||||||
|
-- Note: this code handles collisions with trains that are not on the same path as the current train
|
||||||
|
-- The same-track collisions and coupling handling is found in couple.lua and handled from train_step_b() and code 2 blocks above.
|
||||||
local collided = false
|
local collided = false
|
||||||
local coll_grace=1
|
local coll_grace=2
|
||||||
local collindex = advtrains.path_get_index_by_offset(train, train.index, -coll_grace)
|
local collindex = advtrains.path_get_index_by_offset(train, train.index, -coll_grace)
|
||||||
local collpos = advtrains.path_get(train, atround(collindex))
|
local collpos = advtrains.path_get(train, atround(collindex))
|
||||||
if collpos then
|
if collpos then
|
||||||
|
@ -663,13 +749,14 @@ function advtrains.train_step_c(id, train, dtime)
|
||||||
local testpos=vector.add(rcollpos, {x=x, y=0, z=z})
|
local testpos=vector.add(rcollpos, {x=x, y=0, z=z})
|
||||||
--- 8a Check collision ---
|
--- 8a Check collision ---
|
||||||
if not collided then
|
if not collided then
|
||||||
|
if not very_short_train then -- position collision system is buggy for short trains
|
||||||
local col_tr = advtrains.occ.check_collision(testpos, id)
|
local col_tr = advtrains.occ.check_collision(testpos, id)
|
||||||
if col_tr then
|
if col_tr then
|
||||||
advtrains.train_check_couples(train)
|
train.velocity = 0
|
||||||
train.velocity = 0
|
train.acceleration = 0
|
||||||
advtrains.atc.train_reset_command(train)
|
advtrains.atc.train_reset_command(train)
|
||||||
collided = true
|
collided = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- 8b damage players ---
|
--- 8b damage players ---
|
||||||
|
@ -703,7 +790,7 @@ function advtrains.train_step_c(id, train, dtime)
|
||||||
local objs = minetest.get_objects_inside_radius(rcollpos, 2)
|
local objs = minetest.get_objects_inside_radius(rcollpos, 2)
|
||||||
for _,obj in ipairs(objs) do
|
for _,obj in ipairs(objs) do
|
||||||
if not obj:is_player() and obj:get_armor_groups().fleshy and obj:get_armor_groups().fleshy > 0
|
if not obj:is_player() and obj:get_armor_groups().fleshy and obj:get_armor_groups().fleshy > 0
|
||||||
and obj:get_luaentity() and obj:get_luaentity().name~="signs:text" then
|
and obj:get_luaentity() and obj:get_luaentity().name~="signs_lib:text" then
|
||||||
obj:punch(obj, 1, { full_punch_interval = 1.0, damage_groups = {fleshy = 1000}, }, nil)
|
obj:punch(obj, 1, { full_punch_interval = 1.0, damage_groups = {fleshy = 1000}, }, nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -899,7 +986,7 @@ function advtrains.remove_train(id)
|
||||||
|
|
||||||
run_callbacks_remove(id, train)
|
run_callbacks_remove(id, train)
|
||||||
|
|
||||||
advtrains.path_invalidate(train)
|
advtrains.path_invalidate(train, true)
|
||||||
advtrains.couple_invalidate(train)
|
advtrains.couple_invalidate(train)
|
||||||
|
|
||||||
local tp = train.trainparts
|
local tp = train.trainparts
|
||||||
|
@ -1019,53 +1106,6 @@ function advtrains.spawn_wagons(train_id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function advtrains.split_train_at_fc(train, count_empty, length_limit)
|
|
||||||
-- splits train at first different current FC by convention,
|
|
||||||
-- locomotives have empty FC so are ignored
|
|
||||||
-- count_empty is used to split off locomotives
|
|
||||||
-- length_limit limits the length of the first train to length_limit wagons
|
|
||||||
local train_id = train.id
|
|
||||||
local fc = false
|
|
||||||
local ind = 0
|
|
||||||
for i = 1, #train.trainparts do
|
|
||||||
local w_id = train.trainparts[i]
|
|
||||||
local data = advtrains.wagons[w_id]
|
|
||||||
if length_limit and i > length_limit then
|
|
||||||
ind = i
|
|
||||||
break
|
|
||||||
end
|
|
||||||
if data then
|
|
||||||
local wfc = advtrains.get_cur_fc(data)
|
|
||||||
if wfc ~= "" or count_empty then
|
|
||||||
if fc then
|
|
||||||
if fc ~= wfc then
|
|
||||||
ind = i
|
|
||||||
break
|
|
||||||
end
|
|
||||||
else
|
|
||||||
fc = wfc
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if ind > 0 then
|
|
||||||
return advtrains.split_train_at_index(train, ind), fc
|
|
||||||
end
|
|
||||||
if fc then
|
|
||||||
return nil, fc
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function advtrains.train_step_fc(train)
|
|
||||||
for i=1,#train.trainparts do
|
|
||||||
local w_id = train.trainparts[i]
|
|
||||||
local data = advtrains.wagons[w_id]
|
|
||||||
if data then
|
|
||||||
advtrains.step_fc(data)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function advtrains.split_train_at_index(train, index)
|
function advtrains.split_train_at_index(train, index)
|
||||||
-- this function splits a train at index, creating a new train from the back part of the train.
|
-- this function splits a train at index, creating a new train from the back part of the train.
|
||||||
|
|
||||||
|
@ -1121,167 +1161,6 @@ function advtrains.split_train_at_index(train, index)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function advtrains.split_train_at_wagon(wagon_id)
|
|
||||||
--get train
|
|
||||||
local data = advtrains.wagons[wagon_id]
|
|
||||||
advtrains.split_train_at_index(advtrains.trains[data.train_id], data.pos_in_trainparts)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- coupling
|
|
||||||
local CPL_CHK_DST = -1
|
|
||||||
local CPL_ZONE = 2
|
|
||||||
|
|
||||||
-- train.couple_* contain references to ObjectRefs of couple objects, which contain all relevant information
|
|
||||||
-- These objectRefs will delete themselves once the couples no longer match
|
|
||||||
local function createcouple(pos, train1, t1_is_front, train2, t2_is_front)
|
|
||||||
local id1 = train1.id
|
|
||||||
local id2 = train2.id
|
|
||||||
if train1.autocouple or train2.autocouple then
|
|
||||||
-- couple trains
|
|
||||||
train1.autocouple = nil
|
|
||||||
train2.autocouple = nil
|
|
||||||
minetest.after(0, advtrains.safe_couple_trains, id1, id2, t1_is_front, t2_is_front, false, false, train1.velocity, train2.velocity)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local obj=minetest.add_entity(pos, "advtrains:couple")
|
|
||||||
if not obj then error("Failed creating couple object!") return end
|
|
||||||
local le=obj:get_luaentity()
|
|
||||||
le.train_id_1=id1
|
|
||||||
le.train_id_2=id2
|
|
||||||
le.t1_is_front=t1_is_front
|
|
||||||
le.t2_is_front=t2_is_front
|
|
||||||
--atdebug("created couple between",train1.id,t1_is_front,train2.id,t2_is_front)
|
|
||||||
if t1_is_front then
|
|
||||||
train1.cpl_front = obj
|
|
||||||
else
|
|
||||||
train1.cpl_back = obj
|
|
||||||
end
|
|
||||||
if t2_is_front then
|
|
||||||
train2.cpl_front = obj
|
|
||||||
else
|
|
||||||
train2.cpl_back = obj
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
function advtrains.train_check_couples(train)
|
|
||||||
--atdebug("rechecking couples")
|
|
||||||
if train.cpl_front then
|
|
||||||
if not train.cpl_front:get_yaw() then
|
|
||||||
-- objectref is no longer valid. reset.
|
|
||||||
train.cpl_front = nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if not train.cpl_front then
|
|
||||||
-- recheck front couple
|
|
||||||
local front_trains, pos = advtrains.occ.get_occupations(train, atround(train.index) + CPL_CHK_DST)
|
|
||||||
if advtrains.is_node_loaded(pos) then -- if the position is loaded...
|
|
||||||
for tid, idx in pairs(front_trains) do
|
|
||||||
local other_train = advtrains.trains[tid]
|
|
||||||
if not advtrains.train_ensure_init(tid, other_train) then
|
|
||||||
atwarn("Train",tid,"is not initialized! Couldn't check couples!")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
--atdebug(train.id,"front: ",idx,"on",tid,atround(other_train.index),atround(other_train.end_index))
|
|
||||||
if other_train.velocity == 0 then
|
|
||||||
if idx>=other_train.index and idx<=other_train.index + CPL_ZONE then
|
|
||||||
createcouple(pos, train, true, other_train, true)
|
|
||||||
break
|
|
||||||
end
|
|
||||||
if idx<=other_train.end_index and idx>=other_train.end_index - CPL_ZONE then
|
|
||||||
createcouple(pos, train, true, other_train, false)
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if train.cpl_back then
|
|
||||||
if not train.cpl_back:get_yaw() then
|
|
||||||
-- objectref is no longer valid. reset.
|
|
||||||
train.cpl_back = nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if not train.cpl_back then
|
|
||||||
-- recheck back couple
|
|
||||||
local back_trains, pos = advtrains.occ.get_occupations(train, atround(train.end_index) - CPL_CHK_DST)
|
|
||||||
if advtrains.is_node_loaded(pos) then -- if the position is loaded...
|
|
||||||
for tid, idx in pairs(back_trains) do
|
|
||||||
local other_train = advtrains.trains[tid]
|
|
||||||
if not advtrains.train_ensure_init(tid, other_train) then
|
|
||||||
atwarn("Train",tid,"is not initialized! Couldn't check couples!")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if other_train.velocity == 0 then
|
|
||||||
if idx>=other_train.index and idx<=other_train.index + CPL_ZONE then
|
|
||||||
createcouple(pos, train, false, other_train, true)
|
|
||||||
break
|
|
||||||
end
|
|
||||||
if idx<=other_train.end_index and idx>=other_train.end_index - CPL_ZONE then
|
|
||||||
createcouple(pos, train, false, other_train, false)
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function advtrains.couple_invalidate(train)
|
|
||||||
if train.cpl_back then
|
|
||||||
train.cpl_back:remove()
|
|
||||||
train.cpl_back = nil
|
|
||||||
end
|
|
||||||
if train.cpl_front then
|
|
||||||
train.cpl_front:remove()
|
|
||||||
train.cpl_front = nil
|
|
||||||
end
|
|
||||||
train.was_standing = nil
|
|
||||||
end
|
|
||||||
|
|
||||||
-- relevant code for this comment is in couple.lua
|
|
||||||
|
|
||||||
--there are 4 cases:
|
|
||||||
--1/2. F<->R F<->R regular, put second train behind first
|
|
||||||
--->frontpos of first train will match backpos of second
|
|
||||||
--3. F<->R R<->F flip one of these trains, take the other as new train
|
|
||||||
--->backpos's will match
|
|
||||||
--4. R<->F F<->R flip one of these trains and take it as new parent
|
|
||||||
--->frontpos's will match
|
|
||||||
|
|
||||||
|
|
||||||
function advtrains.do_connect_trains(first_id, second_id, vel)
|
|
||||||
local first, second=advtrains.trains[first_id], advtrains.trains[second_id]
|
|
||||||
|
|
||||||
if not advtrains.train_ensure_init(first_id, first) then
|
|
||||||
atwarn("Train",first_id,"is not initialized! Operation aborted!")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if not advtrains.train_ensure_init(second_id, second) then
|
|
||||||
atwarn("Train",second_id,"is not initialized! Operation aborted!")
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local first_wagoncnt=#first.trainparts
|
|
||||||
local second_wagoncnt=#second.trainparts
|
|
||||||
|
|
||||||
for _,v in ipairs(second.trainparts) do
|
|
||||||
table.insert(first.trainparts, v)
|
|
||||||
end
|
|
||||||
|
|
||||||
advtrains.remove_train(second_id)
|
|
||||||
if vel < 0 then
|
|
||||||
advtrains.invert_train(first_id)
|
|
||||||
vel = -vel
|
|
||||||
end
|
|
||||||
first.velocity= vel or 0
|
|
||||||
|
|
||||||
advtrains.update_trainpart_properties(first_id)
|
|
||||||
advtrains.couple_invalidate(first)
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
function advtrains.invert_train(train_id)
|
function advtrains.invert_train(train_id)
|
||||||
local train=advtrains.trains[train_id]
|
local train=advtrains.trains[train_id]
|
||||||
|
|
||||||
|
@ -1368,44 +1247,61 @@ function advtrains.invalidate_path(id)
|
||||||
end
|
end
|
||||||
|
|
||||||
--not blocking trains group
|
--not blocking trains group
|
||||||
function advtrains.train_collides(node)
|
|
||||||
if node and minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].walkable then
|
if minetest.settings:get_bool("advtrains_forgiving_collision") then
|
||||||
|
function advtrains.train_collides(node)
|
||||||
|
if node and minetest.registered_nodes[node.name] then
|
||||||
|
local ndef = minetest.registered_nodes[node.name]
|
||||||
|
-- if the node is drawtype normal (that is a full cube) then it does collide
|
||||||
|
if ndef.drawtype == "normal" then
|
||||||
|
-- except if it is not_blocking_trains
|
||||||
|
if ndef.groups.not_blocking_trains and ndef.groups.not_blocking_trains ~= 0 then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
else
|
||||||
|
function advtrains.train_collides(node)
|
||||||
|
if node and minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].walkable then
|
||||||
if not minetest.registered_nodes[node.name].groups.not_blocking_trains then
|
if not minetest.registered_nodes[node.name].groups.not_blocking_trains then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
local nonblocknodes={
|
|
||||||
"default:fence_wood",
|
|
||||||
"default:fence_acacia_wood",
|
|
||||||
"default:fence_aspen_wood",
|
|
||||||
"default:fence_pine_wood",
|
|
||||||
"default:fence_junglewood",
|
|
||||||
"default:torch",
|
|
||||||
"bones:bones",
|
|
||||||
|
|
||||||
"default:sign_wall",
|
|
||||||
"signs:sign_wall",
|
|
||||||
"signs:sign_wall_blue",
|
|
||||||
"signs:sign_wall_brown",
|
|
||||||
"signs:sign_wall_orange",
|
|
||||||
"signs:sign_wall_green",
|
|
||||||
"signs:sign_yard",
|
|
||||||
"signs:sign_wall_white_black",
|
|
||||||
"signs:sign_wall_red",
|
|
||||||
"signs:sign_wall_white_red",
|
|
||||||
"signs:sign_wall_yellow",
|
|
||||||
"signs:sign_post",
|
|
||||||
"signs:sign_hanging",
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
minetest.after(0, function()
|
|
||||||
for _,name in ipairs(nonblocknodes) do
|
|
||||||
if minetest.registered_nodes[name] then
|
|
||||||
minetest.registered_nodes[name].groups.not_blocking_trains=1
|
|
||||||
end
|
end
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
end)
|
|
||||||
|
local nonblocknodes={
|
||||||
|
"default:fence_wood",
|
||||||
|
"default:fence_acacia_wood",
|
||||||
|
"default:fence_aspen_wood",
|
||||||
|
"default:fence_pine_wood",
|
||||||
|
"default:fence_junglewood",
|
||||||
|
"default:torch",
|
||||||
|
"bones:bones",
|
||||||
|
|
||||||
|
"default:sign_wall",
|
||||||
|
"signs:sign_wall",
|
||||||
|
"signs:sign_wall_blue",
|
||||||
|
"signs:sign_wall_brown",
|
||||||
|
"signs:sign_wall_orange",
|
||||||
|
"signs:sign_wall_green",
|
||||||
|
"signs:sign_yard",
|
||||||
|
"signs:sign_wall_white_black",
|
||||||
|
"signs:sign_wall_red",
|
||||||
|
"signs:sign_wall_white_red",
|
||||||
|
"signs:sign_wall_yellow",
|
||||||
|
"signs:sign_post",
|
||||||
|
"signs:sign_hanging",
|
||||||
|
|
||||||
|
}
|
||||||
|
minetest.after(0, function()
|
||||||
|
for _,name in ipairs(nonblocknodes) do
|
||||||
|
if minetest.registered_nodes[name] then
|
||||||
|
minetest.registered_nodes[name].groups.not_blocking_trains=1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
|
@ -1240,70 +1240,6 @@ function wagon:reattach_all()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function check_twagon_owner(train, b_first, pname)
|
|
||||||
local wtp = b_first and 1 or #train.trainparts
|
|
||||||
local wid = train.trainparts[wtp]
|
|
||||||
local wdata = advtrains.wagons[wid]
|
|
||||||
if wdata then
|
|
||||||
return advtrains.check_driving_couple_protection(pname, wdata.owner, wdata.whitelist)
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
function advtrains.safe_couple_trains(id1, id2, t1f, t2f, pname, try_run,v1,v2)
|
|
||||||
|
|
||||||
if pname and not minetest.check_player_privs(pname, "train_operator") then
|
|
||||||
minetest.chat_send_player(pname, "Missing train_operator privilege")
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
local train1=advtrains.trains[id1]
|
|
||||||
local train2=advtrains.trains[id2]
|
|
||||||
|
|
||||||
if not advtrains.train_ensure_init(id1, train1)
|
|
||||||
or not advtrains.train_ensure_init(id2, train2) then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
local wck_t1, wck_t2
|
|
||||||
if pname then
|
|
||||||
wck_t1 = check_twagon_owner(train1, t1f, pname)
|
|
||||||
wck_t2 = check_twagon_owner(train2, t2f, pname)
|
|
||||||
end
|
|
||||||
if (wck_t1 or wck_t2) or not pname then
|
|
||||||
if not v1 then
|
|
||||||
v1 = 0
|
|
||||||
end
|
|
||||||
if not v2 then
|
|
||||||
v2 = 0
|
|
||||||
end
|
|
||||||
if try_run then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
if t1f then
|
|
||||||
if t2f then
|
|
||||||
v1 = -v1
|
|
||||||
advtrains.invert_train(id1)
|
|
||||||
advtrains.do_connect_trains(id1, id2, v1+v2)
|
|
||||||
else
|
|
||||||
advtrains.do_connect_trains(id2, id1, v1+v2)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if t2f then
|
|
||||||
advtrains.do_connect_trains(id1, id2, v1+v2)
|
|
||||||
else
|
|
||||||
v2 = -v2
|
|
||||||
advtrains.invert_train(id2)
|
|
||||||
advtrains.do_connect_trains(id1, id2, v1+v2)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return true
|
|
||||||
else
|
|
||||||
minetest.chat_send_player(pname, "You must be authorized for at least one wagon.")
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
function advtrains.safe_decouple_wagon(w_id, pname, try_run)
|
function advtrains.safe_decouple_wagon(w_id, pname, try_run)
|
||||||
if not minetest.check_player_privs(pname, "train_operator") then
|
if not minetest.check_player_privs(pname, "train_operator") then
|
||||||
minetest.chat_send_player(pname, "Missing train_operator privilege")
|
minetest.chat_send_player(pname, "Missing train_operator privilege")
|
||||||
|
|
|
@ -104,7 +104,8 @@ end)
|
||||||
local get_ambience = function(player, tod, name)
|
local get_ambience = function(player, tod, name)
|
||||||
|
|
||||||
-- play server or local music if music enabled and music not already playing
|
-- play server or local music if music enabled and music not already playing
|
||||||
if play_music and MUSICVOLUME > 0 and playing[name].music < 0 then
|
if play_music and MUSICVOLUME > 0
|
||||||
|
and playing[name] and playing[name].music < 0 then
|
||||||
|
|
||||||
-- count backwards
|
-- count backwards
|
||||||
playing[name].music = playing[name].music -1
|
playing[name].music = playing[name].music -1
|
||||||
|
|
|
@ -139,7 +139,7 @@ ambience.add_set("lava", {
|
||||||
})
|
})
|
||||||
|
|
||||||
else
|
else
|
||||||
print ("[Ambience] found env_sounds, flowing water sounds disabled.")
|
print ("[Ambience] found env_sounds, flowing water and lava sounds disabled.")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Only add fire sounds set if flame_sound is disabled or fire redo active
|
-- Only add fire sounds set if flame_sound is disabled or fire redo active
|
||||||
|
@ -238,7 +238,7 @@ ambience.add_set("ice", {
|
||||||
frequency = 250,
|
frequency = 250,
|
||||||
|
|
||||||
sounds = {
|
sounds = {
|
||||||
{name = "icecrack", length = 23},
|
{name = "icecrack", length = 23, gain = 0.7},
|
||||||
{name = "desertwind", length = 8},
|
{name = "desertwind", length = 8},
|
||||||
{name = "wind", length = 9}
|
{name = "wind", length = 9}
|
||||||
},
|
},
|
||||||
|
@ -280,7 +280,7 @@ ambience.add_set("desert", {
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Cave sounds play when below player position Y -25
|
-- Cave sounds play when below player position Y -25 and water nearby
|
||||||
|
|
||||||
ambience.add_set("cave", {
|
ambience.add_set("cave", {
|
||||||
|
|
||||||
|
@ -293,7 +293,9 @@ ambience.add_set("cave", {
|
||||||
|
|
||||||
sound_check = function(def)
|
sound_check = function(def)
|
||||||
|
|
||||||
if def.pos.y < -25 then
|
local c = (def.totals["default:water_source"] or 0)
|
||||||
|
|
||||||
|
if c > 0 and def.pos.y < -25 then
|
||||||
return "cave"
|
return "cave"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,11 +2,13 @@ Baked Clay
|
||||||
|
|
||||||
This mod lets the player bake clay into hardened blocks and colour them with
|
This mod lets the player bake clay into hardened blocks and colour them with
|
||||||
dye (8x baked clay and 1x dye in centre), stairs and slabs are also available.
|
dye (8x baked clay and 1x dye in centre), stairs and slabs are also available.
|
||||||
|
Cooking baked clay turns it into glazed terracotta blocks.
|
||||||
|
|
||||||
https://forum.minetest.net/viewtopic.php?id=8890
|
https://forum.minetest.net/viewtopic.php?id=8890
|
||||||
|
|
||||||
Changelog:
|
Changelog:
|
||||||
|
|
||||||
|
- 1.0 - Added glazed terracotta blocks when you cook baked clay in furnace (thanks D3monPixel)
|
||||||
- 0.9 - Baked clay now works in the technic cnc machine
|
- 0.9 - Baked clay now works in the technic cnc machine
|
||||||
- 0.8 - Cooking clay block in furnace gives natural baked clay which you can dye
|
- 0.8 - Cooking clay block in furnace gives natural baked clay which you can dye
|
||||||
- 0.7 - Added support for stairsplus so that stairs are registered properly
|
- 0.7 - Added support for stairsplus so that stairs are registered properly
|
||||||
|
@ -17,7 +19,7 @@ Changelog:
|
||||||
- 0.2 - Any colour of baked clay can be re-dyed into another colour
|
- 0.2 - Any colour of baked clay can be re-dyed into another colour
|
||||||
- 0.1 - Initial Release
|
- 0.1 - Initial Release
|
||||||
|
|
||||||
Lucky Blocks: 9
|
Lucky Blocks: 10
|
||||||
|
|
||||||
|
|
||||||
Note: Under settings you will find 'colored_clay_compatibility' switch that when enabled will register aliases for the older colored clay mod and it's stairplus stairs.
|
Note: Under settings you will find 'colored_clay_compatibility' switch that when enabled will register aliases for the older colored clay mod and it's stairplus stairs.
|
||||||
|
|
|
@ -17,7 +17,7 @@ local clay = {
|
||||||
{"brown", "Brown"},
|
{"brown", "Brown"},
|
||||||
{"pink", "Pink"},
|
{"pink", "Pink"},
|
||||||
{"dark_grey", "Dark Grey"},
|
{"dark_grey", "Dark Grey"},
|
||||||
{"dark_green", "Dark Green"},
|
{"dark_green", "Dark Green"}
|
||||||
}
|
}
|
||||||
|
|
||||||
local techcnc_mod = minetest.get_modpath("technic_cnc")
|
local techcnc_mod = minetest.get_modpath("technic_cnc")
|
||||||
|
@ -27,42 +27,50 @@ local stairsplus_mod = minetest.get_modpath("moreblocks")
|
||||||
|
|
||||||
for _, clay in pairs(clay) do
|
for _, clay in pairs(clay) do
|
||||||
|
|
||||||
-- node definition
|
-- node
|
||||||
|
|
||||||
minetest.register_node("bakedclay:" .. clay[1], {
|
minetest.register_node("bakedclay:" .. clay[1], {
|
||||||
description = clay[2] .. " Baked Clay",
|
description = clay[2] .. " Baked Clay",
|
||||||
tiles = {"baked_clay_" .. clay[1] ..".png"},
|
tiles = {"baked_clay_" .. clay[1] ..".png"},
|
||||||
groups = {cracky = 3, bakedclay = 1},
|
groups = {cracky = 3, bakedclay = 1},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults()
|
||||||
})
|
})
|
||||||
|
|
||||||
-- craft from dye and any baked clay
|
-- craft recipe
|
||||||
|
|
||||||
if clay[1] ~= "natural" then
|
if clay[1] ~= "natural" then
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bakedclay:" .. clay[1] .. " 8",
|
output = "bakedclay:" .. clay[1] .. " 8",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"group:bakedclay", "group:bakedclay", "group:bakedclay"},
|
{"group:bakedclay", "group:bakedclay", "group:bakedclay"},
|
||||||
{"group:bakedclay", "dye:" .. clay[1], "group:bakedclay"},
|
{"group:bakedclay", "dye:" .. clay[1], "group:bakedclay"},
|
||||||
{"group:bakedclay", "group:bakedclay", "group:bakedclay"}
|
{"group:bakedclay", "group:bakedclay", "group:bakedclay"}
|
||||||
},
|
}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- register stairsplus stairs if found
|
-- stairs plus
|
||||||
if stairsplus_mod then
|
if stairsplus_mod then
|
||||||
|
|
||||||
stairsplus:register_all("bakedclay", "baked_clay_" .. clay[1], "bakedclay:" .. clay[1], {
|
stairsplus:register_all("bakedclay", "baked_clay_" .. clay[1],
|
||||||
|
"bakedclay:" .. clay[1], {
|
||||||
description = clay[2] .. " Baked Clay",
|
description = clay[2] .. " Baked Clay",
|
||||||
tiles = {"baked_clay_" .. clay[1] .. ".png"},
|
tiles = {"baked_clay_" .. clay[1] .. ".png"},
|
||||||
groups = {cracky = 3},
|
groups = {cracky = 3},
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults()
|
||||||
})
|
})
|
||||||
|
|
||||||
stairsplus:register_alias_all("bakedclay", clay[1], "bakedclay", "baked_clay_" .. clay[1])
|
stairsplus:register_alias_all("bakedclay", clay[1],
|
||||||
minetest.register_alias("stairs:slab_bakedclay_".. clay[1], "bakedclay:slab_baked_clay_" .. clay[1])
|
"bakedclay", "baked_clay_" .. clay[1])
|
||||||
minetest.register_alias("stairs:stair_bakedclay_".. clay[1], "bakedclay:stair_baked_clay_" .. clay[1])
|
|
||||||
|
|
||||||
-- register all stair types for stairs redo
|
minetest.register_alias("stairs:slab_bakedclay_".. clay[1],
|
||||||
|
"bakedclay:slab_baked_clay_" .. clay[1])
|
||||||
|
|
||||||
|
minetest.register_alias("stairs:stair_bakedclay_".. clay[1],
|
||||||
|
"bakedclay:stair_baked_clay_" .. clay[1])
|
||||||
|
|
||||||
|
-- stairs redo
|
||||||
elseif stairs_mod and stairs.mod then
|
elseif stairs_mod and stairs.mod then
|
||||||
|
|
||||||
stairs.register_all("bakedclay_" .. clay[1], "bakedclay:" .. clay[1],
|
stairs.register_all("bakedclay_" .. clay[1], "bakedclay:" .. clay[1],
|
||||||
|
@ -71,7 +79,7 @@ for _, clay in pairs(clay) do
|
||||||
clay[2] .. " Baked Clay",
|
clay[2] .. " Baked Clay",
|
||||||
default.node_sound_stone_defaults())
|
default.node_sound_stone_defaults())
|
||||||
|
|
||||||
-- register stair and slab using default stairs
|
-- default stairs
|
||||||
elseif stairs_mod then
|
elseif stairs_mod then
|
||||||
|
|
||||||
stairs.register_stair_and_slab("bakedclay_".. clay[1], "bakedclay:".. clay[1],
|
stairs.register_stair_and_slab("bakedclay_".. clay[1], "bakedclay:".. clay[1],
|
||||||
|
@ -92,6 +100,56 @@ for _, clay in pairs(clay) do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Terracotta blocks (textures by D3monPixel, thanks for use :)
|
||||||
|
for _, clay in pairs(clay) do
|
||||||
|
|
||||||
|
if clay[1] ~= "natural" then
|
||||||
|
|
||||||
|
local texture = "baked_clay_terracotta_" .. clay[1] ..".png"
|
||||||
|
|
||||||
|
minetest.register_node("bakedclay:terracotta_" .. clay[1], {
|
||||||
|
description = clay[2] .. " Glazed Terracotta",
|
||||||
|
tiles = {
|
||||||
|
texture .. "",
|
||||||
|
texture .. "",
|
||||||
|
texture .. "^[transformR180",
|
||||||
|
texture .. "",
|
||||||
|
texture .. "^[transformR270",
|
||||||
|
texture .. "^[transformR90",
|
||||||
|
},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {cracky = 3, terracotta = 1},
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_place = minetest.rotate_node
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "cooking",
|
||||||
|
output = "bakedclay:terracotta_" .. clay[1],
|
||||||
|
recipe = "bakedclay:" .. clay[1]
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- special light blue glazed terracotta block
|
||||||
|
local texture = "baked_clay_terracotta_light_blue.png"
|
||||||
|
|
||||||
|
minetest.register_node("bakedclay:terracotta_light_blue", {
|
||||||
|
description = "Light Blue Glazed Terracotta",
|
||||||
|
tiles = {
|
||||||
|
texture .. "",
|
||||||
|
texture .. "",
|
||||||
|
texture .. "^[transformR180",
|
||||||
|
texture .. "",
|
||||||
|
texture .. "^[transformR270",
|
||||||
|
texture .. "^[transformR90",
|
||||||
|
},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {cracky = 3, terracotta = 1},
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
on_place = minetest.rotate_node
|
||||||
|
})
|
||||||
|
|
||||||
-- cook clay block into white baked clay
|
-- cook clay block into white baked clay
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -108,34 +166,29 @@ minetest.register_craft( {
|
||||||
recipe = {"dye:black", "dye:black", "dye:white"}
|
recipe = {"dye:black", "dye:black", "dye:white"}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- only add light grey recipe if unifieddye mod isnt present (conflict)
|
|
||||||
if not minetest.get_modpath("unifieddyes") then
|
|
||||||
minetest.register_craft( {
|
|
||||||
type = "shapeless",
|
|
||||||
output = "dye:grey 3",
|
|
||||||
recipe = {"dye:black", "dye:white", "dye:white"}
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = "dye:green 4",
|
output = "dye:green 4",
|
||||||
recipe = {"default:cactus"}
|
recipe = {"default:cactus"}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft( {
|
|
||||||
type = "shapeless",
|
|
||||||
output = "dye:black 4",
|
|
||||||
recipe = {"default:coal_lump"}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = "dye:brown 4",
|
output = "dye:brown 4",
|
||||||
recipe = {"default:dry_shrub"}
|
recipe = {"default:dry_shrub"}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- 2x2 red bakedclay makes 16x clay brick
|
-- only add light grey recipe if unifieddye mod isnt present (conflict)
|
||||||
|
if not minetest.get_modpath("unifieddyes") then
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
type = "shapeless",
|
||||||
|
output = "dye:grey 3",
|
||||||
|
recipe = {"dye:black", "dye:white", "dye:white"}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- 2x2 red baked clay makes 16x clay brick
|
||||||
minetest.register_craft( {
|
minetest.register_craft( {
|
||||||
output = "default:clay_brick 16",
|
output = "default:clay_brick 16",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -176,10 +229,17 @@ local function add_simple_flower(name, desc, box, f_groups)
|
||||||
end
|
end
|
||||||
|
|
||||||
local flowers = {
|
local flowers = {
|
||||||
{"delphinium", "Blue Delphinium", {-0.15, -0.5, -0.15, 0.15, 0.3, 0.15}, {color_cyan = 1}},
|
{"delphinium", "Blue Delphinium",
|
||||||
{"thistle", "Thistle", {-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_magenta = 1}},
|
{-0.15, -0.5, -0.15, 0.15, 0.3, 0.15}, {color_cyan = 1}},
|
||||||
{"lazarus", "Lazarus Bell", {-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_pink = 1}},
|
|
||||||
{"mannagrass", "Reed Mannagrass", {-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_dark_green = 1}},
|
{"thistle", "Thistle",
|
||||||
|
{-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_magenta = 1}},
|
||||||
|
|
||||||
|
{"lazarus", "Lazarus Bell",
|
||||||
|
{-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_pink = 1}},
|
||||||
|
|
||||||
|
{"mannagrass", "Reed Mannagrass",
|
||||||
|
{-0.15, -0.5, -0.15, 0.15, 0.2, 0.15}, {color_dark_green = 1}}
|
||||||
}
|
}
|
||||||
|
|
||||||
for _,item in pairs(flowers) do
|
for _,item in pairs(flowers) do
|
||||||
|
@ -202,7 +262,7 @@ minetest.register_decoration({
|
||||||
},
|
},
|
||||||
y_min = 10,
|
y_min = 10,
|
||||||
y_max = 90,
|
y_max = 90,
|
||||||
decoration = "bakedclay:delphinium",
|
decoration = "bakedclay:delphinium"
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
|
@ -219,7 +279,7 @@ minetest.register_decoration({
|
||||||
},
|
},
|
||||||
y_min = 15,
|
y_min = 15,
|
||||||
y_max = 90,
|
y_max = 90,
|
||||||
decoration = "bakedclay:thistle",
|
decoration = "bakedclay:thistle"
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
|
@ -238,7 +298,7 @@ minetest.register_decoration({
|
||||||
y_max = 90,
|
y_max = 90,
|
||||||
decoration = "bakedclay:lazarus",
|
decoration = "bakedclay:lazarus",
|
||||||
spawn_by = "default:jungletree",
|
spawn_by = "default:jungletree",
|
||||||
num_spawn_by = 1,
|
num_spawn_by = 1
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_decoration({
|
minetest.register_decoration({
|
||||||
|
@ -257,13 +317,15 @@ minetest.register_decoration({
|
||||||
y_max = 15,
|
y_max = 15,
|
||||||
decoration = "bakedclay:mannagrass",
|
decoration = "bakedclay:mannagrass",
|
||||||
spawn_by = "group:water",
|
spawn_by = "group:water",
|
||||||
num_spawn_by = 1,
|
num_spawn_by = 1
|
||||||
})
|
})
|
||||||
|
|
||||||
-- add lucky blocks
|
-- lucky blocks
|
||||||
|
|
||||||
if minetest.get_modpath("lucky_block") then
|
if minetest.get_modpath("lucky_block") then
|
||||||
|
|
||||||
local p = "bakedclay:"
|
local p = "bakedclay:"
|
||||||
|
|
||||||
lucky_block:add_blocks({
|
lucky_block:add_blocks({
|
||||||
{"dro", {"bakedclay:"}, 10, true},
|
{"dro", {"bakedclay:"}, 10, true},
|
||||||
{"fal", {p.."black", p.."blue", p.."brown", p.."cyan", p.."dark_green",
|
{"fal", {p.."black", p.."blue", p.."brown", p.."cyan", p.."dark_green",
|
||||||
|
@ -295,13 +357,36 @@ lucky_block:add_blocks({
|
||||||
{name = p.."red", max = 30},
|
{name = p.."red", max = 30},
|
||||||
{name = p.."violet", max = 30},
|
{name = p.."violet", max = 30},
|
||||||
{name = p.."white", max = 30},
|
{name = p.."white", max = 30},
|
||||||
{name = p.."yellow", max = 30},
|
{name = p.."yellow", max = 30}
|
||||||
}},
|
}},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
p = "bakedclay:terracotta_"
|
||||||
|
|
||||||
|
lucky_block:add_blocks({
|
||||||
|
{"nod", "default:chest", 0, {
|
||||||
|
{name = p.."light_blue", max = 20},
|
||||||
|
{name = p.."black", max = 20},
|
||||||
|
{name = p.."blue", max = 20},
|
||||||
|
{name = p.."brown", max = 20},
|
||||||
|
{name = p.."cyan", max = 20},
|
||||||
|
{name = p.."dark_green", max = 20},
|
||||||
|
{name = p.."dark_grey", max = 20},
|
||||||
|
{name = p.."green", max = 20},
|
||||||
|
{name = p.."grey", max = 20},
|
||||||
|
{name = p.."magenta", max = 20},
|
||||||
|
{name = p.."orange", max = 20},
|
||||||
|
{name = p.."pink", max = 20},
|
||||||
|
{name = p.."red", max = 20},
|
||||||
|
{name = p.."violet", max = 20},
|
||||||
|
{name = p.."white", max = 20},
|
||||||
|
{name = p.."yellow", max = 20}
|
||||||
|
}}
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- colored clay compatibility
|
-- colored clay compatibility
|
||||||
|
|
||||||
if minetest.settings:get_bool("colored_clay_compatibility") == true then
|
if minetest.settings:get_bool("colored_clay_compatibility") == true then
|
||||||
|
|
||||||
local cc = {
|
local cc = {
|
||||||
|
|
|
@ -19,3 +19,7 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
Textures by D3monPixel (https://mcpedl.com/better-glazed-terracotta-pack)
|
||||||
|
baked_clay_terracotta*.png
|
||||||
|
|
BIN
mods/bakedclay/textures/baked_clay_terracotta_black.png
Normal file
After Width: | Height: | Size: 328 B |
BIN
mods/bakedclay/textures/baked_clay_terracotta_blue.png
Normal file
After Width: | Height: | Size: 257 B |
BIN
mods/bakedclay/textures/baked_clay_terracotta_brown.png
Normal file
After Width: | Height: | Size: 718 B |
BIN
mods/bakedclay/textures/baked_clay_terracotta_cyan.png
Normal file
After Width: | Height: | Size: 661 B |
BIN
mods/bakedclay/textures/baked_clay_terracotta_dark_green.png
Normal file
After Width: | Height: | Size: 714 B |
BIN
mods/bakedclay/textures/baked_clay_terracotta_dark_grey.png
Normal file
After Width: | Height: | Size: 328 B |
BIN
mods/bakedclay/textures/baked_clay_terracotta_green.png
Normal file
After Width: | Height: | Size: 575 B |
BIN
mods/bakedclay/textures/baked_clay_terracotta_grey.png
Normal file
After Width: | Height: | Size: 659 B |
BIN
mods/bakedclay/textures/baked_clay_terracotta_light_blue.png
Normal file
After Width: | Height: | Size: 589 B |
BIN
mods/bakedclay/textures/baked_clay_terracotta_magenta.png
Normal file
After Width: | Height: | Size: 275 B |
BIN
mods/bakedclay/textures/baked_clay_terracotta_orange.png
Normal file
After Width: | Height: | Size: 606 B |
BIN
mods/bakedclay/textures/baked_clay_terracotta_pink.png
Normal file
After Width: | Height: | Size: 409 B |
BIN
mods/bakedclay/textures/baked_clay_terracotta_red.png
Normal file
After Width: | Height: | Size: 292 B |
BIN
mods/bakedclay/textures/baked_clay_terracotta_violet.png
Normal file
After Width: | Height: | Size: 619 B |
BIN
mods/bakedclay/textures/baked_clay_terracotta_white.png
Normal file
After Width: | Height: | Size: 512 B |
BIN
mods/bakedclay/textures/baked_clay_terracotta_yellow.png
Normal file
After Width: | Height: | Size: 676 B |
15
mods/bridger/.luacheckrc
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
|
||||||
|
globals = {
|
||||||
|
"minetest",
|
||||||
|
}
|
||||||
|
|
||||||
|
read_globals = {
|
||||||
|
-- Builtin
|
||||||
|
"vector",
|
||||||
|
|
||||||
|
-- Mod Deps
|
||||||
|
"default",
|
||||||
|
"stairsplus",
|
||||||
|
"stairs",
|
||||||
|
"mesecon",
|
||||||
|
}
|
7
mods/bridger/README.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Bridger [bridger]
|
||||||
|
|
||||||
|
[![luacheck](https://github.com/v-rob/bridger/workflows/luacheck/badge.svg)](https://github.com/v-rob/bridger/actions)
|
||||||
|
|
||||||
|
Adds a large number of advanced nodes conducive to building large, industrial bridges to [Minetest](https://www.minetest.net). Also see the [forum post](https://forum.minetest.net/viewtopic.php?t=18243).
|
||||||
|
|
||||||
|
![](screenshot.png?raw=true)
|
|
@ -61,7 +61,8 @@ for _, color in pairs(bridger_colors) do
|
||||||
minetest.register_alias("bridges:" .. prefix .. oldname, "bridger:" .. prefix .. "_" .. newname)
|
minetest.register_alias("bridges:" .. prefix .. oldname, "bridger:" .. prefix .. "_" .. newname)
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_alias("bridges:truss_superstructure_simple_end" .. oldname, "bridger:truss_superstructure_simple_end_left_" .. newname)
|
minetest.register_alias("bridges:truss_superstructure_simple_end" .. oldname,
|
||||||
|
"bridger:truss_superstructure_simple_end_left_" .. newname)
|
||||||
minetest.register_alias("bridges:girder_left_end" .. oldname, "bridger:girder_left_" .. newname)
|
minetest.register_alias("bridges:girder_left_end" .. oldname, "bridger:girder_left_" .. newname)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -28,7 +28,7 @@ minetest.register_craft({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
if minetest.settings:get_bool("bridger_enable_trusses") then
|
if minetest.settings:get_bool("bridger_enable_trusses", true) then
|
||||||
minetest.register_craftitem("bridger:bridges_steel_rod", {
|
minetest.register_craftitem("bridger:bridges_steel_rod", {
|
||||||
description = "Steel Rod",
|
description = "Steel Rod",
|
||||||
inventory_image = "bridges_steel_rod.png",
|
inventory_image = "bridges_steel_rod.png",
|
||||||
|
@ -174,7 +174,11 @@ if minetest.settings:get_bool("bridger_enable_trusses") then
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:corrugated_steel_ceiling_" .. bridge_color .. " 3",
|
output = "bridger:corrugated_steel_ceiling_" .. bridge_color .. " 3",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"bridger:corrugated_steel" .. bridge_color, "bridger:corrugated_steel" .. bridge_color, "bridger:corrugated_steel" .. bridge_color},
|
{
|
||||||
|
"bridger:corrugated_steel" .. bridge_color,
|
||||||
|
"bridger:corrugated_steel" .. bridge_color,
|
||||||
|
"bridger:corrugated_steel" .. bridge_color
|
||||||
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -204,7 +208,11 @@ if minetest.settings:get_bool("bridger_enable_trusses") then
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:corrugated_steel_ceiling_" .. bridge_color .. " 3",
|
output = "bridger:corrugated_steel_ceiling_" .. bridge_color .. " 3",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"bridger:corrugated_steel" .. bridge_color, "bridger:corrugated_steel" .. bridge_color, "bridger:corrugated_steel" .. bridge_color},
|
{
|
||||||
|
"bridger:corrugated_steel" .. bridge_color,
|
||||||
|
"bridger:corrugated_steel" .. bridge_color,
|
||||||
|
"bridger:corrugated_steel" .. bridge_color
|
||||||
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -324,13 +332,19 @@ if minetest.settings:get_bool("bridger_enable_trusses") then
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:truss_superstructure_mid_" .. bridge_color,
|
output = "bridger:truss_superstructure_mid_" .. bridge_color,
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:truss_superstructure_left_slant_" .. bridge_color, "bridger:truss_superstructure_right_slant_" .. bridge_color},
|
recipe = {
|
||||||
|
"bridger:truss_superstructure_left_slant_" .. bridge_color,
|
||||||
|
"bridger:truss_superstructure_right_slant_" .. bridge_color
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:truss_superstructure_tall_mid_" .. bridge_color,
|
output = "bridger:truss_superstructure_tall_mid_" .. bridge_color,
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:truss_superstructure_tall_left_slant_" .. bridge_color, "bridger:truss_superstructure_tall_right_slant_" .. bridge_color},
|
recipe = {
|
||||||
|
"bridger:truss_superstructure_tall_left_slant_" .. bridge_color,
|
||||||
|
"bridger:truss_superstructure_tall_right_slant_" .. bridge_color
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -405,7 +419,10 @@ if minetest.settings:get_bool("bridger_enable_trusses") then
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:truss_substructure_mid_" .. bridge_color,
|
output = "bridger:truss_substructure_mid_" .. bridge_color,
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:truss_substructure_left_slant_" .. bridge_color, "bridger:truss_substructure_right_slant_" .. bridge_color},
|
recipe = {
|
||||||
|
"bridger:truss_substructure_left_slant_" .. bridge_color,
|
||||||
|
"bridger:truss_substructure_right_slant_" .. bridge_color
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -684,161 +701,161 @@ if minetest.settings:get_bool("bridger_enable_trusses") then
|
||||||
}
|
}
|
||||||
|
|
||||||
for c in ipairs(bridge_nodes) do
|
for c in ipairs(bridge_nodes) do
|
||||||
local bridge_nodes = bridge_nodes[c]
|
local bridge_node = bridge_nodes[c]
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "white",
|
output = "bridger:" .. bridge_node .. "white",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "yellow", "dye:white"},
|
recipe = {"bridger:" .. bridge_node .. "yellow", "dye:white"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "white",
|
output = "bridger:" .. bridge_node .. "white",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "steel", "dye:white"},
|
recipe = {"bridger:" .. bridge_node .. "steel", "dye:white"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "white",
|
output = "bridger:" .. bridge_node .. "white",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "green", "dye:white"},
|
recipe = {"bridger:" .. bridge_node .. "green", "dye:white"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "white",
|
output = "bridger:" .. bridge_node .. "white",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "red", "dye:white"},
|
recipe = {"bridger:" .. bridge_node .. "red", "dye:white"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "red",
|
output = "bridger:" .. bridge_node .. "red",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "white", "dye:red"},
|
recipe = {"bridger:" .. bridge_node .. "white", "dye:red"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "red",
|
output = "bridger:" .. bridge_node .. "red",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "steel", "dye:red"},
|
recipe = {"bridger:" .. bridge_node .. "steel", "dye:red"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "red",
|
output = "bridger:" .. bridge_node .. "red",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "green", "dye:red"},
|
recipe = {"bridger:" .. bridge_node .. "green", "dye:red"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "red",
|
output = "bridger:" .. bridge_node .. "red",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "yellow", "dye:red"},
|
recipe = {"bridger:" .. bridge_node .. "yellow", "dye:red"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "green",
|
output = "bridger:" .. bridge_node .. "green",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "white", "dye:green"},
|
recipe = {"bridger:" .. bridge_node .. "white", "dye:green"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "green",
|
output = "bridger:" .. bridge_node .. "green",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "steel", "dye:green"},
|
recipe = {"bridger:" .. bridge_node .. "steel", "dye:green"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "green",
|
output = "bridger:" .. bridge_node .. "green",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "yellow", "dye:green"},
|
recipe = {"bridger:" .. bridge_node .. "yellow", "dye:green"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "green",
|
output = "bridger:" .. bridge_node .. "green",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "red", "dye:green"},
|
recipe = {"bridger:" .. bridge_node .. "red", "dye:green"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "steel",
|
output = "bridger:" .. bridge_node .. "steel",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "white", "dye:black"},
|
recipe = {"bridger:" .. bridge_node .. "white", "dye:black"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "steel",
|
output = "bridger:" .. bridge_node .. "steel",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "yellow", "dye:black"},
|
recipe = {"bridger:" .. bridge_node .. "yellow", "dye:black"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "steel",
|
output = "bridger:" .. bridge_node .. "steel",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "green", "dye:black"},
|
recipe = {"bridger:" .. bridge_node .. "green", "dye:black"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "steel",
|
output = "bridger:" .. bridge_node .. "steel",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "red", "dye:black"},
|
recipe = {"bridger:" .. bridge_node .. "red", "dye:black"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "steel",
|
output = "bridger:" .. bridge_node .. "steel",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "white", "dye:dark_grey"},
|
recipe = {"bridger:" .. bridge_node .. "white", "dye:dark_grey"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "steel",
|
output = "bridger:" .. bridge_node .. "steel",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "yellow", "dye:dark_grey"},
|
recipe = {"bridger:" .. bridge_node .. "yellow", "dye:dark_grey"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "steel",
|
output = "bridger:" .. bridge_node .. "steel",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "green", "dye:dark_grey"},
|
recipe = {"bridger:" .. bridge_node .. "green", "dye:dark_grey"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "steel",
|
output = "bridger:" .. bridge_node .. "steel",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "red", "dye:dark_grey"},
|
recipe = {"bridger:" .. bridge_node .. "red", "dye:dark_grey"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "yellow",
|
output = "bridger:" .. bridge_node .. "yellow",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "white", "dye:yellow"},
|
recipe = {"bridger:" .. bridge_node .. "white", "dye:yellow"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "yellow",
|
output = "bridger:" .. bridge_node .. "yellow",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "steel", "dye:yellow"},
|
recipe = {"bridger:" .. bridge_node .. "steel", "dye:yellow"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "yellow",
|
output = "bridger:" .. bridge_node .. "yellow",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "green", "dye:yellow"},
|
recipe = {"bridger:" .. bridge_node .. "green", "dye:yellow"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "yellow",
|
output = "bridger:" .. bridge_node .. "yellow",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "red", "dye:yellow"},
|
recipe = {"bridger:" .. bridge_node .. "red", "dye:yellow"},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:" .. bridge_nodes .. "red",
|
output = "bridger:" .. bridge_node .. "red",
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
recipe = {"bridger:" .. bridge_nodes .. "yellow", "dye:red"},
|
recipe = {"bridger:" .. bridge_node .. "yellow", "dye:red"},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if minetest.settings:get_bool("bridger_enable_trestles") then
|
if minetest.settings:get_bool("bridger_enable_trestles", true) then
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:trestle_support_small",
|
output = "bridger:trestle_support_small",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -908,7 +925,7 @@ if minetest.settings:get_bool("bridger_enable_trestles") then
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
if minetest.settings:get_bool("bridger_enable_wooden_bridges") then
|
if minetest.settings:get_bool("bridger_enable_wooden_bridges", true) then
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "bridger:small_beam",
|
output = "bridger:small_beam",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
A mod that adds various bridge nodes to Minetest.
|
Adds a large number of advanced nodes conducive to building large, industrial bridges.
|
||||||
|
|
|
@ -23,7 +23,7 @@ local function rotate_and_place(itemstack, placer, pointed_thing)
|
||||||
return minetest.item_place(itemstack, placer, pointed_thing, param2)
|
return minetest.item_place(itemstack, placer, pointed_thing, param2)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not minetest.settings:get_bool("bridger_disable_trusses") then
|
if minetest.settings:get_bool("bridger_enable_trusses", true) then
|
||||||
local bridge_colors = {
|
local bridge_colors = {
|
||||||
{"Green", "green"},
|
{"Green", "green"},
|
||||||
{"Red", "red"},
|
{"Red", "red"},
|
||||||
|
@ -34,7 +34,7 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
|
|
||||||
for _, row in ipairs(bridge_colors) do
|
for _, row in ipairs(bridge_colors) do
|
||||||
local bridge_desc = row[1]
|
local bridge_desc = row[1]
|
||||||
local bridge_colors = row[2]
|
local bridge_color = row[2]
|
||||||
|
|
||||||
minetest.register_node("bridger:foundation", {
|
minetest.register_node("bridger:foundation", {
|
||||||
description = "Bridge Foundation",
|
description = "Bridge Foundation",
|
||||||
|
@ -61,39 +61,39 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:block_" .. bridge_colors, {
|
minetest.register_node("bridger:block_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Block",
|
description = bridge_desc .. " Block",
|
||||||
drawtype = "normal",
|
drawtype = "normal",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
groups = {cracky=3},
|
groups = {cracky=3},
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
if minetest.get_modpath("moreblocks") then
|
if minetest.get_modpath("moreblocks") then
|
||||||
stairsplus:register_all("bridger", "block_" .. bridge_colors, "bridger:block_" .. bridge_colors, {
|
stairsplus:register_all("bridger", "block_" .. bridge_color, "bridger:block_" .. bridge_color, {
|
||||||
description = bridge_desc,
|
description = bridge_desc,
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
groups = {cracky=3},
|
groups = {cracky=3},
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_alias("bridger:step_" .. bridge_colors, "bridger:panel_block_" .. bridge_colors)
|
minetest.register_alias("bridger:step_" .. bridge_color, "bridger:panel_block_" .. bridge_color)
|
||||||
elseif minetest.get_modpath("stairs") then
|
elseif minetest.get_modpath("stairs") then
|
||||||
stairs.register_stair_and_slab(
|
stairs.register_stair_and_slab(
|
||||||
"block_" .. bridge_colors,
|
"block_" .. bridge_color,
|
||||||
"bridger:block_" .. bridge_colors,
|
"bridger:block_" .. bridge_color,
|
||||||
{cracky=3},
|
{cracky=3},
|
||||||
{"bridges_" .. bridge_colors .. ".png"},
|
{"bridges_" .. bridge_color .. ".png"},
|
||||||
bridge_desc .. " Stair",
|
bridge_desc .. " Stair",
|
||||||
bridge_desc .. " Slab",
|
bridge_desc .. " Slab",
|
||||||
default.node_sound_metal_defaults()
|
default.node_sound_metal_defaults()
|
||||||
)
|
)
|
||||||
|
|
||||||
minetest.register_node("bridger:step_" .. bridge_colors, {
|
minetest.register_node("bridger:step_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Step",
|
description = bridge_desc .. " Step",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
node_box = {
|
node_box = {
|
||||||
|
@ -113,10 +113,10 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("bridger:suspension_top_" .. bridge_colors, {
|
minetest.register_node("bridger:suspension_top_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Cable Top",
|
description = bridge_desc .. " Cable Top",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
node_box = {
|
node_box = {
|
||||||
|
@ -136,10 +136,10 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:suspension_cable_" .. bridge_colors, {
|
minetest.register_node("bridger:suspension_cable_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Cable",
|
description = bridge_desc .. " Cable",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
@ -151,10 +151,10 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:deck_" .. bridge_colors, {
|
minetest.register_node("bridger:deck_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Deck",
|
description = bridge_desc .. " Deck",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
node_box = {
|
node_box = {
|
||||||
|
@ -173,10 +173,10 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:deck_edge_" .. bridge_colors, {
|
minetest.register_node("bridger:deck_edge_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Deck Edge",
|
description = bridge_desc .. " Deck Edge",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -197,10 +197,10 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:train_deck_" .. bridge_colors, {
|
minetest.register_node("bridger:train_deck_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Train Deck",
|
description = bridge_desc .. " Train Deck",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
node_box = {
|
node_box = {
|
||||||
|
@ -247,10 +247,10 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:girder_mid_" .. bridge_colors, {
|
minetest.register_node("bridger:girder_mid_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Girder Middle",
|
description = bridge_desc .. " Girder Middle",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -275,10 +275,10 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:girder_right_" .. bridge_colors, {
|
minetest.register_node("bridger:girder_right_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Girder Right End",
|
description = bridge_desc .. " Girder Right End",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -315,10 +315,10 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:girder_left_" .. bridge_colors, {
|
minetest.register_node("bridger:girder_left_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Girder Left End",
|
description = bridge_desc .. " Girder Left End",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -355,12 +355,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_right_slant_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_right_slant_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Superstructure Right Slant",
|
description = bridge_desc .. " Truss Superstructure Right Slant",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_right_slant.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_right_slant.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_right_slant.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_right_slant.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -420,12 +422,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_left_slant_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_left_slant_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Superstructure Left Slant",
|
description = bridge_desc .. " Truss Superstructure Left Slant",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_left_slant.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_left_slant.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_left_slant.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_left_slant.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -485,12 +489,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_end_right_slant_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_end_right_slant_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Superstructure End Right Slant",
|
description = bridge_desc .. " Truss Superstructure End Right Slant",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_end_right_slant.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_end_right_slant.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_end_right_slant.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_end_right_slant.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -548,12 +554,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_end_left_slant_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_end_left_slant_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Superstructure End Left Slant",
|
description = bridge_desc .. " Truss Superstructure End Left Slant",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_end_left_slant.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_end_left_slant.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_end_left_slant.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_end_left_slant.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -611,12 +619,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_mid_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_mid_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Superstructure Middle",
|
description = bridge_desc .. " Truss Superstructure Middle",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_mid.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_mid.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_mid.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_mid.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -707,12 +717,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_tall_right_slant_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_tall_right_slant_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Tall Truss Superstructure Right Slant",
|
description = bridge_desc .. " Tall Truss Superstructure Right Slant",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_tall_right_slant.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_tall_right_slant.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_tall_right_slant.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_tall_right_slant.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -770,12 +782,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_tall_left_slant_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_tall_left_slant_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Tall Truss Superstructure Left Slant",
|
description = bridge_desc .. " Tall Truss Superstructure Left Slant",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_tall_left_slant.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_tall_left_slant.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_tall_left_slant.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_tall_left_slant.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -833,12 +847,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_tall_mid_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_tall_mid_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Tall Truss Superstructure Middle",
|
description = bridge_desc .. " Tall Truss Superstructure Middle",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_tall_mid.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_tall_mid.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_tall_mid.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_tall_mid.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -925,12 +941,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_tall_simple_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_tall_simple_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Tall Truss Superstructure Middle Simple",
|
description = bridge_desc .. " Tall Truss Superstructure Middle Simple",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_tall_simple.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_tall_simple.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_tall_simple.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_tall_simple.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -1016,12 +1034,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_tall_simple_end_left_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_tall_simple_end_left_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Tall Truss Superstructure Simple Left End",
|
description = bridge_desc .. " Tall Truss Superstructure Simple Left End",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_tall_simple_end_left.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_tall_simple_end_left.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_tall_simple_end_left.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_tall_simple_end_left.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -1035,12 +1055,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_tall_simple_end_right_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_tall_simple_end_right_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Tall Truss Superstructure Simple Right End",
|
description = bridge_desc .. " Tall Truss Superstructure Simple Right End",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_tall_simple_end_right.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_tall_simple_end_right.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_tall_simple_end_right.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_tall_simple_end_right.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -1054,12 +1076,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_simple_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_simple_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Superstructure Middle Simple",
|
description = bridge_desc .. " Truss Superstructure Middle Simple",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_simple.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_simple.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_simple.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_simple.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -1150,12 +1174,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_simple_end_left_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_simple_end_left_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Superstructure Simple Left End",
|
description = bridge_desc .. " Truss Superstructure Simple Left End",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_simple_end_left.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_simple_end_left.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_simple_end_left.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_simple_end_left.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -1169,12 +1195,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_simple_end_right_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_simple_end_right_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Superstructure Simple Right End",
|
description = bridge_desc .. " Truss Superstructure Simple Right End",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_simple_end_right.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_simple_end_right.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_simple_end_right.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_simple_end_right.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -1188,12 +1216,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_up_right_slant_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_up_right_slant_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Superstructure Up Right Slant",
|
description = bridge_desc .. " Truss Superstructure Up Right Slant",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_up_right_slant.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_up_right_slant.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_up_right_slant.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_up_right_slant.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -1268,12 +1298,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_up_left_slant_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_up_left_slant_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Superstructure Up Left Slant",
|
description = bridge_desc .. " Truss Superstructure Up Left Slant",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_up_left_slant.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_up_left_slant.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_up_left_slant.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_up_left_slant.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -1346,12 +1378,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_up_mid_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_up_mid_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Superstructure Up Middle",
|
description = bridge_desc .. " Truss Superstructure Up Middle",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_up_mid.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_up_mid.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_up_mid.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_up_mid.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -1455,12 +1489,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_up_simple_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_up_simple_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Superstructure Up Simple",
|
description = bridge_desc .. " Truss Superstructure Up Simple",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_up_simple.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_up_simple.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_up_simple.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_up_simple.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -1562,12 +1598,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_down_right_slant_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_down_right_slant_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Superstructure Down Right Slant",
|
description = bridge_desc .. " Truss Superstructure Down Right Slant",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_down_right_slant.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_down_right_slant.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_down_right_slant.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_down_right_slant.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -1640,12 +1678,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_down_left_slant_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_down_left_slant_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Superstructure Down Left Slant",
|
description = bridge_desc .. " Truss Superstructure Down Left Slant",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_down_left_slant.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_down_left_slant.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_down_left_slant.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_down_left_slant.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -1720,12 +1760,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_down_mid_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_down_mid_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Superstructure Down Middle",
|
description = bridge_desc .. " Truss Superstructure Down Middle",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_down_mid.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_down_mid.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_down_mid.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_down_mid.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -1829,12 +1871,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_down_simple_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_down_simple_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Superstructure Down Simple",
|
description = bridge_desc .. " Truss Superstructure Down Simple",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_down_simple.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_down_simple.png^[makealpha:255,126,126",
|
".png^bridges_superstructure_down_simple.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_superstructure_down_simple.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -1936,12 +1980,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_substructure_end_right_slant_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_substructure_end_right_slant_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Substructure End Right Slant",
|
description = bridge_desc .. " Truss Substructure End Right Slant",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_substructure_end_right_slant.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_substructure_end_right_slant.png^[makealpha:255,126,126",
|
".png^bridges_substructure_end_right_slant.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_substructure_end_right_slant.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -1998,12 +2044,14 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_substructure_end_left_slant_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_substructure_end_left_slant_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Substructure End Left Slant",
|
description = bridge_desc .. " Truss Substructure End Left Slant",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_substructure_end_left_slant.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color ..
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_substructure_end_left_slant.png^[makealpha:255,126,126",
|
".png^bridges_substructure_end_left_slant.png^[makealpha:255,126,126",
|
||||||
|
wield_image = "bridges_" .. bridge_color ..
|
||||||
|
".png^bridges_substructure_end_left_slant.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -2060,12 +2108,12 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_substructure_right_slant_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_substructure_right_slant_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Substructure Right Slant",
|
description = bridge_desc .. " Truss Substructure Right Slant",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_substructure_right_slant.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color .. ".png^bridges_substructure_right_slant.png^[makealpha:255,126,126",
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_substructure_right_slant.png^[makealpha:255,126,126",
|
wield_image = "bridges_" .. bridge_color .. ".png^bridges_substructure_right_slant.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -2123,12 +2171,12 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_substructure_left_slant_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_substructure_left_slant_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Substructure Left Slant",
|
description = bridge_desc .. " Truss Substructure Left Slant",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_substructure_left_slant.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color .. ".png^bridges_substructure_left_slant.png^[makealpha:255,126,126",
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_substructure_left_slant.png^[makealpha:255,126,126",
|
wield_image = "bridges_" .. bridge_color .. ".png^bridges_substructure_left_slant.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -2187,12 +2235,12 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_substructure_simple_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_substructure_simple_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Substructure Simple",
|
description = bridge_desc .. " Truss Substructure Simple",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_substructure_simple.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color .. ".png^bridges_substructure_simple.png^[makealpha:255,126,126",
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_substructure_simple.png^[makealpha:255,126,126",
|
wield_image = "bridges_" .. bridge_color .. ".png^bridges_substructure_simple.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -2275,12 +2323,12 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_substructure_mid_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_substructure_mid_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Substructure Middle",
|
description = bridge_desc .. " Truss Substructure Middle",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_substructure_mid.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color .. ".png^bridges_substructure_mid.png^[makealpha:255,126,126",
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_substructure_mid.png^[makealpha:255,126,126",
|
wield_image = "bridges_" .. bridge_color .. ".png^bridges_substructure_mid.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -2365,12 +2413,12 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:small_upper_chord_" .. bridge_colors, {
|
minetest.register_node("bridger:small_upper_chord_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Small Upper Chord",
|
description = bridge_desc .. " Small Upper Chord",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_small_upper_chord.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color .. ".png^bridges_small_upper_chord.png^[makealpha:255,126,126",
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_small_upper_chord.png^[makealpha:255,126,126",
|
wield_image = "bridges_" .. bridge_color .. ".png^bridges_small_upper_chord.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -2418,12 +2466,12 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:small_upper_chord_slanted_" .. bridge_colors, {
|
minetest.register_node("bridger:small_upper_chord_slanted_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Small Slanted Upper Chord",
|
description = bridge_desc .. " Small Slanted Upper Chord",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_small_upper_chord_slanted.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color .. ".png^bridges_small_upper_chord_slanted.png^[makealpha:255,126,126",
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_small_upper_chord_slanted.png^[makealpha:255,126,126",
|
wield_image = "bridges_" .. bridge_color .. ".png^bridges_small_upper_chord_slanted.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -2522,12 +2570,12 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:medium_upper_chord_" .. bridge_colors, {
|
minetest.register_node("bridger:medium_upper_chord_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Medium Upper Chord",
|
description = bridge_desc .. " Medium Upper Chord",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_medium_upper_chord.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color .. ".png^bridges_medium_upper_chord.png^[makealpha:255,126,126",
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_medium_upper_chord.png^[makealpha:255,126,126",
|
wield_image = "bridges_" .. bridge_color .. ".png^bridges_medium_upper_chord.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -2607,12 +2655,12 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:medium_upper_chord_slanted_" .. bridge_colors, {
|
minetest.register_node("bridger:medium_upper_chord_slanted_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Medium Slanted Upper Chord",
|
description = bridge_desc .. " Medium Slanted Upper Chord",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_medium_upper_chord_slanted.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color .. ".png^bridges_medium_upper_chord_slanted.png^[makealpha:255,126,126",
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_medium_upper_chord_slanted.png^[makealpha:255,126,126",
|
wield_image = "bridges_" .. bridge_color .. ".png^bridges_medium_upper_chord_slanted.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -2723,12 +2771,12 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:large_upper_chord_" .. bridge_colors, {
|
minetest.register_node("bridger:large_upper_chord_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Large Upper Chord",
|
description = bridge_desc .. " Large Upper Chord",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_large_upper_chord.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color .. ".png^bridges_large_upper_chord.png^[makealpha:255,126,126",
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_large_upper_chord.png^[makealpha:255,126,126",
|
wield_image = "bridges_" .. bridge_color .. ".png^bridges_large_upper_chord.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -2804,12 +2852,12 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:large_upper_chord_slanted_" .. bridge_colors, {
|
minetest.register_node("bridger:large_upper_chord_slanted_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Large Slanted Upper Chord",
|
description = bridge_desc .. " Large Slanted Upper Chord",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_large_upper_chord_slanted.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color .. ".png^bridges_large_upper_chord_slanted.png^[makealpha:255,126,126",
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_large_upper_chord_slanted.png^[makealpha:255,126,126",
|
wield_image = "bridges_" .. bridge_color .. ".png^bridges_large_upper_chord_slanted.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -2920,12 +2968,12 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:small_support_" .. bridge_colors, {
|
minetest.register_node("bridger:small_support_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Small Support",
|
description = bridge_desc .. " Small Support",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_small_support.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color .. ".png^bridges_small_support.png^[makealpha:255,126,126",
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_small_support.png^[makealpha:255,126,126",
|
wield_image = "bridges_" .. bridge_color .. ".png^bridges_small_support.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -3032,12 +3080,12 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:small_support_top_" .. bridge_colors, {
|
minetest.register_node("bridger:small_support_top_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Small Support Top",
|
description = bridge_desc .. " Small Support Top",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_small_support_top.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color .. ".png^bridges_small_support_top.png^[makealpha:255,126,126",
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_small_support_top.png^[makealpha:255,126,126",
|
wield_image = "bridges_" .. bridge_color .. ".png^bridges_small_support_top.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -3228,12 +3276,12 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:medium_support_" .. bridge_colors, {
|
minetest.register_node("bridger:medium_support_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Medium Support",
|
description = bridge_desc .. " Medium Support",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_medium_support.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color .. ".png^bridges_medium_support.png^[makealpha:255,126,126",
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_medium_support.png^[makealpha:255,126,126",
|
wield_image = "bridges_" .. bridge_color .. ".png^bridges_medium_support.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -3339,12 +3387,12 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:medium_support_bot_" .. bridge_colors, {
|
minetest.register_node("bridger:medium_support_bot_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Bottom Medium Support",
|
description = bridge_desc .. " Bottom Medium Support",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_medium_support_bot.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color .. ".png^bridges_medium_support_bot.png^[makealpha:255,126,126",
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_medium_support_bot.png^[makealpha:255,126,126",
|
wield_image = "bridges_" .. bridge_color .. ".png^bridges_medium_support_bot.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -3365,12 +3413,12 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:large_support_" .. bridge_colors, {
|
minetest.register_node("bridger:large_support_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Large Support",
|
description = bridge_desc .. " Large Support",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_large_support.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color .. ".png^bridges_large_support.png^[makealpha:255,126,126",
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_large_support.png^[makealpha:255,126,126",
|
wield_image = "bridges_" .. bridge_color .. ".png^bridges_large_support.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -3483,12 +3531,12 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:large_support_bot_" .. bridge_colors, {
|
minetest.register_node("bridger:large_support_bot_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Bottom Large Support",
|
description = bridge_desc .. " Bottom Large Support",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_large_support_bot.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color .. ".png^bridges_large_support_bot.png^[makealpha:255,126,126",
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_large_support_bot.png^[makealpha:255,126,126",
|
wield_image = "bridges_" .. bridge_color .. ".png^bridges_large_support_bot.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -3509,12 +3557,12 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_right_slant_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_right_slant_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Superstructure Right Slant",
|
description = bridge_desc .. " Truss Superstructure Right Slant",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_right_slant.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color .. ".png^bridges_superstructure_right_slant.png^[makealpha:255,126,126",
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_right_slant.png^[makealpha:255,126,126",
|
wield_image = "bridges_" .. bridge_color .. ".png^bridges_superstructure_right_slant.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -3574,12 +3622,12 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:truss_superstructure_left_slant_" .. bridge_colors, {
|
minetest.register_node("bridger:truss_superstructure_left_slant_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Truss Superstructure Left Slant",
|
description = bridge_desc .. " Truss Superstructure Left Slant",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_" .. bridge_color .. ".png"},
|
||||||
inventory_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_left_slant.png^[makealpha:255,126,126",
|
inventory_image = "bridges_" .. bridge_color .. ".png^bridges_superstructure_left_slant.png^[makealpha:255,126,126",
|
||||||
wield_image = "bridges_" .. bridge_colors .. ".png^bridges_superstructure_left_slant.png^[makealpha:255,126,126",
|
wield_image = "bridges_" .. bridge_color .. ".png^bridges_superstructure_left_slant.png^[makealpha:255,126,126",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -3639,10 +3687,10 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:corrugated_steel_" .. bridge_colors, {
|
minetest.register_node("bridger:corrugated_steel_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Corrugated Steel",
|
description = bridge_desc .. " Corrugated Steel",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_corrugated_steel_" .. bridge_colors .. ".png"},
|
tiles = {"bridges_corrugated_steel_" .. bridge_color .. ".png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -3662,10 +3710,10 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("bridger:corrugated_steel_ceiling_" .. bridge_colors, {
|
minetest.register_node("bridger:corrugated_steel_ceiling_" .. bridge_color, {
|
||||||
description = bridge_desc .. " Corrugated Steel Deck",
|
description = bridge_desc .. " Corrugated Steel Deck",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
tiles = {"bridges_corrugated_steel_" .. bridge_colors .. ".png^[transformR90"},
|
tiles = {"bridges_corrugated_steel_" .. bridge_color .. ".png^[transformR90"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -3681,7 +3729,7 @@ if not minetest.settings:get_bool("bridger_disable_trusses") then
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not minetest.settings:get_bool("bridger_disable_trestles") then
|
if minetest.settings:get_bool("bridger_enable_trestles", true) then
|
||||||
minetest.register_node("bridger:trestle_support", {
|
minetest.register_node("bridger:trestle_support", {
|
||||||
description = "Trestle Support",
|
description = "Trestle Support",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
|
@ -4092,7 +4140,7 @@ if not minetest.settings:get_bool("bridger_disable_trestles") then
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
if not minetest.settings:get_bool("bridger_disable_wooden_bridges") then
|
if minetest.settings:get_bool("bridger_enable_wooden_bridges", true) then
|
||||||
minetest.register_node("bridger:small_beam", {
|
minetest.register_node("bridger:small_beam", {
|
||||||
description = "Small Wooden Beam Bridge",
|
description = "Small Wooden Beam Bridge",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
|
@ -4453,7 +4501,7 @@ if not minetest.settings:get_bool("bridger_disable_wooden_bridges") then
|
||||||
|
|
||||||
local mesecon_on_blastnode = nil
|
local mesecon_on_blastnode = nil
|
||||||
if minetest.get_modpath("mesecons") then
|
if minetest.get_modpath("mesecons") then
|
||||||
mesecons_on_blastnode = mesecon.on_blastnode
|
mesecon_on_blastnode = mesecon.on_blastnode
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("bridger:large_beam_swivel_normal", {
|
minetest.register_node("bridger:large_beam_swivel_normal", {
|
||||||
|
|
|
@ -441,7 +441,10 @@ core.register_entity(":__builtin:item", {
|
||||||
|
|
||||||
step_gravity = function(self)
|
step_gravity = function(self)
|
||||||
|
|
||||||
if self.falling_state then
|
local vel = self.object:get_velocity()
|
||||||
|
|
||||||
|
-- apply gravity if falling or Y velocity not 0 (just incase)
|
||||||
|
if self.falling_state or (vel and vel.y ~= 0) then
|
||||||
self.accel.y = self.accel.y - gravity
|
self.accel.y = self.accel.y - gravity
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -138,7 +138,8 @@ function cart_entity:on_punch(puncher, time_from_last_punch, tool_capabilities,
|
||||||
end
|
end
|
||||||
|
|
||||||
local punch_interval = 1
|
local punch_interval = 1
|
||||||
if tool_capabilities and tool_capabilities.full_punch_interval then
|
-- Faulty tool registrations may cause the interval to be set to 0 !
|
||||||
|
if tool_capabilities and (tool_capabilities.full_punch_interval or 0) > 0 then
|
||||||
punch_interval = tool_capabilities.full_punch_interval
|
punch_interval = tool_capabilities.full_punch_interval
|
||||||
end
|
end
|
||||||
time_from_last_punch = math.min(time_from_last_punch or punch_interval, punch_interval)
|
time_from_last_punch = math.min(time_from_last_punch or punch_interval, punch_interval)
|
||||||
|
|
|
@ -135,15 +135,11 @@ local def = {
|
||||||
tiles = {"farming_cocoa_1.png"},
|
tiles = {"farming_cocoa_1.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
drop = {
|
|
||||||
items = {
|
|
||||||
{items = {"farming:cocoa_beans 1"}, rarity = 2},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
|
fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
|
||||||
},
|
},
|
||||||
|
drop = {},
|
||||||
groups = {
|
groups = {
|
||||||
snappy = 3, flammable = 2, plant = 1, growing = 1,
|
snappy = 3, flammable = 2, plant = 1, growing = 1,
|
||||||
not_in_creative_inventory = 1, leafdecay = 1, leafdecay_drop = 1
|
not_in_creative_inventory = 1, leafdecay = 1, leafdecay_drop = 1
|
||||||
|
|
|
@ -18,6 +18,10 @@ minetest.override_item("farming:rye", {
|
||||||
groups = {food_rye = 1, flammable = 4}
|
groups = {food_rye = 1, flammable = 4}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.override_item("farming:rye_1", {drop = {}})
|
||||||
|
minetest.override_item("farming:rye_2", {drop = {}})
|
||||||
|
minetest.override_item("farming:rye_3", {drop = {}})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "farming:flour",
|
output = "farming:flour",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -42,6 +46,10 @@ minetest.override_item("farming:oat", {
|
||||||
groups = {food_oats = 1, flammable = 4}
|
groups = {food_oats = 1, flammable = 4}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.override_item("farming:oat_1", {drop = {}})
|
||||||
|
minetest.override_item("farming:oat_2", {drop = {}})
|
||||||
|
minetest.override_item("farming:oat_3", {drop = {}})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "farming:flour",
|
output = "farming:flour",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -66,6 +74,10 @@ minetest.override_item("farming:rice", {
|
||||||
groups = {food_rice = 1, flammable = 4}
|
groups = {food_rice = 1, flammable = 4}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.override_item("farming:rice_1", {drop = {}})
|
||||||
|
minetest.override_item("farming:rice_2", {drop = {}})
|
||||||
|
minetest.override_item("farming:rice_3", {drop = {}})
|
||||||
|
|
||||||
minetest.register_craftitem("farming:rice_bread", {
|
minetest.register_craftitem("farming:rice_bread", {
|
||||||
description = S("Rice Bread"),
|
description = S("Rice Bread"),
|
||||||
inventory_image = "farming_rice_bread.png",
|
inventory_image = "farming_rice_bread.png",
|
||||||
|
|
|
@ -1,6 +1,34 @@
|
||||||
|
|
||||||
local S = farming.intllib
|
local S = farming.intllib
|
||||||
|
|
||||||
|
--= filter sea water into river water
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "bucket:bucket_river_water",
|
||||||
|
recipe = {
|
||||||
|
{"farming:hemp_fibre"},
|
||||||
|
{"farming:hemp_fibre"},
|
||||||
|
{"bucket:bucket_water"}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
--= glass of water
|
||||||
|
|
||||||
|
minetest.register_craftitem("farming:glass_water", {
|
||||||
|
description = S("Glass of Water"),
|
||||||
|
inventory_image = "farming_water_glass.png",
|
||||||
|
groups = {food_water_glass = 1, flammable = 3, vessel = 1}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "farming:glass_water 4",
|
||||||
|
recipe = {
|
||||||
|
{"vessels:drinking_glass", "vessels:drinking_glass"},
|
||||||
|
{"vessels:drinking_glass", "vessels:drinking_glass"},
|
||||||
|
{"bucket:bucket_river_water", ""}
|
||||||
|
},
|
||||||
|
replacements = {{"bucket:bucket_river_water", "bucket:bucket_empty"}}
|
||||||
|
})
|
||||||
|
|
||||||
--= Sugar
|
--= Sugar
|
||||||
|
|
||||||
minetest.register_craftitem("farming:sugar", {
|
minetest.register_craftitem("farming:sugar", {
|
||||||
|
|
|
@ -176,3 +176,6 @@ Created by sirrobzeroone (CC0)
|
||||||
|
|
||||||
Created by TechM8 (https://www.deviantart.com/techm8)
|
Created by TechM8 (https://www.deviantart.com/techm8)
|
||||||
farming_popcorn.png
|
farming_popcorn.png
|
||||||
|
|
||||||
|
Created by RZR0 (CC-BY-NC-SA)
|
||||||
|
farming_blueberry_pie.png
|
||||||
|
|
|
@ -21,7 +21,7 @@ Bottle of Hemp Oil=Flasche mit Hanföl
|
||||||
Bowl of Chili=Chili Schale
|
Bowl of Chili=Chili Schale
|
||||||
Bread=Brot
|
Bread=Brot
|
||||||
Bronze Hoe=Bronzehacke
|
Bronze Hoe=Bronzehacke
|
||||||
Cabbage=Salat
|
Cabbage=Weißkohl
|
||||||
Cactus Juice=Kaktussaft
|
Cactus Juice=Kaktussaft
|
||||||
Carrot=Möhre
|
Carrot=Möhre
|
||||||
Carrot Juice=Möhrensaft
|
Carrot Juice=Möhrensaft
|
||||||
|
@ -61,7 +61,7 @@ Hemp Seed=Hanfsamen
|
||||||
Hoe=Hacke
|
Hoe=Hacke
|
||||||
Hoe Bomb (use or throw on grassy areas to hoe land)=Hackbombe (Auf Grasland werfen oder benutzen)
|
Hoe Bomb (use or throw on grassy areas to hoe land)=Hackbombe (Auf Grasland werfen oder benutzen)
|
||||||
Jack 'O Lantern (punch to turn on and off)=Kürbislaterne (Punch zum Ein- und Ausschalten)
|
Jack 'O Lantern (punch to turn on and off)=Kürbislaterne (Punch zum Ein- und Ausschalten)
|
||||||
Jaffa Cake=Jaffa-Torte
|
Jaffa Cake=Jaffakeks
|
||||||
Juicer=Entsafter
|
Juicer=Entsafter
|
||||||
Melon=Melone
|
Melon=Melone
|
||||||
Melon Slice=Melonenscheibe
|
Melon Slice=Melonenscheibe
|
||||||
|
@ -88,7 +88,7 @@ Pineapple=Ananas
|
||||||
Pineapple Juice=Ananassaft
|
Pineapple Juice=Ananassaft
|
||||||
Pineapple Ring=Ananasscheibe
|
Pineapple Ring=Ananasscheibe
|
||||||
Pineapple Top=Ananasdeckel
|
Pineapple Top=Ananasdeckel
|
||||||
Porridge=Brei
|
Porridge=Haferbrei
|
||||||
Potato=Kartoffel
|
Potato=Kartoffel
|
||||||
Pumpkin=Kürbis
|
Pumpkin=Kürbis
|
||||||
Pumpkin Bread=Kürbisbrot
|
Pumpkin Bread=Kürbisbrot
|
||||||
|
|
|
@ -60,7 +60,7 @@ Hemp Rope=麻绳
|
||||||
Hemp Seed=大麻籽
|
Hemp Seed=大麻籽
|
||||||
Hoe=锄头
|
Hoe=锄头
|
||||||
Hoe Bomb (use or throw on grassy areas to hoe land)=锄弹(在草地上使用或扔在锄地上)
|
Hoe Bomb (use or throw on grassy areas to hoe land)=锄弹(在草地上使用或扔在锄地上)
|
||||||
Jack 'O Lantern (punch to turn on and off)=杰克灯(按一下开关)
|
Jack 'O Lantern (punch to turn on and off)=南瓜灯(按一下开关)
|
||||||
Jaffa Cake=佳发饼
|
Jaffa Cake=佳发饼
|
||||||
Juicer=榨汁机
|
Juicer=榨汁机
|
||||||
Melon=甜瓜
|
Melon=甜瓜
|
||||||
|
@ -118,7 +118,7 @@ Steel Hoe=钢锄头
|
||||||
Stone Hoe=石锄
|
Stone Hoe=石锄
|
||||||
Straw=稻草
|
Straw=稻草
|
||||||
Strawberry=草莓
|
Strawberry=草莓
|
||||||
String=字符串
|
String=线
|
||||||
Sugar=糖
|
Sugar=糖
|
||||||
Toast=烤面包片
|
Toast=烤面包片
|
||||||
Toast Sandwich=三明治面包
|
Toast Sandwich=三明治面包
|
||||||
|
|
|
@ -60,7 +60,7 @@ Hemp Rope=麻繩
|
||||||
Hemp Seed=大麻籽
|
Hemp Seed=大麻籽
|
||||||
Hoe=鋤頭
|
Hoe=鋤頭
|
||||||
Hoe Bomb (use or throw on grassy areas to hoe land)=鋤彈(在草地上使用或扔在鋤地上)
|
Hoe Bomb (use or throw on grassy areas to hoe land)=鋤彈(在草地上使用或扔在鋤地上)
|
||||||
Jack 'O Lantern (punch to turn on and off)=傑克燈(按一下開關)
|
Jack 'O Lantern (punch to turn on and off)=南瓜燈(按一下開關)
|
||||||
Jaffa Cake=佳發餅
|
Jaffa Cake=佳發餅
|
||||||
Juicer=榨汁機
|
Juicer=榨汁機
|
||||||
Melon=甜瓜
|
Melon=甜瓜
|
||||||
|
@ -118,7 +118,7 @@ Steel Hoe=鋼鋤頭
|
||||||
Stone Hoe=石鋤
|
Stone Hoe=石鋤
|
||||||
Straw=稻草
|
Straw=稻草
|
||||||
Strawberry=草莓
|
Strawberry=草莓
|
||||||
String=字符串
|
String=線
|
||||||
Sugar=糖
|
Sugar=糖
|
||||||
Toast=烤麵包片
|
Toast=烤麵包片
|
||||||
Toast Sandwich=三明治麵包
|
Toast Sandwich=三明治麵包
|
||||||
|
|
|
@ -72,6 +72,8 @@ if minetest.get_modpath("lucky_block") then
|
||||||
{name = "farming:seed_rice", max = 15},
|
{name = "farming:seed_rice", max = 15},
|
||||||
{name = "farming:seed_oat", max = 15},
|
{name = "farming:seed_oat", max = 15},
|
||||||
{name = "farming:soil_wet", max = 10},
|
{name = "farming:soil_wet", max = 10},
|
||||||
|
{name = "farming:cotton_wild", max = 5},
|
||||||
|
{name = "farming:grapebush", max = 5},
|
||||||
}},
|
}},
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
BIN
mods/farming/textures/farming_water_glass.png
Normal file
After Width: | Height: | Size: 167 B |
|
@ -102,7 +102,7 @@ function flowerpot.register_node(nodename)
|
||||||
|
|
||||||
local dropname = nodename:gsub("grass_%d", "grass_1")
|
local dropname = nodename:gsub("grass_%d", "grass_1")
|
||||||
|
|
||||||
minetest.register_node("flowerpot:" .. name, {
|
minetest.register_node(":flowerpot:" .. name, {
|
||||||
description = S("Flowerpot with @1", desc),
|
description = S("Flowerpot with @1", desc),
|
||||||
drawtype = "mesh",
|
drawtype = "mesh",
|
||||||
mesh = "flowerpot.obj",
|
mesh = "flowerpot.obj",
|
||||||
|
|
|
@ -8,7 +8,7 @@ local use_cmi = minetest.global_exists("cmi")
|
||||||
|
|
||||||
mobs = {
|
mobs = {
|
||||||
mod = "redo",
|
mod = "redo",
|
||||||
version = "20210614",
|
version = "20210722",
|
||||||
intllib = S,
|
intllib = S,
|
||||||
invis = minetest.global_exists("invisibility") and invisibility or {}
|
invis = minetest.global_exists("invisibility") and invisibility or {}
|
||||||
}
|
}
|
||||||
|
@ -56,6 +56,7 @@ local disable_blood = settings:get_bool("mobs_disable_blood")
|
||||||
local mobs_drop_items = settings:get_bool("mobs_drop_items") ~= false
|
local mobs_drop_items = settings:get_bool("mobs_drop_items") ~= false
|
||||||
local mobs_griefing = settings:get_bool("mobs_griefing") ~= false
|
local mobs_griefing = settings:get_bool("mobs_griefing") ~= false
|
||||||
local spawn_protected = settings:get_bool("mobs_spawn_protected") ~= false
|
local spawn_protected = settings:get_bool("mobs_spawn_protected") ~= false
|
||||||
|
local spawn_monster_protected = settings:get_bool("mobs_spawn_monster_protected") ~= false
|
||||||
local remove_far = settings:get_bool("remove_far_mobs") ~= false
|
local remove_far = settings:get_bool("remove_far_mobs") ~= false
|
||||||
local mob_area_spawn = settings:get_bool("mob_area_spawn")
|
local mob_area_spawn = settings:get_bool("mob_area_spawn")
|
||||||
local difficulty = tonumber(settings:get("mob_difficulty")) or 1.0
|
local difficulty = tonumber(settings:get("mob_difficulty")) or 1.0
|
||||||
|
@ -82,7 +83,7 @@ local aoc_range = tonumber(settings:get("active_block_range")) * 16
|
||||||
-- pathfinding settings
|
-- pathfinding settings
|
||||||
local enable_pathfinding = true
|
local enable_pathfinding = true
|
||||||
local stuck_timeout = 3 -- how long before stuck mod starts searching
|
local stuck_timeout = 3 -- how long before stuck mod starts searching
|
||||||
local stuck_path_timeout = 10 -- how long will mob follow path before giving up
|
local stuck_path_timeout = 5 -- how long will mob follow path before giving up
|
||||||
|
|
||||||
-- default nodes
|
-- default nodes
|
||||||
local node_fire = "fire:basic_flame"
|
local node_fire = "fire:basic_flame"
|
||||||
|
@ -273,7 +274,9 @@ function mob_class:set_velocity(v)
|
||||||
-- halt mob if it has been ordered to stay
|
-- halt mob if it has been ordered to stay
|
||||||
if self.order == "stand" then
|
if self.order == "stand" then
|
||||||
|
|
||||||
self.object:set_velocity({x = 0, y = 0, z = 0})
|
local vel = self.object:get_velocity() or {y = 0}
|
||||||
|
|
||||||
|
self.object:set_velocity({x = 0, y = vel.y, z = 0})
|
||||||
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -1651,6 +1654,8 @@ local can_dig_drop = function(pos)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local pathfinder_mod = minetest.get_modpath("pathfinder")
|
||||||
-- path finding and smart mob routine by rnd,
|
-- path finding and smart mob routine by rnd,
|
||||||
-- line_of_sight and other edits by Elkien3
|
-- line_of_sight and other edits by Elkien3
|
||||||
function mob_class:smart_mobs(s, p, dist, dtime)
|
function mob_class:smart_mobs(s, p, dist, dtime)
|
||||||
|
@ -1779,13 +1784,18 @@ function mob_class:smart_mobs(s, p, dist, dtime)
|
||||||
jumpheight = 1
|
jumpheight = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
self.path.way = minetest.find_path(s, p1, 16, jumpheight,
|
if pathfinder_mod then
|
||||||
dropheight, "Dijkstra")
|
self.path.way = pathfinder.find_path(s, p1, self, dtime)
|
||||||
|
else
|
||||||
|
self.path.way = minetest.find_path(s, p1, 16, jumpheight,
|
||||||
|
dropheight, "Dijkstra")
|
||||||
|
end
|
||||||
--[[
|
--[[
|
||||||
-- show path using particles
|
-- show path using particles
|
||||||
if self.path.way and #self.path.way > 0 then
|
if self.path.way and #self.path.way > 0 then
|
||||||
|
|
||||||
print("-- path length:" .. tonumber(#self.path.way))
|
print("-- path length:" .. tonumber(#self.path.way))
|
||||||
|
|
||||||
for _,pos in pairs(self.path.way) do
|
for _,pos in pairs(self.path.way) do
|
||||||
minetest.add_particle({
|
minetest.add_particle({
|
||||||
pos = pos,
|
pos = pos,
|
||||||
|
@ -3956,8 +3966,10 @@ function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light, inter
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- mobs cannot spawn in protected areas when enabled
|
-- check if mob can spawn inside protected areas
|
||||||
if not spawn_protected
|
if (spawn_protected == false
|
||||||
|
or (spawn_monster_protected == false
|
||||||
|
and minetest.registered_entities[name].type == "monster"))
|
||||||
and minetest.is_protected(pos, "") then
|
and minetest.is_protected(pos, "") then
|
||||||
--print("--- inside protected area", name)
|
--print("--- inside protected area", name)
|
||||||
return
|
return
|
||||||
|
|
|
@ -699,6 +699,8 @@ External Settings for "minetest.conf"
|
||||||
is false)
|
is false)
|
||||||
'mobs_spawn_protected' if set to false then mobs will not spawn in protected
|
'mobs_spawn_protected' if set to false then mobs will not spawn in protected
|
||||||
areas (default is true)
|
areas (default is true)
|
||||||
|
'mobs_spawn_monster_protected' if set to false then monsters will not spawn in
|
||||||
|
protected areas (default is true)
|
||||||
'remove_far_mobs' if true then untamed mobs that are outside players
|
'remove_far_mobs' if true then untamed mobs that are outside players
|
||||||
visual range will be removed (default is true)
|
visual range will be removed (default is true)
|
||||||
'mobname' can change specific mob chance rate (0 to disable) and
|
'mobname' can change specific mob chance rate (0 to disable) and
|
||||||
|
|
|
@ -10,7 +10,6 @@ minetest.register_craftitem("mobs:nametag", {
|
||||||
|
|
||||||
if minetest.get_modpath("dye") and minetest.get_modpath("farming") then
|
if minetest.get_modpath("dye") and minetest.get_modpath("farming") then
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
-- type = "shapeless",
|
|
||||||
output = "mobs:nametag",
|
output = "mobs:nametag",
|
||||||
recipe = {{"default:paper", "dye:black", "farming:string"}}
|
recipe = {{"default:paper", "dye:black", "farming:string"}}
|
||||||
})
|
})
|
||||||
|
@ -149,7 +148,7 @@ minetest.register_craft({
|
||||||
|
|
||||||
|
|
||||||
-- make sure we can register fences
|
-- make sure we can register fences
|
||||||
if default.register_fence then
|
if minetest.get_modpath("default") and default.register_fence then
|
||||||
|
|
||||||
-- mob fence (looks like normal fence but collision is 2 high)
|
-- mob fence (looks like normal fence but collision is 2 high)
|
||||||
default.register_fence("mobs:fence_wood", {
|
default.register_fence("mobs:fence_wood", {
|
||||||
|
@ -165,6 +164,7 @@ default.register_fence("mobs:fence_wood", {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
-- mob fence top (has enlarged collisionbox to stop mobs getting over)
|
-- mob fence top (has enlarged collisionbox to stop mobs getting over)
|
||||||
minetest.register_node("mobs:fence_top", {
|
minetest.register_node("mobs:fence_top", {
|
||||||
|
@ -197,8 +197,6 @@ minetest.register_craft({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-- items that can be used as fuel
|
-- items that can be used as fuel
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
@ -361,9 +359,9 @@ minetest.register_node("mobs:meatblock", {
|
||||||
tiles = {"mobs_meat_top.png", "mobs_meat_bottom.png", "mobs_meat_side.png"},
|
tiles = {"mobs_meat_top.png", "mobs_meat_bottom.png", "mobs_meat_side.png"},
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
groups = {choppy = 1, oddly_breakable_by_hand = 1, flammable = 2},
|
groups = {choppy = 1, oddly_breakable_by_hand = 1, flammable = 2},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default and default.node_sound_leaves_defaults(),
|
||||||
on_place = minetest.rotate_node,
|
on_place = minetest.rotate_node,
|
||||||
on_use = minetest.item_eat(20),
|
on_use = minetest.item_eat(20)
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
default
|
default?
|
||||||
tnt?
|
tnt?
|
||||||
dye?
|
dye?
|
||||||
farming?
|
farming?
|
||||||
|
@ -7,3 +7,4 @@ intllib?
|
||||||
lucky_block?
|
lucky_block?
|
||||||
cmi?
|
cmi?
|
||||||
toolranks?
|
toolranks?
|
||||||
|
pathfinder?
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
name = mobs
|
name = mobs
|
||||||
depends = default
|
depends =
|
||||||
optional_depends = tnt, dye, farming, invisibility, intllib, lucky_block, cmi, toolranks
|
optional_depends = default, tnt, dye, farming, invisibility, intllib, lucky_block, cmi, toolranks, pathfinder
|
||||||
description = Adds a mob api for mods to add animals or monsters etc.
|
description = Adds a mob api for mods to add animals or monsters etc.
|
||||||
|
|
|
@ -23,7 +23,7 @@ Lucky Blocks: 9
|
||||||
|
|
||||||
|
|
||||||
Changelog:
|
Changelog:
|
||||||
- 1.55 - Add 'peaceful_player' privelage and setting so mobs don't attack specific players (thanks sfence)
|
- 1.55 - Add 'peaceful_player' privelage and setting so mobs don't attack specific players (thanks sfence), add support for MarkBu's pathfinder mod, remove need for default mod
|
||||||
- 1.54 - Simplified animal breeding function, added editable settings (thanks Wuzzy), Child mobs now take 20 mins to grow up, reverted to simple mob spawning with setting to use area checks, on_flop added, air_damage added.
|
- 1.54 - Simplified animal breeding function, added editable settings (thanks Wuzzy), Child mobs now take 20 mins to grow up, reverted to simple mob spawning with setting to use area checks, on_flop added, air_damage added.
|
||||||
- 1.53 - Added 'on_map_load' settings to mobs:spawn so that mobs will only spawn when new areas of map are loaded.
|
- 1.53 - Added 'on_map_load' settings to mobs:spawn so that mobs will only spawn when new areas of map are loaded.
|
||||||
- 1.52 - Added 'mob_active_limit' in settings to set number of mobs in game,
|
- 1.52 - Added 'mob_active_limit' in settings to set number of mobs in game,
|
||||||
|
|
|
@ -13,6 +13,9 @@ mobs_griefing (Griefing Mobs) bool true
|
||||||
# If false then Mobs no longer spawn inside player protected areas
|
# If false then Mobs no longer spawn inside player protected areas
|
||||||
mobs_spawn_protected (Spawn Mobs in protected areas) bool true
|
mobs_spawn_protected (Spawn Mobs in protected areas) bool true
|
||||||
|
|
||||||
|
# If false then Monsters no longer spawn inside player protected areas
|
||||||
|
mobs_spawn_monster_protected (Spawn Monsters in protected areas) bool true
|
||||||
|
|
||||||
# If true Mobs will be removed once a map chunk is out of view
|
# If true Mobs will be removed once a map chunk is out of view
|
||||||
remove_far_mobs (Remove far Mobs) bool true
|
remove_far_mobs (Remove far Mobs) bool true
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [2.2.0] - 2021-06-28
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Refactored recipe override mechanism to avoid re-coding recipes
|
- Refactored recipe override mechanism to avoid re-coding recipes
|
||||||
|
@ -131,7 +133,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||||
|
|
||||||
- Initial versioned release.
|
- Initial versioned release.
|
||||||
|
|
||||||
[Unreleased]: https://github.com/minetest-mods/moreblocks/compare/v2.1.0...HEAD
|
[Unreleased]: https://github.com/minetest-mods/moreblocks/compare/v2.2.0...HEAD
|
||||||
|
[2.2.0]: https://github.com/minetest-mods/moreblocks/compare/v2.1.0...v2.2.0
|
||||||
[2.1.0]: https://github.com/minetest-mods/moreblocks/compare/v2.0.0...v2.1.0
|
[2.1.0]: https://github.com/minetest-mods/moreblocks/compare/v2.0.0...v2.1.0
|
||||||
[2.0.0]: https://github.com/minetest-mods/moreblocks/compare/v1.3.0...v2.0.0
|
[2.0.0]: https://github.com/minetest-mods/moreblocks/compare/v1.3.0...v2.0.0
|
||||||
[1.3.0]: https://github.com/minetest-mods/moreblocks/compare/v1.2.0...v1.3.0
|
[1.3.0]: https://github.com/minetest-mods/moreblocks/compare/v1.2.0...v1.3.0
|
||||||
|
|
|
@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [2.1.0] - 2021-06-28
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- More Ores tools now have [`toolranks`](https://github.com/lisacvuk/minetest-toolranks) support.
|
- More Ores tools now have [`toolranks`](https://github.com/lisacvuk/minetest-toolranks) support.
|
||||||
|
@ -61,6 +63,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||||
|
|
||||||
- Initial versioned release.
|
- Initial versioned release.
|
||||||
|
|
||||||
[Unreleased]: https://github.com/minetest-mods/moreores/compare/v2.0.0...HEAD
|
[Unreleased]: https://github.com/minetest-mods/moreores/compare/v2.1.0...HEAD
|
||||||
|
[2.1.0]: https://github.com/minetest-mods/moreores/compare/v2.0.0...v2.1.0
|
||||||
[2.0.0]: https://github.com/minetest-mods/moreores/compare/v1.1.0...v2.0.0
|
[2.0.0]: https://github.com/minetest-mods/moreores/compare/v1.1.0...v2.0.0
|
||||||
[1.1.0]: https://github.com/minetest-mods/moreores/compare/v1.0.0...v1.1.0
|
[1.1.0]: https://github.com/minetest-mods/moreores/compare/v1.0.0...v1.1.0
|
||||||
|
|
|
@ -199,7 +199,7 @@ abstract_bushes.grow_bush_node = function(pos,dir, leaf_type)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"stoneage:grass_with_silex",
|
"stoneage:grass_with_silex",
|
||||||
|
@ -244,7 +244,7 @@ abstract_bushes.grow_youngtree_node2 = function(pos, height)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"stoneage:grass_with_silex",
|
"stoneage:grass_with_silex",
|
||||||
|
|
|
@ -30,7 +30,7 @@ local modpath = minetest.get_modpath('bushes_classic')
|
||||||
dofile(modpath..'/cooking.lua')
|
dofile(modpath..'/cooking.lua')
|
||||||
dofile(modpath..'/nodes.lua')
|
dofile(modpath..'/nodes.lua')
|
||||||
|
|
||||||
biome_lib:spawn_on_surfaces({
|
biome_lib.register_active_spawner({
|
||||||
spawn_delay = 3600,
|
spawn_delay = 3600,
|
||||||
spawn_plants = bushes_classic.spawn_list,
|
spawn_plants = bushes_classic.spawn_list,
|
||||||
avoid_radius = 10,
|
avoid_radius = 10,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--Map Generation Stuff
|
--Map Generation Stuff
|
||||||
|
|
||||||
biome_lib:register_generate_plant(
|
biome_lib.register_on_generate(
|
||||||
{
|
{
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
|
@ -20,7 +20,7 @@ biome_lib:register_generate_plant(
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
biome_lib:register_generate_plant(
|
biome_lib.register_on_generate(
|
||||||
{
|
{
|
||||||
surface = {
|
surface = {
|
||||||
"default:desert_sand",
|
"default:desert_sand",
|
||||||
|
|
|
@ -92,7 +92,7 @@ minetest.register_node("dryplants:juncus_02", {
|
||||||
-- GENERATE SMALL JUNCUS
|
-- GENERATE SMALL JUNCUS
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
-- near water or swamp
|
-- near water or swamp
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
--"default:desert_sand",
|
--"default:desert_sand",
|
||||||
|
@ -113,7 +113,7 @@ biome_lib:register_generate_plant({
|
||||||
abstract_dryplants.grow_juncus
|
abstract_dryplants.grow_juncus
|
||||||
)
|
)
|
||||||
-- at dunes/beach
|
-- at dunes/beach
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
--"default:dirt_with_grass",
|
--"default:dirt_with_grass",
|
||||||
--"default:desert_sand",
|
--"default:desert_sand",
|
||||||
|
|
|
@ -12,7 +12,7 @@ abstract_dryplants.grow_grass_variation = function(pos)
|
||||||
minetest.swap_node(right_here, {name="dryplants:grass_short"})
|
minetest.swap_node(right_here, {name="dryplants:grass_short"})
|
||||||
end
|
end
|
||||||
|
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
},
|
},
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
-- Looked at code from: default
|
-- Looked at code from: default
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
biome_lib:register_generate_plant(
|
biome_lib.register_on_generate(
|
||||||
{
|
{
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
|
|
|
@ -327,7 +327,7 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
-- SPAWN REEDMACE
|
-- SPAWN REEDMACE
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
--[[biome_lib:spawn_on_surfaces({
|
--[[biome_lib.register_active_spawner({
|
||||||
spawn_delay = 1200,
|
spawn_delay = 1200,
|
||||||
spawn_plants = {"dryplants:reedmace_sapling"},
|
spawn_plants = {"dryplants:reedmace_sapling"},
|
||||||
spawn_chance = 400,
|
spawn_chance = 400,
|
||||||
|
@ -348,7 +348,7 @@ minetest.register_entity("dryplants:reedmace_water_entity",{
|
||||||
-- GENERATE REEDMACE
|
-- GENERATE REEDMACE
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
-- near water or swamp
|
-- near water or swamp
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:desert_sand",
|
"default:desert_sand",
|
||||||
|
@ -369,7 +369,7 @@ biome_lib:register_generate_plant({
|
||||||
abstract_dryplants.grow_reedmace
|
abstract_dryplants.grow_reedmace
|
||||||
)
|
)
|
||||||
-- in water
|
-- in water
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt",
|
"default:dirt",
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
|
@ -392,7 +392,7 @@ biome_lib:register_generate_plant({
|
||||||
abstract_dryplants.grow_reedmace_water
|
abstract_dryplants.grow_reedmace_water
|
||||||
)
|
)
|
||||||
-- for oases & tropical beaches & tropical swamps
|
-- for oases & tropical beaches & tropical swamps
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:sand",
|
"default:sand",
|
||||||
"sumpf:sumpf"
|
"sumpf:sumpf"
|
||||||
|
|
|
@ -87,7 +87,7 @@ end
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
if abstract_ferns.config.lady_ferns_near_tree == true then
|
if abstract_ferns.config.lady_ferns_near_tree == true then
|
||||||
biome_lib:register_generate_plant({ -- near trees (woodlands)
|
biome_lib.register_on_generate({ -- near trees (woodlands)
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:mossycobble",
|
"default:mossycobble",
|
||||||
|
@ -116,7 +116,7 @@ if abstract_ferns.config.lady_ferns_near_tree == true then
|
||||||
end
|
end
|
||||||
|
|
||||||
if abstract_ferns.config.lady_ferns_near_rock == true then
|
if abstract_ferns.config.lady_ferns_near_rock == true then
|
||||||
biome_lib:register_generate_plant({ -- near stone (mountains)
|
biome_lib.register_on_generate({ -- near stone (mountains)
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:mossycobble",
|
"default:mossycobble",
|
||||||
|
@ -143,7 +143,7 @@ if abstract_ferns.config.lady_ferns_near_rock == true then
|
||||||
end
|
end
|
||||||
|
|
||||||
if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a huge fps drop
|
if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a huge fps drop
|
||||||
biome_lib:register_generate_plant({ -- near ores (potential mining sites)
|
biome_lib.register_on_generate({ -- near ores (potential mining sites)
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:mossycobble",
|
"default:mossycobble",
|
||||||
|
@ -183,7 +183,7 @@ if abstract_ferns.config.lady_ferns_near_ores == true then -- this one causes a
|
||||||
end
|
end
|
||||||
|
|
||||||
if abstract_ferns.config.lady_ferns_in_groups == true then -- this one is meant as a replacement of Ferns_near_Ores
|
if abstract_ferns.config.lady_ferns_in_groups == true then -- this one is meant as a replacement of Ferns_near_Ores
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:mossycobble",
|
"default:mossycobble",
|
||||||
|
|
|
@ -295,7 +295,7 @@ minetest.register_abm({
|
||||||
|
|
||||||
-- in jungles
|
-- in jungles
|
||||||
if abstract_ferns.config.enable_giant_treeferns_in_jungle == true then
|
if abstract_ferns.config.enable_giant_treeferns_in_jungle == true then
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
||||||
|
@ -321,7 +321,7 @@ end
|
||||||
|
|
||||||
-- for oases & tropical beaches
|
-- for oases & tropical beaches
|
||||||
if abstract_ferns.config.enable_giant_treeferns_in_oases == true then
|
if abstract_ferns.config.enable_giant_treeferns_in_oases == true then
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:sand"--,
|
"default:sand"--,
|
||||||
--"default:desert_sand"
|
--"default:desert_sand"
|
||||||
|
|
|
@ -75,7 +75,7 @@ create_nodes()
|
||||||
-- Spawning
|
-- Spawning
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
if abstract_ferns.config.enable_horsetails_spawning == true then
|
if abstract_ferns.config.enable_horsetails_spawning == true then
|
||||||
biome_lib:spawn_on_surfaces({
|
biome_lib.register_active_spawner({
|
||||||
spawn_delay = 1200,
|
spawn_delay = 1200,
|
||||||
spawn_plants = node_names,
|
spawn_plants = node_names,
|
||||||
spawn_chance = 400,
|
spawn_chance = 400,
|
||||||
|
@ -104,7 +104,7 @@ end
|
||||||
-----------------------------------------------------------------------------------------------
|
-----------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
if abstract_ferns.config.enable_horsetails_on_grass == true then
|
if abstract_ferns.config.enable_horsetails_on_grass == true then
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:dirt_with_coniferous_litter", -- minetest >= 0.5
|
"default:dirt_with_coniferous_litter", -- minetest >= 0.5
|
||||||
|
@ -137,7 +137,7 @@ if abstract_ferns.config.enable_horsetails_on_grass == true then
|
||||||
end
|
end
|
||||||
|
|
||||||
if abstract_ferns.config.enable_horsetails_on_stones == true then
|
if abstract_ferns.config.enable_horsetails_on_stones == true then
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:gravel", -- roots go deep
|
"default:gravel", -- roots go deep
|
||||||
"default:mossycobble",
|
"default:mossycobble",
|
||||||
|
|
|
@ -181,7 +181,7 @@ minetest.register_abm({
|
||||||
|
|
||||||
-- in jungles
|
-- in jungles
|
||||||
if abstract_ferns.config.enable_treeferns_in_jungle == true then
|
if abstract_ferns.config.enable_treeferns_in_jungle == true then
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
"default:dirt_with_rainforest_litter", -- minetest >= 0.4.16
|
||||||
|
@ -210,7 +210,7 @@ end
|
||||||
|
|
||||||
-- for oases & tropical beaches
|
-- for oases & tropical beaches
|
||||||
if abstract_ferns.config.enable_treeferns_in_oases == true then
|
if abstract_ferns.config.enable_treeferns_in_oases == true then
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:sand"--,
|
"default:sand"--,
|
||||||
--"default:desert_sand"
|
--"default:desert_sand"
|
||||||
|
|
|
@ -78,16 +78,16 @@ for i in ipairs(lilies_list) do
|
||||||
local above_node = minetest.get_node(pt.above)
|
local above_node = minetest.get_node(pt.above)
|
||||||
local top_node = minetest.get_node(top_pos)
|
local top_node = minetest.get_node(top_pos)
|
||||||
|
|
||||||
if biome_lib:get_nodedef_field(under_node.name, "buildable_to") then
|
if biome_lib.get_nodedef_field(under_node.name, "buildable_to") then
|
||||||
if under_node.name ~= "default:water_source" then
|
if under_node.name ~= "default:water_source" then
|
||||||
place_pos = pt.under
|
place_pos = pt.under
|
||||||
elseif top_node.name ~= "default:water_source"
|
elseif top_node.name ~= "default:water_source"
|
||||||
and biome_lib:get_nodedef_field(top_node.name, "buildable_to") then
|
and biome_lib.get_nodedef_field(top_node.name, "buildable_to") then
|
||||||
place_pos = top_pos
|
place_pos = top_pos
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
elseif biome_lib:get_nodedef_field(above_node.name, "buildable_to") then
|
elseif biome_lib.get_nodedef_field(above_node.name, "buildable_to") then
|
||||||
place_pos = pt.above
|
place_pos = pt.above
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -178,18 +178,19 @@ for i in ipairs(algae_list) do
|
||||||
local above_node = minetest.get_node(pt.above)
|
local above_node = minetest.get_node(pt.above)
|
||||||
local top_node = minetest.get_node(top_pos)
|
local top_node = minetest.get_node(top_pos)
|
||||||
|
|
||||||
if biome_lib:get_nodedef_field(under_node.name, "buildable_to") then
|
if biome_lib.get_nodedef_field(under_node.name, "buildable_to") then
|
||||||
if under_node.name ~= "default:water_source" then
|
if under_node.name ~= "default:water_source" then
|
||||||
place_pos = pt.under
|
place_pos = pt.under
|
||||||
elseif top_node.name ~= "default:water_source"
|
elseif top_node.name ~= "default:water_source"
|
||||||
and biome_lib:get_nodedef_field(top_node.name, "buildable_to") then
|
and biome_lib.get_nodedef_field(top_node.name, "buildable_to") then
|
||||||
place_pos = top_pos
|
place_pos = top_pos
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
elseif biome_lib:get_nodedef_field(above_node.name, "buildable_to") then
|
elseif biome_lib.get_nodedef_field(above_node.name, "buildable_to") then
|
||||||
place_pos = pt.above
|
place_pos = pt.above
|
||||||
end
|
end
|
||||||
|
if not place_pos then return end -- something went wrong :P
|
||||||
|
|
||||||
if not minetest.is_protected(place_pos, placer:get_player_name()) then
|
if not minetest.is_protected(place_pos, placer:get_player_name()) then
|
||||||
|
|
||||||
|
@ -243,7 +244,7 @@ minetest.register_node(":flowers:sunflower", {
|
||||||
walkable = false,
|
walkable = false,
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
groups = { dig_immediate=3, flora=1, flammable=3 },
|
groups = { dig_immediate=3, flora=1, flammable=3, attached_node=1 },
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
selection_box = box,
|
selection_box = box,
|
||||||
collision_box = box,
|
collision_box = box,
|
||||||
|
@ -299,7 +300,7 @@ flowers_plus.grow_waterlily = function(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {"default:water_source"},
|
surface = {"default:water_source"},
|
||||||
max_count = lilies_max_count,
|
max_count = lilies_max_count,
|
||||||
rarity = lilies_rarity,
|
rarity = lilies_rarity,
|
||||||
|
@ -321,7 +322,7 @@ flowers_plus.grow_seaweed = function(pos)
|
||||||
minetest.swap_node(right_here, {name="along_shore:seaweed_"..math.random(1,4), param2=math.random(1,3)})
|
minetest.swap_node(right_here, {name="along_shore:seaweed_"..math.random(1,4), param2=math.random(1,3)})
|
||||||
end
|
end
|
||||||
|
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {"default:water_source"},
|
surface = {"default:water_source"},
|
||||||
max_count = seaweed_max_count,
|
max_count = seaweed_max_count,
|
||||||
rarity = seaweed_rarity,
|
rarity = seaweed_rarity,
|
||||||
|
@ -338,7 +339,7 @@ biome_lib:register_generate_plant({
|
||||||
|
|
||||||
-- seaweed at beaches
|
-- seaweed at beaches
|
||||||
-- MM: not satisfied with it, but IMHO some beaches should have some algae
|
-- MM: not satisfied with it, but IMHO some beaches should have some algae
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {"default:water_source"},
|
surface = {"default:water_source"},
|
||||||
max_count = seaweed_max_count,
|
max_count = seaweed_max_count,
|
||||||
rarity = seaweed_rarity,
|
rarity = seaweed_rarity,
|
||||||
|
@ -354,7 +355,7 @@ biome_lib:register_generate_plant({
|
||||||
},
|
},
|
||||||
flowers_plus.grow_seaweed
|
flowers_plus.grow_seaweed
|
||||||
)
|
)
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {"default:sand"},
|
surface = {"default:sand"},
|
||||||
max_count = seaweed_max_count*2,
|
max_count = seaweed_max_count*2,
|
||||||
rarity = seaweed_rarity/2,
|
rarity = seaweed_rarity/2,
|
||||||
|
@ -371,7 +372,7 @@ biome_lib:register_generate_plant({
|
||||||
flowers_plus.grow_seaweed
|
flowers_plus.grow_seaweed
|
||||||
)
|
)
|
||||||
|
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {"default:dirt_with_grass"},
|
surface = {"default:dirt_with_grass"},
|
||||||
avoid_nodes = { "flowers:sunflower" },
|
avoid_nodes = { "flowers:sunflower" },
|
||||||
max_count = sunflowers_max_count,
|
max_count = sunflowers_max_count,
|
||||||
|
@ -386,7 +387,7 @@ biome_lib:register_generate_plant({
|
||||||
|
|
||||||
-- spawn ABM registrations
|
-- spawn ABM registrations
|
||||||
|
|
||||||
biome_lib:spawn_on_surfaces({
|
biome_lib.register_active_spawner({
|
||||||
spawn_delay = SPAWN_DELAY/2,
|
spawn_delay = SPAWN_DELAY/2,
|
||||||
spawn_plants = {
|
spawn_plants = {
|
||||||
"flowers:waterlily",
|
"flowers:waterlily",
|
||||||
|
@ -408,7 +409,7 @@ biome_lib:spawn_on_surfaces({
|
||||||
random_facedir = {0,3}
|
random_facedir = {0,3}
|
||||||
})
|
})
|
||||||
|
|
||||||
biome_lib:spawn_on_surfaces({
|
biome_lib.register_active_spawner({
|
||||||
spawn_delay = SPAWN_DELAY*2,
|
spawn_delay = SPAWN_DELAY*2,
|
||||||
spawn_plants = {"flowers:seaweed"},
|
spawn_plants = {"flowers:seaweed"},
|
||||||
spawn_chance = SPAWN_CHANCE*2,
|
spawn_chance = SPAWN_CHANCE*2,
|
||||||
|
@ -421,7 +422,7 @@ biome_lib:spawn_on_surfaces({
|
||||||
facedir = 1
|
facedir = 1
|
||||||
})
|
})
|
||||||
|
|
||||||
biome_lib:spawn_on_surfaces({
|
biome_lib.register_active_spawner({
|
||||||
spawn_delay = SPAWN_DELAY*2,
|
spawn_delay = SPAWN_DELAY*2,
|
||||||
spawn_plants = {"flowers:seaweed"},
|
spawn_plants = {"flowers:seaweed"},
|
||||||
spawn_chance = SPAWN_CHANCE*2,
|
spawn_chance = SPAWN_CHANCE*2,
|
||||||
|
@ -435,7 +436,7 @@ biome_lib:spawn_on_surfaces({
|
||||||
facedir = 1
|
facedir = 1
|
||||||
})
|
})
|
||||||
|
|
||||||
biome_lib:spawn_on_surfaces({
|
biome_lib.register_active_spawner({
|
||||||
spawn_delay = SPAWN_DELAY*2,
|
spawn_delay = SPAWN_DELAY*2,
|
||||||
spawn_plants = {"flowers:seaweed"},
|
spawn_plants = {"flowers:seaweed"},
|
||||||
spawn_chance = SPAWN_CHANCE*2,
|
spawn_chance = SPAWN_CHANCE*2,
|
||||||
|
@ -449,7 +450,7 @@ biome_lib:spawn_on_surfaces({
|
||||||
facedir = 1
|
facedir = 1
|
||||||
})
|
})
|
||||||
|
|
||||||
biome_lib:spawn_on_surfaces({
|
biome_lib.register_active_spawner({
|
||||||
spawn_delay = SPAWN_DELAY*2,
|
spawn_delay = SPAWN_DELAY*2,
|
||||||
spawn_plants = {"flowers:sunflower"},
|
spawn_plants = {"flowers:sunflower"},
|
||||||
spawn_chance = SPAWN_CHANCE*2,
|
spawn_chance = SPAWN_CHANCE*2,
|
||||||
|
|
|
@ -62,7 +62,7 @@ abstract_molehills.place_molehill = function(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {"default:dirt_with_grass"},
|
surface = {"default:dirt_with_grass"},
|
||||||
max_count = Molehills_Max_Count,
|
max_count = Molehills_Max_Count,
|
||||||
rarity = Molehills_Rarity,
|
rarity = Molehills_Rarity,
|
||||||
|
|
|
@ -70,7 +70,7 @@ minetest.register_node('poisonivy:climbing', {
|
||||||
buildable_to = true,
|
buildable_to = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
biome_lib:spawn_on_surfaces({
|
biome_lib.register_active_spawner({
|
||||||
spawn_delay = SPAWN_DELAY,
|
spawn_delay = SPAWN_DELAY,
|
||||||
spawn_plants = {"poisonivy:seedling"},
|
spawn_plants = {"poisonivy:seedling"},
|
||||||
avoid_radius = 10,
|
avoid_radius = 10,
|
||||||
|
@ -83,7 +83,7 @@ biome_lib:spawn_on_surfaces({
|
||||||
verticals_list = walls_list
|
verticals_list = walls_list
|
||||||
})
|
})
|
||||||
|
|
||||||
biome_lib:grow_plants({
|
biome_lib.update_plant({
|
||||||
grow_delay = SPAWN_DELAY,
|
grow_delay = SPAWN_DELAY,
|
||||||
grow_chance = GROW_CHANCE,
|
grow_chance = GROW_CHANCE,
|
||||||
grow_plant = "poisonivy:seedling",
|
grow_plant = "poisonivy:seedling",
|
||||||
|
@ -91,7 +91,7 @@ biome_lib:grow_plants({
|
||||||
grow_nodes = {"default:dirt_with_grass"}
|
grow_nodes = {"default:dirt_with_grass"}
|
||||||
})
|
})
|
||||||
|
|
||||||
biome_lib:grow_plants({
|
biome_lib.update_plant({
|
||||||
grow_delay = GROW_DELAY,
|
grow_delay = GROW_DELAY,
|
||||||
grow_chance = GROW_CHANCE*2,
|
grow_chance = GROW_CHANCE*2,
|
||||||
grow_plant = "poisonivy:climbing",
|
grow_plant = "poisonivy:climbing",
|
||||||
|
|
|
@ -169,7 +169,7 @@ abstract_trunks.place_twig = function(pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
if Twigs_on_ground == true then
|
if Twigs_on_ground == true then
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {"default:dirt_with_grass"},
|
surface = {"default:dirt_with_grass"},
|
||||||
max_count = Twigs_on_ground_Max_Count,
|
max_count = Twigs_on_ground_Max_Count,
|
||||||
rarity = Twigs_on_ground_Rarity,
|
rarity = Twigs_on_ground_Rarity,
|
||||||
|
@ -186,7 +186,7 @@ biome_lib:register_generate_plant({
|
||||||
end
|
end
|
||||||
|
|
||||||
if Twigs_on_water == true then
|
if Twigs_on_water == true then
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {"default:water_source"},
|
surface = {"default:water_source"},
|
||||||
max_count = Twigs_on_water_Max_Count,
|
max_count = Twigs_on_water_Max_Count,
|
||||||
rarity = Twigs_on_water_Rarity,
|
rarity = Twigs_on_water_Rarity,
|
||||||
|
@ -348,7 +348,7 @@ abstract_trunks.place_trunk = function(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {"default:dirt_with_grass"},
|
surface = {"default:dirt_with_grass"},
|
||||||
max_count = Trunks_Max_Count, -- 320,
|
max_count = Trunks_Max_Count, -- 320,
|
||||||
rarity = Trunks_Rarity, -- 99,
|
rarity = Trunks_Rarity, -- 99,
|
||||||
|
@ -382,7 +382,7 @@ abstract_trunks.grow_moss_on_ground = function(pos)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {"default:dirt_with_grass"},
|
surface = {"default:dirt_with_grass"},
|
||||||
max_count = Moss_on_ground_Max_Count,
|
max_count = Moss_on_ground_Max_Count,
|
||||||
rarity = Moss_on_ground_Rarity,
|
rarity = Moss_on_ground_Rarity,
|
||||||
|
@ -471,7 +471,7 @@ abstract_trunks.grow_moss_on_trunk = function(pos)
|
||||||
--end
|
--end
|
||||||
end
|
end
|
||||||
|
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:tree",
|
"default:tree",
|
||||||
"default:jungletree",
|
"default:jungletree",
|
||||||
|
@ -548,7 +548,7 @@ abstract_trunks.grow_roots = function(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {"group:tree"},
|
surface = {"group:tree"},
|
||||||
max_count = 1000,
|
max_count = 1000,
|
||||||
rarity = 1,
|
rarity = 1,
|
||||||
|
|
|
@ -95,6 +95,7 @@ for r = 0, 3 do
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
node_box = cbox,
|
node_box = cbox,
|
||||||
|
buildable_to = true,
|
||||||
groups = {snappy = 3, flammable = 3, attached_node=1, not_in_creative_inventory = r},
|
groups = {snappy = 3, flammable = 3, attached_node=1, not_in_creative_inventory = r},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
drop = "trunks:moss_plain_0",
|
drop = "trunks:moss_plain_0",
|
||||||
|
@ -114,6 +115,7 @@ for r = 0, 3 do
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
node_box = cbox,
|
node_box = cbox,
|
||||||
|
buildable_to = true,
|
||||||
groups = {snappy = 3, flammable = 3, attached_node=1, not_in_creative_inventory = r},
|
groups = {snappy = 3, flammable = 3, attached_node=1, not_in_creative_inventory = r},
|
||||||
sounds = default.node_sound_leaves_defaults(),
|
sounds = default.node_sound_leaves_defaults(),
|
||||||
drop = "trunks:moss_with_fungus_0",
|
drop = "trunks:moss_with_fungus_0",
|
||||||
|
|
|
@ -133,7 +133,7 @@ vines.register_vine = function( name, defs, biome )
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
biome_lib:spawn_on_surfaces(biome)
|
biome_lib.register_active_spawner(biome)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- ALIASES
|
-- ALIASES
|
||||||
|
|
|
@ -73,7 +73,7 @@ abstract_woodsoils.place_soil = function(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"group:tree",
|
"group:tree",
|
||||||
"ferns:fern_03",
|
"ferns:fern_03",
|
||||||
|
@ -94,7 +94,7 @@ biome_lib:register_generate_plant({
|
||||||
"abstract_woodsoils.place_soil"
|
"abstract_woodsoils.place_soil"
|
||||||
)
|
)
|
||||||
|
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"moretrees:apple_tree_sapling_ongen",
|
"moretrees:apple_tree_sapling_ongen",
|
||||||
"moretrees:beech_sapling_ongen",
|
"moretrees:beech_sapling_ongen",
|
||||||
|
|
|
@ -133,7 +133,7 @@ abstract_youngtrees.grow_youngtree_node = function(pos, height)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
biome_lib:register_generate_plant({
|
biome_lib.register_on_generate({
|
||||||
surface = {
|
surface = {
|
||||||
"default:dirt_with_grass",
|
"default:dirt_with_grass",
|
||||||
"stoneage:grass_with_silex",
|
"stoneage:grass_with_silex",
|
||||||
|
|
|
@ -291,13 +291,15 @@ local punchy = function(
|
||||||
end
|
end
|
||||||
-- END tool damage
|
-- END tool damage
|
||||||
|
|
||||||
-- print ("---", player:get_player_name(), damage)
|
local kb = math.min(32, damage * 2)
|
||||||
|
|
||||||
|
-- print ("---", player:get_player_name(), damage, kb)
|
||||||
|
|
||||||
-- knock back player
|
-- knock back player
|
||||||
player:add_velocity({
|
player:add_velocity({
|
||||||
x = dir.x * (damage * 2),
|
x = dir.x * kb,
|
||||||
y = -1,
|
y = -1,
|
||||||
z = dir.z * (damage * 2)
|
z = dir.z * kb
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ minetest.register_chatcommand("protector_replace", {
|
||||||
|
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
nodenames = {"protector:protect", "protector:protect2", "protector:protect_hidden"},
|
nodenames = {"protector:protect", "protector:protect2", "protector:protect_hidden"},
|
||||||
interval = 8,
|
interval = 6,
|
||||||
chance = 1,
|
chance = 1,
|
||||||
catch_up = false,
|
catch_up = false,
|
||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
|
|
|
@ -625,14 +625,17 @@ minetest.register_node("protector:chest", {
|
||||||
|
|
||||||
local spos = pos.x .. "," .. pos.y .. "," ..pos.z
|
local spos = pos.x .. "," .. pos.y .. "," ..pos.z
|
||||||
local formspec = "size[8,9]"
|
local formspec = "size[8,9]"
|
||||||
-- .. default.gui_bg
|
|
||||||
-- .. default.gui_bg_img
|
|
||||||
-- .. default.gui_slots
|
|
||||||
.. "list[nodemeta:".. spos .. ";main;0,0.3;8,4;]"
|
.. "list[nodemeta:".. spos .. ";main;0,0.3;8,4;]"
|
||||||
.. "button[0,4.5;2,0.25;toup;" .. F(S("To Chest")) .. "]"
|
|
||||||
.. "field[2.3,4.8;4,0.25;chestname;;"
|
.. "image_button[-0.01,4.26;1.05,0.8;protector_up_icon.png;protect_up;]"
|
||||||
|
.. "image_button[0.98,4.26;1.05,0.8;protector_down_icon.png;protect_down;]"
|
||||||
|
.. "tooltip[protect_up;" .. S("To Chest") .. "]"
|
||||||
|
.. "tooltip[protect_down;" .. S("To Inventory") .. "]"
|
||||||
|
|
||||||
|
.. "field[2.3,4.8;4,0.25;protect_name;;"
|
||||||
.. meta:get_string("name") .. "]"
|
.. meta:get_string("name") .. "]"
|
||||||
.. "button[6,4.5;2,0.25;todn;" .. F(S("To Inventory")) .. "]"
|
.. "button[5.99,4.5;2.05,0.25;protect_rename;" .. S("Rename") .. "]"
|
||||||
|
|
||||||
.. "list[current_player;main;0,5;8,1;]"
|
.. "list[current_player;main;0,5;8,1;]"
|
||||||
.. "list[current_player;main;0,6.08;8,3;8]"
|
.. "list[current_player;main;0,6.08;8,3;8]"
|
||||||
.. "listring[nodemeta:" .. spos .. ";main]"
|
.. "listring[nodemeta:" .. spos .. ";main]"
|
||||||
|
@ -691,22 +694,22 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
local player_inv = player:get_inventory()
|
local player_inv = player:get_inventory()
|
||||||
|
|
||||||
-- copy contents of player inventory to chest
|
-- copy contents of player inventory to chest
|
||||||
if fields.toup then
|
if fields.protect_up then
|
||||||
|
|
||||||
to_from(player_inv, chest_inv)
|
to_from(player_inv, chest_inv)
|
||||||
|
|
||||||
-- copy contents of chest to player inventory
|
-- copy contents of chest to player inventory
|
||||||
elseif fields.todn then
|
elseif fields.protect_down then
|
||||||
|
|
||||||
to_from(chest_inv, player_inv)
|
to_from(chest_inv, player_inv)
|
||||||
|
|
||||||
elseif fields.chestname then
|
elseif fields.protect_name or fields.protect_rename then
|
||||||
|
|
||||||
-- change chest infotext to display name
|
-- change chest infotext to display name
|
||||||
if fields.chestname ~= "" then
|
if fields.protect_name ~= "" then
|
||||||
|
|
||||||
meta:set_string("name", fields.chestname)
|
meta:set_string("name", fields.protect_name)
|
||||||
meta:set_string("infotext", fields.chestname)
|
meta:set_string("infotext", fields.protect_name)
|
||||||
else
|
else
|
||||||
meta:set_string("name", S("Protected Chest"))
|
meta:set_string("name", S("Protected Chest"))
|
||||||
meta:set_string("infotext", S("Protected Chest"))
|
meta:set_string("infotext", S("Protected Chest"))
|
||||||
|
|
|
@ -5,7 +5,7 @@ default = default or {
|
||||||
node_sound_wood_defaults = function(table) end,
|
node_sound_wood_defaults = function(table) end,
|
||||||
gui_bg = "",
|
gui_bg = "",
|
||||||
gui_bg_img = "",
|
gui_bg_img = "",
|
||||||
gui_slots = "",
|
gui_slots = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Load support for intllib.
|
-- Load support for intllib.
|
||||||
|
@ -374,9 +374,9 @@ function minetest.is_protected(pos, digger)
|
||||||
if protector_hurt > 0 and player:get_hp() > 0 then
|
if protector_hurt > 0 and player:get_hp() > 0 then
|
||||||
|
|
||||||
-- This delay fixes item duplication bug (thanks luk3yx)
|
-- This delay fixes item duplication bug (thanks luk3yx)
|
||||||
minetest.after(0.1, function()
|
minetest.after(0.1, function(player)
|
||||||
player:set_hp(player:get_hp() - protector_hurt)
|
player:set_hp(player:get_hp() - protector_hurt)
|
||||||
end)
|
end, player)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- flip player when protection violated
|
-- flip player when protection violated
|
||||||
|
@ -651,15 +651,13 @@ minetest.register_node("protector:protect2", {
|
||||||
|
|
||||||
-- recipes to switch between protectors
|
-- recipes to switch between protectors
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
|
||||||
output = "protector:protect",
|
output = "protector:protect",
|
||||||
recipe = {"protector:protect2"}
|
recipe = {{"protector:protect2"}}
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
|
||||||
output = "protector:protect2",
|
output = "protector:protect2",
|
||||||
recipe = {"protector:protect"}
|
recipe = {{"protector:protect"}}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,3 +28,7 @@ following textures by TenPlus1 (CC BY-SA 3.0):
|
||||||
protector_logo.png
|
protector_logo.png
|
||||||
protector_display.png
|
protector_display.png
|
||||||
protector_overlay.png
|
protector_overlay.png
|
||||||
|
|
||||||
|
following textures by Kilbith (CC BY-SA 3.0):
|
||||||
|
protector_up_icon.png
|
||||||
|
protector_down_icon.png (both rotated)
|
||||||
|
|
BIN
mods/protector/textures/protector_down_icon.png
Normal file
After Width: | Height: | Size: 481 B |
BIN
mods/protector/textures/protector_up_icon.png
Normal file
After Width: | Height: | Size: 478 B |
|
@ -950,7 +950,7 @@ local use_glow = function(pos, node, puncher, pointed_thing)
|
||||||
end
|
end
|
||||||
|
|
||||||
local glow_drops = function(pos, oldnode, oldmetadata, digger)
|
local glow_drops = function(pos, oldnode, oldmetadata, digger)
|
||||||
if minetest.is_creative_enabled(digger:get_player_name()) then
|
if digger and minetest.is_creative_enabled(digger:get_player_name()) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local glow = oldmetadata and oldmetadata.fields and oldmetadata.fields.glow
|
local glow = oldmetadata and oldmetadata.fields and oldmetadata.fields.glow
|
||||||
|
|
|
@ -5,7 +5,7 @@ function skins.get_player_skin(player)
|
||||||
local meta = player:get_meta()
|
local meta = player:get_meta()
|
||||||
if meta:get("skinsdb:skin_key") then
|
if meta:get("skinsdb:skin_key") then
|
||||||
-- Move player data prior July 2018 to mod storage
|
-- Move player data prior July 2018 to mod storage
|
||||||
storage:set_string(player:get_player_name(), player:get_string("skinsdb:skin_key"))
|
storage:set_string(player:get_player_name(), meta:get_string("skinsdb:skin_key"))
|
||||||
meta:set_string("skinsdb:skin_key", "")
|
meta:set_string("skinsdb:skin_key", "")
|
||||||
end
|
end
|
||||||
local skin = storage:get_string(player:get_player_name())
|
local skin = storage:get_string(player:get_player_name())
|
||||||
|
|
3
mods/skinsdb/meta/character_2076.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
character_yellow_sam
|
||||||
|
sam_0
|
||||||
|
CC BY-NC-SA 3.0
|
3
mods/skinsdb/meta/character_2077.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Steve Final Smash
|
||||||
|
GreninjaGamer230
|
||||||
|
CC BY-NC-SA 3.0
|
3
mods/skinsdb/meta/character_2078.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Luigi poltergust
|
||||||
|
GreninjaGamer230
|
||||||
|
CC BY-NC-SA 3.0
|
3
mods/skinsdb/meta/character_2079.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Iron Man Mk.50
|
||||||
|
GreninjaGamer230
|
||||||
|
CC BY-SA 3.0
|
3
mods/skinsdb/meta/character_2080.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Shark Boy
|
||||||
|
GreninjaGamer230
|
||||||
|
CC BY-NC-SA 3.0
|
3
mods/skinsdb/meta/character_2081.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Steve in final smash phase
|
||||||
|
GreninjaGamer230
|
||||||
|
CC BY-NC-SA 3.0
|
3
mods/skinsdb/meta/character_2082.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Mario Mash-up pack (Wii U-Switch Pack)
|
||||||
|
GreninjaGamer230
|
||||||
|
CC BY-SA 3.0
|
3
mods/skinsdb/meta/character_2083.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Ash Greninja
|
||||||
|
GreninjaGamer230
|
||||||
|
CC BY-SA 3.0
|
3
mods/skinsdb/meta/character_2084.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Lint BOTW
|
||||||
|
GreninjaGamer230
|
||||||
|
CC BY-NC-SA 3.0
|
3
mods/skinsdb/meta/character_2085.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Lloyd Ninjago
|
||||||
|
GreninjaGamer230
|
||||||
|
CC BY-NC-SA 3.0
|
3
mods/skinsdb/meta/character_2086.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
MUD1
|
||||||
|
MUD1
|
||||||
|
CC BY-SA 3.0
|
3
mods/skinsdb/meta/character_2087.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Gamingoont
|
||||||
|
Gamingoont
|
||||||
|
CC BY-SA 3.0
|
3
mods/skinsdb/meta/character_2088.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
rudzik8
|
||||||
|
rudzik8
|
||||||
|
CC BY 4.0
|
3
mods/skinsdb/meta/character_2089.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Pharaoh Farao Faraon
|
||||||
|
Ezequiel Gustavo Martinez
|
||||||
|
CC BY-SA 3.0
|
3
mods/skinsdb/meta/character_2090.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Vlad
|
||||||
|
ElVladiskov-Meteorofbullshit
|
||||||
|
CC BY-NC-SA 3.0
|