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_delay=nil
|
||||||
train.atc_brake_target=nil
|
train.atc_brake_target=nil
|
||||||
train.atc_wait_finish=nil
|
train.atc_wait_finish=nil
|
||||||
|
train.atc_wait_autocouple=nil
|
||||||
train.atc_arrow=nil
|
train.atc_arrow=nil
|
||||||
if not keep_tarvel then
|
if not keep_tarvel then
|
||||||
train.tarvelocity=nil
|
train.tarvelocity=nil
|
||||||
|
|
|
@ -1316,13 +1316,22 @@ function advtrains.register_wagon(sysname_p, prototype, desc, inv_img, nincreati
|
||||||
minetest.register_entity(":"..sysname,prototype)
|
minetest.register_entity(":"..sysname,prototype)
|
||||||
advtrains.wagon_prototypes[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, {
|
minetest.register_craftitem(":"..sysname, {
|
||||||
description = desc,
|
description = desc,
|
||||||
inventory_image = inv_img,
|
inventory_image = inv_img,
|
||||||
wield_image = inv_img,
|
wield_image = inv_img,
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
|
|
||||||
groups = { not_in_creative_inventory = nincreative and 1 or 0},
|
groups = wagon_groups,
|
||||||
|
|
||||||
on_place = function(itemstack, placer, pointed_thing)
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
if not pointed_thing.type == "node" then
|
if not pointed_thing.type == "node" then
|
||||||
|
|
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
|
#### 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)`
|
- `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.
|
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.
|
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
|
#### 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.
|
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()
|
get_rc = function()
|
||||||
return train.routingcode
|
return train.routingcode
|
||||||
end,
|
end,
|
||||||
atc_reset = function(cmd)
|
atc_reset = function()
|
||||||
if not train_id then return false end
|
if not train_id then return false end
|
||||||
assertt(cmd, "string")
|
|
||||||
advtrains.atc.train_reset_command(train)
|
advtrains.atc.train_reset_command(train)
|
||||||
return true
|
return true
|
||||||
end,
|
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)
|
local pos = atlatc.pcnaming.resolve_pos(signal)
|
||||||
return advtrains.interlocking.signal_set_aspect(pos)
|
return advtrains.interlocking.signal_set_aspect(pos)
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
-- Lines-specific:
|
-- Lines-specific:
|
||||||
|
|
|
@ -216,6 +216,47 @@ local function get_far_node(pos)
|
||||||
return node
|
return node
|
||||||
end
|
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 function train_load(pos, train_id, unload)
|
||||||
local train=advtrains.trains[train_id]
|
local train=advtrains.trains[train_id]
|
||||||
local below = get_far_node({x=pos.x, y=pos.y-1, z=pos.z})
|
local below = get_far_node({x=pos.x, y=pos.y-1, z=pos.z})
|
||||||
|
@ -223,12 +264,27 @@ local function train_load(pos, train_id, unload)
|
||||||
atprint("this is not a chest! at "..minetest.pos_to_string(pos))
|
atprint("this is not a chest! at "..minetest.pos_to_string(pos))
|
||||||
return
|
return
|
||||||
end
|
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}})
|
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
|
if inv and train.velocity < 2 then
|
||||||
for k, v in ipairs(train.trainparts) do
|
for k, v in ipairs(train.trainparts) do
|
||||||
|
|
||||||
local i=minetest.get_inventory({type="detached", name="advtrains_wgn_"..v})
|
local i=minetest.get_inventory({type="detached", name="advtrains_wgn_"..v})
|
||||||
if i and i:get_list("box") then
|
if i and i:get_list("box") then
|
||||||
|
|
||||||
|
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
|
if not unload then
|
||||||
for _, item in ipairs(inv:get_list("main")) do
|
for _, item in ipairs(inv:get_list("main")) do
|
||||||
if i:get_list("box") and i:room_for_item("box", item) then
|
if i:get_list("box") and i:room_for_item("box", item) then
|
||||||
|
@ -248,7 +304,7 @@ local function train_load(pos, train_id, unload)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -266,6 +322,9 @@ advtrains.register_tracks("default", {
|
||||||
advtrains.invalidate_all_paths()
|
advtrains.invalidate_all_paths()
|
||||||
advtrains.ndb.clear(pos)
|
advtrains.ndb.clear(pos)
|
||||||
end,
|
end,
|
||||||
|
on_rightclick = function(pos, node, player)
|
||||||
|
show_fc_formspec(pos, player)
|
||||||
|
end,
|
||||||
advtrains = {
|
advtrains = {
|
||||||
on_train_enter = function(pos, train_id)
|
on_train_enter = function(pos, train_id)
|
||||||
train_load(pos, train_id, true)
|
train_load(pos, train_id, true)
|
||||||
|
@ -288,7 +347,9 @@ advtrains.register_tracks("default", {
|
||||||
advtrains.invalidate_all_paths()
|
advtrains.invalidate_all_paths()
|
||||||
advtrains.ndb.clear(pos)
|
advtrains.ndb.clear(pos)
|
||||||
end,
|
end,
|
||||||
|
on_rightclick = function(pos, node, player)
|
||||||
|
show_fc_formspec(pos, player)
|
||||||
|
end,
|
||||||
advtrains = {
|
advtrains = {
|
||||||
on_train_enter = function(pos, train_id)
|
on_train_enter = function(pos, train_id)
|
||||||
train_load(pos, train_id, false)
|
train_load(pos, train_id, false)
|
||||||
|
|
|
@ -218,7 +218,7 @@ function mobs.drive(entity, moving_anim, stand_anim, can_fly, dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
local acce_y = 0
|
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)
|
entity.v = get_v(velo) * get_sign(entity.v)
|
||||||
|
|
||||||
|
@ -427,7 +427,7 @@ end
|
||||||
-- directional flying routine by D00Med (edited by TenPlus1)
|
-- directional flying routine by D00Med (edited by TenPlus1)
|
||||||
function mobs.fly(entity, _, speed, shoots, arrow, moving_anim, stand_anim)
|
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 velo = entity.object:get_velocity()
|
||||||
local dir = entity.driver:get_look_dir()
|
local dir = entity.driver:get_look_dir()
|
||||||
local yaw = entity.driver:get_look_horizontal() + 1.57 -- offset fix between old and new commands
|
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",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
light_source = minetest.LIGHT_MAX,
|
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,
|
_mcl_hardness = 0.15,
|
||||||
sounds = morelights.sounds.glass
|
sounds = morelights.sounds.glass
|
||||||
})
|
})
|
||||||
|
@ -153,7 +153,7 @@ minetest.register_node("morelights_modern:barlight_s", {
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
light_source = minetest.LIGHT_MAX,
|
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,
|
_mcl_hardness = 0.15,
|
||||||
sounds = morelights.sounds.glass
|
sounds = morelights.sounds.glass
|
||||||
})
|
})
|
||||||
|
@ -173,7 +173,7 @@ minetest.register_node("morelights_modern:ceilinglight", {
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
light_source = minetest.LIGHT_MAX,
|
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,
|
_mcl_hardness = 0.2,
|
||||||
sounds = morelights.sounds.glass,
|
sounds = morelights.sounds.glass,
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||||
|
|
||||||
## [Unreleased]
|
## [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
|
## [2.1.0] - 2021-06-28
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -7,21 +7,74 @@
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
-- Chunk sizes for ore generation (bigger = ore deposits are more scattered around)
|
-- Chunk sizes for ore generation (bigger = ore deposits are more scattered around)
|
||||||
moreores.tin_chunk_size = 7
|
-- Tin
|
||||||
moreores.silver_chunk_size = 11
|
moreores.tin_chunk_size_high = 10
|
||||||
moreores.mithril_chunk_size = 11
|
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)
|
-- Amount of ore per chunk (higher = bigger ore deposits)
|
||||||
moreores.tin_ore_per_chunk = 3
|
-- Tin
|
||||||
moreores.silver_ore_per_chunk = 4
|
moreores.tin_ore_per_chunk_high = 5
|
||||||
moreores.mithril_ore_per_chunk = 1
|
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)
|
-- Silver
|
||||||
moreores.tin_min_depth = -31000
|
moreores.silver_ore_per_chunk_high = 4
|
||||||
moreores.silver_min_depth = -31000
|
moreores.silver_ore_per_chunk = 2
|
||||||
moreores.mithril_min_depth = -31000
|
moreores.silver_ore_per_chunk_deep = 4
|
||||||
|
|
||||||
-- Maximal depths of ore generation (Y coordinate, 0 being sea level by default)
|
-- Mithril
|
||||||
moreores.tin_max_depth = 8
|
moreores.mithril_ore_per_chunk_high = 3
|
||||||
moreores.silver_max_depth = -2
|
moreores.mithril_ore_per_chunk = 2
|
||||||
moreores.mithril_max_depth = -512
|
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
|
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_type = "scatter"
|
||||||
oredef.oredef.ore = modname .. ":mineral_" .. mineral_name
|
oredef.oredef.ore = modname .. ":mineral_" .. mineral_name
|
||||||
oredef.oredef.wherein = "default:stone"
|
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)
|
||||||
|
minetest.register_ore(oredef.oredef_deep)
|
||||||
|
|
||||||
for tool_name, tooldef in pairs(oredef.tools) do
|
for tool_name, tooldef in pairs(oredef.tools) do
|
||||||
local tdef = {
|
local tdef = {
|
||||||
|
@ -244,13 +254,27 @@ local oredefs = {
|
||||||
silver = {
|
silver = {
|
||||||
description = "Silver",
|
description = "Silver",
|
||||||
makes = {ore = true, block = true, lump = true, ingot = true, chest = true},
|
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 = {
|
oredef = {
|
||||||
clust_scarcity = moreores.silver_chunk_size ^ 3,
|
clust_scarcity = moreores.silver_chunk_size ^ 3,
|
||||||
clust_num_ores = moreores.silver_ore_per_chunk,
|
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_min = moreores.silver_min_depth,
|
||||||
y_max = moreores.silver_max_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 = {
|
tools = {
|
||||||
pick = {
|
pick = {
|
||||||
groupcaps = {
|
groupcaps = {
|
||||||
|
@ -288,13 +312,27 @@ local oredefs = {
|
||||||
mithril = {
|
mithril = {
|
||||||
description = "Mithril",
|
description = "Mithril",
|
||||||
makes = {ore = true, block = true, lump = true, ingot = true, chest = false},
|
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 = {
|
oredef = {
|
||||||
clust_scarcity = moreores.mithril_chunk_size ^ 3,
|
clust_scarcity = moreores.mithril_chunk_size ^ 3,
|
||||||
clust_num_ores = moreores.mithril_ore_per_chunk,
|
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_min = moreores.mithril_min_depth,
|
||||||
y_max = moreores.mithril_max_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 = {
|
tools = {
|
||||||
pick = {
|
pick = {
|
||||||
groupcaps = {
|
groupcaps = {
|
||||||
|
@ -348,13 +386,27 @@ else
|
||||||
oredefs.tin = {
|
oredefs.tin = {
|
||||||
description = "Tin",
|
description = "Tin",
|
||||||
makes = {ore = true, block = true, lump = true, ingot = true, chest = false},
|
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 = {
|
oredef = {
|
||||||
clust_scarcity = moreores.tin_chunk_size ^ 3,
|
clust_scarcity = moreores.tin_chunk_size ^ 3,
|
||||||
clust_num_ores = moreores.tin_ore_per_chunk,
|
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_min = moreores.tin_min_depth,
|
||||||
y_max = moreores.tin_max_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 = {},
|
tools = {},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,13 +37,13 @@ end
|
||||||
-- FUNCTIONS
|
-- FUNCTIONS
|
||||||
|
|
||||||
local function on_dig(pos, node, player)
|
local function on_dig(pos, node, player)
|
||||||
vine_name_end = node.name:gsub("_middle", "_end")
|
local vine_name_end = node.name:gsub("_middle", "_end")
|
||||||
drop_item = "vines:vines"
|
local drop_item = "vines:vines"
|
||||||
if enable_vines == false then
|
if enable_vines == false then
|
||||||
drop_item = vine_name_end
|
drop_item = vine_name_end
|
||||||
end
|
end
|
||||||
|
|
||||||
wielded_item = player and player:get_wielded_item()
|
local wielded_item = player and player:get_wielded_item()
|
||||||
if wielded_item then
|
if wielded_item then
|
||||||
wielded_item:add_wear(1)
|
wielded_item:add_wear(1)
|
||||||
if wielded_item:get_name() == 'vines:shears' then
|
if wielded_item:get_name() == 'vines:shears' then
|
||||||
|
@ -51,7 +51,7 @@ local function on_dig(pos, node, player)
|
||||||
end
|
end
|
||||||
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
|
while minetest.get_item_group(minetest.get_node(break_pos).name, "vines") > 0 do
|
||||||
minetest.remove_node(break_pos)
|
minetest.remove_node(break_pos)
|
||||||
minetest.handle_node_drops(break_pos, {drop_item}, player)
|
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 np = {x = pos.x, y = pos.y + 1, z = pos.z}
|
||||||
local nn = minetest.get_node(np)
|
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
|
if minetest.get_item_group(nn.name, "vines") > 0 then
|
||||||
minetest.swap_node(np, { name = vine_name_end, param2 = oldnode.param2 })
|
minetest.swap_node(np, { name = vine_name_end, param2 = oldnode.param2 })
|
||||||
|
@ -199,8 +199,9 @@ minetest.register_alias( 'vines:jungle_rotten', 'air' )
|
||||||
minetest.register_alias( 'vines:willow', 'air' )
|
minetest.register_alias( 'vines:willow', 'air' )
|
||||||
minetest.register_alias( 'vines:willow_rotten', 'air' )
|
minetest.register_alias( 'vines:willow_rotten', 'air' )
|
||||||
|
|
||||||
-- CRAFTS
|
|
||||||
|
|
||||||
|
-- ROPE
|
||||||
|
if enable_rope ~= false then
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'vines:rope_block',
|
output = 'vines:rope_block',
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -211,7 +212,6 @@ minetest.register_craft({
|
||||||
})
|
})
|
||||||
|
|
||||||
if minetest.get_modpath("moreblocks") then
|
if minetest.get_modpath("moreblocks") then
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'vines:rope_block',
|
output = 'vines:rope_block',
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -222,18 +222,6 @@ if minetest.get_modpath("moreblocks") then
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = 'vines:shears',
|
|
||||||
recipe = {
|
|
||||||
{'', 'default:steel_ingot', ''},
|
|
||||||
{'group:stick', 'group:wood', 'default:steel_ingot'},
|
|
||||||
{'', '', 'group:stick'}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
-- NODES
|
|
||||||
|
|
||||||
if enable_rope ~= false then
|
|
||||||
minetest.register_node("vines:rope_block", {
|
minetest.register_node("vines:rope_block", {
|
||||||
description = S("Rope"),
|
description = S("Rope"),
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
@ -341,7 +329,6 @@ if enable_rope ~= false then
|
||||||
end
|
end
|
||||||
|
|
||||||
-- SHEARS
|
-- SHEARS
|
||||||
|
|
||||||
minetest.register_tool("vines:shears", {
|
minetest.register_tool("vines:shears", {
|
||||||
description = S("Shears"),
|
description = S("Shears"),
|
||||||
inventory_image = "vines_shears.png",
|
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
|
if enable_roots ~= false then
|
||||||
vines.register_vine('root',
|
vines.register_vine('root',
|
||||||
{description = S("Roots"), average_length = 9}, {
|
{description = S("Roots"), average_length = 9}, {
|
||||||
|
@ -380,6 +376,7 @@ else
|
||||||
minetest.register_alias('vines:root_end', 'air')
|
minetest.register_alias('vines:root_end', 'air')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- STANDARD VINES
|
||||||
if enable_standard ~= false then
|
if enable_standard ~= false then
|
||||||
vines.register_vine('vine',
|
vines.register_vine('vine',
|
||||||
{description = S("Vines"), average_length = 5}, {
|
{description = S("Vines"), average_length = 5}, {
|
||||||
|
@ -405,6 +402,7 @@ else
|
||||||
minetest.register_alias('vines:vine_end', 'air')
|
minetest.register_alias('vines:vine_end', 'air')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- SIDE VINES
|
||||||
if enable_side ~= false then
|
if enable_side ~= false then
|
||||||
vines.register_vine('side',
|
vines.register_vine('side',
|
||||||
{description = S("Vines"), average_length = 6}, {
|
{description = S("Vines"), average_length = 6}, {
|
||||||
|
@ -430,6 +428,7 @@ else
|
||||||
minetest.register_alias('vines:side_end', 'air')
|
minetest.register_alias('vines:side_end', 'air')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- JUNGLE VINES
|
||||||
if enable_jungle ~= false then
|
if enable_jungle ~= false then
|
||||||
vines.register_vine("jungle",
|
vines.register_vine("jungle",
|
||||||
{description = S("Jungle Vines"), average_length = 7}, {
|
{description = S("Jungle Vines"), average_length = 7}, {
|
||||||
|
@ -463,6 +462,7 @@ else
|
||||||
minetest.register_alias('vines:jungle_end', 'air')
|
minetest.register_alias('vines:jungle_end', 'air')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- WILLOW VINES
|
||||||
if enable_willow ~= false then
|
if enable_willow ~= false then
|
||||||
vines.register_vine( 'willow',
|
vines.register_vine( 'willow',
|
||||||
{description = S("Willow Vines"), average_length = 9}, {
|
{description = S("Willow Vines"), average_length = 9}, {
|
||||||
|
@ -485,4 +485,3 @@ else
|
||||||
minetest.register_alias('vines:willow_middle', 'air')
|
minetest.register_alias('vines:willow_middle', 'air')
|
||||||
minetest.register_alias('vines:willow_end', 'air')
|
minetest.register_alias('vines:willow_end', 'air')
|
||||||
end
|
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 .. "/tube_api.lua")
|
||||||
dofile(MP .. "/storage.lua")
|
dofile(MP .. "/storage.lua")
|
||||||
-- Only for testing/demo purposes
|
-- 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 functions
|
||||||
--------------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------------
|
||||||
|
|
||||||
-- Pairing helper function
|
-- Pairing helper function. NOT USED (see internal2.lua)!!!
|
||||||
function Tube:store_teleport_data(pos, peer_pos)
|
function Tube:store_teleport_data(pos, peer_pos)
|
||||||
local meta = M(pos)
|
local meta = M(pos)
|
||||||
meta:set_string("tele_pos", S(peer_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("peer_pos", P2S(peer_pos))
|
||||||
meta:set_string("channel", "")
|
meta:set_string("channel", "")
|
||||||
meta:set_string("formspec", "")
|
meta:set_string("formspec", "")
|
||||||
meta:set_string("infotext", "Connected with "..P2S(peer_pos))
|
meta:set_string("infotext", "Connected to "..P2S(peer_pos))
|
||||||
end
|
end
|
||||||
|
|
||||||
local function prepare_pairing(pos)
|
local function prepare_pairing(pos)
|
||||||
|
|
Loading…
Reference in a new issue