Allows species to be blocked from ever being roundstart, can now choose your Halloween species

This commit is contained in:
KorPhaeron
2017-10-20 10:10:54 -05:00
committed by CitadelStationBot
parent 655478e014
commit e4f76a79a5
18 changed files with 62 additions and 49 deletions

View File

@@ -45,7 +45,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
var/allow_midround_antag = 1
var/preferred_map = null
var/pda_style = MONO
var/uses_glasses_colour = 0
var/screenshake = 100
@@ -1187,7 +1187,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if("species")
var/result = input(user, "Select a species", "Species Selection") as null|anything in CONFIG_GET(keyed_flag_list/roundstart_races)
var/result = input(user, "Select a species", "Species Selection") as null|anything in GLOB.roundstart_races
if(result)
var/newtype = GLOB.species_list[result]

View File

@@ -294,12 +294,11 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//Species
var/species_id
S["species"] >> species_id
var/list/roundstart_races = CONFIG_GET(keyed_flag_list/roundstart_races)
if(species_id && (species_id in roundstart_races) && CONFIG_GET(flag/join_with_mutant_race))
if(species_id && (species_id in GLOB.roundstart_races) && CONFIG_GET(flag/join_with_mutant_race))
var/newtype = GLOB.species_list[species_id]
pref_species = new newtype()
else if (roundstart_races.len)
var/rando_race = pick(roundstart_races)
else if (GLOB.roundstart_races.len)
var/rando_race = pick(GLOB.roundstart_races)
if (rando_race)
pref_species = new rando_race()

View File

@@ -11,11 +11,6 @@
for(var/mob/living/carbon/human/H in GLOB.mob_list)
var/obj/item/storage/backpack/b = locate() in H.contents
new /obj/item/storage/spooky(b)
if(ishuman(H) || islizard(H))
if(prob(50))
H.set_species(/datum/species/skeleton)
else
H.set_species(/datum/species/zombie)
for(var/mob/living/simple_animal/pet/dog/corgi/Ian/Ian in GLOB.mob_list)
Ian.place_on_head(new /obj/item/bedsheet(Ian))

View File

@@ -14,7 +14,7 @@
facial_hair_color = hair_color
eye_color = random_eye_color()
if(!pref_species)
var/rando_race = pick(CONFIG_GET(keyed_flag_list/roundstart_races))
var/rando_race = pick(GLOB.roundstart_races)
pref_species = new rando_race()
features = random_features()
age = rand(AGE_MIN,AGE_MAX)

View File

@@ -19,7 +19,7 @@
/mob/living/brain/proc/create_dna()
stored_dna = new /datum/dna/stored(src)
if(!stored_dna.species)
var/rando_race = pick(CONFIG_GET(keyed_flag_list/roundstart_races))
var/rando_race = pick(GLOB.roundstart_races)
stored_dna.species = new rando_race()
/mob/living/brain/Destroy()

View File

@@ -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
@@ -92,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)
@@ -1152,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, "<span class='danger'>You mutate!</span>")

View File

@@ -24,6 +24,10 @@
else if (light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD) //heal in the dark
H.heal_overall_damage(1,1)
/datum/species/shadow/check_roundstart_eligible()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
return TRUE
return ..()
/datum/species/shadow/nightmare
name = "Nightmare"
@@ -60,7 +64,8 @@
return -1
return 0
/datum/species/shadow/nightmare/check_roundstart_eligible()
return FALSE
//Organs

View File

@@ -10,4 +10,13 @@
mutanttongue = /obj/item/organ/tongue/bone
damage_overlay_type = ""//let's not show bloody wounds or burns over bones.
disliked_food = NONE
<<<<<<< HEAD
liked_food = NONE
=======
liked_food = GROSS | MEAT | RAW
/datum/species/skeleton/check_roundstart_eligible()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
return TRUE
return ..()
>>>>>>> dcddc79... Allows species to be blocked from ever being roundstart, can now choose your Halloween species (#31877)

View File

@@ -118,4 +118,4 @@
else
return ..()
else
return ..()
return ..()

View File

@@ -14,6 +14,11 @@
disliked_food = NONE
liked_food = NONE
/datum/species/zombie/check_roundstart_eligible()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
return TRUE
return ..()
/datum/species/zombie/infectious
name = "Infectious Zombie"
id = "memezombies"
@@ -24,6 +29,10 @@
mutanteyes = /obj/item/organ/eyes/night_vision/zombie
var/regen_cooldown = 0
/datum/species/zombie/infectious/check_roundstart_eligible()
return FALSE
/datum/species/zombie/infectious/spec_stun(mob/living/carbon/human/H,amount)
. = min(2, amount)