Merge pull request #9223 from Fox-McCloud/what-is-this-species

Makes Species datum Non-Global
This commit is contained in:
Crazy Lemon
2018-07-21 17:01:33 -07:00
committed by GitHub
197 changed files with 1320 additions and 1522 deletions
+1 -1
View File
@@ -60,7 +60,7 @@
victim.apply_effect(radiation_amount, IRRADIATE, 0)
if(ishuman(victim))
var/mob/living/carbon/human/V = victim
if(NO_DNA in V.species.species_traits)
if(NO_DNA in V.dna.species.species_traits)
return
randmutb(victim)
domutcheck(victim ,null)
@@ -81,7 +81,7 @@
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if((HULK in H.mutations) || (NOGUNS in H.species.species_traits))
if((HULK in H.mutations) || (NOGUNS in H.dna.species.species_traits))
user << "<span class='warning'>Your fingers can't press the button!</span>"
return
+1 -1
View File
@@ -24,7 +24,7 @@
return
if(ishuman(user))
var/mob/living/carbon/human/abductor/H = user
if(H && H.mind.abductor)
if(isabductor(H))
to_chat(user, "<span class='warning'>Megaphones can't project psionic communication!</span>")
return
if(ishuman(user))
+3 -3
View File
@@ -99,7 +99,7 @@
if(!get_location_accessible(H, "mouth"))
to_chat(user, "<span class='warning'>The mask is in the way.</span>")
return
if((C.species.bodyflags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
if((C.dna.species.bodyflags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
to_chat(user, "<span class='warning'>You find yourself disappointed at the appalling lack of facial hair.</span>")
return
if(C.f_style == "Shaved")
@@ -130,13 +130,13 @@
if(!get_location_accessible(H, "head"))
to_chat(user, "<span class='warning'>The headgear is in the way.</span>")
return
if((C.species.bodyflags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
if((C.dna.species.bodyflags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
to_chat(user, "<span class='warning'>You find yourself disappointed at the appalling lack of hair.</span>")
return
if(C.h_style == "Bald" || C.h_style == "Balding Hair" || C.h_style == "Skinhead")
to_chat(user, "<span class='notice'>There is not enough hair left to shave...</span>")
return
if(M.get_species() == "Skrell")
if(isskrell(M))
to_chat(user, "<span class='warning'>Your razor isn't going to cut through tentacles.</span>")
return
if(H == user) //shaving yourself
@@ -74,7 +74,7 @@
H = M
spawn(0) //Some mutations have sleeps in them, like monkey
if(!(NOCLONE in M.mutations) && !(H && (NO_DNA in H.species.species_traits))) // prevents drained people from having their DNA changed
if(!(NOCLONE in M.mutations) && !(H && (NO_DNA in H.dna.species.species_traits))) // prevents drained people from having their DNA changed
var/prev_ue = M.dna.unique_enzymes
var/mutflags = 0
// UI in syringe.
@@ -113,7 +113,7 @@
if(ishuman(M)) // Would've done this via species instead of type, but the basic mob doesn't have a species, go figure.
var/mob/living/carbon/human/H = M
if(NO_DNA in H.species.species_traits)
if(NO_DNA in H.dna.species.species_traits)
return 0
if(!user.IsAdvancedToolUser())
@@ -24,7 +24,7 @@
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(NO_DNA in H.species.species_traits)
if(NO_DNA in H.dna.species.species_traits)
to_chat(user, "<span class='warning'>You failed to inject [M], as [M.p_they()] [M.p_have()] no DNA to scramble, nor flesh to inject.</span>")
return
@@ -43,7 +43,7 @@
if(istype(target))
var/mob/living/carbon/human/H = target
scramble(1, H, 100)
H.real_name = random_name(H.gender, H.species.name) //Give them a name that makes sense for their species.
H.real_name = random_name(H.gender, H.dna.species.name) //Give them a name that makes sense for their species.
H.sync_organ_dna(assimilate = 1)
H.update_body(0)
H.reset_hair() //No more winding up with hairstyles you're not supposed to have, and blowing your cover.
@@ -28,8 +28,9 @@
var/obj/machinery/abductor/console/console
if(ishuman(source))
var/mob/living/carbon/human/H = source
if(H.get_species() == "Abductor")
console = get_team_console(H.mind.abductor.team)
if(isabductor(H))
var/datum/species/abductor/S = H.dna.species
console = get_team_console(S.team)
home = console.pad
if(!home)
+9 -9
View File
@@ -33,19 +33,19 @@
var/list/species_facial_hair = list()
var/obj/item/organ/external/head/C = H.get_organ("head")
var/datum/robolimb/robohead = all_robolimbs[C.model]
if(H.gender == MALE || H.get_species() == "Vulpkanin")
if(C.species)
if(H.gender == MALE || isvulpkanin(H))
if(C.dna.species)
for(var/i in facial_hair_styles_list)
var/datum/sprite_accessory/facial_hair/tmp_facial = facial_hair_styles_list[i]
if(C.species.name in tmp_facial.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human hair styles.
if(C.species.bodyflags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
if(C.dna.species.name in tmp_facial.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human hair styles.
if(C.dna.species.bodyflags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
if(robohead.is_monitor)
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s face worth cutting. How disappointing.</span>")
return
continue //If the head DOES support human hair wigs, make sure they don't get monitor-oriented styles.
species_facial_hair += i
else
if(C.species.bodyflags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
if(C.dna.species.bodyflags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
if(!robohead.is_monitor)
if("Human" in tmp_facial.species_allowed)
species_facial_hair += i
@@ -57,18 +57,18 @@
var/f_new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in species_facial_hair
//handle normal hair
var/list/species_hair = list()
if(C.species)
if(C.dna.species)
for(var/i in hair_styles_public_list)
var/datum/sprite_accessory/hair/tmp_hair = hair_styles_public_list[i]
if(C.species.name in tmp_hair.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human facial hair styles.
if(C.species.bodyflags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
if(C.dna.species.name in tmp_hair.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human facial hair styles.
if(C.dna.species.bodyflags & ALL_RPARTS) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
if(robohead.is_monitor)
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s head worth cutting. How disappointing.</span>")
return
continue //If the head DOES support human hair wigs, make sure they don't get monitor-oriented styles.
species_hair += i
else
if(C.species.bodyflags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
if(C.dna.species.bodyflags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
if(!robohead.is_monitor)
if("Human" in tmp_hair.species_allowed)
species_hair += i
+1 -1
View File
@@ -26,7 +26,7 @@
to_chat(user, "<span class='notice'>You need to take that [target.name] off before cleaning it.</span>")
else if(target == user && user.a_intent == INTENT_GRAB && ishuman(target))
var/mob/living/carbon/human/muncher = user
if(muncher && muncher.get_species() == "Drask")
if(muncher && isdrask(muncher))
to_chat(user, "You take a bite of the [name]. Delicious!")
playsound(user.loc, 'sound/items/eatfood.ogg', 50, 0)
user.nutrition += 2
+1 -1
View File
@@ -58,7 +58,7 @@
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.species.is_small)
if(H.dna.species.is_small)
to_chat(user, "<span class='warning'>It's too heavy for you to wield fully.</span>")
return
if(user.get_inactive_hand())
+14 -4
View File
@@ -10,6 +10,7 @@
var/max = 30
var/prefix = "sharpened"
var/requires_sharpness = 1
var/claw_damage_increase = 1
/obj/item/whetstone/attackby(obj/item/I, mob/user, params)
@@ -46,16 +47,24 @@
playsound(get_turf(src), usesound, 50, 1)
name = "worn out [name]"
desc = "[desc] At least, it used to."
used = 1
used = TRUE
update_icon()
/obj/item/whetstone/attack_self(mob/user as mob) //This is just fluff for now. Species datums are global and not newly created instances, so we can't adjust unarmed damage on a per mob basis.
/obj/item/whetstone/attack_self(mob/user)
if(used)
to_chat(user, "<span class='warning'>The whetstone is too worn to use again!</span>")
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/datum/unarmed_attack/attack = H.species.unarmed
var/datum/unarmed_attack/attack = H.dna.species.unarmed
if(istype(attack, /datum/unarmed_attack/claws))
H.visible_message("<span class='notice'>[H] sharpens [H.p_their()] claws on the [src]!</span>", "<span class='notice'>You sharpen your claws on the [src].</span>")
attack.damage += claw_damage_increase
H.visible_message("<span class='notice'>[H] sharpens [H.p_their()] claws on [src]!</span>", "<span class='notice'>You sharpen your claws on [src].</span>")
playsound(get_turf(H), usesound, 50, 1)
name = "worn out [name]"
desc = "[desc] At least, it used to."
used = TRUE
update_icon()
/obj/item/whetstone/super
name = "super whetstone block"
@@ -64,3 +73,4 @@
max = 200
prefix = "super-sharpened"
requires_sharpness = 0
claw_damage_increase = 200
+3 -3
View File
@@ -23,7 +23,7 @@
var/list/valid_underwear = list()
for(var/underwear in underwear_list)
var/datum/sprite_accessory/S = underwear_list[underwear]
if(!(H.species.name in S.species_allowed))
if(!(H.dna.species.name in S.species_allowed))
continue
valid_underwear[underwear] = underwear_list[underwear]
var/new_underwear = input(user, "Choose your underwear:", "Changing") as null|anything in valid_underwear
@@ -34,7 +34,7 @@
var/list/valid_undershirts = list()
for(var/undershirt in undershirt_list)
var/datum/sprite_accessory/S = undershirt_list[undershirt]
if(!(H.species.name in S.species_allowed))
if(!(H.dna.species.name in S.species_allowed))
continue
valid_undershirts[undershirt] = undershirt_list[undershirt]
var/new_undershirt = input(user, "Choose your undershirt:", "Changing") as null|anything in valid_undershirts
@@ -45,7 +45,7 @@
var/list/valid_sockstyles = list()
for(var/sockstyle in socks_list)
var/datum/sprite_accessory/S = socks_list[sockstyle]
if(!(H.species.name in S.species_allowed))
if(!(H.dna.species.name in S.species_allowed))
continue
valid_sockstyles[sockstyle] = socks_list[sockstyle]
var/new_socks = input(user, "Choose your socks:", "Changing") as null|anything in valid_sockstyles
+1 -1
View File
@@ -86,7 +86,7 @@
return ..()
if(istype(A, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.species.is_small)
if(H.dna.species.is_small)
return ..()
return 0