mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2026-08-13 00:45:11 +09:00
Final manual fixups
This commit is contained in:
@@ -150,6 +150,8 @@ local Storage = require("modules/exp_util/storage")
|
||||
|
||||
local DatastoreManager = {}
|
||||
local Datastores = {} --- @type table<string, Datastore>
|
||||
local Data = {}
|
||||
|
||||
--- @class Datastore
|
||||
--- @field name string
|
||||
--- @field value_name string
|
||||
@@ -163,7 +165,7 @@ local Datastores = {} --- @type table<string, Datastore>
|
||||
--- @field events table<string, function[]>
|
||||
--- @field data table
|
||||
local Datastore = {}
|
||||
local Data = {}
|
||||
|
||||
local copy = table.deep_copy
|
||||
local trace = debug.traceback
|
||||
local table_to_json = helpers.table_to_json
|
||||
|
||||
@@ -50,8 +50,7 @@ local servers = External.get_servers()
|
||||
]]
|
||||
function External.get_servers()
|
||||
assert(ext, "No external data was found, use External.valid() to ensure external data exists.")
|
||||
local value = assert(ext.servers, "No server list was found, please ensure that the external service is running")
|
||||
return value
|
||||
return (assert(ext.servers, "No server list was found, please ensure that the external service is running"))
|
||||
end
|
||||
|
||||
--[[-- Gets a table of all the servers filtered by name, key is the server id, value is the server details
|
||||
@@ -86,8 +85,7 @@ function External.get_current_server()
|
||||
assert(ext, "No external data was found, use External.valid() to ensure external data exists.")
|
||||
local servers = assert(ext.servers, "No server list was found, please ensure that the external service is running")
|
||||
local server_id = assert(ext.current, "No current id was found, please ensure that the external service is running")
|
||||
local value = assert(servers[server_id], "No details found for server with id: " .. tostring(server_id))
|
||||
return value
|
||||
return (assert(servers[server_id], "No details found for server with id: " .. tostring(server_id)))
|
||||
end
|
||||
|
||||
--[[-- Gets the details of the given server
|
||||
@@ -101,8 +99,7 @@ local server = External.get_server_details('eu-01')
|
||||
function External.get_server_details(server_id)
|
||||
assert(ext, "No external data was found, use External.valid() to ensure external data exists.")
|
||||
local servers = assert(ext.servers, "No server list was found, please ensure that the external service is running")
|
||||
local value = assert(servers[server_id], "No details found for server with id: " .. tostring(server_id))
|
||||
return value
|
||||
return (assert(servers[server_id], "No details found for server with id: " .. tostring(server_id)))
|
||||
end
|
||||
|
||||
--[[-- Gets the status of the given server
|
||||
|
||||
@@ -376,8 +376,7 @@ function Roles.get_player_highest_role(player)
|
||||
end
|
||||
end
|
||||
|
||||
local value = assert(highest, "Player has no roles")
|
||||
return value
|
||||
return (assert(highest, "Player has no roles"))
|
||||
end
|
||||
|
||||
--- Assignment.
|
||||
|
||||
Reference in New Issue
Block a user