Merge pull request 'MAPGEN/mcl_structures: Add (theoretically) fireproof test structure' (#258) from add-fireproof-structure into master

Reviewed-on: https://git.minetest.land/Mineclonia/Mineclonia/pulls/258
Reviewed-by: Li0n_2 <li0n_2@noreply.git.minetest.land>
master
erlehmann 2022-02-07 01:24:58 +00:00
commit 11469886e0
2 changed files with 8 additions and 1 deletions

View File

@ -532,9 +532,14 @@ local function dir_to_rotation(dir)
return "0"
end
mcl_structures.generate_test_structure_fireproof = function(pos, rotation, pr)
local path = minetest.get_modpath("mcl_structures").."/schematics/mcl_structures_test_structure_fireproof.mts"
mcl_structures.place_schematic(pos, path, rotation, nil, true, nil, nil, pr)
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_portal_shrine",
params = "desert_temple | desert_well | igloo | witch_hut | boulder | ice_spike_small | ice_spike_large | fossil | end_exit_portal | end_portal_shrine | test_structure_fireproof",
description = S("Generate a pre-defined structure near your position."),
privs = {debug = true},
func = function(name, param)
@ -568,6 +573,8 @@ minetest.register_chatcommand("spawnstruct", {
mcl_structures.generate_end_exit_portal(pos, rot, pr)
elseif param == "end_portal_shrine" then
mcl_structures.generate_end_portal_shrine(pos, rot, pr)
elseif param == "test_structure_fireproof" then
mcl_structures.generate_test_structure_fireproof(pos, rot, pr)
elseif param == "" then
message = S("Error: No structure type given. Please use “/spawnstruct <type>”.")
errord = true