Fix some warning messages
This commit is contained in:
parent
9696246855
commit
8daa1c9a5f
@ -3,6 +3,8 @@ default_privs = interact, shout, fast, money
|
|||||||
selectionbox_color = 0,0,0
|
selectionbox_color = 0,0,0
|
||||||
enable_node_highlighting = true
|
enable_node_highlighting = true
|
||||||
|
|
||||||
|
debug_log_level = action
|
||||||
|
|
||||||
#
|
#
|
||||||
# Physics stuff
|
# Physics stuff
|
||||||
#
|
#
|
||||||
|
@ -323,7 +323,7 @@ minetest.register_abm({
|
|||||||
end
|
end
|
||||||
if not do_preserve then
|
if not do_preserve then
|
||||||
-- Drop stuff other than the node itself
|
-- Drop stuff other than the node itself
|
||||||
itemstacks = minetest.get_node_drops(n0.name)
|
local itemstacks = minetest.get_node_drops(n0.name)
|
||||||
for _, itemname in ipairs(itemstacks) do
|
for _, itemname in ipairs(itemstacks) do
|
||||||
if minetest.get_item_group(n0.name, "leafdecay_drop") ~= 0 or
|
if minetest.get_item_group(n0.name, "leafdecay_drop") ~= 0 or
|
||||||
itemname ~= n0.name then
|
itemname ~= n0.name then
|
||||||
|
@ -12,7 +12,7 @@ Details: Adds several items for lighting, made out of glowing crystals - a bette
|
|||||||
|
|
||||||
minetest.register_node( "glowcrystals:glowcrystal_ore", {
|
minetest.register_node( "glowcrystals:glowcrystal_ore", {
|
||||||
description = "Glowing Crystal Ore",
|
description = "Glowing Crystal Ore",
|
||||||
tile_images = { "default_stone.png^glowcrystals_ore_glowcrystal.png" },
|
tiles = { "default_stone.png^glowcrystals_ore_glowcrystal.png" },
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -24,7 +24,7 @@ minetest.register_node( "glowcrystals:glowcrystal_ore", {
|
|||||||
|
|
||||||
minetest.register_node( "glowcrystals:glowcrystal_block", {
|
minetest.register_node( "glowcrystals:glowcrystal_block", {
|
||||||
description = "Glowing Crystal Block",
|
description = "Glowing Crystal Block",
|
||||||
tile_images = { "glowcrystals_block_glowcrystal.png" },
|
tiles = { "glowcrystals_block_glowcrystal.png" },
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -104,6 +104,6 @@ minetest.register_ore({
|
|||||||
clust_scarcity = 9*9*9,
|
clust_scarcity = 9*9*9,
|
||||||
clust_num_ores = 4,
|
clust_num_ores = 4,
|
||||||
clust_size = 3,
|
clust_size = 3,
|
||||||
height_min = -20000,
|
y_min = -20000,
|
||||||
height_max = -15,
|
y_max = -15,
|
||||||
})
|
})
|
@ -1,6 +1,4 @@
|
|||||||
default
|
default
|
||||||
hangle_schematics?
|
|
||||||
mg_villages?
|
|
||||||
experience?
|
experience?
|
||||||
farming?
|
farming?
|
||||||
bushes?
|
bushes?
|
||||||
|
@ -44,7 +44,6 @@ dofile(mgpath.."/trees.lua")
|
|||||||
dofile(mgpath.."/biomes.lua")
|
dofile(mgpath.."/biomes.lua")
|
||||||
dofile(mgpath.."/decorations.lua")
|
dofile(mgpath.."/decorations.lua")
|
||||||
dofile(mgpath.."/flowers.lua")
|
dofile(mgpath.."/flowers.lua")
|
||||||
dofile(mgpath.."/villages.lua")
|
|
||||||
dofile(mgpath.."/fill_chests.lua")
|
dofile(mgpath.."/fill_chests.lua")
|
||||||
dofile(mgpath.."/dungeons.lua")
|
dofile(mgpath.."/dungeons.lua")
|
||||||
dofile(mgpath.."/ores.lua")
|
dofile(mgpath.."/ores.lua")
|
||||||
|
@ -10,7 +10,7 @@ minetest.register_ore({
|
|||||||
clust_size = 7,
|
clust_size = 7,
|
||||||
y_min = -15,
|
y_min = -15,
|
||||||
y_max = 0,
|
y_max = 0,
|
||||||
noise_threshhold = 0,
|
noise_threshold = 0,
|
||||||
noise_params = {
|
noise_params = {
|
||||||
offset = 0.35,
|
offset = 0.35,
|
||||||
scale = 0.2,
|
scale = 0.2,
|
||||||
|
@ -262,18 +262,18 @@ mg_villages.add_building = function( building_data )
|
|||||||
end
|
end
|
||||||
-- add the building to the menu list for the build chest ("single" would be too many houses)
|
-- add the building to the menu list for the build chest ("single" would be too many houses)
|
||||||
-- the empty plots are added to each village and of no intrest here
|
-- the empty plots are added to each village and of no intrest here
|
||||||
if( build_chest and build_chest.add_entry and typ and typ ~= 'single' and (not( building_data.typ ) or building_data.typ ~= 'empty')) then
|
--if( build_chest and build_chest.add_entry and typ and typ ~= 'single' and (not( building_data.typ ) or building_data.typ ~= 'empty')) then
|
||||||
build_chest.add_entry( {'main','mg_villages', typ, building_data.scm, file_name });
|
-- build_chest.add_entry( {'main','mg_villages', typ, building_data.scm, file_name });
|
||||||
end
|
--end
|
||||||
end
|
end
|
||||||
-- buildings as such may have a type as well
|
-- buildings as such may have a type as well
|
||||||
if( build_chest and build_chest.add_entry and building_data.typ ) then
|
--if( build_chest and build_chest.add_entry and building_data.typ ) then
|
||||||
build_chest.add_entry( {'main','mg_villages', building_data.typ, building_data.scm, file_name });
|
--build_chest.add_entry( {'main','mg_villages', building_data.typ, building_data.scm, file_name });
|
||||||
end
|
--end
|
||||||
-- store information about all buildings - no matter weather they can be used or not - for later presentation in the build_chest's menu
|
-- store information about all buildings - no matter weather they can be used or not - for later presentation in the build_chest's menu
|
||||||
if( build_chest and build_chest.add_building ) then
|
--if( build_chest and build_chest.add_building ) then
|
||||||
build_chest.add_building( file_name, building_data );
|
--build_chest.add_building( file_name, building_data );
|
||||||
end
|
--end
|
||||||
|
|
||||||
|
|
||||||
if( not( is_used )) then
|
if( not( is_used )) then
|
||||||
|
@ -35,7 +35,7 @@ mg_villages.FIRST_VILLAGE_TYPE = 'medieval';
|
|||||||
-- the mapgen will disregard mapchunks where min.y > mg_villages.MAX_HEIGHT_TREATED;
|
-- the mapgen will disregard mapchunks where min.y > mg_villages.MAX_HEIGHT_TREATED;
|
||||||
-- you can set this value to 64 if you have a slow machine and a mapgen which does not create extreme mountains
|
-- you can set this value to 64 if you have a slow machine and a mapgen which does not create extreme mountains
|
||||||
-- (or if you don't care if extreme mountains may create burried villages occasionally)
|
-- (or if you don't care if extreme mountains may create burried villages occasionally)
|
||||||
mg_villages.MAX_HEIGHT_TREATED = 200;
|
mg_villages.MAX_HEIGHT_TREATED = 300;
|
||||||
|
|
||||||
-- choose the debug level you want
|
-- choose the debug level you want
|
||||||
mg_villages.DEBUG_LEVEL = mg_villages.DEBUG_LEVEL_NONE
|
mg_villages.DEBUG_LEVEL = mg_villages.DEBUG_LEVEL_NONE
|
||||||
|
@ -3,6 +3,7 @@ handle_schematics
|
|||||||
doors
|
doors
|
||||||
farming
|
farming
|
||||||
wool
|
wool
|
||||||
|
mg?
|
||||||
stairs?
|
stairs?
|
||||||
cottages?
|
cottages?
|
||||||
moretrees?
|
moretrees?
|
||||||
|
@ -2,25 +2,35 @@
|
|||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
-- Interface for other mdos
|
-- Interface for other mdos
|
||||||
|
|
||||||
-- this function gets executed only once per village - namely when the first
|
|
||||||
-- part of a village is generated;
|
|
||||||
-- relevant data about the vilalge can be found in the following data structure:
|
|
||||||
-- mg_villages.all_villages[ village_id ]
|
|
||||||
mg_villages.new_village_spawned = function( village_id )
|
mg_villages.new_village_spawned = function( village_id )
|
||||||
-- dummy function
|
-- determine whether it's a peaceful or barbarian village
|
||||||
|
local vx = mg_villages.all_villages[ village_id ].vx
|
||||||
|
local vz = mg_villages.all_villages[ village_id ].vz
|
||||||
|
local seed = vx * vz
|
||||||
|
local pr_vtype = PseudoRandom(seed)
|
||||||
|
local rptype = pr_vtype:next(1,10)
|
||||||
|
if mg_villages.anz_villages < 2 then
|
||||||
|
mg_villages.all_villages[ village_id ].barbarians = false
|
||||||
|
else
|
||||||
|
if rptype <= 3 then
|
||||||
|
mg_villages.all_villages[ village_id ].barbarians = true
|
||||||
|
else
|
||||||
|
mg_villages.all_villages[ village_id ].barbarians = false
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- use this function if you want to i.e. spawn mobs/traders/etc;
|
|
||||||
-- the village data structure contains information about the entire village;
|
|
||||||
-- minp, maxp indicates which part has actually been spawned;
|
|
||||||
-- the function may add information to the village data structure if needed;
|
|
||||||
-- the voxelmanip data (data, param2_data, a) is just for reading, i.e. finding
|
|
||||||
-- a good spawning position for the trader
|
|
||||||
mg_villages.part_of_village_spawned = function( village, minp, maxp, data, param2_data, a, cid )
|
mg_villages.part_of_village_spawned = function( village, minp, maxp, data, param2_data, a, cid )
|
||||||
-- mobf needs a way to spawn its traders
|
--print("New building around "..minetest.pos_to_string(pos))
|
||||||
if( minetest.get_modpath( 'mobf_trader' )) then
|
for i,bpos in pairs(village.to_add_data.bpos) do
|
||||||
mob_village_traders.part_of_village_spawned( village, minp, maxp, data, param2_data, a, cid );
|
-- get data about the building
|
||||||
|
local building_data = mg_villages.BUILDINGS[ bpos.btype ];
|
||||||
|
|
||||||
|
-- only handle buildings that are at least partly contained in that part of the
|
||||||
|
-- village that got spawned in this mapchunk
|
||||||
|
if not( bpos.x > maxp.x or bpos.x + bpos.bsizex < minp.x or bpos.z > maxp.z or bpos.z + bpos.bsizez < minp.z ) then
|
||||||
|
mobs.spawn_npc_and_spawner(bpos,village.barbarians)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
@ -19,9 +19,9 @@ minetest.register_node("mg_villages:road", {
|
|||||||
|
|
||||||
mg_villages.road_node = minetest.get_content_id( 'mg_villages:road' );
|
mg_villages.road_node = minetest.get_content_id( 'mg_villages:road' );
|
||||||
-- do not drop snow on roads
|
-- do not drop snow on roads
|
||||||
if( moresnow ) then
|
--if( moresnow ) then
|
||||||
moresnow.snow_cover[ mg_villages.road_node ] = moresnow.c_air;
|
-- moresnow.snow_cover[ mg_villages.road_node ] = moresnow.c_air;
|
||||||
end
|
--end
|
||||||
|
|
||||||
|
|
||||||
minetest.register_node("mg_villages:soil", {
|
minetest.register_node("mg_villages:soil", {
|
||||||
|
@ -15,7 +15,7 @@ function mg_villages.spawnplayer(player)
|
|||||||
local min_pos = game_origin
|
local min_pos = game_origin
|
||||||
for bx = -20, 20 do
|
for bx = -20, 20 do
|
||||||
for bz = -20, 20 do
|
for bz = -20, 20 do
|
||||||
local minp = {x = game_origin.x + 80 * bx, y = -32, z = game_origin.z + 80 * bz}
|
local minp = {x = min_pos.x + bx, y = -32, z = min_pos.z + bz}
|
||||||
for _, village in ipairs(mg_villages.villages_at_point(minp, noise1)) do
|
for _, village in ipairs(mg_villages.villages_at_point(minp, noise1)) do
|
||||||
if math.abs(village.vx) + math.abs(village.vz) < min_dist then
|
if math.abs(village.vx) + math.abs(village.vz) < min_dist then
|
||||||
min_pos = {x = village.vx, y = village.vh + 2, z = village.vz}
|
min_pos = {x = village.vx, y = village.vh + 2, z = village.vz}
|
||||||
|
4
mods/vendor/vendor/init.lua
vendored
4
mods/vendor/vendor/init.lua
vendored
@ -29,7 +29,7 @@ dofile(minetest.get_modpath("vendor").."/log.lua")
|
|||||||
|
|
||||||
minetest.register_node("vendor:vendor", {
|
minetest.register_node("vendor:vendor", {
|
||||||
description = "Vending Machine",
|
description = "Vending Machine",
|
||||||
tile_images ={"vendor_side.png", "vendor_side.png", "vendor_side.png",
|
tiles ={"vendor_side.png", "vendor_side.png", "vendor_side.png",
|
||||||
"vendor_side.png", "vendor_side.png", "vendor_vendor_front.png"},
|
"vendor_side.png", "vendor_side.png", "vendor_vendor_front.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
@ -43,7 +43,7 @@ minetest.register_node("vendor:vendor", {
|
|||||||
|
|
||||||
minetest.register_node("vendor:depositor", {
|
minetest.register_node("vendor:depositor", {
|
||||||
description = "Depositing Machine",
|
description = "Depositing Machine",
|
||||||
tile_images ={"vendor_side.png", "vendor_side.png", "vendor_side.png",
|
tiles ={"vendor_side.png", "vendor_side.png", "vendor_side.png",
|
||||||
"vendor_side.png", "vendor_side.png", "vendor_depositor_front.png"},
|
"vendor_side.png", "vendor_side.png", "vendor_depositor_front.png"},
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
|
4
mods/vendor/vendor/mese_vendor.lua
vendored
4
mods/vendor/vendor/mese_vendor.lua
vendored
@ -188,7 +188,7 @@ end
|
|||||||
|
|
||||||
minetest.register_node( 'vendor:signal_vendor_off', {
|
minetest.register_node( 'vendor:signal_vendor_off', {
|
||||||
description = 'Signal Vendor',
|
description = 'Signal Vendor',
|
||||||
tile_images = {'vendor_side.png', 'vendor_side.png', 'vendor_side.png',
|
tiles = {'vendor_side.png', 'vendor_side.png', 'vendor_side.png',
|
||||||
'vendor_side.png', 'vendor_side.png', 'vendor_vendor_front.png'},
|
'vendor_side.png', 'vendor_side.png', 'vendor_vendor_front.png'},
|
||||||
paramtype = 'light',
|
paramtype = 'light',
|
||||||
paramtype2 = 'facedir',
|
paramtype2 = 'facedir',
|
||||||
@ -214,7 +214,7 @@ minetest.register_node( 'vendor:signal_vendor_off', {
|
|||||||
|
|
||||||
minetest.register_node( 'vendor:signal_vendor_on', {
|
minetest.register_node( 'vendor:signal_vendor_on', {
|
||||||
description = 'Signal Vendor',
|
description = 'Signal Vendor',
|
||||||
tile_images = {'vendor_side.png', 'vendor_side.png', 'vendor_side.png',
|
tiles = {'vendor_side.png', 'vendor_side.png', 'vendor_side.png',
|
||||||
'vendor_side.png', 'vendor_side.png', 'vendor_vendor_front.png'},
|
'vendor_side.png', 'vendor_side.png', 'vendor_vendor_front.png'},
|
||||||
paramtype = 'light',
|
paramtype = 'light',
|
||||||
paramtype2 = 'facedir',
|
paramtype2 = 'facedir',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user