mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-10 14:44:05 +01:00
I think this is instance communication
This commit is contained in:
@@ -24,8 +24,6 @@ GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new())
|
||||
var/datum/configuration_section/gateway_configuration/gateway
|
||||
/// Holder for the general configuration datum
|
||||
var/datum/configuration_section/general_configuration/general
|
||||
/// Holder for the instancing configuration datum
|
||||
var/datum/configuration_section/instancing_configuration/instancing
|
||||
/// Holder for the IPIntel configuration datum
|
||||
var/datum/configuration_section/ipintel_configuration/ipintel
|
||||
/// Holder for the job configuration datum
|
||||
@@ -83,7 +81,6 @@ GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new())
|
||||
gamemode = new()
|
||||
gateway = new()
|
||||
general = new()
|
||||
instancing = new()
|
||||
ipintel = new()
|
||||
jobs = new()
|
||||
logging = new()
|
||||
@@ -122,7 +119,6 @@ GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new())
|
||||
safe_load(gamemode, "gamemode_configuration")
|
||||
safe_load(gateway, "gateway_configuration")
|
||||
safe_load(general, "general_configuration")
|
||||
safe_load(instancing, "instancing_configuration")
|
||||
safe_load(ipintel, "ipintel_configuration")
|
||||
safe_load(jobs, "job_configuration")
|
||||
safe_load(logging, "logging_configuration")
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
/// Config holder for stuff relating to multi-server instances
|
||||
/datum/configuration_section/instancing_configuration
|
||||
/// ID of this specific server
|
||||
var/server_id = "paradise_main"
|
||||
/// List of all peer servers
|
||||
var/list/datum/peer_server/peers = list()
|
||||
|
||||
/datum/configuration_section/instancing_configuration/load_data(list/data)
|
||||
// Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line
|
||||
CONFIG_LOAD_STR(server_id, data["server_id"])
|
||||
|
||||
if(islist(data["peer_servers"]))
|
||||
for(var/list/server in data["peer_servers"])
|
||||
if(server["server_port"] == world.port) // Skip our own instance
|
||||
continue
|
||||
var/datum/peer_server/PS = new()
|
||||
PS.internal_ip = server["internal_ip"]
|
||||
PS.server_port = server["server_port"]
|
||||
PS.commskey = server["commskey"]
|
||||
peers.Add(PS)
|
||||
@@ -16,6 +16,10 @@
|
||||
var/_2fa_auth_host = null
|
||||
/// List of IP addresses which bypass world topic rate limiting
|
||||
var/list/topic_ip_ratelimit_bypass = list()
|
||||
/// Server instance ID
|
||||
var/instance_id = "paradise_main"
|
||||
/// Server internal IP
|
||||
var/internal_ip = "127.0.0.1"
|
||||
|
||||
/datum/configuration_section/system_configuration/load_data(list/data)
|
||||
// Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line
|
||||
@@ -28,3 +32,6 @@
|
||||
CONFIG_LOAD_STR(_2fa_auth_host, data["_2fa_auth_host"])
|
||||
|
||||
CONFIG_LOAD_LIST(topic_ip_ratelimit_bypass, data["topic_ip_ratelimit_bypass"])
|
||||
|
||||
CONFIG_LOAD_STR(instance_id, data["instance_id"])
|
||||
CONFIG_LOAD_STR(internal_ip, data["internal_ip"])
|
||||
|
||||
Reference in New Issue
Block a user