From 307883157df5e1cbe097b76efa215df27b742e34 Mon Sep 17 00:00:00 2001 From: cora Date: Sun, 1 Nov 2020 16:09:09 +0100 Subject: [PATCH 1/9] autoeat: timed eat when certain things are happening --- clientmods/autoeat/init.lua | 17 +++++++++++++++-- clientmods/autofly/init.lua | 2 ++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/clientmods/autoeat/init.lua b/clientmods/autoeat/init.lua index 71fddfdfc..d1bcc9a6a 100644 --- a/clientmods/autoeat/init.lua +++ b/clientmods/autoeat/init.lua @@ -1,10 +1,12 @@ autoeat = {} - +autoeat.last = 0 local last_step_eating = false +local interval = 1 function autoeat.eat() local player = minetest.localplayer local owx=player:get_wield_index() + autoeat.eating = true player:set_wield_index(8) minetest.place_node(player:get_pos()) minetest.after("0.2",function() @@ -12,10 +14,15 @@ function autoeat.eat() end) end +function autoeat.conditional() + if os.time() < autoeat.last + ( interval * 60 ) then return end + autoeat.last = os.time() + autoeat.eat() +end + minetest.register_on_damage_taken(function() if not minetest.settings:get_bool("autoeat") then return end autoeat.eat() - autoeat.eating = true end) minetest.register_globalstep(function() @@ -24,6 +31,12 @@ minetest.register_globalstep(function() elseif autoeat.eating then last_step_eating = true end + if ( autofly.speed ~= 0 and minetest.settings:get_bool("autosprint") ) + or (minetest.settings:get_bool("autosprintfsprint") and minetest.settings:get_bool("continuous_forward") ) + or (minetest.settings:get_bool("killaura")) then + autoeat.conditional() + end + end) diff --git a/clientmods/autofly/init.lua b/clientmods/autofly/init.lua index de3d38521..74b1b2ac5 100644 --- a/clientmods/autofly/init.lua +++ b/clientmods/autofly/init.lua @@ -54,6 +54,7 @@ local storage = minetest.get_mod_storage() local wpr=false; local twpname=nil local oldpm=false +local lpos={x=0,y=0,z=0} local info=minetest.get_server_info() local stprefix="autofly-".. info['address'] .. '-' @@ -117,6 +118,7 @@ minetest.register_globalstep(function() if lpos then local dst=vector.distance(minetest.localplayer:get_pos(),lpos) speed=round2(dst,1) + autofly.speed=speed end lpos=minetest.localplayer:get_pos() end) From 2b63530751673982dc4ab236d11091289b4147b3 Mon Sep 17 00:00:00 2001 From: cora Date: Sun, 1 Nov 2020 16:13:30 +0100 Subject: [PATCH 2/9] autoeat: set conditional eating interval to 5 mins --- clientmods/autoeat/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clientmods/autoeat/init.lua b/clientmods/autoeat/init.lua index d1bcc9a6a..7500c89a5 100644 --- a/clientmods/autoeat/init.lua +++ b/clientmods/autoeat/init.lua @@ -1,7 +1,7 @@ autoeat = {} autoeat.last = 0 local last_step_eating = false -local interval = 1 +local interval = 5 function autoeat.eat() local player = minetest.localplayer From 1a5f55d8937068753fe732baf78f1f5d42dc84c7 Mon Sep 17 00:00:00 2001 From: cora Date: Sun, 1 Nov 2020 16:16:39 +0100 Subject: [PATCH 3/9] autoeat: added seperate setting for timed autoeat --- clientmods/autoeat/init.lua | 2 ++ clientmods/autofly/init.lua | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/clientmods/autoeat/init.lua b/clientmods/autoeat/init.lua index 7500c89a5..55aa8d9ec 100644 --- a/clientmods/autoeat/init.lua +++ b/clientmods/autoeat/init.lua @@ -31,6 +31,7 @@ minetest.register_globalstep(function() elseif autoeat.eating then last_step_eating = true end + if not autoeat_timed then return end if ( autofly.speed ~= 0 and minetest.settings:get_bool("autosprint") ) or (minetest.settings:get_bool("autosprintfsprint") and minetest.settings:get_bool("continuous_forward") ) or (minetest.settings:get_bool("killaura")) then @@ -41,3 +42,4 @@ minetest.register_globalstep(function() end) minetest.register_cheat("AutoEat", "Player", "autoeat") +minetest.register_cheat("AutoEatTimed", "Player", "autoeat_timed") diff --git a/clientmods/autofly/init.lua b/clientmods/autofly/init.lua index 74b1b2ac5..c27cf9151 100644 --- a/clientmods/autofly/init.lua +++ b/clientmods/autofly/init.lua @@ -218,6 +218,8 @@ function autofly.goto_waypoint(name) oldpm=minetest.settings:get_bool("pitch_move") minetest.settings:set_bool("pitch_move",true) minetest.settings:set_bool("continuous_forward",true) + minetest.settings:set_bool("afly_autoaim",true) + minetest.settings:set_bool("autoeat_timed",true) autofly.last_coords = autofly.get_waypoint(name) autofly.last_name = name autofly.set_hud_info(name) @@ -230,7 +232,7 @@ end function autofly.arrived() minetest.settings:set("continuous_forward", "false") minetest.settings:set_bool("pitch_move",oldpm) - core.set_keypress("special1", false) + core.set_keypress("special1", false) autofly.set_hud_info("Arrived at destination") minetest.localplayer:hud_change(hud_info,'text',twpname .. "\n" .. "Arrived at destination.") wpr=false From 182a28e1975e0fd867f16da90deb09e0d5365cf9 Mon Sep 17 00:00:00 2001 From: cora Date: Sun, 1 Nov 2020 16:21:54 +0100 Subject: [PATCH 4/9] autofly: removed image test --- clientmods/autoeat/init.lua | 1 + clientmods/autofly/init.lua | 2 ++ clientmods/autofly/wpforms.lua | 1 - 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/clientmods/autoeat/init.lua b/clientmods/autoeat/init.lua index 55aa8d9ec..ea1ee623e 100644 --- a/clientmods/autoeat/init.lua +++ b/clientmods/autoeat/init.lua @@ -31,6 +31,7 @@ minetest.register_globalstep(function() elseif autoeat.eating then last_step_eating = true end + if not autoeat_timed then return end if ( autofly.speed ~= 0 and minetest.settings:get_bool("autosprint") ) or (minetest.settings:get_bool("autosprintfsprint") and minetest.settings:get_bool("continuous_forward") ) diff --git a/clientmods/autofly/init.lua b/clientmods/autofly/init.lua index c27cf9151..7b669a843 100644 --- a/clientmods/autofly/init.lua +++ b/clientmods/autofly/init.lua @@ -232,6 +232,8 @@ end function autofly.arrived() minetest.settings:set("continuous_forward", "false") minetest.settings:set_bool("pitch_move",oldpm) + minetest.settings:set_bool("afly_autoaim",false) + minetest.settings:set_bool("autoeat_timed",false) core.set_keypress("special1", false) autofly.set_hud_info("Arrived at destination") minetest.localplayer:hud_change(hud_info,'text',twpname .. "\n" .. "Arrived at destination.") diff --git a/clientmods/autofly/wpforms.lua b/clientmods/autofly/wpforms.lua index 65f01e2b0..0c3d02791 100644 --- a/clientmods/autofly/wpforms.lua +++ b/clientmods/autofly/wpforms.lua @@ -26,7 +26,6 @@ function autofly.display_formspec() 'button[2.125,7.5;1.2,0.5;warpae;w+e]' .. 'button[2.625,7.5;1.3,0.5;rename;Rename]' .. 'button[3.9375,7.5;1.3,0.5;delete;Delete]' .. - 'image[50,50;100,100;"test"]'.. 'textlist[0,0.75;5,6;marker;' -- Iterate over all the waypoints From 2c7f1359253619abb81faa586a3274a8b2389168 Mon Sep 17 00:00:00 2001 From: cora Date: Sun, 1 Nov 2020 16:28:27 +0100 Subject: [PATCH 5/9] autofly: fixed autoSprint to reset correctly --- clientmods/autofly/init.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/clientmods/autofly/init.lua b/clientmods/autofly/init.lua index 7b669a843..5f79fa739 100644 --- a/clientmods/autofly/init.lua +++ b/clientmods/autofly/init.lua @@ -88,11 +88,13 @@ end minetest.register_globalstep(function() autofly.checkfall() - if minetest.settings:get_bool("autosprint") then - core.set_keypress("special1", true) - elseif minetest.settings:get_bool("continuous_forward") and minetest.settings:get_bool("autofsprint") then + if minetest.settings:get_bool("autosprint") or (minetest.settings:get_bool("continuous_forward") and minetest.settings:get_bool("autofsprint")) then core.set_keypress("special1", true) + else + core.set_keypress("special1", false) end + + if not minetest.localplayer then return end if not twpname then autofly.set_hud_info("") From e4a04a5079edeac55360e3da213a5845cfc5ec12 Mon Sep 17 00:00:00 2001 From: cora Date: Sun, 1 Nov 2020 16:58:32 +0100 Subject: [PATCH 6/9] autoeat: fixed stupid mistake --- clientmods/autoeat/init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clientmods/autoeat/init.lua b/clientmods/autoeat/init.lua index ea1ee623e..6ea793c4a 100644 --- a/clientmods/autoeat/init.lua +++ b/clientmods/autoeat/init.lua @@ -1,7 +1,7 @@ autoeat = {} autoeat.last = 0 local last_step_eating = false -local interval = 5 +autoeat.interval = 1 function autoeat.eat() local player = minetest.localplayer @@ -15,7 +15,7 @@ function autoeat.eat() end function autoeat.conditional() - if os.time() < autoeat.last + ( interval * 60 ) then return end + if os.time() < autoeat.last + ( autoeat.interval * 60 ) then return end autoeat.last = os.time() autoeat.eat() end @@ -32,9 +32,9 @@ minetest.register_globalstep(function() last_step_eating = true end - if not autoeat_timed then return end + if not minetest.settings:get_bool("autoeat_timed") then return end if ( autofly.speed ~= 0 and minetest.settings:get_bool("autosprint") ) - or (minetest.settings:get_bool("autosprintfsprint") and minetest.settings:get_bool("continuous_forward") ) + or (minetest.settings:get_bool("autofsprint") and minetest.settings:get_bool("continuous_forward") ) or (minetest.settings:get_bool("killaura")) then autoeat.conditional() end From 00e81bfe3e1491cf4cc16bebdfa46fac03ee2a21 Mon Sep 17 00:00:00 2001 From: cora Date: Sun, 1 Nov 2020 17:12:45 +0100 Subject: [PATCH 7/9] added missing ws cheats ... time spent meaningful ... ^ --- clientmods/cheats/init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clientmods/cheats/init.lua b/clientmods/cheats/init.lua index aeae859e5..c1a2748c4 100644 --- a/clientmods/cheats/init.lua +++ b/clientmods/cheats/init.lua @@ -6,6 +6,7 @@ core.cheats = { ["AttachmentFloat"] = "float_above_parent", ["CrystalPvP"] = "crystal_pvp", ["AutoTotem"] = "autototem", + ["GoddessMode"] = "goddess", ["ThroughWalls"] = "dont_point_nodes", }, ["Movement"] = { @@ -39,6 +40,7 @@ core.cheats = { ["BlockWater"] = "block_water", ["PlaceOnTop"] = "autotnt", ["Replace"] = "replace" + ["Random SC"] = "randomsc" }, ["Exploit"] = { ["EntitySpeed"] = "entity_speed", From c91f9cdc8c163045e08208b83b1d3e21f79c0c97 Mon Sep 17 00:00:00 2001 From: cora Date: Sun, 1 Nov 2020 17:17:22 +0100 Subject: [PATCH 8/9] lol --- clientmods/cheats/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clientmods/cheats/init.lua b/clientmods/cheats/init.lua index c1a2748c4..694a3b91d 100644 --- a/clientmods/cheats/init.lua +++ b/clientmods/cheats/init.lua @@ -39,7 +39,7 @@ core.cheats = { ["ScaffoldPlus"] = "scaffold_plus", ["BlockWater"] = "block_water", ["PlaceOnTop"] = "autotnt", - ["Replace"] = "replace" + ["Replace"] = "replace", ["Random SC"] = "randomsc" }, ["Exploit"] = { From 7ad3089d37ce6507a1f3a779c6f4a4a29b9b7551 Mon Sep 17 00:00:00 2001 From: cora Date: Sun, 1 Nov 2020 18:11:16 +0100 Subject: [PATCH 9/9] removed df chatcommand fuckery --- clientmods/commands/init.lua | 7 ++++--- clientmods/inventory/inventory.lua | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/clientmods/commands/init.lua b/clientmods/commands/init.lua index 8d06b85a5..757c06aa6 100644 --- a/clientmods/commands/init.lua +++ b/clientmods/commands/init.lua @@ -1,5 +1,5 @@ -- Minetest: builtin/common/chatcommands.lua - +--[[ core.registered_chatcommands = {} function core.register_chatcommand(cmd, def) @@ -148,7 +148,7 @@ if INIT == "client" then return do_help_cmd(nil, param) end, }) - +--]] core.register_chatcommand("say", { description = "Send raw text", func = function(text) @@ -236,7 +236,7 @@ core.register_chatcommand("set", { return false, "Invalid parameters (see .help set)." end, }) - +--[[] else core.register_chatcommand("help", { params = "[all | privs | ]", @@ -244,3 +244,4 @@ else func = do_help_cmd, }) end +--]] diff --git a/clientmods/inventory/inventory.lua b/clientmods/inventory/inventory.lua index baedc35a1..6c87ba787 100644 --- a/clientmods/inventory/inventory.lua +++ b/clientmods/inventory/inventory.lua @@ -30,7 +30,7 @@ core.register_globalstep(function(dtime) end end) -core.register_list_command("eject", "Configure AutoEject", "eject_items") +--core.register_list_command("eject", "Configure AutoEject", "eject_items") -- AutoTool