crystalclear: renamed to crystalkamikaze :)

This commit is contained in:
cora 2020-11-28 03:48:57 +01:00 committed by Schmappie Eldress
parent 1603f86387
commit b32586700a
3 changed files with 32 additions and 31 deletions

View File

@ -1,30 +0,0 @@
local fnd=false
local cpos={x=0,y=0,z=0}
local function find_crystal()
if fnd then return cpos end
for k, v in ipairs(minetest.localplayer.get_nearby_objects(100)) do
if ( v:get_item_textures():find("mcl_end_crystal")) then
cpos=v:get_pos()
fnd=true
return cpos
end
end
end
minetest.register_globalstep(function()
if minetest.settings:get_bool("crystalclear") then
minetest.settings:set_bool('noclip',true)
minetest.settings:set_bool("pitch_move",true)
minetest.settings:set_bool("continuous_forward",true)
find_crystal()
autofly.aim(cpos)
core.set_keypress("special1", true)
end
end)
minetest.register_on_death(function()
if not minetest.settings:get_bool("crystalclear") then return end
fnd=false
end)
minetest.register_cheat("crystalClear", "Combat", "crystalclear")

View File

@ -0,0 +1,31 @@
local fnd=false
local cpos={x=0,y=0,z=0}
local function find_crystal()
if fnd then return cpos end
for k, v in ipairs(minetest.localplayer.get_nearby_objects(100)) do
if ( v:get_item_textures():find("mcl_end_crystal")) then
cpos=v:get_pos()
fnd=true
return true
end
end
return false
end
minetest.register_globalstep(function()
if not minetest.settings:get_bool("crystalkamikaze") then return end
if not find_crystal() then return end
minetest.settings:set_bool('noclip',true)
minetest.settings:set_bool("pitch_move",true)
minetest.settings:set_bool("continuous_forward",true)
autofly.aim(cpos)
core.set_keypress("special1", true)
end)
minetest.register_on_death(function()
if not minetest.settings:get_bool("crystalkamikaze") then return end
fnd=false
end)
minetest.register_cheat("CrystalKamikaze", "Combat", "crystalkamikaze")

View File

@ -38,4 +38,4 @@ load_mod_autocraft = true
load_mod_quint = true load_mod_quint = true
load_mod_automt = true load_mod_automt = true
load_mod_nlist = true load_mod_nlist = true
load_mod_crystalclear = true load_mod_crystalkamikaze = true