mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-21 19:19:12 +01:00
Ports over configuration controller (#16484)
* Ports over configuration controller * Fixes * Manual path fix * patch (#16490) * patch * . * SQL Fix * Post-rebase fix * Added missing examples --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -5,21 +5,21 @@
|
||||
return ..()
|
||||
|
||||
//Guest Checking
|
||||
if(!config.guests_allowed && IsGuestKey(key))
|
||||
if(!CONFIG_GET(flag/guests_allowed) && IsGuestKey(key))
|
||||
log_adminwarn("Failed Login: [key] - Guests not allowed")
|
||||
message_admins(span_blue("Failed Login: [key] - Guests not allowed"))
|
||||
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
|
||||
|
||||
//check if the IP address is a known TOR node
|
||||
if(config && config.ToRban && ToRban_isbanned(address))
|
||||
if(config && CONFIG_GET(flag/ToRban) && ToRban_isbanned(address))
|
||||
log_adminwarn("Failed Login: [src] - Banned: ToR")
|
||||
message_admins(span_blue("Failed Login: [src] - Banned: ToR"))
|
||||
//ban their computer_id and ckey for posterity
|
||||
AddBan(ckey(key), computer_id, "Use of ToR", "Automated Ban", 0, 0)
|
||||
return list("reason"="Using ToR", "desc"="\nReason: The network you are using to connect has been banned.\nIf you believe this is a mistake, please request help at [config.banappeals]")
|
||||
return list("reason"="Using ToR", "desc"="\nReason: The network you are using to connect has been banned.\nIf you believe this is a mistake, please request help at [CONFIG_GET(string/banappeals)]")
|
||||
|
||||
|
||||
if(config.ban_legacy_system)
|
||||
if(CONFIG_GET(flag/ban_legacy_system))
|
||||
|
||||
//Ban Checking
|
||||
. = CheckBan( ckey(key), computer_id, address )
|
||||
|
||||
@@ -10,8 +10,8 @@ var/savefile/Banlist
|
||||
|
||||
. = list()
|
||||
var/appeal
|
||||
if(config && config.banappeals)
|
||||
appeal = "\nFor more information on your ban, or to appeal, head to <a href='[config.banappeals]'>[config.banappeals]</a>"
|
||||
if(config && CONFIG_GET(string/banappeals))
|
||||
appeal = "\nFor more information on your ban, or to appeal, head to <a href='[CONFIG_GET(string/banappeals)]'>[CONFIG_GET(string/banappeals)]</a>"
|
||||
Banlist.cd = "/base"
|
||||
if( "[ckey][id]" in Banlist.dir )
|
||||
Banlist.cd = "[ckey][id]"
|
||||
|
||||
@@ -52,11 +52,11 @@
|
||||
ToRban_update()
|
||||
if("toggle")
|
||||
if(config)
|
||||
if(config.ToRban)
|
||||
config.ToRban = 0
|
||||
if(CONFIG_GET(flag/ToRban))
|
||||
CONFIG_SET(flag/ToRban, FALSE)
|
||||
message_admins(span_red("ToR banning disabled."))
|
||||
else
|
||||
config.ToRban = 1
|
||||
CONFIG_SET(flag/ToRban, TRUE)
|
||||
message_admins(span_green("ToR banning enabled."))
|
||||
if("show")
|
||||
var/savefile/F = new(TORFILE)
|
||||
|
||||
+45
-45
@@ -757,8 +757,8 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.ooc_allowed = !(config.ooc_allowed)
|
||||
if (config.ooc_allowed)
|
||||
CONFIG_SET(flag/ooc_allowed, !CONFIG_GET(flag/ooc_allowed))
|
||||
if (CONFIG_GET(flag/ooc_allowed))
|
||||
to_world(span_world("The OOC channel has been globally enabled!"))
|
||||
else
|
||||
to_world(span_world("The OOC channel has been globally disabled!"))
|
||||
@@ -773,8 +773,8 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.looc_allowed = !(config.looc_allowed)
|
||||
if (config.looc_allowed)
|
||||
CONFIG_SET(flag/looc_allowed, !CONFIG_GET(flag/looc_allowed))
|
||||
if (CONFIG_GET(flag/looc_allowed))
|
||||
to_world(span_world("The LOOC channel has been globally enabled!"))
|
||||
else
|
||||
to_world(span_world("The LOOC channel has been globally disabled!"))
|
||||
@@ -790,8 +790,8 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.dsay_allowed = !(config.dsay_allowed)
|
||||
if (config.dsay_allowed)
|
||||
CONFIG_SET(flag/dsay_allowed, !CONFIG_GET(flag/dsay_allowed))
|
||||
if (CONFIG_GET(flag/dsay_allowed))
|
||||
to_world(span_world("Deadchat has been globally enabled!"))
|
||||
else
|
||||
to_world(span_world("Deadchat has been globally disabled!"))
|
||||
@@ -807,7 +807,7 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.dooc_allowed = !( config.dooc_allowed )
|
||||
CONFIG_SET(flag/dooc_allowed, !CONFIG_GET(flag/dooc_allowed))
|
||||
log_admin("[key_name(usr)] toggled Dead OOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled Dead OOC.", 1)
|
||||
feedback_add_details("admin_verb","TDOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
@@ -829,9 +829,9 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set category = "Server"
|
||||
set desc="Toggle traitor scaling"
|
||||
set name="Toggle Traitor Scaling"
|
||||
config.traitor_scaling = !config.traitor_scaling
|
||||
log_admin("[key_name(usr)] toggled Traitor Scaling to [config.traitor_scaling].")
|
||||
message_admins("[key_name_admin(usr)] toggled Traitor Scaling [config.traitor_scaling ? "on" : "off"].", 1)
|
||||
CONFIG_SET(flag/traitor_scaling, !CONFIG_GET(flag/traitor_scaling))
|
||||
log_admin("[key_name(usr)] toggled Traitor Scaling to [CONFIG_GET(flag/traitor_scaling)].")
|
||||
message_admins("[key_name_admin(usr)] toggled Traitor Scaling [CONFIG_GET(flag/traitor_scaling) ? "on" : "off"].", 1)
|
||||
feedback_add_details("admin_verb","TTS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/startnow()
|
||||
@@ -861,8 +861,8 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set category = "Server"
|
||||
set desc="People can't enter"
|
||||
set name="Toggle Entering"
|
||||
config.enter_allowed = !(config.enter_allowed)
|
||||
if (!(config.enter_allowed))
|
||||
CONFIG_SET(flag/enter_allowed, !CONFIG_GET(flag/enter_allowed))
|
||||
if (!CONFIG_GET(flag/enter_allowed))
|
||||
to_world(span_world("New players may no longer enter the game."))
|
||||
else
|
||||
to_world(span_world("New players may now enter the game."))
|
||||
@@ -875,8 +875,8 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set category = "Server"
|
||||
set desc="People can't be AI"
|
||||
set name="Toggle AI"
|
||||
config.allow_ai = !( config.allow_ai )
|
||||
if (!( config.allow_ai ))
|
||||
CONFIG_SET(flag/allow_ai, !CONFIG_GET(flag/allow_ai))
|
||||
if (!CONFIG_GET(flag/allow_ai))
|
||||
to_world(span_world("The AI job is no longer chooseable."))
|
||||
else
|
||||
to_world(span_world("The AI job is chooseable now."))
|
||||
@@ -888,13 +888,13 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set category = "Server"
|
||||
set desc="Respawn basically"
|
||||
set name="Toggle Respawn"
|
||||
config.abandon_allowed = !(config.abandon_allowed)
|
||||
if(config.abandon_allowed)
|
||||
CONFIG_SET(flag/abandon_allowed, !CONFIG_GET(flag/abandon_allowed))
|
||||
if(CONFIG_GET(flag/abandon_allowed))
|
||||
to_world(span_world("You may now respawn."))
|
||||
else
|
||||
to_world(span_world("You may no longer respawn :("))
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled respawn to [config.abandon_allowed ? "On" : "Off"]."), 1)
|
||||
log_admin("[key_name(usr)] toggled respawn to [config.abandon_allowed ? "On" : "Off"].")
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled respawn to [CONFIG_GET(flag/abandon_allowed) ? "On" : "Off"]."), 1)
|
||||
log_admin("[key_name(usr)] toggled respawn to [CONFIG_GET(flag/abandon_allowed) ? "On" : "Off"].")
|
||||
world.update_status()
|
||||
feedback_add_details("admin_verb","TR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -902,13 +902,13 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set category = "Server"
|
||||
set desc="Whether persistent data will be saved from now on."
|
||||
set name="Toggle Persistent Data"
|
||||
config.persistence_disabled = !(config.persistence_disabled)
|
||||
if(!config.persistence_disabled)
|
||||
CONFIG_SET(flag/persistence_disabled, !CONFIG_GET(flag/persistence_disabled))
|
||||
if(!CONFIG_GET(flag/persistence_disabled))
|
||||
to_world(span_world("Persistence is now enabled."))
|
||||
else
|
||||
to_world(span_world("Persistence is no longer enabled."))
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled persistence to [config.persistence_disabled ? "Off" : "On"]."), 1)
|
||||
log_admin("[key_name(usr)] toggled persistence to [config.persistence_disabled ? "Off" : "On"].")
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled persistence to [CONFIG_GET(flag/persistence_disabled) ? "Off" : "On"]."), 1)
|
||||
log_admin("[key_name(usr)] toggled persistence to [CONFIG_GET(flag/persistence_disabled) ? "Off" : "On"].")
|
||||
world.update_status()
|
||||
feedback_add_details("admin_verb","TPD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -916,13 +916,13 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set category = "Server"
|
||||
set desc="Whether mapload persistent data will be saved from now on."
|
||||
set name="Toggle Mapload Persistent Data"
|
||||
config.persistence_ignore_mapload = !(config.persistence_ignore_mapload)
|
||||
if(!config.persistence_ignore_mapload)
|
||||
CONFIG_SET(flag/persistence_ignore_mapload, !CONFIG_GET(flag/persistence_ignore_mapload))
|
||||
if(!CONFIG_GET(flag/persistence_ignore_mapload))
|
||||
to_world(span_world("Persistence is now enabled."))
|
||||
else
|
||||
to_world(span_world("Persistence is no longer enabled."))
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled persistence to [config.persistence_ignore_mapload ? "Off" : "On"]."), 1)
|
||||
log_admin("[key_name(usr)] toggled persistence to [config.persistence_ignore_mapload ? "Off" : "On"].")
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled persistence to [CONFIG_GET(flag/persistence_ignore_mapload) ? "Off" : "On"]."), 1)
|
||||
log_admin("[key_name(usr)] toggled persistence to [CONFIG_GET(flag/persistence_ignore_mapload) ? "Off" : "On"].")
|
||||
world.update_status()
|
||||
feedback_add_details("admin_verb","TMPD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -930,18 +930,18 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set category = "Server"
|
||||
set desc="Toggle alien mobs"
|
||||
set name="Toggle Aliens"
|
||||
config.aliens_allowed = !config.aliens_allowed
|
||||
log_admin("[key_name(usr)] toggled Aliens to [config.aliens_allowed].")
|
||||
message_admins("[key_name_admin(usr)] toggled Aliens [config.aliens_allowed ? "on" : "off"].", 1)
|
||||
CONFIG_SET(flag/aliens_allowed, !CONFIG_GET(flag/aliens_allowed))
|
||||
log_admin("[key_name(usr)] toggled Aliens to [CONFIG_GET(flag/aliens_allowed)].")
|
||||
message_admins("[key_name_admin(usr)] toggled Aliens [CONFIG_GET(flag/aliens_allowed) ? "on" : "off"].", 1)
|
||||
feedback_add_details("admin_verb","TA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/toggle_space_ninja()
|
||||
set category = "Server"
|
||||
set desc="Toggle space ninjas spawning."
|
||||
set name="Toggle Space Ninjas"
|
||||
config.ninjas_allowed = !config.ninjas_allowed
|
||||
log_admin("[key_name(usr)] toggled Space Ninjas to [config.ninjas_allowed].")
|
||||
message_admins("[key_name_admin(usr)] toggled Space Ninjas [config.ninjas_allowed ? "on" : "off"].", 1)
|
||||
CONFIG_SET(flag/ninjas_allowed, !CONFIG_GET(flag/ninjas_allowed))
|
||||
log_admin("[key_name(usr)] toggled Space Ninjas to [CONFIG_GET(flag/ninjas_allowed)].")
|
||||
message_admins("[key_name_admin(usr)] toggled Space Ninjas [CONFIG_GET(flag/ninjas_allowed) ? "on" : "off"].", 1)
|
||||
feedback_add_details("admin_verb","TSN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/delay()
|
||||
@@ -968,24 +968,24 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set category = "Server"
|
||||
set desc="Toggle admin jumping"
|
||||
set name="Toggle Jump"
|
||||
config.allow_admin_jump = !(config.allow_admin_jump)
|
||||
message_admins(span_blue("Toggled admin jumping to [config.allow_admin_jump]."))
|
||||
CONFIG_SET(flag/allow_admin_jump, !CONFIG_GET(flag/allow_admin_jump))
|
||||
message_admins(span_blue("Toggled admin jumping to [CONFIG_GET(flag/allow_admin_jump)]."))
|
||||
feedback_add_details("admin_verb","TJ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/adspawn()
|
||||
set category = "Server"
|
||||
set desc="Toggle admin spawning"
|
||||
set name="Toggle Spawn"
|
||||
config.allow_admin_spawning = !(config.allow_admin_spawning)
|
||||
message_admins(span_blue("Toggled admin item spawning to [config.allow_admin_spawning]."))
|
||||
CONFIG_SET(flag/allow_admin_spawning, !CONFIG_GET(flag/allow_admin_spawning))
|
||||
message_admins(span_blue("Toggled admin item spawning to [CONFIG_GET(flag/allow_admin_spawning)]."))
|
||||
feedback_add_details("admin_verb","TAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/adrev()
|
||||
set category = "Server"
|
||||
set desc="Toggle admin revives"
|
||||
set name="Toggle Revive"
|
||||
config.allow_admin_rev = !(config.allow_admin_rev)
|
||||
message_admins(span_blue("Toggled reviving to [config.allow_admin_rev]."))
|
||||
CONFIG_SET(flag/allow_admin_rev, !CONFIG_GET(flag/allow_admin_rev))
|
||||
message_admins(span_blue("Toggled reviving to [CONFIG_GET(flag/allow_admin_rev)]."))
|
||||
feedback_add_details("admin_verb","TAR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/immreboot()
|
||||
@@ -1010,7 +1010,7 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set category = "Admin"
|
||||
set name = "Unprison"
|
||||
if (M.z == 2)
|
||||
if (config.allow_admin_jump)
|
||||
if (CONFIG_GET(flag/allow_admin_jump))
|
||||
M.loc = pick(latejoin)
|
||||
message_admins("[key_name_admin(usr)] has unprisoned [key_name_admin(M)]", 1)
|
||||
log_admin("[key_name(usr)] has unprisoned [key_name(M)]")
|
||||
@@ -1242,8 +1242,8 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set category = "Debug"
|
||||
set desc="Reduces view range when wearing welding helmets"
|
||||
set name="Toggle tinted welding helmets."
|
||||
config.welder_vision = !( config.welder_vision )
|
||||
if (config.welder_vision)
|
||||
CONFIG_SET(flag/welder_vision, !CONFIG_GET(flag/welder_vision))
|
||||
if (CONFIG_GET(flag/welder_vision))
|
||||
to_world(span_world("Reduced welder vision has been enabled!"))
|
||||
else
|
||||
to_world(span_world("Reduced welder vision has been disabled!"))
|
||||
@@ -1255,13 +1255,13 @@ var/datum/announcement/minor/admin_min_announcer = new
|
||||
set category = "Server"
|
||||
set desc="Guests can't enter"
|
||||
set name="Toggle guests"
|
||||
config.guests_allowed = !(config.guests_allowed)
|
||||
if (!(config.guests_allowed))
|
||||
CONFIG_SET(flag/guests_allowed, !CONFIG_GET(flag/guests_allowed))
|
||||
if (!CONFIG_GET(flag/guests_allowed))
|
||||
to_world(span_world("Guests may no longer enter the game."))
|
||||
else
|
||||
to_world(span_world("Guests may now enter the game."))
|
||||
log_admin("[key_name(usr)] toggled guests game entering [config.guests_allowed?"":"dis"]allowed.")
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled guests game entering [config.guests_allowed?"":"dis"]allowed."), 1)
|
||||
log_admin("[key_name(usr)] toggled guests game entering [CONFIG_GET(flag/guests_allowed)?"":"dis"]allowed.")
|
||||
message_admins(span_blue("[key_name_admin(usr)] toggled guests game entering [CONFIG_GET(flag/guests_allowed)?"":"dis"]allowed."), 1)
|
||||
feedback_add_details("admin_verb","TGU") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/output_ai_laws()
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
src << browse(F,"window=investigate[subject];size=800x300")
|
||||
|
||||
if("hrefs") //persistant logs and stuff
|
||||
if(config && config.log_hrefs)
|
||||
if(config && CONFIG_GET(flag/log_hrefs))
|
||||
if(href_logfile)
|
||||
src << browse(href_logfile,"window=investigate[subject];size=800x300")
|
||||
else
|
||||
|
||||
@@ -69,7 +69,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
C.holder = null
|
||||
GLOB.admins.Cut()
|
||||
|
||||
if(config.admin_legacy_system)
|
||||
if(CONFIG_GET(flag/admin_legacy_system))
|
||||
load_admin_ranks()
|
||||
|
||||
//load text from file
|
||||
@@ -109,7 +109,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
if(!dbcon.IsConnected())
|
||||
error("Failed to connect to database in load_admins(). Reverting to legacy system.")
|
||||
log_misc("Failed to connect to database in load_admins(). Reverting to legacy system.")
|
||||
config.admin_legacy_system = 1
|
||||
CONFIG_SET(flag/admin_legacy_system, TRUE)
|
||||
load_admins()
|
||||
return
|
||||
|
||||
@@ -129,7 +129,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
if(!admin_datums)
|
||||
error("The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system.")
|
||||
log_misc("The database query in load_admins() resulted in no admins being added to the list. Reverting to legacy system.")
|
||||
config.admin_legacy_system = 1
|
||||
CONFIG_SET(flag/admin_legacy_system, TRUE)
|
||||
load_admins()
|
||||
return
|
||||
|
||||
|
||||
@@ -577,7 +577,7 @@ var/list/admin_verbs_event_manager = list(
|
||||
if(holder.rights & R_SERVER) add_verb(src, admin_verbs_server)
|
||||
if(holder.rights & R_DEBUG)
|
||||
add_verb(src, admin_verbs_debug)
|
||||
if(config.debugparanoid && !(holder.rights & R_ADMIN))
|
||||
if(CONFIG_GET(flag/debugparanoid) && !(holder.rights & R_ADMIN))
|
||||
remove_verb(src, admin_verbs_paranoid_debug) //Right now it's just callproc but we can easily add others later on.
|
||||
if(holder.rights & R_POSSESS) add_verb(src, admin_verbs_possess)
|
||||
if(holder.rights & R_PERMISSIONS) add_verb(src, admin_verbs_permissions)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
set name = "Display Job bans"
|
||||
set category = "Admin"
|
||||
if(holder)
|
||||
if(config.ban_legacy_system)
|
||||
if(CONFIG_GET(flag/ban_legacy_system))
|
||||
holder.Jobbans()
|
||||
else
|
||||
holder.DB_ban_panel()
|
||||
@@ -136,7 +136,7 @@
|
||||
set name = "Unban Panel"
|
||||
set category = "Admin"
|
||||
if(holder)
|
||||
if(config.ban_legacy_system)
|
||||
if(CONFIG_GET(flag/ban_legacy_system))
|
||||
holder.unbanpanel()
|
||||
else
|
||||
holder.DB_ban_panel()
|
||||
@@ -409,8 +409,8 @@
|
||||
set category = "Server"
|
||||
if(!holder) return
|
||||
if(config)
|
||||
config.log_hrefs = !config.log_hrefs
|
||||
message_admins(span_bold("[key_name_admin(usr)] [config.log_hrefs ? "started" : "stopped"] logging hrefs"))
|
||||
CONFIG_SET(flag/log_hrefs, !CONFIG_GET(flag/log_hrefs))
|
||||
message_admins(span_bold("[key_name_admin(usr)] [CONFIG_GET(flag/log_hrefs) ? "started" : "stopped"] logging hrefs"))
|
||||
|
||||
/client/proc/check_ai_laws()
|
||||
set name = "Check AI Laws"
|
||||
@@ -511,16 +511,16 @@
|
||||
set category = "Server"
|
||||
if(!holder) return
|
||||
if(config)
|
||||
config.cult_ghostwriter = !config.cult_ghostwriter
|
||||
message_admins("Admin [key_name_admin(usr)] has [config.cult_ghostwriter ? "en" : "dis"]abled ghost writers.", 1)
|
||||
CONFIG_SET(flag/cult_ghostwriter, !CONFIG_GET(flag/cult_ghostwriter))
|
||||
message_admins("Admin [key_name_admin(usr)] has [CONFIG_GET(flag/cult_ghostwriter) ? "en" : "dis"]abled ghost writers.", 1)
|
||||
|
||||
/client/proc/toggledrones()
|
||||
set name = "Toggle maintenance drones"
|
||||
set category = "Server"
|
||||
if(!holder) return
|
||||
if(config)
|
||||
config.allow_drone_spawn = !config.allow_drone_spawn
|
||||
message_admins("Admin [key_name_admin(usr)] has [config.allow_drone_spawn ? "en" : "dis"]abled maintenance drones.", 1)
|
||||
CONFIG_SET(flag/allow_drone_spawn, !CONFIG_GET(flag/allow_drone_spawn))
|
||||
message_admins("Admin [key_name_admin(usr)] has [CONFIG_GET(flag/allow_drone_spawn) ? "en" : "dis"]abled maintenance drones.", 1)
|
||||
|
||||
/client/proc/man_up(mob/T as mob in mob_list)
|
||||
set category = "Fun"
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
|
||||
var/dat = "<HEAD><TITLE>Book Inventory Management</TITLE></HEAD><BODY>\n"
|
||||
dat += "<h3>ADMINISTRATIVE MANAGEMENT</h3>"
|
||||
establish_old_db_connection()
|
||||
establish_db_connection()
|
||||
|
||||
if(!dbcon_old.IsConnected())
|
||||
dat += "<font color=red><b>ERROR</b>: Unable to contact External Archive. Please contact your system administrator for assistance.</font>"
|
||||
@@ -132,8 +132,8 @@
|
||||
var/which = tgui_alert(usr, "Which do you want to toggle?", "Choose Recolour Toggle", list("Robot", "Simple Mob"))
|
||||
switch(which)
|
||||
if("Robot")
|
||||
config.allow_robot_recolor = !config.allow_robot_recolor
|
||||
to_chat(usr, "You have [config.allow_robot_recolor ? "enabled" : "disabled"] newly spawned cyborgs to spawn with the recolour verb")
|
||||
CONFIG_SET(flag/allow_robot_recolor, !CONFIG_GET(flag/allow_robot_recolor))
|
||||
to_chat(usr, "You have [CONFIG_GET(flag/allow_robot_recolor) ? "enabled" : "disabled"] newly spawned cyborgs to spawn with the recolour verb")
|
||||
if("Simple Mob")
|
||||
config.allow_simple_mob_recolor = !config.allow_simple_mob_recolor
|
||||
to_chat(usr, "You have [config.allow_simple_mob_recolor ? "enabled" : "disabled"] newly spawned simple mobs to spawn with the recolour verb")
|
||||
CONFIG_SET(flag/allow_simple_mob_recolor, !CONFIG_GET(flag/allow_simple_mob_recolor))
|
||||
to_chat(usr, "You have [CONFIG_GET(flag/allow_simple_mob_recolor) ? "enabled" : "disabled"] newly spawned simple mobs to spawn with the recolour verb")
|
||||
|
||||
@@ -21,9 +21,9 @@ var/jobban_keylist[0] //to store the keys & ranks
|
||||
*/
|
||||
|
||||
if (guest_jobbans(rank))
|
||||
if(config.guest_jobban && IsGuestKey(M.key))
|
||||
if(CONFIG_GET(flag/guest_jobban) && IsGuestKey(M.key))
|
||||
return "Guest Job-ban"
|
||||
if(config.usewhitelist && !check_whitelist(M))
|
||||
if(CONFIG_GET(flag/usewhitelist) && !check_whitelist(M))
|
||||
return "Whitelisted Job"
|
||||
|
||||
return ckey_is_jobbanned(M.ckey, rank)
|
||||
@@ -59,7 +59,7 @@ DEBUG
|
||||
return 1
|
||||
|
||||
/proc/jobban_loadbanfile()
|
||||
if(config.ban_legacy_system)
|
||||
if(CONFIG_GET(flag/ban_legacy_system))
|
||||
var/savefile/S=new("data/job_full.ban")
|
||||
S["keys[0]"] >> jobban_keylist
|
||||
log_admin("Loading jobban_rank")
|
||||
@@ -72,7 +72,7 @@ DEBUG
|
||||
if(!establish_db_connection())
|
||||
error("Database connection failed. Reverting to the legacy ban system.")
|
||||
log_misc("Database connection failed. Reverting to the legacy ban system.")
|
||||
config.ban_legacy_system = 1
|
||||
CONFIG_SET(flag/ban_legacy_system, TRUE)
|
||||
jobban_loadbanfile()
|
||||
return
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
usr << browse(output,"window=editrights;size=600x500")
|
||||
|
||||
/datum/admins/proc/log_admin_rank_modification(var/adm_ckey, var/new_rank)
|
||||
if(config.admin_legacy_system) return
|
||||
if(CONFIG_GET(flag/admin_legacy_system)) return
|
||||
|
||||
if(!usr.client)
|
||||
return
|
||||
@@ -95,7 +95,7 @@
|
||||
to_chat(usr, span_filter_adminlog("[span_blue("Admin rank changed.")]"))
|
||||
|
||||
/datum/admins/proc/log_admin_permission_modification(var/adm_ckey, var/new_permission)
|
||||
if(config.admin_legacy_system) return
|
||||
if(CONFIG_GET(flag/admin_legacy_system)) return
|
||||
|
||||
if(!usr.client)
|
||||
return
|
||||
|
||||
+23
-23
@@ -175,19 +175,19 @@
|
||||
if(null,"") return
|
||||
if("*New Rank*")
|
||||
new_rank = tgui_input_text(usr, "Please input a new rank", "New custom rank")
|
||||
if(config.admin_legacy_system)
|
||||
if(CONFIG_GET(flag/admin_legacy_system))
|
||||
new_rank = ckeyEx(new_rank)
|
||||
if(!new_rank)
|
||||
to_chat(usr, span_filter_adminlog(span_warning("Error: Topic 'editrights': Invalid rank")))
|
||||
return
|
||||
if(config.admin_legacy_system)
|
||||
if(CONFIG_GET(flag/admin_legacy_system))
|
||||
if(admin_ranks.len)
|
||||
if(new_rank in admin_ranks)
|
||||
rights = admin_ranks[new_rank] //we typed a rank which already exists, use its rights
|
||||
else
|
||||
admin_ranks[new_rank] = 0 //add the new rank to admin_ranks
|
||||
else
|
||||
if(config.admin_legacy_system)
|
||||
if(CONFIG_GET(flag/admin_legacy_system))
|
||||
new_rank = ckeyEx(new_rank)
|
||||
rights = admin_ranks[new_rank] //we input an existing rank, use its rights
|
||||
|
||||
@@ -679,7 +679,7 @@
|
||||
to_chat(usr, span_filter_adminlog(span_warning("You do not have the appropriate permissions to add job bans!")))
|
||||
return
|
||||
|
||||
if(check_rights(R_MOD,0) && !check_rights(R_ADMIN,0) && !config.mods_can_job_tempban) // If mod and tempban disabled
|
||||
if(check_rights(R_MOD,0) && !check_rights(R_ADMIN,0) && !CONFIG_GET(flag/mods_can_job_tempban)) // If mod and tempban disabled
|
||||
to_chat(usr, span_filter_adminlog(span_warning("Mod jobbanning is disabled!")))
|
||||
return
|
||||
|
||||
@@ -782,14 +782,14 @@
|
||||
if(!check_rights(R_MOD,0) && !check_rights(R_BAN, 0))
|
||||
to_chat(usr, span_filter_adminlog(span_warning("You cannot issue temporary job-bans!")))
|
||||
return
|
||||
if(config.ban_legacy_system)
|
||||
if(CONFIG_GET(flag/ban_legacy_system))
|
||||
to_chat(usr, span_filter_adminlog(span_warning("Your server is using the legacy banning system, which does not support temporary job bans. Consider upgrading. Aborting ban.")))
|
||||
return
|
||||
var/mins = tgui_input_number(usr,"How long (in minutes)?","Ban time",1440)
|
||||
if(!mins)
|
||||
return
|
||||
if(check_rights(R_MOD, 0) && !check_rights(R_BAN, 0) && mins > config.mod_job_tempban_max)
|
||||
to_chat(usr, span_filter_adminlog(span_warning("Moderators can only job tempban up to [config.mod_job_tempban_max] minutes!")))
|
||||
if(check_rights(R_MOD, 0) && !check_rights(R_BAN, 0) && mins > CONFIG_GET(number/mod_job_tempban_max))
|
||||
to_chat(usr, span_filter_adminlog(span_warning("Moderators can only job tempban up to [CONFIG_GET(number/mod_job_tempban_max)] minutes!")))
|
||||
return
|
||||
var/reason = sanitize(tgui_input_text(usr,"Reason?","Please State Reason",""))
|
||||
if(!reason)
|
||||
@@ -841,7 +841,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(!CONFIG_GET(flag/ban_legacy_system))
|
||||
to_chat(usr, span_filter_adminlog("Unfortunately, database based unbanning cannot be done through this panel"))
|
||||
DB_ban_panel(M.ckey)
|
||||
return
|
||||
@@ -904,7 +904,7 @@
|
||||
to_chat(usr, span_warning("You do not have the appropriate permissions to add bans!"))
|
||||
return
|
||||
|
||||
if(check_rights(R_MOD,0) && !check_rights(R_ADMIN, 0) && !config.mods_can_job_tempban) // If mod and tempban disabled
|
||||
if(check_rights(R_MOD,0) && !check_rights(R_ADMIN, 0) && !CONFIG_GET(flag/mods_can_job_tempban)) // If mod and tempban disabled
|
||||
to_chat(usr, span_warning("Mod jobbanning is disabled!"))
|
||||
return
|
||||
|
||||
@@ -920,8 +920,8 @@
|
||||
var/mins = tgui_input_number(usr,"How long (in minutes)?","Ban time",1440)
|
||||
if(!mins)
|
||||
return
|
||||
if(check_rights(R_MOD, 0) && !check_rights(R_BAN, 0) && mins > config.mod_tempban_max)
|
||||
to_chat(usr, span_warning("Moderators can only job tempban up to [config.mod_tempban_max] minutes!"))
|
||||
if(check_rights(R_MOD, 0) && !check_rights(R_BAN, 0) && mins > CONFIG_GET(number/mod_tempban_max))
|
||||
to_chat(usr, span_warning("Moderators can only job tempban up to [CONFIG_GET(number/mod_tempban_max)] minutes!"))
|
||||
return
|
||||
if(mins >= 525600) mins = 525599
|
||||
var/reason = sanitize(tgui_input_text(usr,"Reason?","reason","Griefer"))
|
||||
@@ -935,8 +935,8 @@
|
||||
feedback_inc("ban_tmp",1)
|
||||
DB_ban_record(BANTYPE_TEMP, M, mins, reason)
|
||||
feedback_inc("ban_tmp_mins",mins)
|
||||
if(config.banappeals)
|
||||
to_chat(M, span_filter_system(span_warning("To try to resolve this matter head to [config.banappeals]")))
|
||||
if(CONFIG_GET(string/banappeals))
|
||||
to_chat(M, span_filter_system(span_warning("To try to resolve this matter head to [CONFIG_GET(string/banappeals)]")))
|
||||
else
|
||||
to_chat(M, span_filter_system(span_warning("No ban appeals URL has been set.")))
|
||||
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
|
||||
@@ -959,8 +959,8 @@
|
||||
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0)
|
||||
to_chat(M, span_filter_system(span_critical("You have been banned by [usr.client.ckey].\nReason: [reason].")))
|
||||
to_chat(M, span_filter_system(span_warning("This is a permanent ban.")))
|
||||
if(config.banappeals)
|
||||
to_chat(M, span_filter_system(span_warning("To try to resolve this matter head to [config.banappeals]")))
|
||||
if(CONFIG_GET(string/banappeals))
|
||||
to_chat(M, span_filter_system(span_warning("To try to resolve this matter head to [CONFIG_GET(string/banappeals)]")))
|
||||
else
|
||||
to_chat(M, span_filter_system(span_warning("No ban appeals URL has been set.")))
|
||||
ban_unban_log_save("[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.")
|
||||
@@ -1253,7 +1253,7 @@
|
||||
to_chat(usr, span_filter_adminlog("This can only be used on instances of type /mob/living"))
|
||||
return
|
||||
|
||||
if(config.allow_admin_rev)
|
||||
if(CONFIG_GET(flag/allow_admin_rev))
|
||||
L.revive()
|
||||
message_admins(span_red("Admin [key_name_admin(usr)] healed / revived [key_name_admin(L)]!"), 1)
|
||||
log_admin("[key_name(usr)] healed / Rrvived [key_name(L)]")
|
||||
@@ -1361,13 +1361,13 @@
|
||||
to_chat(X, take_msg)
|
||||
to_chat(M, span_filter_pm(span_boldnotice("Your adminhelp is being attended to by [usr.client]. Thanks for your patience!")))
|
||||
// VoreStation Edit Start
|
||||
if (config.chat_webhook_url)
|
||||
if (CONFIG_GET(string/chat_webhook_url))
|
||||
spawn(0)
|
||||
var/query_string = "type=admintake"
|
||||
query_string += "&key=[url_encode(config.chat_webhook_key)]"
|
||||
query_string += "&key=[url_encode(CONFIG_GET(string/chat_webhook_key))]"
|
||||
query_string += "&admin=[url_encode(key_name(usr.client))]"
|
||||
query_string += "&user=[url_encode(key_name(M))]"
|
||||
world.Export("[config.chat_webhook_url]?[query_string]")
|
||||
world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]")
|
||||
// VoreStation Edit End
|
||||
else
|
||||
to_chat(usr, span_warning("Unable to locate mob."))
|
||||
@@ -1580,7 +1580,7 @@
|
||||
else if(href_list["jumpto"])
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
|
||||
return
|
||||
if(!config.allow_admin_jump)
|
||||
if(!CONFIG_GET(flag/allow_admin_jump))
|
||||
tgui_alert_async(usr, "Admin jumping disabled")
|
||||
return
|
||||
|
||||
@@ -1600,7 +1600,7 @@
|
||||
else if(href_list["getmob"])
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
|
||||
return
|
||||
if(!config.allow_admin_jump)
|
||||
if(!CONFIG_GET(flag/allow_admin_jump))
|
||||
tgui_alert_async(usr, "Admin jumping disabled")
|
||||
return
|
||||
if(tgui_alert(usr, "Confirm?", "Message", list("Yes", "No")) != "Yes")
|
||||
@@ -1619,7 +1619,7 @@
|
||||
else if(href_list["sendmob"])
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
|
||||
return
|
||||
if(!config.allow_admin_jump)
|
||||
if(!CONFIG_GET(flag/allow_admin_jump))
|
||||
tgui_alert_async(usr, "Admin jumping disabled")
|
||||
return
|
||||
|
||||
@@ -1687,7 +1687,7 @@
|
||||
else if(href_list["object_list"]) //this is the laggiest thing ever
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
|
||||
if(!config.allow_admin_spawning)
|
||||
if(!CONFIG_GET(flag/allow_admin_spawning))
|
||||
to_chat(usr, span_filter_adminlog("Spawning of items is not allowed."))
|
||||
return
|
||||
|
||||
|
||||
@@ -435,10 +435,10 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new)
|
||||
log_admin(msg)
|
||||
AddInteraction("[key_name_admin(usr)] is now handling this ticket.")
|
||||
var/query_string = "type=admintake"
|
||||
query_string += "&key=[url_encode(config.chat_webhook_key)]"
|
||||
query_string += "&key=[url_encode(CONFIG_GET(string/chat_webhook_key))]"
|
||||
query_string += "&admin=[url_encode(key_name(usr))]"
|
||||
query_string += "&user=[url_encode(key_name(initiator))]"
|
||||
world.Export("[config.chat_webhook_url]?[query_string]")
|
||||
world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]")
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/datum/admin_help/proc/send2adminchat()
|
||||
if(!config.chat_webhook_url)
|
||||
if(!CONFIG_GET(string/chat_webhook_url))
|
||||
return
|
||||
|
||||
var/list/adm = get_admin_counts()
|
||||
@@ -8,12 +8,12 @@
|
||||
|
||||
spawn(0) //Unreliable world.Exports()
|
||||
var/query_string = "type=adminhelp"
|
||||
query_string += "&key=[url_encode(config.chat_webhook_key)]"
|
||||
query_string += "&key=[url_encode(CONFIG_GET(string/chat_webhook_key))]"
|
||||
query_string += "&from=[url_encode(key_name(initiator))]"
|
||||
query_string += "&msg=[url_encode(html_decode(name))]"
|
||||
query_string += "&admin_number=[allmins.len]"
|
||||
query_string += "&admin_number_afk=[afkmins.len]"
|
||||
world.Export("[config.chat_webhook_url]?[query_string]")
|
||||
world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]")
|
||||
|
||||
/client/verb/adminspice()
|
||||
set category = "Admin"
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
|
||||
return
|
||||
|
||||
if(!config.allow_admin_jump)
|
||||
if(!CONFIG_GET(flag/allow_admin_jump))
|
||||
tgui_alert_async(usr, "Admin jumping disabled")
|
||||
return
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
set category = "Admin"
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
|
||||
return
|
||||
if(config.allow_admin_jump)
|
||||
if(CONFIG_GET(flag/allow_admin_jump))
|
||||
log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]")
|
||||
message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]", 1)
|
||||
usr.on_mob_jump()
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
/// Performs the jumps, also called from admin Topic() for JMP links
|
||||
/client/proc/do_jumptomob(var/mob/M)
|
||||
if(!config.allow_admin_jump)
|
||||
if(!CONFIG_GET(flag/allow_admin_jump))
|
||||
tgui_alert_async(usr, "Admin jumping disabled")
|
||||
return
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
|
||||
return
|
||||
|
||||
if (config.allow_admin_jump)
|
||||
if (CONFIG_GET(flag/allow_admin_jump))
|
||||
if(src.mob)
|
||||
var/mob/A = src.mob
|
||||
A.on_mob_jump()
|
||||
@@ -108,7 +108,7 @@
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
|
||||
return
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
if(CONFIG_GET(flag/allow_admin_jump))
|
||||
var/list/keys = list()
|
||||
for(var/mob/M in player_list)
|
||||
keys += M.client
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
|
||||
return
|
||||
if(config.allow_admin_jump)
|
||||
if(CONFIG_GET(flag/allow_admin_jump))
|
||||
if(!M) //VOREStation Edit
|
||||
M = tgui_input_list(usr, "Pick a mob:", "Get Mob", mob_list) //VOREStation Edit
|
||||
if(!M)
|
||||
@@ -155,7 +155,7 @@
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
|
||||
return
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
if(CONFIG_GET(flag/allow_admin_jump))
|
||||
var/list/keys = list()
|
||||
for(var/mob/M in player_list)
|
||||
keys += M.client
|
||||
@@ -183,7 +183,7 @@
|
||||
if(!check_rights(R_ADMIN|R_MOD|R_DEBUG|R_EVENT))
|
||||
return
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
if(CONFIG_GET(flag/allow_admin_jump))
|
||||
var/area/A = tgui_input_list(usr, "Pick an area:", "Send Mob", return_sorted_areas())
|
||||
if(!A)
|
||||
return
|
||||
@@ -208,7 +208,7 @@
|
||||
if(!check_rights(R_ADMIN|R_DEBUG|R_EVENT))
|
||||
return
|
||||
|
||||
if(config.allow_admin_jump)
|
||||
if(CONFIG_GET(flag/allow_admin_jump))
|
||||
if(isnull(tx))
|
||||
tx = tgui_input_number(usr, "Select X coordinate", "Move Atom", null, null)
|
||||
if(!tx) return
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
recipient << 'sound/effects/adminhelp.ogg'
|
||||
|
||||
//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(CONFIG_GET(flag/popup_admin_pm))
|
||||
spawn() //so we don't hold the caller proc up
|
||||
var/sender = src
|
||||
var/sendername = key
|
||||
|
||||
@@ -64,9 +64,9 @@
|
||||
to_chat(user, span_notice("\The [I] does <b>[DPS]</b> damage per second."))
|
||||
if(DPS > 0)
|
||||
to_chat(user, span_notice("At your maximum health ([user.getMaxHealth()]), it would take approximately;"))
|
||||
to_chat(user, span_notice("[(user.getMaxHealth() - config.health_threshold_softcrit) / DPS] seconds to softcrit you. ([config.health_threshold_softcrit] health)"))
|
||||
to_chat(user, span_notice("[(user.getMaxHealth() - config.health_threshold_crit) / DPS] seconds to hardcrit you. ([config.health_threshold_crit] health)"))
|
||||
to_chat(user, span_notice("[(user.getMaxHealth() - config.health_threshold_dead) / DPS] seconds to kill you. ([config.health_threshold_dead] health)"))
|
||||
to_chat(user, span_notice("[(user.getMaxHealth() - CONFIG_GET(number/health_threshold_softcrit)) / DPS] seconds to softcrit you. ([CONFIG_GET(number/health_threshold_softcrit)] health)"))
|
||||
to_chat(user, span_notice("[(user.getMaxHealth() - CONFIG_GET(number/health_threshold_crit)) / DPS] seconds to hardcrit you. ([CONFIG_GET(number/health_threshold_crit)] health)"))
|
||||
to_chat(user, span_notice("[(user.getMaxHealth() - CONFIG_GET(number/health_threshold_dead)) / DPS] seconds to kill you. ([CONFIG_GET(number/health_threshold_dead)] health)"))
|
||||
|
||||
else
|
||||
to_chat(user, span_warning("You need to be a living mob, with hands, and for an object to be in your active hand, to use this verb."))
|
||||
@@ -206,9 +206,9 @@
|
||||
set category = "Server"
|
||||
set name = "Toggle Aliens"
|
||||
|
||||
config.aliens_allowed = !config.aliens_allowed
|
||||
log_admin("[key_name(src)] has turned aliens [config.aliens_allowed ? "on" : "off"].")
|
||||
message_admins("[key_name_admin(src)] has turned aliens [config.aliens_allowed ? "on" : "off"].", 0)
|
||||
CONFIG_SET(flag/aliens_allowed, !CONFIG_GET(flag/aliens_allowed))
|
||||
log_admin("[key_name(src)] has turned aliens [CONFIG_GET(flag/aliens_allowed) ? "on" : "off"].")
|
||||
message_admins("[key_name_admin(src)] has turned aliens [CONFIG_GET(flag/aliens_allowed) ? "on" : "off"].", 0)
|
||||
feedback_add_details("admin_verb","TAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_display_del_log()
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
var/new_fps = round(tgui_input_number(usr, "Sets game frames-per-second. Can potentially break the game (default: [config.fps])", "FPS", world.fps), round(config.fps * 1.5))
|
||||
var/new_fps = round(tgui_input_number(usr, "Sets game frames-per-second. Can potentially break the game (default: [CONFIG_GET(number/fps)])", "FPS", world.fps), round(CONFIG_GET(number/fps) * 1.5))
|
||||
if(new_fps <= 0)
|
||||
to_chat(src, span_danger("Error: set_server_fps(): Invalid world.fps value. No changes made."))
|
||||
return
|
||||
if(new_fps > config.fps * 1.5)
|
||||
if(tgui_alert(src, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [config.fps]", "Warning!", list("Confirm", "ABORT-ABORT-ABORT")) != "Confirm")
|
||||
if(new_fps > CONFIG_GET(number/fps) * 1.5)
|
||||
if(tgui_alert(src, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [CONFIG_GET(number/fps)]", "Warning!", list("Confirm", "ABORT-ABORT-ABORT")) != "Confirm")
|
||||
return
|
||||
|
||||
var/msg = "[key_name(src)] has modified world.fps to [new_fps]"
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if (!config.sql_enabled)
|
||||
if (!CONFIG_GET(flag/sql_enabled))
|
||||
to_chat(usr, span_adminnotice("The Database is not enabled!"))
|
||||
return
|
||||
|
||||
config.panic_bunker = (!config.panic_bunker)
|
||||
CONFIG_SET(flag/panic_bunker, !CONFIG_GET(flag/panic_bunker))
|
||||
|
||||
log_and_message_admins("[key_name(usr)] has toggled the Panic Bunker, it is now [(config.panic_bunker?"on":"off")].")
|
||||
if (config.panic_bunker && (!dbcon || !dbcon.IsConnected()))
|
||||
log_and_message_admins("[key_name(usr)] has toggled the Panic Bunker, it is now [(CONFIG_GET(flag/panic_bunker) ? "on":"off")].")
|
||||
if (CONFIG_GET(flag/panic_bunker) && (!dbcon || !dbcon.IsConnected()))
|
||||
message_admins("The database is not connected! Panic bunker will not work until the connection is reestablished.")
|
||||
feedback_add_details("admin_verb","PANIC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.paranoia_logging = (!config.paranoia_logging)
|
||||
CONFIG_SET(flag/paranoia_logging, !CONFIG_GET(flag/paranoia_logging))
|
||||
|
||||
log_and_message_admins("[key_name(usr)] has toggled Paranoia Logging, it is now [(config.paranoia_logging?"on":"off")].")
|
||||
if (config.paranoia_logging && (!dbcon || !dbcon.IsConnected()))
|
||||
log_and_message_admins("[key_name(usr)] has toggled Paranoia Logging, it is now [(CONFIG_GET(flag/paranoia_logging) ? "on":"off")].")
|
||||
if (CONFIG_GET(flag/paranoia_logging) && (!dbcon || !dbcon.IsConnected()))
|
||||
message_admins("The database is not connected! Paranoia logging will not be able to give 'player age' (time since first connection) warnings, only Byond account warnings.")
|
||||
feedback_add_details("admin_verb","PARLOG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.ip_reputation = (!config.ip_reputation)
|
||||
CONFIG_SET(flag/ip_reputation, !CONFIG_GET(flag/ip_reputation))
|
||||
|
||||
log_and_message_admins("[key_name(usr)] has toggled IP reputation checks, it is now [(config.ip_reputation?"on":"off")].")
|
||||
if (config.ip_reputation && (!dbcon || !dbcon.IsConnected()))
|
||||
log_and_message_admins("[key_name(usr)] has toggled IP reputation checks, it is now [(CONFIG_GET(flag/ip_reputation) ? "on":"off")].")
|
||||
if (CONFIG_GET(flag/ip_reputation) && (!dbcon || !dbcon.IsConnected()))
|
||||
message_admins("The database is not connected! IP reputation logging will not be able to allow existing players to bypass the reputation checks (if that is enabled).")
|
||||
feedback_add_details("admin_verb","IPREP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -119,7 +119,7 @@ var/list/sounds_cache = list()
|
||||
/proc/web_sound(mob/user, input, credit)
|
||||
if(!check_rights(R_SOUNDS))
|
||||
return
|
||||
var/ytdl = config.invoke_youtubedl
|
||||
var/ytdl = CONFIG_GET(string/invoke_youtubedl)
|
||||
if(!ytdl)
|
||||
to_chat(user, span_boldwarning("Youtube-dl was not configured, action unavailable"), confidential = TRUE) //Check config.txt for the INVOKE_YOUTUBEDL value
|
||||
return
|
||||
@@ -220,7 +220,7 @@ var/list/sounds_cache = list()
|
||||
if(!check_rights(R_SOUNDS))
|
||||
return
|
||||
|
||||
var/ytdl = config.invoke_youtubedl
|
||||
var/ytdl = CONFIG_GET(string/invoke_youtubedl)
|
||||
if(!ytdl)
|
||||
to_chat(src, span_boldwarning("Youtube-dl was not configured, action unavailable"), confidential = TRUE) //Check config.txt for the INVOKE_YOUTUBEDL value
|
||||
return
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set category = "Object"
|
||||
|
||||
if(istype(O,/obj/singularity))
|
||||
if(config.forbid_singulo_possession)
|
||||
if(CONFIG_GET(flag/forbid_singulo_possession))
|
||||
to_chat(usr, "It is forbidden to possess singularities.")
|
||||
return
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
|
||||
/proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
||||
if(automute)
|
||||
if(!config.automute_on)
|
||||
if(!CONFIG_GET(flag/automute_on))
|
||||
return
|
||||
else
|
||||
if(!usr || !usr.client)
|
||||
@@ -321,7 +321,7 @@ Ccomp's first proc.
|
||||
return
|
||||
|
||||
var/action=""
|
||||
if(config.antag_hud_allowed)
|
||||
if(CONFIG_GET(flag/antag_hud_allowed))
|
||||
for(var/mob/observer/dead/g in get_ghosts())
|
||||
if(!g.client.holder) //Remove the verb from non-admin ghosts
|
||||
remove_verb(g, /mob/observer/dead/verb/toggle_antagHUD)
|
||||
@@ -329,7 +329,7 @@ Ccomp's first proc.
|
||||
g.antagHUD = 0 // Disable it on those that have it enabled
|
||||
g.has_enabled_antagHUD = 2 // We'll allow them to respawn
|
||||
to_chat(g, span_boldwarning("The Administrator has disabled AntagHUD "))
|
||||
config.antag_hud_allowed = 0
|
||||
CONFIG_SET(flag/antag_hud_allowed, FALSE)
|
||||
to_chat(src, span_boldwarning("AntagHUD usage has been disabled"))
|
||||
action = "disabled"
|
||||
else
|
||||
@@ -337,7 +337,7 @@ Ccomp's first proc.
|
||||
if(!g.client.holder) // Add the verb back for all non-admin ghosts
|
||||
add_verb(g, /mob/observer/dead/verb/toggle_antagHUD)
|
||||
to_chat(g, span_boldnotice("The Administrator has enabled AntagHUD")) // Notify all observers they can now use AntagHUD
|
||||
config.antag_hud_allowed = 1
|
||||
CONFIG_SET(flag/antag_hud_allowed, TRUE)
|
||||
action = "enabled"
|
||||
to_chat(src, span_boldnotice("AntagHUD usage has been enabled"))
|
||||
|
||||
@@ -356,11 +356,11 @@ Ccomp's first proc.
|
||||
return
|
||||
|
||||
var/action=""
|
||||
if(config.antag_hud_restricted)
|
||||
if(CONFIG_GET(flag/antag_hud_restricted))
|
||||
for(var/mob/observer/dead/g in get_ghosts())
|
||||
to_chat(g, span_boldnotice("The administrator has lifted restrictions on joining the round if you use AntagHUD"))
|
||||
action = "lifted restrictions"
|
||||
config.antag_hud_restricted = 0
|
||||
CONFIG_SET(flag/antag_hud_restricted, FALSE)
|
||||
to_chat(src, span_boldnotice("AntagHUD restrictions have been lifted"))
|
||||
else
|
||||
for(var/mob/observer/dead/g in get_ghosts())
|
||||
@@ -369,7 +369,7 @@ Ccomp's first proc.
|
||||
g.antagHUD = 0
|
||||
g.has_enabled_antagHUD = 0
|
||||
action = "placed restrictions"
|
||||
config.antag_hud_restricted = 1
|
||||
CONFIG_SET(flag/antag_hud_restricted, TRUE)
|
||||
to_chat(src, span_boldwarning("AntagHUD restrictions have been enabled"))
|
||||
|
||||
log_admin("[key_name(usr)] has [action] on joining the round if they use AntagHUD")
|
||||
@@ -634,7 +634,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!istype(M))
|
||||
tgui_alert_async(usr, "Cannot revive a ghost")
|
||||
return
|
||||
if(config.allow_admin_rev)
|
||||
if(CONFIG_GET(flag/allow_admin_rev))
|
||||
M.revive()
|
||||
|
||||
log_admin("[key_name(usr)] healed / revived [key_name(M)]")
|
||||
@@ -1029,12 +1029,12 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
if(!check_rights(R_SERVER)) return //VOREStation Edit
|
||||
|
||||
if(!config.allow_random_events)
|
||||
config.allow_random_events = 1
|
||||
if(!CONFIG_GET(flag/allow_random_events))
|
||||
CONFIG_SET(flag/allow_random_events, TRUE)
|
||||
to_chat(usr, "Random events enabled")
|
||||
message_admins("Admin [key_name_admin(usr)] has enabled random events.", 1)
|
||||
else
|
||||
config.allow_random_events = 0
|
||||
CONFIG_SET(flag/allow_random_events, FALSE)
|
||||
to_chat(usr, "Random events disabled")
|
||||
message_admins("Admin [key_name_admin(usr)] has disabled random events.", 1)
|
||||
feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -61,7 +61,7 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
|
||||
/// Returns whether or not the asset should attempt to read from cache
|
||||
/datum/asset/proc/should_refresh()
|
||||
return !cross_round_cachable || !config.cache_assets
|
||||
return !cross_round_cachable || !CONFIG_GET(flag/cache_assets)
|
||||
|
||||
/// Simply takes any generated file and saves it to the round-specific /logs folder. Useful for debugging potential issues with spritesheet generation/display.
|
||||
/// Only called when the SAVE_SPRITESHEETS config option is uncommented.
|
||||
@@ -180,7 +180,7 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
return
|
||||
|
||||
// If it's cached, may as well load it now, while the loading is cheap
|
||||
if(config.cache_assets && cross_round_cachable)
|
||||
if(CONFIG_GET(flag/cache_assets) && cross_round_cachable)
|
||||
load_immediately = TRUE
|
||||
|
||||
create_spritesheets()
|
||||
@@ -209,12 +209,12 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
text2file(generate_css(), file_directory)
|
||||
SSassets.transport.register_asset(css_name, fcopy_rsc(file_directory))
|
||||
|
||||
if(config.save_spritesheets)
|
||||
if(CONFIG_GET(flag/save_spritesheets))
|
||||
save_to_logs(file_name = css_name, file_location = file_directory)
|
||||
|
||||
fdel(file_directory)
|
||||
|
||||
if (config.cache_assets && cross_round_cachable)
|
||||
if (CONFIG_GET(flag/cache_assets) && cross_round_cachable)
|
||||
write_to_cache()
|
||||
fully_generated = TRUE
|
||||
// If we were ever in there, remove ourselves
|
||||
@@ -267,7 +267,7 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
size[SPRSZ_STRIPPED] = icon(file_directory)
|
||||
|
||||
// this is useful here for determining if weird sprite issues (like having a white background) are a cause of what we're doing DM-side or not since we can see the full flattened thing at-a-glance.
|
||||
if(config.save_spritesheets)
|
||||
if(CONFIG_GET(flag/save_spritesheets))
|
||||
save_to_logs(file_name = png_name, file_location = file_directory)
|
||||
|
||||
fdel(file_directory)
|
||||
@@ -321,7 +321,7 @@ GLOBAL_LIST_EMPTY(asset_datums)
|
||||
rustg_file_write(replaced_css, replaced_css_filename)
|
||||
SSassets.transport.register_asset(finalized_name, replaced_css_filename)
|
||||
|
||||
if(config.save_spritesheets)
|
||||
if(CONFIG_GET(flag/save_spritesheets))
|
||||
save_to_logs(file_name = finalized_name, file_location = replaced_css_filename)
|
||||
|
||||
fdel(replaced_css_filename)
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
|
||||
/// Called when the transport is loaded by the config controller, not called on the default transport unless it gets loaded by a config change.
|
||||
/datum/asset_transport/proc/Load()
|
||||
if (config.asset_simple_preload)
|
||||
if (CONFIG_GET(flag/asset_simple_preload))
|
||||
for(var/client/C in GLOB.clients)
|
||||
addtimer(CALLBACK(src, PROC_REF(send_assets_slow), C, preload), 1 SECONDS)
|
||||
|
||||
/// Initialize - Called when SSassets initializes.
|
||||
/datum/asset_transport/proc/Initialize(list/assets)
|
||||
preload = assets.Copy()
|
||||
if (!config.asset_simple_preload)
|
||||
if (!CONFIG_GET(flag/asset_simple_preload))
|
||||
return
|
||||
for(var/client/C in GLOB.clients)
|
||||
addtimer(CALLBACK(src, PROC_REF(send_assets_slow), C, preload), 1 SECONDS)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
/// Saves the asset to the webroot taking into account namespaces and hashes.
|
||||
/datum/asset_transport/webroot/proc/save_asset_to_webroot(datum/asset_cache_item/ACI)
|
||||
var/webroot = config.asset_cdn_webroot
|
||||
var/webroot = CONFIG_GET(string/asset_cdn_webroot)
|
||||
var/newpath = "[webroot][get_asset_suffex(ACI)]"
|
||||
if (fexists(newpath))
|
||||
return
|
||||
@@ -39,7 +39,7 @@
|
||||
/datum/asset_transport/webroot/get_asset_url(asset_name, datum/asset_cache_item/asset_cache_item)
|
||||
if (!istype(asset_cache_item))
|
||||
asset_cache_item = SSassets.cache[asset_name]
|
||||
var/url = config.asset_cdn_url //config loading will handle making sure this ends in a /
|
||||
var/url = CONFIG_GET(string/asset_cdn_url) //config loading will handle making sure this ends in a /
|
||||
return "[url][get_asset_suffex(asset_cache_item)]"
|
||||
|
||||
/datum/asset_transport/webroot/proc/get_asset_suffex(datum/asset_cache_item/asset_cache_item)
|
||||
@@ -76,11 +76,11 @@
|
||||
return FALSE
|
||||
|
||||
/datum/asset_transport/webroot/validate_config(log = TRUE)
|
||||
if (!config.asset_cdn_url)
|
||||
if (!CONFIG_GET(string/asset_cdn_url))
|
||||
if (log)
|
||||
log_asset("ERROR: [type]: Invalid Config: ASSET_CDN_URL")
|
||||
return FALSE
|
||||
if (!config.asset_cdn_webroot)
|
||||
if (!CONFIG_GET(string/asset_cdn_webroot))
|
||||
if (log)
|
||||
log_asset("ERROR: [type]: Invalid Config: ASSET_CDN_WEBROOT")
|
||||
return FALSE
|
||||
|
||||
@@ -43,7 +43,7 @@ GLOBAL_DATUM(gateway_station, /obj/machinery/gateway/centerstation)
|
||||
GLOB.gateway_station = src
|
||||
|
||||
update_icon()
|
||||
wait = world.time + config.gateway_delay //+ thirty minutes default
|
||||
wait = world.time + CONFIG_GET(number/gateway_delay) //+ thirty minutes default
|
||||
|
||||
if(GLOB.gateway_away)
|
||||
awaygate = GLOB.gateway_away
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
stat_panel.reinitialize()
|
||||
|
||||
//Logs all hrefs
|
||||
if(config && config.log_hrefs && href_logfile)
|
||||
if(config && CONFIG_GET(flag/log_hrefs) && href_logfile)
|
||||
WRITE_LOG(href_logfile, "[src] (usr:[usr])</small> || [hsrc ? "[hsrc] " : ""][href]")
|
||||
|
||||
//byond bug ID:2256651
|
||||
@@ -171,7 +171,7 @@
|
||||
if(byond_version < MIN_CLIENT_VERSION) //Out of date client.
|
||||
return null
|
||||
|
||||
if(!config.guests_allowed && IsGuestKey(key))
|
||||
if(!CONFIG_GET(flag/guests_allowed) && IsGuestKey(key))
|
||||
alert(src,"This server doesn't allow guest accounts to play. Please go to https://www.byond.com/ and register for a key.","Guest") // Not tgui_alert
|
||||
del(src)
|
||||
return
|
||||
@@ -278,7 +278,7 @@
|
||||
src.changes()
|
||||
*/
|
||||
|
||||
if(config.paranoia_logging)
|
||||
if(CONFIG_GET(flag/paranoia_logging))
|
||||
var/alert = FALSE //VOREStation Edit start.
|
||||
if(isnum(player_age) && player_age == 0)
|
||||
log_and_message_admins("PARANOIA: [key_name(src)] has connected here for the first time.")
|
||||
@@ -405,30 +405,30 @@
|
||||
|
||||
//Panic bunker code
|
||||
if (isnum(player_age) && player_age == 0) //first connection
|
||||
if (config.panic_bunker && !holder && !deadmin_holder)
|
||||
if (CONFIG_GET(flag/panic_bunker) && !holder && !deadmin_holder)
|
||||
log_adminwarn("Failed Login: [key] - New account attempting to connect during panic bunker")
|
||||
message_admins(span_adminnotice("Failed Login: [key] - New account attempting to connect during panic bunker"))
|
||||
disconnect_with_message("Sorry but the server is currently not accepting connections from never before seen players.")
|
||||
return 0
|
||||
|
||||
// IP Reputation Check
|
||||
if(config.ip_reputation)
|
||||
if(config.ipr_allow_existing && player_age >= config.ipr_minimum_age)
|
||||
if(CONFIG_GET(flag/ip_reputation))
|
||||
if(CONFIG_GET(flag/ipr_allow_existing) && player_age >= CONFIG_GET(number/ipr_minimum_age))
|
||||
log_admin("Skipping IP reputation check on [key] with [address] because of player age")
|
||||
else if(update_ip_reputation()) //It is set now
|
||||
if(ip_reputation >= config.ipr_bad_score) //It's bad
|
||||
if(ip_reputation >= CONFIG_GET(number/ipr_bad_score)) //It's bad
|
||||
|
||||
//Log it
|
||||
if(config.paranoia_logging) //We don't block, but we want paranoia log messages
|
||||
if(CONFIG_GET(flag/paranoia_logging)) //We don't block, but we want paranoia log messages
|
||||
log_and_message_admins("[key] at [address] has bad IP reputation: [ip_reputation]. Will be kicked if enabled in config.")
|
||||
else //We just log it
|
||||
log_admin("[key] at [address] has bad IP reputation: [ip_reputation]. Will be kicked if enabled in config.")
|
||||
|
||||
//Take action if required
|
||||
if(config.ipr_block_bad_ips && config.ipr_allow_existing) //We allow players of an age, but you don't meet it
|
||||
disconnect_with_message("Sorry, we only allow VPN/Proxy/Tor usage for players who have spent at least [config.ipr_minimum_age] days on the server. If you are unable to use the internet without your VPN/Proxy/Tor, please contact an admin out-of-game to let them know so we can accommodate this.")
|
||||
if(CONFIG_GET(flag/ipr_block_bad_ips) && CONFIG_GET(flag/ipr_allow_existing)) //We allow players of an age, but you don't meet it
|
||||
disconnect_with_message("Sorry, we only allow VPN/Proxy/Tor usage for players who have spent at least [CONFIG_GET(number/ipr_minimum_age)] days on the server. If you are unable to use the internet without your VPN/Proxy/Tor, please contact an admin out-of-game to let them know so we can accommodate this.")
|
||||
return 0
|
||||
else if(config.ipr_block_bad_ips) //We don't allow players of any particular age
|
||||
else if(CONFIG_GET(flag/ipr_block_bad_ips)) //We don't allow players of any particular age
|
||||
disconnect_with_message("Sorry, we do not accept connections from users via VPN/Proxy/Tor connections. If you believe this is in error, contact an admin out-of-game.")
|
||||
return 0
|
||||
else
|
||||
@@ -487,7 +487,7 @@
|
||||
src << browse('code/modules/asset_cache/validate_assets.html', "window=asset_cache_browser")
|
||||
|
||||
//Precache the client with all other assets slowly, so as to not block other browse() calls
|
||||
if (config.asset_simple_preload)
|
||||
if (CONFIG_GET(flag/asset_simple_preload))
|
||||
addtimer(CALLBACK(SSassets.transport, TYPE_PROC_REF(/datum/asset_transport, send_assets_slow), src, SSassets.transport.preload), 5 SECONDS)
|
||||
|
||||
/mob/proc/MayRespawn()
|
||||
@@ -534,7 +534,7 @@
|
||||
//You're welcome to replace this proc with your own that does your own cool stuff.
|
||||
//Just set the client's ip_reputation var and make sure it makes sense with your config settings (higher numbers are worse results)
|
||||
/client/proc/update_ip_reputation()
|
||||
var/request = "https://check.getipintel.net/check.php?ip=[address]&contact=[config.ipr_email]"
|
||||
var/request = "https://check.getipintel.net/check.php?ip=[address]&contact=[CONFIG_GET(string/ipr_email)]"
|
||||
var/http[] = world.Export(request)
|
||||
|
||||
/* Debug
|
||||
@@ -550,7 +550,7 @@
|
||||
//429 is rate limit exceeded
|
||||
if(text2num(http["STATUS"]) == 429)
|
||||
log_and_message_admins("getipintel.net reports HTTP status 429. IP reputation checking is now disabled. If you see this, let a developer know.")
|
||||
config.ip_reputation = FALSE
|
||||
CONFIG_SET(flag/ip_reputation, FALSE)
|
||||
return FALSE
|
||||
|
||||
var/content = file2text(http["CONTENT"]) //world.Export actually returns a file object in CONTENT
|
||||
@@ -581,7 +581,7 @@
|
||||
|
||||
log_and_message_admins(ipr_error)
|
||||
if(fatal)
|
||||
config.ip_reputation = FALSE
|
||||
CONFIG_SET(flag/ip_reputation, FALSE)
|
||||
log_and_message_admins("With this error, IP reputation checking is disabled for this shift. Let a developer know.")
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
|
||||
//Service returns a single float in html body
|
||||
/client/proc/ipr_getipintel()
|
||||
if(!config.ipr_email)
|
||||
if(!CONFIG_GET(string/ipr_email))
|
||||
return -1
|
||||
|
||||
var/request = "https://check.getipintel.net/check.php?ip=[address]&contact=[config.ipr_email]"
|
||||
var/request = "https://check.getipintel.net/check.php?ip=[address]&contact=[CONFIG_GET(string/ipr_email)]"
|
||||
var/http[] = world.Export(request)
|
||||
|
||||
if(!http || !islist(http)) //If we couldn't check, the service might be down, fail-safe.
|
||||
@@ -30,7 +30,7 @@
|
||||
//429 is rate limit exceeded
|
||||
if(text2num(http["STATUS"]) == 429)
|
||||
log_and_message_admins("getipintel.net reports HTTP status 429. IP reputation checking is now disabled. If you see this, let a developer know.")
|
||||
config.ip_reputation = FALSE
|
||||
CONFIG_SET(flag/ip_reputation, FALSE)
|
||||
return -1
|
||||
|
||||
var/content = file2text(http["CONTENT"]) //world.Export actually returns a file object in CONTENT
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
log_and_message_admins(ipr_error)
|
||||
if(fatal)
|
||||
config.ip_reputation = FALSE
|
||||
CONFIG_SET(flag/ip_reputation, FALSE)
|
||||
log_and_message_admins("With this error, IP reputation checking is disabled for this shift. Let a developer know.")
|
||||
return -1
|
||||
|
||||
@@ -71,10 +71,10 @@
|
||||
|
||||
//Service returns JSON in html body
|
||||
/client/proc/ipr_ipqualityscore()
|
||||
if(!config.ipqualityscore_apikey)
|
||||
if(!CONFIG_GET(string/ipqualityscore_apikey))
|
||||
return -1
|
||||
|
||||
var/request = "https://www.ipqualityscore.com/api/json/ip/[config.ipqualityscore_apikey]/[address]?strictness=1&fast=true&byond_key=[key]"
|
||||
var/request = "https://www.ipqualityscore.com/api/json/ip/[CONFIG_GET(string/ipqualityscore_apikey)]/[address]?strictness=1&fast=true&byond_key=[key]"
|
||||
var/http[] = world.Export(request)
|
||||
|
||||
if(!http || !islist(http)) //If we couldn't check, the service might be down, fail-safe.
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
// Moved from /datum/preferences/proc/copy_to()
|
||||
/datum/category_item/player_setup_item/general/basic/copy_to_mob(var/mob/living/carbon/human/character)
|
||||
if(config.humans_need_surnames)
|
||||
if(CONFIG_GET(flag/humans_need_surnames))
|
||||
var/firstspace = findtext(pref.real_name, " ")
|
||||
var/name_length = length(pref.real_name)
|
||||
if(!firstspace) //we need a surname
|
||||
@@ -93,7 +93,7 @@
|
||||
. += span_bold("Pronouns:") + " <a href='?src=\ref[src];id_gender=1'><b>[gender2text(pref.identifying_gender)]</b></a><br>"
|
||||
. += span_bold("Age:") + " <a href='?src=\ref[src];age=1'>[pref.age]</a> <b>Birthday:</b> <a href='?src=\ref[src];bday_month=1'>[pref.bday_month]</a><b>/</b><a href='?src=\ref[src];bday_day=1'>[pref.bday_day]</a> - <b>Announce?:</b> <a href='?src=\ref[src];bday_announce=1'>[pref.bday_announce ? "Yes" : "No"]</a><br>"
|
||||
. += span_bold("Spawn Point") + ": <a href='?src=\ref[src];spawnpoint=1'>[pref.spawnpoint]</a><br>"
|
||||
if(config.allow_Metadata)
|
||||
if(CONFIG_GET(flag/allow_metadata))
|
||||
. += span_bold("OOC Notes: <a href='?src=\ref[src];edit_ooc_notes=1'>Edit</a><a href='?src=\ref[src];edit_ooc_note_likes=1'>Likes</a><a href='?src=\ref[src];edit_ooc_note_dislikes=1'>Dislikes</a>") + "<br>"
|
||||
. = jointext(.,null)
|
||||
|
||||
|
||||
@@ -52,7 +52,8 @@
|
||||
pref.alternate_languages -= language
|
||||
|
||||
if(isnull(pref.language_prefixes) || !pref.language_prefixes.len)
|
||||
pref.language_prefixes = config.language_prefixes.Copy()
|
||||
var/list/prefixes = CONFIG_GET(str_list/language_prefixes)
|
||||
pref.language_prefixes = prefixes.Copy()
|
||||
for(var/prefix in pref.language_prefixes)
|
||||
if(prefix in forbidden_prefixes)
|
||||
pref.language_prefixes -= prefix
|
||||
@@ -148,7 +149,8 @@
|
||||
pref.language_prefixes = keys
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["reset_prefix"])
|
||||
pref.language_prefixes = config.language_prefixes.Copy()
|
||||
var/list/prefixes = CONFIG_GET(str_list/language_prefixes)
|
||||
pref.language_prefixes = prefixes.Copy()
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["set_custom_key"])
|
||||
|
||||
@@ -179,4 +179,4 @@
|
||||
return ..()
|
||||
|
||||
/datum/category_item/player_setup_item/player_global/ui/proc/can_select_ooc_color(var/mob/user)
|
||||
return config.allow_admin_ooccolor && check_rights(R_ADMIN|R_EVENT|R_FUN, 0, user)
|
||||
return CONFIG_GET(flag/allow_admin_ooccolor) && check_rights(R_ADMIN|R_EVENT|R_FUN, 0, user)
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
/datum/category_item/player_setup_item/player_global/settings/sanitize_preferences()
|
||||
pref.lastchangelog = sanitize_text(pref.lastchangelog, initial(pref.lastchangelog))
|
||||
pref.lastnews = sanitize_text(pref.lastnews, initial(pref.lastnews))
|
||||
pref.default_slot = sanitize_integer(pref.default_slot, 1, config.character_slots, initial(pref.default_slot))
|
||||
pref.default_slot = sanitize_integer(pref.default_slot, 1, CONFIG_GET(number/character_slots), initial(pref.default_slot))
|
||||
|
||||
@@ -80,10 +80,10 @@ var/list/gear_datums = list()
|
||||
for(var/gear_name in gear_datums)
|
||||
var/datum/gear/G = gear_datums[gear_name]
|
||||
|
||||
if(G.whitelisted && config.loadout_whitelist != LOADOUT_WHITELIST_OFF && pref.client) //VOREStation Edit.
|
||||
if(config.loadout_whitelist == LOADOUT_WHITELIST_STRICT && G.whitelisted != pref.species)
|
||||
if(G.whitelisted && CONFIG_GET(flag/loadout_whitelist) != LOADOUT_WHITELIST_OFF && pref.client) //VOREStation Edit.
|
||||
if(CONFIG_GET(flag/loadout_whitelist) == LOADOUT_WHITELIST_STRICT && G.whitelisted != pref.species)
|
||||
continue
|
||||
if(config.loadout_whitelist == LOADOUT_WHITELIST_LAX && !is_alien_whitelisted(preference_mob(), GLOB.all_species[G.whitelisted]))
|
||||
if(CONFIG_GET(flag/loadout_whitelist) == LOADOUT_WHITELIST_LAX && !is_alien_whitelisted(preference_mob(), GLOB.all_species[G.whitelisted]))
|
||||
continue
|
||||
if(max_cost && G.cost > max_cost)
|
||||
continue
|
||||
@@ -236,14 +236,14 @@ var/list/gear_datums = list()
|
||||
if(href_list["next_slot"])
|
||||
//change the current slot number
|
||||
pref.gear_slot = pref.gear_slot+1
|
||||
if(pref.gear_slot>config.loadout_slots)
|
||||
if(pref.gear_slot > CONFIG_GET(number/loadout_slots))
|
||||
pref.gear_slot = 1
|
||||
//If we're moving down a slot..
|
||||
else if(href_list["prev_slot"])
|
||||
//change current slot one down
|
||||
pref.gear_slot = pref.gear_slot-1
|
||||
if(pref.gear_slot<1)
|
||||
pref.gear_slot = config.loadout_slots
|
||||
pref.gear_slot = CONFIG_GET(number/loadout_slots)
|
||||
// Set the currently selected gear to whatever's in the new slot
|
||||
if(pref.gear_list["[pref.gear_slot]"])
|
||||
pref.gear = pref.gear_list["[pref.gear_slot]"]
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
dat += "You answer to <b>[job.supervisors]</b> normally."
|
||||
|
||||
dat += "<hr style='clear:left;'>"
|
||||
if(config.wikiurl)
|
||||
if(CONFIG_GET(string/wikiurl))
|
||||
dat += "<a href='?src=\ref[src];job_wiki=[rank]'>Open wiki page in browser</a>"
|
||||
|
||||
var/alt_title = pref.GetPlayerAltTitle(job)
|
||||
@@ -281,7 +281,7 @@
|
||||
|
||||
else if(href_list["job_wiki"])
|
||||
var/rank = href_list["job_wiki"]
|
||||
open_link(user,"[config.wikiurl][rank]")
|
||||
open_link(user,"[CONFIG_GET(string/wikiurl)][rank]")
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -372,8 +372,8 @@ var/list/preferences_datums = list()
|
||||
if(!istype(user, /mob/new_player)) return
|
||||
|
||||
if(href_list["preference"] == "open_whitelist_forum")
|
||||
if(config.forumurl)
|
||||
user << link(config.forumurl)
|
||||
if(CONFIG_GET(string/forumurl))
|
||||
user << link(CONFIG_GET(string/forumurl))
|
||||
else
|
||||
to_chat(user, span_danger("The forum URL is not set in the server configuration."))
|
||||
return
|
||||
@@ -460,7 +460,7 @@ var/list/preferences_datums = list()
|
||||
var/default
|
||||
var/list/charlist = list()
|
||||
|
||||
for(var/i in 1 to config.character_slots)
|
||||
for(var/i in 1 to CONFIG_GET(number/character_slots))
|
||||
var/list/save_data = savefile.get_entry("character[i]", list())
|
||||
var/name = save_data["real_name"]
|
||||
var/nickname = save_data["nickname"]
|
||||
@@ -501,7 +501,7 @@ var/list/preferences_datums = list()
|
||||
|
||||
var/list/charlist = list()
|
||||
|
||||
for(var/i in 1 to config.character_slots)
|
||||
for(var/i in 1 to CONFIG_GET(number/character_slots))
|
||||
var/list/save_data = savefile.get_entry("character[i]", list())
|
||||
var/name = save_data["real_name"]
|
||||
var/nickname = save_data["nickname"]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/datum/preferences/proc/migration_14_nifs(datum/json_savefile/S)
|
||||
var/datum/json_savefile/new_savefile = new /datum/json_savefile(nif_savefile_path(client_ckey))
|
||||
|
||||
for(var/slot in 1 to config.character_slots)
|
||||
for(var/slot in 1 to CONFIG_GET(number/character_slots))
|
||||
var/list/prefs = S.get_entry("character[slot]", null)
|
||||
if(!islist(prefs))
|
||||
continue
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/datum/preferences/proc/migration_15_nif_path(datum/json_savefile/S)
|
||||
var/datum/json_savefile/new_savefile = new /datum/json_savefile(nif_savefile_path(client_ckey))
|
||||
|
||||
for(var/slot in 1 to config.character_slots)
|
||||
for(var/slot in 1 to CONFIG_GET(number/character_slots))
|
||||
var/list/prefs = new_savefile.get_entry("character[slot]", null)
|
||||
if(!islist(prefs))
|
||||
continue
|
||||
|
||||
@@ -204,7 +204,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
if(!slot)
|
||||
slot = default_slot
|
||||
|
||||
slot = sanitize_integer(slot, 1, config.character_slots, initial(default_slot))
|
||||
slot = sanitize_integer(slot, 1, CONFIG_GET(number/character_slots), initial(default_slot))
|
||||
if(slot != default_slot)
|
||||
default_slot = slot
|
||||
savefile.set_entry("default_slot", slot)
|
||||
@@ -261,7 +261,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
|
||||
// This basically just changes default_slot without loading the correct data, so the next save call will overwrite
|
||||
// the slot
|
||||
slot = sanitize_integer(slot, 1, config.character_slots, initial(default_slot))
|
||||
slot = sanitize_integer(slot, 1, CONFIG_GET(number/character_slots), initial(default_slot))
|
||||
if(slot != default_slot)
|
||||
default_slot = slot
|
||||
nif_path = nif_durability = nif_savedata = null //VOREStation Add - Don't copy NIF
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
/datum/preferences/proc/create_character_profiles()
|
||||
var/list/profiles = list()
|
||||
|
||||
for(var/index in 1 to config.character_slots)
|
||||
for(var/index in 1 to CONFIG_GET(number/character_slots))
|
||||
// TODO: It won't be updated in the savefile yet, so just read the name directly
|
||||
// if(index == default_slot)
|
||||
// profiles += read_preference(/datum/preference/name/real_name)
|
||||
|
||||
@@ -20,26 +20,26 @@
|
||||
return
|
||||
|
||||
if(!holder)
|
||||
if(!config.ooc_allowed)
|
||||
if(!CONFIG_GET(flag/ooc_allowed))
|
||||
to_chat(src, span_danger("OOC is globally muted."))
|
||||
return
|
||||
if(!config.dooc_allowed && (mob.stat == DEAD))
|
||||
if(!CONFIG_GET(flag/dooc_allowed) && (mob.stat == DEAD))
|
||||
to_chat(usr, span_danger("OOC for dead mobs has been turned off."))
|
||||
return
|
||||
if(prefs.muted & MUTE_OOC)
|
||||
to_chat(src, span_danger("You cannot use OOC (muted)."))
|
||||
return
|
||||
if(findtext(msg, "byond://") && !config.allow_byond_links)
|
||||
if(findtext(msg, "byond://") && !CONFIG_GET(flag/allow_byond_links))
|
||||
to_chat(src, span_bold("Advertising other servers is not allowed."))
|
||||
log_admin("[key_name(src)] has attempted to advertise in OOC: [msg]")
|
||||
message_admins("[key_name_admin(src)] has attempted to advertise in OOC: [msg]")
|
||||
return
|
||||
if(findtext(msg, "discord.gg") && !config.allow_discord_links)
|
||||
if(findtext(msg, "discord.gg") && !CONFIG_GET(flag/allow_discord_links))
|
||||
to_chat(src, span_bold("Advertising discords is not allowed."))
|
||||
log_admin("[key_name(src)] has attempted to advertise a discord server in OOC: [msg]")
|
||||
message_admins("[key_name_admin(src)] has attempted to advertise a discord server in OOC: [msg]")
|
||||
return
|
||||
if((findtext(msg, "http://") || findtext(msg, "https://")) && !config.allow_url_links)
|
||||
if((findtext(msg, "http://") || findtext(msg, "https://")) && !CONFIG_GET(flag/allow_url_links))
|
||||
to_chat(src, span_bold("Posting external links is not allowed."))
|
||||
log_admin("[key_name(src)] has attempted to post a link in OOC: [msg]")
|
||||
message_admins("[key_name_admin(src)] has attempted to post a link in OOC: [msg]")
|
||||
@@ -76,7 +76,7 @@
|
||||
display_name = "[holder.fakekey]/([src.key])"
|
||||
else
|
||||
display_name = holder.fakekey
|
||||
if(holder && !holder.fakekey && (holder.rights & R_ADMIN|R_FUN|R_EVENT) && config.allow_admin_ooccolor && (src.prefs.ooccolor != initial(src.prefs.ooccolor))) // keeping this for the badmins
|
||||
if(holder && !holder.fakekey && (holder.rights & R_ADMIN|R_FUN|R_EVENT) && CONFIG_GET(flag/allow_admin_ooccolor) && (src.prefs.ooccolor != initial(src.prefs.ooccolor))) // keeping this for the badmins
|
||||
to_chat(target, span_ooc("<font color='[src.prefs.ooccolor]'>" + create_text_tag("ooc", "OOC:", target) + " <EM>[display_name]:</EM> [span_message(msg)]</font>"))
|
||||
else
|
||||
to_chat(target, span_ooc("<span class='[ooc_style]'>" + create_text_tag("ooc", "OOC:", target) + " <EM>[display_name]:</EM> " + span_message(msg)) + "</span>")
|
||||
@@ -106,26 +106,26 @@
|
||||
return
|
||||
|
||||
if(!holder)
|
||||
if(!config.looc_allowed)
|
||||
if(!CONFIG_GET(flag/looc_allowed))
|
||||
to_chat(src, span_danger("LOOC is globally muted."))
|
||||
return
|
||||
if(!config.dooc_allowed && (mob.stat == DEAD))
|
||||
if(!CONFIG_GET(flag/dooc_allowed) && (mob.stat == DEAD))
|
||||
to_chat(usr, span_danger("OOC for dead mobs has been turned off."))
|
||||
return
|
||||
if(prefs.muted & MUTE_LOOC)
|
||||
to_chat(src, span_danger("You cannot use OOC (muted)."))
|
||||
return
|
||||
if(findtext(msg, "byond://") && !config.allow_byond_links)
|
||||
if(findtext(msg, "byond://") && !CONFIG_GET(flag/allow_byond_links))
|
||||
to_chat(src, span_bold("Advertising other servers is not allowed."))
|
||||
log_admin("[key_name(src)] has attempted to advertise in OOC: [msg]")
|
||||
message_admins("[key_name_admin(src)] has attempted to advertise in OOC: [msg]")
|
||||
return
|
||||
if(findtext(msg, "discord.gg") && !config.allow_discord_links)
|
||||
if(findtext(msg, "discord.gg") && !CONFIG_GET(flag/allow_discord_links))
|
||||
to_chat(src, span_bold("Advertising discords is not allowed."))
|
||||
log_admin("[key_name(src)] has attempted to advertise a discord server in OOC: [msg]")
|
||||
message_admins("[key_name_admin(src)] has attempted to advertise a discord server in OOC: [msg]")
|
||||
return
|
||||
if((findtext(msg, "http://") || findtext(msg, "https://")) && !config.allow_url_links)
|
||||
if((findtext(msg, "http://") || findtext(msg, "https://")) && !CONFIG_GET(flag/allow_url_links))
|
||||
to_chat(src, span_bold("Posting external links is not allowed."))
|
||||
log_admin("[key_name(src)] has attempted to post a link in OOC: [msg]")
|
||||
message_admins("[key_name_admin(src)] has attempted to post a link in OOC: [msg]")
|
||||
|
||||
@@ -113,13 +113,13 @@
|
||||
|
||||
msg = span_bold("Current Admins ([num_admins_online]):") + "\n" + msg
|
||||
|
||||
if(config.show_mods)
|
||||
if(CONFIG_GET(flag/show_mods))
|
||||
msg += "\n" + span_bold(" Current Game Masters ([num_mods_online]):") + "\n" + modmsg
|
||||
|
||||
if(config.show_devs)
|
||||
if(CONFIG_GET(flag/show_devs))
|
||||
msg += "\n" + span_bold(" Current Developers ([num_devs_online]):") + "\n" + devmsg
|
||||
|
||||
if(config.show_event_managers)
|
||||
if(CONFIG_GET(flag/show_event_managers))
|
||||
msg += "\n" + span_bold(" Current Miscellaneous ([num_event_managers_online]):") + "\n" + eventMmsg
|
||||
|
||||
var/num_mentors_online = 0
|
||||
@@ -141,7 +141,7 @@
|
||||
mmsg += " (AFK - [round(seconds / 60)] minutes, [seconds % 60] seconds)"
|
||||
mmsg += "\n"
|
||||
|
||||
if(config.show_mentors)
|
||||
if(CONFIG_GET(flag/show_mentors))
|
||||
msg += "\n" + span_bold(" Current Mentors ([num_mentors_online]):") + "\n" + mmsg
|
||||
|
||||
msg += "\n" + span_info("Adminhelps are also sent to Discord. If no admins are available in game try anyway and an admin on Discord may see it and respond.")
|
||||
|
||||
@@ -28,7 +28,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
|
||||
if(!next_event_time)
|
||||
set_event_delay()
|
||||
|
||||
if(delayed || !config.allow_random_events)
|
||||
if(delayed || !CONFIG_GET(flag/allow_random_events))
|
||||
next_event_time += (world.time - last_world_time)
|
||||
else if(world.time > next_event_time)
|
||||
start_event()
|
||||
@@ -85,16 +85,26 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
|
||||
var/last_time = last_event_time[EM]
|
||||
if(last_time)
|
||||
var/time_passed = world.time - last_time
|
||||
var/weight_modifier = max(0, round((config.expected_round_length - time_passed) / 300))
|
||||
var/weight_modifier = max(0, round((CONFIG_GET(number/expected_round_length) - time_passed) / 300))
|
||||
weight = weight - weight_modifier
|
||||
|
||||
return weight
|
||||
|
||||
/datum/event_container/proc/set_event_delay()
|
||||
var/list/event_delays
|
||||
|
||||
switch(severity)
|
||||
if(EVENT_LEVEL_MUNDANE)
|
||||
event_delays = CONFIG_GET(keyed_list/event_first_run_mundane)
|
||||
if(EVENT_LEVEL_MODERATE)
|
||||
event_delays = CONFIG_GET(keyed_list/event_first_run_moderate)
|
||||
if(EVENT_LEVEL_MAJOR)
|
||||
event_delays = CONFIG_GET(keyed_list/event_first_run_major)
|
||||
|
||||
// If the next event time has not yet been set and we have a custom first time start
|
||||
if(next_event_time == 0 && config.event_first_run[severity])
|
||||
var/lower = config.event_first_run[severity]["lower"]
|
||||
var/upper = config.event_first_run[severity]["upper"]
|
||||
if(next_event_time == 0 && event_delays)
|
||||
var/lower = (event_delays["lower"] MINUTES)
|
||||
var/upper = (event_delays["upper"] MINUTES)
|
||||
var/event_delay = rand(lower, upper)
|
||||
next_event_time = world.time + event_delay
|
||||
// Otherwise, follow the standard setup process
|
||||
@@ -113,7 +123,7 @@ var/global/list/severity_to_string = list(EVENT_LEVEL_MUNDANE = "Mundane", EVENT
|
||||
playercount_modifier = 0.8
|
||||
playercount_modifier = playercount_modifier * delay_modifier
|
||||
|
||||
var/event_delay = rand(config.event_delay_lower[severity], config.event_delay_upper[severity]) * playercount_modifier
|
||||
var/event_delay = rand(CONFIG_GET(number_list/event_delay_lower)[severity] MINUTES, CONFIG_GET(number_list/event_delay_upper)[severity] MINUTES) * playercount_modifier
|
||||
next_event_time = world.time + event_delay
|
||||
|
||||
log_debug("Next event of severity [severity_to_string[severity]] in [(next_event_time - world.time)/600] minutes.")
|
||||
|
||||
@@ -24,7 +24,7 @@ var/list/event_last_fired = list()
|
||||
|
||||
//Always triggers an event when called, dynamically chooses events based on job population
|
||||
/proc/spawn_dynamic_event()
|
||||
if(!config.allow_random_events)
|
||||
if(!CONFIG_GET(flag/allow_random_events))
|
||||
return
|
||||
|
||||
var/minutes_passed = world.time/600
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
/datum/controller/subsystem/events/proc/GetInteractWindow()
|
||||
var/html = "<A align='right' href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||
html += "<A align='right' href='?src=\ref[src];pause_all=[!config.allow_random_events]'>Pause All - [config.allow_random_events ? "Pause" : "Resume"]</A>"
|
||||
html += "<A align='right' href='?src=\ref[src];pause_all=[!CONFIG_GET(flag/allow_random_events)]'>Pause All - [CONFIG_GET(flag/allow_random_events) ? "Pause" : "Resume"]</A>"
|
||||
|
||||
if(selected_event_container)
|
||||
var/event_time = max(0, selected_event_container.next_event_time - world.time)
|
||||
@@ -153,8 +153,8 @@
|
||||
EC.delayed = !EC.delayed
|
||||
log_and_message_admins("has [EC.delayed ? "paused" : "resumed"] countdown for [severity_to_string[EC.severity]] events.")
|
||||
else if(href_list["pause_all"])
|
||||
config.allow_random_events = text2num(href_list["pause_all"])
|
||||
log_and_message_admins("has [config.allow_random_events ? "resumed" : "paused"] countdown for all events.")
|
||||
CONFIG_SET(flag/allow_random_events, text2num(href_list["pause_all"]))
|
||||
log_and_message_admins("has [CONFIG_GET(flag/allow_random_events) ? "resumed" : "paused"] countdown for all events.")
|
||||
else if(href_list["interval"])
|
||||
var/delay = tgui_input_number(usr, "Enter delay modifier. A value less than one means events fire more often, higher than one less often.", "Set Interval Modifier")
|
||||
if(delay && delay > 0)
|
||||
|
||||
@@ -26,16 +26,16 @@
|
||||
*/
|
||||
|
||||
/proc/send2mainirc(var/msg)
|
||||
if(config.main_irc)
|
||||
send2irc(config.main_irc, msg)
|
||||
if(CONFIG_GET(string/main_irc))
|
||||
send2irc(CONFIG_GET(string/main_irc), msg)
|
||||
return
|
||||
|
||||
/proc/send2adminirc(var/msg)
|
||||
if(config.admin_irc)
|
||||
send2irc(config.admin_irc, msg)
|
||||
if(CONFIG_GET(string/admin_irc))
|
||||
send2irc(CONFIG_GET(string/admin_irc), msg)
|
||||
return
|
||||
|
||||
|
||||
/hook/startup/proc/ircNotify()
|
||||
send2mainirc("Server starting up on byond://[config.serverurl ? config.serverurl : (config.server ? config.server : "[world.address]:[world.port]")]")
|
||||
send2mainirc("Server starting up on byond://[CONFIG_GET(string/serverurl) ? CONFIG_GET(string/serverurl) : (CONFIG_GET(string/server) ? CONFIG_GET(string/server) : "[world.address]:[world.port]")]")
|
||||
return 1
|
||||
|
||||
@@ -131,9 +131,9 @@ Book Cart End
|
||||
/obj/structure/bookcase/manuals/medical/New()
|
||||
..()
|
||||
new /obj/item/book/manual/medical_cloning(src)
|
||||
new /obj/item/book/manual/medical_diagnostics_manual(src)
|
||||
new /obj/item/book/manual/medical_diagnostics_manual(src)
|
||||
new /obj/item/book/manual/medical_diagnostics_manual(src)
|
||||
new /obj/item/book/manual/wiki/medical_diagnostics_manual(src)
|
||||
new /obj/item/book/manual/wiki/medical_diagnostics_manual(src)
|
||||
new /obj/item/book/manual/wiki/medical_diagnostics_manual(src)
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -142,10 +142,10 @@ Book Cart End
|
||||
|
||||
/obj/structure/bookcase/manuals/engineering/New()
|
||||
..()
|
||||
new /obj/item/book/manual/engineering_construction(src)
|
||||
new /obj/item/book/manual/wiki/engineering_construction(src)
|
||||
new /obj/item/book/manual/engineering_particle_accelerator(src)
|
||||
new /obj/item/book/manual/engineering_hacking(src)
|
||||
new /obj/item/book/manual/engineering_guide(src)
|
||||
new /obj/item/book/manual/wiki/engineering_hacking(src)
|
||||
new /obj/item/book/manual/wiki/engineering_guide(src)
|
||||
new /obj/item/book/manual/atmospipes(src)
|
||||
new /obj/item/book/manual/engineering_singularity_safety(src)
|
||||
new /obj/item/book/manual/evaguide(src)
|
||||
@@ -199,7 +199,7 @@ Book Cart End
|
||||
to_chat(user, span_notice("The pages of [title] have been cut out!"))
|
||||
return
|
||||
if(src.dat)
|
||||
user << browse("<TT><I>Penned by [author].</I></TT> <BR>" + "[dat]", "window=book")
|
||||
display_content(user)
|
||||
user.visible_message("[user] opens a book titled \"[src.title]\" and begins reading intently.")
|
||||
playsound(src, 'sound/bureaucracy/bookopen.ogg', 50, 1)
|
||||
onclose(user, "book")
|
||||
@@ -207,6 +207,9 @@ Book Cart End
|
||||
else
|
||||
to_chat(user, "This book is completely blank!")
|
||||
|
||||
/obj/item/book/proc/display_content(mob/living/user)
|
||||
user << browse("<TT><I>Penned by [author].</I></TT> <BR>" + "[dat]", "window=book")
|
||||
|
||||
/obj/item/book/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(carved)
|
||||
if(!store)
|
||||
@@ -297,7 +300,7 @@ Book Cart End
|
||||
if(user.zone_sel.selecting == O_EYES)
|
||||
user.visible_message(span_notice("You open up the book and show it to [M]."), \
|
||||
span_notice(" [user] opens up a book and shows it to [M]."))
|
||||
M << browse("<TT><I>Penned by [author].</I></TT> <BR>" + "[dat]", "window=book")
|
||||
display_content(M)
|
||||
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN) //to prevent spam
|
||||
|
||||
/*
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<A href='?src=\ref[src];setauthor=1'>Filter by Author: [author]</A><BR>
|
||||
<A href='?src=\ref[src];search=1'>\[Start Search\]</A><BR>"}
|
||||
if(1)
|
||||
establish_old_db_connection()
|
||||
establish_db_connection()
|
||||
if(!dbcon_old.IsConnected())
|
||||
dat += span_red(span_bold("ERROR") + ": Unable to contact External Archive. Please contact your system administrator for assistance.") + "<BR>"
|
||||
else if(!SQLquery)
|
||||
@@ -273,7 +273,7 @@
|
||||
<A href='?src=\ref[src];switchscreen=0'>No.</A><BR>"}
|
||||
if(8)
|
||||
dat += "<h3>External Archive</h3>" //VOREStation Edit
|
||||
establish_old_db_connection()
|
||||
establish_db_connection()
|
||||
|
||||
//dat += "<h3>" + span_red("arning: System Administrator has slated this archive for removal. Personal uploads should be taken to the NT board of internal literature.") + "</h3>" //VOREStation Removal
|
||||
|
||||
@@ -316,7 +316,7 @@
|
||||
var/dat = "<HEAD><TITLE>Book Inventory Management</TITLE></HEAD><BODY>\n" // <META HTTP-EQUIV='Refresh' CONTENT='10'>
|
||||
|
||||
dat += "<h3>ADMINISTRATIVE MANAGEMENT</h3>"
|
||||
establish_old_db_connection()
|
||||
establish_db_connection()
|
||||
|
||||
if(!dbcon_old.IsConnected())
|
||||
dat += span_red(span_bold("ERROR") + ": Unable to contact External Archive. Please contact your system administrator for assistance.")
|
||||
@@ -436,7 +436,7 @@
|
||||
if(scanner.cache.unique)
|
||||
tgui_alert_async(usr, "This book has been rejected from the database. Aborting!")
|
||||
else
|
||||
establish_old_db_connection()
|
||||
establish_db_connection()
|
||||
if(!dbcon_old.IsConnected())
|
||||
tgui_alert_async(usr, "Connection to Archive has been severed. Aborting.")
|
||||
else
|
||||
@@ -460,7 +460,7 @@
|
||||
|
||||
if(href_list["targetid"])
|
||||
var/sqlid = sanitizeSQL(href_list["targetid"])
|
||||
establish_old_db_connection()
|
||||
establish_db_connection()
|
||||
if(!dbcon_old.IsConnected())
|
||||
tgui_alert_async(usr, "Connection to Archive has been severed. Aborting.")
|
||||
if(bibledelay)
|
||||
@@ -491,7 +491,7 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/sqlid = sanitizeSQL(href_list["delid"])
|
||||
establish_old_db_connection()
|
||||
establish_db_connection()
|
||||
if(!dbcon_old.IsConnected())
|
||||
tgui_alert_async(usr, "Connection to Archive has been severed. Aborting.")
|
||||
else
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
affected_turf.lighting_object = src
|
||||
affected_turf.set_luminosity(0)
|
||||
|
||||
if(config.starlight)
|
||||
if(CONFIG_GET(flag/starlight))
|
||||
for(var/turf/space/space_tile in RANGE_TURFS(1, affected_turf))
|
||||
space_tile.update_starlight()
|
||||
|
||||
|
||||
@@ -232,7 +232,7 @@
|
||||
specific_sanity--
|
||||
|
||||
var/orientation
|
||||
if(chosen_template.fixed_orientation || !config.random_submap_orientation)
|
||||
if(chosen_template.fixed_orientation || !CONFIG_GET(flag/random_submap_orientation))
|
||||
orientation = 0
|
||||
else
|
||||
orientation = pick(list(0, 90, 180, 270))
|
||||
|
||||
@@ -132,7 +132,7 @@
|
||||
|
||||
for(var/obj/item/organ/E in H.bad_external_organs) // Fix bones
|
||||
var/obj/item/organ/external/affected = E
|
||||
if((affected.damage < affected.min_broken_damage * config.organ_health_multiplier) && (affected.status & ORGAN_BROKEN))
|
||||
if((affected.damage < affected.min_broken_damage * CONFIG_GET(number/organ_health_multiplier)) && (affected.status & ORGAN_BROKEN))
|
||||
affected.status &= ~ORGAN_BROKEN
|
||||
|
||||
for(var/datum/wound/W in affected.wounds) // Fix IB
|
||||
|
||||
@@ -207,7 +207,7 @@ Works together with spawning an observer, noted above.
|
||||
B.update()
|
||||
if(ghost.client)
|
||||
ghost.client.time_died_as_mouse = ghost.timeofdeath
|
||||
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 && !CONFIG_GET(flag/antag_hud_allowed)) // For new ghosts we remove the verb from even showing up if it's not allowed.
|
||||
remove_verb(ghost, /mob/observer/dead/verb/toggle_antagHUD) // Poor guys, don't know what they are missing!
|
||||
return ghost
|
||||
|
||||
@@ -322,13 +322,13 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set name = "Toggle AntagHUD"
|
||||
set desc = "Toggles AntagHUD allowing you to see who is the antagonist"
|
||||
|
||||
if(!config.antag_hud_allowed && !client.holder)
|
||||
if(!CONFIG_GET(flag/antag_hud_allowed) && !client.holder)
|
||||
to_chat(src, span_filter_notice(span_red("Admins have disabled this for this round.")))
|
||||
return
|
||||
if(jobban_isbanned(src, JOB_ANTAGHUD))
|
||||
to_chat(src, span_filter_notice(span_red(span_bold("You have been banned from using this feature"))))
|
||||
return
|
||||
if(config.antag_hud_restricted && !has_enabled_antagHUD && !client.holder)
|
||||
if(CONFIG_GET(flag/antag_hud_restricted) && !has_enabled_antagHUD && !client.holder)
|
||||
var/response = tgui_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?",list("Yes","No"))
|
||||
if(response != "Yes") return
|
||||
can_reenter_corpse = FALSE
|
||||
@@ -649,7 +649,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set name = "Become mouse"
|
||||
set category = "Ghost"
|
||||
|
||||
if(config.disable_player_mice)
|
||||
if(CONFIG_GET(flag/disable_player_mice))
|
||||
to_chat(src, span_warning("Spawning as a mouse is currently disabled."))
|
||||
return
|
||||
|
||||
@@ -692,7 +692,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
to_chat(src, span_warning("Unable to find any unwelded vents to spawn mice at."))
|
||||
|
||||
if(host)
|
||||
if(config.uneducated_mice)
|
||||
if(CONFIG_GET(flag/uneducated_mice))
|
||||
host.universal_understand = 0
|
||||
announce_ghost_joinleave(src, 0, "They are now a mouse.")
|
||||
host.ckey = src.ckey
|
||||
@@ -722,7 +722,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set name = "Write in blood"
|
||||
set desc = "If the round is sufficiently spooky, write a short message in blood on the floor or a wall. Remember, no IC in OOC or OOC in IC."
|
||||
|
||||
if(!(config.cult_ghostwriter))
|
||||
if(!CONFIG_GET(flag/cult_ghostwriter))
|
||||
to_chat(src, span_filter_notice(span_red("That verb is not currently permitted.")))
|
||||
return
|
||||
|
||||
@@ -734,7 +734,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
var/ghosts_can_write
|
||||
if(ticker.mode.name == "cult")
|
||||
if(cult.current_antagonists.len > config.cult_ghostwriter_req_cultists)
|
||||
if(cult.current_antagonists.len > CONFIG_GET(number/cult_ghostwriter_req_cultists))
|
||||
ghosts_can_write = 1
|
||||
|
||||
if(!ghosts_can_write && !check_rights(R_ADMIN|R_EVENT|R_FUN, 0)) //Let's allow for admins to write in blood for events and the such.
|
||||
@@ -905,7 +905,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(feedback)
|
||||
to_chat(src, span_warning("Your non-dead body prevent you from respawning."))
|
||||
return 0
|
||||
if(config.antag_hud_restricted && has_enabled_antagHUD == 1)
|
||||
if(CONFIG_GET(flag/antag_hud_restricted) && has_enabled_antagHUD == 1)
|
||||
if(feedback)
|
||||
to_chat(src, span_warning("antagHUD restrictions prevent you from respawning."))
|
||||
return 0
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
return
|
||||
|
||||
if(!src.client.holder)
|
||||
if(!config.dsay_allowed)
|
||||
if(!CONFIG_GET(flag/dsay_allowed))
|
||||
to_chat(src, span_danger("Deadchat is globally muted."))
|
||||
return
|
||||
|
||||
|
||||
@@ -250,13 +250,13 @@
|
||||
if(client && client.prefs.language_prefixes && client.prefs.language_prefixes.len)
|
||||
return client.prefs.language_prefixes[1]
|
||||
|
||||
return config.language_prefixes[1]
|
||||
return CONFIG_GET(str_list/language_prefixes)[1]
|
||||
|
||||
/mob/proc/is_language_prefix(var/prefix)
|
||||
if(client && client.prefs.language_prefixes && client.prefs.language_prefixes.len)
|
||||
return prefix in client.prefs.language_prefixes
|
||||
|
||||
return prefix in config.language_prefixes
|
||||
return prefix in CONFIG_GET(str_list/language_prefixes)
|
||||
|
||||
//TBD
|
||||
/mob/proc/check_lang_data()
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
blinded = 1
|
||||
silent = 0
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
if( !container && (health < config.health_threshold_dead || ((world.time - timeofhostdeath) > config.revival_brain_life)) )
|
||||
if( !container && (health < CONFIG_GET(number/health_threshold_dead) || ((world.time - timeofhostdeath) > CONFIG_GET(number/revival_brain_life))) )
|
||||
death()
|
||||
blinded = 1
|
||||
silent = 0
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
//Start of a breath chain, calls breathe()
|
||||
/mob/living/carbon/handle_breathing()
|
||||
if(air_master.current_cycle%4==2 || failed_last_breath || (health < config.health_threshold_crit)) //First, resolve location and get a breath
|
||||
if(air_master.current_cycle%4==2 || failed_last_breath || (health < CONFIG_GET(number/health_threshold_crit))) //First, resolve location and get a breath
|
||||
breathe()
|
||||
|
||||
/mob/living/carbon/proc/breathe()
|
||||
@@ -12,7 +12,7 @@
|
||||
var/datum/gas_mixture/breath = null
|
||||
|
||||
//First, check if we can breathe at all
|
||||
if(health < config.health_threshold_crit && !(CE_STABLE in chem_effects)) //crit aka circulatory shock
|
||||
if(health < CONFIG_GET(number/health_threshold_crit) && !(CE_STABLE in chem_effects)) //crit aka circulatory shock
|
||||
AdjustLosebreath(1)
|
||||
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
return shock_damage
|
||||
|
||||
/mob/living/carbon/proc/help_shake_act(mob/living/carbon/M)
|
||||
if (src.health >= config.health_threshold_crit)
|
||||
if (src.health >= CONFIG_GET(number/health_threshold_crit))
|
||||
if(src == M && istype(src, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = src
|
||||
var/datum/gender/T = gender_datums[H.get_visible_gender()]
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
update_hair()
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/change_hair_gradient(var/hair_gradient)
|
||||
if(!hair_gradient)
|
||||
return
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
update_hair()
|
||||
return 1
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/change_grad_color(var/red, var/green, var/blue)
|
||||
if(red == r_grad && green == g_grad && blue == b_grad)
|
||||
return
|
||||
@@ -180,7 +180,7 @@
|
||||
for(var/current_species_name in GLOB.all_species)
|
||||
var/datum/species/current_species = GLOB.all_species[current_species_name]
|
||||
|
||||
if(check_whitelist && config.usealienwhitelist && !check_rights(R_ADMIN|R_EVENT, 0, src)) //If we're using the whitelist, make sure to check it!
|
||||
if(check_whitelist && CONFIG_GET(flag/usealienwhitelist) && !check_rights(R_ADMIN|R_EVENT, 0, src)) //If we're using the whitelist, make sure to check it!
|
||||
if(!(current_species.spawn_flags & SPECIES_CAN_JOIN))
|
||||
continue
|
||||
if(whitelist.len && !(current_species_name in whitelist))
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
if(update) UpdateDamageIcon()
|
||||
|
||||
/mob/living/carbon/human/proc/implant_loyalty(override = FALSE) // Won't override by default.
|
||||
if(!config.use_loyalty_implants && !override) return // Nuh-uh.
|
||||
if(!CONFIG_GET(flag/use_loyalty_implants) && !override) return // Nuh-uh.
|
||||
|
||||
var/obj/item/implant/loyalty/L = new/obj/item/implant/loyalty(src)
|
||||
if(L.handle_implant(src, BP_HEAD))
|
||||
@@ -1774,7 +1774,7 @@
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/pull_damage()
|
||||
if(((health - halloss) <= config.health_threshold_softcrit))
|
||||
if(((health - halloss) <= CONFIG_GET(number/health_threshold_softcrit)))
|
||||
for(var/name in organs_by_name)
|
||||
var/obj/item/organ/external/e = organs_by_name[name]
|
||||
if(!e)
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
if (istype(H) && attempt_to_scoop(H))
|
||||
return 0;
|
||||
// VOREStation Edit - End
|
||||
if(istype(H) && health < config.health_threshold_crit)
|
||||
if(istype(H) && health < CONFIG_GET(number/health_threshold_crit))
|
||||
if(!H.check_has_mouth())
|
||||
to_chat(H, span_danger("You don't have a mouth, you cannot perform CPR!"))
|
||||
return
|
||||
@@ -104,7 +104,7 @@
|
||||
H.visible_message(span_danger("\The [H] performs CPR on \the [src]!"))
|
||||
to_chat(H, span_warning("Repeat at least every 7 seconds."))
|
||||
|
||||
if(istype(H) && health > config.health_threshold_dead)
|
||||
if(istype(H) && health > CONFIG_GET(number/health_threshold_dead))
|
||||
adjustOxyLoss(-(min(getOxyLoss(), 5)))
|
||||
updatehealth()
|
||||
to_chat(src, span_notice("You feel a breath of fresh air enter your lungs. It feels good."))
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
health = getMaxHealth() - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute
|
||||
|
||||
//TODO: fix husking
|
||||
if( ((getMaxHealth() - total_burn) < config.health_threshold_dead * huskmodifier) && stat == DEAD)
|
||||
if( ((getMaxHealth() - total_burn) < CONFIG_GET(number/health_threshold_dead) * huskmodifier) && stat == DEAD)
|
||||
ChangeToHusk()
|
||||
return
|
||||
|
||||
|
||||
@@ -369,7 +369,7 @@ emp_act
|
||||
effective_force -= round(effective_force*0.8)
|
||||
|
||||
//want the dislocation chance to be such that the limb is expected to dislocate after dealing a fraction of the damage needed to break the limb
|
||||
var/dislocate_chance = effective_force/(dislocate_mult * organ.min_broken_damage * config.organ_health_multiplier)*100
|
||||
var/dislocate_chance = effective_force/(dislocate_mult * organ.min_broken_damage * CONFIG_GET(number/organ_health_multiplier))*100
|
||||
if(prob(dislocate_chance * (100 - blocked)/100))
|
||||
visible_message(span_danger("[src]'s [organ.joint] [pick("gives way","caves in","crumbles","collapses")]!"))
|
||||
organ.dislocate(1)
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
. *= 0.5
|
||||
. -= chem_effects[CE_SPEEDBOOST] // give 'em a buff on top.
|
||||
|
||||
. = max(HUMAN_LOWEST_SLOWDOWN, . + config.human_delay) // Minimum return should be the same as force_max_speed
|
||||
. = max(HUMAN_LOWEST_SLOWDOWN, . + CONFIG_GET(number/human_delay)) // Minimum return should be the same as force_max_speed
|
||||
. += ..()
|
||||
|
||||
/mob/living/carbon/human/Moved()
|
||||
@@ -257,7 +257,7 @@
|
||||
return
|
||||
if(is_incorporeal())
|
||||
return
|
||||
if(!config.footstep_volume || !T.footstep_sounds || !T.footstep_sounds.len)
|
||||
if(!CONFIG_GET(number/footstep_volume) || !T.footstep_sounds || !T.footstep_sounds.len)
|
||||
return
|
||||
// Future Upgrades - Multi species support
|
||||
var/list/footstep_sounds = T.footstep_sounds["human"]
|
||||
@@ -276,7 +276,7 @@
|
||||
if(m_intent == "run" && step_count++ % 2 != 0)
|
||||
return
|
||||
|
||||
var/volume = config.footstep_volume
|
||||
var/volume = CONFIG_GET(number/footstep_volume)
|
||||
|
||||
// Reduce volume while walking or barefoot
|
||||
if(!shoes || m_intent == "walk")
|
||||
|
||||
@@ -551,7 +551,7 @@
|
||||
|
||||
if(!breath || (breath.total_moles == 0))
|
||||
failed_last_breath = 1
|
||||
if(health > config.health_threshold_crit)
|
||||
if(health > CONFIG_GET(number/health_threshold_crit))
|
||||
adjustOxyLoss(HUMAN_MAX_OXYLOSS)
|
||||
else
|
||||
adjustOxyLoss(HUMAN_CRIT_MAX_OXYLOSS)
|
||||
@@ -1201,14 +1201,14 @@
|
||||
else //ALIVE. LIGHTS ARE ON
|
||||
updatehealth() //TODO
|
||||
|
||||
if(health <= config.health_threshold_dead || (should_have_organ("brain") && !has_brain()))
|
||||
if(health <= CONFIG_GET(number/health_threshold_dead) || (should_have_organ("brain") && !has_brain()))
|
||||
death()
|
||||
blinded = 1
|
||||
silent = 0
|
||||
return 1
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if((getOxyLoss() > (species.total_health/2)) || (health <= config.health_threshold_crit))
|
||||
if((getOxyLoss() > (species.total_health/2)) || (health <= CONFIG_GET(number/health_threshold_crit)))
|
||||
Paralyse(3)
|
||||
|
||||
if(hallucination)
|
||||
@@ -1581,7 +1581,7 @@
|
||||
clear_fullscreen("belly3")
|
||||
clear_fullscreen("belly4")
|
||||
|
||||
if(config.welder_vision)
|
||||
if(CONFIG_GET(flag/welder_vision))
|
||||
var/found_welder
|
||||
if(species.short_sighted)
|
||||
found_welder = 1
|
||||
@@ -1832,12 +1832,12 @@
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
if(!can_feel_pain()) return
|
||||
|
||||
if(health < config.health_threshold_softcrit)// health 0 makes you immediately collapse
|
||||
if(health < CONFIG_GET(number/health_threshold_softcrit))// health 0 makes you immediately collapse
|
||||
shock_stage = max(shock_stage, 61)
|
||||
|
||||
if(traumatic_shock >= 80)
|
||||
shock_stage += 1
|
||||
else if(health < config.health_threshold_softcrit)
|
||||
else if(health < CONFIG_GET(number/health_threshold_softcrit))
|
||||
shock_stage = max(shock_stage, 61)
|
||||
else
|
||||
shock_stage = min(shock_stage, 160)
|
||||
@@ -2012,7 +2012,7 @@
|
||||
if(stat == DEAD)
|
||||
holder.icon_state = "-100" // X_X
|
||||
else
|
||||
holder.icon_state = RoundHealth((health-config.health_threshold_crit)/(getMaxHealth()-config.health_threshold_crit)*100)
|
||||
holder.icon_state = RoundHealth((health-CONFIG_GET(number/health_threshold_crit))/(getMaxHealth()-CONFIG_GET(number/health_threshold_crit))*100)
|
||||
if(block_hud)
|
||||
holder.icon_state = "hudblank"
|
||||
apply_hud(HEALTH_HUD, holder)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
return ((H && H.isSynthetic()) ? "encounters a hardware fault and suddenly reboots!" : knockout_message)
|
||||
|
||||
/datum/species/proc/get_death_message(var/mob/living/carbon/human/H)
|
||||
if(config.show_human_death_message)
|
||||
if(CONFIG_GET(flag/show_human_death_message))
|
||||
return ((H && H.isSynthetic()) ? "gives one shrill beep before falling lifeless." : death_message)
|
||||
else
|
||||
return DEATHGASP_NO_MESSAGE
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
if(!breath || (breath.total_moles == 0))
|
||||
H.failed_last_breath = 1
|
||||
if(H.health > config.health_threshold_crit)
|
||||
if(H.health > CONFIG_GET(number/health_threshold_crit))
|
||||
H.adjustOxyLoss(ALRAUNE_MAX_OXYLOSS)
|
||||
else
|
||||
H.adjustOxyLoss(ALRAUNE_CRIT_MAX_OXYLOSS)
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
set desc = "Lay an egg that will eventually hatch into a new xenomorph larva. Life finds a way."
|
||||
set category = "Abilities"
|
||||
|
||||
if(!config.aliens_allowed)
|
||||
if(!CONFIG_GET(flag/aliens_allowed))
|
||||
to_chat(src, "You begin to lay an egg, but hesitate. You suspect it isn't allowed.")
|
||||
remove_verb(src, /mob/living/carbon/human/proc/lay_egg)
|
||||
return
|
||||
|
||||
@@ -713,7 +713,7 @@
|
||||
set category = "OOC"
|
||||
set src in view()
|
||||
//VOREStation Edit Start - Making it so SSD people have prefs with fallback to original style.
|
||||
if(config.allow_Metadata)
|
||||
if(CONFIG_GET(flag/allow_metadata))
|
||||
if(ooc_notes)
|
||||
ooc_notes_window(usr)
|
||||
// to_chat(usr, span_filter_notice("[src]'s Metainfo:<br>[ooc_notes]"))
|
||||
@@ -1137,7 +1137,7 @@
|
||||
add_attack_logs(src,M,"Thrown via grab to [end_T.x],[end_T.y],[end_T.z]")
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/N = M
|
||||
if((N.health + N.halloss) < config.health_threshold_crit || N.stat == DEAD)
|
||||
if((N.health + N.halloss) < CONFIG_GET(number/health_threshold_crit) || N.stat == DEAD)
|
||||
N.adjustBruteLoss(rand(10,30))
|
||||
src.drop_from_inventory(G)
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
var/mob/living/silicon/robot/deployed_shell = null //For shell control
|
||||
|
||||
/mob/living/silicon/ai/Initialize()
|
||||
if(config.allow_ai_shells)
|
||||
if(CONFIG_GET(flag/allow_ai_shells))
|
||||
add_verb(src, /mob/living/silicon/ai/proc/deploy_to_shell_act)
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/ai/proc/deploy_to_shell(var/mob/living/silicon/robot/target)
|
||||
if(!config.allow_ai_shells)
|
||||
if(!CONFIG_GET(flag/allow_ai_shells))
|
||||
to_chat(src, span_warning("AI Shells are not allowed on this server. You shouldn't have this verb because of it, so consider making a bug report."))
|
||||
return
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
|
||||
// Returns percentage of AI's remaining hardware integrity (maxhealth - (bruteloss + fireloss))
|
||||
/mob/living/silicon/ai/proc/hardware_integrity()
|
||||
return (health-config.health_threshold_dead)/2
|
||||
return (health - CONFIG_GET(number/health_threshold_dead)) / 2
|
||||
|
||||
// Shows capacitor charge and hardware integrity information to the AI in Status tab.
|
||||
/mob/living/silicon/ai/show_system_integrity()
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
if (src.stat == 2)
|
||||
return
|
||||
else
|
||||
if (src.health <= config.health_threshold_dead && src.stat != 2)
|
||||
if (src.health <= CONFIG_GET(number/health_threshold_dead) && src.stat != 2)
|
||||
death()
|
||||
return
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ var/list/mob_hat_cache = list()
|
||||
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
|
||||
if(stat == 2)
|
||||
|
||||
if(!config.allow_drone_spawn || emagged || health < -35) //It's dead, Dave.
|
||||
if(!CONFIG_GET(flag/allow_drone_spawn) || emagged || health < -35) //It's dead, Dave.
|
||||
to_chat(user, span_danger("The interface is fried, and a distressing burned smell wafts from the robot's interior. You're not rebooting this one."))
|
||||
return
|
||||
|
||||
@@ -251,7 +251,7 @@ var/list/mob_hat_cache = list()
|
||||
var/drones = 0
|
||||
for(var/mob/living/silicon/robot/drone/D in player_list)
|
||||
drones++
|
||||
if(drones < config.max_maint_drones)
|
||||
if(drones < CONFIG_GET(number/max_maint_drones))
|
||||
request_player()
|
||||
return
|
||||
|
||||
|
||||
@@ -57,14 +57,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 / CONFIG_GET(number/drone_build_time)) * 100)
|
||||
|
||||
if(drone_progress >= 100)
|
||||
visible_message("\The [src] voices a strident beep, indicating a drone chassis is prepared.")
|
||||
|
||||
/obj/machinery/drone_fabricator/examine(mob/user)
|
||||
. = ..()
|
||||
if(produce_drones && drone_progress >= 100 && istype(user,/mob/observer/dead) && config.allow_drone_spawn && count_drones() < config.max_maint_drones)
|
||||
if(produce_drones && drone_progress >= 100 && istype(user,/mob/observer/dead) && CONFIG_GET(flag/allow_drone_spawn) && count_drones() < CONFIG_GET(number/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/create_drone(var/client/player)
|
||||
@@ -72,7 +72,7 @@
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
|
||||
if(!produce_drones || !config.allow_drone_spawn || count_drones() >= config.max_maint_drones)
|
||||
if(!produce_drones || !CONFIG_GET(flag/allow_drone_spawn) || count_drones() >= CONFIG_GET(number/max_maint_drones))
|
||||
return
|
||||
|
||||
if(player && !istype(player.mob,/mob/observer/dead))
|
||||
@@ -102,7 +102,7 @@
|
||||
to_chat(src, span_danger("The game hasn't started yet!"))
|
||||
return
|
||||
|
||||
if(!(config.allow_drone_spawn))
|
||||
if(!CONFIG_GET(flag/allow_drone_spawn))
|
||||
to_chat(src, span_danger("That verb is not currently permitted."))
|
||||
return
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
return
|
||||
|
||||
// VOREStation Addition Start
|
||||
if(config.use_age_restriction_for_jobs && isnum(src.client.player_age))
|
||||
if(CONFIG_GET(flag/use_age_restriction_for_jobs) && isnum(src.client.player_age))
|
||||
var/time_till_play = max(0, 3 - src.client.player_age)
|
||||
if(time_till_play)
|
||||
to_chat(usr, span_danger("You have not been playing on the server long enough to join as drone."))
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
//if(src.resting) // VOREStation edit. Our borgos would rather not.
|
||||
// Weaken(5)
|
||||
|
||||
if(health < config.health_threshold_dead && src.stat != 2) //die only once
|
||||
if(health < CONFIG_GET(number/health_threshold_dead) && src.stat != 2) //die only once
|
||||
death()
|
||||
|
||||
if (src.stat != 2) //Alive.
|
||||
@@ -242,7 +242,7 @@
|
||||
src.healths.icon_state = "health3"
|
||||
else if(health >= 0)
|
||||
src.healths.icon_state = "health4"
|
||||
else if(health >= config.health_threshold_dead)
|
||||
else if(health >= CONFIG_GET(number/health_threshold_dead))
|
||||
src.healths.icon_state = "health5"
|
||||
else
|
||||
src.healths.icon_state = "health6"
|
||||
|
||||
@@ -1305,13 +1305,13 @@
|
||||
/mob/living/silicon/robot/proc/add_robot_verbs()
|
||||
add_verb(src, robot_verbs_default)
|
||||
add_verb(src, silicon_subsystems)
|
||||
if(config.allow_robot_recolor)
|
||||
if(CONFIG_GET(flag/allow_robot_recolor))
|
||||
add_verb(src, /mob/living/silicon/robot/proc/ColorMate)
|
||||
|
||||
/mob/living/silicon/robot/proc/remove_robot_verbs()
|
||||
remove_verb(src, robot_verbs_default)
|
||||
remove_verb(src, silicon_subsystems)
|
||||
if(config.allow_robot_recolor)
|
||||
if(CONFIG_GET(flag/allow_robot_recolor))
|
||||
remove_verb(src, /mob/living/silicon/robot/proc/ColorMate)
|
||||
|
||||
// Uses power from cyborg's cell. Returns 1 on success or 0 on failure.
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
if(get_restraining_bolt()) // Borgs with Restraining Bolts move slower.
|
||||
. += 1
|
||||
|
||||
. += config.robot_delay
|
||||
. += CONFIG_GET(number/robot_delay)
|
||||
|
||||
. += ..()
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ GLOBAL_LIST_EMPTY(available_ai_shells)
|
||||
undeploy("Remote session terminated.")
|
||||
|
||||
/mob/living/silicon/robot/attack_ai(mob/user)
|
||||
if(shell && config.allow_ai_shells && (!connected_ai || connected_ai == user))
|
||||
if(shell && CONFIG_GET(flag/allow_ai_shells) && (!connected_ai || connected_ai == user))
|
||||
var/mob/living/silicon/ai/AI = user
|
||||
if(istype(AI)) // Just in case we're clicked by a borg
|
||||
AI.deploy_to_shell(src)
|
||||
@@ -132,6 +132,6 @@ GLOBAL_LIST_EMPTY(available_ai_shells)
|
||||
delete_me = TRUE
|
||||
|
||||
/obj/effect/landmark/free_ai_shell/Initialize()
|
||||
if(config.allow_ai_shells && config.give_free_ai_shell)
|
||||
if(CONFIG_GET(flag/allow_ai_shells) && CONFIG_GET(flag/give_free_ai_shell))
|
||||
new /mob/living/silicon/robot/ai_shell(get_turf(src))
|
||||
return ..()
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
if(organ_names)
|
||||
organ_names = GET_DECL(organ_names)
|
||||
|
||||
if(config.allow_simple_mob_recolor)
|
||||
if(CONFIG_GET(flag/allow_simple_mob_recolor))
|
||||
add_verb(src, /mob/living/simple_mob/proc/ColorMate)
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@
|
||||
. += injury_level
|
||||
// VOREStation Edit Stop
|
||||
|
||||
. += config.animal_delay
|
||||
. += CONFIG_GET(number/animal_delay)
|
||||
|
||||
. += ..()
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
if (has_AI() && friend)
|
||||
var/friend_dist = get_dist(src,friend)
|
||||
if (friend_dist <= 1)
|
||||
if (friend.stat >= DEAD || friend.health <= config.health_threshold_softcrit)
|
||||
if (friend.stat >= DEAD || friend.health <= CONFIG_GET(number/health_threshold_softcrit))
|
||||
if (prob((friend.stat < DEAD)? 50 : 15))
|
||||
var/verb = pick("meows", "mews", "mrowls")
|
||||
audible_emote(pick("[verb] in distress.", "[verb] anxiously."))
|
||||
@@ -74,4 +74,3 @@
|
||||
qdel(src) //Back from whence you came!
|
||||
|
||||
. = ..(FALSE, deathmessage)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
lastKnownIP = client.address
|
||||
computer_id = client.computer_id
|
||||
log_access_in(client)
|
||||
if(config.log_access)
|
||||
if(CONFIG_GET(flag/log_access))
|
||||
for(var/mob/M in player_list)
|
||||
if(M == src) continue
|
||||
if( M.key && (M.key != key) )
|
||||
@@ -14,7 +14,7 @@
|
||||
if( (client.connection != "web") && (M.computer_id == client.computer_id) )
|
||||
if(matches) matches += " and "
|
||||
matches += "ID ([client.computer_id])"
|
||||
if(!config.disable_cid_warn_popup)
|
||||
if(!CONFIG_GET(flag/disable_cid_warn_popup))
|
||||
tgui_alert_async(usr, "You appear to have logged in with another key this round, which is not permitted. Please contact an administrator if you believe this message to be in error.")
|
||||
if(matches)
|
||||
if(M.client)
|
||||
|
||||
@@ -354,9 +354,9 @@
|
||||
// Special cases, can never respawn
|
||||
if(ticker?.mode?.deny_respawn)
|
||||
time = -1
|
||||
else if(!config.abandon_allowed)
|
||||
else if(!CONFIG_GET(flag/abandon_allowed))
|
||||
time = -1
|
||||
else if(!config.respawn)
|
||||
else if(!CONFIG_GET(flag/respawn))
|
||||
time = -1
|
||||
|
||||
// Special case for observing before game start
|
||||
@@ -365,7 +365,7 @@
|
||||
|
||||
// Wasn't given a time, use the config time
|
||||
else if(!time)
|
||||
time = config.respawn_time
|
||||
time = CONFIG_GET(number/respawn_time)
|
||||
|
||||
var/keytouse = ckey
|
||||
// Try harder to find a key to use
|
||||
@@ -377,7 +377,7 @@
|
||||
GLOB.respawn_timers[keytouse] = world.time + time
|
||||
|
||||
/mob/observer/dead/set_respawn_timer()
|
||||
if(config.antag_hud_restricted && has_enabled_antagHUD)
|
||||
if(CONFIG_GET(flag/antag_hud_restricted) && has_enabled_antagHUD)
|
||||
..(-1)
|
||||
else
|
||||
return // Don't set it, no need
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
if("run")
|
||||
if(drowsyness > 0)
|
||||
. += 6
|
||||
. += config.run_speed
|
||||
. += CONFIG_GET(number/run_speed)
|
||||
if("walk")
|
||||
. += config.walk_speed
|
||||
. += CONFIG_GET(number/walk_speed)
|
||||
|
||||
/client/proc/client_dir(input, direction=-1)
|
||||
return turn(input, direction*dir2angle(dir))
|
||||
|
||||
@@ -33,7 +33,7 @@ var/obj/effect/lobby_image = new /obj/effect/lobby_image
|
||||
to_chat(src, examine_block("<div class=\"motd\">[join_motd]</div>"))
|
||||
|
||||
if(has_respawned)
|
||||
to_chat(usr, config.respawn_message)
|
||||
to_chat(usr, CONFIG_GET(string/respawn_message))
|
||||
has_respawned = FALSE
|
||||
|
||||
if(!mind)
|
||||
@@ -90,10 +90,10 @@ var/obj/effect/lobby_image = new /obj/effect/lobby_image
|
||||
// So we can be more wordy and give links.
|
||||
to_chat(src, span_userdanger("Your client version has known issues.") + " Please consider using a different version: <a href='https://www.byond.com/download/build/'>https://www.byond.com/download/build/</a>.")
|
||||
var/chat_message = ""
|
||||
if(config.suggested_byond_version)
|
||||
chat_message += "We suggest using version [config.suggested_byond_version]."
|
||||
if(config.suggested_byond_build)
|
||||
chat_message += "[config.suggested_byond_build]."
|
||||
if(CONFIG_GET(number/suggested_byond_version))
|
||||
chat_message += "We suggest using version [CONFIG_GET(number/suggested_byond_version)]."
|
||||
if(CONFIG_GET(number/suggested_byond_build))
|
||||
chat_message += "[CONFIG_GET(number/suggested_byond_build)]."
|
||||
chat_message += " If you find this version doesn't work for you, let us know."
|
||||
to_chat(src, chat_message)
|
||||
to_chat(src, "Tip: You can always use the '.zip' versions of BYOND and keep multiple versions in folders wherever you want, rather than uninstalling/reinstalling. Just make sure BYOND is *really* closed (check your system tray for the icon) before starting a different version.")
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
client.prefs.real_name = random_name(client.prefs.identifying_gender)
|
||||
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 && !CONFIG_GET(flag/antag_hud_allowed)) // For new ghosts we remove the verb from even showing up if it's not allowed.
|
||||
remove_verb(observer, /mob/observer/dead/verb/toggle_antagHUD) // Poor guys, don't know what they are missing!
|
||||
observer.key = key
|
||||
observer.set_respawn_timer(time_till_respawn()) // Will keep their existing time if any, or return 0 and pass 0 into set_respawn_timer which will use the defaults
|
||||
@@ -413,7 +413,7 @@
|
||||
if(!ticker || ticker.current_state != GAME_STATE_PLAYING)
|
||||
to_chat(usr, span_red("The round is either not ready, or has already finished..."))
|
||||
return 0
|
||||
if(!config.enter_allowed)
|
||||
if(!CONFIG_GET(flag/enter_allowed))
|
||||
to_chat(usr, span_notice("There is an administrative lock on entering the game!"))
|
||||
return 0
|
||||
if(!IsJobAvailable(rank))
|
||||
|
||||
@@ -7,12 +7,12 @@
|
||||
return TRUE
|
||||
|
||||
//No Flavor Text
|
||||
if (config.require_flavor && !(J.mob_type & JOB_SILICON) && (!client?.prefs?.flavor_texts["general"] || length(client.prefs.flavor_texts["general"]) < 30))
|
||||
if (CONFIG_GET(flag/require_flavor) && !(J.mob_type & JOB_SILICON) && (!client?.prefs?.flavor_texts["general"] || length(client.prefs.flavor_texts["general"]) < 30))
|
||||
to_chat(src,span_warning("Please set your general flavor text to give a basic description of your character. Set it using the 'Set Flavor text' button on the 'General' tab in character setup, and choosing 'General' category."))
|
||||
pass = FALSE
|
||||
|
||||
//No OOC notes
|
||||
if (config.allow_Metadata && (!client?.prefs?.metadata || length(client.prefs.metadata) < 15))
|
||||
if (CONFIG_GET(flag/allow_metadata) && (!client?.prefs?.metadata || length(client.prefs.metadata) < 15))
|
||||
to_chat(src,span_warning("Please set informative OOC notes related to RP/ERP preferences. Set them using the 'OOC Notes' button on the 'General' tab in character setup."))
|
||||
pass = FALSE
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
return // Clientless mobs shouldn't be trying to talk in deadchat.
|
||||
|
||||
if(!client.holder)
|
||||
if(!config.dsay_allowed)
|
||||
if(!CONFIG_GET(flag/dsay_allowed))
|
||||
to_chat(src, span_danger("Deadchat is globally muted."))
|
||||
return
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
|
||||
if(!owner || owner.stat == DEAD)
|
||||
defib_timer = max(--defib_timer, 0)
|
||||
else
|
||||
defib_timer = min(++defib_timer, (config.defib_timer MINUTES) / 20) // Time vars measure things in ticks. Life tick happens every ~2 seconds, therefore dividing by 20
|
||||
defib_timer = min(++defib_timer, (CONFIG_GET(number/defib_timer) MINUTES) / 20) // Time vars measure things in ticks. Life tick happens every ~2 seconds, therefore dividing by 20
|
||||
|
||||
/obj/item/organ/internal/brain/proc/can_assist()
|
||||
return can_assist
|
||||
@@ -80,8 +80,8 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
|
||||
|
||||
/obj/item/organ/internal/brain/New()
|
||||
..()
|
||||
health = config.default_brain_health
|
||||
defib_timer = (config.defib_timer MINUTES) / 20 // Time vars measure things in ticks. Life tick happens every ~2 seconds, therefore dividing by 20
|
||||
health = CONFIG_GET(number/default_brain_health)
|
||||
defib_timer = (CONFIG_GET(number/defib_timer) MINUTES) / 20 // Time vars measure things in ticks. Life tick happens every ~2 seconds, therefore dividing by 20
|
||||
spawn(5)
|
||||
if(brainmob)
|
||||
butcherable = FALSE
|
||||
|
||||
@@ -179,7 +179,7 @@ var/list/organ_cache = list()
|
||||
if(B && prob(40) && !isbelly(loc)) //VOREStation Edit
|
||||
reagents.remove_reagent("blood",0.1)
|
||||
blood_splatter(src,B,1)
|
||||
if(config.organs_decay && decays) damage += rand(1,3)
|
||||
if(CONFIG_GET(flag/organs_decay) && decays) damage += rand(1,3)
|
||||
if(damage >= max_damage)
|
||||
damage = max_damage
|
||||
adjust_germ_level(rand(2,6))
|
||||
|
||||
@@ -308,7 +308,7 @@
|
||||
// push them faster into paincrit though, as the additional damage is converted into shock.
|
||||
var/brute_overflow = 0
|
||||
var/burn_overflow = 0
|
||||
if(is_damageable(brute + burn) || !config.limbs_can_break)
|
||||
if(is_damageable(brute + burn) || !CONFIG_GET(flag/limbs_can_break))
|
||||
if(brute)
|
||||
if(can_cut)
|
||||
if(sharp && !edge)
|
||||
@@ -322,7 +322,7 @@
|
||||
else
|
||||
//If we can't inflict the full amount of damage, spread the damage in other ways
|
||||
//How much damage can we actually cause?
|
||||
var/can_inflict = max_damage * config.organ_health_multiplier - (brute_dam + burn_dam)
|
||||
var/can_inflict = max_damage * CONFIG_GET(number/organ_health_multiplier) - (brute_dam + burn_dam)
|
||||
var/spillover = 0
|
||||
if(can_inflict)
|
||||
if (brute > 0)
|
||||
@@ -339,7 +339,7 @@
|
||||
//How much brute damage is left to inflict
|
||||
spillover += max(0, brute - can_inflict)
|
||||
|
||||
can_inflict = max_damage * config.organ_health_multiplier - (brute_dam + burn_dam) //Refresh the can_inflict var, so burn doesn't overload the limb if it is set to take both.
|
||||
can_inflict = max_damage * CONFIG_GET(number/organ_health_multiplier) - (brute_dam + burn_dam) //Refresh the can_inflict var, so burn doesn't overload the limb if it is set to take both.
|
||||
|
||||
if (burn > 0 && can_inflict)
|
||||
//Inflict all burn damage we can
|
||||
@@ -350,7 +350,7 @@
|
||||
|
||||
//If there is pain to dispense.
|
||||
if(spillover)
|
||||
owner.shock_stage += spillover * config.organ_damage_spillover_multiplier
|
||||
owner.shock_stage += spillover * CONFIG_GET(number/organ_damage_spillover_multiplier)
|
||||
|
||||
// sync the organ's damage with its wounds
|
||||
src.update_damages()
|
||||
@@ -359,7 +359,7 @@
|
||||
|
||||
//If limb took enough damage, try to cut or tear it off
|
||||
if(owner && loc == owner && !is_stump())
|
||||
if(!cannot_amputate && config.limbs_can_break && (brute_dam + burn_dam) >= (max_damage * config.organ_health_multiplier))
|
||||
if(!cannot_amputate && CONFIG_GET(flag/limbs_can_break) && (brute_dam + burn_dam) >= (max_damage * CONFIG_GET(number/organ_health_multiplier)))
|
||||
//organs can come off in three cases
|
||||
//1. If the damage source is edge_eligible and the brute damage dealt exceeds the edge threshold, then the organ is cut off.
|
||||
//2. If the damage amount dealt exceeds the disintegrate threshold, the organ is completely obliterated.
|
||||
@@ -550,7 +550,7 @@ This function completely restores a damaged organ to perfect condition.
|
||||
//Burn damage can cause fluid loss due to blistering and cook-off
|
||||
|
||||
if((damage > 5 || damage + burn_dam >= 15) && type == BURN && (robotic < ORGAN_ROBOT) && !(species.flags & NO_BLOOD))
|
||||
var/fluid_loss = 0.4 * (damage/(owner.getMaxHealth() - config.health_threshold_dead)) * owner.species.blood_volume*(1 - owner.species.blood_level_fatal)
|
||||
var/fluid_loss = 0.4 * (damage/(owner.getMaxHealth() - CONFIG_GET(number/health_threshold_dead))) * owner.species.blood_volume*(1 - owner.species.blood_level_fatal)
|
||||
owner.remove_blood(fluid_loss)
|
||||
|
||||
// first check whether we can widen an existing wound
|
||||
@@ -777,7 +777,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
//we only update wounds once in [wound_update_accuracy] ticks so have to emulate realtime
|
||||
heal_amt = heal_amt * wound_update_accuracy
|
||||
//configurable regen speed woo, no-regen hardcore or instaheal hugbox, choose your destiny
|
||||
heal_amt = heal_amt * config.organ_regeneration_multiplier
|
||||
heal_amt = heal_amt * CONFIG_GET(number/organ_regeneration_multiplier)
|
||||
// amount of healing is spread over all the wounds
|
||||
heal_amt = heal_amt / (wounds.len + 1)
|
||||
// making it look prettier on scanners
|
||||
@@ -827,7 +827,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
status |= ORGAN_BLEEDING
|
||||
|
||||
//Bone fractures
|
||||
if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(robotic >= ORGAN_ROBOT))
|
||||
if(CONFIG_GET(flag/bones_can_break) && brute_dam > min_broken_damage * CONFIG_GET(number/organ_health_multiplier) && !(robotic >= ORGAN_ROBOT))
|
||||
src.fracture()
|
||||
|
||||
update_health()
|
||||
@@ -1112,7 +1112,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
/obj/item/organ/external/proc/mend_fracture()
|
||||
if(robotic >= ORGAN_ROBOT)
|
||||
return 0 //ORGAN_BROKEN doesn't have the same meaning for robot limbs
|
||||
if(brute_dam > min_broken_damage * config.organ_health_multiplier)
|
||||
if(brute_dam > min_broken_damage * CONFIG_GET(number/organ_health_multiplier))
|
||||
return 0 //will just immediately fracture again
|
||||
|
||||
status &= ~ORGAN_BROKEN
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
var/eyes_over_markings = FALSE //VOREStation edit
|
||||
|
||||
/obj/item/organ/external/head/Initialize()
|
||||
if(config.allow_headgibs)
|
||||
if(CONFIG_GET(flag/allow_headgibs))
|
||||
cannot_gib = FALSE
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -470,16 +470,16 @@ Extracted to its own procedure for easier logic handling with paper bundles.
|
||||
if (istype(fax, /obj/item/paper))
|
||||
var/obj/item/paper/P = fax
|
||||
var/text = "<HTML><HEAD><TITLE>[P.name]</TITLE></HEAD><BODY>[P.info][P.stamps]</BODY></HTML>";
|
||||
file("[config.fax_export_dir]/fax_[faxid].html") << text;
|
||||
file("[CONFIG_GET(string/fax_export_dir)]/fax_[faxid].html") << text;
|
||||
else if (istype(fax, /obj/item/photo))
|
||||
var/obj/item/photo/H = fax
|
||||
fcopy(H.img, "[config.fax_export_dir]/photo_[faxid].png")
|
||||
fcopy(H.img, "[CONFIG_GET(string/fax_export_dir)]/photo_[faxid].png")
|
||||
var/text = "<html><head><title>[H.name]</title></head>" \
|
||||
+ "<body style='overflow:hidden;margin:0;text-align:center'>" \
|
||||
+ "<img src='photo_[faxid].png'>" \
|
||||
+ "[H.scribble ? "<br>Written on the back:<br><i>[H.scribble]</i>" : ""]"\
|
||||
+ "</body></html>"
|
||||
file("[config.fax_export_dir]/fax_[faxid].html") << text
|
||||
file("[CONFIG_GET(string/fax_export_dir)]/fax_[faxid].html") << text
|
||||
else if (istype(fax, /obj/item/paper_bundle))
|
||||
var/obj/item/paper_bundle/B = fax
|
||||
var/data = ""
|
||||
@@ -488,7 +488,7 @@ Extracted to its own procedure for easier logic handling with paper bundles.
|
||||
var/page_faxid = export_fax(pageobj)
|
||||
data += "<a href='fax_[page_faxid].html'>Page [page] - [pageobj.name]</a><br>"
|
||||
var/text = "<html><head><title>[B.name]</title></head><body>[data]</body></html>"
|
||||
file("[config.fax_export_dir]/fax_[faxid].html") << text
|
||||
file("[CONFIG_GET(string/fax_export_dir)]/fax_[faxid].html") << text
|
||||
return faxid
|
||||
|
||||
|
||||
@@ -497,16 +497,16 @@ Extracted to its own procedure for easier logic handling with paper bundles.
|
||||
* Call the chat webhook to transmit a notification of an admin fax to the admin chat.
|
||||
*/
|
||||
/obj/machinery/photocopier/faxmachine/proc/message_chat_admins(var/mob/sender, var/faxname, var/obj/item/sent, var/faxid, font_colour="#006100")
|
||||
if (config.chat_webhook_url)
|
||||
if (CONFIG_GET(string/chat_webhook_url))
|
||||
spawn(0)
|
||||
var/query_string = "type=fax"
|
||||
query_string += "&key=[url_encode(config.chat_webhook_key)]"
|
||||
query_string += "&key=[url_encode(CONFIG_GET(string/chat_webhook_key))]"
|
||||
query_string += "&faxid=[url_encode(faxid)]"
|
||||
query_string += "&color=[url_encode(font_colour)]"
|
||||
query_string += "&faxname=[url_encode(faxname)]"
|
||||
query_string += "&sendername=[url_encode(sender.name)]"
|
||||
query_string += "&sentname=[url_encode(sent.name)]"
|
||||
world.Export("[config.chat_webhook_url]?[query_string]")
|
||||
world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]")
|
||||
|
||||
|
||||
|
||||
@@ -515,12 +515,12 @@ Extracted to its own procedure for easier logic handling with paper bundles.
|
||||
* Call the chat webhook to transmit a notification of a job request
|
||||
*/
|
||||
/obj/machinery/photocopier/faxmachine/proc/message_chat_rolerequest(var/font_colour="#006100", var/role_to_ping, var/reason, var/jobname)
|
||||
if(config.chat_webhook_url)
|
||||
if(CONFIG_GET(string/chat_webhook_url))
|
||||
spawn(0)
|
||||
var/query_string = "type=rolerequest"
|
||||
query_string += "&key=[url_encode(config.chat_webhook_key)]"
|
||||
query_string += "&key=[url_encode(CONFIG_GET(string/chat_webhook_key))]"
|
||||
query_string += "&ping=[url_encode(role_to_ping)]"
|
||||
query_string += "&color=[url_encode(font_colour)]"
|
||||
query_string += "&reason=[url_encode(reason)]"
|
||||
query_string += "&job=[url_encode(jobname)]"
|
||||
world.Export("[config.chat_webhook_url]?[query_string]")
|
||||
world.Export("[CONFIG_GET(string/chat_webhook_url)]?[query_string]")
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
random_icon_states.Remove(W.icon_state)
|
||||
if(random_icon_states.len)
|
||||
icon_state = pick(random_icon_states)
|
||||
if(!mapload || !config.persistence_ignore_mapload)
|
||||
if(!mapload || !CONFIG_GET(flag/persistence_ignore_mapload))
|
||||
SSpersistence.track_value(src, /datum/persistent/graffiti)
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -299,7 +299,7 @@ GLOBAL_LIST_EMPTY(solars_list)
|
||||
|
||||
/obj/machinery/power/solar_control/proc/auto_start(forced = FALSE)
|
||||
// Automatically sets the solars, if allowed.
|
||||
if(forced || auto_start == SOLAR_AUTO_START_YES || (auto_start == SOLAR_AUTO_START_CONFIG && config.autostart_solars) )
|
||||
if(forced || auto_start == SOLAR_AUTO_START_YES || (auto_start == SOLAR_AUTO_START_CONFIG && CONFIG_GET(flag/autostart_solars)) )
|
||||
track = 2 // Auto tracking mode.
|
||||
search_for_connected()
|
||||
if(connected_tracker)
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
/datum/radiation_source/proc/update_rad_power(var/new_power = null)
|
||||
if(new_power == null || new_power == rad_power)
|
||||
return // No change
|
||||
else if(new_power <= config.radiation_lower_limit)
|
||||
else if(new_power <= CONFIG_GET(number/radiation_lower_limit))
|
||||
qdel(src) // Decayed to nothing
|
||||
else
|
||||
rad_power = new_power
|
||||
if(!flat)
|
||||
range = min(round(sqrt(rad_power / config.radiation_lower_limit)), 31) // R = rad_power / dist**2 - Solve for dist
|
||||
range = min(round(sqrt(rad_power / CONFIG_GET(number/radiation_lower_limit))), 31) // R = rad_power / dist**2 - Solve for dist
|
||||
return
|
||||
|
||||
/turf
|
||||
@@ -38,7 +38,7 @@
|
||||
else if(O.density) //So open doors don't get counted
|
||||
var/datum/material/M = O.get_material()
|
||||
if(!M) continue
|
||||
cached_rad_resistance += (M.weight + M.radiation_resistance) / config.radiation_material_resistance_divisor
|
||||
cached_rad_resistance += (M.weight + M.radiation_resistance) / CONFIG_GET(number/radiation_material_resistance_divisor)
|
||||
// Looks like storing the contents length is meant to be a basic check if the cache is stale due to items enter/exiting. Better than nothing so I'm leaving it as is. ~Leshana
|
||||
SSradiation.resistance_cache[src] = (length(contents) + 1)
|
||||
return
|
||||
@@ -49,7 +49,7 @@
|
||||
temp_rad_resistance += material.weight + material.radiation_resistance
|
||||
if(reinf_material)
|
||||
temp_rad_resistance += reinf_material.weight + reinf_material.radiation_resistance
|
||||
cached_rad_resistance = (density ? (temp_rad_resistance) / config.radiation_material_resistance_divisor : 0)
|
||||
cached_rad_resistance = (density ? (temp_rad_resistance) / CONFIG_GET(number/radiation_material_resistance_divisor) : 0)
|
||||
return
|
||||
|
||||
/turf/simulated/mineral/calc_rad_resistance()
|
||||
|
||||
@@ -338,7 +338,7 @@
|
||||
return
|
||||
|
||||
//Disabled in config.
|
||||
else if(!config.revival_cloning)
|
||||
else if(!CONFIG_GET(flag/revival_cloning))
|
||||
set_temp("Error: Unable to initiate growing cycle.", "danger")
|
||||
active_br = null
|
||||
return
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
|
||||
/obj/machinery/clonepod/transhuman/get_completion()
|
||||
if(occupant)
|
||||
return 100 * ((occupant.health + abs(config.health_threshold_dead)) / (occupant.maxHealth + abs(config.health_threshold_dead)))
|
||||
return 100 * ((occupant.health + abs(CONFIG_GET(number/health_threshold_dead))) / (occupant.maxHealth + abs(CONFIG_GET(number/health_threshold_dead))))
|
||||
return 0
|
||||
|
||||
/obj/machinery/clonepod/transhuman/examine(mob/user, infix, suffix)
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
if(screen == 1)
|
||||
dat += "Select an event to trigger:<ul>"
|
||||
dat += "<li><A href='?src=\ref[src];triggerevent=Red alert'>Red alert</A></li>"
|
||||
if(!config.ert_admin_call_only)
|
||||
if(!CONFIG_GET(flag/ert_admin_call_only))
|
||||
dat += "<li><A href='?src=\ref[src];triggerevent=Emergency Response Team'>Emergency Response Team</A></li>"
|
||||
|
||||
dat += "<li><A href='?src=\ref[src];triggerevent=Grant Emergency Maintenance Access'>Grant Emergency Maintenance Access</A></li>"
|
||||
@@ -182,7 +182,7 @@
|
||||
feedback_inc("alert_keycard_auth_ert",1)
|
||||
|
||||
/obj/machinery/keycard_auth/proc/is_ert_blocked()
|
||||
if(config.ert_admin_call_only) return 1
|
||||
if(CONFIG_GET(flag/ert_admin_call_only)) return 1
|
||||
return ticker.mode && ticker.mode.ert_disabled
|
||||
|
||||
var/global/maint_all_access = 0
|
||||
|
||||
@@ -32,40 +32,40 @@
|
||||
if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != security_level)
|
||||
switch(level)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
security_announcement_down.Announce("[config.alert_desc_green]", "Attention! Alert level lowered to code green.")
|
||||
security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_green)]", "Attention! Alert level lowered to code green.")
|
||||
security_level = SEC_LEVEL_GREEN
|
||||
if(SEC_LEVEL_YELLOW)
|
||||
if(security_level < SEC_LEVEL_YELLOW)
|
||||
security_announcement_up.Announce("[config.alert_desc_yellow_upto]", "Attention! Alert level elevated to yellow")
|
||||
security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_yellow_upto)]", "Attention! Alert level elevated to yellow")
|
||||
else
|
||||
security_announcement_down.Announce("[config.alert_desc_yellow_downto]", "Attention! Alert level lowered to yellow")
|
||||
security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_yellow_downto)]", "Attention! Alert level lowered to yellow")
|
||||
security_level = SEC_LEVEL_YELLOW
|
||||
if(SEC_LEVEL_VIOLET)
|
||||
if(security_level < SEC_LEVEL_VIOLET)
|
||||
security_announcement_up.Announce("[config.alert_desc_violet_upto]", "Attention! Alert level elevated to violet")
|
||||
security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_violet_upto)]", "Attention! Alert level elevated to violet")
|
||||
else
|
||||
security_announcement_down.Announce("[config.alert_desc_violet_downto]", "Attention! Alert level lowered to violet")
|
||||
security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_violet_downto)]", "Attention! Alert level lowered to violet")
|
||||
security_level = SEC_LEVEL_VIOLET
|
||||
if(SEC_LEVEL_ORANGE)
|
||||
if(security_level < SEC_LEVEL_ORANGE)
|
||||
security_announcement_up.Announce("[config.alert_desc_orange_upto]", "Attention! Alert level elevated to orange")
|
||||
security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_orange_upto)]", "Attention! Alert level elevated to orange")
|
||||
else
|
||||
security_announcement_down.Announce("[config.alert_desc_orange_downto]", "Attention! Alert level lowered to orange")
|
||||
security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_orange_downto)]", "Attention! Alert level lowered to orange")
|
||||
security_level = SEC_LEVEL_ORANGE
|
||||
if(SEC_LEVEL_BLUE)
|
||||
if(security_level < SEC_LEVEL_BLUE)
|
||||
security_announcement_up.Announce("[config.alert_desc_blue_upto]", "Attention! Alert level elevated to blue")
|
||||
security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_blue_upto)]", "Attention! Alert level elevated to blue")
|
||||
else
|
||||
security_announcement_down.Announce("[config.alert_desc_blue_downto]", "Attention! Alert level lowered to blue")
|
||||
security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_blue_downto)]", "Attention! Alert level lowered to blue")
|
||||
security_level = SEC_LEVEL_BLUE
|
||||
if(SEC_LEVEL_RED)
|
||||
if(security_level < SEC_LEVEL_RED)
|
||||
security_announcement_up.Announce("[config.alert_desc_red_upto]", "Attention! Code red!", new_sound = sound('sound/effects/alert_levels/red_alert.ogg', volume = 75))
|
||||
security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_red_upto)]", "Attention! Code red!", new_sound = sound('sound/effects/alert_levels/red_alert.ogg', volume = 75))
|
||||
else
|
||||
security_announcement_down.Announce("[config.alert_desc_red_downto]", "Attention! Code red!")
|
||||
security_announcement_down.Announce("[CONFIG_GET(string/alert_desc_red_downto)]", "Attention! Code red!")
|
||||
security_level = SEC_LEVEL_RED
|
||||
if(SEC_LEVEL_DELTA)
|
||||
security_announcement_up.Announce("[config.alert_desc_delta]", "Attention! Delta alert level reached!", new_sound = 'sound/effects/alert_levels/deltaklaxon.ogg')
|
||||
security_announcement_up.Announce("[CONFIG_GET(string/alert_desc_delta)]", "Attention! Delta alert level reached!", new_sound = 'sound/effects/alert_levels/deltaklaxon.ogg')
|
||||
security_level = SEC_LEVEL_DELTA
|
||||
|
||||
var/newlevel = get_security_level()
|
||||
@@ -157,4 +157,4 @@
|
||||
set_security_level(5)
|
||||
/mob/verb/set_thing6()
|
||||
set_security_level(6)
|
||||
*/
|
||||
*/
|
||||
|
||||
@@ -8,9 +8,9 @@ GLOBAL_DATUM(vgs, /datum/tgs_api)
|
||||
if(current_api)
|
||||
TGS_ERROR_LOG("API datum already set (\ref[current_api] ([current_api]))! Was TgsNew() called more than once?")
|
||||
return
|
||||
|
||||
|
||||
// If we don't have a configured access identifier we aren't meant to use VGS
|
||||
if(!config.vgs_access_identifier)
|
||||
if(!CONFIG_GET(string/vgs_access_identifier))
|
||||
TGS_INFO_LOG("Skipping VGS: No access identifier configured")
|
||||
return
|
||||
|
||||
@@ -60,9 +60,9 @@ GLOBAL_DATUM(vgs, /datum/tgs_api)
|
||||
|
||||
// Override to prevent error messages from the lack of revision/test_merge information, and to use config isntead of params.
|
||||
/datum/tgs_api/v5/vgs1/OnWorldNew()
|
||||
if(config.vgs_server_port)
|
||||
server_port = config.vgs_server_port
|
||||
access_identifier = config.vgs_access_identifier
|
||||
if(CONFIG_GET(number/vgs_server_port))
|
||||
server_port = CONFIG_GET(number/vgs_server_port)
|
||||
access_identifier = CONFIG_GET(string/vgs_access_identifier)
|
||||
|
||||
var/list/bridge_response = Bridge(DMAPI5_BRIDGE_COMMAND_STARTUP, list(DMAPI5_BRIDGE_PARAMETER_CUSTOM_COMMANDS = ListCustomCommands()))
|
||||
if(!istype(bridge_response))
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
if("join")
|
||||
var/job = params["job"]
|
||||
|
||||
if(!config.enter_allowed)
|
||||
if(!CONFIG_GET(flag/enter_allowed))
|
||||
to_chat(user, span_notice("There is an administrative lock on entering the game!"))
|
||||
return
|
||||
else if(ticker && ticker.mode && ticker.mode.explosion_in_progress)
|
||||
|
||||
@@ -385,7 +385,7 @@
|
||||
else
|
||||
move_delay = max(0, (-car_limit * active_engines) + train_length - active_engines) //limits base overweight so you cant overspeed trains
|
||||
move_delay *= (1 / max(1, active_engines)) * 2 //overweight penalty (scaled by the number of engines)
|
||||
move_delay += config.run_speed //base reference speed
|
||||
move_delay += CONFIG_GET(number/run_speed) //base reference speed
|
||||
move_delay *= speed_mod //makes cargo trains 10% slower than running when not overweight
|
||||
|
||||
/obj/vehicle/train/trolley/update_car(var/train_length, var/active_engines)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user