mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-29 12:16:37 +09:00
Moved files to done
This commit is contained in:
25
old/modules/DONE/Commands/ExpGamingCommands/softmod.json
Normal file
25
old/modules/DONE/Commands/ExpGamingCommands/softmod.json
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "ExpGamingCommands",
|
||||
"version": "4.0.0",
|
||||
"description": "A Collection of all of the custom commands used on ExpGaming servers.",
|
||||
"location": "FSM_ARCHIVE",
|
||||
"keywords": [
|
||||
"Commands",
|
||||
"ExpGaming",
|
||||
"Admin",
|
||||
"Tools"
|
||||
],
|
||||
"author": "Cooldude2606",
|
||||
"contact": "Discord: Cooldude2606#5241",
|
||||
"license": "https://github.com/explosivegaming/scenario/blob/master/LICENSE",
|
||||
"submodules": {
|
||||
"ExpGamingCommands.bonus": "4.0.0",
|
||||
"ExpGamingCommands.cheatMode": "4.0.0",
|
||||
"ExpGamingCommands.home": "4.0.0",
|
||||
"ExpGamingCommands.kill": "4.0.0",
|
||||
"ExpGamingCommands.repair": "4.0.0",
|
||||
"ExpGamingCommands.tags": "4.0.0",
|
||||
"ExpGamingCommands.teleport": "4.0.0"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
48
old/modules/DONE/Commands/home/control.lua
Normal file
48
old/modules/DONE/Commands/home/control.lua
Normal file
@@ -0,0 +1,48 @@
|
||||
--- A full ranking system for factorio.
|
||||
-- @module ExpGamingCommands.home@4.0.0
|
||||
-- @author Cooldude2606
|
||||
-- @license https://github.com/explosivegaming/scenario/blob/master/LICENSE
|
||||
|
||||
local Game = require('FactorioStdLib.Game')
|
||||
local global = {}
|
||||
Global.register(global,function(tbl) global = tbl end)
|
||||
|
||||
--- Sets the home for a player
|
||||
-- @command set-home
|
||||
commands.add_command('home', 'Allows you to set, remove and goto your homes', {
|
||||
['command'] = {false,'string-list',{'set','remove','goto','list','return'}},
|
||||
['name'] = {false,'string-len',10}
|
||||
}, function(event,args)
|
||||
local player = Game.get_player(event)
|
||||
if not global[player.index] then local spawn_pos = player.force.get_spawn_position(player.surface) global[player.index] = {Spawn={spawn_pos.x,spawn_pos.y},_m=3,_n=1,_r={spawn_pos.x,spawn_pos.y}} end
|
||||
local homes = global[player.index]
|
||||
local command = args.command
|
||||
local name = args.name
|
||||
if command == 'set' then
|
||||
local pos = {math.floor(player.position.x),math.floor(player.position.y)}
|
||||
if homes._n+1 > homes._m then player_return{'ExpGamingCommands-home.too-many-homes',homes._m} return commands.error end
|
||||
if not homes[name] then homes._n=homes._n+1 end
|
||||
homes[name] = pos
|
||||
player_return{'ExpGamingCommands-home.set',name,pos[1],pos[2]}
|
||||
elseif command == 'remove' then
|
||||
if not homes[name] then player_return{'ExpGamingCommands-home.invalid',name} return commands.error end
|
||||
homes[name] = nil
|
||||
homes._n=homes._n-1
|
||||
player_return{'ExpGamingCommands-home.remove',name}
|
||||
elseif command == 'goto' then
|
||||
if not homes[name] then player_return{'ExpGamingCommands-home.invalid',name} return commands.error end
|
||||
local pos = {math.floor(player.position.x),math.floor(player.position.y)}
|
||||
player.teleport(player.surface.find_non_colliding_position('player',homes[name],32,1),player.surface)
|
||||
homes._r = pos
|
||||
player_return{'ExpGamingCommands-home.goto',name}
|
||||
elseif command == 'return' then
|
||||
local pos = {math.floor(player.position.x),math.floor(player.position.y)}
|
||||
player.teleport(player.surface.find_non_colliding_position('player',homes._r,32,1),player.surface)
|
||||
homes._r = pos
|
||||
player_return{'ExpGamingCommands-home.return',pos[1],pos[2]}
|
||||
else
|
||||
player_return{'ExpGamingCommands-home.homes',homes._n,homes._m}
|
||||
local index = 1
|
||||
for home_name,pos in pairs(homes) do if home_name ~= '_n' and home_name ~= '_r' and home_name ~= '_m' then player_return{'ExpGamingCommands-home.home',index,home_name,pos[1],pos[2]} index=index+1 end end
|
||||
end
|
||||
end)
|
||||
9
old/modules/DONE/Commands/home/locale/en.cfg
Normal file
9
old/modules/DONE/Commands/home/locale/en.cfg
Normal file
@@ -0,0 +1,9 @@
|
||||
[ExpGamingCommands-home]
|
||||
too-many-homes=You have too many homes, to add more you must remove one. Your max is __1__.
|
||||
homes=Your Homes: (__1__/__2__)
|
||||
home=__1__) __2__: __3__ , __4__
|
||||
set=Your home "__1__" has been set to __2__ , __3__
|
||||
remove=Your home "__1__" has been removed
|
||||
goto=You are now at "__1__"
|
||||
return=You are now at your previous location: __1__ , __2__
|
||||
invalid=Invalid name, __1__
|
||||
20
old/modules/DONE/Commands/home/softmod.json
Normal file
20
old/modules/DONE/Commands/home/softmod.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "ExpGamingCommands.home",
|
||||
"version": "4.0.0",
|
||||
"description": "Allows players to set homes and then return to them later.",
|
||||
"location": "FSM_ARCHIVE",
|
||||
"keywords": [
|
||||
"Teleport",
|
||||
"ExpGaming",
|
||||
"Home",
|
||||
"Return",
|
||||
"Set Home",
|
||||
"Commands"
|
||||
],
|
||||
"dependencies": {
|
||||
"FactorioStdLib.Game": "^0.8.0",
|
||||
"ExpGamingCore.Command": "^4.0.0"
|
||||
},
|
||||
"collection": "ExpGamingCommands@4.0.0",
|
||||
"submodules": {}
|
||||
}
|
||||
Reference in New Issue
Block a user