update
This commit is contained in:
parent
773dd3e119
commit
b999fa4dc5
22 changed files with 325 additions and 108 deletions
|
@ -93,6 +93,7 @@ function atc.train_reset_command(train, keep_tarvel)
|
|||
train.atc_delay=nil
|
||||
train.atc_brake_target=nil
|
||||
train.atc_wait_finish=nil
|
||||
train.atc_wait_autocouple=nil
|
||||
train.atc_arrow=nil
|
||||
if not keep_tarvel then
|
||||
train.tarvelocity=nil
|
||||
|
|
|
@ -1316,14 +1316,23 @@ function advtrains.register_wagon(sysname_p, prototype, desc, inv_img, nincreati
|
|||
minetest.register_entity(":"..sysname,prototype)
|
||||
advtrains.wagon_prototypes[sysname] = prototype
|
||||
|
||||
--group classification to make recipe searching easier
|
||||
local wagon_groups = { not_in_creative_inventory = nincreative and 1 or 0}
|
||||
if prototype.is_locomotive then wagon_groups['at_loco'] = 1 end
|
||||
if prototype.seat_groups then
|
||||
if prototype.seat_groups.dstand then wagon_groups['at_control'] = 1 end
|
||||
if prototype.seat_groups.pass then wagon_groups['at_pax'] = 1 end
|
||||
end
|
||||
if prototype.has_inventory then wagon_groups['at_freight'] = 1 end
|
||||
|
||||
minetest.register_craftitem(":"..sysname, {
|
||||
description = desc,
|
||||
inventory_image = inv_img,
|
||||
wield_image = inv_img,
|
||||
stack_max = 1,
|
||||
|
||||
groups = { not_in_creative_inventory = nincreative and 1 or 0},
|
||||
|
||||
groups = wagon_groups,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if not pointed_thing.type == "node" then
|
||||
return
|
||||
|
|
5
mods/advtrains/advtrains_luaautomation/README.md
Normal file → Executable file
5
mods/advtrains/advtrains_luaautomation/README.md
Normal file → Executable file
|
@ -314,13 +314,16 @@ Deprecated:
|
|||
|
||||
|
||||
#### Interlocking
|
||||
This additional function is available when advtrains_interlocking is enabled:
|
||||
These additional functions are available when advtrains_interlocking is enabled:
|
||||
|
||||
- `atc_set_ars_disable(boolean)`
|
||||
Disables (true) or enables (false) the use of ARS for this train. The train will not trigger ARS (automatic route setting) on signals then.
|
||||
|
||||
Note: If you want to disable ARS from an approach callback, the call to `atc_set_ars_disable(true)` *must* happen during the approach callback, and may not be deferred to an interrupt(). Else the train might trigger an ARS before the interrupt fires.
|
||||
|
||||
- `section_occupancy(section_id)`
|
||||
Returns a table of train ids for the specified section, nil if no section id is provided, false if the section id is invalid, an empty table if the section id is valid but empty of trains.
|
||||
|
||||
#### Approach callbacks
|
||||
The LuaATC interface provides a way to hook into the approach callback system, which is for example used in the TSR rails (provided by advtrains_interlocking) or the station tracks (provided by advtrains_lines). However, for compatibility reasons, this behavior needs to be explicitly enabled.
|
||||
|
||||
|
|
|
@ -130,9 +130,8 @@ function r.fire_event(pos, evtdata, appr_internal)
|
|||
get_rc = function()
|
||||
return train.routingcode
|
||||
end,
|
||||
atc_reset = function(cmd)
|
||||
atc_reset = function()
|
||||
if not train_id then return false end
|
||||
assertt(cmd, "string")
|
||||
advtrains.atc.train_reset_command(train)
|
||||
return true
|
||||
end,
|
||||
|
|
12
mods/advtrains/advtrains_luaautomation/environment.lua
Normal file → Executable file
12
mods/advtrains/advtrains_luaautomation/environment.lua
Normal file → Executable file
|
@ -223,6 +223,18 @@ if advtrains.interlocking then
|
|||
local pos = atlatc.pcnaming.resolve_pos(signal)
|
||||
return advtrains.interlocking.signal_set_aspect(pos)
|
||||
end
|
||||
|
||||
--section_occupancy()
|
||||
static_env.section_occupancy = function(ts_id)
|
||||
if not ts_id then return nil end
|
||||
ts_id = tostring(ts_id)
|
||||
local response = advtrains.interlocking.db.get_ts(ts_id)
|
||||
if response == nil then
|
||||
return false
|
||||
else
|
||||
return response.trains
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Lines-specific:
|
||||
|
|
|
@ -216,39 +216,95 @@ local function get_far_node(pos)
|
|||
return node
|
||||
end
|
||||
|
||||
|
||||
local function show_fc_formspec(pos,player)
|
||||
local pname = player:get_player_name()
|
||||
if minetest.is_protected(pos,pname) then
|
||||
minetest.chat_send_player(pname, "Position is protected!")
|
||||
return
|
||||
end
|
||||
|
||||
local meta = minetest.get_meta(pos)
|
||||
local fc = meta:get_string("fc") or ""
|
||||
|
||||
local form = 'formspec_version[4]'..
|
||||
'size[10,5]'..
|
||||
'label[0.5,0.4;Advtrains Loading/Unloading Track]'..
|
||||
'label[0.5,1.1;Set the code to match against the wagon\'s freight code]'..
|
||||
'label[0.5,1.6;A blank field matches all wagons (default)]'..
|
||||
'label[0.5,2.1;Use code # to disable the track section]'..
|
||||
'field[0.5,3;5.5,1;fc;FC;'..minetest.formspec_escape(fc)..']'..
|
||||
'button[6.5,3;3,1;save;Submit]'
|
||||
minetest.show_formspec(pname, "at_load_unload_"..advtrains.encode_pos(pos), form)
|
||||
end
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
local pname = player:get_player_name()
|
||||
local pe = string.match(formname, "^at_load_unload_(............)$")
|
||||
local pos = advtrains.decode_pos(pe)
|
||||
if pos then
|
||||
if minetest.is_protected(pos, pname) then
|
||||
minetest.chat_send_player(pname, "Position is protected!")
|
||||
return
|
||||
end
|
||||
|
||||
if fields.save then
|
||||
minetest.get_meta(pos):set_string("fc",tostring(fields.fc))
|
||||
minetest.chat_send_player(pname,"Freight code set: "..tostring(fields.fc))
|
||||
show_fc_formspec(pos,player)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
local function train_load(pos, train_id, unload)
|
||||
local train=advtrains.trains[train_id]
|
||||
local below = get_far_node({x=pos.x, y=pos.y-1, z=pos.z})
|
||||
if not string.match(below.name, "chest") then
|
||||
atprint("this is not a chest! at "..minetest.pos_to_string(pos))
|
||||
return
|
||||
end
|
||||
local inv = minetest.get_inventory({type="node", pos={x=pos.x, y=pos.y-1, z=pos.z}})
|
||||
if inv and train.velocity < 2 then
|
||||
for k, v in ipairs(train.trainparts) do
|
||||
|
||||
local train=advtrains.trains[train_id]
|
||||
local below = get_far_node({x=pos.x, y=pos.y-1, z=pos.z})
|
||||
if not string.match(below.name, "chest") then
|
||||
atprint("this is not a chest! at "..minetest.pos_to_string(pos))
|
||||
return
|
||||
end
|
||||
|
||||
local node_fc = minetest.get_meta(pos):get_string("fc") or ""
|
||||
if node_fc == "#" then
|
||||
--track section is disabled
|
||||
return
|
||||
end
|
||||
|
||||
local inv = minetest.get_inventory({type="node", pos={x=pos.x, y=pos.y-1, z=pos.z}})
|
||||
if inv and train.velocity < 2 then
|
||||
for k, v in ipairs(train.trainparts) do
|
||||
local i=minetest.get_inventory({type="detached", name="advtrains_wgn_"..v})
|
||||
if i and i:get_list("box") then
|
||||
if not unload then
|
||||
for _, item in ipairs(inv:get_list("main")) do
|
||||
if i:get_list("box") and i:room_for_item("box", item) then
|
||||
i:add_item("box", item)
|
||||
inv:remove_item("main", item)
|
||||
|
||||
local wagon_data = advtrains.wagons[v]
|
||||
local wagon_fc
|
||||
if wagon_data.fc then
|
||||
if not wagon_data.fcind then wagon_data.fcind = 1 end
|
||||
wagon_fc = tostring(wagon_data.fc[wagon_data.fcind]) or ""
|
||||
end
|
||||
|
||||
if node_fc == "" or wagon_fc == node_fc then
|
||||
if not unload then
|
||||
for _, item in ipairs(inv:get_list("main")) do
|
||||
if i:get_list("box") and i:room_for_item("box", item) then
|
||||
i:add_item("box", item)
|
||||
inv:remove_item("main", item)
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
for _, item in ipairs(i:get_list("box")) do
|
||||
if inv:get_list("main") and inv:room_for_item("main", item) then
|
||||
i:remove_item("box", item)
|
||||
inv:add_item("main", item)
|
||||
else
|
||||
for _, item in ipairs(i:get_list("box")) do
|
||||
if inv:get_list("main") and inv:room_for_item("main", item) then
|
||||
i:remove_item("box", item)
|
||||
inv:add_item("main", item)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -262,15 +318,18 @@ advtrains.register_tracks("default", {
|
|||
formats={},
|
||||
get_additional_definiton = function(def, preset, suffix, rotation)
|
||||
return {
|
||||
after_dig_node=function(pos)
|
||||
advtrains.invalidate_all_paths()
|
||||
advtrains.ndb.clear(pos)
|
||||
end,
|
||||
advtrains = {
|
||||
on_train_enter = function(pos, train_id)
|
||||
train_load(pos, train_id, true)
|
||||
end,
|
||||
},
|
||||
after_dig_node=function(pos)
|
||||
advtrains.invalidate_all_paths()
|
||||
advtrains.ndb.clear(pos)
|
||||
end,
|
||||
on_rightclick = function(pos, node, player)
|
||||
show_fc_formspec(pos, player)
|
||||
end,
|
||||
advtrains = {
|
||||
on_train_enter = function(pos, train_id)
|
||||
train_load(pos, train_id, true)
|
||||
end,
|
||||
},
|
||||
}
|
||||
end
|
||||
}, advtrains.trackpresets.t_30deg_straightonly)
|
||||
|
@ -284,16 +343,18 @@ advtrains.register_tracks("default", {
|
|||
formats={},
|
||||
get_additional_definiton = function(def, preset, suffix, rotation)
|
||||
return {
|
||||
after_dig_node=function(pos)
|
||||
advtrains.invalidate_all_paths()
|
||||
advtrains.ndb.clear(pos)
|
||||
end,
|
||||
|
||||
advtrains = {
|
||||
on_train_enter = function(pos, train_id)
|
||||
train_load(pos, train_id, false)
|
||||
end,
|
||||
},
|
||||
after_dig_node=function(pos)
|
||||
advtrains.invalidate_all_paths()
|
||||
advtrains.ndb.clear(pos)
|
||||
end,
|
||||
on_rightclick = function(pos, node, player)
|
||||
show_fc_formspec(pos, player)
|
||||
end,
|
||||
advtrains = {
|
||||
on_train_enter = function(pos, train_id)
|
||||
train_load(pos, train_id, false)
|
||||
end,
|
||||
},
|
||||
}
|
||||
end
|
||||
}, advtrains.trackpresets.t_30deg_straightonly)
|
||||
|
|
|
@ -218,7 +218,7 @@ function mobs.drive(entity, moving_anim, stand_anim, can_fly, dtime)
|
|||
end
|
||||
|
||||
local acce_y = 0
|
||||
local velo = entity.object:get_velocity()
|
||||
local velo = entity.object:get_velocity() ; if not velo then return end
|
||||
|
||||
entity.v = get_v(velo) * get_sign(entity.v)
|
||||
|
||||
|
@ -427,7 +427,7 @@ end
|
|||
-- directional flying routine by D00Med (edited by TenPlus1)
|
||||
function mobs.fly(entity, _, speed, shoots, arrow, moving_anim, stand_anim)
|
||||
|
||||
local ctrl = entity.driver:get_player_control()
|
||||
local ctrl = entity.driver:get_player_control() ; if not ctrl then return end
|
||||
local velo = entity.object:get_velocity()
|
||||
local dir = entity.driver:get_look_dir()
|
||||
local yaw = entity.driver:get_look_horizontal() + 1.57 -- offset fix between old and new commands
|
||||
|
|
|
@ -131,7 +131,7 @@ minetest.register_node("morelights_modern:barlight_c", {
|
|||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
light_source = minetest.LIGHT_MAX,
|
||||
groups = {cracky = 2, oddly_breakable_by_hand = 3, handy = 1},
|
||||
groups = {cracky = 2, oddly_breakable_by_hand = 3, handy = 1, not_blocking_trains = 1},
|
||||
_mcl_hardness = 0.15,
|
||||
sounds = morelights.sounds.glass
|
||||
})
|
||||
|
@ -153,7 +153,7 @@ minetest.register_node("morelights_modern:barlight_s", {
|
|||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
light_source = minetest.LIGHT_MAX,
|
||||
groups = {cracky = 2, oddly_breakable_by_hand = 3, handy = 1},
|
||||
groups = {cracky = 2, oddly_breakable_by_hand = 3, handy = 1, not_blocking_trains = 1},
|
||||
_mcl_hardness = 0.15,
|
||||
sounds = morelights.sounds.glass
|
||||
})
|
||||
|
@ -173,7 +173,7 @@ minetest.register_node("morelights_modern:ceilinglight", {
|
|||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
light_source = minetest.LIGHT_MAX,
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 3, handy = 1},
|
||||
groups = {cracky = 3, oddly_breakable_by_hand = 3, handy = 1, not_blocking_trains = 1},
|
||||
_mcl_hardness = 0.2,
|
||||
sounds = morelights.sounds.glass,
|
||||
|
||||
|
|
|
@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
|
||||
- [Tweaked ore generation to better fit Minetest's new defaults.](https://github.com/minetest-mods/moreores/pull/45)
|
||||
- Three layers (two underground and one high air/space) are now used instead of just one layer.
|
||||
- Chunk size is no longer used as clust size anymore. Clust sizes are usually
|
||||
just 3 nodes and not the whole area ("chunk"), where the ores are generated.
|
||||
- Adjusted several default values.
|
||||
- Mithril is now generated *below* diamond. Note that there was a change
|
||||
in Minetest 5.0.0 where most ore generation was shifted to much lower
|
||||
altitude (shifting diamond generation altitude below mithril generation altitude).
|
||||
- The mithril ores are now also grouped together and not just found as a
|
||||
single node in one chunk.
|
||||
- The same overall ore density is retained in the deep layer.
|
||||
|
||||
## [2.1.0] - 2021-06-28
|
||||
|
||||
### Added
|
||||
|
|
|
@ -7,21 +7,74 @@
|
|||
------------------------------------------------------------------------------
|
||||
|
||||
-- Chunk sizes for ore generation (bigger = ore deposits are more scattered around)
|
||||
moreores.tin_chunk_size = 7
|
||||
moreores.silver_chunk_size = 11
|
||||
moreores.mithril_chunk_size = 11
|
||||
-- Tin
|
||||
moreores.tin_chunk_size_high = 10
|
||||
moreores.tin_chunk_size = 13
|
||||
moreores.tin_chunk_size_deep = 10
|
||||
|
||||
-- Silver
|
||||
moreores.silver_chunk_size_high = 11
|
||||
moreores.silver_chunk_size = 13
|
||||
moreores.silver_chunk_size_deep = 11
|
||||
|
||||
-- Mithril
|
||||
moreores.mithril_chunk_size_high = 19
|
||||
moreores.mithril_chunk_size = 21
|
||||
moreores.mithril_chunk_size_deep = 19
|
||||
|
||||
-- Amount of ore per chunk (higher = bigger ore deposits)
|
||||
moreores.tin_ore_per_chunk = 3
|
||||
moreores.silver_ore_per_chunk = 4
|
||||
moreores.mithril_ore_per_chunk = 1
|
||||
-- Tin
|
||||
moreores.tin_ore_per_chunk_high = 5
|
||||
moreores.tin_ore_per_chunk = 4
|
||||
moreores.tin_ore_per_chunk_deep = 5
|
||||
|
||||
-- Minimal depths of ore generation (Y coordinate, 0 being sea level by default)
|
||||
moreores.tin_min_depth = -31000
|
||||
moreores.silver_min_depth = -31000
|
||||
moreores.mithril_min_depth = -31000
|
||||
-- Silver
|
||||
moreores.silver_ore_per_chunk_high = 4
|
||||
moreores.silver_ore_per_chunk = 2
|
||||
moreores.silver_ore_per_chunk_deep = 4
|
||||
|
||||
-- Maximal depths of ore generation (Y coordinate, 0 being sea level by default)
|
||||
moreores.tin_max_depth = 8
|
||||
moreores.silver_max_depth = -2
|
||||
moreores.mithril_max_depth = -512
|
||||
-- Mithril
|
||||
moreores.mithril_ore_per_chunk_high = 3
|
||||
moreores.mithril_ore_per_chunk = 2
|
||||
moreores.mithril_ore_per_chunk_deep = 4
|
||||
|
||||
-- Clust sizes for ore generation (bigger = ores in ore deposits are less bound together)
|
||||
-- Tin
|
||||
moreores.tin_clust_size_high = 3
|
||||
moreores.tin_clust_size = 3
|
||||
moreores.tin_clust_size_deep = 3
|
||||
|
||||
-- Silver
|
||||
moreores.silver_clust_size_high = 3
|
||||
moreores.silver_clust_size = 3
|
||||
moreores.silver_clust_size_deep = 3
|
||||
|
||||
-- Mithril
|
||||
moreores.mithril_clust_size_high = 3
|
||||
moreores.mithril_clust_size = 3
|
||||
moreores.mithril_clust_size_deep = 3
|
||||
|
||||
-- Maximal and minimal depths of ore generation (Y coordinate, 0 being sea level by default)
|
||||
-- Tin
|
||||
moreores.tin_max_depth_high = 31000
|
||||
moreores.tin_min_depth_high = 1025
|
||||
moreores.tin_max_depth = -64 -- For v6 mapgen, -32 fits better
|
||||
moreores.tin_min_depth = -127
|
||||
moreores.tin_max_depth_deep = -128
|
||||
moreores.tin_min_depth_deep = -31000
|
||||
|
||||
-- Silver
|
||||
moreores.silver_max_depth_high = 31000
|
||||
moreores.silver_min_depth_high = 1025
|
||||
moreores.silver_max_depth = -64 -- For v6 mapgen, -32 fits better
|
||||
moreores.silver_min_depth = -127 -- For v6 mapgen, -63 fits better
|
||||
moreores.silver_max_depth_deep = -128 -- For v6 mapgen, -64 fits better
|
||||
moreores.silver_min_depth_deep = -31000
|
||||
|
||||
-- Mithril
|
||||
moreores.mithril_max_depth_high = 31000
|
||||
moreores.mithril_min_depth_high = 2049
|
||||
moreores.mithril_max_depth = -2048 -- For v6 mapgen, -256 fits better
|
||||
moreores.mithril_min_depth = -4095 -- For v6 mapgen, -511 fits better
|
||||
moreores.mithril_max_depth_deep = -4096 -- For v6 mapgen, -512 fits better
|
||||
moreores.mithril_min_depth_deep = -31000
|
||||
|
|
|
@ -166,11 +166,21 @@ local function add_ore(modname, description, mineral_name, oredef)
|
|||
})
|
||||
end
|
||||
|
||||
oredef.oredef_high.ore_type = "scatter"
|
||||
oredef.oredef_high.ore = modname .. ":mineral_" .. mineral_name
|
||||
oredef.oredef_high.wherein = "default:stone"
|
||||
|
||||
oredef.oredef.ore_type = "scatter"
|
||||
oredef.oredef.ore = modname .. ":mineral_" .. mineral_name
|
||||
oredef.oredef.wherein = "default:stone"
|
||||
|
||||
oredef.oredef_deep.ore_type = "scatter"
|
||||
oredef.oredef_deep.ore = modname .. ":mineral_" .. mineral_name
|
||||
oredef.oredef_deep.wherein = "default:stone"
|
||||
|
||||
minetest.register_ore(oredef.oredef_high)
|
||||
minetest.register_ore(oredef.oredef)
|
||||
minetest.register_ore(oredef.oredef_deep)
|
||||
|
||||
for tool_name, tooldef in pairs(oredef.tools) do
|
||||
local tdef = {
|
||||
|
@ -244,13 +254,27 @@ local oredefs = {
|
|||
silver = {
|
||||
description = "Silver",
|
||||
makes = {ore = true, block = true, lump = true, ingot = true, chest = true},
|
||||
oredef_high= {
|
||||
clust_scarcity = moreores.silver_chunk_size_high ^ 3,
|
||||
clust_num_ores = moreores.silver_ore_per_chunk_high,
|
||||
clust_size = moreores.silver_clust_size_high,
|
||||
y_min = moreores.silver_min_depth_high,
|
||||
y_max = moreores.silver_max_depth_high,
|
||||
},
|
||||
oredef = {
|
||||
clust_scarcity = moreores.silver_chunk_size ^ 3,
|
||||
clust_num_ores = moreores.silver_ore_per_chunk,
|
||||
clust_size = moreores.silver_chunk_size,
|
||||
clust_size = moreores.silver_clust_size,
|
||||
y_min = moreores.silver_min_depth,
|
||||
y_max = moreores.silver_max_depth,
|
||||
},
|
||||
oredef_deep = {
|
||||
clust_scarcity = moreores.silver_chunk_size_deep ^ 3,
|
||||
clust_num_ores = moreores.silver_ore_per_chunk_deep,
|
||||
clust_size = moreores.silver_clust_size_deep,
|
||||
y_min = moreores.silver_min_depth_deep,
|
||||
y_max = moreores.silver_max_depth_deep,
|
||||
},
|
||||
tools = {
|
||||
pick = {
|
||||
groupcaps = {
|
||||
|
@ -288,13 +312,27 @@ local oredefs = {
|
|||
mithril = {
|
||||
description = "Mithril",
|
||||
makes = {ore = true, block = true, lump = true, ingot = true, chest = false},
|
||||
oredef_high = {
|
||||
clust_scarcity = moreores.mithril_chunk_size_high ^ 3,
|
||||
clust_num_ores = moreores.mithril_ore_per_chunk_high,
|
||||
clust_size = moreores.mithril_clust_size_high,
|
||||
y_min = moreores.mithril_min_depth_high,
|
||||
y_max = moreores.mithril_max_depth_high,
|
||||
},
|
||||
oredef = {
|
||||
clust_scarcity = moreores.mithril_chunk_size ^ 3,
|
||||
clust_num_ores = moreores.mithril_ore_per_chunk,
|
||||
clust_size = moreores.mithril_chunk_size,
|
||||
clust_size = moreores.mithril_clust_size,
|
||||
y_min = moreores.mithril_min_depth,
|
||||
y_max = moreores.mithril_max_depth,
|
||||
},
|
||||
oredef_deep = {
|
||||
clust_scarcity = moreores.mithril_chunk_size_deep ^ 3,
|
||||
clust_num_ores = moreores.mithril_ore_per_chunk_deep,
|
||||
clust_size = moreores.mithril_clust_size_deep,
|
||||
y_min = moreores.mithril_min_depth_deep,
|
||||
y_max = moreores.mithril_max_depth_deep,
|
||||
},
|
||||
tools = {
|
||||
pick = {
|
||||
groupcaps = {
|
||||
|
@ -348,13 +386,27 @@ else
|
|||
oredefs.tin = {
|
||||
description = "Tin",
|
||||
makes = {ore = true, block = true, lump = true, ingot = true, chest = false},
|
||||
oredef_high = {
|
||||
clust_scarcity = moreores.tin_chunk_size_high ^ 3,
|
||||
clust_num_ores = moreores.tin_ore_per_chunk_high,
|
||||
clust_size = moreores.tin_clust_size_high,
|
||||
y_min = moreores.tin_min_depth_high,
|
||||
y_max = moreores.tin_max_depth_high,
|
||||
},
|
||||
oredef = {
|
||||
clust_scarcity = moreores.tin_chunk_size ^ 3,
|
||||
clust_num_ores = moreores.tin_ore_per_chunk,
|
||||
clust_size = moreores.tin_chunk_size,
|
||||
clust_size = moreores.tin_clust_size,
|
||||
y_min = moreores.tin_min_depth,
|
||||
y_max = moreores.tin_max_depth,
|
||||
},
|
||||
oredef_deep = {
|
||||
clust_scarcity = moreores.tin_chunk_size_deep ^ 3,
|
||||
clust_num_ores = moreores.tin_ore_per_chunk_deep,
|
||||
clust_size = moreores.tin_clust_size_deep,
|
||||
y_min = moreores.tin_min_depth_deep,
|
||||
y_max = moreores.tin_max_depth_deep,
|
||||
},
|
||||
tools = {},
|
||||
}
|
||||
|
||||
|
|
|
@ -37,13 +37,13 @@ end
|
|||
-- FUNCTIONS
|
||||
|
||||
local function on_dig(pos, node, player)
|
||||
vine_name_end = node.name:gsub("_middle", "_end")
|
||||
drop_item = "vines:vines"
|
||||
local vine_name_end = node.name:gsub("_middle", "_end")
|
||||
local drop_item = "vines:vines"
|
||||
if enable_vines == false then
|
||||
drop_item = vine_name_end
|
||||
end
|
||||
|
||||
wielded_item = player and player:get_wielded_item()
|
||||
local wielded_item = player and player:get_wielded_item()
|
||||
if wielded_item then
|
||||
wielded_item:add_wear(1)
|
||||
if wielded_item:get_name() == 'vines:shears' then
|
||||
|
@ -51,7 +51,7 @@ local function on_dig(pos, node, player)
|
|||
end
|
||||
end
|
||||
|
||||
break_pos = {x = pos.x, y = pos.y, z = pos.z}
|
||||
local break_pos = {x = pos.x, y = pos.y, z = pos.z}
|
||||
while minetest.get_item_group(minetest.get_node(break_pos).name, "vines") > 0 do
|
||||
minetest.remove_node(break_pos)
|
||||
minetest.handle_node_drops(break_pos, {drop_item}, player)
|
||||
|
@ -63,7 +63,7 @@ local function ensure_vine_end(pos, oldnode)
|
|||
local np = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||
local nn = minetest.get_node(np)
|
||||
|
||||
vine_name_end = oldnode.name:gsub("_middle", "_end")
|
||||
local vine_name_end = oldnode.name:gsub("_middle", "_end")
|
||||
|
||||
if minetest.get_item_group(nn.name, "vines") > 0 then
|
||||
minetest.swap_node(np, { name = vine_name_end, param2 = oldnode.param2 })
|
||||
|
@ -199,41 +199,29 @@ minetest.register_alias( 'vines:jungle_rotten', 'air' )
|
|||
minetest.register_alias( 'vines:willow', 'air' )
|
||||
minetest.register_alias( 'vines:willow_rotten', 'air' )
|
||||
|
||||
-- CRAFTS
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'vines:rope_block',
|
||||
recipe = {
|
||||
{'group:vines', 'group:vines', 'group:vines'},
|
||||
{'group:vines', 'group:wood', 'group:vines'},
|
||||
{'group:vines', 'group:vines', 'group:vines'},
|
||||
}
|
||||
})
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
|
||||
-- ROPE
|
||||
if enable_rope ~= false then
|
||||
minetest.register_craft({
|
||||
output = 'vines:rope_block',
|
||||
recipe = {
|
||||
{'moreblocks:rope', 'moreblocks:rope', 'moreblocks:rope'},
|
||||
{'moreblocks:rope', 'group:wood', 'moreblocks:rope'},
|
||||
{'moreblocks:rope', 'moreblocks:rope', 'moreblocks:rope'},
|
||||
{'group:vines', 'group:vines', 'group:vines'},
|
||||
{'group:vines', 'group:wood', 'group:vines'},
|
||||
{'group:vines', 'group:vines', 'group:vines'},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'vines:shears',
|
||||
recipe = {
|
||||
{'', 'default:steel_ingot', ''},
|
||||
{'group:stick', 'group:wood', 'default:steel_ingot'},
|
||||
{'', '', 'group:stick'}
|
||||
}
|
||||
})
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
minetest.register_craft({
|
||||
output = 'vines:rope_block',
|
||||
recipe = {
|
||||
{'moreblocks:rope', 'moreblocks:rope', 'moreblocks:rope'},
|
||||
{'moreblocks:rope', 'group:wood', 'moreblocks:rope'},
|
||||
{'moreblocks:rope', 'moreblocks:rope', 'moreblocks:rope'},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
-- NODES
|
||||
|
||||
if enable_rope ~= false then
|
||||
minetest.register_node("vines:rope_block", {
|
||||
description = S("Rope"),
|
||||
sunlight_propagates = true,
|
||||
|
@ -341,7 +329,6 @@ if enable_rope ~= false then
|
|||
end
|
||||
|
||||
-- SHEARS
|
||||
|
||||
minetest.register_tool("vines:shears", {
|
||||
description = S("Shears"),
|
||||
inventory_image = "vines_shears.png",
|
||||
|
@ -357,7 +344,16 @@ minetest.register_tool("vines:shears", {
|
|||
},
|
||||
})
|
||||
|
||||
-- VINES
|
||||
minetest.register_craft({
|
||||
output = 'vines:shears',
|
||||
recipe = {
|
||||
{'', 'default:steel_ingot', ''},
|
||||
{'group:stick', 'group:wood', 'default:steel_ingot'},
|
||||
{'', '', 'group:stick'}
|
||||
}
|
||||
})
|
||||
|
||||
-- ROOT VINES
|
||||
if enable_roots ~= false then
|
||||
vines.register_vine('root',
|
||||
{description = S("Roots"), average_length = 9}, {
|
||||
|
@ -380,6 +376,7 @@ else
|
|||
minetest.register_alias('vines:root_end', 'air')
|
||||
end
|
||||
|
||||
-- STANDARD VINES
|
||||
if enable_standard ~= false then
|
||||
vines.register_vine('vine',
|
||||
{description = S("Vines"), average_length = 5}, {
|
||||
|
@ -405,6 +402,7 @@ else
|
|||
minetest.register_alias('vines:vine_end', 'air')
|
||||
end
|
||||
|
||||
-- SIDE VINES
|
||||
if enable_side ~= false then
|
||||
vines.register_vine('side',
|
||||
{description = S("Vines"), average_length = 6}, {
|
||||
|
@ -430,6 +428,7 @@ else
|
|||
minetest.register_alias('vines:side_end', 'air')
|
||||
end
|
||||
|
||||
-- JUNGLE VINES
|
||||
if enable_jungle ~= false then
|
||||
vines.register_vine("jungle",
|
||||
{description = S("Jungle Vines"), average_length = 7}, {
|
||||
|
@ -463,6 +462,7 @@ else
|
|||
minetest.register_alias('vines:jungle_end', 'air')
|
||||
end
|
||||
|
||||
-- WILLOW VINES
|
||||
if enable_willow ~= false then
|
||||
vines.register_vine( 'willow',
|
||||
{description = S("Willow Vines"), average_length = 9}, {
|
||||
|
@ -485,4 +485,3 @@ else
|
|||
minetest.register_alias('vines:willow_middle', 'air')
|
||||
minetest.register_alias('vines:willow_end', 'air')
|
||||
end
|
||||
|
||||
|
|
3
mods/skinsdb/meta/character_2148.txt
Normal file
3
mods/skinsdb/meta/character_2148.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
Hobo (New Player on WonderWelt)
|
||||
yotuderconnect
|
||||
CC BY 4.0
|
3
mods/skinsdb/meta/character_2149.txt
Normal file
3
mods/skinsdb/meta/character_2149.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
harmlessgryphon
|
||||
unknown
|
||||
CC BY-SA 3.0
|
3
mods/skinsdb/meta/character_2150.txt
Normal file
3
mods/skinsdb/meta/character_2150.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
Sam plus
|
||||
Did Not
|
||||
CC 0 (1.0)
|
BIN
mods/skinsdb/textures/character_2148.png
Normal file
BIN
mods/skinsdb/textures/character_2148.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
mods/skinsdb/textures/character_2149.png
Normal file
BIN
mods/skinsdb/textures/character_2149.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 856 B |
BIN
mods/skinsdb/textures/character_2150.png
Normal file
BIN
mods/skinsdb/textures/character_2150.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3 KiB |
|
@ -9,4 +9,6 @@ dofile(MP .. "/internal1.lua")
|
|||
dofile(MP .. "/tube_api.lua")
|
||||
dofile(MP .. "/storage.lua")
|
||||
-- Only for testing/demo purposes
|
||||
--dofile(MP .. "/tube_test.lua")
|
||||
if minetest.settings:get_bool("tubelib2_testingblocks_enabled") == true then
|
||||
dofile(MP .. "/tube_test.lua")
|
||||
end
|
||||
|
|
|
@ -132,7 +132,7 @@ end
|
|||
-- pairing functions
|
||||
--------------------------------------------------------------------------------------
|
||||
|
||||
-- Pairing helper function
|
||||
-- Pairing helper function. NOT USED (see internal2.lua)!!!
|
||||
function Tube:store_teleport_data(pos, peer_pos)
|
||||
local meta = M(pos)
|
||||
meta:set_string("tele_pos", S(peer_pos))
|
||||
|
|
3
mods/tubelib2/settingtypes.txt
Normal file
3
mods/tubelib2/settingtypes.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Maximim number of Forceload Blocks per player (default 20)
|
||||
tubelib2_testingblocks_enabled (enbale the testing blocks) bool false
|
||||
|
|
@ -269,7 +269,7 @@ local function store_connection(pos, peer_pos)
|
|||
meta:set_string("peer_pos", P2S(peer_pos))
|
||||
meta:set_string("channel", "")
|
||||
meta:set_string("formspec", "")
|
||||
meta:set_string("infotext", "Connected with "..P2S(peer_pos))
|
||||
meta:set_string("infotext", "Connected to "..P2S(peer_pos))
|
||||
end
|
||||
|
||||
local function prepare_pairing(pos)
|
||||
|
|
Loading…
Reference in a new issue