mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 21:48:21 +01:00
READY
This commit is contained in:
@@ -309,7 +309,7 @@
|
||||
#define ROUND_TIME (SSticker.round_start_time ? (world.time - SSticker.round_start_time) : 0)
|
||||
|
||||
// Macro that returns true if it's too early in a round to freely ghost out
|
||||
#define TOO_EARLY_TO_GHOST (config && (ROUND_TIME < (config.round_abandon_penalty_period)))
|
||||
#define TOO_EARLY_TO_GHOST (ROUND_TIME < (GLOB.configuration.general.cryo_penalty_period))
|
||||
|
||||
// Used by radios to indicate that they have sent a message via something other than subspace
|
||||
#define RADIO_CONNECTION_FAIL 0
|
||||
|
||||
@@ -32,7 +32,8 @@ GLOBAL_PROTECT(log_end)
|
||||
rustg_log_write(GLOB.world_game_log, "ADMIN: [text][GLOB.log_end]")
|
||||
|
||||
/proc/log_debug(text)
|
||||
if(GLOB.configuration.logging.debug_logging)
|
||||
// This has presence checks as this may be called before GLOB has loaded
|
||||
if(GLOB?.configuration?.logging.debug_logging)
|
||||
rustg_log_write(GLOB.world_game_log, "DEBUG: [text][GLOB.log_end]")
|
||||
|
||||
for(var/client/C in GLOB.admins)
|
||||
@@ -122,7 +123,7 @@ GLOBAL_PROTECT(log_end)
|
||||
/proc/log_world(text)
|
||||
SEND_TEXT(world.log, text)
|
||||
// This has to be presence checked as log_world() is used before world/New().
|
||||
if(GLOB?.configuration?.logging?.world_logging)
|
||||
if(GLOB?.configuration?.logging.world_logging)
|
||||
rustg_log_write(GLOB.world_game_log, "WORLD: [html_decode(text)][GLOB.log_end]")
|
||||
|
||||
/proc/log_runtime_txt(text) // different from /tg/'s log_runtime because our error handler has a log_runtime proc already that does other stuff
|
||||
|
||||
@@ -1,37 +1,30 @@
|
||||
GLOBAL_REAL(config, /datum/configuration)
|
||||
|
||||
GLOBAL_VAR(host)
|
||||
/// Join MOTD for the server
|
||||
GLOBAL_VAR(join_motd)
|
||||
GLOBAL_PROTECT(join_motd) // Takes up a lot of space in VV
|
||||
/// Join TOS for the server
|
||||
GLOBAL_VAR(join_tos)
|
||||
GLOBAL_VAR_INIT(game_version, "ParaCode")
|
||||
GLOBAL_PROTECT(join_tos) // Takes up a lot of space. Also dont touch this shit
|
||||
|
||||
/// The current game year
|
||||
GLOBAL_VAR_INIT(game_year, (text2num(time2text(world.realtime, "YYYY")) + 544))
|
||||
|
||||
GLOBAL_VAR_INIT(aliens_allowed, 1)
|
||||
GLOBAL_VAR_INIT(traitor_scaling, 1)
|
||||
//GLOBAL_VAR_INIT(goonsay_allowed, 0)
|
||||
GLOBAL_VAR_INIT(dna_ident, 1)
|
||||
GLOBAL_VAR_INIT(abandon_allowed, 0)
|
||||
GLOBAL_VAR_INIT(enter_allowed, 1)
|
||||
GLOBAL_VAR_INIT(guests_allowed, 1)
|
||||
GLOBAL_VAR_INIT(shuttle_frozen, 0)
|
||||
GLOBAL_VAR_INIT(shuttle_left, 0)
|
||||
GLOBAL_VAR_INIT(tinted_weldhelh, 1)
|
||||
GLOBAL_VAR_INIT(mouse_respawn_time, 5) //Amount of time that must pass between a player dying as a mouse and repawning as a mouse. In minutes.
|
||||
/// Allow new players to enter the game?
|
||||
GLOBAL_VAR_INIT(enter_allowed, TRUE)
|
||||
|
||||
// Debug is used exactly once (in living.dm) but is commented out in a lot of places. It is not set anywhere and only checked.
|
||||
// Debug2 is used in conjunction with a lot of admin verbs and therefore is actually legit.
|
||||
GLOBAL_VAR_INIT(debug, 0) // global debug switch
|
||||
GLOBAL_VAR_INIT(debug2, 1) // enables detailed job debug file in secrets
|
||||
/// Is OOC currently enabled?
|
||||
GLOBAL_VAR_INIT(ooc_enabled, TRUE)
|
||||
|
||||
//This was a define, but I changed it to a variable so it can be changed in-game.(kept the all-caps definition because... code...) -Errorage
|
||||
GLOBAL_VAR_INIT(max_ex_devastation_range, 3)
|
||||
GLOBAL_VAR_INIT(max_ex_heavy_range, 7)
|
||||
GLOBAL_VAR_INIT(max_ex_light_range, 14)
|
||||
GLOBAL_VAR_INIT(max_ex_flash_range, 14)
|
||||
GLOBAL_VAR_INIT(max_ex_flame_range, 14)
|
||||
/// Is LOOC currently enabled?
|
||||
GLOBAL_VAR_INIT(looc_enabled, TRUE)
|
||||
|
||||
//Random event stuff, apparently used
|
||||
GLOBAL_VAR_INIT(eventchance, 10) //% per 5 mins
|
||||
GLOBAL_VAR_INIT(event, 0)
|
||||
GLOBAL_VAR_INIT(hadevent, 0)
|
||||
GLOBAL_VAR_INIT(blobevent, 0)
|
||||
/// Is OOC currently enabled for dead people?
|
||||
GLOBAL_VAR_INIT(dooc_enabled, TRUE)
|
||||
|
||||
/// Is deadchat currently enabled?
|
||||
GLOBAL_VAR_INIT(dsay_enabled, TRUE)
|
||||
|
||||
/// Amount of time (in minutes) that must pass between a player dying as a mouse and repawning as a mouse
|
||||
GLOBAL_VAR_INIT(mouse_respawn_time, 5)
|
||||
|
||||
/// Enable debugging of things such as job starts and other things
|
||||
GLOBAL_VAR_INIT(debug2, TRUE)
|
||||
|
||||
@@ -1,287 +0,0 @@
|
||||
/datum/configuration
|
||||
var/server_name = null // server name (for world name / status)
|
||||
var/server_tag_line = null // server tagline (for showing on hub entry)
|
||||
var/server_extra_features = null // server-specific extra features (for hub entry)
|
||||
var/server_suffix = 0 // generate numeric suffix based on server port
|
||||
|
||||
var/minimum_client_build = 1421 // Build 1421 due to the middle mouse button exploit
|
||||
|
||||
var/pregame_timestart = 240 // Time it takes for the server to start the game
|
||||
|
||||
// var/enable_authentication = 0 // goon authentication
|
||||
var/allow_Metadata = 0 // Metadata is supported.
|
||||
var/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1.
|
||||
var/antag_hud_allowed = 0 // Ghosts can turn on Antagovision to see a HUD of who is the bad guys this round.
|
||||
var/antag_hud_restricted = 0 // Ghosts that turn on Antagovision cannot rejoin the round.
|
||||
|
||||
var/respawn = 0
|
||||
var/guest_jobban = 1
|
||||
var/panic_bunker_threshold = 150 // above this player count threshold, never-before-seen players are blocked from connecting
|
||||
var/usewhitelist = 0
|
||||
var/automute_on = 0 //enables automuting/spam prevention
|
||||
var/round_abandon_penalty_period = 30 MINUTES // Time from round start during which ghosting out is penalized
|
||||
|
||||
var/reactionary_explosions = 0 //If we use reactionary explosions, explosions that react to walls and doors
|
||||
|
||||
var/ssd_warning = 0
|
||||
|
||||
var/list_afk_minimum = 5 // How long people have to be AFK before it's listed on the "List AFK players" verb
|
||||
|
||||
var/max_maint_drones = 5 //This many drones can spawn,
|
||||
var/allow_drone_spawn = 1 //assuming the admin allow them to.
|
||||
var/drone_build_time = 1200 //A drone will become available every X ticks since last drone spawn. Default is 2 minutes.
|
||||
|
||||
var/forbid_singulo_possession = 0
|
||||
|
||||
var/check_randomizer = 0
|
||||
|
||||
//game_options.txt configs
|
||||
|
||||
var/bones_can_break = 1
|
||||
|
||||
var/revival_pod_plants = 1
|
||||
var/revival_cloning = 1
|
||||
var/revival_brain_life = -1
|
||||
|
||||
var/auto_toggle_ooc_during_round = 0
|
||||
|
||||
var/shuttle_refuel_delay = 12000
|
||||
|
||||
var/ban_legacy_system = 0 //Defines whether the server uses the legacy banning system with the files in /data or the SQL system. Config option in config.txt
|
||||
|
||||
var/simultaneous_pm_warning_timeout = 100
|
||||
|
||||
var/ghost_interaction = 0
|
||||
|
||||
|
||||
var/default_laws = 0 //Controls what laws the AI spawns with.
|
||||
|
||||
var/starlight = 0 // Whether space turfs have ambient light or not
|
||||
var/allow_holidays = 0
|
||||
|
||||
var/ooc_allowed = 1
|
||||
var/looc_allowed = 1
|
||||
var/dooc_allowed = 1
|
||||
var/dsay_allowed = 1
|
||||
|
||||
var/disable_lobby_music = 0 // Disables the lobby music
|
||||
var/disable_cid_warn_popup = 0 //disables the annoying "You have already logged in this round, disconnect or be banned" popup, because it annoys the shit out of me when testing.
|
||||
|
||||
var/max_loadout_points = 5 // How many points can be spent on extra items in character setup
|
||||
|
||||
var/disable_ooc_emoji = 0 // prevents people from using emoji in OOC
|
||||
|
||||
var/disable_karma = 0 // Disable all karma functions and unlock karma jobs by default
|
||||
|
||||
// Nightshift
|
||||
var/randomize_shift_time = FALSE
|
||||
var/enable_night_shifts = FALSE
|
||||
|
||||
// Developer
|
||||
var/developer_express_start = 0
|
||||
|
||||
//Start now warning
|
||||
var/start_now_confirmation = 0
|
||||
|
||||
//cube monkey limit
|
||||
var/cubemonkeycap = 20
|
||||
|
||||
/// BYOND account age limit for notifcations of new accounts (Any accounts older than this value will not send notifications on first join)
|
||||
var/byond_account_age_threshold = 7
|
||||
|
||||
|
||||
/// Max amount of CIDs that one ckey can have attached to them before they trip a warning
|
||||
var/max_client_cid_history = 3
|
||||
|
||||
/// Enable auto profiler of rounds
|
||||
var/auto_profile = FALSE
|
||||
|
||||
/datum/configuration/proc/load(filename, type = "config") //the type can also be game_options, in which case it uses a different switch. not making it separate to not copypaste code - Urist
|
||||
if(IsAdminAdvancedProcCall())
|
||||
to_chat(usr, "<span class='boldannounce'>Config reload blocked: Advanced ProcCall detected.</span>")
|
||||
message_admins("[key_name(usr)] attempted to reload configuration via advanced proc-call")
|
||||
log_admin("[key_name(usr)] attempted to reload configuration via advanced proc-call")
|
||||
return
|
||||
var/list/Lines = file2list(filename)
|
||||
|
||||
for(var/t in Lines)
|
||||
if(!t) continue
|
||||
|
||||
t = trim(t)
|
||||
if(length(t) == 0)
|
||||
continue
|
||||
else if(copytext(t, 1, 2) == "#")
|
||||
continue
|
||||
|
||||
var/pos = findtext(t, " ")
|
||||
var/name = null
|
||||
var/value = null
|
||||
|
||||
if(pos)
|
||||
name = lowertext(copytext(t, 1, pos))
|
||||
value = copytext(t, pos + 1)
|
||||
else
|
||||
name = lowertext(t)
|
||||
|
||||
if(!name)
|
||||
continue
|
||||
|
||||
if(type == "config")
|
||||
switch(name)
|
||||
if("ban_legacy_system")
|
||||
config.ban_legacy_system = 1
|
||||
|
||||
if("ssd_warning")
|
||||
config.ssd_warning = 1
|
||||
|
||||
if("list_afk_minimum")
|
||||
config.list_afk_minimum = text2num(value)
|
||||
|
||||
if("pregame_timestart")
|
||||
config.pregame_timestart = text2num(value)
|
||||
|
||||
if("norespawn")
|
||||
config.respawn = 0
|
||||
|
||||
if("servername")
|
||||
config.server_name = value
|
||||
|
||||
if("server_tag_line")
|
||||
config.server_tag_line = value
|
||||
|
||||
if("server_extra_features")
|
||||
config.server_extra_features = value
|
||||
|
||||
if("serversuffix")
|
||||
config.server_suffix = 1
|
||||
|
||||
if("minimum_client_build")
|
||||
config.minimum_client_build = text2num(value)
|
||||
|
||||
if("guest_ban")
|
||||
#warn AA clear this up
|
||||
GLOB.guests_allowed = 0
|
||||
|
||||
if("panic_bunker_threshold")
|
||||
config.panic_bunker_threshold = text2num(value)
|
||||
|
||||
if("usewhitelist")
|
||||
config.usewhitelist = 1
|
||||
|
||||
if("allow_metadata")
|
||||
config.allow_Metadata = 1
|
||||
|
||||
if("forbid_singulo_possession")
|
||||
forbid_singulo_possession = 1
|
||||
|
||||
if("check_randomizer")
|
||||
check_randomizer = 1
|
||||
|
||||
if("popup_admin_pm")
|
||||
config.popup_admin_pm = 1
|
||||
|
||||
if("allow_holidays")
|
||||
config.allow_holidays = 1
|
||||
|
||||
if("allow_antag_hud")
|
||||
config.antag_hud_allowed = 1
|
||||
|
||||
if("antag_hud_restricted")
|
||||
config.antag_hud_restricted = 1
|
||||
|
||||
if("automute_on")
|
||||
automute_on = 1
|
||||
|
||||
if("ghost_interaction")
|
||||
config.ghost_interaction = 1
|
||||
|
||||
if("allow_drone_spawn")
|
||||
config.allow_drone_spawn = text2num(value)
|
||||
|
||||
if("drone_build_time")
|
||||
config.drone_build_time = text2num(value)
|
||||
|
||||
if("max_maint_drones")
|
||||
config.max_maint_drones = text2num(value)
|
||||
|
||||
if("starlight")
|
||||
config.starlight = 1
|
||||
|
||||
if("disable_lobby_music")
|
||||
config.disable_lobby_music = 1
|
||||
|
||||
if("disable_cid_warn_popup")
|
||||
config.disable_cid_warn_popup = 1
|
||||
|
||||
if("max_loadout_points")
|
||||
config.max_loadout_points = text2num(value)
|
||||
|
||||
if("round_abandon_penalty_period")
|
||||
config.round_abandon_penalty_period = text2num(value) MINUTES
|
||||
|
||||
if("disable_ooc_emoji")
|
||||
config.disable_ooc_emoji = 1
|
||||
|
||||
if("disable_karma")
|
||||
config.disable_karma = 1
|
||||
|
||||
if("start_now_confirmation")
|
||||
config.start_now_confirmation = 1
|
||||
|
||||
if("developer_express_start")
|
||||
config.developer_express_start = 1
|
||||
if("byond_account_age_threshold")
|
||||
config.byond_account_age_threshold = text2num(value)
|
||||
|
||||
if("max_client_cid_history")
|
||||
max_client_cid_history = text2num(value)
|
||||
if("enable_auto_profiler")
|
||||
auto_profile = TRUE
|
||||
else
|
||||
log_config("Unknown setting in configuration: '[name]'")
|
||||
|
||||
|
||||
else if(type == "game_options")
|
||||
value = text2num(value)
|
||||
|
||||
switch(name)
|
||||
if("revival_pod_plants")
|
||||
config.revival_pod_plants = value
|
||||
if("revival_cloning")
|
||||
config.revival_cloning = value
|
||||
if("revival_brain_life")
|
||||
config.revival_brain_life = value
|
||||
if("auto_toggle_ooc_during_round")
|
||||
config.auto_toggle_ooc_during_round = 1
|
||||
if("bones_can_break")
|
||||
config.bones_can_break = value
|
||||
if("shuttle_refuel_delay")
|
||||
config.shuttle_refuel_delay = text2num(value)
|
||||
if("reactionary_explosions")
|
||||
config.reactionary_explosions = 1
|
||||
if("bombcap")
|
||||
var/BombCap = text2num(value)
|
||||
if(!BombCap)
|
||||
continue
|
||||
if(BombCap < 4)
|
||||
BombCap = 4
|
||||
if(BombCap > 128)
|
||||
BombCap = 128
|
||||
|
||||
#warn AA clear this up
|
||||
GLOB.max_ex_devastation_range = round(BombCap/4)
|
||||
GLOB.max_ex_heavy_range = round(BombCap/2)
|
||||
GLOB.max_ex_light_range = BombCap
|
||||
GLOB.max_ex_flash_range = BombCap
|
||||
GLOB.max_ex_flame_range = BombCap
|
||||
if("default_laws")
|
||||
config.default_laws = text2num(value)
|
||||
if("randomize_shift_time")
|
||||
config.randomize_shift_time = TRUE
|
||||
if("enable_night_shifts")
|
||||
config.enable_night_shifts = TRUE
|
||||
if("cubemonkey_cap")
|
||||
config.cubemonkeycap = text2num(value)
|
||||
else
|
||||
log_config("Unknown setting in configuration: '[name]'")
|
||||
|
||||
@@ -21,6 +21,8 @@ GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new())
|
||||
var/datum/configuration_section/gamemode_configuration/gamemode
|
||||
/// Holder for the gateway configuration datum
|
||||
var/datum/configuration_section/gateway_configuration/gateway
|
||||
/// Holder for the general configuration datum
|
||||
var/datum/configuration_section/general_configuration/general
|
||||
/// Holder for the IPIntel configuration datum
|
||||
var/datum/configuration_section/ipintel_configuration/ipintel
|
||||
/// Holder for the job configuration datum
|
||||
@@ -63,6 +65,7 @@ GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new())
|
||||
event = new()
|
||||
gamemode = new()
|
||||
gateway = new()
|
||||
general = new()
|
||||
ipintel = new()
|
||||
jobs = new()
|
||||
logging = new()
|
||||
@@ -90,6 +93,7 @@ GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new())
|
||||
event.load_data(raw_config_data["event_configuration"])
|
||||
gamemode.load_data(raw_config_data["gamemode_configuration"])
|
||||
gateway.load_data(raw_config_data["gateway_configuration"])
|
||||
general.load_data(raw_config_data["general_configuration"])
|
||||
ipintel.load_data(raw_config_data["ipintel_configuration"])
|
||||
jobs.load_data(raw_config_data["job_configuration"])
|
||||
logging.load_data(raw_config_data["logging_configuration"])
|
||||
@@ -103,7 +107,6 @@ GLOBAL_DATUM_INIT(configuration, /datum/server_configuration, new())
|
||||
|
||||
// And report the load
|
||||
DIRECT_OUTPUT(world.log, "Config loaded in [stop_watch(start)]s")
|
||||
pass() // Breakpoint here. If I left thing in, scream at me.
|
||||
|
||||
|
||||
/datum/configuration_section
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
/// SQL password
|
||||
var/password = "root" // Dont do this in prod. Please......
|
||||
/// Database name
|
||||
var/db = "feedback" // TODO: Rename to paradise_gamedb
|
||||
var/db = "feedback" // AA TODO: Rename to paradise_gamedb
|
||||
/// Table prefix
|
||||
var/table_prefix = "erro_" // TODO: Remove table prefixes
|
||||
var/table_prefix = "erro_" // AA TODO: Remove table prefixes
|
||||
/// Time in seconds for async queries to time out
|
||||
var/async_query_timeout = 10
|
||||
/// Thread limit for async queries
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
/// Config holder for all general/misc things
|
||||
/datum/configuration_section/general_configuration
|
||||
/// Server name for the BYOND hub
|
||||
var/server_name = "Paradise Station"
|
||||
/// Tagline for the hub entry
|
||||
var/server_tag_line = "The perfect mix of RP & action"
|
||||
/// Server features in a newline
|
||||
var/server_features = "Medium RP, varied species/jobs"
|
||||
/// Should bans be stored in the DB
|
||||
var/use_database_bans = FALSE
|
||||
/// Allow character OOC notes
|
||||
var/allow_character_metadata = TRUE
|
||||
/// Time in seconds for the pregame lobby
|
||||
var/lobby_time = 240
|
||||
/// Ban all Guest BYOND accounts
|
||||
var/guest_ban = TRUE
|
||||
/// Player threshold to automatically enable panic bunker
|
||||
var/panic_bunker_threshold = 150
|
||||
/// Allow players to use AntagHUD?
|
||||
var/allow_antag_hud = TRUE
|
||||
/// Forbid players from rejoining if they use AntagHUD?
|
||||
var/restrict_antag_hud_rejoin = TRUE
|
||||
/// Enable respanws by default?
|
||||
var/respawn_enabled = FALSE
|
||||
/// Enable karma? Disable to lockout awarding and unlock everything
|
||||
var/enable_karma = TRUE
|
||||
/// Enable CID randomiser buster?
|
||||
var/enabled_cid_randomiser_buster = FALSE
|
||||
/// Forbid admins from posessing and flying the singulo round
|
||||
var/forbid_singulo_possession = FALSE
|
||||
/// Force open a PM window when replied to? This is very annoying
|
||||
var/popup_admin_pm = FALSE
|
||||
/// Announce holidays (christmas, halloween, etc etc)
|
||||
var/allow_holidays = TRUE
|
||||
/// Enable auto muting in all chat channels
|
||||
var/enable_auto_mute = FALSE
|
||||
/// Show a warning to players to make them accept touching an SSD
|
||||
var/ssd_warning = TRUE
|
||||
/// Allow ghosts to spin chairs round
|
||||
var/ghost_interaction = FALSE
|
||||
/// Enable/disable starlight to light up space
|
||||
var/starlight = TRUE
|
||||
/// Disable lobby music?
|
||||
var/disable_lobby_music = FALSE
|
||||
/// Disable a popup if 2 users are on the same CID?
|
||||
var/disable_cid_warning_popup = FALSE
|
||||
/// Amount of loadout points non-donors should get
|
||||
var/base_loadout_points = 5
|
||||
/// Respawnability loss penalty for eary cryoing (minutes)
|
||||
var/cryo_penalty_period = 30
|
||||
/// Enable OOC emojis?
|
||||
var/enable_ooc_emoji = TRUE
|
||||
/// Auto start the game if on a local test server
|
||||
var/developer_express_start = FALSE
|
||||
/// Minimum client build. Keep above 1421 due to exploits
|
||||
var/minimum_client_build = 1421
|
||||
/// Give a confirm button for the "Start Now" verb
|
||||
var/start_now_confirmation = TRUE
|
||||
/// BYOND account age threshold for first join alerts
|
||||
var/byond_account_age_threshold = 3
|
||||
/// Max CIDs a client can have history of before a warning is thrown
|
||||
var/max_client_cid_history = 20
|
||||
/// Enable automatic profiling to profile.json
|
||||
var/enable_auto_profiler = TRUE
|
||||
/// Auto disable OOC on roundstart?
|
||||
var/auto_disable_ooc = TRUE
|
||||
/// Do we want to allow bones to break?
|
||||
var/breakable_bones = TRUE
|
||||
/// Enable/disable revival pod plants
|
||||
var/enable_revival_pod_plants = TRUE
|
||||
/// Enable/disable cloning
|
||||
var/enable_cloning = TRUE
|
||||
/// Randomise shift time instead of it always being 12:00?
|
||||
var/randomise_shift_time = TRUE
|
||||
/// Enable night-shift lighting?
|
||||
var/enable_night_shifts = TRUE
|
||||
/// Cap for monkey cube monkey spawns
|
||||
var/monkey_cube_cap = 32
|
||||
/// Enable to make explosions react to obstacles instead of ignoring them
|
||||
var/reactionary_explosions = TRUE
|
||||
/// Bomb cap (Devastation) Other values will be calculated around this
|
||||
var/bomb_cap = 20
|
||||
/// Time for a brain to keep its spark of life (deciseconds)
|
||||
var/revival_brain_life = 10 MINUTES
|
||||
/// Enable random AI lawsets from the default=TRUE pool
|
||||
var/random_ai_lawset = TRUE
|
||||
|
||||
/datum/configuration_section/general_configuration/load_data(list/data)
|
||||
// Use the load wrappers here. That way the default isnt made 'null' if you comment out the config line
|
||||
|
||||
// A lot of bools
|
||||
CONFIG_LOAD_BOOL(use_database_bans, data["use_database_bans"])
|
||||
CONFIG_LOAD_BOOL(allow_character_metadata, data["allow_character_metadata"])
|
||||
CONFIG_LOAD_BOOL(guest_ban, data["guest_ban"])
|
||||
CONFIG_LOAD_BOOL(allow_antag_hud, data["allow_antag_hud"])
|
||||
CONFIG_LOAD_BOOL(restrict_antag_hud_rejoin, data["restrict_antag_hud_rejoin"])
|
||||
CONFIG_LOAD_BOOL(respawn_enabled, data["respawn_enabled"])
|
||||
CONFIG_LOAD_BOOL(enable_karma, data["enable_karma"])
|
||||
CONFIG_LOAD_BOOL(enabled_cid_randomiser_buster, data["enable_cid_randomiser_buster"])
|
||||
CONFIG_LOAD_BOOL(forbid_singulo_possession, data["prevent_admin_singlo_possession"])
|
||||
CONFIG_LOAD_BOOL(popup_admin_pm, data["popup_admin_pm"])
|
||||
CONFIG_LOAD_BOOL(allow_holidays, data["allow_holidays"])
|
||||
CONFIG_LOAD_BOOL(enable_auto_mute, data["enable_auto_mute"])
|
||||
CONFIG_LOAD_BOOL(ssd_warning, data["ssd_warning"])
|
||||
CONFIG_LOAD_BOOL(ghost_interaction, data["ghost_interaction"])
|
||||
CONFIG_LOAD_BOOL(starlight, data["starlight"])
|
||||
CONFIG_LOAD_BOOL(disable_lobby_music, data["disable_lobby_music"])
|
||||
CONFIG_LOAD_BOOL(disable_cid_warning_popup, data["disable_cid_warning_popup"])
|
||||
CONFIG_LOAD_BOOL(enable_ooc_emoji, data["enable_ooc_emoji"])
|
||||
CONFIG_LOAD_BOOL(developer_express_start, data["developer_express_start"])
|
||||
CONFIG_LOAD_BOOL(start_now_confirmation, data["start_now_confirmation"])
|
||||
CONFIG_LOAD_BOOL(enable_auto_profiler, data["enable_auto_profiler"])
|
||||
CONFIG_LOAD_BOOL(auto_disable_ooc, data["auto_disable_ooc"])
|
||||
CONFIG_LOAD_BOOL(breakable_bones, data["breakable_bones"])
|
||||
CONFIG_LOAD_BOOL(enable_revival_pod_plants, data["enable_revival_pod_plants"])
|
||||
CONFIG_LOAD_BOOL(enable_cloning, data["enable_cloning"])
|
||||
CONFIG_LOAD_BOOL(randomise_shift_time, data["randomise_shift_time"])
|
||||
CONFIG_LOAD_BOOL(enable_night_shifts, data["enable_night_shifts"])
|
||||
CONFIG_LOAD_BOOL(reactionary_explosions, data["reactionary_explosions"])
|
||||
CONFIG_LOAD_BOOL(random_ai_lawset, data["random_ai_lawset"])
|
||||
|
||||
// Numbers
|
||||
CONFIG_LOAD_NUM(lobby_time, data["lobby_time"])
|
||||
CONFIG_LOAD_NUM(panic_bunker_threshold, data["panic_bunker_threshold"])
|
||||
CONFIG_LOAD_NUM(base_loadout_points, data["base_loadout_points"])
|
||||
CONFIG_LOAD_NUM(cryo_penalty_period, data["cryo_penalty_period"])
|
||||
CONFIG_LOAD_NUM(minimum_client_build, data["minimum_client_build"])
|
||||
CONFIG_LOAD_NUM(byond_account_age_threshold, data["byond_account_age_threshold"])
|
||||
CONFIG_LOAD_NUM(max_client_cid_history, data["max_client_cid_history"])
|
||||
CONFIG_LOAD_NUM(monkey_cube_cap, data["monkey_cube_cap"])
|
||||
CONFIG_LOAD_NUM(bomb_cap, data["bomb_cap"])
|
||||
CONFIG_LOAD_NUM(revival_brain_life, data["revival_brain_life"])
|
||||
|
||||
// Strings
|
||||
CONFIG_LOAD_STR(server_name, data["server_name"])
|
||||
CONFIG_LOAD_STR(server_tag_line, data["server_tag_line"])
|
||||
CONFIG_LOAD_STR(server_features, data["server_features"])
|
||||
@@ -206,8 +206,8 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
|
||||
log_startup_progress("Initializations complete within [time] second[time == 1 ? "" : "s"]!")
|
||||
|
||||
if(config.developer_express_start & SSticker.current_state == GAME_STATE_PREGAME)
|
||||
SSticker.current_state = GAME_STATE_SETTING_UP
|
||||
if(GLOB.configuration.general.developer_express_start)
|
||||
SSticker.force_start = TRUE
|
||||
|
||||
if(!current_runlevel)
|
||||
SetRunLevel(1)
|
||||
|
||||
@@ -266,11 +266,11 @@ SUBSYSTEM_DEF(changelog)
|
||||
usr.client.github()
|
||||
// Takes a PR number as argument
|
||||
if(href_list["openPR"])
|
||||
if(GLOB?.configuration?.url.github_url)
|
||||
if(GLOB.configuration.url.github_url)
|
||||
if(alert("This will open PR #[href_list["openPR"]] in your browser. Are you sure?",,"Yes","No")=="No")
|
||||
return
|
||||
// If the github URL in the config has a trailing slash, it doesnt matter here, thankfully github accepts having a double slash: https://github.com/org/repo//pull/1
|
||||
var/url = "[GLOB?.configuration?.url.github_url]/pull/[href_list["openPR"]]"
|
||||
var/url = "[GLOB.configuration.url.github_url]/pull/[href_list["openPR"]]"
|
||||
usr << link(url)
|
||||
else
|
||||
to_chat(usr, "<span class='danger'>The GitHub URL is not set in the server configuration. PRs cannot be opened from changelog view. Please inform the server host.</span>")
|
||||
|
||||
@@ -5,7 +5,7 @@ SUBSYSTEM_DEF(holiday)
|
||||
var/list/holidays
|
||||
|
||||
/datum/controller/subsystem/holiday/Initialize(start_timeofday)
|
||||
if(!config.allow_holidays)
|
||||
if(!GLOB.configuration.general.allow_holidays)
|
||||
return ..() //Holiday stuff was not enabled in the config!
|
||||
|
||||
var/YY = text2num(time2text(world.timeofday, "YY")) // get the current year
|
||||
|
||||
@@ -13,7 +13,7 @@ SUBSYSTEM_DEF(lighting)
|
||||
|
||||
/datum/controller/subsystem/lighting/Initialize(timeofday)
|
||||
if(!initialized)
|
||||
if(config.starlight)
|
||||
if(GLOB.configuration.general.starlight)
|
||||
for(var/I in GLOB.all_areas)
|
||||
var/area/A = I
|
||||
if(A.dynamic_lighting == DYNAMIC_LIGHTING_IFSTARLIGHT)
|
||||
|
||||
@@ -70,8 +70,8 @@ SUBSYSTEM_DEF(mapping)
|
||||
GLOB.map_name = "Unknown"
|
||||
|
||||
// World name
|
||||
if(config && config.server_name)
|
||||
world.name = "[config.server_name]: [station_name()]"
|
||||
if(GLOB.configuration.general.server_name)
|
||||
world.name = "[GLOB.configuration.general.server_name]: [station_name()]"
|
||||
else
|
||||
world.name = station_name()
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ SUBSYSTEM_DEF(nightshift)
|
||||
var/high_security_mode = FALSE
|
||||
|
||||
/datum/controller/subsystem/nightshift/Initialize()
|
||||
if(!config.enable_night_shifts)
|
||||
if(!GLOB.configuration.general.enable_night_shifts)
|
||||
can_fire = FALSE
|
||||
if(config.randomize_shift_time)
|
||||
if(GLOB.configuration.general.randomise_shift_time)
|
||||
GLOB.gametime_offset = rand(0, 23) HOURS
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ SUBSYSTEM_DEF(profiler)
|
||||
..("F:[round(fetch_cost, 1)]ms | W:[round(write_cost, 1)]ms")
|
||||
|
||||
/datum/controller/subsystem/profiler/Initialize()
|
||||
if(!config.auto_profile)
|
||||
if(!GLOB.configuration.general.enable_auto_profiler)
|
||||
StopProfiling() //Stop the early start profiler if we dont want it on in the config
|
||||
flags |= SS_NO_FIRE
|
||||
return ..()
|
||||
@@ -22,7 +22,7 @@ SUBSYSTEM_DEF(profiler)
|
||||
DumpFile()
|
||||
|
||||
/datum/controller/subsystem/profiler/Shutdown()
|
||||
if(config.auto_profile)
|
||||
if(GLOB.configuration.general.enable_auto_profiler)
|
||||
DumpFile()
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#define CALL_SHUTTLE_REASON_LENGTH 12
|
||||
/// Time elapsed from roundstart before shuttle calls are allowed
|
||||
#define SHUTTLE_REFUEL_DELAY 20 MINUTES
|
||||
|
||||
SUBSYSTEM_DEF(shuttle)
|
||||
name = "Shuttle"
|
||||
@@ -42,6 +44,8 @@ SUBSYSTEM_DEF(shuttle)
|
||||
var/sold_atoms = ""
|
||||
var/list/hidden_shuttle_turfs = list() //all turfs hidden from navigation computers associated with a list containing the image hiding them and the type of the turf they are pretending to be
|
||||
var/list/hidden_shuttle_turf_images = list() //only the images from the above list
|
||||
/// Default refuel delay
|
||||
var/refuel_delay = SHUTTLE_REFUEL_DELAY
|
||||
|
||||
/datum/controller/subsystem/shuttle/Initialize(start_timeofday)
|
||||
ordernum = rand(1,9000)
|
||||
@@ -97,7 +101,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
|
||||
/datum/controller/subsystem/shuttle/proc/secondsToRefuel()
|
||||
var/elapsed = world.time - SSticker.round_start_time
|
||||
var/remaining = round((config.shuttle_refuel_delay - elapsed) / 10)
|
||||
var/remaining = round((refuel_delay - elapsed) / 10)
|
||||
return remaining > 0 ? remaining : 0
|
||||
|
||||
/datum/controller/subsystem/shuttle/proc/requestEvac(mob/user, call_reason)
|
||||
@@ -115,7 +119,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
emergency = backup_shuttle
|
||||
|
||||
if(secondsToRefuel())
|
||||
to_chat(user, "The emergency shuttle is refueling. Please wait another [abs(round(((world.time - SSticker.round_start_time) - config.shuttle_refuel_delay)/600))] minutes before trying again.")
|
||||
to_chat(user, "The emergency shuttle is refueling. Please wait another [abs(round(((world.time - SSticker.round_start_time) - refuel_delay)/600))] minutes before trying again.")
|
||||
return
|
||||
|
||||
switch(emergency.mode)
|
||||
|
||||
@@ -77,9 +77,9 @@ SUBSYSTEM_DEF(ticker)
|
||||
switch(current_state)
|
||||
if(GAME_STATE_STARTUP)
|
||||
// This is ran as soon as the MC starts firing, and should only run ONCE, unless startup fails
|
||||
round_start_time = world.time + (config.pregame_timestart * 10)
|
||||
round_start_time = world.time + (GLOB.configuration.general.lobby_time * 10)
|
||||
to_chat(world, "<B><span class='darkmblue'>Welcome to the pre-game lobby!</span></B>")
|
||||
to_chat(world, "Please, setup your character and select ready. Game will start in [config.pregame_timestart] seconds")
|
||||
to_chat(world, "Please, setup your character and select ready. Game will start in [GLOB.configuration.general.lobby_time] seconds")
|
||||
current_state = GAME_STATE_PREGAME
|
||||
fire() // TG says this is a good idea
|
||||
for(var/mob/new_player/N in GLOB.player_list)
|
||||
@@ -280,6 +280,8 @@ SUBSYSTEM_DEF(ticker)
|
||||
else
|
||||
log_debug("Playercount: [playercount] versus trigger: [highpop_trigger] - keeping standard job config")
|
||||
|
||||
SSnightshift.check_nightshift()
|
||||
|
||||
#ifdef UNIT_TESTS
|
||||
RunUnitTests()
|
||||
#endif
|
||||
|
||||
@@ -220,10 +220,10 @@ SUBSYSTEM_DEF(tickets)
|
||||
"Man Up" = "Man Up",
|
||||
)
|
||||
|
||||
if(GLOB?.configuration?.url.banappeals_url)
|
||||
if(GLOB.configuration.url.banappeals_url)
|
||||
response_phrases["Appeal on the Forums"] = "Appealing a ban must occur on the forums. Privately messaging, or adminhelping about your ban will not resolve it. To appeal your ban, please head to <a href='[GLOB.configuration.url.banappeals_url]'>[GLOB.configuration.url.banappeals_url]</a>"
|
||||
|
||||
if(GLOB?.configuration?.url.github_url)
|
||||
if(GLOB.configuration.url.github_url)
|
||||
response_phrases["Github Issue Report"] = "To report a bug, please go to our <a href='[GLOB.configuration.url.github_url]'>Github page</a>. Then go to 'Issues'. Then 'New Issue'. Then fill out the report form. If the report would reveal current-round information, file it after the round ends."
|
||||
|
||||
var/sorted_responses = list()
|
||||
|
||||
@@ -53,9 +53,9 @@ SUBSYSTEM_DEF(vote)
|
||||
voting.Cut()
|
||||
current_votes.Cut()
|
||||
|
||||
if(auto_muted && !config.ooc_allowed && !(config.auto_toggle_ooc_during_round && SSticker.current_state == GAME_STATE_PLAYING))
|
||||
if(auto_muted && !GLOB.ooc_enabled && !(GLOB.configuration.general.auto_disable_ooc && SSticker.current_state == GAME_STATE_PLAYING))
|
||||
auto_muted = 0
|
||||
config.ooc_allowed = !( config.ooc_allowed )
|
||||
GLOB.ooc_enabled = TRUE
|
||||
to_chat(world, "<b>The OOC channel has been automatically enabled due to vote end.</b>")
|
||||
log_admin("OOC was toggled automatically due to vote end.")
|
||||
message_admins("OOC has been toggled on automatically.")
|
||||
@@ -257,21 +257,21 @@ SUBSYSTEM_DEF(vote)
|
||||
if(mode == "gamemode" && SSticker.ticker_going)
|
||||
SSticker.ticker_going = FALSE
|
||||
to_chat(world, "<font color='red'><b>Round start has been delayed.</b></font>")
|
||||
if(mode == "crew_transfer" && config.ooc_allowed)
|
||||
auto_muted = 1
|
||||
config.ooc_allowed = !( config.ooc_allowed )
|
||||
if(mode == "crew_transfer" && GLOB.ooc_enabled)
|
||||
auto_muted = TRUE
|
||||
GLOB.ooc_enabled = FALSE
|
||||
to_chat(world, "<b>The OOC channel has been automatically disabled due to a crew transfer vote.</b>")
|
||||
log_admin("OOC was toggled automatically due to crew_transfer vote.")
|
||||
message_admins("OOC has been toggled off automatically.")
|
||||
if(mode == "gamemode" && config.ooc_allowed)
|
||||
auto_muted = 1
|
||||
config.ooc_allowed = !( config.ooc_allowed )
|
||||
if(mode == "gamemode" && GLOB.ooc_enabled)
|
||||
auto_muted = TRUE
|
||||
GLOB.ooc_enabled = FALSE
|
||||
to_chat(world, "<b>The OOC channel has been automatically disabled due to the gamemode vote.</b>")
|
||||
log_admin("OOC was toggled automatically due to gamemode vote.")
|
||||
message_admins("OOC has been toggled off automatically.")
|
||||
if(mode == "custom" && config.ooc_allowed)
|
||||
auto_muted = 1
|
||||
config.ooc_allowed = !( config.ooc_allowed )
|
||||
if(mode == "custom" && GLOB.ooc_enabled)
|
||||
auto_muted = TRUE
|
||||
GLOB.ooc_enabled = FALSE
|
||||
to_chat(world, "<b>The OOC channel has been automatically disabled due to a custom vote.</b>")
|
||||
log_admin("OOC was toggled automatically due to custom vote.")
|
||||
message_admins("OOC has been toggled off automatically.")
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
return
|
||||
switch(controller)
|
||||
if("Configuration")
|
||||
debug_variables(config)
|
||||
debug_variables(GLOB.configuration)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Debug Config")
|
||||
if("pAI")
|
||||
debug_variables(GLOB.paiController)
|
||||
|
||||
@@ -93,7 +93,7 @@ GLOBAL_PROTECT(revision_info) // Dont mess with this
|
||||
msg += "<b>Round ID:</b> [GLOB.round_id ? GLOB.round_id : "NULL"]"
|
||||
|
||||
// Commit info
|
||||
if(GLOB.revision_info.commit_hash && GLOB.revision_info.commit_date && GLOB?.configuration?.url.github_url)
|
||||
if(GLOB.revision_info.commit_hash && GLOB.revision_info.commit_date && GLOB.configuration.url.github_url)
|
||||
msg += "<b>Server Commit:</b> <a href='[GLOB.configuration.url.github_url]/commit/[GLOB.revision_info.commit_hash]'>[GLOB.revision_info.commit_hash]</a> (Date: [GLOB.revision_info.commit_date])"
|
||||
if(GLOB.revision_info.origin_commit && (GLOB.revision_info.commit_hash != GLOB.revision_info.origin_commit))
|
||||
msg += "<b>Origin Commit:</b> <a href='[GLOB.configuration.url.github_url]/commit/[GLOB.revision_info.origin_commit]'>[GLOB.revision_info.origin_commit]</a>"
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
else if(dynamic_lighting != DYNAMIC_LIGHTING_IFSTARLIGHT)
|
||||
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
|
||||
if(dynamic_lighting == DYNAMIC_LIGHTING_IFSTARLIGHT)
|
||||
dynamic_lighting = config.starlight ? DYNAMIC_LIGHTING_ENABLED : DYNAMIC_LIGHTING_DISABLED
|
||||
dynamic_lighting = GLOB.configuration.general.starlight ? DYNAMIC_LIGHTING_ENABLED : DYNAMIC_LIGHTING_DISABLED
|
||||
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
// No. of player - Min. Player to dec, divided by player per bonus, then multipled by TC per bonus. Rounded.
|
||||
total_tc = CHALLENGE_TELECRYSTALS + round((((GLOB.player_list.len - CHALLENGE_MIN_PLAYERS)/CHALLENGE_SCALE_PLAYER) * CHALLENGE_SCALE_BONUS))
|
||||
share_telecrystals()
|
||||
config.shuttle_refuel_delay = CHALLENGE_SHUTTLE_DELAY
|
||||
SSshuttle.refuel_delay = CHALLENGE_SHUTTLE_DELAY
|
||||
qdel(src)
|
||||
|
||||
/obj/item/nuclear_challenge/proc/share_telecrystals()
|
||||
|
||||
@@ -85,7 +85,8 @@
|
||||
announce(H)
|
||||
|
||||
/datum/job/proc/get_access()
|
||||
if(!config) //Needed for robots.
|
||||
if(!GLOB?.configuration?.jobs) //Needed for robots.
|
||||
// AA TOOD: Remove this once mulebots and stuff use Initialize()
|
||||
return src.minimal_access.Copy()
|
||||
|
||||
if(GLOB.configuration.jobs.jobs_have_minimal_access)
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/proc/is_job_whitelisted(mob/M, rank)
|
||||
if(guest_jobbans(rank))
|
||||
if(!config.usewhitelist)
|
||||
return TRUE
|
||||
if(config.disable_karma)
|
||||
if(!GLOB.configuration.general.enable_karma)
|
||||
return TRUE
|
||||
if(check_rights(R_ADMIN, 0, M))
|
||||
return TRUE
|
||||
@@ -35,7 +33,7 @@
|
||||
return TRUE
|
||||
|
||||
/proc/is_alien_whitelisted(mob/M, species)
|
||||
if(config.disable_karma)
|
||||
if(!GLOB.configuration.general.enable_karma)
|
||||
return TRUE
|
||||
if(species == "human" || species == "Human")
|
||||
return TRUE
|
||||
|
||||
@@ -338,7 +338,7 @@
|
||||
set_temp("Error: Not enough biomass.", "danger")
|
||||
else if(pod.mess)
|
||||
set_temp("Error: The cloning pod is malfunctioning.", "danger")
|
||||
else if(!config.revival_cloning)
|
||||
else if(!GLOB.configuration.general.enable_cloning)
|
||||
set_temp("Error: Unable to initiate cloning cycle.", "danger")
|
||||
else
|
||||
cloneresult = pod.growclone(C)
|
||||
|
||||
@@ -45,15 +45,15 @@
|
||||
var/light = -1
|
||||
var/flash = -1
|
||||
|
||||
// Clamp all values to MAX_EXPLOSION_RANGE
|
||||
// We dont need to clamp here. It gets clamped inside explosion()
|
||||
if(round(amount/12) > 0)
|
||||
devastation = min (GLOB.max_ex_devastation_range, devastation + round(amount/12))
|
||||
devastation += round(amount/12)
|
||||
|
||||
if(round(amount/6) > 0)
|
||||
heavy = min (GLOB.max_ex_heavy_range, heavy + round(amount/6))
|
||||
heavy += round(amount/6)
|
||||
|
||||
if(round(amount/3) > 0)
|
||||
light = min (GLOB.max_ex_light_range, light + round(amount/3))
|
||||
light += round(amount/3)
|
||||
|
||||
if(flashing && flashing_factor)
|
||||
flash += (round(amount/4) * flashing_factor)
|
||||
|
||||
@@ -24,11 +24,11 @@
|
||||
|
||||
if(!ignorecap)
|
||||
// Clamp all values to MAX_EXPLOSION_RANGE
|
||||
devastation_range = min (GLOB.max_ex_devastation_range, devastation_range)
|
||||
heavy_impact_range = min (GLOB.max_ex_heavy_range, heavy_impact_range)
|
||||
light_impact_range = min (GLOB.max_ex_light_range, light_impact_range)
|
||||
flash_range = min (GLOB.max_ex_flash_range, flash_range)
|
||||
flame_range = min (GLOB.max_ex_flame_range, flame_range)
|
||||
devastation_range = min (GLOB.configuration.general.bomb_cap / 4, devastation_range)
|
||||
heavy_impact_range = min (GLOB.configuration.general.bomb_cap / 2, heavy_impact_range)
|
||||
light_impact_range = min (GLOB.configuration.general.bomb_cap, light_impact_range)
|
||||
flash_range = min (GLOB.configuration.general.bomb_cap, flash_range)
|
||||
flame_range = min (GLOB.configuration.general.bomb_cap, flame_range)
|
||||
|
||||
var/max_range = max(devastation_range, heavy_impact_range, light_impact_range, flame_range)
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
var/list/affected_turfs = spiral_range_turfs(max_range, epicenter)
|
||||
|
||||
if(config.reactionary_explosions)
|
||||
if(GLOB.configuration.general.reactionary_explosions)
|
||||
for(var/A in affected_turfs) // we cache the explosion block rating of every turf in the explosion area
|
||||
var/turf/T = A
|
||||
cached_exp_block[T] = 0
|
||||
@@ -136,7 +136,7 @@
|
||||
continue
|
||||
var/dist = HYPOTENUSE(T.x, T.y, x0, y0)
|
||||
|
||||
if(config.reactionary_explosions)
|
||||
if(GLOB.configuration.general.reactionary_explosions)
|
||||
var/turf/Trajectory = T
|
||||
while(Trajectory != epicenter)
|
||||
Trajectory = get_step_towards(Trajectory, epicenter)
|
||||
|
||||
@@ -179,12 +179,11 @@
|
||||
addtimer(CALLBACK(src, .proc/boom, user, result), 4 SECONDS)
|
||||
|
||||
/obj/item/dice/d20/e20/proc/boom(mob/user, result)
|
||||
var/capped = FALSE
|
||||
var/capped = TRUE
|
||||
var/actual_result = result
|
||||
if(result != 20)
|
||||
capped = TRUE
|
||||
result = min(result, GLOB.max_ex_light_range) // Apply the bombcap
|
||||
else // Rolled a nat 20, screw the bombcap
|
||||
// Rolled a nat 20, screw the bombcap
|
||||
if(result == 20)
|
||||
capped = FALSE
|
||||
result = 24
|
||||
|
||||
var/turf/epicenter = get_turf(src)
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
set category = "Object"
|
||||
set src in oview(1)
|
||||
|
||||
if(config.ghost_interaction)
|
||||
if(GLOB.configuration.general.ghost_interaction)
|
||||
setDir(turn(dir, 90))
|
||||
handle_rotation()
|
||||
return
|
||||
|
||||
+1
-1
@@ -178,7 +178,7 @@ falloff_distance - Distance at which falloff begins. Sound is at peak volume (in
|
||||
SEND_SOUND(src, S)
|
||||
|
||||
/client/proc/playtitlemusic()
|
||||
if(!SSticker || !SSticker.login_music || config.disable_lobby_music)
|
||||
if(!SSticker || !SSticker.login_music || GLOB.configuration.general.disable_lobby_music)
|
||||
return
|
||||
if(prefs.sound & SOUND_LOBBY)
|
||||
SEND_SOUND(src, sound(SSticker.login_music, repeat = 0, wait = 0, volume = 85 * prefs.get_channel_volume(CHANNEL_LOBBYMUSIC), channel = CHANNEL_LOBBYMUSIC)) // MAD JAMS
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
S.apply_transition(src)
|
||||
|
||||
/turf/space/proc/update_starlight()
|
||||
if(config.starlight)
|
||||
if(GLOB.configuration.general.starlight)
|
||||
for(var/t in RANGE_TURFS(1,src)) //RANGE_TURFS is in code\__HELPERS\game.dm
|
||||
if(isspaceturf(t))
|
||||
//let's NOT update this that much pls
|
||||
|
||||
@@ -19,10 +19,10 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00")
|
||||
return
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD, 0))
|
||||
if(!config.ooc_allowed)
|
||||
if(!GLOB.ooc_enabled)
|
||||
to_chat(src, "<span class='danger'>OOC is globally muted.</span>")
|
||||
return
|
||||
if(!config.dooc_allowed && (mob.stat == DEAD))
|
||||
if(!GLOB.dooc_enabled && (mob.stat == DEAD))
|
||||
to_chat(usr, "<span class='danger'>OOC for dead mobs has been turned off.</span>")
|
||||
return
|
||||
if(prefs.muted & MUTE_OOC)
|
||||
@@ -41,7 +41,7 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00")
|
||||
return
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD,0))
|
||||
if(!config.ooc_allowed)
|
||||
if(!GLOB.ooc_enabled)
|
||||
to_chat(src, "<span class='danger'>OOC is globally muted.</span>")
|
||||
return
|
||||
if(handle_spam_prevention(msg, MUTE_OOC, OOC_COOLDOWN))
|
||||
@@ -92,20 +92,20 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00")
|
||||
else
|
||||
display_name = holder.fakekey
|
||||
|
||||
if(!config.disable_ooc_emoji)
|
||||
if(GLOB.configuration.general.enable_ooc_emoji)
|
||||
msg = "<span class='emoji_enabled'>[msg]</span>"
|
||||
|
||||
to_chat(C, "<font color='[display_colour]'><span class='ooc'><span class='prefix'>OOC:</span> <EM>[display_name]:</EM> <span class='message'>[msg]</span></span></font>")
|
||||
|
||||
/proc/toggle_ooc()
|
||||
config.ooc_allowed = ( !config.ooc_allowed )
|
||||
if(config.ooc_allowed)
|
||||
GLOB.ooc_enabled = (!GLOB.ooc_enabled)
|
||||
if(GLOB.ooc_enabled)
|
||||
to_chat(world, "<B>The OOC channel has been globally enabled!</B>")
|
||||
else
|
||||
to_chat(world, "<B>The OOC channel has been globally disabled!</B>")
|
||||
|
||||
/proc/auto_toggle_ooc(on)
|
||||
if(config.auto_toggle_ooc_during_round && config.ooc_allowed != on)
|
||||
if(GLOB.configuration.general.auto_disable_ooc && GLOB.ooc_enabled != on)
|
||||
toggle_ooc()
|
||||
|
||||
/client/proc/set_ooc(newColor as color)
|
||||
@@ -175,10 +175,10 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00")
|
||||
return
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD,0))
|
||||
if(!config.looc_allowed)
|
||||
if(!GLOB.looc_enabled)
|
||||
to_chat(src, "<span class='danger'>LOOC is globally muted.</span>")
|
||||
return
|
||||
if(!config.dooc_allowed && (mob.stat == DEAD))
|
||||
if(!GLOB.dooc_enabled && (mob.stat == DEAD))
|
||||
to_chat(usr, "<span class='danger'>LOOC for dead mobs has been turned off.</span>")
|
||||
return
|
||||
if(prefs.muted & MUTE_OOC)
|
||||
|
||||
+16
-32
@@ -20,8 +20,8 @@ GLOBAL_LIST_INIT(map_transition_config, MAP_TRANSITION_CONFIG)
|
||||
|
||||
//temporary file used to record errors with loading config and the database, moved to log directory once logging is set up
|
||||
GLOB.config_error_log = GLOB.world_game_log = GLOB.world_runtime_log = GLOB.sql_log = "data/logs/config_error.log"
|
||||
load_configuration()
|
||||
GLOB.configuration.load_configuration()
|
||||
load_files() // Loads up the MOTD (Welcome message players see when joining the server), TOS and gamemode
|
||||
|
||||
// Right off the bat, load up the DB
|
||||
SSdbcore.CheckSchemaVersion() // This doesnt just check the schema version, it also connects to the db! This needs to happen super early! I cannot stress this enough!
|
||||
@@ -46,10 +46,6 @@ GLOBAL_LIST_INIT(map_transition_config, MAP_TRANSITION_CONFIG)
|
||||
if(byond_version < MIN_COMPILER_VERSION || byond_build < MIN_COMPILER_BUILD)
|
||||
log_world("Your server's byond version does not meet the recommended requirements for this code. Please update BYOND")
|
||||
|
||||
if(config && config.server_name != null && config.server_suffix && world.port > 0)
|
||||
// dumb and hardcoded but I don't care~
|
||||
config.server_name += " #[(world.port % 1000) / 100]"
|
||||
|
||||
GLOB.timezoneOffset = text2num(time2text(0, "hh")) * 36000
|
||||
|
||||
startup_procs() // Call procs that need to occur on startup (Generate lists, load MOTD, etc)
|
||||
@@ -77,8 +73,6 @@ GLOBAL_LIST_INIT(map_transition_config, MAP_TRANSITION_CONFIG)
|
||||
/world/proc/startup_procs()
|
||||
LoadBans() // Load up who is banned and who isnt. DONT PUT THIS IN A SUBSYSTEM IT WILL TAKE TOO LONG TO BE CALLED
|
||||
jobban_loadbanfile() // Load up jobbans. Again, DO NOT PUT THIS IN A SUBSYSTEM IT WILL TAKE TOO LONG TO BE CALLED
|
||||
load_motd() // Loads up the MOTD (Welcome message players see when joining the server)
|
||||
load_mode() // Loads up the gamemode
|
||||
investigate_reset() // This is part of the admin investigate system. PLEASE DONT SS THIS EITHER
|
||||
|
||||
/// List of all world topic spam prevention handlers. See code/modules/world_topic/_spam_prevention_handler.dm
|
||||
@@ -130,7 +124,7 @@ GLOBAL_LIST_EMPTY(world_topic_handlers)
|
||||
to_chat(world, "<span class='boldannounce'>Rebooting world immediately due to host request</span>")
|
||||
rustg_log_close_all() // Past this point, no logging procs can be used, at risk of data loss.
|
||||
// Now handle a reboot
|
||||
if(GLOB?.configuration?.system.shutdown_on_reboot)
|
||||
if(GLOB.configuration.system.shutdown_on_reboot)
|
||||
sleep(0)
|
||||
if(GLOB.configuration.system.shutdown_shell_command)
|
||||
shell(GLOB.configuration.system.shutdown_shell_command)
|
||||
@@ -159,12 +153,12 @@ GLOBAL_LIST_EMPTY(world_topic_handlers)
|
||||
// Send the reboot banner to all players
|
||||
for(var/client/C in GLOB.clients)
|
||||
C << output(list2params(list(secs_before_auto_reconnect)), "browseroutput:reboot")
|
||||
if(GLOB?.configuration?.url.server_url) // If you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite
|
||||
if(GLOB.configuration?.url.server_url) // If you set a server location in config.txt, it sends you there instead of trying to reconnect to the same world address. -- NeoFite
|
||||
C << link("byond://[GLOB.configuration.url.server_url]")
|
||||
|
||||
// And begin the real shutdown
|
||||
rustg_log_close_all() // Past this point, no logging procs can be used, at risk of data loss.
|
||||
if(GLOB?.configuration?.system.shutdown_on_reboot)
|
||||
if(GLOB.configuration.system.shutdown_on_reboot)
|
||||
sleep(0)
|
||||
if(GLOB.configuration.system.shutdown_shell_command)
|
||||
shell(GLOB.configuration.system.shutdown_shell_command)
|
||||
@@ -188,36 +182,26 @@ GLOBAL_LIST_EMPTY(world_topic_handlers)
|
||||
fdel(F)
|
||||
F << the_mode
|
||||
|
||||
/world/proc/load_motd()
|
||||
/world/proc/load_files()
|
||||
GLOB.join_motd = file2text("config/motd.txt")
|
||||
GLOB.join_tos = file2text("config/tos.txt")
|
||||
|
||||
/proc/load_configuration()
|
||||
config = new /datum/configuration()
|
||||
config.load("config/config.txt")
|
||||
config.load("config/game_options.txt","game_options")
|
||||
// apply some settings from config..
|
||||
load_mode()
|
||||
|
||||
/world/proc/update_status()
|
||||
status = get_status_text()
|
||||
|
||||
/proc/get_world_status_text()
|
||||
return world.get_status_text()
|
||||
|
||||
/world/proc/get_status_text()
|
||||
var/s = ""
|
||||
|
||||
if(config && config.server_name)
|
||||
s += "<b>[config.server_name]</b> — "
|
||||
if(GLOB.configuration.general.server_name)
|
||||
s += "<b>[GLOB.configuration.general.server_name]</b> — "
|
||||
s += "<b>[station_name()]</b> "
|
||||
if(GLOB?.configuration?.url.github_url)
|
||||
s+= "([GLOB.game_version])" // TODO: Redo the MOTD
|
||||
|
||||
if(config && config.server_tag_line)
|
||||
s += "<br>[config.server_tag_line]"
|
||||
if(GLOB.configuration.general.server_tag_line)
|
||||
s += "<br>[GLOB.configuration.general.server_tag_line]"
|
||||
|
||||
if(SSticker && ROUND_TIME > 0)
|
||||
s += "<br>[round(ROUND_TIME / 36000)]:[add_zero(num2text(ROUND_TIME / 600 % 60), 2)], " + capitalize(get_security_level())
|
||||
s += "<br>[round(ROUND_TIME / 36000)]:[add_zero(num2text(ROUND_TIME / 600 % 60), 2)], [capitalize(get_security_level())]"
|
||||
else
|
||||
s += "<br><b>STARTING</b>"
|
||||
|
||||
@@ -227,16 +211,16 @@ GLOBAL_LIST_EMPTY(world_topic_handlers)
|
||||
if(!GLOB.enter_allowed)
|
||||
features += "closed"
|
||||
|
||||
if(config && config.server_extra_features)
|
||||
features += config.server_extra_features
|
||||
if(GLOB.configuration.general.server_features)
|
||||
features += GLOB.configuration.general.server_features
|
||||
|
||||
if(GLOB?.configuration?.vote.allow_restart_votes)
|
||||
if(GLOB.configuration.vote.allow_restart_votes)
|
||||
features += "vote"
|
||||
|
||||
if(GLOB?.configuration?.url.wiki_url)
|
||||
if(GLOB.configuration.url.wiki_url)
|
||||
features += "<a href=\"[GLOB.configuration.url.wiki_url]\">Wiki</a>"
|
||||
|
||||
if(GLOB.abandon_allowed)
|
||||
if(GLOB.configuration.general.respawn_enabled)
|
||||
features += "respawn"
|
||||
|
||||
if(features)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
admin = 1
|
||||
|
||||
//Guest Checking
|
||||
if(!GLOB.guests_allowed && IsGuestKey(key))
|
||||
if(GLOB.configuration.general.guest_ban && IsGuestKey(key))
|
||||
log_adminwarn("Failed Login: [key] [computer_id] [address] - Guests not allowed")
|
||||
// message_admins("<span class='notice'>Failed Login: [key] - Guests not allowed</span>")
|
||||
INVOKE_ASYNC(GLOBAL_PROC, .proc/log_connection, ckey(key), address, computer_id, CONNECTION_TYPE_DROPPED_BANNED)
|
||||
@@ -38,13 +38,13 @@
|
||||
if(check_ipintel && GLOB.configuration.ipintel.contact_email && GLOB.configuration.ipintel.whitelist_mode && ipintel_is_banned(key, address))
|
||||
log_adminwarn("Failed Login: [key] [computer_id] [address] - Proxy/VPN")
|
||||
var/mistakemessage = ""
|
||||
if(GLOB?.configuration?.url.banappeals_url)
|
||||
if(GLOB.configuration.url.banappeals_url)
|
||||
mistakemessage = "\nIf you have to use one, request whitelisting at: [GLOB.configuration.url.banappeals_url]"
|
||||
INVOKE_ASYNC(GLOBAL_PROC, .proc/log_connection, ckey(key), address, computer_id, CONNECTION_TYPE_DROPPED_IPINTEL)
|
||||
return list("reason"="using proxy or vpn", "desc"="\nReason: Proxies/VPNs are not allowed here. [mistakemessage]")
|
||||
|
||||
|
||||
if(config.ban_legacy_system)
|
||||
if(!GLOB.configuration.general.use_database_bans)
|
||||
//Ban Checking
|
||||
. = CheckBan(ckey(key), computer_id, address)
|
||||
if(.)
|
||||
@@ -116,7 +116,7 @@
|
||||
expires = " The ban is for [duration] minutes and expires on [expiration] (server time)."
|
||||
else
|
||||
var/appealmessage = ""
|
||||
if(GLOB?.configuration?.url.banappeals_url)
|
||||
if(GLOB.configuration.url.banappeals_url)
|
||||
appealmessage = " You may appeal it at <a href='[GLOB.configuration.url.banappeals_url]'>[GLOB.configuration.url.banappeals_url]</a>."
|
||||
expires = " This ban does not expire automatically and must be appealed.[appealmessage]"
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ GLOBAL_PROTECT(banlist_savefile) // Obvious reasons
|
||||
|
||||
. = list()
|
||||
var/appeal
|
||||
if(GLOB?.configuration?.url.banappeals_url)
|
||||
if(GLOB.configuration.url.banappeals_url)
|
||||
appeal = "\nFor more information on your ban, or to appeal, head to <a href='[GLOB.configuration.url.banappeals_url]'>[GLOB.configuration.url.banappeals_url]</a>"
|
||||
GLOB.banlist_savefile.cd = "/base"
|
||||
if( "[ckey][id]" in GLOB.banlist_savefile.dir )
|
||||
|
||||
+19
-19
@@ -91,8 +91,8 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
else
|
||||
body += "\[[M.client.holder ? M.client.holder.rank : "Player"]\] "
|
||||
body += "\[<A href='?_src_=holder;getplaytimewindow=[M.UID()]'>" + M.client.get_exp_type(EXP_TYPE_CREW) + " as [EXP_TYPE_CREW]</a>\]"
|
||||
body += "<br>BYOND account registration date: [M.client.byondacc_date || "ERROR"] [M.client.byondacc_age <= config.byond_account_age_threshold ? "<b>" : ""]([M.client.byondacc_age] days old)[M.client.byondacc_age <= config.byond_account_age_threshold ? "</b>" : ""]"
|
||||
body += "<br>Global Ban DB Lookup: [GLOB?.configuration?.url.centcom_ban_db_url ? "<a href='?_src_=holder;open_ccbdb=[M.client.ckey]'>Lookup</a>" : "<i>Disabled</i>"]"
|
||||
body += "<br>BYOND account registration date: [M.client.byondacc_date || "ERROR"] [M.client.byondacc_age <= GLOB.configuration?.general.byond_account_age_threshold ? "<b>" : ""]([M.client.byondacc_age] days old)[M.client.byondacc_age <= GLOB.configuration.general.byond_account_age_threshold ? "</b>" : ""]"
|
||||
body += "<br>Global Ban DB Lookup: [GLOB.configuration?.url.centcom_ban_db_url ? "<a href='?_src_=holder;open_ccbdb=[M.client.ckey]'>Lookup</a>" : "<i>Disabled</i>"]"
|
||||
|
||||
body += "<br>"
|
||||
|
||||
@@ -127,7 +127,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
body += "<A href='?_src_=holder;appearanceban=[M.UID()];dbbanaddckey=[M.ckey]'>Appearance Ban</A> | "
|
||||
body += "<A href='?_src_=holder;shownoteckey=[M.ckey]'>Notes</A> | "
|
||||
body += "<A href='?_src_=holder;viewkarma=[M.ckey]'>View Karma</A> | "
|
||||
if(GLOB?.configuration?.url.forum_playerinfo_url)
|
||||
if(GLOB.configuration.url.forum_playerinfo_url)
|
||||
body += "<A href='?_src_=holder;webtools=[M.ckey]'>WebInfo</A> | "
|
||||
if(M.client)
|
||||
if(check_watchlist(M.client.ckey))
|
||||
@@ -462,8 +462,8 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.looc_allowed = !(config.looc_allowed)
|
||||
if(config.looc_allowed)
|
||||
GLOB.looc_enabled = !(GLOB.looc_enabled)
|
||||
if(GLOB.looc_enabled)
|
||||
to_chat(world, "<B>The LOOC channel has been globally enabled!</B>")
|
||||
else
|
||||
to_chat(world, "<B>The LOOC channel has been globally disabled!</B>")
|
||||
@@ -478,8 +478,8 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.dsay_allowed = !(config.dsay_allowed)
|
||||
if(config.dsay_allowed)
|
||||
GLOB.dsay_enabled = !(GLOB.dsay_enabled)
|
||||
if(GLOB.dsay_enabled)
|
||||
to_chat(world, "<B>Deadchat has been globally enabled!</B>")
|
||||
else
|
||||
to_chat(world, "<B>Deadchat has been globally disabled!</B>")
|
||||
@@ -495,7 +495,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.dooc_allowed = !( config.dooc_allowed )
|
||||
GLOB.dooc_enabled = !(GLOB.dooc_enabled)
|
||||
log_admin("[key_name(usr)] toggled Dead OOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled Dead OOC.", 1)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Dead OOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -508,7 +508,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.disable_ooc_emoji = !(config.disable_ooc_emoji)
|
||||
GLOB.configuration.general.enable_ooc_emoji = !(GLOB.configuration.general.enable_ooc_emoji)
|
||||
log_admin("[key_name(usr)] toggled OOC Emoji.")
|
||||
message_admins("[key_name_admin(usr)] toggled OOC Emoji.", 1)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle OOC Emoji")
|
||||
@@ -525,7 +525,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
alert("Unable to start the game as it is not set up.")
|
||||
return
|
||||
|
||||
if(config.start_now_confirmation)
|
||||
if(GLOB.configuration.general.start_now_confirmation)
|
||||
if(alert(usr, "This is a live server. Are you sure you want to start now?", "Start game", "Yes", "No") != "Yes")
|
||||
return
|
||||
|
||||
@@ -587,13 +587,13 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
GLOB.abandon_allowed = !( GLOB.abandon_allowed )
|
||||
if(GLOB.abandon_allowed)
|
||||
GLOB.configuration.general.respawn_enabled = !(GLOB.configuration.general.respawn_enabled)
|
||||
if(GLOB.configuration.general.respawn_enabled)
|
||||
to_chat(world, "<B>You may now respawn.</B>")
|
||||
else
|
||||
to_chat(world, "<B>You may no longer respawn :(</B>")
|
||||
message_admins("[key_name_admin(usr)] toggled respawn to [GLOB.abandon_allowed ? "On" : "Off"].", 1)
|
||||
log_admin("[key_name(usr)] toggled respawn to [GLOB.abandon_allowed ? "On" : "Off"].")
|
||||
to_chat(world, "<B>You may no longer respawn</B>")
|
||||
message_admins("[key_name_admin(usr)] toggled respawn to [GLOB.configuration.general.respawn_enabled ? "On" : "Off"].", 1)
|
||||
log_admin("[key_name(usr)] toggled respawn to [GLOB.configuration.general.respawn_enabled ? "On" : "Off"].")
|
||||
world.update_status()
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Respawn") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -725,13 +725,13 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
GLOB.guests_allowed = !( GLOB.guests_allowed )
|
||||
if(!( GLOB.guests_allowed ))
|
||||
GLOB.configuration.general.guest_ban = !(GLOB.configuration?.general.guest_ban)
|
||||
if(GLOB.configuration.general.guest_ban)
|
||||
to_chat(world, "<B>Guests may no longer enter the game.</B>")
|
||||
else
|
||||
to_chat(world, "<B>Guests may now enter the game.</B>")
|
||||
log_admin("[key_name(usr)] toggled guests game entering [GLOB.guests_allowed ? "" : "dis"]allowed.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] toggled guests game entering [GLOB.guests_allowed ? "" : "dis"]allowed.</span>", 1)
|
||||
log_admin("[key_name(usr)] toggled guests game entering [GLOB.configuration?.general.guest_ban ? "dis" : ""]allowed.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] toggled guests game entering [GLOB.configuration?.general.guest_ban ? "dis" : ""]allowed.</span>", 1)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Guests") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/output_ai_laws()
|
||||
|
||||
@@ -137,7 +137,6 @@ GLOBAL_LIST_INIT(admin_verbs_server, list(
|
||||
/client/proc/toggle_antagHUD_restrictions,
|
||||
/client/proc/set_ooc,
|
||||
/client/proc/reset_ooc,
|
||||
/client/proc/toggledrones
|
||||
))
|
||||
GLOBAL_LIST_INIT(admin_verbs_debug, list(
|
||||
/client/proc/cmd_admin_list_open_jobs,
|
||||
@@ -395,7 +394,7 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
|
||||
if(!check_rights(R_BAN))
|
||||
return
|
||||
|
||||
if(config.ban_legacy_system)
|
||||
if(!GLOB.configuration.general.use_database_bans)
|
||||
holder.unbanpanel()
|
||||
else
|
||||
holder.DB_ban_panel()
|
||||
@@ -758,13 +757,13 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
if(config)
|
||||
if(GLOB.configuration.logging.href_logging)
|
||||
GLOB.configuration.logging.href_logging = FALSE
|
||||
to_chat(src, "<b>Stopped logging hrefs</b>")
|
||||
else
|
||||
GLOB.configuration.logging.href_logging = TRUE
|
||||
to_chat(src, "<b>Started logging hrefs</b>")
|
||||
// Why would we ever turn this off?
|
||||
if(GLOB.configuration.logging.href_logging)
|
||||
GLOB.configuration.logging.href_logging = FALSE
|
||||
to_chat(src, "<b>Stopped logging hrefs</b>")
|
||||
else
|
||||
GLOB.configuration.logging.href_logging = TRUE
|
||||
to_chat(src, "<b>Started logging hrefs</b>")
|
||||
|
||||
/client/proc/check_ai_laws()
|
||||
set name = "Check AI Laws"
|
||||
@@ -941,17 +940,6 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
|
||||
else
|
||||
to_chat(usr, "You now will get admin ticket messages.")
|
||||
|
||||
/client/proc/toggledrones()
|
||||
set name = "Toggle Maintenance Drones"
|
||||
set category = "Server"
|
||||
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
config.allow_drone_spawn = !(config.allow_drone_spawn)
|
||||
log_admin("[key_name(usr)] has [config.allow_drone_spawn ? "enabled" : "disabled"] maintenance drones.")
|
||||
message_admins("[key_name_admin(usr)] has [config.allow_drone_spawn ? "enabled" : "disabled"] maintenance drones.")
|
||||
|
||||
/client/proc/toggledebuglogs()
|
||||
set name = "Toggle Debug Log Messages"
|
||||
set category = "Preferences"
|
||||
|
||||
@@ -40,8 +40,9 @@ DEBUG
|
||||
appearance_loadbanfile()
|
||||
*/
|
||||
// AA 2020-11-25: This entire proc isnt even called. What the actual fuck.
|
||||
// AA 2021-05-23: This entire proc STILL isnt even called. I am going to screan.
|
||||
/proc/appearance_loadbanfile()
|
||||
if(config.ban_legacy_system)
|
||||
if(!GLOB.configuration.general.use_database_bans)
|
||||
var/savefile/S=new("data/appearance_full.ban")
|
||||
S["keys[0]"] >> GLOB.appearance_keylist
|
||||
log_admin("Loading appearance_rank")
|
||||
@@ -53,7 +54,7 @@ DEBUG
|
||||
else
|
||||
if(!SSdbcore.IsConnected())
|
||||
log_world("Database connection failed. Reverting to the legacy ban system.")
|
||||
config.ban_legacy_system = 1
|
||||
GLOB.configuration.general.use_database_bans = FALSE
|
||||
appearance_loadbanfile()
|
||||
return
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
|
||||
return
|
||||
GLOB.jobban_keylist.Add(text("[M.ckey] - [rank] ## [reason]"))
|
||||
jobban_assoc_insert(M.ckey, rank, reason)
|
||||
if(config.ban_legacy_system)
|
||||
if(!GLOB.configuration.general.use_database_bans)
|
||||
jobban_savebanfile()
|
||||
|
||||
/proc/jobban_client_fullban(ckey, rank)
|
||||
@@ -25,7 +25,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
|
||||
return
|
||||
GLOB.jobban_keylist.Add(text("[ckey] - [rank]"))
|
||||
jobban_assoc_insert(ckey, rank)
|
||||
if(config.ban_legacy_system)
|
||||
if(!GLOB.configuration.general.use_database_bans)
|
||||
jobban_savebanfile()
|
||||
|
||||
//returns a reason if M is banned from rank, returns 0 otherwise
|
||||
@@ -33,7 +33,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
|
||||
if(!M || !rank)
|
||||
return 0
|
||||
|
||||
if(config.guest_jobban && guest_jobbans(rank))
|
||||
if(GLOB.configuration.jobs.guest_job_ban && guest_jobbans(rank))
|
||||
if(IsGuestKey(M.key))
|
||||
return "Guest Job-ban"
|
||||
|
||||
@@ -46,7 +46,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
|
||||
if(!ckey || !rank)
|
||||
return null
|
||||
|
||||
if(config.guest_jobban && guest_jobbans(rank))
|
||||
if(GLOB.configuration.jobs.guest_job_ban && guest_jobbans(rank))
|
||||
if(IsGuestKey(ckey))
|
||||
return "Guest Job-ban"
|
||||
|
||||
@@ -56,7 +56,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
|
||||
return null
|
||||
|
||||
/proc/jobban_loadbanfile()
|
||||
if(config.ban_legacy_system)
|
||||
if(!GLOB.configuration.general.use_database_bans)
|
||||
var/savefile/S=new("data/job_full.ban")
|
||||
S["keys[0]"] >> GLOB.jobban_keylist
|
||||
log_admin("Loading jobban_rank")
|
||||
@@ -74,7 +74,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
|
||||
else
|
||||
if(!SSdbcore.IsConnected())
|
||||
log_world("Database connection failed. Reverting to the legacy ban system.")
|
||||
config.ban_legacy_system = 1
|
||||
GLOB.configuration.general.use_database_bans = FALSE
|
||||
jobban_loadbanfile()
|
||||
return
|
||||
|
||||
@@ -136,7 +136,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
|
||||
else
|
||||
log_runtime(EXCEPTION("Failed to remove malformed job ban from associative list: [X]"))
|
||||
GLOB.jobban_keylist.Remove(GLOB.jobban_keylist[i])
|
||||
if(config.ban_legacy_system)
|
||||
if(!GLOB.configuration.general.use_database_bans)
|
||||
jobban_savebanfile()
|
||||
return 1
|
||||
return 0
|
||||
@@ -148,7 +148,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
|
||||
|
||||
if(!client || !ckey)
|
||||
return
|
||||
if(config.ban_legacy_system)
|
||||
if(!GLOB.configuration.general.use_database_bans)
|
||||
//using the legacy .txt ban system
|
||||
to_chat(src, "The server is using the legacy ban system. Ask an administrator for help!")
|
||||
|
||||
@@ -186,7 +186,7 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
|
||||
qdel(select_query)
|
||||
|
||||
if(is_actually_banned)
|
||||
if(GLOB?.configuration?.url.banappeals_url)
|
||||
if(GLOB.configuration.url.banappeals_url)
|
||||
to_chat(src, "<span class='warning'>You can appeal the bans at: [GLOB.configuration.url.banappeals_url]</span>")
|
||||
else
|
||||
to_chat(src, "<span class='warning'>You have no active jobbans!</span>")
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
*/
|
||||
/datum/admins/proc/create_ccbdb_lookup(ckey)
|
||||
// Bail if disabled
|
||||
if(!GLOB?.configuration?.url.centcom_ban_db_url)
|
||||
if(!GLOB.configuration.url.centcom_ban_db_url)
|
||||
to_chat(usr, "<span class='warning'>The CentCom Ban DB lookup is disabled. Please inform a maintainer or server host.</span>")
|
||||
return
|
||||
// Bail if no ckey is supplied
|
||||
|
||||
@@ -54,8 +54,8 @@
|
||||
adminckey = ckey(adminckey)
|
||||
|
||||
if(!server)
|
||||
if(config && config.server_name)
|
||||
server = config.server_name
|
||||
if(GLOB.configuration.general.server_name)
|
||||
server = GLOB.configuration.general.server_name
|
||||
|
||||
// Force cast this to 1/0 incase someone tries to feed bad data
|
||||
automated = !!automated
|
||||
|
||||
+10
-15
@@ -541,7 +541,7 @@
|
||||
to_chat(M, "<span class='warning'><big><b>You have been appearance banned by [usr.client.ckey].</b></big></span>")
|
||||
to_chat(M, "<span class='danger'>The reason is: [reason]</span>")
|
||||
to_chat(M, "<span class='warning'>Appearance ban can be lifted only upon request.</span>")
|
||||
if(GLOB?.configuration?.url.banappeals_url)
|
||||
if(GLOB.configuration.url.banappeals_url)
|
||||
to_chat(M, "<span class='warning'>To try to resolve this matter head to [GLOB.configuration.url.banappeals_url]</span>")
|
||||
else
|
||||
to_chat(M, "<span class='warning'>No ban appeals URL has been set.</span>")
|
||||
@@ -880,7 +880,7 @@
|
||||
if(notbannedlist.len) //at least 1 unbanned job exists in joblist so we have stuff to ban.
|
||||
switch(alert("Temporary Ban of [M.ckey]?",,"Yes","No", "Cancel"))
|
||||
if("Yes")
|
||||
if(config.ban_legacy_system)
|
||||
if(!GLOB.configuration.general.use_database_bans)
|
||||
to_chat(usr, "<span class='warning'>Your server is using the legacy banning system, which does not support temporary job bans. Consider upgrading. Aborting ban.</span>")
|
||||
return
|
||||
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
|
||||
@@ -933,7 +933,7 @@
|
||||
//Unbanning joblist
|
||||
//all jobs in joblist are banned already OR we didn't give a reason (implying they shouldn't be banned)
|
||||
if(joblist.len) //at least 1 banned job exists in joblist so we have stuff to unban.
|
||||
if(!config.ban_legacy_system)
|
||||
if(GLOB.configuration.general.use_database_bans)
|
||||
to_chat(usr, "<span class='warning'>Unfortunately, database based unbanning cannot be done through this panel</span>")
|
||||
DB_ban_panel(M.ckey)
|
||||
return
|
||||
@@ -1008,7 +1008,7 @@
|
||||
|
||||
else if(href_list["webtools"])
|
||||
var/target_ckey = href_list["webtools"]
|
||||
if(GLOB?.configuration?.url.forum_playerinfo_url)
|
||||
if(GLOB.configuration.url.forum_playerinfo_url)
|
||||
var/url_to_open = "[GLOB.configuration.url.forum_playerinfo_url][target_ckey]"
|
||||
if(alert("Open [url_to_open]",,"Yes","No")=="Yes")
|
||||
usr.client << link(url_to_open)
|
||||
@@ -1091,7 +1091,7 @@
|
||||
to_chat(M, "<span class='warning'>This ban does not expire automatically and must be appealed.</span>")
|
||||
if(M.client)
|
||||
M.client.link_forum_account(TRUE)
|
||||
if(GLOB?.configuration?.url.banappeals_url)
|
||||
if(GLOB.configuration.url.banappeals_url)
|
||||
to_chat(M, "<span class='warning'>To try to resolve this matter head to [GLOB.configuration.url.banappeals_url]</span>")
|
||||
else
|
||||
to_chat(M, "<span class='warning'>No ban appeals URL has been set.</span>")
|
||||
@@ -3019,21 +3019,16 @@
|
||||
if("togglebombcap")
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Bomb Cap")
|
||||
|
||||
var/newBombCap = input(usr,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be between 4 and 128)", "New Bomb Cap", GLOB.max_ex_light_range) as num|null
|
||||
var/newBombCap = input(usr,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be between 4 and 128)", "New Bomb Cap", GLOB.configuration.general.bomb_cap) as num|null
|
||||
if(newBombCap < 4)
|
||||
return
|
||||
if(newBombCap > 128)
|
||||
newBombCap = 128
|
||||
|
||||
GLOB.max_ex_devastation_range = round(newBombCap/4)
|
||||
GLOB.max_ex_heavy_range = round(newBombCap/2)
|
||||
GLOB.max_ex_light_range = newBombCap
|
||||
//I don't know why these are their own variables, but fuck it, they are.
|
||||
GLOB.max_ex_flash_range = newBombCap
|
||||
GLOB.max_ex_flame_range = newBombCap
|
||||
GLOB.configuration.general.bomb_cap = newBombCap
|
||||
|
||||
message_admins("<span class='boldannounce'>[key_name_admin(usr)] changed the bomb cap to [GLOB.max_ex_devastation_range], [GLOB.max_ex_heavy_range], [GLOB.max_ex_light_range]</span>")
|
||||
log_admin("[key_name(usr)] changed the bomb cap to [GLOB.max_ex_devastation_range], [GLOB.max_ex_heavy_range], [GLOB.max_ex_light_range]")
|
||||
message_admins("<span class='boldannounce'>[key_name_admin(usr)] changed the bomb cap to [GLOB.configuration.general.bomb_cap / 4], [GLOB.configuration.general.bomb_cap / 2], [GLOB.configuration.general.bomb_cap]</span>")
|
||||
log_admin("[key_name(usr)] changed the bomb cap to [GLOB.configuration.general.bomb_cap / 4], [GLOB.configuration.general.bomb_cap / 2], [GLOB.configuration.general.bomb_cap]")
|
||||
|
||||
if("flicklights")
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Flicker Lights")
|
||||
@@ -3310,7 +3305,7 @@
|
||||
var/val = alert(usr, "What do you want to set night shift to? This will override the automatic system until set to automatic again.", "Night Shift", "On", "Off", "Automatic")
|
||||
switch(val)
|
||||
if("Automatic")
|
||||
if(config.enable_night_shifts)
|
||||
if(GLOB.configuration.general.enable_night_shifts)
|
||||
SSnightshift.can_fire = TRUE
|
||||
SSnightshift.fire()
|
||||
else
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
C.adminhelped = 0
|
||||
|
||||
//AdminPM popup for ApocStation and anybody else who wants to use it. Set it with POPUP_ADMIN_PM in config.txt ~Carn
|
||||
if(config.popup_admin_pm)
|
||||
if(GLOB.configuration.general.popup_admin_pm)
|
||||
spawn(0) //so we don't hold the caller proc up
|
||||
var/sender = src
|
||||
var/sendername = key
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
return
|
||||
|
||||
if(istype(O,/obj/singularity))
|
||||
if(config.forbid_singulo_possession)
|
||||
if(GLOB.configuration.general.forbid_singulo_possession) // I love how this needs to exist
|
||||
to_chat(usr, "It is forbidden to possess singularities.")
|
||||
return
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
|
||||
/proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
||||
if(automute)
|
||||
if(!config.automute_on)
|
||||
if(!GLOB.configuration.general.enable_auto_mute)
|
||||
return
|
||||
else
|
||||
if(!usr || !usr.client)
|
||||
@@ -276,24 +276,24 @@
|
||||
return
|
||||
|
||||
var/action=""
|
||||
if(config.antag_hud_allowed)
|
||||
if(GLOB.configuration.general.allow_antag_hud)
|
||||
for(var/mob/dead/observer/g in get_ghosts())
|
||||
if(!g.client.holder) //Remove the verb from non-admin ghosts
|
||||
g.verbs -= /mob/dead/observer/verb/toggle_antagHUD
|
||||
if(g.antagHUD)
|
||||
g.antagHUD = FALSE // Disable it on those that have it enabled
|
||||
g.has_enabled_antagHUD = 2 // We'll allow them to respawn
|
||||
to_chat(g, "<span class='danger'>The Administrator has disabled AntagHUD </span>")
|
||||
config.antag_hud_allowed = 0
|
||||
to_chat(g, "<span class='danger'>The Administrators have disabled AntagHUD </span>")
|
||||
GLOB.configuration.general.allow_antag_hud = FALSE
|
||||
to_chat(src, "<span class='danger'>AntagHUD usage has been disabled</span>")
|
||||
action = "disabled"
|
||||
else
|
||||
for(var/mob/dead/observer/g in get_ghosts())
|
||||
if(!g.client.holder) // Add the verb back for all non-admin ghosts
|
||||
g.verbs += /mob/dead/observer/verb/toggle_antagHUD
|
||||
to_chat(g, "<span class='boldnotice'>The Administrator has enabled AntagHUD </span>")// Notify all observers they can now use AntagHUD
|
||||
to_chat(g, "<span class='boldnotice'>The Administrators have enabled AntagHUD </span>")// Notify all observers they can now use AntagHUD
|
||||
|
||||
config.antag_hud_allowed = 1
|
||||
GLOB.configuration.general.allow_antag_hud = TRUE
|
||||
action = "enabled"
|
||||
to_chat(src, "<span class='boldnotice'>AntagHUD usage has been enabled</span>")
|
||||
|
||||
@@ -310,11 +310,11 @@
|
||||
return
|
||||
|
||||
var/action=""
|
||||
if(config.antag_hud_restricted)
|
||||
if(GLOB.configuration.general.restrict_antag_hud_rejoin)
|
||||
for(var/mob/dead/observer/g in get_ghosts())
|
||||
to_chat(g, "<span class='boldnotice'>The administrator has lifted restrictions on joining the round if you use AntagHUD</span>")
|
||||
action = "lifted restrictions"
|
||||
config.antag_hud_restricted = 0
|
||||
GLOB.configuration.general.restrict_antag_hud_rejoin = FALSE
|
||||
to_chat(src, "<span class='boldnotice'>AntagHUD restrictions have been lifted</span>")
|
||||
else
|
||||
for(var/mob/dead/observer/g in get_ghosts())
|
||||
@@ -323,7 +323,7 @@
|
||||
g.antagHUD = FALSE
|
||||
g.has_enabled_antagHUD = 0
|
||||
action = "placed restrictions"
|
||||
config.antag_hud_restricted = 1
|
||||
GLOB.configuration.general.restrict_antag_hud_rejoin = TRUE
|
||||
to_chat(src, "<span class='danger'>AntagHUD restrictions have been enabled</span>")
|
||||
|
||||
log_admin("[key_name(usr)] has [action] on joining the round if they use AntagHUD")
|
||||
@@ -1029,7 +1029,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(H.client == null || H.stat == DEAD) // No clientless or dead
|
||||
continue
|
||||
mins_afk = round(H.client.inactivity / 600)
|
||||
if(mins_afk < config.list_afk_minimum)
|
||||
if(mins_afk < 5)
|
||||
continue
|
||||
if(H.job)
|
||||
job_string = H.job
|
||||
|
||||
@@ -126,7 +126,8 @@
|
||||
log_href("[src] (usr:[usr]\[[COORD(usr)]\]) : [hsrc ? "[hsrc] " : ""][href]")
|
||||
|
||||
if(href_list["karmashop"])
|
||||
if(config.disable_karma)
|
||||
if(!GLOB.configuration.general.enable_karma)
|
||||
to_chat(src, "Karma is disabled on this server.")
|
||||
return
|
||||
|
||||
switch(href_list["karmashop"])
|
||||
@@ -218,7 +219,7 @@
|
||||
to_chat(src, "<span class='danger'>You are sending messages to quickly. Please wait [wait_time] [wait_time == 1 ? "second" : "seconds"] before sending another message.</span>")
|
||||
return 1
|
||||
last_message_time = world.time
|
||||
if(config.automute_on && !check_rights(R_ADMIN, 0) && last_message == message)
|
||||
if(GLOB.configuration.general.enable_auto_mute && !check_rights(R_ADMIN, 0) && last_message == message)
|
||||
last_message_count++
|
||||
if(last_message_count >= SPAM_TRIGGER_AUTOMUTE)
|
||||
to_chat(src, "<span class='danger'>You have exceeded the spam filter limit for identical messages. An auto-mute was applied.</span>")
|
||||
@@ -259,7 +260,7 @@
|
||||
return null
|
||||
if(byond_version < MIN_CLIENT_VERSION) // Too out of date to play at all. Unfortunately, we can't send them a message here.
|
||||
version_blocked = TRUE
|
||||
if(byond_build < config.minimum_client_build)
|
||||
if(byond_build < GLOB.configuration.general.minimum_client_build)
|
||||
version_blocked = TRUE
|
||||
|
||||
var/show_update_prompt = FALSE
|
||||
@@ -306,10 +307,6 @@
|
||||
spawn() // Goonchat does some non-instant checks in start()
|
||||
chatOutput.start()
|
||||
|
||||
if( (world.address == address || !address) && !GLOB.host )
|
||||
GLOB.host = key
|
||||
world.update_status()
|
||||
|
||||
if(holder)
|
||||
on_holder_add()
|
||||
add_admin_verbs()
|
||||
@@ -383,7 +380,7 @@
|
||||
playercount += 1
|
||||
|
||||
// Update the state of the panic bunker based on current playercount
|
||||
var/threshold = config.panic_bunker_threshold
|
||||
var/threshold = GLOB.configuration.general.panic_bunker_threshold
|
||||
|
||||
if((playercount > threshold) && (GLOB.panic_bunker_enabled == FALSE))
|
||||
GLOB.panic_bunker_enabled = TRUE
|
||||
@@ -465,7 +462,7 @@
|
||||
|
||||
/client/proc/donor_loadout_points()
|
||||
if(donator_level > 0 && prefs)
|
||||
prefs.max_gear_slots = config.max_loadout_points + 5
|
||||
prefs.max_gear_slots = GLOB.configuration.general.base_loadout_points + 5
|
||||
|
||||
/client/proc/log_client_to_db(connectiontopic)
|
||||
set waitfor = FALSE // This needs to run async because any sleep() inside /client/New() breaks stuff badly
|
||||
@@ -567,8 +564,9 @@
|
||||
//New player!! Need to insert all the stuff
|
||||
|
||||
// Check new peeps for panic bunker
|
||||
// AA TODO: Move this to world.IsBanned()
|
||||
if(GLOB.panic_bunker_enabled)
|
||||
var/threshold = config.panic_bunker_threshold
|
||||
var/threshold = GLOB.configuration.general.panic_bunker_threshold
|
||||
src << "Server is not accepting connections from never-before-seen players until player count is less than [threshold]. Please try again later."
|
||||
qdel(src)
|
||||
return // Dont insert or they can just go in again
|
||||
@@ -614,11 +612,11 @@
|
||||
if(ip_intel >= GLOB.configuration.ipintel.bad_rating)
|
||||
var/detailsurl = GLOB.configuration.ipintel.details_url ? "(<a href='[GLOB.configuration.ipintel.details_url][address]'>IP Info</a>)" : ""
|
||||
if(GLOB.configuration.ipintel.whitelist_mode)
|
||||
// TODO: move this check to world.IsBanned()
|
||||
// AA TODO: move this check to world.IsBanned()
|
||||
spawn(40) // This is necessary because without it, they won't see the message, and addtimer cannot be used because the timer system may not have initialized yet
|
||||
message_admins("<span class='adminnotice'>IPIntel: [key_name_admin(src)] on IP [address] was rejected. [detailsurl]</span>")
|
||||
var/blockmsg = "<B>Error: proxy/VPN detected. Proxy/VPN use is not allowed here. Deactivate it before you reconnect.</B>"
|
||||
if(GLOB?.configuration?.url.banappeals_url)
|
||||
if(GLOB.configuration.url.banappeals_url)
|
||||
blockmsg += "\nIf you are not actually using a proxy/VPN, or have no choice but to use one, request whitelisting at: [GLOB.configuration.url.banappeals_url]"
|
||||
to_chat(src, blockmsg)
|
||||
qdel(src)
|
||||
@@ -627,7 +625,7 @@
|
||||
|
||||
|
||||
/client/proc/check_forum_link()
|
||||
if(!GLOB?.configuration?.url.forum_link_url || !prefs || prefs.fuid)
|
||||
if(!GLOB.configuration.url.forum_link_url || !prefs || prefs.fuid)
|
||||
return
|
||||
if(GLOB.configuration.jobs.enable_exp_tracking)
|
||||
var/living_hours = get_exp_type_num(EXP_TYPE_LIVING) / 60
|
||||
@@ -663,7 +661,7 @@
|
||||
return tokenstr
|
||||
|
||||
/client/proc/link_forum_account(fromban)
|
||||
if(!GLOB?.configuration?.url.forum_link_url)
|
||||
if(!GLOB.configuration.url.forum_link_url)
|
||||
return
|
||||
if(IsGuestKey(key))
|
||||
to_chat(src, "Guest keys cannot be linked.")
|
||||
@@ -709,7 +707,7 @@
|
||||
if(connection != "seeker") //Invalid connection type.
|
||||
return null
|
||||
topic = params2list(topic)
|
||||
if(!config.check_randomizer)
|
||||
if(!GLOB.configuration.general.enabled_cid_randomiser_buster)
|
||||
return
|
||||
// Stash o' ckeys
|
||||
var/static/cidcheck = list()
|
||||
@@ -842,7 +840,7 @@
|
||||
//Send resources to the client.
|
||||
/client/proc/send_resources()
|
||||
// Change the way they should download resources.
|
||||
if(GLOB?.configuration?.url.rsc_urls)
|
||||
if(length(GLOB.configuration.url.rsc_urls))
|
||||
preload_rsc = pick(GLOB.configuration.url.rsc_urls)
|
||||
else
|
||||
preload_rsc = 1 // If config.resource_urls is not set, preload like normal.
|
||||
@@ -949,7 +947,7 @@
|
||||
void.UpdateGreed(actualview[1],actualview[2])
|
||||
|
||||
/client/proc/send_ssd_warning(mob/M)
|
||||
if(!config.ssd_warning)
|
||||
if(!GLOB.configuration.general.ssd_warning)
|
||||
return FALSE
|
||||
if(ssd_warning_acknowledged)
|
||||
return FALSE
|
||||
@@ -1102,7 +1100,7 @@
|
||||
qdel(query_age)
|
||||
|
||||
// Notify admins on new clients connecting, if the byond account age is less than a config value
|
||||
if(notify && (byondacc_age < config.byond_account_age_threshold))
|
||||
if(notify && (byondacc_age < GLOB.configuration.general.byond_account_age_threshold))
|
||||
message_admins("[key] has just connected for the first time. BYOND account registered on [byondacc_date] ([byondacc_age] days old)")
|
||||
|
||||
/client/proc/show_update_notice()
|
||||
@@ -1149,7 +1147,7 @@
|
||||
*/
|
||||
/client/proc/cid_count_check()
|
||||
// If the config is 0, disable this
|
||||
if(config.max_client_cid_history == 0)
|
||||
if(GLOB.configuration.general.max_client_cid_history == 0)
|
||||
return
|
||||
|
||||
// If we have no DB, dont even bother
|
||||
@@ -1169,7 +1167,7 @@
|
||||
cidcount = query_cidcheck.item[1]
|
||||
qdel(query_cidcheck)
|
||||
|
||||
if(cidcount > config.max_client_cid_history)
|
||||
if(cidcount > GLOB.configuration.general.max_client_cid_history)
|
||||
// Check their notes for CID tracking in the past
|
||||
var/has_note = FALSE
|
||||
var/note_text = ""
|
||||
|
||||
@@ -212,7 +212,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
|
||||
parent = C
|
||||
b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")
|
||||
|
||||
max_gear_slots = config.max_loadout_points
|
||||
max_gear_slots = GLOB.configuration.general.base_loadout_points
|
||||
var/loaded_preferences_successfully = FALSE
|
||||
if(istype(C))
|
||||
if(!IsGuestKey(C.key))
|
||||
@@ -470,7 +470,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
|
||||
dat += "<b>Ghost PDA:</b> <a href='?_src_=prefs;preference=ghost_pda'><b>[(toggles & PREFTOGGLE_CHAT_GHOSTPDA) ? "All PDA Messages" : "No PDA Messages"]</b></a><br>"
|
||||
if(check_rights(R_ADMIN,0))
|
||||
dat += "<b>OOC Color:</b> <span style='border: 1px solid #161616; background-color: [ooccolor ? ooccolor : GLOB.normal_ooc_colour];'> </span> <a href='?_src_=prefs;preference=ooccolor;task=input'><b>Change</b></a><br>"
|
||||
if(config.allow_Metadata)
|
||||
if(GLOB.configuration.general.allow_character_metadata)
|
||||
dat += "<b>OOC Notes:</b> <a href='?_src_=prefs;preference=metadata;task=input'><b>Edit</b></a><br>"
|
||||
dat += "<b>Parallax (Fancy Space):</b> <a href='?_src_=prefs;preference=parallax'>"
|
||||
switch (parallax)
|
||||
@@ -1099,7 +1099,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
|
||||
ResetJobs()
|
||||
SetChoices(user)
|
||||
if("learnaboutselection")
|
||||
if(GLOB?.configuration?.url.wiki_url)
|
||||
if(GLOB.configuration.url.wiki_url)
|
||||
if(alert("Would you like to open the Job selection info in your browser?", "Open Job Selection", "Yes", "No") == "Yes")
|
||||
user << link("[GLOB.configuration.url.wiki_url]/index.php/Job_Selection_and_Assignment")
|
||||
else
|
||||
|
||||
@@ -115,8 +115,7 @@ GLOBAL_DATUM(error_cache, /datum/ErrorViewer/ErrorCache)
|
||||
|
||||
// Show the error to admins with debug messages turned on, but only if one
|
||||
// from the same source hasn't been shown too recently
|
||||
// (Also, make sure config is initialized, or log_debug will runtime)
|
||||
if(config && error_source.next_message_at <= world.time)
|
||||
if(error_source.next_message_at <= world.time)
|
||||
var/const/viewtext = "\[view]" // Nesting these in other brackets went poorly
|
||||
log_debug("Runtime in [e.file],[e.line]: [html_encode(e.name)] [error_entry.makeLink(viewtext)]")
|
||||
error_source.next_message_at = world.time + ERROR_MSG_DELAY
|
||||
|
||||
@@ -40,11 +40,6 @@
|
||||
|
||||
return clamp((weight + job_weight) * weight_mod, min_weight, max_weight)
|
||||
|
||||
/datum/event_meta/alien/get_weight(list/active_with_role)
|
||||
if(GLOB.aliens_allowed)
|
||||
return ..(active_with_role)
|
||||
return 0
|
||||
|
||||
/*/datum/event_meta/ninja/get_weight(var/list/active_with_role)
|
||||
if(toggle_space_ninja)
|
||||
return ..(active_with_role)
|
||||
|
||||
@@ -293,9 +293,9 @@
|
||||
return 1
|
||||
|
||||
/obj/item/reagent_containers/food/snacks/monkeycube/proc/Expand()
|
||||
if(LAZYLEN(SSmobs.cubemonkeys) >= config.cubemonkeycap)
|
||||
if(LAZYLEN(SSmobs.cubemonkeys) >= GLOB.configuration.general.monkey_cube_cap)
|
||||
if(fingerprintslast)
|
||||
to_chat(get_mob_by_ckey(fingerprintslast), "<span class='warning'>Bluespace harmonics prevent the spawning of more than [config.cubemonkeycap] monkeys on the station at one time!</span>")
|
||||
to_chat(get_mob_by_ckey(fingerprintslast), "<span class='warning'>Bluespace harmonics prevent the spawning of more than [GLOB.configuration.general.monkey_cube_cap] monkeys on the station at one time!</span>")
|
||||
else
|
||||
visible_message("<span class='notice'>[src] fails to expand!</span>")
|
||||
return
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
var/obj/machinery/hydroponics/parent = loc
|
||||
var/make_podman = 0
|
||||
var/ckey_holder = null
|
||||
if(config.revival_pod_plants)
|
||||
if(GLOB.configuration.general.enable_revival_pod_plants)
|
||||
if(ckey)
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(isobserver(M))
|
||||
|
||||
@@ -78,7 +78,7 @@ GLOBAL_LIST_EMPTY(karma_spenders)
|
||||
if(!client)
|
||||
to_chat(src, "<span class='warning'>You can't award karma without being connected.</span>")
|
||||
return FALSE
|
||||
if(config.disable_karma)
|
||||
if(!GLOB.configuration.general.enable_karma)
|
||||
to_chat(src, "<span class='warning'>Karma is disabled.</span>")
|
||||
return FALSE
|
||||
if(!SSticker || !GLOB.player_list.len || (SSticker.current_state == GAME_STATE_PREGAME))
|
||||
@@ -150,7 +150,7 @@ GLOBAL_LIST_EMPTY(karma_spenders)
|
||||
if(!M)
|
||||
to_chat(usr, "Please right click a mob to award karma directly, or use the 'Award Karma' verb to select a player from the player listing.")
|
||||
return
|
||||
if(config.disable_karma) // this is here because someone thought it was a good idea to add an alert box before checking if they can even give a mob karma
|
||||
if(!GLOB.configuration.general.enable_karma) // this is here because someone thought it was a good idea to add an alert box before checking if they can even give a mob karma
|
||||
to_chat(usr, "<span class='warning'>Karma is disabled.</span>")
|
||||
return
|
||||
if(alert("Give [M.name] good karma?", "Karma", "Yes", "No") != "Yes")
|
||||
@@ -171,6 +171,7 @@ GLOBAL_LIST_EMPTY(karma_spenders)
|
||||
special_role = M.mind.special_role
|
||||
if(M.mind.assigned_role)
|
||||
assigned_role = M.mind.assigned_role
|
||||
// AA TODO: Make this use proper RUSTG logging. Why is this a normal file write these are so expensive aaaaaaaaa
|
||||
karma_diary << "[M.name] ([M.key]) [assigned_role]/[special_role]: [M.client.karma] - [time2text(world.timeofday, "hh:mm:ss")] given by [key]"
|
||||
|
||||
sql_report_karma(src, M)
|
||||
@@ -180,7 +181,7 @@ GLOBAL_LIST_EMPTY(karma_spenders)
|
||||
set desc = "Reports how much karma you have accrued."
|
||||
set category = "Special Verbs"
|
||||
|
||||
if(config.disable_karma)
|
||||
if(!GLOB.configuration.general.enable_karma)
|
||||
to_chat(src, "<span class='warning'>Karma is disabled.</span>")
|
||||
return
|
||||
|
||||
@@ -216,7 +217,7 @@ GLOBAL_LIST_EMPTY(karma_spenders)
|
||||
set desc = "Spend your hard-earned karma here"
|
||||
set hidden = TRUE
|
||||
|
||||
if(config.disable_karma)
|
||||
if(!GLOB.configuration.general.enable_karma)
|
||||
to_chat(src, "<span class='warning'>Karma is disabled.</span>")
|
||||
return
|
||||
karmashopmenu()
|
||||
|
||||
@@ -162,7 +162,7 @@ Works together with spawning an observer, noted above.
|
||||
else
|
||||
GLOB.non_respawnable_keys[ckey] = 1
|
||||
ghost.key = key
|
||||
if(!(ghost.client && ghost.client.holder) && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
|
||||
if(!(ghost.client && ghost.client.holder) && !GLOB.configuration.general.allow_antag_hud) // For new ghosts we remove the verb from even showing up if it's not allowed.
|
||||
ghost.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
|
||||
return ghost
|
||||
|
||||
@@ -354,7 +354,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set category = "Ghost"
|
||||
set name = "Toggle AntagHUD"
|
||||
set desc = "Toggles AntagHUD allowing you to see who is the antagonist"
|
||||
if(!config.antag_hud_allowed && !client.holder)
|
||||
if(!GLOB.configuration.general.allow_antag_hud && !client.holder)
|
||||
to_chat(src, "<span class='warning'>Admins have disabled this for this round.</span>")
|
||||
return
|
||||
if(!client)
|
||||
@@ -363,7 +363,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(jobban_isbanned(M, "AntagHUD"))
|
||||
to_chat(src, "<span class='danger'>You have been banned from using this feature</span>")
|
||||
return
|
||||
if(config.antag_hud_restricted && !M.has_enabled_antagHUD && !check_rights(R_ADMIN|R_MOD,0))
|
||||
if(GLOB.configuration.general.restrict_antag_hud_rejoin && !M.has_enabled_antagHUD && !check_rights(R_ADMIN|R_MOD,0))
|
||||
var/response = alert(src, "If you turn this on, you will not be able to take any part in the round.","Are you sure you want to turn this feature on?","Yes","No")
|
||||
if(response == "No") return
|
||||
M.can_reenter_corpse = 0
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
return
|
||||
|
||||
if(!src.client.holder)
|
||||
if(!config.dsay_allowed)
|
||||
if(!GLOB.dsay_enabled)
|
||||
to_chat(src, "<span class='warning'>Deadchat is globally muted</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/mob/living/carbon/brain/Life()
|
||||
. = ..()
|
||||
if(.)
|
||||
if(!container && (world.time - timeofhostdeath) > config.revival_brain_life)
|
||||
if(!container && (world.time - timeofhostdeath) > GLOB.configuration.general.revival_brain_life)
|
||||
death()
|
||||
|
||||
/mob/living/carbon/brain/breathe()
|
||||
|
||||
@@ -1126,8 +1126,6 @@ so that different stomachs can handle things in different ways VB*/
|
||||
|
||||
//to recalculate and update the mob's total tint from tinted equipment it's wearing.
|
||||
/mob/living/carbon/proc/update_tint()
|
||||
if(!GLOB.tinted_weldhelh)
|
||||
return
|
||||
var/tinttotal = get_total_tint()
|
||||
if(tinttotal >= TINT_BLIND)
|
||||
overlay_fullscreen("tint", /obj/screen/fullscreen/blind)
|
||||
|
||||
@@ -520,14 +520,14 @@
|
||||
return
|
||||
|
||||
|
||||
/mob/living/proc/Examine_OOC()
|
||||
/mob/living/verb/Examine_OOC()
|
||||
set name = "Examine Meta-Info (OOC)"
|
||||
set category = "OOC"
|
||||
set src in view()
|
||||
|
||||
if(config.allow_Metadata)
|
||||
if(GLOB.configuration.general.allow_character_metadata)
|
||||
if(client)
|
||||
to_chat(usr, "[src]'s Metainfo:<br>[client.prefs.metadata]")
|
||||
to_chat(usr, "[src]'s Metainfo:<br>[sanitize(client.prefs.metadata)]")
|
||||
else
|
||||
to_chat(usr, "[src] does not have any stored infomation!")
|
||||
else
|
||||
|
||||
@@ -125,11 +125,10 @@
|
||||
laws.sort_laws()
|
||||
|
||||
/mob/living/silicon/proc/make_laws()
|
||||
switch(config.default_laws)
|
||||
if(0)
|
||||
laws = new /datum/ai_laws/crewsimov()
|
||||
else
|
||||
laws = get_random_lawset()
|
||||
if(GLOB.configuration.general.random_ai_lawset)
|
||||
laws = get_random_lawset()
|
||||
else
|
||||
laws = new /datum/ai_laws/crewsimov()
|
||||
|
||||
/mob/living/silicon/proc/get_random_lawset()
|
||||
var/list/law_options[0]
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
#define DRONE_BUILD_TIME 2 MINUTES
|
||||
#define MAX_MAINT_DRONES 5
|
||||
|
||||
/obj/machinery/drone_fabricator
|
||||
name = "drone fabricator"
|
||||
desc = "A large automated factory for producing maintenance drones."
|
||||
@@ -37,14 +40,14 @@
|
||||
|
||||
icon_state = "drone_fab_active"
|
||||
var/elapsed = world.time - time_last_drone
|
||||
drone_progress = round((elapsed / config.drone_build_time) * 100)
|
||||
drone_progress = round((elapsed / DRONE_BUILD_TIME) * 100)
|
||||
|
||||
if(drone_progress >= 100)
|
||||
visible_message("[src] voices a strident beep, indicating a drone chassis is prepared.")
|
||||
|
||||
/obj/machinery/drone_fabricator/examine(mob/user)
|
||||
. = ..()
|
||||
if(produce_drones && drone_progress >= 100 && isobserver(user) && config.allow_drone_spawn && count_drones() < config.max_maint_drones)
|
||||
if(produce_drones && drone_progress >= 100 && isobserver(user) && count_drones() < MAX_MAINT_DRONES)
|
||||
. += "<BR><B>A drone is prepared. Select 'Join As Drone' from the Ghost tab to spawn as a maintenance drone.</B>"
|
||||
|
||||
/obj/machinery/drone_fabricator/proc/count_drones()
|
||||
@@ -58,7 +61,7 @@
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
|
||||
if(!produce_drones || !config.allow_drone_spawn || count_drones() >= config.max_maint_drones)
|
||||
if(!produce_drones || count_drones() >= MAX_MAINT_DRONES)
|
||||
return
|
||||
|
||||
if(!player || !isobserver(player.mob))
|
||||
@@ -80,10 +83,6 @@
|
||||
set name = "Join As Drone"
|
||||
set desc = "If there is a powered, enabled fabricator in the game world with a prepared chassis, join as a maintenance drone."
|
||||
|
||||
if(!(config.allow_drone_spawn))
|
||||
to_chat(src, "<span class='warning'>That verb is not currently permitted.</span>")
|
||||
return
|
||||
|
||||
if(stat != DEAD)
|
||||
return
|
||||
|
||||
@@ -141,7 +140,7 @@
|
||||
if(DF.stat & NOPOWER || !DF.produce_drones)
|
||||
continue
|
||||
|
||||
if(DF.count_drones() >= config.max_maint_drones)
|
||||
if(DF.count_drones() >= MAX_MAINT_DRONES)
|
||||
to_chat(src, "<span class='warning'>There are too many active drones in the world for you to spawn.</span>")
|
||||
return
|
||||
|
||||
@@ -150,3 +149,6 @@
|
||||
return
|
||||
|
||||
to_chat(src, "<span class='warning'>There are no available drone spawn points, sorry.</span>")
|
||||
|
||||
#undef DRONE_BUILD_TIME
|
||||
#undef MAX_MAINT_DRONES
|
||||
|
||||
@@ -139,12 +139,22 @@
|
||||
update_controls()
|
||||
|
||||
/mob/living/simple_animal/bot/New()
|
||||
/*
|
||||
HEY! LISTEN!
|
||||
|
||||
I see you're poking the the bot/New() proc
|
||||
Assuming you are converting this to Initialize() [yay], please see my note in
|
||||
code\game\jobs\job\job.dm | /datum/job/proc/get_access()
|
||||
|
||||
Theres a useless check that bugs me but needs to exist because these things New()
|
||||
-AA07
|
||||
*/
|
||||
..()
|
||||
GLOB.bots_list += src
|
||||
icon_living = icon_state
|
||||
icon_dead = icon_state
|
||||
access_card = new /obj/item/card/id(src)
|
||||
//This access is so bots can be immediately set to patrol and leave Robotics, instead of having to be let out first.
|
||||
//This access is so bots can be immediately set to patrol and leave Robotics, instead of having to be let out first.
|
||||
access_card.access += ACCESS_ROBOTICS
|
||||
set_custom_texts()
|
||||
Radio = new/obj/item/radio/headset/bot(src)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
if( (M.computer_id == client.computer_id) )
|
||||
if(matches) matches += " and "
|
||||
matches += "ID ([client.computer_id])"
|
||||
if(!config.disable_cid_warn_popup)
|
||||
if(!GLOB.configuration.general.disable_cid_warning_popup)
|
||||
spawn() alert("You have logged in already with another key this round, please log out of this one NOW or risk being banned!")
|
||||
if(matches)
|
||||
if(M.client)
|
||||
|
||||
@@ -749,7 +749,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
set name = "Respawn"
|
||||
set category = "OOC"
|
||||
|
||||
if(!GLOB.abandon_allowed)
|
||||
if(!GLOB.configuration.general.respawn_enabled)
|
||||
to_chat(usr, "<span class='warning'>Respawning is disabled.</span>")
|
||||
return
|
||||
|
||||
@@ -1003,7 +1003,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
|
||||
// this function displays the station time in the status panel
|
||||
/mob/proc/show_stat_station_time()
|
||||
stat(null, "Round Time: [worldtime2text()]")
|
||||
stat(null, "Round Time: [worldtime2text()]") // AA TODO: Make this do "Game Time" and "Round Time" with the ROUND_TIME macro
|
||||
stat(null, "Station Time: [station_time_timestamp()]")
|
||||
|
||||
// this function displays the shuttles ETA in the status panel if the shuttle has been called
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
/proc/cannotPossess(A)
|
||||
var/mob/dead/observer/G = A
|
||||
if(G.has_enabled_antagHUD == 1 && config.antag_hud_restricted)
|
||||
if(G.has_enabled_antagHUD == 1 && GLOB.configuration.general.restrict_antag_hud_rejoin)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
client.prefs.real_name = random_name(client.prefs.gender,client.prefs.species)
|
||||
observer.real_name = client.prefs.real_name
|
||||
observer.name = observer.real_name
|
||||
if(!client.holder && !config.antag_hud_allowed) // For new ghosts we remove the verb from even showing up if it's not allowed.
|
||||
if(!client.holder && !GLOB.configuration.general.allow_antag_hud) // For new ghosts we remove the verb from even showing up if it's not allowed.
|
||||
observer.verbs -= /mob/dead/observer/verb/toggle_antagHUD // Poor guys, don't know what they are missing!
|
||||
observer.key = key
|
||||
QDEL_NULL(mind)
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
/mob/proc/say_dead(message)
|
||||
if(client)
|
||||
if(!client.holder)
|
||||
if(!config.dsay_allowed)
|
||||
if(!GLOB.dsay_enabled)
|
||||
to_chat(src, "<span class='danger'>Deadchat is globally muted.</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
dat+= "<hr><div style='float:left;'><a href='?src=[UID()];prev_page=1'>Previous Page</a></div>"
|
||||
else
|
||||
// No trailing punctuation so that it's easy to copy and paste the address
|
||||
if(GLOB?.configuration?.url.github_url)
|
||||
if(GLOB.configuration.url.github_url)
|
||||
dat += "We're sorry to break your immersion, but there has been an error with the newscaster. Please report this error, along with any more information you have, to [GLOB.configuration.url.github_url]/issues/new?template=bug_report.md"
|
||||
else
|
||||
dat += "We're sorry to break your immersion, but there has been an error with the newscaster. Unfortunately there is no GitHub URL set in the config. This is really bad."
|
||||
|
||||
@@ -233,8 +233,8 @@
|
||||
var/obj/machinery/computer/camera_advanced/xenobio/X = target
|
||||
|
||||
if(GLOB.cameranet.checkTurfVis(remote_eye.loc))
|
||||
if(LAZYLEN(SSmobs.cubemonkeys) >= config.cubemonkeycap)
|
||||
to_chat(owner, "<span class='warning'>Bluespace harmonics prevent the spawning of more than [config.cubemonkeycap] monkeys on the station at one time!</span>")
|
||||
if(LAZYLEN(SSmobs.cubemonkeys) >= GLOB.configuration.general.monkey_cube_cap)
|
||||
to_chat(owner, "<span class='warning'>Bluespace harmonics prevent the spawning of more than [GLOB.configuration.general.monkey_cube_cap] monkeys on the station at one time!</span>")
|
||||
return
|
||||
else if(X.monkeys >= 1)
|
||||
var/mob/living/carbon/human/monkey/food = new /mob/living/carbon/human/monkey(remote_eye.loc)
|
||||
|
||||
@@ -400,7 +400,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
//Updates brute_damn and burn_damn from wound damages. Updates BLEEDING status.
|
||||
/obj/item/organ/external/proc/check_fracture(damage_inflicted)
|
||||
if(config.bones_can_break && brute_dam > min_broken_damage && !is_robotic())
|
||||
if(GLOB.configuration.general.breakable_bones && brute_dam > min_broken_damage && !is_robotic())
|
||||
if(prob(damage_inflicted))
|
||||
fracture()
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/list/admins = list()
|
||||
status_info["version"] = GLOB.revision_info.commit_hash
|
||||
status_info["mode"] = GLOB.master_mode
|
||||
status_info["respawn"] = GLOB.abandon_allowed
|
||||
status_info["respawn"] = GLOB.configuration.general.respawn_enabled
|
||||
status_info["enter"] = GLOB.enter_allowed
|
||||
status_info["vote"] = GLOB.configuration.vote.allow_mode_votes
|
||||
status_info["ai"] = GLOB.configuration.jobs.allow_ai
|
||||
|
||||
@@ -368,8 +368,8 @@ monkey_cube_cap = 32
|
||||
reactionary_explosions = true
|
||||
# Bomb cap for explosions (Outer devastation. Other values calculate from this)
|
||||
bomb_cap = 20
|
||||
# Amount of time (in hundreths of a second [why]) for a brain to keep its "spark of life". Set to -1 to disable.
|
||||
revival_brain_life = 60000 # 10 minutes
|
||||
# Amount of time (deciseconds) for a brain to keep its "spark of life". Set to -1 to disable.
|
||||
revival_brain_life = 6000 # 10 minutes
|
||||
# Enable random silicon lawset (If said lawset has default = TRUE in the code). Disable for always crewsimov
|
||||
random_ai_lawset = true
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set name = "wiki"
|
||||
set desc = "Type what you want to know about. This will open the wiki in your web browser."
|
||||
set hidden = 1
|
||||
if(GLOB?.configuration?.url.wiki_url)
|
||||
if(GLOB.configuration.url.wiki_url)
|
||||
var/query = stripped_input(src, "Enter Search:", "Wiki Search", "Homepage")
|
||||
if(query == "Homepage")
|
||||
src << link(GLOB.configuration.url.wiki_url)
|
||||
@@ -18,9 +18,9 @@
|
||||
set name = "forum"
|
||||
set desc = "Visit the forum."
|
||||
set hidden = 1
|
||||
if(GLOB?.configuration?.url.forum_url)
|
||||
if(GLOB.configuration.url.forum_url)
|
||||
if(alert("Open the forum in your browser?", null, "Yes", "No") == "Yes")
|
||||
if(GLOB?.configuration?.url.forum_link_url && prefs && !prefs.fuid)
|
||||
if(GLOB.configuration.url.forum_link_url && prefs && !prefs.fuid)
|
||||
link_forum_account()
|
||||
src << link(GLOB.configuration.url.forum_url)
|
||||
else
|
||||
@@ -30,7 +30,7 @@
|
||||
set name = "Rules"
|
||||
set desc = "View the server rules."
|
||||
set hidden = 1
|
||||
if(GLOB?.configuration?.url.rules_url)
|
||||
if(GLOB.configuration.url.rules_url)
|
||||
if(alert("This will open the rules in your browser. Are you sure?", null, "Yes", "No") == "No")
|
||||
return
|
||||
src << link(GLOB.configuration.url.rules_url)
|
||||
@@ -41,7 +41,7 @@
|
||||
set name = "GitHub"
|
||||
set desc = "Visit the GitHub page."
|
||||
set hidden = 1
|
||||
if(GLOB?.configuration?.url.github_url)
|
||||
if(GLOB.configuration.url.github_url)
|
||||
if(alert("This will open our GitHub repository in your browser. Are you sure?", null, "Yes", "No") == "No")
|
||||
return
|
||||
src << link(GLOB.configuration.url.github_url)
|
||||
@@ -55,11 +55,11 @@
|
||||
|
||||
var/durl
|
||||
// Use normal URL
|
||||
if(GLOB?.configuration?.url.discord_url)
|
||||
if(GLOB.configuration.url.discord_url)
|
||||
durl = GLOB.configuration.url.discord_url
|
||||
|
||||
// Use forums URL if set
|
||||
if(GLOB?.configuration?.url.forum_link_url && GLOB?.configuration?.url.discord_forum_url && prefs?.fuid)
|
||||
if(GLOB.configuration.url.forum_link_url && GLOB.configuration?.url.discord_forum_url && prefs?.fuid)
|
||||
durl = GLOB.configuration.url.discord_forum_url
|
||||
|
||||
if(!durl)
|
||||
@@ -73,7 +73,7 @@
|
||||
set name = "Donate"
|
||||
set desc = "Donate to help with hosting costs."
|
||||
set hidden = 1
|
||||
if(GLOB?.configuration?.url.donations_url)
|
||||
if(GLOB.configuration.url.donations_url)
|
||||
if(alert("This will open the donation page in your browser. Are you sure?", null, "Yes", "No") == "No")
|
||||
return
|
||||
src << link(GLOB.configuration.url.donations_url)
|
||||
|
||||
+1
-1
@@ -176,7 +176,6 @@
|
||||
#include "code\_onclick\hud\screen_objects.dm"
|
||||
#include "code\_onclick\hud\slime.dm"
|
||||
#include "code\_onclick\hud\swarmer.dm"
|
||||
#include "code\controllers\configuration.dm"
|
||||
#include "code\controllers\controller.dm"
|
||||
#include "code\controllers\failsafe.dm"
|
||||
#include "code\controllers\globals.dm"
|
||||
@@ -193,6 +192,7 @@
|
||||
#include "code\controllers\configuration\sections\event_configuration.dm"
|
||||
#include "code\controllers\configuration\sections\gamemode_configuration.dm"
|
||||
#include "code\controllers\configuration\sections\gateway_configuration.dm"
|
||||
#include "code\controllers\configuration\sections\general_configuration.dm"
|
||||
#include "code\controllers\configuration\sections\ipintel_configuration.dm"
|
||||
#include "code\controllers\configuration\sections\job_configuration.dm"
|
||||
#include "code\controllers\configuration\sections\logging_configuration.dm"
|
||||
|
||||
Reference in New Issue
Block a user