minetest.register_cheat: fix multiple definition
This commit is contained in:
parent
0c0a8236e9
commit
7e23013727
@ -3,6 +3,10 @@ core.cheats = {
|
|||||||
["Killaura"] = "killaura",
|
["Killaura"] = "killaura",
|
||||||
["AntiKnockback"] = "antiknockback",
|
["AntiKnockback"] = "antiknockback",
|
||||||
["FastHit"] = "spamclick",
|
["FastHit"] = "spamclick",
|
||||||
|
["AttachmentFloat"] = "float_above_parent",
|
||||||
|
["CrystalPvP"] = "crystal_pvp",
|
||||||
|
["AutoTotem"] = "autototem",
|
||||||
|
["ThroughWalls"] = "dont_point_nodes",
|
||||||
},
|
},
|
||||||
["Movement"] = {
|
["Movement"] = {
|
||||||
["Freecam"] = "freecam",
|
["Freecam"] = "freecam",
|
||||||
@ -12,6 +16,9 @@ core.cheats = {
|
|||||||
["AutoJump"] = "autojump",
|
["AutoJump"] = "autojump",
|
||||||
["Jesus"] = "jesus",
|
["Jesus"] = "jesus",
|
||||||
["NoSlow"] = "no_slow",
|
["NoSlow"] = "no_slow",
|
||||||
|
["AutoSneak"] = "autosneak",
|
||||||
|
["Autosprint"] = 'autosprint',
|
||||||
|
["AutoForwSprint"] = 'autofsprint'
|
||||||
},
|
},
|
||||||
["Render"] = {
|
["Render"] = {
|
||||||
["Xray"] = "xray",
|
["Xray"] = "xray",
|
||||||
@ -32,14 +39,36 @@ core.cheats = {
|
|||||||
["IncreasedRange"] = "increase_tool_range",
|
["IncreasedRange"] = "increase_tool_range",
|
||||||
["UnlimitedRange"] = "increase_tool_range_plus",
|
["UnlimitedRange"] = "increase_tool_range_plus",
|
||||||
["PointLiquids"] = "point_liquids",
|
["PointLiquids"] = "point_liquids",
|
||||||
|
["Scaffold"] = "scaffold",
|
||||||
|
["ScaffoldPlus"] = "scaffold_plus",
|
||||||
|
["BlockWater"] = "block_water",
|
||||||
|
["PlaceOnTop"] = "autotnt",
|
||||||
|
["Replace"] = "replace",
|
||||||
|
["Random SC"] = "randomsc"
|
||||||
},
|
},
|
||||||
["Exploit"] = {
|
["Exploit"] = {
|
||||||
["EntitySpeed"] = "entity_speed",
|
["EntitySpeed"] = "entity_speed",
|
||||||
["ParticleExploit"] = "log_particles",
|
["ParticleExploit"] = "log_particles",
|
||||||
},
|
},
|
||||||
|
["Chat"] = {
|
||||||
|
["IgnoreStatus"] = "ignore_status_messages",
|
||||||
|
["Deathmessages"] = "mark_deathmessages",
|
||||||
|
},
|
||||||
["Player"] = {
|
["Player"] = {
|
||||||
["NoFallDamage"] = "prevent_natural_damage",
|
["NoFallDamage"] = "prevent_natural_damage",
|
||||||
["NoForceRotate"] = "no_force_rotate",
|
["NoForceRotate"] = "no_force_rotate",
|
||||||
|
["IncreasedRange"] = "increase_tool_range",
|
||||||
|
["UnlimitedRange"] = "increase_tool_range_plus",
|
||||||
|
["PointLiquids"] = "point_liquids",
|
||||||
|
["PrivBypass"] = "priv_bypass",
|
||||||
|
["AutoRespawn"] = "autorespawn",
|
||||||
|
},
|
||||||
|
["Inventory"] = {
|
||||||
|
["AutoEject"] = "autoeject",
|
||||||
|
["AutoTool"] = "autotool",
|
||||||
|
["Enderchest"] = core.open_enderchest,
|
||||||
|
["HandSlot"] = core.open_handslot,
|
||||||
|
["NextItem"] = "next_item",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -449,7 +449,10 @@ end
|
|||||||
register_chatcommand_alias('clear_waypoint', 'cwp','cls')
|
register_chatcommand_alias('clear_waypoint', 'cwp','cls')
|
||||||
|
|
||||||
if (_G["minetest"]["register_cheat"] == nil) then
|
if (_G["minetest"]["register_cheat"] == nil) then
|
||||||
|
|
||||||
minetest.settings:set_bool("afly_autoaim", false)
|
minetest.settings:set_bool("afly_autoaim", false)
|
||||||
minetest.settings:set_bool("afly_softlanding", true)
|
minetest.settings:set_bool("afly_softlanding", true)
|
||||||
|
else
|
||||||
|
minetest.register_cheat("Aim", "Autofly", "afly_autoaim")
|
||||||
|
minetest.register_cheat("Softlanding", "Autofly", "afly_softlanding")
|
||||||
|
minetest.register_cheat("Waypoints", "Autofly", autofly.display_formspec)
|
||||||
end
|
end
|
||||||
|
@ -1,90 +0,0 @@
|
|||||||
core.cheats = {
|
|
||||||
["Combat"] = {
|
|
||||||
["Killaura"] = "killaura",
|
|
||||||
["AntiKnockback"] = "antiknockback",
|
|
||||||
["FastHit"] = "spamclick",
|
|
||||||
["AttachmentFloat"] = "float_above_parent",
|
|
||||||
["CrystalPvP"] = "crystal_pvp",
|
|
||||||
["AutoTotem"] = "autototem",
|
|
||||||
["GoddessMode"] = "goddess",
|
|
||||||
["ThroughWalls"] = "dont_point_nodes",
|
|
||||||
},
|
|
||||||
["Movement"] = {
|
|
||||||
["Freecam"] = "freecam",
|
|
||||||
["AutoForward"] = "continuous_forward",
|
|
||||||
["PitchMove"] = "pitch_move",
|
|
||||||
["AutoJump"] = "autojump",
|
|
||||||
["Jesus"] = "jesus",
|
|
||||||
["NoSlow"] = "no_slow",
|
|
||||||
["AutoSneak"] = "autosneak",
|
|
||||||
["Autosprint"] = 'autosprint',
|
|
||||||
["AutoForwSprint"] = 'autofsprint' },
|
|
||||||
["Render"] = {
|
|
||||||
["Xray"] = "xray",
|
|
||||||
["Fullbright"] = "fullbright",
|
|
||||||
["HUDBypass"] = "hud_flags_bypass",
|
|
||||||
["NoHurtCam"] = "no_hurt_cam",
|
|
||||||
["BrightNight"] = "no_night",
|
|
||||||
["Coords"] = "coords",
|
|
||||||
["Tracers"] = "enable_tracers",
|
|
||||||
["ESP"] = "enable_esp",
|
|
||||||
},
|
|
||||||
["World"] = {
|
|
||||||
["FastDig"] = "fastdig",
|
|
||||||
["FastPlace"] = "fastplace",
|
|
||||||
["AutoDig"] = "autodig",
|
|
||||||
["AutoPlace"] = "autoplace",
|
|
||||||
["InstantBreak"] = "instant_break",
|
|
||||||
["Scaffold"] = "scaffold",
|
|
||||||
["ScaffoldPlus"] = "scaffold_plus",
|
|
||||||
["BlockWater"] = "block_water",
|
|
||||||
["PlaceOnTop"] = "autotnt",
|
|
||||||
["Replace"] = "replace",
|
|
||||||
["Random SC"] = "randomsc"
|
|
||||||
},
|
|
||||||
["Exploit"] = {
|
|
||||||
["EntitySpeed"] = "entity_speed",
|
|
||||||
["ParticleExploit"] = "log_particles",
|
|
||||||
},
|
|
||||||
["Player"] = {
|
|
||||||
["NoFallDamage"] = "prevent_natural_damage",
|
|
||||||
["NoForceRotate"] = "no_force_rotate",
|
|
||||||
["IncreasedRange"] = "increase_tool_range",
|
|
||||||
["UnlimitedRange"] = "increase_tool_range_plus",
|
|
||||||
["PointLiquids"] = "point_liquids",
|
|
||||||
["PrivBypass"] = "priv_bypass",
|
|
||||||
["AutoRespawn"] = "autorespawn",
|
|
||||||
},
|
|
||||||
["Chat"] = {
|
|
||||||
["IgnoreStatus"] = "ignore_status_messages",
|
|
||||||
["Deathmessages"] = "mark_deathmessages",
|
|
||||||
["Teamchat Mode"] = 'tchat_team_mode',
|
|
||||||
["Show Team list"] = 'tchat_view_team_list',
|
|
||||||
["Show Playerlist"] = 'tchat_view_player_list',
|
|
||||||
["Show Teamchat"] = 'tchat_view_chat',
|
|
||||||
},
|
|
||||||
["Inventory"] = {
|
|
||||||
["AutoEject"] = "autoeject",
|
|
||||||
["AutoTool"] = "autotool",
|
|
||||||
["Enderchest"] = function() core.open_enderchest() end,
|
|
||||||
["HandSlot"] = function() core.open_handslot() end,
|
|
||||||
["NextItem"] = "next_item",
|
|
||||||
},
|
|
||||||
["Autofly"] = {
|
|
||||||
["Aim"] = "afly_autoaim",
|
|
||||||
["Softlanding"] = "afly_softlanding",
|
|
||||||
["Waypoints"] = function() autofly.display_formspec() end,
|
|
||||||
},
|
|
||||||
["ESP"] = {
|
|
||||||
["Active"] = "espactive",
|
|
||||||
["Autostop"] = "espautostop",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function core.register_cheat(cheatname, category, func)
|
|
||||||
core.cheats[category] = core.cheats[category] or {}
|
|
||||||
core.cheats[category][cheatname] = func
|
|
||||||
end
|
|
||||||
minetest.register_cheat=core.register_cheat
|
|
||||||
|
|
||||||
local cheatpath = core.get_builtin_path() .. "client" .. DIR_DELIM .. "cheats" .. DIR_DELIM
|
|
@ -635,4 +635,9 @@ if (_G["minetest"]["register_cheat"] == nil) then
|
|||||||
minetest.settings:set_bool('tchat_view_team_list', true)
|
minetest.settings:set_bool('tchat_view_team_list', true)
|
||||||
minetest.settings:set_bool('tchat_view_player_list', true)
|
minetest.settings:set_bool('tchat_view_player_list', true)
|
||||||
minetest.settings:set_bool('tchat_view_chat', true)
|
minetest.settings:set_bool('tchat_view_chat', true)
|
||||||
|
else
|
||||||
|
minetest.register_cheat("Teamchat Mode", "Chat", "tchat_team_mode")
|
||||||
|
minetest.register_cheat("Show Team List", "Chat", "tchat_view_team_list")
|
||||||
|
minetest.register_cheat("Show Player List", "Chat", "tchat_view_player_list")
|
||||||
|
minetest.register_cheat("Show Teamchat", "Chat", "tchat_view_chat")
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user