From 4becf6a414e465dbe6c15412c0e76f2c9842e088 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Sun, 24 Jun 2018 21:18:41 +0100 Subject: [PATCH] Added ExpGamingCommands.cheatMode --- .../ExpGamingCommands/cheat-mode/control.lua | 14 +++++++++++++ .../ExpGamingCommands/cheat-mode/softmod.json | 21 +++++++++++++++++++ to convert/Addons/Commands/cheat-mode.lua | 15 ------------- 3 files changed, 35 insertions(+), 15 deletions(-) create mode 100644 modules/ExpGamingCommands/cheat-mode/control.lua create mode 100644 modules/ExpGamingCommands/cheat-mode/softmod.json delete mode 100644 to convert/Addons/Commands/cheat-mode.lua diff --git a/modules/ExpGamingCommands/cheat-mode/control.lua b/modules/ExpGamingCommands/cheat-mode/control.lua new file mode 100644 index 00000000..a61cb809 --- /dev/null +++ b/modules/ExpGamingCommands/cheat-mode/control.lua @@ -0,0 +1,14 @@ +--- A full ranking system for factorio. +-- @module ExpGamingCommands.kill +-- @author Cooldude2606 +-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE + +--- Toogles cheat mode for a player +-- @command cheat-mode +-- @param[opt] player the player to toggle if nil then the player using the command +commands.add_command('cheat-mode', 'Toggles cheat mode for a player', { + ['player']={false,'player'} +}, function(event,args) + local player = args.player or game.player + if player.cheat_mode == true then player.cheat_mode = false else player.cheat_mode = true end +end) diff --git a/modules/ExpGamingCommands/cheat-mode/softmod.json b/modules/ExpGamingCommands/cheat-mode/softmod.json new file mode 100644 index 00000000..92b7564b --- /dev/null +++ b/modules/ExpGamingCommands/cheat-mode/softmod.json @@ -0,0 +1,21 @@ +{ + "name": "cheatMode", + "version": "4.0.0", + "type": "Module", + "description": "Adds a command which allow you to toggle cheatmode", + "location": "", + "keywords": [ + "Cheat", + "Commands", + "Admin", + "ExpGaming", + "Cheat Mode", + "Hacks" + ], + "author": "", + "contact": "", + "license": "", + "dependencies": { + "ExpGamingCore.Commands": "^4.0.0" + } +} \ No newline at end of file diff --git a/to convert/Addons/Commands/cheat-mode.lua b/to convert/Addons/Commands/cheat-mode.lua deleted file mode 100644 index 7fc17e17..00000000 --- a/to convert/Addons/Commands/cheat-mode.lua +++ /dev/null @@ -1,15 +0,0 @@ ---[[ -Explosive Gaming - -This file can be used with permission but this and the credit below must remain in the file. -Contact a member of management on our discord to seek permission to use our code. -Any changes that you may make to the code are yours but that does not make the script yours. -Discord: https://discord.gg/r6dC2uK -]] ---Please Only Edit Below This Line----------------------------------------------------------- - -commands.add_command('cheat-mode', 'Toggles cheat mode for a player', {'player'}, function(event,args) - local player = Game.get_player(args.player) - if not player then player_return({'commands.invalid-player',args.player}) return commands.error end - if player.cheat_mode == true then player.cheat_mode = false else player.cheat_mode = true end -end)