From 899c8499968f6df518311387ca2d677c249d7942 Mon Sep 17 00:00:00 2001 From: cora Date: Mon, 6 Jun 2022 01:46:32 +0200 Subject: [PATCH] old registered_structures -> structure_data --- mods/ITEMS/mcl_end/eye_of_ender.lua | 2 +- mods/MAPGEN/mcl_strongholds/init.lua | 2 +- mods/MAPGEN/mcl_structures/init.lua | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mods/ITEMS/mcl_end/eye_of_ender.lua b/mods/ITEMS/mcl_end/eye_of_ender.lua index ea3d70aba..bc697e359 100644 --- a/mods/ITEMS/mcl_end/eye_of_ender.lua +++ b/mods/ITEMS/mcl_end/eye_of_ender.lua @@ -87,7 +87,7 @@ minetest.register_craftitem("mcl_end:ender_eye", { end local origin = user:get_pos() origin.y = origin.y + 1.5 - local strongholds = mcl_structures.get_registered_structures("stronghold") + local strongholds = mcl_structures.get_structure_data("stronghold") local dim = mcl_worlds.pos_to_dimension(origin) local is_creative = minetest.is_creative_enabled(user:get_player_name()) diff --git a/mods/MAPGEN/mcl_strongholds/init.lua b/mods/MAPGEN/mcl_strongholds/init.lua index 083172a3c..2a362cc40 100644 --- a/mods/MAPGEN/mcl_strongholds/init.lua +++ b/mods/MAPGEN/mcl_strongholds/init.lua @@ -61,7 +61,7 @@ local function init_strongholds() end end - mcl_structures.register_structures("stronghold", table.copy(strongholds)) + mcl_structures.register_structure_data("stronghold", table.copy(strongholds)) strongholds_inited = true end diff --git a/mods/MAPGEN/mcl_structures/init.lua b/mods/MAPGEN/mcl_structures/init.lua index 5d3ecac6c..e330e2c01 100644 --- a/mods/MAPGEN/mcl_structures/init.lua +++ b/mods/MAPGEN/mcl_structures/init.lua @@ -530,7 +530,7 @@ function mcl_structures.generate_desert_temple(pos, rotation, pr) mcl_structures.place_schematic(newpos, path, rotation or "random", nil, true, nil, temple_placement_callback, pr) end -local registered_structures = {} +local structure_data = {} --[[ Returns a table of structure of the specified type. Currently the only valid parameter is "stronghold". @@ -543,18 +543,18 @@ Format of return value: TODO: Implement this function for all other structure types as well. ]] -function mcl_structures.get_registered_structures(structure_type) - if registered_structures[structure_type] then - return table.copy(registered_structures[structure_type]) +function mcl_structures.get_structure_data(structure_type) + if structure_data[structure_type] then + return table.copy(structure_data[structure_type]) else return {} end end -- Register a structures table for the given type. The table format is the same as for --- mcl_structures.get_registered_structures. -function mcl_structures.register_structures(structure_type, structures) - registered_structures[structure_type] = structures +-- mcl_structures.get_structure_data. +function mcl_structures.register_structure_data(structure_type, structures) + structure_data[structure_type] = structures end local function dir_to_rotation(dir)