mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 04:51:40 +09:00
Add startable legacy code
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
@commands Admin-Chat
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local format_chat_player_name = _C.format_chat_player_name --- @dep expcore.common
|
||||
require 'config.expcore.command_general_parse'
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
|
||||
--- Sends a message in chat that only admins can see
|
||||
-- @command admin-chat
|
||||
@@ -17,7 +17,6 @@ Commands.new_command('admin-chat', {'expcom-admin-chat.description'}, 'Sends a m
|
||||
:add_alias('ac')
|
||||
:register(function(player, message)
|
||||
local player_name_colour = format_chat_player_name(player)
|
||||
|
||||
for _, return_player in pairs(game.connected_players) do
|
||||
if return_player.admin then
|
||||
return_player.print{'expcom-admin-chat.format', player_name_colour, message}
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
@commands Admin-Markers
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local Global = require 'utils.global' --- @dep utils.global
|
||||
local Event = require 'utils.event' --- @dep utils.event
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local Storage = require("modules/exp_util/storage")
|
||||
local Event = require("modules/exp_legacy/utils/event") --- @dep utils.event
|
||||
|
||||
local admins = {} -- Stores all players in admin marker mode
|
||||
local markers = {} -- Stores all admin markers
|
||||
|
||||
--- Global variables
|
||||
Global.register({
|
||||
--- Storage variables
|
||||
Storage.register({
|
||||
admins = admins,
|
||||
markers = markers
|
||||
}, function(tbl)
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
@commands Artillery
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
require 'config.expcore.command_general_parse'
|
||||
local Selection = require 'modules.control.selection' --- @dep modules.control.selection
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
local Selection = require("modules.exp_legacy.modules.control.selection") --- @dep modules.control.selection
|
||||
local SelectionArtyArea = 'ArtyArea'
|
||||
|
||||
local function location_break(player, pos)
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
@commands Bot Queue
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
require 'config.expcore.command_general_parse'
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
|
||||
Commands.new_command('bot-queue-get', {'expcom-bot-queue.description-get'}, 'Get bot queue')
|
||||
:set_flag('admin_only')
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
@commands Cheat-Mode
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
require 'config.expcore.command_general_parse'
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
|
||||
--- Toggles cheat mode for your player, or another player.
|
||||
-- @command toggle-cheat-mode
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
@commands Clear-Inventory
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local move_items_stack = _C.move_items_stack --- @dep expcore.common
|
||||
require 'config.expcore.command_role_parse'
|
||||
require("modules.exp_legacy.config.expcore.command_role_parse")
|
||||
|
||||
--- Clears a players inventory
|
||||
-- @command clear-inventory
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
@commands Connect
|
||||
]]
|
||||
|
||||
local Async = require 'expcore.async' --- @dep expcore.async
|
||||
local External = require 'expcore.external' --- @dep expcore.external
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
require 'config.expcore.command_role_parse'
|
||||
local Async = require("modules/exp_util/async")
|
||||
local External = require("modules.exp_legacy.expcore.external") --- @dep expcore.external
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
require("modules.exp_legacy.config.expcore.command_role_parse")
|
||||
local concat = table.concat
|
||||
|
||||
local request_connection = Async.register(External.request_connection)
|
||||
local request_connection_async = Async.register(External.request_connection)
|
||||
|
||||
local function get_server_id(server)
|
||||
local current_server = External.get_current_server()
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
@commands Debug
|
||||
]]
|
||||
|
||||
local DebugView = require 'modules.gui.debug.main_view' --- @dep modules.gui.debug.main_view
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local DebugView = require("modules.exp_legacy.modules.gui.debug.main_view") --- @dep modules.gui.debug.main_view
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
|
||||
--- Opens the debug pannel for viewing tables.
|
||||
-- @command debug
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
@commands Enemy
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
require 'config.expcore.command_general_parse'
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
|
||||
Commands.new_command('kill-biters', {'expcom-enemy.description-kill'}, 'Kill all biters only')
|
||||
:set_flag('admin_only')
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
@commands Find
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
require 'config.expcore.command_general_parse'
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
|
||||
--- Find a player on your map.
|
||||
-- @command find-on-map
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
@commands Toggle Friendly Fire
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
require 'config.expcore.command_general_parse'
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
|
||||
-- For Modded Server Use
|
||||
Commands.new_command('toggle-friendly-fire', {'expcom-ff.description'}, 'Toggle friendly fire')
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
@commands Help
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local Global = require 'utils.global' --- @dep utils.global
|
||||
require 'config.expcore.command_general_parse'
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local Storage = require("modules/exp_util/storage")
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
|
||||
local results_per_page = 5
|
||||
|
||||
local search_cache = {}
|
||||
Global.register(search_cache, function(tbl)
|
||||
Storage.register(search_cache, function(tbl)
|
||||
search_cache = tbl
|
||||
end)
|
||||
|
||||
@@ -25,7 +25,6 @@ Commands.new_command('search-help', {'expcom-chelp.description'}, 'Searches for
|
||||
:set_defaults{keyword='', page=1}
|
||||
:register(function(player, keyword, page)
|
||||
local player_index = player and player.index or 0
|
||||
|
||||
-- if keyword is a number then treat it as page number
|
||||
if tonumber(keyword) then
|
||||
page = math.floor(tonumber(keyword))
|
||||
@@ -45,7 +44,6 @@ Commands.new_command('search-help', {'expcom-chelp.description'}, 'Searches for
|
||||
local current_page = 1
|
||||
local page_count = 0
|
||||
local commands = Commands.search(keyword, player)
|
||||
|
||||
-- loops other all commands returned by search, includes game commands
|
||||
for _, command_data in pairs(commands) do
|
||||
-- if the number of results if greater than the number already added then it moves onto a new page
|
||||
@@ -54,7 +52,6 @@ Commands.new_command('search-help', {'expcom-chelp.description'}, 'Searches for
|
||||
current_page = current_page + 1
|
||||
table.insert(pages, {})
|
||||
end
|
||||
|
||||
-- adds the new command to the page
|
||||
page_count = page_count + 1
|
||||
found = found + 1
|
||||
@@ -67,7 +64,6 @@ Commands.new_command('search-help', {'expcom-chelp.description'}, 'Searches for
|
||||
alias_format
|
||||
})
|
||||
end
|
||||
|
||||
-- adds the result to the cache
|
||||
search_cache[player_index] = {
|
||||
keyword=keyword:lower(),
|
||||
@@ -91,7 +87,6 @@ Commands.new_command('search-help', {'expcom-chelp.description'}, 'Searches for
|
||||
Commands.print({'expcom-chelp.footer', found, page, #pages}, 'cyan')
|
||||
return Commands.error{'expcom-chelp.out-of-range', page}
|
||||
end
|
||||
|
||||
-- blocks command complete message
|
||||
return Commands.success
|
||||
end)
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
@commands Home
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local Global = require 'utils.global' --- @dep utils.global
|
||||
require 'config.expcore.command_general_parse'
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local Storage = require("modules/exp_util/storage")
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
|
||||
local homes = {}
|
||||
Global.register(homes, function(tbl)
|
||||
Storage.register(homes, function(tbl)
|
||||
homes = tbl
|
||||
end)
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
@commands Interface
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local Global = require 'utils.global' --- @dep utils.global
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local Storage = require("modules/exp_util/storage")
|
||||
|
||||
-- modules that are loaded into the interface env to be accessed
|
||||
local interface_modules = {
|
||||
@@ -13,7 +13,6 @@ local interface_modules = {
|
||||
['Group'] = 'expcore.permission_groups',
|
||||
['Roles'] = 'expcore.roles',
|
||||
['Gui'] = 'expcore.gui',
|
||||
['Async'] = 'expcore.async',
|
||||
['Datastore'] = 'expcore.datastore',
|
||||
['External'] = 'expcore.external'
|
||||
}
|
||||
@@ -27,7 +26,7 @@ end
|
||||
|
||||
local interface_env = {} -- used as a persistent sandbox for interface commands
|
||||
local interface_callbacks = {} -- saves callbacks which can load new values per use
|
||||
Global.register(interface_env, function(tbl)
|
||||
Storage.register(interface_env, function(tbl)
|
||||
interface_env = tbl
|
||||
end)
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
@commands Jail
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local Jail = require 'modules.control.jail' --- @dep modules.control.jail
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local Jail = require("modules.exp_legacy.modules.control.jail") --- @dep modules.control.jail
|
||||
local format_chat_player_name = _C.format_chat_player_name --- @dep expcore.common
|
||||
require 'config.expcore.command_role_parse'
|
||||
require("modules.exp_legacy.config.expcore.command_role_parse")
|
||||
|
||||
--- Puts a player into jail and removes all other roles.
|
||||
-- @command jail
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
@commands Kill
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local Roles = require 'expcore.roles' --- @dep expcore.roles
|
||||
require 'config.expcore.command_general_parse'
|
||||
require 'config.expcore.command_role_parse'
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local Roles = require("modules.exp_legacy.expcore.roles") --- @dep expcore.roles
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
require("modules.exp_legacy.config.expcore.command_role_parse")
|
||||
|
||||
--- Kills yourself or another player.
|
||||
-- @command kill
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
@commands LastLocation
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local format_chat_player_name = _C.format_chat_player_name --- @dep expcore.common
|
||||
require 'config.expcore.command_general_parse'
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
|
||||
--- Get the last location of a player.
|
||||
-- @command last-location
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@commands Me
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
|
||||
--- Sends an action message in the chat
|
||||
-- @command me
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
@commands Pollution Handle
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
require 'config.expcore.command_general_parse'
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
|
||||
Commands.new_command('pollution-clear', {'expcom-pol.description-clr'}, 'Clear pollution')
|
||||
:set_flag('admin_only')
|
||||
|
||||
@@ -3,19 +3,19 @@
|
||||
@commands Protection
|
||||
]]
|
||||
|
||||
local Event = require 'utils.event' --- @dep utils.event
|
||||
local Global = require 'utils.global' --- @dep utils.global
|
||||
local Roles = require 'expcore.roles' --- @dep expcore.roles
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local Event = require("modules/exp_legacy/utils/event") --- @dep utils.event
|
||||
local Storage = require("modules/exp_util/storage")
|
||||
local Roles = require("modules.exp_legacy.expcore.roles") --- @dep expcore.roles
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local format_chat_player_name = _C.format_chat_player_name --- @dep expcore.common
|
||||
local EntityProtection = require 'modules.control.protection' --- @dep modules.control.protection
|
||||
local Selection = require 'modules.control.selection' --- @dep modules.control.selection
|
||||
local EntityProtection = require("modules.exp_legacy.modules.control.protection") --- @dep modules.control.protection
|
||||
local Selection = require("modules.exp_legacy.modules.control.selection") --- @dep modules.control.selection
|
||||
|
||||
local SelectionProtectEntity = 'ProtectEntity'
|
||||
local SelectionProtectArea = 'ProtectArea'
|
||||
|
||||
local renders = {} -- Stores all renders for a player
|
||||
Global.register({
|
||||
Storage.register({
|
||||
renders = renders
|
||||
}, function(tbl)
|
||||
renders = tbl.renders
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@commands Rainbow
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local format_chat_colour = _C.format_chat_colour --- @dep expcore.common
|
||||
|
||||
local function step_component(c1, c2)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
local Commands = require 'expcore.commands'
|
||||
local Commands = require("modules.exp_legacy.expcore.commands")
|
||||
|
||||
local function Modules(moduleInventory) -- returns the multiplier of the modules
|
||||
local effect1 = moduleInventory.get_item_count("productivity-module") -- type 1
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
@commands Repair
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local config = require 'config.repair' --- @dep config.repair
|
||||
require 'config.expcore.command_general_parse'
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local config = require("modules.exp_legacy.config.repair") --- @dep config.repair
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
|
||||
local max_time_to_live = 4294967295 -- unit32 max
|
||||
--- Repairs entities on your force around you
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
@commands Reports
|
||||
]]
|
||||
|
||||
local Roles = require 'expcore.roles' --- @dep expcore.roles
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local Reports = require 'modules.control.reports' --- @dep modules.control.reports
|
||||
local Roles = require("modules.exp_legacy.expcore.roles") --- @dep expcore.roles
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local Reports = require("modules.exp_legacy.modules.control.reports") --- @dep modules.control.reports
|
||||
local format_chat_player_name = _C.format_chat_player_name--- @dep expcore.common
|
||||
require 'config.expcore.command_general_parse'
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
|
||||
--- Print a message to all players who match the value of admin
|
||||
local function print_to_players(admin, message)
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
local Global = require 'utils.global' --- @dep utils.global
|
||||
local Event = require 'utils.event' --- @dep utils.event
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local config = require 'config.research' --- @dep config.research
|
||||
local Storage = require("modules/exp_util/storage")
|
||||
local Event = require("modules/exp_legacy/utils/event") --- @dep utils.event
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local config = require("modules.exp_legacy.config.research") --- @dep config.research
|
||||
|
||||
local research = {}
|
||||
Global.register(research, function(tbl)
|
||||
Storage.register(research, function(tbl)
|
||||
research = tbl
|
||||
end)
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
@commands Roles
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local Roles = require 'expcore.roles' --- @dep expcore.roles
|
||||
local Colours = require 'utils.color_presets' --- @dep utils.color_presets
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local Roles = require("modules.exp_legacy.expcore.roles") --- @dep expcore.roles
|
||||
local Colours = require("modules/exp_util/include/color")
|
||||
local format_chat_player_name, format_chat_colour_localized = _C.format_chat_player_name, _C.format_chat_colour_localized
|
||||
|
||||
--- Assigns a role to a player
|
||||
@@ -68,12 +68,10 @@ Commands.new_command('list-roles', {'expcom-roles.description-list-roles'}, 'Lis
|
||||
local role_name = format_chat_colour_localized(role.name, colour)
|
||||
if index == 1 then
|
||||
message = {'expcom-roles.list', role_name}
|
||||
|
||||
if player then
|
||||
local player_name_colour = format_chat_player_name(player)
|
||||
message = {'expcom-roles.list-player', player_name_colour, role_name}
|
||||
end
|
||||
|
||||
else
|
||||
message = {'expcom-roles.list-element', message, role_name}
|
||||
end
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
@commands InventorySearch
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local format_number = require('util').format_number --- @dep util
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local format_number = require("util").format_number --- @dep util
|
||||
local format_chat_player_name = _C.format_chat_player_name --- @dep expcore.common
|
||||
local format_time = _C.format_time
|
||||
require 'config.expcore.command_general_parse'
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
|
||||
--- Input parse for items by name
|
||||
local function item_parse(input, _, reject)
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
@commands Spawn
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local Roles = require 'expcore.roles' --- @dep expcore.roles
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local Roles = require("modules.exp_legacy.expcore.roles") --- @dep expcore.roles
|
||||
|
||||
local function teleport(player)
|
||||
local surface = player.surface
|
||||
@@ -52,12 +52,10 @@ Commands.new_command('go-to-spawn', {'expcom-spawn.description'}, 'Teleport to s
|
||||
:register(function(player, action_player)
|
||||
if not action_player then
|
||||
return Commands.error{'expcom-spawn.unavailable'}
|
||||
|
||||
elseif action_player == player then
|
||||
if not teleport(player) then
|
||||
return Commands.error{'expcom-spawn.unavailable'}
|
||||
end
|
||||
|
||||
elseif Roles.player_allowed(player, 'command/go-to-spawn/always') then
|
||||
if not teleport(action_player) then
|
||||
return Commands.error{'expcom-spawn.unavailable'}
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
@commands Spectate
|
||||
]]
|
||||
|
||||
local Spectate = require 'modules.control.spectate' --- @dep modules.control.spectate
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
require 'config.expcore.command_general_parse'
|
||||
local Spectate = require("modules.exp_legacy.modules.control.spectate") --- @dep modules.control.spectate
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
|
||||
--- Toggles spectator mode for the caller
|
||||
-- @command spectate
|
||||
@@ -13,7 +13,6 @@ Commands.new_command('spectate', {'expcom-spectate.description-spectate'}, 'Togg
|
||||
:register(function(player)
|
||||
if Spectate.is_spectating(player) then
|
||||
Spectate.stop_spectate(player)
|
||||
|
||||
else
|
||||
Spectate.start_spectate(player)
|
||||
end
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
@commands Set game speed
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
require 'config.expcore.command_general_parse'
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
|
||||
Commands.new_command('game-speed', {'expcom-speed.description'}, 'Set game speed')
|
||||
:add_param('amount', 'number-range', 0.2, 8)
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
]]
|
||||
|
||||
local copy_items_stack = _C.copy_items_stack --- @dep expcore.common
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
require 'config.expcore.command_general_parse'
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
|
||||
Commands.new_command('clear-item-on-ground', {'expcom-surface-clearing.description-ci'}, 'Clear Item On Ground')
|
||||
:add_param('range', false, 'integer-range', 1, 1000)
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
@commands Teleport
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
require 'config.expcore.command_general_parse'
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
|
||||
local function teleport(from_player, to_player)
|
||||
local surface = to_player.surface
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
@commands Set Automatic Train
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
require 'config.expcore.command_general_parse'
|
||||
local format_number = require('util').format_number
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
local format_number = require("util").format_number
|
||||
|
||||
Commands.new_command('set-trains-to-automatic', {'expcom-train.description'}, 'Set All Trains to Automatic')
|
||||
:register(function(player)
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
--- Adds a virtual layer to store power to save space.
|
||||
-- @commands Vlayer
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
require 'config.expcore.command_general_parse'
|
||||
local vlayer = require 'modules.control.vlayer'
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
local vlayer = require("modules.exp_legacy.modules.control.vlayer")
|
||||
|
||||
Commands.new_command('vlayer-info', {'vlayer.description-vi'}, 'Vlayer Info')
|
||||
:register(function(_)
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
@commands Warnings
|
||||
]]
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
local Warnings = require 'modules.control.warnings' --- @dep modules.control.warnings
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
local Warnings = require("modules.exp_legacy.modules.control.warnings") --- @dep modules.control.warnings
|
||||
local format_chat_player_name = _C.format_chat_player_name --- @dep expcore.common
|
||||
local config = require 'config.warnings' --- @dep config.warnings
|
||||
require 'config.expcore.command_role_parse'
|
||||
local config = require("modules.exp_legacy.config.warnings") --- @dep config.warnings
|
||||
require("modules.exp_legacy.config.expcore.command_role_parse")
|
||||
|
||||
--- Gives a warning to a player; may lead to automatic script action.
|
||||
-- @command give-warning
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
--- Adds a waterfill
|
||||
-- @commands Waterfill
|
||||
|
||||
local Commands = require 'expcore.commands' --- @dep expcore.commands
|
||||
require 'config.expcore.command_general_parse'
|
||||
local Selection = require 'modules.control.selection' --- @dep modules.control.selection
|
||||
local SelectionConvertArea = 'WaterfillConvertArea'
|
||||
local Commands = require("modules.exp_legacy.expcore.commands") --- @dep expcore.commands
|
||||
require("modules.exp_legacy.config.expcore.command_general_parse")
|
||||
local Selection = require("modules.exp_legacy.modules.control.selection") --- @dep modules.control.selection
|
||||
local SelectionConvertArea = 'ConvertArea'
|
||||
|
||||
--- Align an aabb to the grid by expanding it
|
||||
local function aabb_align_expand(aabb)
|
||||
|
||||
Reference in New Issue
Block a user