mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 19:15:11 +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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user