From b082a746fa6af43be50bb4245f315b0b090538c9 Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Sat, 8 May 2021 11:18:50 -0700 Subject: [PATCH] Relable to "sneeker" --- README.md | 2 +- init.lua | 28 +++++++++--------- mod.conf | 6 ++-- ...reeper_explode.ogg => sneeker_explode.ogg} | Bin sounds/{creeper_hiss.ogg => sneeker_hiss.ogg} | Bin spawn.lua | 2 +- textures/{creeper.png => sneeker.png} | Bin ...reeper_powered.png => sneeker_powered.png} | Bin .../{creeper_smoke.png => sneeker_smoke.png} | Bin ...eper_spawnegg.png => sneeker_spawnegg.png} | Bin tnt_function.lua | 6 ++-- 11 files changed, 22 insertions(+), 22 deletions(-) rename sounds/{creeper_explode.ogg => sneeker_explode.ogg} (100%) rename sounds/{creeper_hiss.ogg => sneeker_hiss.ogg} (100%) rename textures/{creeper.png => sneeker.png} (100%) rename textures/{creeper_powered.png => sneeker_powered.png} (100%) rename textures/{creeper_smoke.png => sneeker_smoke.png} (100%) rename textures/{creeper_spawnegg.png => sneeker_spawnegg.png} (100%) diff --git a/README.md b/README.md index 717c750..4ea8573 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## Creeper mod for Minetest +## Sneeker mod for Minetest --- ### Description: diff --git a/init.lua b/init.lua index 21dab1e..93aa999 100644 --- a/init.lua +++ b/init.lua @@ -1,12 +1,12 @@ -creeper = {} +sneeker = {} --[[ -- DISABLED!!! do return end --]] -dofile(minetest.get_modpath("creeper").."/tnt_function.lua") -dofile(minetest.get_modpath("creeper").."/spawn.lua") +dofile(minetest.get_modpath("sneeker").."/tnt_function.lua") +dofile(minetest.get_modpath("sneeker").."/spawn.lua") local function jump(self,pos,direction) local velocity = self.object:get_velocity() @@ -58,7 +58,7 @@ local def = { collisionbox = {-0.25,-0.7,-0.25, 0.25,0.8,0.25}, visual = "mesh", mesh = "character.b3d", - textures = {"creeper.png"}, + textures = {"sneeker.png"}, makes_footstep_sound = false, -- Original @@ -91,12 +91,12 @@ def.on_activate = function(self,staticdata) if data and type(data) == "table" then if data.powered == true then self.powered = true - self.object:set_properties({textures = {"creeper_powered.png"}}) + self.object:set_properties({textures = {"sneeker_powered.png"}}) end else if math.random(0,20) == 20 then self.powered = true - self.object:set_properties({textures = {"creeper_powered.png"}}) + self.object:set_properties({textures = {"sneeker_powered.png"}}) end end end @@ -146,7 +146,7 @@ def.on_step = function(self, dtime) if self.chase and self.visualx < 2 then if self.hiss == false then - minetest.sound_play("creeper_hiss",{pos=pos,gain=1.5,max_hear_distance=2*64}) + minetest.sound_play("sneeker_hiss",{pos=pos,gain=1.5,max_hear_distance=2*64}) end self.visualx = self.visualx+0.05 self.object:set_properties({ @@ -237,8 +237,8 @@ def.on_step = function(self, dtime) self.chase = true if self.visualx >= 2 then self.object:remove() - creeper.boom(pos,self.powered) - minetest.sound_play("creeper_explode",{pos=pos,gain=1.5,max_hear_distance=2*64}) + sneeker.boom(pos,self.powered) + minetest.sound_play("sneeker_explode",{pos=pos,gain=1.5,max_hear_distance=2*64}) end end end @@ -340,17 +340,17 @@ def.get_staticdata = function(self) }) end -minetest.register_entity("creeper:creeper",def) +minetest.register_entity("sneeker:sneeker",def) -minetest.register_craftitem("creeper:spawnegg",{ - description = "Creeper Spawn Egg", - inventory_image = "creeper_spawnegg.png", +minetest.register_craftitem("sneeker:spawnegg",{ + description = "Sneeker Spawn Egg", + inventory_image = "sneeker_spawnegg.png", stack_max = 64, on_place = function(itemstack,placer,pointed_thing) if pointed_thing.type == "node" then local pos = pointed_thing.above pos.y = pos.y+1 - minetest.add_entity(pos,"creeper:creeper") + minetest.add_entity(pos,"sneeker:sneeker") if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end diff --git a/mod.conf b/mod.conf index 515dbd1..7bcae03 100644 --- a/mod.conf +++ b/mod.conf @@ -1,5 +1,5 @@ -name = creeper -title = Creeper -description = Adds some explosive nuisance. +name = sneeker +title = Sneeker +description = An explosive nuisance. author = Rui depends = default, tnt diff --git a/sounds/creeper_explode.ogg b/sounds/sneeker_explode.ogg similarity index 100% rename from sounds/creeper_explode.ogg rename to sounds/sneeker_explode.ogg diff --git a/sounds/creeper_hiss.ogg b/sounds/sneeker_hiss.ogg similarity index 100% rename from sounds/creeper_hiss.ogg rename to sounds/sneeker_hiss.ogg diff --git a/spawn.lua b/spawn.lua index 1e66db9..96bd1c2 100644 --- a/spawn.lua +++ b/spawn.lua @@ -27,6 +27,6 @@ minetest.register_abm({ if minetest.get_node(pos).name ~= "air" then return end - minetest.add_entity(pos,"creeper:creeper") + minetest.add_entity(pos,"sneeker:sneeker") end }) diff --git a/textures/creeper.png b/textures/sneeker.png similarity index 100% rename from textures/creeper.png rename to textures/sneeker.png diff --git a/textures/creeper_powered.png b/textures/sneeker_powered.png similarity index 100% rename from textures/creeper_powered.png rename to textures/sneeker_powered.png diff --git a/textures/creeper_smoke.png b/textures/sneeker_smoke.png similarity index 100% rename from textures/creeper_smoke.png rename to textures/sneeker_smoke.png diff --git a/textures/creeper_spawnegg.png b/textures/sneeker_spawnegg.png similarity index 100% rename from textures/creeper_spawnegg.png rename to textures/sneeker_spawnegg.png diff --git a/tnt_function.lua b/tnt_function.lua index c52009e..fb808c6 100644 --- a/tnt_function.lua +++ b/tnt_function.lua @@ -128,7 +128,7 @@ local function add_effects(pos, radius) maxexptime = 3, minsize = 8, maxsize = 16, - texture = "creeper_smoke.png", + texture = "sneeker_smoke.png", }) end @@ -184,12 +184,12 @@ local function explode(pos, radius) return drops end -function creeper.boom(pos,large) +function sneeker.boom(pos,large) local radius = radius if large then radius = large_radius end - minetest.sound_play("creeper_explode", {pos=pos, gain=1.5, max_hear_distance=2*64}) + minetest.sound_play("sneeker_explode", {pos=pos, gain=1.5, max_hear_distance=2*64}) minetest.set_node(pos, {name="tnt:boom"}) minetest.get_node_timer(pos):start(0.5) local drops = explode(pos, radius)