From 3cf6656df2b555033b31ee20bc839a8b3ca65b1a Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 7 Jan 2018 16:58:44 +0100 Subject: [PATCH] Rename "Monster Spawner" to "Mob Spawner" --- mods/ENTITIES/mobs/api.lua | 2 +- mods/ITEMS/REDSTONE/mesecons_torch/init.lua | 2 +- mods/ITEMS/mcl_mobspawners/README.md | 8 +++---- mods/ITEMS/mcl_mobspawners/init.lua | 26 ++++++++++----------- mods/ITEMS/mcl_torches/init.lua | 5 ++-- mods/MAPGEN/mcl_dungeons/init.lua | 4 ++-- mods/MISC/mcl_privs/init.lua | 2 +- 7 files changed, 24 insertions(+), 25 deletions(-) diff --git a/mods/ENTITIES/mobs/api.lua b/mods/ENTITIES/mobs/api.lua index 5eb357cf12..49edad74c6 100644 --- a/mods/ENTITIES/mobs/api.lua +++ b/mods/ENTITIES/mobs/api.lua @@ -3153,7 +3153,7 @@ function mobs:register_egg(mob, desc, background, addegg, no_creative) groups = grp, _doc_items_longdesc = "This allows you to place a single mob.", - _doc_items_usagehelp = "Just place it where you want the mob to appear. Animals will spawn tamed, unless you hold down the sneak key while placing. If you place this on a monster spawner, you change the monster it spawns.", + _doc_items_usagehelp = "Just place it where you want the mob to appear. Animals will spawn tamed, unless you hold down the sneak key while placing. If you place this on a mob spawner, you change the mob it spawns.", on_place = function(itemstack, placer, pointed_thing) diff --git a/mods/ITEMS/REDSTONE/mesecons_torch/init.lua b/mods/ITEMS/REDSTONE/mesecons_torch/init.lua index 6b8d43fed7..d7effcd0e8 100644 --- a/mods/ITEMS/REDSTONE/mesecons_torch/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_torch/init.lua @@ -65,7 +65,7 @@ mcl_torches.register_torch("mesecon_torch_on", "Redstone Torch", [[Redstone torches can generally be placed at the side and on the top of full solid opaque blocks. The following exceptions apply: • Glass, fence, wall, hopper: Can only be placed on top • Upside-down slab/stair: Can only be placed on top -• Soul sand, monster spawner: Placement possible +• Soul sand, mob spawner: Placement possible • Glowstone and pistons: No placement possible]], "jeija_torches_on.png", "mcl_torches_torch_floor.obj", "mcl_torches_torch_wall.obj", diff --git a/mods/ITEMS/mcl_mobspawners/README.md b/mods/ITEMS/mcl_mobspawners/README.md index 12cc5aee3b..26ac39386e 100644 --- a/mods/ITEMS/mcl_mobspawners/README.md +++ b/mods/ITEMS/mcl_mobspawners/README.md @@ -1,14 +1,14 @@ -This mod adds a monster spawner for MineClone 2. -Monsters will appear around the monster spawner in semi-regular intervals. +This mod adds a mob spawner for MineClone 2. +Monsters will appear around the mob spawner in semi-regular intervals. This mod is originally based on the mob spawner from Mobs Redo by TenPlus1 but has been modified quite a lot to fit the needs of MineClone 2. -Players can get a monster spawner by `giveme` and is initially empty after +Players can get a mob spawner by `giveme` and is initially empty after placing. ## Programmer notes -To set the mob spawned by a monster spawner, first place the monster spawner +To set the mob spawned by a mob spawner, first place the mob spawner (e.g. with `minetest.set_node`), then use the function `mcl_mobspawners.setup_spawner` to set its attributes. See the comment in `init.lua` for more info. diff --git a/mods/ITEMS/mcl_mobspawners/init.lua b/mods/ITEMS/mcl_mobspawners/init.lua index 2d44572c63..ed2d1fc15e 100644 --- a/mods/ITEMS/mcl_mobspawners/init.lua +++ b/mods/ITEMS/mcl_mobspawners/init.lua @@ -4,7 +4,7 @@ mcl_mobspawners = {} local default_mob = "mobs_mc:pig" --- Monster spawner +-- Mob spawner local spawner_default = default_mob.." 0 15 4 15" local function get_mob_textures(mob) @@ -55,7 +55,7 @@ All the arguments are optional! ]] function mcl_mobspawners.setup_spawner(pos, Mob, MinLight, MaxLight, MaxMobsInArea, PlayerDistance, YOffset) - -- Activate monster spawner and disable editing functionality + -- Activate mob spawner and disable editing functionality if Mob == nil then Mob = default_mob end if MinLight == nil then MinLight = 0 end if MaxLight == nil then MaxLight = 15 end @@ -83,9 +83,9 @@ function mcl_mobspawners.setup_spawner(pos, Mob, MinLight, MaxLight, MaxMobsInAr t:start(2) end --- Spawn monsters around pos +-- Spawn mobs around pos -- NOTE: The node is timer-based, rather than ABM-based. -local spawn_monsters = function(pos, elapsed) +local spawn_mobs = function(pos, elapsed) -- get meta local meta = minetest.get_meta(pos) @@ -105,7 +105,7 @@ local spawn_monsters = function(pos, elapsed) -- are we spawning a registered mob? if not mobs.spawning_mobs[mob] then - minetest.log("error", "[mcl_mobspawners] Monster Spawner: Mob doesn't exist: "..mob) + minetest.log("error", "[mcl_mobspawners] Mob Spawner: Mob doesn't exist: "..mob) return end @@ -142,9 +142,9 @@ local spawn_monsters = function(pos, elapsed) end --[[ HACK! - The doll may not stay spawned if the monster spawner is placed far away from + The doll may not stay spawned if the mob spawner is placed far away from players, so we will check for its existance periodically when a player is nearby. - This would happen almost always when the monster spawner is placed by the mapgen. + This would happen almost always when the mob spawner is placed by the mapgen. This is probably caused by a Minetest bug: https://github.com/minetest/minetest/issues/4759 FIXME: Fix this horrible hack. @@ -203,7 +203,7 @@ local spawn_monsters = function(pos, elapsed) end --- The monster spawner node. +-- The mob spawner node. -- PLACEMENT INSTRUCTIONS: -- If this node is placed by a player, minetest.item_place, etc. default settings are applied -- automatially. @@ -215,9 +215,9 @@ minetest.register_node("mcl_mobspawners:spawner", { paramtype = "light", sunlight_propagates = true, walkable = true, - description = S("Monster Spawner"), - _doc_items_longdesc = S("A monster spawner regularily causes mobs to appear around it while a player is nearby. Mobs are spawned regardless of the light level."), - _doc_items_usagehelp = S("If you have a spawn egg, you use it to change the monter to spawn. Just place the item on the monster spawner."), + description = S("Mob Spawner"), + _doc_items_longdesc = S("A mob spawner regularily causes mobs to appear around it while a player is nearby. Mobs are spawned regardless of the light level."), + _doc_items_usagehelp = S("If you have a spawn egg, you use it to change the monter to spawn. Just place the item on the mob spawner."), groups = {pickaxey=1, material_stone=1, deco_block=1}, is_ground_content = false, drop = "", @@ -239,7 +239,7 @@ minetest.register_node("mcl_mobspawners:spawner", { local name = placer:get_player_name() local privs = minetest.get_player_privs(name) if not privs.maphack then - minetest.chat_send_player(name, "Placement denied. You need the “maphack” privilege to place monster spawners.") + minetest.chat_send_player(name, "Placement denied. You need the “maphack” privilege to place mob spawners.") return itemstack end local node_under = minetest.get_node(pointed_thing.under) @@ -264,7 +264,7 @@ minetest.register_node("mcl_mobspawners:spawner", { end end, - on_timer = spawn_monsters, + on_timer = spawn_mobs, on_receive_fields = function(pos, formname, fields, sender) diff --git a/mods/ITEMS/mcl_torches/init.lua b/mods/ITEMS/mcl_torches/init.lua index c1c1dc62fd..33662a48c5 100644 --- a/mods/ITEMS/mcl_torches/init.lua +++ b/mods/ITEMS/mcl_torches/init.lua @@ -70,9 +70,8 @@ mcl_torches.register_torch = function(substring, description, doc_items_longdesc -- Special allowed nodes: -- * soul sand -- * end portal frame (TODO) - -- * monster spawner + -- * mob spawner -- * Fence, wall, glass, hopper: Only on top - -- * Monster spawner -- * Slab: Only on top if upside down -- * Stairs: Only on top if upside down @@ -175,7 +174,7 @@ mcl_torches.register_torch("torch", [[Torches can generally be placed on full solid opaque blocks. The following exceptions apply: • Glass, fence, wall, hopper: Can only be placed on top • Upside-down slab/stair: Can only be placed on top -• Soul sand, monster spawner: Placement possible +• Soul sand, mob spawner: Placement possible • Glowstone and pistons: No placement possible]], "default_torch_on_floor.png", "mcl_torches_torch_floor.obj", "mcl_torches_torch_wall.obj", diff --git a/mods/MAPGEN/mcl_dungeons/init.lua b/mods/MAPGEN/mcl_dungeons/init.lua index e362d265ef..bd081619ca 100644 --- a/mods/MAPGEN/mcl_dungeons/init.lua +++ b/mods/MAPGEN/mcl_dungeons/init.lua @@ -240,7 +240,7 @@ minetest.register_on_generated(function(minp, maxp) table.sort(chestSlots) local currentChest = 1 - -- Calculate the monster spawner position, to be re-used for later + -- Calculate the mob spawner position, to be re-used for later local spawner_pos = {x = x + math.ceil(dim.x/2), y = y+1, z = z + math.ceil(dim.z/2)} table.insert(spawner_posses, spawner_pos) @@ -371,7 +371,7 @@ minetest.register_on_generated(function(minp, maxp) end end - -- Monster spawners are placed seperately, too + -- Mob spawners are placed seperately, too -- We don't want to destroy non-ground nodes for s=1, #spawner_posses do local sp = spawner_posses[s] diff --git a/mods/MISC/mcl_privs/init.lua b/mods/MISC/mcl_privs/init.lua index ef308aba85..c242ed3de2 100644 --- a/mods/MISC/mcl_privs/init.lua +++ b/mods/MISC/mcl_privs/init.lua @@ -1,3 +1,3 @@ minetest.register_privilege("maphack", { - description = "Can place and use advanced blocks like monster spawners, command blocks and barriers.", + description = "Can place and use advanced blocks like mob spawners, command blocks and barriers.", })