Change various global species lists to GLOB versions, adds 2 more event subspecies.

This commit is contained in:
Atermonera
2019-12-15 21:51:05 -08:00
committed by VirgoBot
parent dbef0774d6
commit 3b7a737c08
49 changed files with 148 additions and 105 deletions

View File

@@ -325,6 +325,8 @@
#define SPECIES_SKELETON "Skeleton"
#define SPECIES_GOLEM "Golem"
#define SPECIES_EVENT1 "X Occursus"
#define SPECIES_EVENT2 "X Anomalous"
#define SPECIES_EVENT3 "X Unowas"
// Replicant types. Currently only used for alien pods and events.
#define SPECIES_REPLICANT "Replicant"

View File

@@ -0,0 +1,6 @@
//Languages/species/whitelist.
GLOBAL_LIST_INIT(all_species, list())
GLOBAL_LIST_INIT(all_languages, list())
GLOBAL_LIST_INIT(language_keys, list()) // Table of say codes for all languages
GLOBAL_LIST_INIT(whitelisted_species, list(SPECIES_HUMAN)) // Species that require a whitelist check.
GLOBAL_LIST_INIT(playable_species, list(SPECIES_HUMAN)) // A list of ALL playable species, whitelisted, latejoin or otherwise.

View File

@@ -24,6 +24,7 @@ var/global/list/turfs = list() //list of all turfs
#define all_genders_define_list list(MALE,FEMALE,PLURAL,NEUTER,HERM) //VOREStaton Edit
#define all_genders_text_list list("Male","Female","Plural","Neuter","Herm") //VOREStation Edit
<<<<<<< HEAD
//Languages/species/whitelist.
var/global/list/all_species[0]
var/global/list/all_languages[0]
@@ -31,6 +32,8 @@ var/global/list/language_keys[0] // Table of say codes for all languages
var/global/list/whitelisted_species = list(SPECIES_HUMAN) // Species that require a whitelist check.
var/global/list/playable_species = list(SPECIES_CUSTOM, SPECIES_HUMAN) // A list of ALL playable species, whitelisted, latejoin or otherwise. //VOREStation Edit - Making sure custom species is obvious.
=======
>>>>>>> f14184f... Merge pull request #6558 from Mechoid/GlobSpecies
var/list/mannequins_
// Posters
@@ -164,12 +167,12 @@ var/global/list/string_slot_flags = list(
paths = typesof(/datum/language)-/datum/language
for(var/T in paths)
var/datum/language/L = new T
all_languages[L.name] = L
GLOB.all_languages[L.name] = L
for (var/language_name in all_languages)
var/datum/language/L = all_languages[language_name]
for (var/language_name in GLOB.all_languages)
var/datum/language/L = GLOB.all_languages[language_name]
if(!(L.flags & NONGLOBAL))
language_keys[lowertext(L.key)] = L
GLOB.language_keys[lowertext(L.key)] = L
var/rkey = 0
paths = typesof(/datum/species)
@@ -183,12 +186,12 @@ var/global/list/string_slot_flags = list(
S = new T
S.race_key = rkey //Used in mob icon caching.
all_species[S.name] = S
GLOB.all_species[S.name] = S
if(!(S.spawn_flags & SPECIES_IS_RESTRICTED))
playable_species += S.name
GLOB.playable_species += S.name
if(S.spawn_flags & SPECIES_IS_WHITELISTED)
whitelisted_species += S.name
GLOB.whitelisted_species += S.name
//Posters
paths = typesof(/datum/poster) - /datum/poster

View File

@@ -75,7 +75,7 @@ proc/random_facial_hair_style(gender, species = SPECIES_HUMAN)
proc/sanitize_name(name, species = SPECIES_HUMAN, robot = 0)
var/datum/species/current_species
if(species)
current_species = all_species[species]
current_species = GLOB.all_species[species]
return current_species ? current_species.sanitize_name(name, robot) : sanitizeName(name, MAX_NAME_LEN, robot)
@@ -83,7 +83,7 @@ proc/random_name(gender, species = SPECIES_HUMAN)
var/datum/species/current_species
if(species)
current_species = all_species[species]
current_species = GLOB.all_species[species]
if(!current_species || current_species.name_language == null)
if(gender==FEMALE)

View File

@@ -68,7 +68,7 @@
return 1
else if(isnewplayer(player.current))
if(player.current.client && player.current.client.prefs)
var/datum/species/S = all_species[player.current.client.prefs.species]
var/datum/species/S = GLOB.all_species[player.current.client.prefs.species]
if(S && (S.flags & NO_SCAN))
return 0
if(player.current.client.prefs.organ_data["torso"] == "cyborg") // Full synthetic.

View File

@@ -23,7 +23,7 @@
var/list/nearby_things = range(round(calculate_spell_power(4)),owner)
var/temp_change = calculate_spell_power(25)
var/datum/species/baseline = all_species["Human"]
var/datum/species/baseline = GLOB.all_species["Human"]
var/temp_cap = baseline.heat_level_3 * 1.5
var/fire_power = calculate_spell_power(2)

View File

@@ -23,7 +23,7 @@
var/list/nearby_mobs = range(round(calculate_spell_power(4)),owner)
var/temp_change = calculate_spell_power(40)
var/datum/species/baseline = all_species["Human"]
var/datum/species/baseline = GLOB.all_species["Human"]
var/temp_cap = baseline.cold_level_2 - 5
if(check_for_scepter())

View File

@@ -380,7 +380,7 @@ var/global/datum/controller/occupations/job_master
else
permitted = 1
if(G.whitelisted && !is_alien_whitelisted(H, all_species[G.whitelisted]))
if(G.whitelisted && !is_alien_whitelisted(H, GLOB.all_species[G.whitelisted]))
//if(G.whitelisted && (G.whitelisted != H.species.name || !is_alien_whitelisted(H, G.whitelisted)))
permitted = 0

View File

@@ -236,9 +236,9 @@
malfunctioned = TRUE
var/possible_species = list(SPECIES_HUMAN, SPECIES_VOX, SPECIES_SKRELL, SPECIES_ZADDAT, SPECIES_UNATHI, SPECIES_GOLEM, SPECIES_SHADOW)
var/new_species = pick(possible_species)
if(!all_species[new_species])
if(!GLOB.all_species[new_species])
new_species = SPECIES_HUMAN
O.species = all_species[new_species]
O.species = GLOB.all_species[new_species]
if(istype(O, /obj/item/organ/external) && !malfunctioned)
var/obj/item/organ/external/E = O

View File

@@ -46,10 +46,10 @@
/obj/item/device/radio/headset/handle_message_mode(mob/living/M as mob, message, channel)
if (channel == "special")
if (translate_binary)
var/datum/language/binary = all_languages["Robot Talk"]
var/datum/language/binary = GLOB.all_languages["Robot Talk"]
binary.broadcast(M, message)
if (translate_hive)
var/datum/language/hivemind = all_languages["Hivemind"]
var/datum/language/hivemind = GLOB.all_languages["Hivemind"]
hivemind.broadcast(M, message)
return null

View File

@@ -134,7 +134,7 @@
spawn(1)
var/newname = sanitizeSafe(input(vox,"Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN)
if(!newname || newname == "")
var/datum/language/L = all_languages[vox.species.default_language]
var/datum/language/L = GLOB.all_languages[vox.species.default_language]
newname = L.get_random_name()
vox.real_name = newname
vox.name = vox.real_name

View File

@@ -192,8 +192,8 @@ proc/admin_notice(var/message, var/rights)
// language toggles
body += "<br><br><b>Languages:</b><br>"
var/f = 1
for(var/k in all_languages)
var/datum/language/L = all_languages[k]
for(var/k in GLOB.all_languages)
var/datum/language/L = GLOB.all_languages[k]
if(!(L.flags & INNATE))
if(!f) body += " | "
else f = 0

View File

@@ -6,8 +6,8 @@
if(!.)
return
for(var/species in all_species)
var/datum/species/S = all_species[species]
for(var/species in GLOB.all_species)
var/datum/species/S = GLOB.all_species[species]
S.blood_color = "rainbow"
for(var/obj/effect/decal/cleanable/blood/B in world)
B.basecolor = "rainbow"

View File

@@ -1882,7 +1882,7 @@
usr << "[M] is illegal type, must be /mob!"
return
var/lang2toggle = href_list["lang"]
var/datum/language/L = all_languages[lang2toggle]
var/datum/language/L = GLOB.all_languages[lang2toggle]
if(L in M.languages)
if(!M.remove_language(lang2toggle))

View File

@@ -289,7 +289,7 @@
usr << "This can only be done to instances of type /mob/living/carbon/human"
return
var/new_species = input("Please choose a new species.","Species",null) as null|anything in all_species
var/new_species = input("Please choose a new species.","Species",null) as null|anything in GLOB.all_species
if(!H)
usr << "Mob doesn't exist anymore"
@@ -308,7 +308,7 @@
usr << "This can only be done to instances of type /mob"
return
var/new_language = input("Please choose a language to add.","Language",null) as null|anything in all_languages
var/new_language = input("Please choose a language to add.","Language",null) as null|anything in GLOB.all_languages
if(!new_language)
return

View File

@@ -423,7 +423,7 @@
var/protection = H.get_cold_protection(50)
if(protection < 1)
var/temp_change = 80 // Each hit can reduce temperature by up to 80 kelvin.
var/datum/species/baseline = all_species["Human"]
var/datum/species/baseline = GLOB.all_species["Human"]
var/temp_cap = baseline.cold_level_3 - 5 // Can't go lower than this.
var/cold_factor = abs(protection - 1)

View File

@@ -150,9 +150,9 @@ datum/preferences/proc/set_biological_gender(var/gender)
/datum/category_item/player_setup_item/general/basic/proc/get_genders()
var/datum/species/S
if(pref.species)
S = all_species[pref.species]
S = GLOB.all_species[pref.species]
else
S = all_species[SPECIES_HUMAN]
S = GLOB.all_species[SPECIES_HUMAN]
var/list/possible_genders = S.genders
if(!pref.organ_data || pref.organ_data[BP_TORSO] != "cyborg")
return possible_genders

View File

@@ -13,7 +13,7 @@
/datum/category_item/player_setup_item/general/language/sanitize_character()
if(!islist(pref.alternate_languages)) pref.alternate_languages = list()
if(pref.species)
var/datum/species/S = all_species[pref.species]
var/datum/species/S = GLOB.all_species[pref.species]
if(S && pref.alternate_languages.len > S.num_alternate_languages)
pref.alternate_languages.len = S.num_alternate_languages // Truncate to allowed length
if(isnull(pref.language_prefixes) || !pref.language_prefixes.len)
@@ -21,7 +21,7 @@
/datum/category_item/player_setup_item/general/language/content()
. += "<b>Languages</b><br>"
var/datum/species/S = all_species[pref.species]
var/datum/species/S = GLOB.all_species[pref.species]
if(S.language)
. += "- [S.language]<br>"
if(S.default_language && S.default_language != S.language)
@@ -46,13 +46,13 @@
pref.alternate_languages.Cut(index, index+1)
return TOPIC_REFRESH
else if(href_list["add_language"])
var/datum/species/S = all_species[pref.species]
var/datum/species/S = GLOB.all_species[pref.species]
if(pref.alternate_languages.len >= S.num_alternate_languages)
alert(user, "You have already selected the maximum number of alternate languages for this species!")
else
var/list/available_languages = S.secondary_langs.Copy()
for(var/L in all_languages)
var/datum/language/lang = all_languages[L]
for(var/L in GLOB.all_languages)
var/datum/language/lang = GLOB.all_languages[L]
if(!(lang.flags & RESTRICTED) && (is_lang_whitelisted(user, lang)))
available_languages |= L

View File

@@ -72,7 +72,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
S["body_descriptors"] << pref.body_descriptors
/datum/category_item/player_setup_item/general/body/sanitize_character(var/savefile/S)
if(!pref.species || !(pref.species in playable_species))
if(!pref.species || !(pref.species in GLOB.playable_species))
pref.species = SPECIES_HUMAN
pref.r_hair = sanitize_integer(pref.r_hair, 0, 255, initial(pref.r_hair))
pref.g_hair = sanitize_integer(pref.g_hair, 0, 255, initial(pref.g_hair))
@@ -174,7 +174,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
last_descriptors = pref.body_descriptors.Copy()
pref.body_descriptors = list()
var/datum/species/mob_species = all_species[pref.species]
var/datum/species/mob_species = GLOB.all_species[pref.species]
if(LAZYLEN(mob_species.descriptors))
for(var/entry in mob_species.descriptors)
var/datum/mob_descriptor/descriptor = mob_species.descriptors[entry]
@@ -192,7 +192,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
pref.update_preview_icon()
user << browse_rsc(pref.preview_icon, "previewicon.png")
var/datum/species/mob_species = all_species[pref.species]
var/datum/species/mob_species = GLOB.all_species[pref.species]
. += "<table><tr style='vertical-align:top'><td><b>Body</b> "
. += "(<a href='?src=\ref[src];random=1'>&reg;</A>)"
. += "<br>"
@@ -355,7 +355,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
return mob_species && (mob_species.appearance_flags & flag)
/datum/category_item/player_setup_item/general/body/OnTopic(var/href,var/list/href_list, var/mob/user)
var/datum/species/mob_species = all_species[pref.species]
var/datum/species/mob_species = GLOB.all_species[pref.species]
if(href_list["random"])
pref.randomize_appearance_and_body_for()
@@ -379,7 +379,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else if(href_list["show_species"])
// Actual whitelist checks are handled elsewhere, this is just for accessing the preview window.
var/choice = input("Which species would you like to look at?") as null|anything in playable_species
var/choice = input("Which species would you like to look at?") as null|anything in GLOB.playable_species
if(!choice) return
pref.species_preview = choice
SetSpecies(preference_mob())
@@ -388,13 +388,13 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
else if(href_list["set_species"])
user << browse(null, "window=species")
if(!pref.species_preview || !(pref.species_preview in all_species))
if(!pref.species_preview || !(pref.species_preview in GLOB.all_species))
return TOPIC_NOACTION
var/datum/species/setting_species
if(all_species[href_list["set_species"]])
setting_species = all_species[href_list["set_species"]]
if(GLOB.all_species[href_list["set_species"]])
setting_species = GLOB.all_species[href_list["set_species"]]
else
return TOPIC_NOACTION
@@ -595,7 +595,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
var/list/limb_selection_list = list("Left Leg","Right Leg","Left Arm","Right Arm","Left Foot","Right Foot","Left Hand","Right Hand","Full Body")
// Full prosthetic bodies without a brain are borderline unkillable so make sure they have a brain to remove/destroy.
var/datum/species/current_species = all_species[pref.species]
var/datum/species/current_species = GLOB.all_species[pref.species]
if(!current_species.has_organ["brain"])
limb_selection_list -= "Full Body"
else if(pref.organ_data[BP_TORSO] == "cyborg")
@@ -827,9 +827,9 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
pref.real_name = random_name(pref.identifying_gender, pref.species)
/datum/category_item/player_setup_item/general/body/proc/SetSpecies(mob/user)
if(!pref.species_preview || !(pref.species_preview in all_species))
if(!pref.species_preview || !(pref.species_preview in GLOB.all_species))
pref.species_preview = SPECIES_HUMAN
var/datum/species/current_species = all_species[pref.species_preview]
var/datum/species/current_species = GLOB.all_species[pref.species_preview]
var/dat = "<body>"
dat += "<center><h2>[current_species.name] \[<a href='?src=\ref[src];show_species=1'>change</a>\]</h2></center><hr/>"
dat += "<table padding='8px'>"

View File

@@ -66,7 +66,7 @@ var/list/gear_datums = list()
for(var/gear_name in gear_datums)
var/datum/gear/G = gear_datums[gear_name]
if(G.whitelisted && !is_alien_whitelisted(preference_mob, all_species[G.whitelisted]))
if(G.whitelisted && !is_alien_whitelisted(preference_mob, GLOB.all_species[G.whitelisted]))
continue
if(max_cost && G.cost > max_cost)
continue

View File

@@ -279,7 +279,7 @@
return 0 //Something went wrong!
/datum/category_item/player_setup_item/proc/get_min_age()
var/datum/species/S = all_species[pref.species ? pref.species : "Human"]
var/datum/species/S = GLOB.all_species[pref.species ? pref.species : "Human"]
if(!is_FBP())
return S.min_age // If they're not a robot, we can just use the species var.
var/FBP_type = get_FBP_type()
@@ -293,7 +293,7 @@
return S.min_age // welp
/datum/category_item/player_setup_item/proc/get_max_age()
var/datum/species/S = all_species[pref.species ? pref.species : "Human"]
var/datum/species/S = GLOB.all_species[pref.species ? pref.species : "Human"]
if(!is_FBP())
return S.max_age // If they're not a robot, we can just use the species var.
var/FBP_type = get_FBP_type()

View File

@@ -573,7 +573,7 @@
/obj/item/integrated_circuit/input/microphone/sign/Initialize()
..()
for(var/lang in readable_langs)
var/datum/language/newlang = all_languages[lang]
var/datum/language/newlang = GLOB.all_languages[lang]
my_langs |= newlang
/obj/item/integrated_circuit/input/microphone/sign/hear_talk(mob/living/M, msg, var/verb="says", datum/language/speaking=null)

View File

@@ -179,7 +179,7 @@
// Language handling.
/mob/proc/add_language(var/language)
var/datum/language/new_language = all_languages[language]
var/datum/language/new_language = GLOB.all_languages[language]
if(!istype(new_language) || (new_language in languages))
return 0
@@ -188,12 +188,12 @@
return 1
/mob/proc/remove_language(var/rem_language)
var/datum/language/L = all_languages[rem_language]
var/datum/language/L = GLOB.all_languages[rem_language]
. = (L in languages)
languages.Remove(L)
/mob/living/remove_language(rem_language)
var/datum/language/L = all_languages[rem_language]
var/datum/language/L = GLOB.all_languages[rem_language]
if(default_language == L)
default_language = null
return ..()
@@ -205,10 +205,10 @@
log_debug("[src] attempted to speak a null language.")
return 0
if(speaking == all_languages["Noise"])
if(speaking == GLOB.all_languages["Noise"])
return 1
if (only_species_language && speaking != all_languages[species_language])
if (only_species_language && speaking != GLOB.all_languages[species_language])
return 0
if(speaking.can_speak_special(src))
@@ -268,7 +268,7 @@
if(href_list["default_lang"])
if(href_list["default_lang"] == "reset")
if (species_language)
set_default_language(all_languages[species_language])
set_default_language(GLOB.all_languages[species_language])
else
set_default_language(null)
else

View File

@@ -45,7 +45,7 @@
..()
update_icons()
default_language = all_languages[LANGUAGE_GALCOM]
default_language = GLOB.all_languages[LANGUAGE_GALCOM]
botcard = new /obj/item/weapon/card/id(src)
botcard.access = botcard_access.Copy()

View File

@@ -22,7 +22,7 @@
/mob/living/carbon/alien/diona/Initialize()
. = ..()
species = all_species[SPECIES_DIONA]
species = GLOB.all_species[SPECIES_DIONA]
add_language(LANGUAGE_ROOTGLOBAL)
add_language(LANGUAGE_GALCOM)
verbs += /mob/living/carbon/alien/diona/proc/merge

View File

@@ -1,6 +1,6 @@
/mob/living/carbon/alien/diona/confirm_evolution()
if(!is_alien_whitelisted(src, all_species[SPECIES_DIONA]))
if(!is_alien_whitelisted(src, GLOB.all_species[SPECIES_DIONA]))
src << alert("You are currently not whitelisted to play as a full diona.")
return null

View File

@@ -6,7 +6,7 @@
touching = new/datum/reagents/metabolism/touch(500, src)
reagents = bloodstr
if (!default_language && species_language)
default_language = all_languages[species_language]
default_language = GLOB.all_languages[species_language]
/mob/living/carbon/Life()
..()
@@ -378,12 +378,12 @@
if(can_speak(default_language))
return default_language
else
return all_languages[LANGUAGE_GIBBERISH]
return GLOB.all_languages[LANGUAGE_GIBBERISH]
if(!species)
return null
return species.default_language ? all_languages[species.default_language] : null
return species.default_language ? GLOB.all_languages[species.default_language] : null
/mob/living/carbon/proc/should_have_organ(var/organ_check)
return 0

View File

@@ -10,7 +10,7 @@
if(species == new_species)
return
if(!(new_species in all_species))
if(!(new_species in GLOB.all_species))
return
set_species(new_species)
@@ -144,8 +144,8 @@
/mob/living/carbon/human/proc/generate_valid_species(var/check_whitelist = 1, var/list/whitelist = list(), var/list/blacklist = list())
var/list/valid_species = new()
for(var/current_species_name in all_species)
var/datum/species/current_species = all_species[current_species_name]
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, 0, src)) //If we're using the whitelist, make sure to check it!
if(!(current_species.spawn_flags & SPECIES_CAN_JOIN))

View File

@@ -1120,7 +1120,7 @@
dna.species = new_species
// No more invisible screaming wheelchairs because of set_species() typos.
if(!all_species[new_species])
if(!GLOB.all_species[new_species])
new_species = SPECIES_HUMAN
if(species)
@@ -1137,7 +1137,7 @@
species.remove_inherent_verbs(src)
holder_type = null
species = all_species[new_species]
species = GLOB.all_species[new_species]
if(species.language)
add_language(species.language)

View File

@@ -220,3 +220,11 @@ Variables you may want to make use of are:
/datum/species/event1/can_fall(var/mob/living/carbon/human/H)
return hover
/datum/species/event1/sub1
name = SPECIES_EVENT2
name_plural = SPECIES_EVENT2
/datum/species/event1/sub2
name = SPECIES_EVENT3
name_plural = SPECIES_EVENT3

View File

@@ -89,7 +89,7 @@
)
/datum/species/vox/get_random_name(var/gender)
var/datum/language/species_language = all_languages[default_language]
var/datum/language/species_language = GLOB.all_languages[default_language]
return species_language.get_random_name(gender)
/datum/species/vox/equip_survival_gear(var/mob/living/carbon/human/H, var/extendedtank = 0,var/comprehensive = 0)

View File

@@ -97,9 +97,9 @@
else
return capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
var/datum/language/species_language = all_languages[name_language]
var/datum/language/species_language = GLOB.all_languages[name_language]
if(!species_language)
species_language = all_languages[default_language]
species_language = GLOB.all_languages[default_language]
if(!species_language)
return "unknown"
return species_language.get_random_name(gender)

View File

@@ -20,7 +20,7 @@ var/list/wrapped_species_by_ref = list()
/datum/species/shapeshifter/get_icobase(var/mob/living/carbon/human/H, var/get_deform)
if(!H) return ..(null, get_deform)
var/datum/species/S = all_species[wrapped_species_by_ref["\ref[H]"]]
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
return S.get_icobase(H, get_deform)
/datum/species/shapeshifter/get_race_key(var/mob/living/carbon/human/H)
@@ -28,37 +28,37 @@ var/list/wrapped_species_by_ref = list()
/datum/species/shapeshifter/get_bodytype(var/mob/living/carbon/human/H)
if(!H) return ..()
var/datum/species/S = all_species[wrapped_species_by_ref["\ref[H]"]]
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
return S.get_bodytype(H)
/datum/species/shapeshifter/get_blood_mask(var/mob/living/carbon/human/H)
if(!H) return ..()
var/datum/species/S = all_species[wrapped_species_by_ref["\ref[H]"]]
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
return S.get_blood_mask(H)
/datum/species/shapeshifter/get_damage_mask(var/mob/living/carbon/human/H)
if(!H) return ..()
var/datum/species/S = all_species[wrapped_species_by_ref["\ref[H]"]]
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
return S.get_damage_mask(H)
/datum/species/shapeshifter/get_damage_overlays(var/mob/living/carbon/human/H)
if(!H) return ..()
var/datum/species/S = all_species[wrapped_species_by_ref["\ref[H]"]]
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
return S.get_damage_overlays(H)
/datum/species/shapeshifter/get_tail(var/mob/living/carbon/human/H)
if(!H) return ..()
var/datum/species/S = all_species[wrapped_species_by_ref["\ref[H]"]]
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
return S.get_tail(H)
/datum/species/shapeshifter/get_tail_animation(var/mob/living/carbon/human/H)
if(!H) return ..()
var/datum/species/S = all_species[wrapped_species_by_ref["\ref[H]"]]
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
return S.get_tail_animation(H)
/datum/species/shapeshifter/get_tail_hair(var/mob/living/carbon/human/H)
if(!H) return ..()
var/datum/species/S = all_species[wrapped_species_by_ref["\ref[H]"]]
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
return S.get_tail_hair(H)
/datum/species/shapeshifter/handle_post_spawn(var/mob/living/carbon/human/H)
@@ -151,7 +151,7 @@ var/list/wrapped_species_by_ref = list()
var/new_species = null
new_species = input("Please select a species to emulate.", "Shapeshifter Body") as null|anything in species.get_valid_shapeshifter_forms(src)
if(!new_species || !all_species[new_species] || wrapped_species_by_ref["\ref[src]"] == new_species)
if(!new_species || !GLOB.all_species[new_species] || wrapped_species_by_ref["\ref[src]"] == new_species)
return
shapeshifter_change_shape(new_species)
@@ -268,14 +268,14 @@ var/list/wrapped_species_by_ref = list()
limb_exists[O.organ_tag] = 1
wounds_by_limb[O.organ_tag] = O.wounds
species = all_species[new_species]
species = GLOB.all_species[new_species]
species.create_organs(src)
// species.handle_post_spawn(src)
for(var/limb in organs_by_name)
var/obj/item/organ/external/O = organs_by_name[limb]
if(limb_exists[O.organ_tag])
O.species = all_species[new_species]
O.species = GLOB.all_species[new_species]
O.wounds = wounds_by_limb[O.organ_tag]
// sync the organ's damage with its wounds
O.update_damages()

View File

@@ -5,11 +5,11 @@
set name = "Set Default Language"
set category = "IC"
if (only_species_language && language != all_languages[src.species_language])
if (only_species_language && language != GLOB.all_languages[src.species_language])
to_chat(src, "<span class='notice'>You can only speak your species language, [src.species_language].</span>")
return 0
if(language == all_languages[src.species_language])
if(language == GLOB.all_languages[src.species_language])
to_chat(src, "<span class='notice'>You will now speak your standard default language, [language], if you do not specify a language when speaking.</span>")
else if (language)

View File

@@ -183,7 +183,7 @@ proc/get_radio_key_from_channel(var/channel)
speaking = get_default_language()
if(!can_speak(speaking))
speaking = all_languages[LANGUAGE_GIBBERISH]
speaking = GLOB.all_languages[LANGUAGE_GIBBERISH]
var/babble_key = ",r"
message = babble_key + message

View File

@@ -14,7 +14,7 @@
return emote(copytext(message,2))
if(copytext(message,1,2) == ";")
var/datum/language/L = all_languages["Drone Talk"]
var/datum/language/L = GLOB.all_languages["Drone Talk"]
if(istype(L))
return L.broadcast(src,trim(copytext(message,2)))

View File

@@ -31,7 +31,7 @@
silicon_mob_list |= src
..()
add_language(LANGUAGE_GALCOM)
set_default_language(all_languages[LANGUAGE_GALCOM])
set_default_language(GLOB.all_languages[LANGUAGE_GALCOM])
init_id()
init_subsystems()
@@ -196,7 +196,7 @@
return universal_speak || (speaking in src.speech_synthesizer_langs) || (speaking.name == "Noise") //need speech synthesizer support to vocalize a language
/mob/living/silicon/add_language(var/language, var/can_speak=1)
var/var/datum/language/added_language = all_languages[language]
var/var/datum/language/added_language = GLOB.all_languages[language]
if(!added_language)
return
@@ -206,7 +206,7 @@
return 1
/mob/living/silicon/remove_language(var/rem_language)
var/var/datum/language/removed_language = all_languages[rem_language]
var/var/datum/language/removed_language = GLOB.all_languages[rem_language]
if(!removed_language)
return

View File

@@ -160,7 +160,7 @@
health = maxHealth
for(var/L in has_langs)
languages |= all_languages[L]
languages |= GLOB.all_languages[L]
if(languages.len)
default_language = languages[1]

View File

@@ -9,7 +9,7 @@
/mob/living/voice/New(loc)
add_language(LANGUAGE_GALCOM)
set_default_language(all_languages[LANGUAGE_GALCOM])
set_default_language(GLOB.all_languages[LANGUAGE_GALCOM])
if(istype(loc, /obj/item/device/communicator))
comm = loc

View File

@@ -185,12 +185,21 @@
else if(ticker && ticker.mode && ticker.mode.explosion_in_progress)
usr << "<span class='danger'>The station is currently exploding. Joining would go poorly.</span>"
return
<<<<<<< HEAD
/*
if(!is_alien_whitelisted(src, all_species[client.prefs.species]))
src << alert("You are currently not whitelisted to play [client.prefs.species].")
return 0
*/
var/datum/species/S = all_species[client.prefs.species]
=======
if(!is_alien_whitelisted(src, GLOB.all_species[client.prefs.species]))
src << alert("You are currently not whitelisted to play [client.prefs.species].")
return 0
var/datum/species/S = GLOB.all_species[client.prefs.species]
>>>>>>> f14184f... Merge pull request #6558 from Mechoid/GlobSpecies
if(!(S.spawn_flags & SPECIES_CAN_JOIN))
src << alert("Your current species, [client.prefs.species], is not available for play on the station.")
return 0
@@ -466,7 +475,7 @@
var/use_species_name
var/datum/species/chosen_species
if(client.prefs.species)
chosen_species = all_species[client.prefs.species]
chosen_species = GLOB.all_species[client.prefs.species]
use_species_name = chosen_species.get_station_variant() //Only used by pariahs atm.
if(chosen_species && use_species_name)
@@ -513,7 +522,7 @@
new_character.disabilities |= NEARSIGHTED
for(var/lang in client.prefs.alternate_languages)
var/datum/language/chosen_language = all_languages[lang]
var/datum/language/chosen_language = GLOB.all_languages[lang]
if(chosen_language)
if(is_lang_whitelisted(src,chosen_language) || (new_character.species && (chosen_language.name in new_character.species.secondary_langs)))
new_character.add_language(lang)
@@ -553,7 +562,7 @@
/mob/new_player/get_species()
var/datum/species/chosen_species
if(client.prefs.species)
chosen_species = all_species[client.prefs.species]
chosen_species = GLOB.all_species[client.prefs.species]
if(!chosen_species)
return SPECIES_HUMAN

View File

@@ -1,7 +1,7 @@
/datum/preferences
//The mob should have a gender you want before running this proc. Will run fine without H
/datum/preferences/proc/randomize_appearance_and_body_for(var/mob/living/carbon/human/H)
var/datum/species/current_species = all_species[species ? species : "Human"]
var/datum/species/current_species = GLOB.all_species[species ? species : "Human"]
set_biological_gender(pick(current_species.genders))
h_style = random_hair_style(biological_gender, species)

View File

@@ -145,13 +145,13 @@
var/prefix = copytext(message,1,2)
// This is for audible emotes
if(length(message) >= 1 && prefix == "!")
return all_languages["Noise"]
return GLOB.all_languages["Noise"]
if(length(message) >= 2 && is_language_prefix(prefix))
var/language_prefix = lowertext(copytext(message, 2 ,3))
var/datum/language/L = language_keys[language_prefix]
var/datum/language/L = GLOB.language_keys[language_prefix]
if (can_speak(L))
return L
else
return all_languages[LANGUAGE_GIBBERISH]
return GLOB.all_languages[LANGUAGE_GIBBERISH]
return null

View File

@@ -18,7 +18,7 @@
/obj/item/organ/internal/voicebox/proc/amend_assist_langs() // Adds the list of language datums assisted by the voicebox to the list used in speaking
for(var/L in will_assist_languages)
assists_languages |= all_languages[L]
assists_languages |= GLOB.all_languages[L]
/obj/item/organ/internal/voicebox/proc/add_assistable_langs(var/language) // Adds a new language (by string/define) to the list of things the voicebox can assist
will_assist_languages |= language

View File

@@ -65,10 +65,14 @@ var/list/organ_cache = list()
if(istype(holder))
src.owner = holder
src.w_class = max(src.w_class + mob_size_difference(holder.mob_size, MOB_MEDIUM), 1) //smaller mobs have smaller organs.
species = all_species[SPECIES_HUMAN]
species = GLOB.all_species[SPECIES_HUMAN]
if(holder.dna)
dna = holder.dna.Clone()
<<<<<<< HEAD
species = holder.species //VOREStation Edit - For custom species
=======
species = GLOB.all_species[dna.species]
>>>>>>> f14184f... Merge pull request #6558 from Mechoid/GlobSpecies
else
log_debug("[src] at [loc] spawned without a proper DNA.")
var/mob/living/carbon/human/H = holder
@@ -87,7 +91,7 @@ var/list/organ_cache = list()
if(internal)
holder.internal_organs |= src
else
species = all_species["Human"]
species = GLOB.all_species["Human"]
handle_organ_mod_special()

View File

@@ -32,7 +32,7 @@
var/mob/living/new_mob
var/options = list("robot", "slime")
for(var/t in all_species)
for(var/t in GLOB.all_species)
options += t
if(ishuman(M))
var/mob/living/carbon/human/H = M

View File

@@ -15,6 +15,7 @@
var/newspecies = "Human"
if(prosfab.manufacturer)
var/datum/robolimb/manf = all_robolimbs[prosfab.manufacturer]
<<<<<<< HEAD
newspecies = manf.suggested_species
O.species = all_species[newspecies]
if(istype(O,/obj/item/organ/external))
@@ -25,6 +26,11 @@
var/b_skin = hex2num(copytext(EO.species.base_color,6,8))
EO.s_col = list(r_skin, g_skin, b_skin)
//VOREStation Edit End
=======
O.species = GLOB.all_species["[manf.suggested_species]"]
else
O.species = GLOB.all_species["Human"]
>>>>>>> f14184f... Merge pull request #6558 from Mechoid/GlobSpecies
O.robotize(prosfab.manufacturer)
O.dna = new/datum/dna() //Uuughhhh... why do I have to do this?
O.dna.ResetUI()
@@ -54,7 +60,11 @@
EO.remove_rejuv()
for(var/obj/item/organ/external/O in H.organs)
<<<<<<< HEAD
O.species = all_species[newspecies] //VOREStation Edit with species suggestion above
=======
O.species = GLOB.all_species[newspecies]
>>>>>>> f14184f... Merge pull request #6558 from Mechoid/GlobSpecies
O.robotize(prosfab.manufacturer)
O.dna = new/datum/dna()
O.dna.ResetUI()

View File

@@ -86,8 +86,8 @@
<b>Infectable Species:</b><br />
"}
var/f = 1
for(var/k in all_species)
var/datum/species/S = all_species[k]
for(var/k in GLOB.all_species)
var/datum/species/S = GLOB.all_species[k]
if(S.get_virus_immune())
continue
if(!f) H += " | "

View File

@@ -42,14 +42,14 @@
if(severity >= 2 && prob(33))
resistance += 10
if(all_species.len)
if(GLOB.all_species.len)
affected_species = get_infectable_species()
/proc/get_infectable_species()
var/list/meat = list()
var/list/res = list()
for (var/specie in all_species)
var/datum/species/S = all_species[specie]
for (var/specie in GLOB.all_species)
var/datum/species/S = GLOB.all_species[specie]
if(!S.get_virus_immune())
meat += S
if(meat.len)
@@ -158,7 +158,7 @@
if (prob(5) && prob(100-resistance)) // The more resistant the disease,the lower the chance of randomly developing the antibodies
antigen = list(pick(ALL_ANTIGENS))
antigen |= pick(ALL_ANTIGENS)
if (prob(5) && all_species.len)
if (prob(5) && GLOB.all_species.len)
affected_species = get_infectable_species()
if (prob(10))
resistance += rand(1,9)

View File

@@ -92,6 +92,7 @@
#include "code\_global_vars\sensitive.dm"
#include "code\_global_vars\lists\mapping.dm"
#include "code\_global_vars\lists\misc.dm"
#include "code\_global_vars\lists\species.dm"
#include "code\_helpers\_global_objects.dm"
#include "code\_helpers\_global_objects_vr.dm"
#include "code\_helpers\_lists.dm"