From 9f7a7bcc222d30a3e5110d2f00fc95f6125ae7e8 Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Thu, 26 Oct 2017 11:54:54 -0500 Subject: [PATCH 1/8] Vampire species for halloween --- code/__DEFINES/DNA.dm | 29 ++++ code/modules/mob/living/blood.dm | 36 +++-- .../mob/living/carbon/human/species.dm | 3 +- .../carbon/human/species_types/vampire.dm | 130 ++++++++++++++++++ .../chemistry/reagents/other_reagents.dm | 4 +- .../reagents/reagent_containers/blood_pack.dm | 3 + tgstation.dme | 1 + 7 files changed, 184 insertions(+), 22 deletions(-) create mode 100644 code/modules/mob/living/carbon/human/species_types/vampire.dm diff --git a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm index dd5a25d8ff..2a35230794 100644 --- a/code/__DEFINES/DNA.dm +++ b/code/__DEFINES/DNA.dm @@ -127,6 +127,7 @@ #define TOXINLOVER 24 #define DIGITIGRADE 25 //Uses weird leg sprites. Optional for Lizards, required for ashwalkers. Don't give it to other races unless you make sprites for this (see human_parts_greyscale.dmi) #define NO_UNDERWEAR 26 +<<<<<<< HEAD #define MUTCOLORS2 27 #define MUTCOLORS3 28 #define NOLIVER 29 @@ -135,3 +136,31 @@ #define NOAROUSAL 29 //Stops all arousal effects #define NOGENITALS 30 //Cannot create, use, or otherwise have genitals #define NO_DNA_COPY 31 +======= +#define NOLIVER 27 +#define NOSTOMACH 28 +#define NO_DNA_COPY 29 +#define DRINKSBLOOD 30 + +#define ORGAN_SLOT_BRAIN "brain" +#define ORGAN_SLOT_APPENDIX "appendix" +#define ORGAN_SLOT_RIGHT_ARM_AUG "r_arm_device" +#define ORGAN_SLOT_LEFT_ARM_AUG "l_arm_device" +#define ORGAN_SLOT_STOMACH "stomach" +#define ORGAN_SLOT_BREATHING_TUBE "breathing_tube" +#define ORGAN_SLOT_EARS "ears" +#define ORGAN_SLOT_EYES "eye_sight" +#define ORGAN_SLOT_LUNGS "lungs" +#define ORGAN_SLOT_HEART "heart" +#define ORGAN_SLOT_ZOMBIE "zombie_infection" +#define ORGAN_SLOT_THRUSTERS "thrusters" +#define ORGAN_SLOT_HUD "eye_hud" +#define ORGAN_SLOT_LIVER "liver" +#define ORGAN_SLOT_TONGUE "tongue" +#define ORGAN_SLOT_VOICE "vocal_cords" +#define ORGAN_SLOT_ADAMANTINE_RESONATOR "adamantine_resonator" +#define ORGAN_SLOT_HEART_AID "heartdrive" +#define ORGAN_SLOT_BRAIN_ANTIDROP "brain_antidrop" +#define ORGAN_SLOT_BRAIN_ANTISTUN "brain_antistun" +#define ORGAN_SLOT_TAIL "tail" +>>>>>>> ad30af5... Vampire species for halloween (#32096) diff --git a/code/modules/mob/living/blood.dm b/code/modules/mob/living/blood.dm index 30d5652ab4..45f26d55c3 100644 --- a/code/modules/mob/living/blood.dm +++ b/code/modules/mob/living/blood.dm @@ -216,25 +216,23 @@ . = list() if(!bloodtype) return - switch(bloodtype) - if("A-") - return list("A-", "O-") - if("A+") - return list("A-", "A+", "O-", "O+") - if("B-") - return list("B-", "O-") - if("B+") - return list("B-", "B+", "O-", "O+") - if("AB-") - return list("A-", "B-", "O-", "AB-") - if("AB+") - return list("A-", "A+", "B-", "B+", "O-", "O+", "AB-", "AB+") - if("O-") - return list("O-") - if("O+") - return list("O-", "O+") - if("L") - return list("L") + + var/static/list/bloodtypes_safe = list( + "A-" = list("A-", "O-"), + "A+" = list("A-", "A+", "O-", "O+"), + "B-" = list("B-", "O-"), + "B+" = list("B-", "B+", "O-", "O+"), + "AB-" = list("A-", "B-", "O-", "AB-"), + "AB+" = list("A-", "A+", "B-", "B+", "O-", "O+", "AB-", "AB+"), + "O-" = list("O-"), + "O+" = list("O-", "O+"), + "L" = list("L"), + "U" = list("A-", "A+", "B-", "B+", "O-", "O+", "AB-", "AB+", "L", "U") + ) + + var/safe = bloodtypes_safe[bloodtype] + if(safe) + . = safe //to add a splatter of blood or other mob liquid. /mob/living/proc/add_splatter_floor(turf/T, small_drip) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 7a212d371b..8704abee83 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -65,6 +65,7 @@ var/breathid = "o2" var/obj/item/organ/brain/mutant_brain = /obj/item/organ/brain + var/obj/item/organ/heart/mutant_heart = /obj/item/organ/heart var/obj/item/organ/eyes/mutanteyes = /obj/item/organ/eyes var/obj/item/organ/ears/mutantears = /obj/item/organ/ears var/obj/item/mutanthands @@ -154,7 +155,7 @@ heart.Remove(C,1) QDEL_NULL(heart) if(should_have_heart && !heart) - heart = new() + heart = new mutant_heart() heart.Insert(C) if(lungs && (replace_current || !should_have_lungs)) diff --git a/code/modules/mob/living/carbon/human/species_types/vampire.dm b/code/modules/mob/living/carbon/human/species_types/vampire.dm new file mode 100644 index 0000000000..de0b5efdff --- /dev/null +++ b/code/modules/mob/living/carbon/human/species_types/vampire.dm @@ -0,0 +1,130 @@ +/datum/species/vampire + name = "vampire" + id = "vampire" + default_color = "FFFFFF" + species_traits = list(EYECOLOR,HAIR,FACEHAIR,LIPS,NOHUNGER,NOBREATH,DRINKSBLOOD) + mutant_bodyparts = list("tail_human", "ears", "wings") + default_features = list("mcolor" = "FFF", "tail_human" = "None", "ears" = "None", "wings" = "None") + exotic_bloodtype = "U" + use_skintones = TRUE + mutant_heart = /obj/item/organ/heart/vampire + mutanttongue = /obj/item/organ/tongue/vampire + blacklisted = TRUE + limbs_id = "human" + skinned_type = /obj/item/stack/sheet/animalhide/human + var/info_text = "You are a Vampire. You will slowly but constantly lose blood if outside of a coffin. If inside a coffin, you will slowly heal. You may gain more blood by grabbing a live victim and using your drain ability." + +/datum/species/vampire/check_roundstart_eligible() + if(SSevents.holidays && SSevents.holidays[HALLOWEEN]) + return TRUE + return FALSE + +/datum/species/vampire/on_species_gain(mob/living/carbon/human/C, datum/species/old_species) + . = ..() + to_chat(C, "[info_text]") + C.skin_tone = "albino" + C.update_body(0) + if(C.mind) + var/obj/effect/proc_holder/spell/targeted/shapeshift/bat/B = new + C.mind.AddSpell(B) + +/datum/species/vampire/on_species_loss(mob/living/carbon/C) + . = ..() + if(C.mind) + for(var/S in C.mind.spell_list) + var/obj/effect/proc_holder/spell/S2 = S + if(S2.type == /obj/effect/proc_holder/spell/targeted/shapeshift/bat) + C.mind.spell_list.Remove(S2) + qdel(S2) + +/datum/species/vampire/spec_life(mob/living/carbon/human/C) + . = ..() + if(istype(C.loc, /obj/structure/closet/coffin)) + C.heal_overall_damage(4,4) + C.adjustToxLoss(-4) + C.adjustOxyLoss(-4) + C.adjustCloneLoss(-4) + return + C.blood_volume -= 1.5 + if(C.blood_volume <= BLOOD_VOLUME_SURVIVE) + to_chat(C, "You ran out of blood!") + C.dust() + var/area/A = get_area(C) + if(istype(A, /area/chapel)) + to_chat(C, "You don't belong here!") + C.adjustFireLoss(20) + C.adjust_fire_stacks(6) + C.IgniteMob() + +/obj/item/organ/tongue/vampire + name = "vampire tongue" + actions_types = list(/datum/action/item_action/organ_action/vampire) + color = "#1C1C1C" + var/drain_cooldown = 0 + +#define VAMP_DRAIN_AMOUNT 50 + +/datum/action/item_action/organ_action/vampire + name = "Drain Victim" + desc = "Leech blood from any carbon victim you are passively grabbing." + +/datum/action/item_action/organ_action/vampire/Trigger() + . = ..() + if(iscarbon(owner)) + var/mob/living/carbon/H = owner + var/obj/item/organ/tongue/vampire/V = target + if(V.drain_cooldown >= world.time) + to_chat(H, "You just drained blood, wait a few seconds.") + return + if(H.pulling && iscarbon(H.pulling)) + var/mob/living/carbon/victim = H.pulling + if(H.blood_volume >= BLOOD_VOLUME_MAXIMUM) + to_chat(H, "You're already full!") + return + if(victim.stat == DEAD) + to_chat(H, "You need a living victim!") + return + if(!victim.blood_volume || (victim.dna && ((NOBLOOD in victim.dna.species.species_traits) || victim.dna.species.exotic_blood))) + to_chat(H, "[victim] doesn't have blood!") + return + V.drain_cooldown = world.time + 30 + if(!do_after(H, 30, target = victim)) + return + var/blood_volume_difference = BLOOD_VOLUME_MAXIMUM - H.blood_volume //How much capacity we have left to absorb blood + var/drained_blood = min(victim.blood_volume, VAMP_DRAIN_AMOUNT, blood_volume_difference) + to_chat(victim, "[H] is draining your blood!") + to_chat(H, "You drain some blood!") + playsound(H, 'sound/items/drink.ogg', 30, 1, -2) + victim.blood_volume = Clamp(victim.blood_volume - drained_blood, 0, BLOOD_VOLUME_MAXIMUM) + H.blood_volume = Clamp(H.blood_volume + drained_blood, 0, BLOOD_VOLUME_MAXIMUM) + if(!victim.blood_volume) + to_chat(H, "You finish off [victim]'s blood supply!") + +#undef VAMP_DRAIN_AMOUNT + +/obj/item/organ/heart/vampire + name = "vampire heart" + actions_types = list(/datum/action/item_action/organ_action/vampire_heart) + color = "#1C1C1C" + +/datum/action/item_action/organ_action/vampire_heart + name = "Check Blood Level" + desc = "Check how much blood you have remaining." + +/datum/action/item_action/organ_action/vampire_heart/Trigger() + . = ..() + if(iscarbon(owner)) + var/mob/living/carbon/H = owner + to_chat(H, "Current blood level: [H.blood_volume]/[BLOOD_VOLUME_MAXIMUM].") + +/obj/effect/proc_holder/spell/targeted/shapeshift/bat + name = "Bat Form" + desc = "Take on the shape a space bat." + invocation = "Squeak!" + charge_max = 50 + cooldown_min = 50 + + shapeshift_type = /mob/living/simple_animal/hostile/retaliate/bat + current_shapes = list(/mob/living/simple_animal/hostile/retaliate/bat) + current_casters = list() + possible_shapes = list(/mob/living/simple_animal/hostile/retaliate/bat) \ No newline at end of file diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 0a437f120e..634e98fb2d 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -24,9 +24,9 @@ else //ingest, patch or inject M.ForceContractDisease(D) - if(method == INJECT && iscarbon(M)) + if(iscarbon(M)) var/mob/living/carbon/C = M - if(C.get_blood_id() == "blood") + if(C.get_blood_id() == "blood" && (method == INJECT || (method == INGEST && C.dna && C.dna.species && (DRINKSBLOOD in C.dna.species.species_traits)))) if(!data || !(data["blood_type"] in get_safe_blood(C.dna.blood_type))) C.reagents.add_reagent("toxin", reac_volume * 0.5) else diff --git a/code/modules/reagents/reagent_containers/blood_pack.dm b/code/modules/reagents/reagent_containers/blood_pack.dm index 2f2ef108ea..d4b8e165ee 100644 --- a/code/modules/reagents/reagent_containers/blood_pack.dm +++ b/code/modules/reagents/reagent_containers/blood_pack.dm @@ -65,6 +65,9 @@ /obj/item/reagent_containers/blood/lizard blood_type = "L" +/obj/item/reagent_containers/blood/universal + blood_type = "U" + /obj/item/reagent_containers/blood/empty name = "blood pack" icon_state = "empty" diff --git a/tgstation.dme b/tgstation.dme index 912f3cc89e..a07447e250 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -1731,6 +1731,7 @@ #include "code\modules\mob\living\carbon\human\species_types\shadowpeople.dm" #include "code\modules\mob\living\carbon\human\species_types\skeletons.dm" #include "code\modules\mob\living\carbon\human\species_types\synths.dm" +#include "code\modules\mob\living\carbon\human\species_types\vampire.dm" #include "code\modules\mob\living\carbon\human\species_types\zombies.dm" #include "code\modules\mob\living\carbon\monkey\combat.dm" #include "code\modules\mob\living\carbon\monkey\death.dm" From a221d3505f1c784171ef97031f640583e8ed7ae8 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sat, 28 Oct 2017 02:19:08 -0500 Subject: [PATCH 2/8] Update DNA.dm --- code/__DEFINES/DNA.dm | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm index 2a35230794..a2aa7b1414 100644 --- a/code/__DEFINES/DNA.dm +++ b/code/__DEFINES/DNA.dm @@ -127,7 +127,6 @@ #define TOXINLOVER 24 #define DIGITIGRADE 25 //Uses weird leg sprites. Optional for Lizards, required for ashwalkers. Don't give it to other races unless you make sprites for this (see human_parts_greyscale.dmi) #define NO_UNDERWEAR 26 -<<<<<<< HEAD #define MUTCOLORS2 27 #define MUTCOLORS3 28 #define NOLIVER 29 @@ -136,11 +135,7 @@ #define NOAROUSAL 29 //Stops all arousal effects #define NOGENITALS 30 //Cannot create, use, or otherwise have genitals #define NO_DNA_COPY 31 -======= -#define NOLIVER 27 -#define NOSTOMACH 28 -#define NO_DNA_COPY 29 -#define DRINKSBLOOD 30 +#define DRINKSBLOOD 32 #define ORGAN_SLOT_BRAIN "brain" #define ORGAN_SLOT_APPENDIX "appendix" @@ -163,4 +158,3 @@ #define ORGAN_SLOT_BRAIN_ANTIDROP "brain_antidrop" #define ORGAN_SLOT_BRAIN_ANTISTUN "brain_antistun" #define ORGAN_SLOT_TAIL "tail" ->>>>>>> ad30af5... Vampire species for halloween (#32096) From 78da30ec8d98ae63f2233d5e2b21d7368b11008b Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sun, 29 Oct 2017 00:25:17 -0500 Subject: [PATCH 3/8] Update species.dm --- .../mob/living/carbon/human/species.dm | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index c39879c952..aebd1af9ba 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1,5 +1,7 @@ // This code handles different species in the game. +GLOBAL_LIST_EMPTY(roundstart_races) + #define HEAT_DAMAGE_LEVEL_1 2 #define HEAT_DAMAGE_LEVEL_2 3 #define HEAT_DAMAGE_LEVEL_3 8 @@ -12,7 +14,6 @@ var/id // if the game needs to manually check your race to do something not included in a proc here, it will use this var/limbs_id //this is used if you want to use a different species limb sprites. Mainly used for angels as they look like humans. var/name // this is the fluff name. these will be left generic (such as 'Lizardperson' for the lizard race) so servers can change them to whatever - var/roundstart = 0 // can this mob be chosen at roundstart? (assuming the config option is checked?) var/default_color = "#FFF" // if alien colors are disabled, this is the color that will be used by that race var/sexes = 1 // whether or not the race has sexual characteristics. at the moment this is only 0 for skeletons and shadows @@ -65,7 +66,6 @@ var/breathid = "o2" var/obj/item/organ/brain/mutant_brain = /obj/item/organ/brain - var/obj/item/organ/heart/mutant_heart = /obj/item/organ/heart var/obj/item/organ/eyes/mutanteyes = /obj/item/organ/eyes var/obj/item/organ/ears/mutantears = /obj/item/organ/ears var/obj/item/mutanthands @@ -93,6 +93,20 @@ ..() +/proc/generate_selectable_species() + for(var/I in subtypesof(/datum/species)) + var/datum/species/S = new I + if(S.check_roundstart_eligible()) + GLOB.roundstart_races += S.id + qdel(S) + if(!GLOB.roundstart_races.len) + GLOB.roundstart_races += "human" + +/datum/species/proc/check_roundstart_eligible() + if(id in (CONFIG_GET(keyed_flag_list/roundstart_races))) + return TRUE + return FALSE + /datum/species/proc/random_name(gender,unique,lastname) if(unique) return random_unique_name(gender) @@ -155,7 +169,7 @@ heart.Remove(C,1) QDEL_NULL(heart) if(should_have_heart && !heart) - heart = new mutant_heart() + heart = new() heart.Insert(C) if(lungs && (replace_current || !should_have_lungs)) @@ -1153,7 +1167,7 @@ if(radiation > RAD_MOB_VOMIT && prob(RAD_MOB_VOMIT_PROB)) H.vomit(10, TRUE) - + if(radiation > RAD_MOB_MUTATE) if(prob(1)) to_chat(H, "You mutate!") From 180e730be96f9fdd8113bfa7b380f21227ac3634 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sun, 29 Oct 2017 00:46:15 -0500 Subject: [PATCH 4/8] Update species.dm --- code/modules/mob/living/carbon/human/species.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index aebd1af9ba..f5b339405d 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -66,6 +66,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) var/breathid = "o2" var/obj/item/organ/brain/mutant_brain = /obj/item/organ/brain + var/obj/item/organ/heart/mutant_heart = /obj/item/organ/heart var/obj/item/organ/eyes/mutanteyes = /obj/item/organ/eyes var/obj/item/organ/ears/mutantears = /obj/item/organ/ears var/obj/item/mutanthands @@ -169,7 +170,7 @@ GLOBAL_LIST_EMPTY(roundstart_races) heart.Remove(C,1) QDEL_NULL(heart) if(should_have_heart && !heart) - heart = new() + heart = new mutant_heart() heart.Insert(C) if(lungs && (replace_current || !should_have_lungs)) From d4e794eef7526a2d3c944cde85c0060cc8a9616d Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sun, 29 Oct 2017 00:47:25 -0500 Subject: [PATCH 5/8] Update furrypeople.dm --- .../mob/living/carbon/human/species_types/furrypeople.dm | 9 --------- 1 file changed, 9 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species_types/furrypeople.dm b/code/modules/mob/living/carbon/human/species_types/furrypeople.dm index d15280790e..bff4d8554a 100644 --- a/code/modules/mob/living/carbon/human/species_types/furrypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/furrypeople.dm @@ -8,7 +8,6 @@ attack_verb = "claw" attack_sound = 'sound/weapons/slash.ogg' miss_sound = 'sound/weapons/slashmiss.ogg' - roundstart = 1 liked_food = MEAT | FRIED disliked_food = TOXIC @@ -31,7 +30,6 @@ attack_verb = "peck" attack_sound = 'sound/weapons/slash.ogg' miss_sound = 'sound/weapons/slashmiss.ogg' - roundstart = 1 liked_food = MEAT | FRUIT disliked_food = TOXIC @@ -53,7 +51,6 @@ attack_verb = "bite" attack_sound = 'sound/weapons/bite.ogg' miss_sound = 'sound/weapons/slashmiss.ogg' - roundstart = 1 liked_food = MEAT disliked_food = TOXIC @@ -75,7 +72,6 @@ attack_verb = "flutter" //wat? attack_sound = 'sound/weapons/slash.ogg' miss_sound = 'sound/weapons/slashmiss.ogg' - roundstart = 1 liked_food = MEAT | FRUIT disliked_food = TOXIC @@ -105,7 +101,6 @@ skinned_type = /obj/item/stack/sheet/animalhide/xeno exotic_bloodtype = "L" damage_overlay_type = "xeno" - roundstart = 1 liked_food = MEAT //Praise the Omnissiah, A challange worthy of my skills - HS @@ -138,7 +133,6 @@ meat = /obj/item/reagent_containers/food/snacks/meat/slab/xeno skinned_type = /obj/item/stack/sheet/animalhide/xeno // safe_toxins_max = 32 //Too much of anything is bad. - roundstart = 0 // whitelisted = 1 // whitelist = list("talkingcactus") //testing whitelisting @@ -182,7 +176,6 @@ punchdamagehigh = 14 punchstunthreshold = 13 blacklisted = 1 - roundstart = 0 whitelist = 1 whitelist = list("talkingcactus") @@ -233,7 +226,6 @@ attack_verb = "bite" attack_sound = 'sound/weapons/bite.ogg' miss_sound = 'sound/weapons/slashmiss.ogg' -// roundstart = 1 whitelisted = 1 whitelist = list("rubyflamewing") blacklisted = 0 @@ -248,4 +240,3 @@ attack_verb = "claw" attack_sound = 'sound/weapons/slash.ogg' miss_sound = 'sound/weapons/slashmiss.ogg' - roundstart = 1 From debaad29484b2caef0907aa63c5354cae12ea2e0 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sun, 29 Oct 2017 00:47:47 -0500 Subject: [PATCH 6/8] Update podpeople.dm --- code/modules/mob/living/carbon/human/species_types/podpeople.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/species_types/podpeople.dm b/code/modules/mob/living/carbon/human/species_types/podpeople.dm index 84bf5bdf80..3881eae6f5 100644 --- a/code/modules/mob/living/carbon/human/species_types/podpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/podpeople.dm @@ -13,7 +13,6 @@ disliked_food = NONE liked_food = NONE toxic_food = NONE - roundstart = TRUE /datum/species/pod/on_species_gain(mob/living/carbon/C, datum/species/old_species) From 71dd5e8e2e4f4714ebf9d21aa2e2aed8f4d71d0c Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sun, 29 Oct 2017 00:48:50 -0500 Subject: [PATCH 7/8] Update game_options.dm --- .../configuration/entries/game_options.dm | 555 +++++++++++------- 1 file changed, 327 insertions(+), 228 deletions(-) diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index f2c9cd3315..f1ee6a557c 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -1,275 +1,374 @@ -#define CURRENT_RESIDENT_FILE "game_options.txt" +#define CURRENT_RESIDENT_FILE "config.txt" -CONFIG_DEF(number_list/repeated_mode_adjust) +CONFIG_DEF(flag/autoadmin) // if autoadmin is enabled + protection = CONFIG_ENTRY_LOCKED -CONFIG_DEF(keyed_number_list/probability) +CONFIG_DEF(string/autoadmin_rank) // the rank for autoadmins + value = "Game Master" + protection = CONFIG_ENTRY_LOCKED -/datum/config_entry/keyed_number_list/probability/ValidateKeyName(key_name) - return key_name in config.modes +CONFIG_DEF(string/servername) // server name (the name of the game window) -CONFIG_DEF(keyed_number_list/max_pop) +CONFIG_DEF(string/serversqlname) // short form server name used for the DB -/datum/config_entry/keyed_number_list/max_pop/ValidateKeyName(key_name) - return key_name in config.modes +CONFIG_DEF(string/stationname) // station name (the name of the station in-game) -CONFIG_DEF(keyed_number_list/min_pop) +CONFIG_DEF(number/lobby_countdown) // In between round countdown. + value = 120 + min_val = 0 -/datum/config_entry/keyed_number_list/min_pop/ValidateKeyName(key_name) - return key_name in config.modes +CONFIG_DEF(number/round_end_countdown) // Post round murder death kill countdown + value = 25 + min_val = 0 -CONFIG_DEF(keyed_flag_list/continuous) // which roundtypes continue if all antagonists die +CONFIG_DEF(flag/hub) // if the game appears on the hub or not -/datum/config_entry/keyed_flag_list/continuous/ValidateKeyName(key_name) - return key_name in config.modes +CONFIG_DEF(flag/log_ooc) // log OOC channel -CONFIG_DEF(keyed_flag_list/midround_antag) // which roundtypes use the midround antagonist system +CONFIG_DEF(flag/log_access) // log login/logout -/datum/config_entry/keyed_flag_list/midround_antag/ValidateKeyName(key_name) - return key_name in config.modes +CONFIG_DEF(flag/log_say) // log client say -CONFIG_DEF(keyed_string_list/policy) +CONFIG_DEF(flag/log_admin) // log admin actions + protection = CONFIG_ENTRY_LOCKED -CONFIG_DEF(number/damage_multiplier) - value = 1 +CONFIG_DEF(flag/log_prayer) // log prayers + +CONFIG_DEF(flag/log_law) // log lawchanges + +CONFIG_DEF(flag/log_game) // log game events + +CONFIG_DEF(flag/log_vote) // log voting + +CONFIG_DEF(flag/log_whisper) // log client whisper + +CONFIG_DEF(flag/log_attack) // log attack messages + +CONFIG_DEF(flag/log_emote) // log emotes + +CONFIG_DEF(flag/log_adminchat) // log admin chat messages + protection = CONFIG_ENTRY_LOCKED + +CONFIG_DEF(flag/log_pda) // log pda messages + +CONFIG_DEF(flag/log_twitter) // log certain expliotable parrots and other such fun things in a JSON file of twitter valid phrases. + +CONFIG_DEF(flag/log_world_topic) // log all world.Topic() calls + +CONFIG_DEF(flag/log_manifest) // log crew manifest to seperate file + +CONFIG_DEF(flag/allow_admin_ooccolor) // Allows admins with relevant permissions to have their own ooc colour + +CONFIG_DEF(flag/allow_vote_restart) // allow votes to restart + +CONFIG_DEF(flag/allow_vote_mode) // allow votes to change mode + +CONFIG_DEF(number/vote_delay) // minimum time between voting sessions (deciseconds, 10 minute default) + value = 6000 + min_val = 0 + +CONFIG_DEF(number/vote_period) // length of voting period (deciseconds, default 1 minute) + value = 600 + min_val = 0 + +CONFIG_DEF(flag/default_no_vote) // vote does not default to nochange/norestart + +CONFIG_DEF(flag/no_dead_vote) // dead people can't vote + +CONFIG_DEF(flag/allow_metadata) // Metadata is supported. + +CONFIG_DEF(flag/popup_admin_pm) // adminPMs to non-admins show in a pop-up 'reply' window when set + +CONFIG_DEF(number/fps) + value = 20 + min_val = 1 + max_val = 100 //byond will start crapping out at 50, so this is just ridic + var/sync_validate = FALSE + +/datum/config_entry/number/fps/ValidateAndSet(str_val) + . = ..() + if(.) + sync_validate = TRUE + var/datum/config_entry/number/ticklag/TL = config.entries_by_type[/datum/config_entry/number/ticklag] + if(!TL.sync_validate) + TL.ValidateAndSet(10 / value) + sync_validate = FALSE + +CONFIG_DEF(number/ticklag) + integer = FALSE + var/sync_validate = FALSE + +/datum/config_entry/number/ticklag/New() //ticklag weirdly just mirrors fps + var/datum/config_entry/CE = /datum/config_entry/number/fps + value = 10 / initial(CE.value) + ..() + +/datum/config_entry/number/ticklag/ValidateAndSet(str_val) + . = text2num(str_val) > 0 && ..() + if(.) + sync_validate = TRUE + var/datum/config_entry/number/fps/FPS = config.entries_by_type[/datum/config_entry/number/fps] + if(!FPS.sync_validate) + FPS.ValidateAndSet(10 / value) + sync_validate = FALSE + +CONFIG_DEF(flag/allow_holidays) + +CONFIG_DEF(number/tick_limit_mc_init) //SSinitialization throttling + value = TICK_LIMIT_MC_INIT_DEFAULT + min_val = 0 //oranges warned us integer = FALSE -CONFIG_DEF(number/minimal_access_threshold) //If the number of players is larger than this threshold, minimal access will be turned on. +CONFIG_DEF(flag/admin_legacy_system) //Defines whether the server uses the legacy admin system with admins.txt or the SQL system + protection = CONFIG_ENTRY_LOCKED + +CONFIG_DEF(string/hostedby) + +CONFIG_DEF(flag/norespawn) + +CONFIG_DEF(flag/guest_jobban) + +CONFIG_DEF(flag/usewhitelist) + +CONFIG_DEF(flag/ban_legacy_system) //Defines whether the server uses the legacy banning system with the files in /data or the SQL system. + protection = CONFIG_ENTRY_LOCKED + +CONFIG_DEF(flag/use_age_restriction_for_jobs) //Do jobs use account age restrictions? --requires database + +CONFIG_DEF(flag/use_account_age_for_jobs) //Uses the time they made the account for the job restriction stuff. New player joining alerts should be unaffected. + +CONFIG_DEF(flag/use_exp_tracking) + +CONFIG_DEF(flag/use_exp_restrictions_heads) + +CONFIG_DEF(number/use_exp_restrictions_heads_hours) + value = 0 min_val = 0 -CONFIG_DEF(flag/jobs_have_minimal_access) //determines whether jobs use minimal access or expanded access. +CONFIG_DEF(flag/use_exp_restrictions_heads_department) -CONFIG_DEF(flag/assistants_have_maint_access) +CONFIG_DEF(flag/use_exp_restrictions_other) -CONFIG_DEF(flag/security_has_maint_access) +CONFIG_DEF(flag/use_exp_restrictions_admin_bypass) -CONFIG_DEF(flag/everyone_has_maint_access) +CONFIG_DEF(string/server) -CONFIG_DEF(flag/sec_start_brig) //makes sec start in brig instead of dept sec posts +CONFIG_DEF(string/banappeals) -CONFIG_DEF(flag/force_random_names) +CONFIG_DEF(string/wikiurl) + value = "http://www.tgstation13.org/wiki" -CONFIG_DEF(flag/humans_need_surnames) +CONFIG_DEF(string/forumurl) + value = "http://tgstation13.org/phpBB/index.php" -CONFIG_DEF(flag/allow_ai) // allow ai job +CONFIG_DEF(string/rulesurl) + value = "http://www.tgstation13.org/wiki/Rules" -CONFIG_DEF(flag/disable_secborg) // disallow secborg module to be chosen. +CONFIG_DEF(string/githuburl) + value = "https://www.github.com/tgstation/-tg-station" -CONFIG_DEF(flag/disable_peaceborg) - -CONFIG_DEF(number/traitor_scaling_coeff) //how much does the amount of players get divided by to determine traitors - value = 6 - min_val = 1 - -CONFIG_DEF(number/brother_scaling_coeff) //how many players per brother team - value = 25 - min_val = 1 - -CONFIG_DEF(number/changeling_scaling_coeff) //how much does the amount of players get divided by to determine changelings - value = 6 - min_val = 1 - -CONFIG_DEF(number/security_scaling_coeff) //how much does the amount of players get divided by to determine open security officer positions - value = 8 - min_val = 1 - -CONFIG_DEF(number/abductor_scaling_coeff) //how many players per abductor team - value = 15 - min_val = 1 - -CONFIG_DEF(number/traitor_objectives_amount) - value = 2 +CONFIG_DEF(number/githubrepoid) + value = null min_val = 0 -CONFIG_DEF(number/brother_objectives_amount) - value = 2 +CONFIG_DEF(flag/guest_ban) + +CONFIG_DEF(number/id_console_jobslot_delay) + value = 30 min_val = 0 -CONFIG_DEF(flag/reactionary_explosions) //If we use reactionary explosions, explosions that react to walls and doors - -CONFIG_DEF(flag/protect_roles_from_antagonist) //If security and such can be traitor/cult/other - -CONFIG_DEF(flag/protect_assistant_from_antagonist) //If assistants can be traitor/cult/other - -CONFIG_DEF(flag/enforce_human_authority) //If non-human species are barred from joining as a head of staff - -CONFIG_DEF(flag/allow_latejoin_antagonists) // If late-joining players can be traitor/changeling - -CONFIG_DEF(number/midround_antag_time_check) // How late (in minutes) you want the midround antag system to stay on, setting this to 0 will disable the system - value = 60 +CONFIG_DEF(number/inactivity_period) //time in ds until a player is considered inactive) + value = 3000 min_val = 0 -CONFIG_DEF(number/midround_antag_life_check) // A ratio of how many people need to be alive in order for the round not to immediately end in midround antagonist - value = 0.7 +/datum/config_entry/number/inactivity_period/ValidateAndSet(str_val) + . = ..() + if(.) + value *= 10 //documented as seconds in config.txt + +CONFIG_DEF(number/afk_period) //time in ds until a player is considered inactive) + value = 3000 + min_val = 0 + +/datum/config_entry/number/afk_period/ValidateAndSet(str_val) + . = ..() + if(.) + value *= 10 //documented as seconds in config.txt + +CONFIG_DEF(flag/kick_inactive) //force disconnect for inactive players + +CONFIG_DEF(flag/load_jobs_from_txt) + +CONFIG_DEF(flag/forbid_singulo_possession) + +CONFIG_DEF(flag/automute_on) //enables automuting/spam prevention + +CONFIG_DEF(string/panic_server_name) + +/datum/config_entry/string/panic_server_name/ValidateAndSet(str_val) + return str_val != "\[Put the name here\]" && ..() + +CONFIG_DEF(string/panic_address) //Reconnect a player this linked server if this server isn't accepting new players + +/datum/config_entry/string/panic_address/ValidateAndSet(str_val) + return str_val != "byond://address:port" && ..() + +CONFIG_DEF(string/invoke_youtubedl) + protection = CONFIG_ENTRY_LOCKED | CONFIG_ENTRY_HIDDEN + +CONFIG_DEF(flag/show_irc_name) + +CONFIG_DEF(flag/see_own_notes) //Can players see their own admin notes (read-only)? + +CONFIG_DEF(number/note_fresh_days) + value = null + min_val = 0 + integer = FALSE + +CONFIG_DEF(number/note_stale_days) + value = null + min_val = 0 + integer = FALSE + +CONFIG_DEF(flag/maprotation) + +CONFIG_DEF(number/maprotatechancedelta) + value = 0.75 + min_val = 0 + max_val = 1 + integer = FALSE + +CONFIG_DEF(number/soft_popcap) + value = null + min_val = 0 + +CONFIG_DEF(number/hard_popcap) + value = null + min_val = 0 + +CONFIG_DEF(number/extreme_popcap) + value = null + min_val = 0 + +CONFIG_DEF(string/soft_popcap_message) + value = "Be warned that the server is currently serving a high number of users, consider using alternative game servers." + +CONFIG_DEF(string/hard_popcap_message) + value = "The server is currently serving a high number of users, You cannot currently join. You may wait for the number of living crew to decline, observe, or find alternative servers." + +CONFIG_DEF(string/extreme_popcap_message) + value = "The server is currently serving a high number of users, find alternative servers." + +CONFIG_DEF(flag/panic_bunker) // prevents people the server hasn't seen before from connecting + +CONFIG_DEF(number/notify_new_player_age) // how long do we notify admins of a new player + min_val = -1 + +CONFIG_DEF(number/notify_new_player_account_age) // how long do we notify admins of a new byond account + min_val = 0 + +CONFIG_DEF(flag/irc_first_connection_alert) // do we notify the irc channel when somebody is connecting for the first time? + +CONFIG_DEF(flag/check_randomizer) + +CONFIG_DEF(string/ipintel_email) + +/datum/config_entry/string/ipintel_email/ValidateAndSet(str_val) + return str_val != "ch@nge.me" && ..() + +CONFIG_DEF(number/ipintel_rating_bad) + value = 1 integer = FALSE min_val = 0 max_val = 1 -CONFIG_DEF(number/shuttle_refuel_delay) - value = 12000 - min_val = 0 - -CONFIG_DEF(flag/show_game_type_odds) //if set this allows players to see the odds of each roundtype on the get revision screen - -CONFIG_DEF(flag/join_with_mutant_race) //players can choose their mutant race before joining the game - -CONFIG_DEF(keyed_flag_list/roundstart_races) //races you can play as from the get go. If left undefined the game's roundstart var for species is used - var/first_edit = TRUE - -/datum/config_entry/keyed_flag_list/roundstart_races/New() - for(var/I in subtypesof(/datum/species)) - var/datum/species/S = I - if(initial(S.roundstart)) - value[initial(S.id)] = TRUE - ..() - -/datum/config_entry/keyed_flag_list/roundstart_races/ValidateAndSet(str_val) - var/list/old_val - if(first_edit) - old_val = value - old_val = old_val.Copy() - . = ..() - if(first_edit) - if(!.) - value = old_val - else - first_edit = FALSE - -CONFIG_DEF(flag/join_with_mutant_humans) //players can pick mutant bodyparts for humans before joining the game - -CONFIG_DEF(flag/no_summon_guns) //No - -CONFIG_DEF(flag/no_summon_magic) //Fun - -CONFIG_DEF(flag/no_summon_events) //Allowed - -CONFIG_DEF(flag/no_intercept_report) //Whether or not to send a communications intercept report roundstart. This may be overriden by gamemodes. - -CONFIG_DEF(number/arrivals_shuttle_dock_window) //Time from when a player late joins on the arrivals shuttle to when the shuttle docks on the station - value = 55 - min_val = 30 - -CONFIG_DEF(flag/arrivals_shuttle_require_undocked) //Require the arrivals shuttle to be undocked before latejoiners can join - -CONFIG_DEF(flag/arrivals_shuttle_require_safe_latejoin) //Require the arrivals shuttle to be operational in order for latejoiners to join - -CONFIG_DEF(string/alert_green) - value = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced." - -CONFIG_DEF(string/alert_blue_upto) - value = "The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible, random searches are permitted." - -CONFIG_DEF(string/alert_blue_downto) - value = "The immediate threat has passed. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still allowed." - -CONFIG_DEF(string/alert_red_upto) - value = "There is an immediate serious threat to the station. Security may have weapons unholstered at all times. Random searches are allowed and advised." - -CONFIG_DEF(string/alert_red_downto) - value = "The station's destruction has been averted. There is still however an immediate serious threat to the station. Security may have weapons unholstered at all times, random searches are allowed and advised." - -CONFIG_DEF(string/alert_delta) - value = "Destruction of the station is imminent. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill." - -CONFIG_DEF(flag/revival_pod_plants) - -CONFIG_DEF(flag/revival_cloning) - -CONFIG_DEF(number/revival_brain_life) - value = -1 - min_val = -1 - -CONFIG_DEF(flag/rename_cyborg) - -CONFIG_DEF(flag/ooc_during_round) - -CONFIG_DEF(flag/emojis) - -CONFIG_DEF(number/run_delay) //Used for modifying movement speed for mobs. - -CONFIG_DEF(number/walk_delay) - - -CONFIG_DEF(number/human_delay) //Mob specific modifiers. NOTE: These will affect different mob types in different ways -CONFIG_DEF(number/robot_delay) -CONFIG_DEF(number/monkey_delay) -CONFIG_DEF(number/alien_delay) -CONFIG_DEF(number/slime_delay) -CONFIG_DEF(number/animal_delay) - -CONFIG_DEF(number/gateway_delay) //How long the gateway takes before it activates. Default is half an hour. - value = 18000 - min_val = 0 - -CONFIG_DEF(flag/ghost_interaction) - -CONFIG_DEF(flag/silent_ai) -CONFIG_DEF(flag/silent_borg) - -CONFIG_DEF(flag/sandbox_autoclose) // close the sandbox panel after spawning an item, potentially reducing griff - -CONFIG_DEF(number/default_laws) //Controls what laws the AI spawns with. - value = 0 - min_val = 0 - max_val = 3 - -CONFIG_DEF(number/silicon_max_law_amount) +CONFIG_DEF(number/ipintel_save_good) value = 12 min_val = 0 -CONFIG_DEF(keyed_flag_list/random_laws) +CONFIG_DEF(number/ipintel_save_bad) + value = 1 + min_val = 0 -CONFIG_DEF(keyed_number_list/law_weight) - splitter = "," +CONFIG_DEF(string/ipintel_domain) + value = "check.getipintel.net" -CONFIG_DEF(number/assistant_cap) - value = -1 - min_val = -1 +CONFIG_DEF(flag/aggressive_changelog) -CONFIG_DEF(flag/starlight) -CONFIG_DEF(flag/grey_assistants) +CONFIG_DEF(flag/autoconvert_notes) //if all connecting player's notes should attempt to be converted to the database + protection = CONFIG_ENTRY_LOCKED -CONFIG_DEF(number/lavaland_budget) +CONFIG_DEF(flag/allow_webclient) + +CONFIG_DEF(flag/webclient_only_byond_members) + +CONFIG_DEF(flag/announce_admin_logout) + +CONFIG_DEF(flag/announce_admin_login) + +CONFIG_DEF(flag/allow_map_voting) + +CONFIG_DEF(flag/generate_minimaps) + +CONFIG_DEF(number/client_warn_version) + value = null + min_val = 500 + max_val = DM_VERSION - 1 + +CONFIG_DEF(string/client_warn_message) + value = "Your version of byond may have issues or be blocked from accessing this server in the future." + +CONFIG_DEF(number/client_error_version) + value = null + min_val = 500 + max_val = DM_VERSION - 1 + +CONFIG_DEF(string/client_error_message) + value = "Your version of byond is too old, may have issues, and is blocked from accessing this server." + +CONFIG_DEF(number/minute_topic_limit) + value = null + min_val = 0 + +CONFIG_DEF(number/second_topic_limit) + value = null + min_val = 0 + +CONFIG_DEF(number/error_cooldown) // The "cooldown" time for each occurrence of a unique error) + value = 600 + min_val = 0 + +CONFIG_DEF(number/error_limit) // How many occurrences before the next will silence them + value = 50 + +CONFIG_DEF(number/error_silence_time) // How long a unique error will be silenced for + value = 6000 + +CONFIG_DEF(number/error_msg_delay) // How long to wait between messaging admins about occurrences of a unique error + value = 50 + +CONFIG_DEF(flag/irc_announce_new_game) + +CONFIG_DEF(flag/debug_admin_hrefs) + +CONFIG_DEF(number/mc_tick_rate/base_mc_tick_rate) + integer = FALSE + value = 1 + +CONFIG_DEF(number/mc_tick_rate/high_pop_mc_tick_rate) + integer = FALSE + value = 1.1 + +CONFIG_DEF(number/mc_tick_rate/high_pop_mc_mode_amount) + value = 65 + +CONFIG_DEF(number/mc_tick_rate/disable_high_pop_mc_mode_amount) value = 60 - min_val = 0 -CONFIG_DEF(number/space_budget) - value = 16 - min_val = 0 +CONFIG_TWEAK(number/mc_tick_rate) + abstract_type = /datum/config_entry/number/mc_tick_rate -CONFIG_DEF(flag/allow_random_events) // Enables random events mid-round when set - -CONFIG_DEF(number/events_min_time_mul) // Multipliers for random events minimal starting time and minimal players amounts - value = 1 - min_val = 0 - integer = FALSE - -CONFIG_DEF(number/events_min_players_mul) - value = 1 - min_val = 0 - integer = FALSE - -CONFIG_DEF(number/mice_roundstart) - value = 10 - min_val = 0 - -CONFIG_DEF(number/bombcap) - value = 14 - min_val = 4 - -CONFIG_DEF(flag/allow_crew_objectives) -CONFIG_DEF(flag/allow_miscreants) -CONFIG_DEF(flag/allow_extended_miscreants) - -/datum/config_entry/number/bombcap/ValidateAndSet(str_val) +CONFIG_TWEAK(number/mc_tick_rate/ValidateAndSet(str_val)) . = ..() - if(.) - GLOB.MAX_EX_DEVESTATION_RANGE = round(value / 4) - GLOB.MAX_EX_HEAVY_RANGE = round(value / 2) - GLOB.MAX_EX_LIGHT_RANGE = value - GLOB.MAX_EX_FLASH_RANGE = value - GLOB.MAX_EX_FLAME_RANGE = value - -CONFIG_DEF(number/emergency_shuttle_autocall_threshold) - min_val = 0 - max_val = 1 - integer = FALSE + if (.) + Master.UpdateTickRate() From d24e4f2d849de7c3dd8866f4ab66458a06f88748 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sun, 29 Oct 2017 00:59:20 -0500 Subject: [PATCH 8/8] Update game_options.dm --- .../configuration/entries/game_options.dm | 571 +++++++----------- 1 file changed, 226 insertions(+), 345 deletions(-) diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index aaa3b2a029..a49742e6b0 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -1,374 +1,255 @@ -#define CURRENT_RESIDENT_FILE "config.txt" +#define CURRENT_RESIDENT_FILE "game_options.txt" -CONFIG_DEF(flag/autoadmin) // if autoadmin is enabled - protection = CONFIG_ENTRY_LOCKED +CONFIG_DEF(number_list/repeated_mode_adjust) -CONFIG_DEF(string/autoadmin_rank) // the rank for autoadmins - value = "Game Master" - protection = CONFIG_ENTRY_LOCKED +CONFIG_DEF(keyed_number_list/probability) -CONFIG_DEF(string/servername) // server name (the name of the game window) +/datum/config_entry/keyed_number_list/probability/ValidateKeyName(key_name) + return key_name in config.modes -CONFIG_DEF(string/serversqlname) // short form server name used for the DB +CONFIG_DEF(keyed_number_list/max_pop) -CONFIG_DEF(string/stationname) // station name (the name of the station in-game) +/datum/config_entry/keyed_number_list/max_pop/ValidateKeyName(key_name) + return key_name in config.modes -CONFIG_DEF(number/lobby_countdown) // In between round countdown. - value = 120 - min_val = 0 +CONFIG_DEF(keyed_number_list/min_pop) -CONFIG_DEF(number/round_end_countdown) // Post round murder death kill countdown - value = 25 - min_val = 0 +/datum/config_entry/keyed_number_list/min_pop/ValidateKeyName(key_name) + return key_name in config.modes -CONFIG_DEF(flag/hub) // if the game appears on the hub or not +CONFIG_DEF(keyed_flag_list/continuous) // which roundtypes continue if all antagonists die -CONFIG_DEF(flag/log_ooc) // log OOC channel +/datum/config_entry/keyed_flag_list/continuous/ValidateKeyName(key_name) + return key_name in config.modes -CONFIG_DEF(flag/log_access) // log login/logout +CONFIG_DEF(keyed_flag_list/midround_antag) // which roundtypes use the midround antagonist system -CONFIG_DEF(flag/log_say) // log client say +/datum/config_entry/keyed_flag_list/midround_antag/ValidateKeyName(key_name) + return key_name in config.modes -CONFIG_DEF(flag/log_admin) // log admin actions - protection = CONFIG_ENTRY_LOCKED +CONFIG_DEF(keyed_string_list/policy) -CONFIG_DEF(flag/log_prayer) // log prayers - -CONFIG_DEF(flag/log_law) // log lawchanges - -CONFIG_DEF(flag/log_game) // log game events - -CONFIG_DEF(flag/log_vote) // log voting - -CONFIG_DEF(flag/log_whisper) // log client whisper - -CONFIG_DEF(flag/log_attack) // log attack messages - -CONFIG_DEF(flag/log_emote) // log emotes - -CONFIG_DEF(flag/log_adminchat) // log admin chat messages - protection = CONFIG_ENTRY_LOCKED - -CONFIG_DEF(flag/log_pda) // log pda messages - -CONFIG_DEF(flag/log_twitter) // log certain expliotable parrots and other such fun things in a JSON file of twitter valid phrases. - -CONFIG_DEF(flag/log_world_topic) // log all world.Topic() calls - -CONFIG_DEF(flag/log_manifest) // log crew manifest to seperate file - -CONFIG_DEF(flag/allow_admin_ooccolor) // Allows admins with relevant permissions to have their own ooc colour - -CONFIG_DEF(flag/allow_vote_restart) // allow votes to restart - -CONFIG_DEF(flag/allow_vote_mode) // allow votes to change mode - -CONFIG_DEF(number/vote_delay) // minimum time between voting sessions (deciseconds, 10 minute default) - value = 6000 - min_val = 0 - -CONFIG_DEF(number/vote_period) // length of voting period (deciseconds, default 1 minute) - value = 600 - min_val = 0 - -CONFIG_DEF(flag/default_no_vote) // vote does not default to nochange/norestart - -CONFIG_DEF(flag/no_dead_vote) // dead people can't vote - -CONFIG_DEF(flag/allow_metadata) // Metadata is supported. - -CONFIG_DEF(flag/popup_admin_pm) // adminPMs to non-admins show in a pop-up 'reply' window when set - -CONFIG_DEF(number/fps) - value = 20 - min_val = 1 - max_val = 100 //byond will start crapping out at 50, so this is just ridic - var/sync_validate = FALSE - -/datum/config_entry/number/fps/ValidateAndSet(str_val) - . = ..() - if(.) - sync_validate = TRUE - var/datum/config_entry/number/ticklag/TL = config.entries_by_type[/datum/config_entry/number/ticklag] - if(!TL.sync_validate) - TL.ValidateAndSet(10 / value) - sync_validate = FALSE - -CONFIG_DEF(number/ticklag) - integer = FALSE - var/sync_validate = FALSE - -/datum/config_entry/number/ticklag/New() //ticklag weirdly just mirrors fps - var/datum/config_entry/CE = /datum/config_entry/number/fps - value = 10 / initial(CE.value) - ..() - -/datum/config_entry/number/ticklag/ValidateAndSet(str_val) - . = text2num(str_val) > 0 && ..() - if(.) - sync_validate = TRUE - var/datum/config_entry/number/fps/FPS = config.entries_by_type[/datum/config_entry/number/fps] - if(!FPS.sync_validate) - FPS.ValidateAndSet(10 / value) - sync_validate = FALSE - -CONFIG_DEF(flag/allow_holidays) - -CONFIG_DEF(number/tick_limit_mc_init) //SSinitialization throttling - value = TICK_LIMIT_MC_INIT_DEFAULT - min_val = 0 //oranges warned us - integer = FALSE - -CONFIG_DEF(flag/admin_legacy_system) //Defines whether the server uses the legacy admin system with admins.txt or the SQL system - protection = CONFIG_ENTRY_LOCKED - -CONFIG_DEF(string/hostedby) - -CONFIG_DEF(flag/norespawn) - -CONFIG_DEF(flag/guest_jobban) - -CONFIG_DEF(flag/usewhitelist) - -CONFIG_DEF(flag/ban_legacy_system) //Defines whether the server uses the legacy banning system with the files in /data or the SQL system. - protection = CONFIG_ENTRY_LOCKED - -CONFIG_DEF(flag/use_age_restriction_for_jobs) //Do jobs use account age restrictions? --requires database - -CONFIG_DEF(flag/use_account_age_for_jobs) //Uses the time they made the account for the job restriction stuff. New player joining alerts should be unaffected. - -CONFIG_DEF(flag/use_exp_tracking) - -CONFIG_DEF(flag/use_exp_restrictions_heads) - -CONFIG_DEF(number/use_exp_restrictions_heads_hours) - value = 0 - min_val = 0 - -CONFIG_DEF(flag/use_exp_restrictions_heads_department) - -CONFIG_DEF(flag/use_exp_restrictions_other) - -CONFIG_DEF(flag/use_exp_restrictions_admin_bypass) - -CONFIG_DEF(string/server) - -CONFIG_DEF(string/banappeals) - -CONFIG_DEF(string/wikiurl) - value = "http://www.tgstation13.org/wiki" - -CONFIG_DEF(string/forumurl) - value = "http://tgstation13.org/phpBB/index.php" - -CONFIG_DEF(string/rulesurl) - value = "http://www.tgstation13.org/wiki/Rules" - -CONFIG_DEF(string/githuburl) - value = "https://www.github.com/tgstation/-tg-station" - -CONFIG_DEF(number/githubrepoid) - value = null - min_val = 0 - -CONFIG_DEF(flag/guest_ban) - -CONFIG_DEF(number/id_console_jobslot_delay) - value = 30 - min_val = 0 - -CONFIG_DEF(number/inactivity_period) //time in ds until a player is considered inactive) - value = 3000 - min_val = 0 - -/datum/config_entry/number/inactivity_period/ValidateAndSet(str_val) - . = ..() - if(.) - value *= 10 //documented as seconds in config.txt - -CONFIG_DEF(number/afk_period) //time in ds until a player is considered inactive) - value = 3000 - min_val = 0 - -/datum/config_entry/number/afk_period/ValidateAndSet(str_val) - . = ..() - if(.) - value *= 10 //documented as seconds in config.txt - -CONFIG_DEF(flag/kick_inactive) //force disconnect for inactive players - -CONFIG_DEF(flag/load_jobs_from_txt) - -CONFIG_DEF(flag/forbid_singulo_possession) - -CONFIG_DEF(flag/automute_on) //enables automuting/spam prevention - -CONFIG_DEF(string/panic_server_name) - -/datum/config_entry/string/panic_server_name/ValidateAndSet(str_val) - return str_val != "\[Put the name here\]" && ..() - -CONFIG_DEF(string/panic_address) //Reconnect a player this linked server if this server isn't accepting new players - -/datum/config_entry/string/panic_address/ValidateAndSet(str_val) - return str_val != "byond://address:port" && ..() - -CONFIG_DEF(string/invoke_youtubedl) - protection = CONFIG_ENTRY_LOCKED | CONFIG_ENTRY_HIDDEN - -CONFIG_DEF(flag/show_irc_name) - -CONFIG_DEF(flag/see_own_notes) //Can players see their own admin notes (read-only)? - -CONFIG_DEF(number/note_fresh_days) - value = null - min_val = 0 - integer = FALSE - -CONFIG_DEF(number/note_stale_days) - value = null - min_val = 0 - integer = FALSE - -CONFIG_DEF(flag/maprotation) - -CONFIG_DEF(number/maprotatechancedelta) - value = 0.75 - min_val = 0 - max_val = 1 - integer = FALSE - -CONFIG_DEF(number/soft_popcap) - value = null - min_val = 0 - -CONFIG_DEF(number/hard_popcap) - value = null - min_val = 0 - -CONFIG_DEF(number/extreme_popcap) - value = null - min_val = 0 - -CONFIG_DEF(string/soft_popcap_message) - value = "Be warned that the server is currently serving a high number of users, consider using alternative game servers." - -CONFIG_DEF(string/hard_popcap_message) - value = "The server is currently serving a high number of users, You cannot currently join. You may wait for the number of living crew to decline, observe, or find alternative servers." - -CONFIG_DEF(string/extreme_popcap_message) - value = "The server is currently serving a high number of users, find alternative servers." - -CONFIG_DEF(flag/panic_bunker) // prevents people the server hasn't seen before from connecting - -CONFIG_DEF(number/notify_new_player_age) // how long do we notify admins of a new player - min_val = -1 - -CONFIG_DEF(number/notify_new_player_account_age) // how long do we notify admins of a new byond account - min_val = 0 - -CONFIG_DEF(flag/irc_first_connection_alert) // do we notify the irc channel when somebody is connecting for the first time? - -CONFIG_DEF(flag/check_randomizer) - -CONFIG_DEF(string/ipintel_email) - -/datum/config_entry/string/ipintel_email/ValidateAndSet(str_val) - return str_val != "ch@nge.me" && ..() - -CONFIG_DEF(number/ipintel_rating_bad) +CONFIG_DEF(number/damage_multiplier) value = 1 integer = FALSE + +CONFIG_DEF(number/minimal_access_threshold) //If the number of players is larger than this threshold, minimal access will be turned on. + min_val = 0 + +CONFIG_DEF(flag/jobs_have_minimal_access) //determines whether jobs use minimal access or expanded access. + +CONFIG_DEF(flag/assistants_have_maint_access) + +CONFIG_DEF(flag/security_has_maint_access) + +CONFIG_DEF(flag/everyone_has_maint_access) + +CONFIG_DEF(flag/sec_start_brig) //makes sec start in brig instead of dept sec posts + +CONFIG_DEF(flag/force_random_names) + +CONFIG_DEF(flag/humans_need_surnames) + +CONFIG_DEF(flag/allow_ai) // allow ai job + +CONFIG_DEF(flag/disable_secborg) // disallow secborg module to be chosen. + +CONFIG_DEF(flag/disable_peaceborg) + +CONFIG_DEF(number/traitor_scaling_coeff) //how much does the amount of players get divided by to determine traitors + value = 6 + min_val = 1 + +CONFIG_DEF(number/brother_scaling_coeff) //how many players per brother team + value = 25 + min_val = 1 + +CONFIG_DEF(number/changeling_scaling_coeff) //how much does the amount of players get divided by to determine changelings + value = 6 + min_val = 1 + +CONFIG_DEF(number/security_scaling_coeff) //how much does the amount of players get divided by to determine open security officer positions + value = 8 + min_val = 1 + +CONFIG_DEF(number/abductor_scaling_coeff) //how many players per abductor team + value = 15 + min_val = 1 + +CONFIG_DEF(number/traitor_objectives_amount) + value = 2 + min_val = 0 + +CONFIG_DEF(number/brother_objectives_amount) + value = 2 + min_val = 0 + +CONFIG_DEF(flag/reactionary_explosions) //If we use reactionary explosions, explosions that react to walls and doors + +CONFIG_DEF(flag/protect_roles_from_antagonist) //If security and such can be traitor/cult/other + +CONFIG_DEF(flag/protect_assistant_from_antagonist) //If assistants can be traitor/cult/other + +CONFIG_DEF(flag/enforce_human_authority) //If non-human species are barred from joining as a head of staff + +CONFIG_DEF(flag/allow_latejoin_antagonists) // If late-joining players can be traitor/changeling + +CONFIG_DEF(number/midround_antag_time_check) // How late (in minutes) you want the midround antag system to stay on, setting this to 0 will disable the system + value = 60 + min_val = 0 + +CONFIG_DEF(number/midround_antag_life_check) // A ratio of how many people need to be alive in order for the round not to immediately end in midround antagonist + value = 0.7 + integer = FALSE min_val = 0 max_val = 1 -CONFIG_DEF(number/ipintel_save_good) +CONFIG_DEF(number/shuttle_refuel_delay) + value = 12000 + min_val = 0 + +CONFIG_DEF(flag/show_game_type_odds) //if set this allows players to see the odds of each roundtype on the get revision screen + +CONFIG_DEF(flag/join_with_mutant_race) //players can choose their mutant race before joining the game + +CONFIG_DEF(keyed_flag_list/roundstart_races) //races you can play as from the get go. + +CONFIG_DEF(flag/join_with_mutant_humans) //players can pick mutant bodyparts for humans before joining the game + +CONFIG_DEF(flag/no_summon_guns) //No + +CONFIG_DEF(flag/no_summon_magic) //Fun + +CONFIG_DEF(flag/no_summon_events) //Allowed + +CONFIG_DEF(flag/no_intercept_report) //Whether or not to send a communications intercept report roundstart. This may be overriden by gamemodes. + +CONFIG_DEF(number/arrivals_shuttle_dock_window) //Time from when a player late joins on the arrivals shuttle to when the shuttle docks on the station + value = 55 + min_val = 30 + +CONFIG_DEF(flag/arrivals_shuttle_require_undocked) //Require the arrivals shuttle to be undocked before latejoiners can join + +CONFIG_DEF(flag/arrivals_shuttle_require_safe_latejoin) //Require the arrivals shuttle to be operational in order for latejoiners to join + +CONFIG_DEF(string/alert_green) + value = "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced." + +CONFIG_DEF(string/alert_blue_upto) + value = "The station has received reliable information about possible hostile activity on the station. Security staff may have weapons visible, random searches are permitted." + +CONFIG_DEF(string/alert_blue_downto) + value = "The immediate threat has passed. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still allowed." + +CONFIG_DEF(string/alert_red_upto) + value = "There is an immediate serious threat to the station. Security may have weapons unholstered at all times. Random searches are allowed and advised." + +CONFIG_DEF(string/alert_red_downto) + value = "The station's destruction has been averted. There is still however an immediate serious threat to the station. Security may have weapons unholstered at all times, random searches are allowed and advised." + +CONFIG_DEF(string/alert_delta) + value = "Destruction of the station is imminent. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill." + +CONFIG_DEF(flag/revival_pod_plants) + +CONFIG_DEF(flag/revival_cloning) + +CONFIG_DEF(number/revival_brain_life) + value = -1 + min_val = -1 + +CONFIG_DEF(flag/rename_cyborg) + +CONFIG_DEF(flag/ooc_during_round) + +CONFIG_DEF(flag/emojis) + +CONFIG_DEF(number/run_delay) //Used for modifying movement speed for mobs. + +CONFIG_DEF(number/walk_delay) + + +CONFIG_DEF(number/human_delay) //Mob specific modifiers. NOTE: These will affect different mob types in different ways +CONFIG_DEF(number/robot_delay) +CONFIG_DEF(number/monkey_delay) +CONFIG_DEF(number/alien_delay) +CONFIG_DEF(number/slime_delay) +CONFIG_DEF(number/animal_delay) + +CONFIG_DEF(number/gateway_delay) //How long the gateway takes before it activates. Default is half an hour. + value = 18000 + min_val = 0 + +CONFIG_DEF(flag/ghost_interaction) + +CONFIG_DEF(flag/silent_ai) +CONFIG_DEF(flag/silent_borg) + +CONFIG_DEF(flag/sandbox_autoclose) // close the sandbox panel after spawning an item, potentially reducing griff + +CONFIG_DEF(number/default_laws) //Controls what laws the AI spawns with. + value = 0 + min_val = 0 + max_val = 3 + +CONFIG_DEF(number/silicon_max_law_amount) value = 12 min_val = 0 -CONFIG_DEF(number/ipintel_save_bad) - value = 1 - min_val = 0 +CONFIG_DEF(keyed_flag_list/random_laws) -CONFIG_DEF(string/ipintel_domain) - value = "check.getipintel.net" +CONFIG_DEF(keyed_number_list/law_weight) + splitter = "," -CONFIG_DEF(flag/aggressive_changelog) +CONFIG_DEF(number/assistant_cap) + value = -1 + min_val = -1 -CONFIG_DEF(flag/autoconvert_notes) //if all connecting player's notes should attempt to be converted to the database - protection = CONFIG_ENTRY_LOCKED +CONFIG_DEF(flag/starlight) +CONFIG_DEF(flag/grey_assistants) -CONFIG_DEF(flag/allow_webclient) - -CONFIG_DEF(flag/webclient_only_byond_members) - -CONFIG_DEF(flag/announce_admin_logout) - -CONFIG_DEF(flag/announce_admin_login) - -CONFIG_DEF(flag/allow_map_voting) - -CONFIG_DEF(flag/generate_minimaps) - -CONFIG_DEF(number/client_warn_version) - value = null - min_val = 500 - max_val = DM_VERSION - 1 - -CONFIG_DEF(string/client_warn_message) - value = "Your version of byond may have issues or be blocked from accessing this server in the future." - -CONFIG_DEF(number/client_error_version) - value = null - min_val = 500 - max_val = DM_VERSION - 1 - -CONFIG_DEF(string/client_error_message) - value = "Your version of byond is too old, may have issues, and is blocked from accessing this server." - -CONFIG_DEF(number/minute_topic_limit) - value = null - min_val = 0 - -CONFIG_DEF(number/second_topic_limit) - value = null - min_val = 0 - -CONFIG_DEF(number/error_cooldown) // The "cooldown" time for each occurrence of a unique error) - value = 600 - min_val = 0 - -CONFIG_DEF(number/error_limit) // How many occurrences before the next will silence them - value = 50 - -CONFIG_DEF(number/error_silence_time) // How long a unique error will be silenced for - value = 6000 - -CONFIG_DEF(number/error_msg_delay) // How long to wait between messaging admins about occurrences of a unique error - value = 50 - -CONFIG_DEF(flag/irc_announce_new_game) - -CONFIG_DEF(flag/debug_admin_hrefs) - -CONFIG_DEF(number/mc_tick_rate/base_mc_tick_rate) - integer = FALSE - value = 1 - -CONFIG_DEF(number/mc_tick_rate/high_pop_mc_tick_rate) - integer = FALSE - value = 1.1 - -CONFIG_DEF(number/mc_tick_rate/high_pop_mc_mode_amount) - value = 65 - -CONFIG_DEF(number/mc_tick_rate/disable_high_pop_mc_mode_amount) +CONFIG_DEF(number/lavaland_budget) value = 60 + min_val = 0 -CONFIG_TWEAK(number/mc_tick_rate) - abstract_type = /datum/config_entry/number/mc_tick_rate +CONFIG_DEF(number/space_budget) + value = 16 + min_val = 0 -CONFIG_TWEAK(number/mc_tick_rate/ValidateAndSet(str_val)) +CONFIG_DEF(flag/allow_random_events) // Enables random events mid-round when set + +CONFIG_DEF(number/events_min_time_mul) // Multipliers for random events minimal starting time and minimal players amounts + value = 1 + min_val = 0 + integer = FALSE + +CONFIG_DEF(number/events_min_players_mul) + value = 1 + min_val = 0 + integer = FALSE + +CONFIG_DEF(number/mice_roundstart) + value = 10 + min_val = 0 + +CONFIG_DEF(number/bombcap) + value = 14 + min_val = 4 + +CONFIG_DEF(flag/allow_crew_objectives) +CONFIG_DEF(flag/allow_miscreants) +CONFIG_DEF(flag/allow_extended_miscreants) + +/datum/config_entry/number/bombcap/ValidateAndSet(str_val) . = ..() - if (.) - Master.UpdateTickRate() \ No newline at end of file + if(.) + GLOB.MAX_EX_DEVESTATION_RANGE = round(value / 4) + GLOB.MAX_EX_HEAVY_RANGE = round(value / 2) + GLOB.MAX_EX_LIGHT_RANGE = value + GLOB.MAX_EX_FLASH_RANGE = value + GLOB.MAX_EX_FLAME_RANGE = value + +CONFIG_DEF(number/emergency_shuttle_autocall_threshold) + min_val = 0 + max_val = 1 + integer = FALSE