diff --git a/modules/ExpGamingCommands/kill/kill.lua b/modules/ExpGamingCommands/kill/control.lua similarity index 100% rename from modules/ExpGamingCommands/kill/kill.lua rename to modules/ExpGamingCommands/kill/control.lua diff --git a/modules/ExpGamingCommands/teleport/control.lua b/modules/ExpGamingCommands/teleport/control.lua new file mode 100644 index 00000000..089fb82b --- /dev/null +++ b/modules/ExpGamingCommands/teleport/control.lua @@ -0,0 +1,35 @@ +--- A full ranking system for factorio. +-- @module ExpGamingCommands.kill +-- @author Cooldude2606 +-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE + +local Admin = require('ExpGamingAdmin.Teleport') + +--- Teleports the user to the player given +-- @command go-to +-- @param player player to go to +commands.add_command('go-to', 'Go to a player\'s location', { + ['player']={true,'player-online'} +}, function(event,args) + Admin.go_to(args.player,event) +end) + +--- Teleports a player to the user +-- @command bring +-- @param player player to go to +commands.add_command('bring', 'Bring a player to your location', { + ['player']={true,'player-online'} +}, function(event,args) + Admin.bring(args.player,event) +end) + +--- Teleports one player to another +-- @command tp +-- @param player_one the player that is teleported +-- @param player_two the player who is the destination +commands.add_command('tp', 'Teleport a player to another player\'s location', { + ['player_one']={true,'player-online'}, + ['player_two']={true,'player-online'} +}, function(event,args) + Admin.tp(args.player_one,args.player_two) +end) diff --git a/modules/ExpGamingCommands/teleport/softmod.json b/modules/ExpGamingCommands/teleport/softmod.json new file mode 100644 index 00000000..7242414a --- /dev/null +++ b/modules/ExpGamingCommands/teleport/softmod.json @@ -0,0 +1,24 @@ +{ + "name": "teleport", + "version": "4.0.0", + "type": "Module", + "description": "Adds a few commands used to teleport players.", + "location": "", + "keywords": [ + "Teleport", + "Tp", + "Bring", + "GoTo", + "ExpGaming", + "Command", + "Admin", + "Tools" + ], + "author": "Cooldude2606", + "contact": "Discord: Cooldude2606#5241", + "license": "https://github.com/explosivegaming/scenario/blob/master/LICENSE", + "dependencies": { + "ExpGamingCore.Commands": "^4.0.0", + "ExpGamingAdmin.Teleport": "^4.0.0" + } +} \ No newline at end of file diff --git a/to convert/Addons/Commands/tp.lua b/to convert/Addons/Commands/tp.lua deleted file mode 100644 index 852f379d..00000000 --- a/to convert/Addons/Commands/tp.lua +++ /dev/null @@ -1,31 +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('go-to', 'Go to a player\'s location', {'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 - Admin.go_to(player,event) -end) - -commands.add_command('bring', 'Bring a player to your location', {'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 - Admin.bring(player,event) -end) - -commands.add_command('tp', 'Teleport a player to another player\'s location', {'from', 'to'}, function(event,args) - local from_player = Game.get_player(args.from) - if not from_player then player_return({'commands.invalid-player',args.from_player}) return commands.error end - - local to_player = Game.get_player(args.to) - if not to_player then player_return({'commands.invalid-player',args.to_player}) return commands.error end - - Admin.tp(from_player, to_player) -end)