]> git.lizzy.rs Git - crystalpvp.git/commitdiff
Add CrystalAura master
authorElias Fleckenstein <eliasfleckenstein@web.de>
Fri, 8 Jan 2021 16:50:46 +0000 (17:50 +0100)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Fri, 8 Jan 2021 16:50:46 +0000 (17:50 +0100)
init.lua
settingtypes.txt

index 80de047f167c6911e9f7642cfd5807cbaf1a5a3e..66edd873915669b3854065cdb6d5c0c33fb80c6c 100644 (file)
--- a/init.lua
+++ b/init.lua
@@ -35,14 +35,14 @@ minetest.register_globalstep(function(dtime)
                                        minetest.switch_to_item("mcl_end:crystal")
                                        minetest.place_node(pos)
                                        placed_crystal = true
-                               end     
+                               end
                        end
                        used_sneak = true
                else
                        used_sneak = false
                end
        end
-       
+
        if minetest.settings:get_bool("autototem") then
                local totem_stack = minetest.get_inventory("current_player").main[9]
                if totem_stack and totem_stack:get_name() ~= "mobs_mc:totem" then
@@ -54,7 +54,16 @@ minetest.register_globalstep(function(dtime)
                        end
                end
        end
+
+       if minetest.settings:get_bool("crystalaura") then
+               for _, obj in ipairs(minetest.get_nearby_objects(7)) do
+                       if obj:get_item_textures() == "mcl_end_crystal.png" then
+                               obj:punch()
+                       end
+               end
+       end
 end)
+
 minetest.register_cheat("CrystalPvP", "Combat", "crystal_pvp")
 minetest.register_cheat("AutoTotem", "Combat", "autototem")
+minetest.register_cheat("CrystalAura", "Combat", "crystalaura")
index 2f6ad0329fed4cef8ff035bd21b76397b2dd2e8a..e0a6453ba88d30af29a3156e909a7ac062fc5935 100644 (file)
@@ -1,2 +1,3 @@
 crystalpvp (CrystalPvP) bool false
 autototem (AutoTotem) bool false
+crystalaura (CrystalAura) bool false