mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-27 11:35:22 +09:00
Bug Fix Round One
This commit is contained in:
@@ -16,6 +16,12 @@ return {
|
||||
'modules.commands.help',
|
||||
'modules.commands.roles',
|
||||
'modules.commands.rainbow',
|
||||
'modules.commands.clear-inventory',
|
||||
'modules.commands.jail',
|
||||
'modules.commands.repair',
|
||||
'modules.commands.reports',
|
||||
'modules.commands.spawn',
|
||||
'modules.commands.warnings',
|
||||
-- QoL Addons
|
||||
'modules.addons.chat-popups',
|
||||
'modules.addons.damage-popups',
|
||||
@@ -25,6 +31,7 @@ return {
|
||||
'modules.addons.compilatron',
|
||||
'modules.addons.scorched-earth',
|
||||
'modules.addons.pollution-grading',
|
||||
'modules.addons.random-player-colours',
|
||||
-- Config Files
|
||||
'config.command_auth_admin', -- commands tagged with admin_only are blocked for non admins
|
||||
'config.command_auth_roles', -- commands must be allowed via the role config
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
Commands.remove_parse(name) --- Removes a parse function, see add_parse for adding them
|
||||
Commands.parse(name,input,player,reject,...) --- Intended to be used within other parse functions, runs a parse and returns success and new value
|
||||
|
||||
Commands.add_command(name,help) --- Creates a new command object to added details to, note this does not register the command to the game
|
||||
Commands.new_command(name,help) --- Creates a new command object to added details to, note this does not register the command to the game
|
||||
Commands._prototype:add_param(name,optional,parse,...) --- Adds a new param to the command this will be displayed in the help and used to parse the input
|
||||
Commands._prototype:set_defaults(defaults) --- Adds default values to params only matters if the param is optional
|
||||
Commands._prototype:set_flag(name,value) --- Adds a tag to the command which is passed via the flags param to the authenticators, can be used to assign command roles or type
|
||||
|
||||
@@ -31,17 +31,17 @@ local callback =
|
||||
ent.surface.create_entity(
|
||||
{name = 'compi-speech-bubble', text = messages[name][msg_number], position = {0, 0}, source = ent}
|
||||
)
|
||||
Public.global.current_messages[name] = {message = message, msg_number = msg_number}
|
||||
Public.current_messages[name] = {message = message, msg_number = msg_number}
|
||||
end
|
||||
)
|
||||
|
||||
--- This will move the messages onto the next message in the loop
|
||||
local function circle_messages()
|
||||
for name, ent in pairs(Public.global.compilatrons) do
|
||||
for name, ent in pairs(Public.compilatrons) do
|
||||
if not ent.valid then
|
||||
Public.spawn_compilatron(game.players[1].surface,name)
|
||||
end
|
||||
local current_message = Public.global.current_messages[name]
|
||||
local current_message = Public.current_messages[name]
|
||||
local msg_number
|
||||
local message
|
||||
if current_message ~= nil then
|
||||
@@ -71,12 +71,12 @@ function Public.add_compilatron(entity, name)
|
||||
if name == nil then
|
||||
return
|
||||
end
|
||||
Public.global.compilatrons[name] = entity
|
||||
Public.compilatrons[name] = entity
|
||||
local message =
|
||||
entity.surface.create_entity(
|
||||
{name = 'compi-speech-bubble', text = messages[name][1], position = {0, 0}, source = entity}
|
||||
)
|
||||
Public.global.current_messages[name] = {message = message, msg_number = 1}
|
||||
Public.current_messages[name] = {message = message, msg_number = 1}
|
||||
end
|
||||
|
||||
--- This spawns a new compilatron on a surface with the given location tag (not a position)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local Colours = require 'resources.colour_presets'
|
||||
local Colours = require 'resources.color_presets'
|
||||
local Game = require 'utils.game'
|
||||
local Event = require 'utils.events'
|
||||
local config = require 'config.preset_player_colours'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
local Commands = 'expcore.commands'
|
||||
local Commands = require 'expcore.commands'
|
||||
local move_items = ext_require('expcore.common','move_items')
|
||||
require 'config.command_parse_roles'
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ end
|
||||
|
||||
Commands.new_command('go-to-spawn','Teleport to spawn')
|
||||
:add_param('player',true,'player-role-alive')
|
||||
:add_defaults{
|
||||
:set_defaults{
|
||||
player=function(player)
|
||||
if player.connected and player.character and player.character.health > 0 then
|
||||
return player
|
||||
|
||||
Reference in New Issue
Block a user