]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Removed some obsolete code (#10562)
authorZughy <63455151+Zughy@users.noreply.github.com>
Thu, 21 Jan 2021 18:17:09 +0000 (18:17 +0000)
committerGitHub <noreply@github.com>
Thu, 21 Jan 2021 18:17:09 +0000 (18:17 +0000)
Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
builtin/game/deprecated.lua
builtin/game/item.lua
builtin/game/register.lua
doc/world_format.txt
src/activeobject.h
src/mapgen/mapgen.h
src/script/common/c_content.cpp
src/script/lua_api/l_mapgen.cpp
src/server/player_sao.cpp

index 20f0482eb374f11be65e073b01c8048d1e1bfa4f..c5c7848f5edd5f6b53253a961f9d0b8b650af0bb 100644 (file)
@@ -1,28 +1,5 @@
 -- Minetest: builtin/deprecated.lua
 
---
--- Default material types
---
-local function digprop_err()
-       core.log("deprecated", "The core.digprop_* functions are obsolete and need to be replaced by item groups.")
-end
-
-core.digprop_constanttime = digprop_err
-core.digprop_stonelike = digprop_err
-core.digprop_dirtlike = digprop_err
-core.digprop_gravellike = digprop_err
-core.digprop_woodlike = digprop_err
-core.digprop_leaveslike = digprop_err
-core.digprop_glasslike = digprop_err
-
-function core.node_metadata_inventory_move_allow_all()
-       core.log("deprecated", "core.node_metadata_inventory_move_allow_all is obsolete and does nothing.")
-end
-
-function core.add_to_creative_inventory(itemstring)
-       core.log("deprecated", "core.add_to_creative_inventory is obsolete and does nothing.")
-end
-
 --
 -- EnvRef
 --
@@ -77,7 +54,7 @@ core.setting_save = setting_proxy("write")
 
 function core.register_on_auth_fail(func)
        core.log("deprecated", "core.register_on_auth_fail " ..
-               "is obsolete and should be replaced by " ..
+               "is deprecated and should be replaced by " ..
                "core.register_on_authplayer instead.")
 
        core.register_on_authplayer(function (player_name, ip, is_success)
index 109712b42d2e84ce9ab9353c511f337a4986e921..0df25b4555b1fffc262670cd8fd28b9f19c47fed 100644 (file)
@@ -705,10 +705,6 @@ core.nodedef_default = {
 
        on_receive_fields = nil,
 
-       on_metadata_inventory_move = core.node_metadata_inventory_move_allow_all,
-       on_metadata_inventory_offer = core.node_metadata_inventory_offer_allow_all,
-       on_metadata_inventory_take = core.node_metadata_inventory_take_allow_all,
-
        -- Node properties
        drawtype = "normal",
        visual_scale = 1.0,
index 93e1dad12aaa2d52acb97fa790700b1b5ef56683..b006957e914452a612b504ed47544953a6b87936 100644 (file)
@@ -324,13 +324,6 @@ for name in pairs(forbidden_item_names) do
        register_alias_raw(name, "")
 end
 
-
--- Obsolete:
--- Aliases for core.register_alias (how ironic...)
--- core.alias_node = core.register_alias
--- core.alias_tool = core.register_alias
--- core.alias_craftitem = core.register_alias
-
 --
 -- Built-in node definitions. Also defined in C.
 --
index 73a03e5ee2c42fd161cb6233d3c548342b2fd86d..a8a9e463ea910a94dd52514e591bd1dd6c4cdcbf 100644 (file)
@@ -493,19 +493,8 @@ Static objects are persistent freely moving objects in the world.
 
 Object types:
 1: Test object
-2: Item
-3: Rat (obsolete)
-4: Oerkki (obsolete)
-5: Firefly (obsolete)
-6: MobV2 (obsolete)
 7: LuaEntity
 
-1: Item:
-  u8 version
-  version 0:
-    u16 len
-    u8[len] itemstring
-
 7: LuaEntity:
   u8 compatibility_byte (always 1)
   u16 len
index 0829858adb654c1534cbedf420ce51fdb334ec67..1d8a3712b6009c4ccf728fcc553188d72809de63 100644 (file)
@@ -28,11 +28,11 @@ enum ActiveObjectType {
        ACTIVEOBJECT_TYPE_INVALID = 0,
        ACTIVEOBJECT_TYPE_TEST = 1,
 // Obsolete stuff
-       ACTIVEOBJECT_TYPE_ITEM = 2,
-//     ACTIVEOBJECT_TYPE_RAT = 3,
-//     ACTIVEOBJECT_TYPE_OERKKI1 = 4,
-//     ACTIVEOBJECT_TYPE_FIREFLY = 5,
-       ACTIVEOBJECT_TYPE_MOBV2 = 6,
+// ACTIVEOBJECT_TYPE_ITEM = 2,
+// ACTIVEOBJECT_TYPE_RAT = 3,
+// ACTIVEOBJECT_TYPE_OERKKI1 = 4,
+// ACTIVEOBJECT_TYPE_FIREFLY = 5,
+// ACTIVEOBJECT_TYPE_MOBV2 = 6,
 // End obsolete stuff
        ACTIVEOBJECT_TYPE_LUAENTITY = 7,
 // Special type, not stored as a static object
index 1487731e20bb46ef19de89c3efecfbd4bd3d9b3a..61db4f3b97740e2a679d61c01c34006086e08f4a 100644 (file)
@@ -30,10 +30,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #define MAPGEN_DEFAULT_NAME "v7"
 
 /////////////////// Mapgen flags
-#define MG_TREES       0x01  // Obsolete. Moved into mgv6 flags
 #define MG_CAVES       0x02
 #define MG_DUNGEONS    0x04
-#define MG_FLAT        0x08  // Obsolete. Moved into mgv6 flags
 #define MG_LIGHT       0x10
 #define MG_DECORATIONS 0x20
 #define MG_BIOMES      0x40
index e3cb9042e0f79f7881a040d4c3083ef374fb2a43..4316f412def43de86d19e095426197cd040d5d2f 100644 (file)
@@ -83,9 +83,6 @@ void read_item_definition(lua_State* L, int index,
 
        getboolfield(L, index, "liquids_pointable", def.liquids_pointable);
 
-       warn_if_field_exists(L, index, "tool_digging_properties",
-                       "Obsolete; use tool_capabilities");
-
        lua_getfield(L, index, "tool_capabilities");
        if(lua_istable(L, -1)){
                def.tool_capabilities = new ToolCapabilities(
@@ -653,20 +650,6 @@ void read_content_features(lua_State *L, ContentFeatures &f, int index)
                warningstream << "Node " << f.name.c_str()
                        << " has a palette, but not a suitable paramtype2." << std::endl;
 
-       // Warn about some obsolete fields
-       warn_if_field_exists(L, index, "wall_mounted",
-                       "Obsolete; use paramtype2 = 'wallmounted'");
-       warn_if_field_exists(L, index, "light_propagates",
-                       "Obsolete; determined from paramtype");
-       warn_if_field_exists(L, index, "dug_item",
-                       "Obsolete; use 'drop' field");
-       warn_if_field_exists(L, index, "extra_dug_item",
-                       "Obsolete; use 'drop' field");
-       warn_if_field_exists(L, index, "extra_dug_item_rarity",
-                       "Obsolete; use 'drop' field");
-       warn_if_field_exists(L, index, "metadata_name",
-                       "Obsolete; use on_add and metadata callbacks");
-
        // True for all ground-like things like stone and mud, false for eg. trees
        getboolfield(L, index, "is_ground_content", f.is_ground_content);
        f.light_propagates = (f.param_type == CPT_LIGHT);
index 834938e5651286d68415b0c1e49be71c48d1cb98..498859f1480a3beb559b4e7a1c8e8ecc6d50cabd 100644 (file)
@@ -873,9 +873,6 @@ int ModApiMapgen::l_set_mapgen_params(lua_State *L)
        if (lua_isnumber(L, -1))
                settingsmgr->setMapSetting("chunksize", readParam<std::string>(L, -1), true);
 
-       warn_if_field_exists(L, 1, "flagmask",
-               "Obsolete: flags field now includes unset flags.");
-
        lua_getfield(L, 1, "flags");
        if (lua_isstring(L, -1))
                settingsmgr->setMapSetting("mg_flags", readParam<std::string>(L, -1), true);
index c1b1401e6a837b89d6dcea20a012c284ac66ca68..110d2010d20dd314dadc5fef56770a39ce645c25 100644 (file)
@@ -148,7 +148,7 @@ std::string PlayerSAO::getClientInitializationData(u16 protocol_version)
 
 void PlayerSAO::getStaticData(std::string * result) const
 {
-       FATAL_ERROR("Obsolete function");
+       FATAL_ERROR("This function shall not be called for PlayerSAO");
 }
 
 void PlayerSAO::step(float dtime, bool send_recommended)