Compare commits

..

17 Commits

Author SHA1 Message Date
kay27 30ab997358 Merge pull request 'Really move mcl_stairs_stone_slab_top.png into mcl_core' (#112) from djc/MineClone5:polished-stone into master
Reviewed-on: MineClone5/MineClone5#112
2022-01-07 23:09:21 +00:00
Daniel Cassidy d0d7ebe53b Really move mcl_stairs_stone_slab_top.png into mcl_core
This is a fix for #105 where I accidentally moved it to the wrong place.
Sorry.

mcl_core uses this texture for Polished Stone (mcl_core:stone_smooth),
which means mcl_core had an undeclared dependency on mcl_stairs.

Since mcl_stairs depends on mcl_core, it makes sense to move the texture
to mcl_core.
2022-01-07 21:56:37 +00:00
kay27 0693afe869 Merge pull request 'mcl_mapgen_core: Make most dependencies optional' (#109) from djc/MineClone5:optional-deps into master
Reviewed-on: MineClone5/MineClone5#109
2022-01-06 11:07:50 +00:00
Daniel Cassidy 978f23c70e mcl_mapgen_core: Rename cocoa to c_cocoas.
This is more consistent and should hopefully be clearer.
2022-01-06 02:56:51 +00:00
Daniel Cassidy 802d214d7b mcl_mapgen_core: Make mcl_nether an optional dependency.
mcl_nether was previously an undeclared dependency of mcl_mapgen_core.
Now it is both optional and declared.
2022-01-06 02:55:33 +00:00
Daniel Cassidy a0708abb9c mcl_mapgen_core: Make mcl_mushrooms an optional dependency.
mcl_mushrooms was previously an undeclared dependency of mcl_mapgen_core.
Now it is both optional and declared.
2022-01-06 02:46:02 +00:00
Daniel Cassidy 554f22b802 mcl_mapgen_core: Make mcl_farming an optional dependency.
mcl_farming was previously an undeclared dependency of mcl_mapgen_core.
Now it is both optional and declared.
2022-01-06 02:33:04 +00:00
Daniel Cassidy 1d03a3d150 mcl_mapgen_core: Make mcl_flowers an optional dependency.
mcl_flowers was previously an undeclared dependency of mcl_mapgen_core.
Now it is both optional and declared.
2022-01-06 02:30:24 +00:00
Daniel Cassidy 7c72ce1d0d mcl_mapgen_core: Fix check for wrong mod. 2022-01-06 02:11:06 +00:00
Daniel Cassidy 2bdaa77932 mcl_mapgen_core: Make mcl_structures an optional dependency. 2022-01-06 01:20:06 +00:00
Daniel Cassidy 5cad35dbfe mcl_mapgen_core: Make mcl_stairs an optional dependency.
The "mapgen_stair" aliases are only used by v6, and even then appear to
be optional in practice, so there's no reason for mcl_mapgen_core to
require mcl_stairs.
2022-01-06 01:20:06 +00:00
Daniel Cassidy 51cdc69b99 mcl_mapgen_core: Make mcl_monster_eggs an optional dependency.
The only purpose of this dependency appears to be to force
mcl_monster_eggs to load before mcl_mapgen_core. It is not actually
used in the code.

mcl_monster_eggs is an undeclared dependency of mobs_mc_gameconfig,
mcl_biomes, and mcl_structures, all of which are either transitive
or direct dependencies of mcl_mapgen_core.

It's not possible to add a dependency on mcl_monster_eggs directly
to mobs_mc_gameconfig, because that would lead to a circular
dependency. So it seems like a dependency on mcl_monster_eggs is
declared as a dependency of mcl_mapgen_core as a workaround to
ensure that mcl_monster_eggs at least gets loaded before
mcl_mapgen_core.

I've moved mcl_monster_eggs to the optional dependencies which
should achieve the same aim without complaining if mcl_monster_eggs
is missing, but this should probably be cleaned up in future to
remove the circular dependency.
2022-01-06 01:18:40 +00:00
Daniel Cassidy b73c0e8f2c mcl_mapgen_core: Make mcl_ocean an optional dependency. 2022-01-05 21:34:56 +00:00
Daniel Cassidy 012d0bd942 mcl_mapgen_core: Make mcl_sponges an optional dependency. 2022-01-05 20:52:53 +00:00
Daniel Cassidy c52f598e64 mcl_mapgen_core: Make mcl_cocoas an optional dependency. 2022-01-05 20:46:28 +00:00
kay27 fc3dc63f01 Merge pull request 'Move texture mcl_stairs_stone_slab_top to mcl_core.' (#105) from djc/MineClone5:polished-stone into master
Reviewed-on: MineClone5/MineClone5#105
2022-01-05 03:05:20 +00:00
Daniel Cassidy af03b030a0 Move texture mcl_stairs_stone_slab_top to mcl_core.
mcl_core uses this texture for Polished Stone (mcl_core:stone_smooth),
which means mcl_core has an undeclared dependency on mcl_stairs.

Since mcl_stairs depends on mcl_core, it makes sense to move the texture
to mcl_core.
2022-01-05 02:33:31 +00:00
5 changed files with 477 additions and 471 deletions

View File

@ -214,7 +214,6 @@ end
--a function used for despawning mobs
mobs.check_for_player_within_area = function(self, radius)
local pos1 = self.object:get_pos()
if not pos1 then return end
--get players in radius
for _,player in pairs(minetest_get_connected_players()) do
if player and player:get_hp() > 0 then

View File

Before

Width:  |  Height:  |  Size: 212 B

After

Width:  |  Height:  |  Size: 212 B

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
name = mcl_mapgen_core
author = Wuzzy
description = The core of the MCL2 mapgen
depends = mcl_init, mcl_core, biomeinfo, mcl_worlds, mcl_cocoas, mcl_sponges, mcl_ocean, mcl_stairs, mcl_monster_eggs, mcl_structures
optional_depends = mclx_core
depends = mcl_init, mcl_core, biomeinfo, mcl_worlds
optional_depends = mclx_core, mcl_cocoas, mcl_sponges, mcl_ocean, mcl_stairs, mcl_monster_eggs, mcl_structures, mcl_flowers, mcl_farming, mcl_mushrooms, mcl_nether

View File

@ -69,7 +69,7 @@ local function init_node_construct(pos)
end
-- The call of Struct
function mcl_structures.call_struct(pos, struct_style, rotation, pr, callback)
function mcl_structures.call_struct(pos, struct_style, rotation, pr)
minetest.log("action","[mcl_structures] call_struct " .. struct_style.." at "..minetest.pos_to_string(pos))
if not rotation then
rotation = "random"
@ -91,31 +91,13 @@ function mcl_structures.call_struct(pos, struct_style, rotation, pr, callback)
elseif struct_style == "fossil" then
return mcl_structures.generate_fossil(pos, rotation, pr)
elseif struct_style == "end_exit_portal" then
return mcl_structures.generate_end_exit_portal(pos, rotation, pr, callback)
return mcl_structures.generate_end_exit_portal(pos, rotation)
elseif struct_style == "end_exit_portal_open" then
return mcl_structures.generate_end_exit_portal_open(pos, rotation)
elseif struct_style == "end_gateway_portal" then
return mcl_structures.generate_end_gateway_portal(pos, rotation)
elseif struct_style == "end_portal_shrine" then
return mcl_structures.generate_end_portal_shrine(pos, rotation, pr)
elseif struct_style == "end_portal" then
return mcl_structures.generate_end_portal(pos, rotation, pr)
end
end
function mcl_structures.generate_end_portal(pos, rotation, pr)
-- todo: proper facedir
local x0, y0, z0 = pos.x - 2, pos.y, pos.z - 2
for x = 0, 4 do
for z = 0, 4 do
if x % 4 == 0 or z % 4 == 0 then
if x % 4 ~= 0 or z % 4 ~= 0 then
minetest.swap_node({x = x0 + x, y = y0, z = z0 + z}, {name = "mcl_portals:end_portal_frame_eye"})
end
else
minetest.swap_node({x = x0 + x, y = y0, z = z0 + z}, {name = "mcl_portals:portal_end"})
end
end
end
end
@ -342,9 +324,9 @@ function mcl_structures.generate_fossil(pos, rotation, pr)
return mcl_structures.place_schematic(newpos, path, rotation or "random", nil, true)
end
function mcl_structures.generate_end_exit_portal(pos, rot, pr, callback)
function mcl_structures.generate_end_exit_portal(pos, rot)
local path = modpath.."/schematics/mcl_structures_end_exit_portal.mts"
return mcl_structures.place_schematic(pos, path, rot or "0", {["mcl_portals:portal_end"] = "air"}, true, nil, callback)
return mcl_structures.place_schematic(pos, path, rot or "0", {["mcl_portals:portal_end"] = "air"}, true)
end
function mcl_structures.generate_end_exit_portal_open(pos, rot)
@ -574,7 +556,7 @@ end
-- Debug command
minetest.register_chatcommand("spawnstruct", {
params = "desert_temple | desert_well | igloo | witch_hut | boulder | ice_spike_small | ice_spike_large | fossil | end_exit_portal | end_exit_portal_open | end_gateway_portal | end_portal_shrine | end_portal | nether_portal | dungeon",
params = "desert_temple | desert_well | igloo | witch_hut | boulder | ice_spike_small | ice_spike_large | fossil | end_exit_portal | end_exit_portal_open | end_gateway_portal | end_portal_shrine | nether_portal | dungeon",
description = S("Generate a pre-defined structure near your position."),
privs = {debug = true},
func = function(name, param)
@ -614,8 +596,6 @@ minetest.register_chatcommand("spawnstruct", {
mcl_structures.generate_end_portal_shrine(pos, rot, pr)
elseif param == "dungeon" and mcl_dungeons and mcl_dungeons.spawn_dungeon then
mcl_dungeons.spawn_dungeon(pos, rot, pr)
elseif param == "end_portal" then
mcl_structures.generate_end_portal(pos, rot, pr)
elseif param == "nether_portal" and mcl_portals and mcl_portals.spawn_nether_portal then
mcl_portals.spawn_nether_portal(pos, rot, pr, name)
elseif param == "" then