Merge branch 'master' of https://github.com/ParadiseSS13/Paradise into BookClub

This commit is contained in:
Aurorablade
2016-10-24 22:30:16 -04:00
128 changed files with 3787 additions and 2867 deletions
@@ -27,13 +27,15 @@
var/heat_protection = 0.5
var/leaping = 0
ventcrawler = 2
var/list/alien_organs = list()
/mob/living/carbon/alien/New()
verbs += /mob/living/verb/mob_sleep
verbs += /mob/living/verb/lay_down
internal_organs += new /obj/item/organ/internal/brain/xeno
internal_organs += new /obj/item/organ/internal/xenos/hivenode
for(var/obj/item/organ/internal/I in internal_organs)
alien_organs += new /obj/item/organ/internal/brain/xeno
alien_organs += new /obj/item/organ/internal/xenos/hivenode
for(var/obj/item/organ/internal/I in alien_organs)
I.insert(src)
..()
@@ -15,7 +15,6 @@ In all, this is a lot like the monkey code. /N
return
switch(M.a_intent)
if(I_HELP)
sleeping = max(0,sleeping-5)
resting = 0
@@ -25,11 +24,12 @@ In all, this is a lot like the monkey code. /N
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake it up!</span>")
if(I_GRAB)
src.grabbedby(M)
grabbedby(M)
return 1
else
if(health > 0)
M.do_attack_animation(src)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = 1
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
@@ -39,13 +39,10 @@ In all, this is a lot like the monkey code. /N
updatehealth()
else
to_chat(M, "<span class='warning'>[name] is too injured for that.</span>")
return
/mob/living/carbon/alien/attack_larva(mob/living/carbon/alien/larva/L as mob)
return attack_alien(L)
/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M as mob)
if(..()) //to allow surgery to return properly.
return 0
@@ -56,7 +53,7 @@ In all, this is a lot like the monkey code. /N
if(I_HELP)
help_shake_act(M)
if(I_GRAB)
src.grabbedby(M)
grabbedby(M)
if(I_HARM, I_DISARM)
return 1
return 0
@@ -12,9 +12,9 @@
if(src.name == "alien drone")
src.name = text("alien drone ([rand(1, 1000)])")
src.real_name = src.name
internal_organs += new /obj/item/organ/internal/xenos/plasmavessel/drone
internal_organs += new /obj/item/organ/internal/xenos/acidgland
internal_organs += new /obj/item/organ/internal/xenos/resinspinner
alien_organs += new /obj/item/organ/internal/xenos/plasmavessel/drone
alien_organs += new /obj/item/organ/internal/xenos/acidgland
alien_organs += new /obj/item/organ/internal/xenos/resinspinner
..()
//Drones use the same base as generic humanoids.
@@ -12,7 +12,7 @@
if(name == "alien hunter")
name = text("alien hunter ([rand(1, 1000)])")
real_name = name
internal_organs += new /obj/item/organ/internal/xenos/plasmavessel/hunter
alien_organs += new /obj/item/organ/internal/xenos/plasmavessel/hunter
..()
/mob/living/carbon/alien/humanoid/hunter/handle_regular_hud_updates()
@@ -41,9 +41,9 @@
if(name == "alien sentinel")
name = text("alien sentinel ([rand(1, 1000)])")
real_name = name
internal_organs += new /obj/item/organ/internal/xenos/plasmavessel
internal_organs += new /obj/item/organ/internal/xenos/acidgland
internal_organs += new /obj/item/organ/internal/xenos/neurotoxin
alien_organs += new /obj/item/organ/internal/xenos/plasmavessel
alien_organs += new /obj/item/organ/internal/xenos/acidgland
alien_organs += new /obj/item/organ/internal/xenos/neurotoxin
..()
/mob/living/carbon/alien/humanoid/sentinel/handle_regular_hud_updates()
@@ -44,11 +44,11 @@
break
real_name = src.name
internal_organs += new /obj/item/organ/internal/xenos/plasmavessel/queen
internal_organs += new /obj/item/organ/internal/xenos/acidgland
internal_organs += new /obj/item/organ/internal/xenos/eggsac
internal_organs += new /obj/item/organ/internal/xenos/resinspinner
internal_organs += new /obj/item/organ/internal/xenos/neurotoxin
alien_organs += new /obj/item/organ/internal/xenos/plasmavessel/queen
alien_organs += new /obj/item/organ/internal/xenos/acidgland
alien_organs += new /obj/item/organ/internal/xenos/eggsac
alien_organs += new /obj/item/organ/internal/xenos/resinspinner
alien_organs += new /obj/item/organ/internal/xenos/neurotoxin
..()
/mob/living/carbon/alien/humanoid/empress
@@ -243,70 +243,6 @@
visible_message("<span class='danger'>[M] has attempted to disarm [src]!</span>")
return
/*Code for aliens attacking aliens. Because aliens act on a hivemind, I don't see them as very aggressive with each other.
As such, they can either help or harm other aliens. Help works like the human help command while harm is a simple nibble.
In all, this is a lot like the monkey code. /N
*/
/mob/living/carbon/alien/humanoid/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if(istype(loc, /turf) && istype(loc.loc, /area/start))
to_chat(M, "No attacking people at spawn, you jackass.")
return
..()
switch(M.a_intent)
if(I_HELP)
sleeping = max(0,sleeping-5)
resting = 0
AdjustParalysis(-3)
AdjustStunned(-3)
AdjustWeakened(-3)
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake it up!</span>")
else
if(health > 0)
M.do_attack_animation(src)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = rand(1, 3)
visible_message("<span class='danger'>[M.name] bites [src]!!</span>", \
"<span class='userdanger'>[M.name] bites [src]!!</span>")
adjustBruteLoss(damage)
updatehealth()
else
to_chat(M, "<span class='warning'>[name] is too injured for that.</span>")
return
/mob/living/carbon/alien/humanoid/attack_larva(mob/living/carbon/alien/larva/L as mob)
switch(L.a_intent)
if(I_HELP)
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
else
if(health > 0)
L.do_attack_animation(src)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = rand(1, 3)
visible_message("<span class='danger'>[L.name] bites [src]!!</span>", \
"<span class='userdanger'>[L.name] bites [src]!!</span>")
adjustBruteLoss(damage)
updatehealth()
else
to_chat(L, "<span class='warning'>[name] is too injured for that.</span>")
return
/mob/living/carbon/alien/humanoid/restrained()
if(handcuffed)
return 1
@@ -23,11 +23,11 @@
break
real_name = src.name
internal_organs += new /obj/item/organ/internal/xenos/plasmavessel/queen
internal_organs += new /obj/item/organ/internal/xenos/acidgland
internal_organs += new /obj/item/organ/internal/xenos/eggsac
internal_organs += new /obj/item/organ/internal/xenos/resinspinner
internal_organs += new /obj/item/organ/internal/xenos/neurotoxin
alien_organs += new /obj/item/organ/internal/xenos/plasmavessel/queen
alien_organs += new /obj/item/organ/internal/xenos/acidgland
alien_organs += new /obj/item/organ/internal/xenos/eggsac
alien_organs += new /obj/item/organ/internal/xenos/resinspinner
alien_organs += new /obj/item/organ/internal/xenos/neurotoxin
..()
@@ -24,7 +24,7 @@
regenerate_icons()
add_language("Xenomorph")
add_language("Hivemind")
internal_organs += new /obj/item/organ/internal/xenos/plasmavessel/larva
alien_organs += new /obj/item/organ/internal/xenos/plasmavessel/larva
..()
@@ -190,41 +190,6 @@
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to kick [src]!</span>", \
"<span class='userdanger'>[M] has attempted to kick [src]!</span>")
return
/mob/living/carbon/alien/larva/attack_alien(mob/living/carbon/alien/humanoid/M as mob)
if(!ticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if(istype(loc, /turf) && istype(loc.loc, /area/start))
to_chat(M, "No attacking people at spawn, you jackass.")
return
..()
switch(M.a_intent)
if(I_HELP)
sleeping = max(0,sleeping-5)
resting = 0
AdjustParalysis(-3)
AdjustStunned(-3)
AdjustWeakened(-3)
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake it up!</span>")
else
if(health > 0)
M.do_attack_animation(src)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = 1
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
"<span class='userdanger'>[M.name] bites [src]!</span>")
adjustBruteLoss(damage)
updatehealth()
else
to_chat(M, "<span class='warning'>[name] is too injured for that.</span>")
return
/mob/living/carbon/alien/larva/restrained()
return 0
+215 -123
View File
@@ -4,32 +4,29 @@
AC.ui_interact(user, state = state)
/mob/living/carbon/human/proc/change_species(var/new_species)
if(!new_species)
if(!new_species || species == new_species || !(new_species in all_species))
return
if(species == new_species)
return
if(!(new_species in all_species))
return
set_species(new_species)
set_species(new_species, null, 1)
reset_hair()
if(species.bodyflags & HAS_MARKINGS)
reset_markings()
return 1
/mob/living/carbon/human/proc/change_gender(var/gender, var/update_dna = 1)
/mob/living/carbon/human/proc/change_gender(var/new_gender, var/update_dna = 1)
var/obj/item/organ/external/head/H = organs_by_name["head"]
if(src.gender == gender)
if(gender == new_gender)
return
src.gender = gender
gender = new_gender
var/datum/sprite_accessory/hair/current_hair = hair_styles_list[H.h_style]
if(current_hair.gender != NEUTER && current_hair.gender != src.gender)
if(current_hair.gender != NEUTER && current_hair.gender != gender)
reset_head_hair()
var/datum/sprite_accessory/hair/current_fhair = facial_hair_styles_list[H.f_style]
if(current_fhair.gender != NEUTER && current_fhair.gender != src.gender)
if(current_fhair.gender != NEUTER && current_fhair.gender != gender)
reset_facial_hair()
if(update_dna)
@@ -40,13 +37,7 @@
/mob/living/carbon/human/proc/change_hair(var/hair_style)
var/obj/item/organ/external/head/H = get_organ("head")
if(!hair_style)
return
if(H.h_style == hair_style)
return
if(!(hair_style in hair_styles_list))
if(!hair_style || !H || H.h_style == hair_style || !(hair_style in hair_styles_list))
return
H.h_style = hair_style
@@ -56,13 +47,7 @@
/mob/living/carbon/human/proc/change_facial_hair(var/facial_hair_style)
var/obj/item/organ/external/head/H = get_organ("head")
if(!facial_hair_style)
return
if(H.f_style == facial_hair_style)
return
if(!(facial_hair_style in facial_hair_styles_list))
if(!facial_hair_style || !H || H.f_style == facial_hair_style || !(facial_hair_style in facial_hair_styles_list))
return
H.f_style = facial_hair_style
@@ -72,13 +57,7 @@
/mob/living/carbon/human/proc/change_head_accessory(var/head_accessory_style)
var/obj/item/organ/external/head/H = get_organ("head")
if(!head_accessory_style)
return
if(H.ha_style == head_accessory_style)
return
if(!(head_accessory_style in head_accessory_styles_list))
if(!head_accessory_style || !H || H.ha_style == head_accessory_style || !(head_accessory_style in head_accessory_styles_list))
return
H.ha_style = head_accessory_style
@@ -86,52 +65,95 @@
update_head_accessory()
return 1
/mob/living/carbon/human/proc/change_markings(var/marking_style)
if(!marking_style)
/mob/living/carbon/human/proc/change_markings(var/marking_style, var/location = "body")
if(!marking_style || m_styles[location] == marking_style || !(marking_style in marking_styles_list))
return
if(src.m_style == marking_style)
var/datum/sprite_accessory/body_markings/marking = marking_styles_list[marking_style]
if(marking.name != "None" && marking.marking_location != location)
return
if(!(marking_style in marking_styles_list))
return
var/obj/item/organ/external/head/head_organ = get_organ("head")
if(location == "head")
if(!head_organ)
return
src.m_style = marking_style
if(head_organ.alt_head && head_organ.alt_head != "None")
var/datum/sprite_accessory/body_markings/head/H = marking_styles_list[marking_style]
if(marking.name != "None" && (!H.heads_allowed || (!("All" in H.heads_allowed) && !(head_organ.alt_head in H.heads_allowed))))
return
else
if(!head_organ.alt_head || head_organ.alt_head == "None")
head_organ.alt_head = "None"
var/datum/sprite_accessory/body_markings/head/H = marking_styles_list[marking_style]
if(H.heads_allowed && !("All" in H.heads_allowed))
return
update_markings()
if(location == "tail" && marking.name != "None")
var/datum/sprite_accessory/body_markings/tail/tail_marking = marking_styles_list[marking_style]
if(!body_accessory)
if(tail_marking.tails_allowed)
return
else
if(!tail_marking.tails_allowed || !(body_accessory.name in tail_marking.tails_allowed))
return
m_styles[location] = marking_style
if(location == "tail")
stop_tail_wagging()
else
update_markings()
return 1
/mob/living/carbon/human/proc/change_body_accessory(var/body_accessory_style)
var/found
if(!body_accessory_style)
if(!body_accessory_style || (body_accessory && body_accessory.name == body_accessory_style))
return
if(src.body_accessory)
if(src.body_accessory.name == body_accessory_style)
return
for(var/B in body_accessory_by_name)
if(B == body_accessory_style)
src.body_accessory = body_accessory_by_name[body_accessory_style]
body_accessory = body_accessory_by_name[body_accessory_style]
found = 1
if(!found)
return
m_styles["tail"] = "None"
update_tail_layer()
return 1
/mob/living/carbon/human/proc/change_alt_head(var/alternate_head)
var/obj/item/organ/external/head/H = get_organ("head")
if(!H || H.alt_head == alternate_head || (H.status & ORGAN_ROBOT) || (!(species.bodyflags & HAS_ALT_HEADS) && alternate_head != "None") || !(alternate_head in alt_heads_list))
return
H.alt_head = alternate_head
//Handle head markings if they're incompatible with the new alt head.
if(m_styles["head"])
var/head_marking = m_styles["head"]
var/datum/sprite_accessory/body_markings/head/head_marking_style = marking_styles_list[head_marking]
if(!head_marking_style.heads_allowed || (!("All" in head_marking_style.heads_allowed) && !(H.alt_head in head_marking_style.heads_allowed)))
m_styles["head"] = "None"
update_markings()
update_body(1, 1) //Update the body and force limb icon regeneration to update the head with the new icon.
if(wear_mask)
update_inv_wear_mask()
return 1
/mob/living/carbon/human/proc/reset_hair()
reset_head_hair()
reset_facial_hair()
reset_head_accessory()
if(m_style && m_style != "None") //Resets the markings if they were head markings.
var/datum/sprite_accessory/marking_style = marking_styles_list[m_style]
if(marking_style && marking_style.marking_location == "head")
reset_markings()
if(m_styles["head"] && m_styles["head"] != "None") //Resets head markings.
reset_markings("head")
/mob/living/carbon/human/proc/reset_head_hair()
var/obj/item/organ/external/head/H = get_organ("head")
if(!H)
return
var/list/valid_hairstyles = generate_valid_hairstyles()
if(valid_hairstyles.len)
H.h_style = pick(valid_hairstyles)
@@ -143,6 +165,8 @@
/mob/living/carbon/human/proc/reset_facial_hair()
var/obj/item/organ/external/head/H = get_organ("head")
if(!H)
return
var/list/valid_facial_hairstyles = generate_valid_facial_hairstyles()
if(valid_facial_hairstyles.len)
H.f_style = pick(valid_facial_hairstyles)
@@ -151,17 +175,32 @@
H.f_style = "Shaved"
update_fhair()
/mob/living/carbon/human/proc/reset_markings()
var/list/valid_markings = generate_valid_markings()
if(valid_markings.len)
m_style = pick(valid_markings)
/mob/living/carbon/human/proc/reset_markings(var/location)
var/list/valid_markings
if(location)
valid_markings = generate_valid_markings(location)
if(valid_markings.len)
m_styles[location] = pick(valid_markings)
else
//this shouldn't happen
m_styles[location] = "None"
else
//this shouldn't happen
m_style = "None"
for(var/m_location in list("head", "body", "tail"))
valid_markings = generate_valid_markings(m_location)
if(valid_markings.len)
m_styles[m_location] = pick(valid_markings)
else
//this shouldn't happen
m_styles[m_location] = "None"
update_markings()
stop_tail_wagging()
/mob/living/carbon/human/proc/reset_head_accessory()
var/obj/item/organ/external/head/H = get_organ("head")
if(!H)
return
var/list/valid_head_accessories = generate_valid_head_accessories()
if(valid_head_accessories.len)
H.ha_style = pick(valid_head_accessories)
@@ -193,32 +232,57 @@
update_body()
return 1
/mob/living/carbon/human/proc/change_hair_color(var/red, var/green, var/blue)
/mob/living/carbon/human/proc/change_hair_color(var/red, var/green, var/blue, var/secondary)
var/obj/item/organ/external/head/H = get_organ("head")
if(red == H.r_hair && green == H.g_hair && blue == H.b_hair)
if(!H)
return
H.r_hair = red
H.g_hair = green
H.b_hair = blue
if(!secondary)
if(red == H.r_hair && green == H.g_hair && blue == H.b_hair)
return
H.r_hair = red
H.g_hair = green
H.b_hair = blue
else
if(red == H.r_hair_sec && green == H.g_hair_sec && blue == H.b_hair_sec)
return
H.r_hair_sec = red
H.g_hair_sec = green
H.b_hair_sec = blue
update_hair()
return 1
/mob/living/carbon/human/proc/change_facial_hair_color(var/red, var/green, var/blue)
/mob/living/carbon/human/proc/change_facial_hair_color(var/red, var/green, var/blue, var/secondary)
var/obj/item/organ/external/head/H = get_organ("head")
if(red == H.r_facial && green == H.g_facial && blue == H.b_facial)
if(!H)
return
H.r_facial = red
H.g_facial = green
H.b_facial = blue
if(!secondary)
if(red == H.r_facial && green == H.g_facial && blue == H.b_facial)
return
H.r_facial = red
H.g_facial = green
H.b_facial = blue
else
if(red == H.r_facial_sec && green == H.g_facial_sec && blue == H.b_facial_sec)
return
H.r_facial_sec = red
H.g_facial_sec = green
H.b_facial_sec = blue
update_fhair()
return 1
/mob/living/carbon/human/proc/change_head_accessory_color(var/red, var/green, var/blue)
var/obj/item/organ/external/head/H = get_organ("head")
if(!H)
return
if(red == H.r_headacc && green == H.g_headacc && blue == H.b_headacc)
return
@@ -229,15 +293,16 @@
update_head_accessory()
return 1
/mob/living/carbon/human/proc/change_marking_color(var/red, var/green, var/blue)
if(red == r_markings && green == g_markings && blue == b_markings)
/mob/living/carbon/human/proc/change_marking_color(var/colour, var/location = "body")
if(colour == m_colours[location])
return
r_markings = red
g_markings = green
b_markings = blue
m_colours[location] = colour
update_markings()
if(location == "tail")
update_tail_layer()
else
update_markings()
return 1
@@ -287,75 +352,66 @@
/mob/living/carbon/human/proc/generate_valid_hairstyles()
var/list/valid_hairstyles = new()
var/obj/item/organ/external/head/H = get_organ("head")
if(!H)
return //No head, no hair.
for(var/hairstyle in hair_styles_list)
var/datum/sprite_accessory/S = hair_styles_list[hairstyle]
if(gender == MALE && S.gender == FEMALE)
if(hairstyle == "Bald") //Just in case.
valid_hairstyles += hairstyle
continue
if(gender == FEMALE && S.gender == MALE)
if((H.gender == MALE && S.gender == FEMALE) || (H.gender == FEMALE && S.gender == MALE))
continue
if(H.species.flags & ALL_RPARTS) //If the user is a species who can have a robotic head...
var/datum/robolimb/robohead = all_robolimbs[H.model]
if(!H)
return
if(H.species.name in S.species_allowed) //If this is a hairstyle native to the user's species...
if(robohead.is_monitor && (robohead.company in S.models_allowed)) //Check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
valid_hairstyles += hairstyle //Give them their hairstyles if they do.
continue
else //If they don't have the default head, they shouldn't be getting any hairstyles they wouldn't normally.
continue
if((H.species.name in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
valid_hairstyles += hairstyle //Give them their hairstyles if they do.
else
if(robohead.is_monitor) //If the hair style is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it.
continue
else
if("Human" in S.species_allowed) //If the user has a robotic head and the hairstyle can fit humans, let them use it as a wig for their humanoid robot head.
valid_hairstyles += hairstyle
continue
if(!robohead.is_monitor && ("Human" in S.species_allowed)) /*If the hairstyle is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it.
But if the user has a robotic humanoid head and the hairstyle can fit humans, let them use it as a wig. */
valid_hairstyles += hairstyle
else //If the user is not a species who can have robotic heads, use the default handling.
if(!(H.species.name in S.species_allowed)) //If the user's head is not of a species the hair style allows, skip it. Otherwise, add it to the list.
continue
valid_hairstyles += hairstyle
if(H.species.name in S.species_allowed) //If the user's head is of a species the hairstyle allows, add it to the list.
valid_hairstyles += hairstyle
return valid_hairstyles
/mob/living/carbon/human/proc/generate_valid_facial_hairstyles()
var/list/valid_facial_hairstyles = new()
var/obj/item/organ/external/head/H = get_organ("head")
if(!H)
return //No head, no hair.
for(var/facialhairstyle in facial_hair_styles_list)
var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle]
if(gender == MALE && S.gender == FEMALE)
if(facialhairstyle == "Shaved") //Just in case.
valid_facial_hairstyles += facialhairstyle
continue
if(gender == FEMALE && S.gender == MALE)
if((H.gender == MALE && S.gender == FEMALE) || (H.gender == FEMALE && S.gender == MALE))
continue
if(H.species.flags & ALL_RPARTS) //If the user is a species who can have a robotic head...
var/datum/robolimb/robohead = all_robolimbs[H.model]
if(!H)
continue // No head, no hair
if(H.species.name in S.species_allowed) //If this is a facial hair style native to the user's species...
if(robohead.is_monitor && (robohead.company in S.models_allowed)) //Check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
valid_facial_hairstyles += facialhairstyle //Give them their facial hair styles if they do.
continue
else //If they don't have the default head, they shouldn't be getting any facial hair styles they wouldn't normally.
continue
if((H.species.name in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a facial hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
valid_facial_hairstyles += facialhairstyle //Give them their facial hairstyles if they do.
else
if(robohead.is_monitor) //If the facial hair style is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it.
continue
else
if("Human" in S.species_allowed) //If the user has a robotic head and the facial hair style can fit humans, let them use it as a postiche for their humanoid robot head.
valid_facial_hairstyles += facialhairstyle
continue
if(!robohead.is_monitor && ("Human" in S.species_allowed)) /*If the facial hairstyle is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it.
But if the user has a robotic humanoid head and the facial hairstyle can fit humans, let them use it as a wig. */
valid_facial_hairstyles += facialhairstyle
else //If the user is not a species who can have robotic heads, use the default handling.
if(!(H.species.name in S.species_allowed)) //If the user's head is not of a species the facial hair style allows, skip it. Otherwise, add it to the list.
continue
valid_facial_hairstyles += facialhairstyle
if(H.species.name in S.species_allowed) //If the user's head is of a species the facial hair style allows, add it to the list.
valid_facial_hairstyles += facialhairstyle
return valid_facial_hairstyles
/mob/living/carbon/human/proc/generate_valid_head_accessories()
var/list/valid_head_accessories = new()
var/obj/item/organ/external/head/H = get_organ("head")
if(!H)
return //No head, no head accessory.
for(var/head_accessory in head_accessory_styles_list)
var/datum/sprite_accessory/S = head_accessory_styles_list[head_accessory]
@@ -365,18 +421,40 @@
return valid_head_accessories
/mob/living/carbon/human/proc/generate_valid_markings()
/mob/living/carbon/human/proc/generate_valid_markings(var/location = "body")
var/list/valid_markings = new()
var/obj/item/organ/external/head/H = get_organ("head")
for(var/marking in marking_styles_list)
var/datum/sprite_accessory/S = marking_styles_list[marking]
if(!H && location == "head")
return //No head, no head markings.
if(!(species.name in S.species_allowed)) //If the user's head is not of a species the marking style allows, skip it. Otherwise, add it to the list.
for(var/marking in marking_styles_list)
var/datum/sprite_accessory/body_markings/S = marking_styles_list[marking]
if(S.name == "None")
valid_markings += marking
continue
if(H.species.flags & ALL_RPARTS) //If the user is a species that can have a robotic head...
var/datum/robolimb/robohead = all_robolimbs[H.model]
if(!(S.models_allowed && (robohead.company in S.models_allowed))) //Make sure they don't get markings incompatible with their head.
continue
if(S.marking_location != location) //If the marking isn't for the location we desire, skip.
continue
if(!(species.name in S.species_allowed)) //If the user is not of a species the marking style allows, skip it. Otherwise, add it to the list.
continue
if(location == "tail")
if(!body_accessory)
if(S.tails_allowed)
continue
else
if(!S.tails_allowed || !(body_accessory.name in S.tails_allowed))
continue
if(location == "head")
var/datum/sprite_accessory/body_markings/head/M = marking_styles_list[S.name]
if(H.species.flags & ALL_RPARTS)//If the user is a species that can have a robotic head...
var/datum/robolimb/robohead = all_robolimbs[H.model]
if(!(S.models_allowed && (robohead.company in S.models_allowed))) //Make sure they don't get markings incompatible with their head.
continue
else if(H.alt_head && H.alt_head != "None") //If the user's got an alt head, validate markings for that head.
if(!M.heads_allowed || (!("All" in M.heads_allowed) && !(H.alt_head in M.heads_allowed)))
continue
else
if(M.heads_allowed && !("All" in M.heads_allowed))
continue
valid_markings += marking
return valid_markings
@@ -389,10 +467,24 @@
valid_body_accessories = body_accessory_by_name.Copy()
else
if(!istype(A))
valid_body_accessories += "None" //The only null entry should be the "None" option.
valid_body_accessories["None"] = "None" //The only null entry should be the "None" option.
continue
if(!(species.name in A.allowed_species)) //If the user is not of a species the body accessory style allows, skip it. Otherwise, add it to the list.
continue
valid_body_accessories += B
if(species.name in A.allowed_species) //If the user is not of a species the body accessory style allows, skip it. Otherwise, add it to the list.
valid_body_accessories += B
return valid_body_accessories
/mob/living/carbon/human/proc/generate_valid_alt_heads()
var/list/valid_alt_heads = list()
var/obj/item/organ/external/head/H = get_organ("head")
if(!H)
return //No head, no alt heads.
valid_alt_heads["None"] = alt_heads_list["None"] //The only null entry should be the "None" option, and there should always be a "None" option.
for(var/alternate_head in alt_heads_list)
var/datum/sprite_accessory/alt_heads/head = alt_heads_list[alternate_head]
if(!(H.species.name in head.species_allowed))
continue
valid_alt_heads += alternate_head
return valid_alt_heads
@@ -112,36 +112,30 @@ var/global/list/body_accessory_by_species = list("None" = null)
//Vulpkanin
/datum/body_accessory/tail/vulpkanin_2
name = "Vulpkanin Alt 1 (Bushy)"
icon_state = "vulptail2"
animated_icon_state = "vulptail2_a"
allowed_species = list("Vulpkanin")
/datum/body_accessory/tail/vulpkanin_3
name = "Vulpkanin Alt 2 (Straight)"
icon_state = "vulptail3"
animated_icon_state = "vulptail3_a"
allowed_species = list("Vulpkanin")
/datum/body_accessory/tail/vulpkanin_4
name = "Vulpkanin Alt 3 (Tiny)"
icon_state = "vulptail4"
animated_icon_state = "vulptail4_a"
allowed_species = list("Vulpkanin")
/datum/body_accessory/tail/vulpkanin_5
name = "Vulpkanin Alt 4 (Short)"
icon_state = "vulptail5"
animated_icon_state = "vulptail5_a"
allowed_species = list("Vulpkanin")
/datum/body_accessory/tail/vulpkanin_6
name = "Vulpkanin Alt 5 (Straight Bushy)"
icon_state = "vulptail6"
animated_icon_state = "vulptail6_a"
allowed_species = list("Vulpkanin")
+10 -2
View File
@@ -155,11 +155,19 @@
if(istype(H))
if(H.f_style)
H.f_style = "Shaved"
H.f_style = initial(H.f_style)
if(H.h_style)
H.h_style = "Bald"
H.h_style = initial(H.h_style)
if(H.ha_style)
H.ha_style = initial(H.ha_style)
if(H.alt_head)
H.alt_head = initial(H.alt_head)
H.handle_alt_icon()
m_styles = DEFAULT_MARKING_STYLES
update_fhair(0)
update_hair(0)
update_head_accessory(0)
update_markings(0)
mutations.Add(SKELETON)
mutations.Add(NOCLONE)
+43 -24
View File
@@ -709,12 +709,19 @@
if(!.) . = if_no_id //to prevent null-names making the mob unclickable
return
//gets ID card object from special clothes slot or null.
/mob/living/carbon/human/proc/get_idcard()
//gets ID card object from special clothes slot or, if applicable, hands as well
/mob/living/carbon/human/proc/get_idcard(var/check_hands = FALSE)
var/obj/item/weapon/card/id/id = wear_id
var/obj/item/device/pda/pda = wear_id
if(istype(pda) && pda.id)
id = pda.id
if(check_hands)
if(istype(get_active_hand(), /obj/item/weapon/card/id))
id = get_active_hand()
else if(istype(get_inactive_hand(), /obj/item/weapon/card/id))
id = get_inactive_hand()
if(istype(id))
return id
@@ -1472,7 +1479,6 @@
to_chat(usr, "\blue [self ? "Your" : "[src]'s"] pulse is [src.get_pulse(GETPULSE_HAND)].")
/mob/living/carbon/human/proc/set_species(var/new_species, var/default_colour, var/delay_icon_update = 0)
var/datum/species/oldspecies = species
if(!dna)
if(!new_species)
@@ -1525,9 +1531,9 @@
if(species.base_color && default_colour)
//Apply colour.
r_skin = hex2num(copytext(species.base_color, 2, 4))
g_skin = hex2num(copytext(species.base_color, 4, 6))
b_skin = hex2num(copytext(species.base_color, 6, 8))
r_skin = color2R(species.base_color)
g_skin = color2G(species.base_color)
b_skin = color2B(species.base_color)
else
r_skin = 0
g_skin = 0
@@ -1542,37 +1548,47 @@
var/obj/item/organ/external/head/H = get_organ("head")
if(species.default_hair)
H.h_style = species.default_hair
else
H.h_style = "Bald"
if(species.default_fhair)
H.f_style = species.default_fhair
else
H.f_style = "Shaved"
if(species.default_headacc)
H.ha_style = species.default_headacc
else
H.ha_style = "None"
if(species.default_hair_colour)
//Apply colour.
H.r_hair = hex2num(copytext(species.default_hair_colour, 2, 4))
H.g_hair = hex2num(copytext(species.default_hair_colour, 4, 6))
H.b_hair = hex2num(copytext(species.default_hair_colour, 6, 8))
H.r_hair = color2R(species.default_hair_colour)
H.g_hair = color2G(species.default_hair_colour)
H.b_hair = color2B(species.default_hair_colour)
else
H.r_hair = 0
H.g_hair = 0
H.b_hair = 0
if(species.default_fhair_colour)
H.r_facial = hex2num(copytext(species.default_fhair_colour, 2, 4))
H.g_facial = hex2num(copytext(species.default_fhair_colour, 4, 6))
H.b_facial = hex2num(copytext(species.default_fhair_colour, 6, 8))
H.r_facial = color2R(species.default_fhair_colour)
H.g_facial = color2G(species.default_fhair_colour)
H.b_facial = color2B(species.default_fhair_colour)
else
H.r_facial = 0
H.g_facial = 0
H.b_facial = 0
if(species.default_headacc_colour)
H.r_headacc = hex2num(copytext(species.default_headacc_colour, 2, 4))
H.g_headacc = hex2num(copytext(species.default_headacc_colour, 4, 6))
H.b_headacc = hex2num(copytext(species.default_headacc_colour, 6, 8))
H.r_headacc = color2R(species.default_headacc_colour)
H.g_headacc = color2G(species.default_headacc_colour)
H.b_headacc = color2B(species.default_headacc_colour)
else
H.r_headacc = 0
H.g_headacc = 0
H.b_headacc = 0
m_styles = DEFAULT_MARKING_STYLES //Wipes out markings, setting them all to "None".
m_colours = DEFAULT_MARKING_COLOURS //Defaults colour to #00000 for all markings.
body_accessory = null
if(!dna)
dna = new /datum/dna(null)
dna.species = species.name
@@ -1673,16 +1689,13 @@
if(!head_organ)
return
if(!robohead.is_monitor) //If they've got a prosthetic head and it isn't a monitor, they've no screen to adjust. Instead, let them change the colour of their optics!
var/optic_colour = input(src, "Select optic colour", rgb(r_markings, g_markings, b_markings)) as color|null
var/optic_colour = input(src, "Select optic colour", m_colours["head"]) as color|null
if(incapacitated())
to_chat(src, "<span class='warning'>You were interrupted while changing the colour of your optics.</span>")
return
if(optic_colour)
r_markings = hex2num(copytext(optic_colour, 2, 4))
g_markings = hex2num(copytext(optic_colour, 4, 6))
b_markings = hex2num(copytext(optic_colour, 6, 8))
change_markings(optic_colour, "head")
update_markings()
else if(robohead.is_monitor) //Means that the character's head is a monitor (has a screen). Time to customize.
var/list/hair = list()
for(var/i in hair_styles_list)
@@ -1690,14 +1703,12 @@
if((head_organ.species.name in tmp_hair.species_allowed) && (robohead.company in tmp_hair.models_allowed)) //Populate the list of available monitor styles only with styles that the monitor-head is allowed to use.
hair += i
var/new_style = input(src, "Select a monitor display", "Monitor Display", head_organ.h_style) as null|anything in hair
var/new_style = input(src, "Select a monitor display", "Monitor Display", head_organ.h_style) as null|anything in hair
if(incapacitated())
to_chat(src, "<span class='warning'>You were interrupted while changing your monitor display.</span>")
return
if(new_style)
head_organ.h_style = new_style
update_hair()
change_hair(new_style)
//Putting a couple of procs here that I don't know where else to dump.
//Mostly going to be used for Vox and Vox Armalis, but other human mobs might like them (for adminbuse).
@@ -1977,6 +1988,12 @@
var/obj/item/weapon/card/id/id = wear_id
if(istype(id) && id.is_untrackable())
return 0
if(wear_pda)
var/obj/item/device/pda/pda = wear_pda
if(istype(pda))
var/obj/item/weapon/card/id/id = pda.id
if(istype(id) && id.is_untrackable())
return 0
if(istype(head, /obj/item/clothing/head))
var/obj/item/clothing/head/hat = head
if(hat.blockTracking)
@@ -1992,6 +2009,8 @@
if(wear_id)
. |= wear_id.GetAccess()
if(wear_pda)
. |= wear_pda.GetAccess()
if(istype(w_uniform, /obj/item/clothing/under))
var/obj/item/clothing/under/U = w_uniform
if(U.accessories)
@@ -4,10 +4,8 @@ var/global/default_martial_art = new/datum/martial_art
hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPLOYAL_HUD,IMPCHEM_HUD,IMPTRACK_HUD,SPECIALROLE_HUD,NATIONS_HUD)
//Marking colour and style
var/r_markings = 0
var/g_markings = 0
var/b_markings = 0
var/m_style = "None"
var/list/m_colours = DEFAULT_MARKING_COLOURS //All colours set to #000000.
var/list/m_styles = DEFAULT_MARKING_STYLES //All markings set to None.
var/s_tone = 0 //Skin tone
@@ -152,7 +152,7 @@
mutations.Remove(FAT)
update_mutantrace(0)
update_mutations(0)
update_body(0)
update_body(0, 1)
update_inv_w_uniform(0)
update_inv_wear_suit()
@@ -167,7 +167,7 @@
mutations.Add(FAT)
update_mutantrace(0)
update_mutations(0)
update_body(0)
update_body(0, 1)
update_inv_w_uniform(0)
update_inv_wear_suit()
+1 -1
View File
@@ -142,7 +142,7 @@
message = uppertext(message)
verb = "yells loudly"
if(locate(/obj/item/organ/internal/cyberimp/brain/clown_voice) in internal_organs)
if((COMIC in mutations) || (locate(/obj/item/organ/internal/cyberimp/brain/clown_voice) in internal_organs))
message = "<span class='sans'>[message]</span>"
returns[1] = message
@@ -120,11 +120,11 @@
var/female_scream_sound = 'sound/goonstation/voice/female_scream.ogg'
//Default hair/headacc style vars.
var/default_hair = "Bald" //Default hair style for newly created humans unless otherwise set.
var/default_hair //Default hair style for newly created humans unless otherwise set.
var/default_hair_colour
var/default_fhair = "Shaved" //Default facial hair style for newly created humans unless otherwise set.
var/default_fhair //Default facial hair style for newly created humans unless otherwise set.
var/default_fhair_colour
var/default_headacc = "None" //Default head accessory style for newly created humans unless otherwise set.
var/default_headacc //Default head accessory style for newly created humans unless otherwise set.
var/default_headacc_colour
//Defining lists of icon skin tones for species that have them.
@@ -8,7 +8,7 @@
language = "Sol Common"
flags = HAS_LIPS | CAN_BE_FAT
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = HAS_SKIN_TONE
bodyflags = HAS_SKIN_TONE | HAS_BODY_MARKINGS
dietflags = DIET_OMNI
unarmed_type = /datum/unarmed_attack/punch
blurb = "Humanity originated in the Sol system, and over the last five centuries has spread \
@@ -40,7 +40,7 @@
flags = HAS_LIPS
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = FEET_CLAWS | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING
bodyflags = FEET_CLAWS | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_BODY_MARKINGS | HAS_HEAD_MARKINGS | HAS_SKIN_COLOR | HAS_ALT_HEADS | TAIL_WAGGING
dietflags = DIET_CARN
cold_level_1 = 280 //Default 260 - Lower is better
@@ -112,13 +112,11 @@
flags = HAS_LIPS | CAN_BE_FAT
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = FEET_PADDED | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING | HAS_FUR
bodyflags = FEET_PADDED | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_HEAD_MARKINGS | HAS_BODY_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING | HAS_FUR
dietflags = DIET_OMNI
reagent_tag = PROCESS_ORG
flesh_color = "#AFA59E"
base_color = "#333333"
//Default styles for created mobs.
default_headacc = "Tajaran Ears"
base_color = "#424242"
butt_sprite = "tajaran"
has_organ = list(
@@ -164,11 +162,11 @@
flags = HAS_LIPS
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = FEET_PADDED | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING | HAS_FUR
bodyflags = FEET_PADDED | HAS_TAIL | TAIL_WAGGING | TAIL_OVERLAPPED | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR | HAS_FUR
dietflags = DIET_OMNI
reagent_tag = PROCESS_ORG
flesh_color = "#966464"
base_color = "#B43214"
base_color = "#CF4D2F"
butt_sprite = "vulp"
has_organ = list(
@@ -212,7 +210,7 @@
flags = HAS_LIPS
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = HAS_SKIN_COLOR
bodyflags = HAS_SKIN_COLOR | HAS_BODY_MARKINGS
dietflags = DIET_HERB
flesh_color = "#8CD7A3"
blood_color = "#1D2CBF"
@@ -287,7 +285,7 @@
flags = NO_SCAN | IS_WHITELISTED
clothing_flags = HAS_SOCKS
dietflags = DIET_OMNI
bodyflags = HAS_ICON_SKIN_TONE | HAS_TAIL | TAIL_WAGGING | TAIL_OVERLAPPED
bodyflags = HAS_ICON_SKIN_TONE | HAS_TAIL | TAIL_WAGGING | TAIL_OVERLAPPED | HAS_BODY_MARKINGS | HAS_TAIL_MARKINGS
blood_color = "#2299FC"
flesh_color = "#808D11"
@@ -705,6 +703,7 @@
flags = IS_WHITELISTED | HAS_LIPS | CAN_BE_FAT
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = HAS_BODY_MARKINGS
dietflags = DIET_HERB
reagent_tag = PROCESS_ORG
blood_color = "#A200FF"
@@ -855,7 +854,7 @@
flags = IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | NO_DNA | NO_POISON | RADIMMUNE | ALL_RPARTS
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = HAS_SKIN_COLOR | HAS_MARKINGS | HAS_HEAD_ACCESSORY
bodyflags = HAS_SKIN_COLOR | HAS_HEAD_MARKINGS | HAS_HEAD_ACCESSORY
dietflags = 0 //IPCs can't eat, so no diet
blood_color = "#1F181F"
flesh_color = "#AAAAAA"
@@ -946,7 +945,7 @@
flags = IS_WHITELISTED | HAS_LIPS
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT
bodyflags = FEET_CLAWS | HAS_SKIN_TONE
bodyflags = FEET_CLAWS | HAS_SKIN_TONE | HAS_BODY_MARKINGS
dietflags = DIET_OMNI
cold_level_1 = -1 //Default 260 - Lower is better
@@ -212,15 +212,15 @@ var/global/list/damage_icon_parts = list()
if(update_icons) update_icons()
//BASE MOB SPRITE
/mob/living/carbon/human/proc/update_body(var/update_icons=1)
/mob/living/carbon/human/proc/update_body(var/update_icons=1, var/rebuild_base=0)
var/husk_color_mod = rgb(96,88,80)
var/hulk_color_mod = rgb(48,224,40)
var/husk = (HUSK in src.mutations)
var/fat = (FAT in src.mutations)
var/hulk = (HULK in src.mutations)
var/skeleton = (SKELETON in src.mutations)
var/husk = (HUSK in mutations)
var/fat = (FAT in mutations)
var/hulk = (HULK in mutations)
var/skeleton = (SKELETON in mutations)
if(species && species.bodyflags & HAS_ICON_SKIN_TONE)
species.updatespeciescolor(src)
@@ -262,7 +262,7 @@ var/global/list/damage_icon_parts = list()
icon_key = "[icon_key][husk ? 1 : 0][fat ? 1 : 0][hulk ? 1 : 0][skeleton ? 1 : 0]"
var/icon/base_icon
if(human_icon_cache[icon_key])
if(human_icon_cache[icon_key] && !rebuild_base)
base_icon = human_icon_cache[icon_key]
else
//BEGIN CACHED ICON GENERATION.
@@ -309,7 +309,7 @@ var/global/list/damage_icon_parts = list()
//END CACHED ICON GENERATION.
stand_icon.Blend(base_icon,ICON_OVERLAY)
if(src.species.bodyflags & TAIL_OVERLAPPED) // If the user's species is flagged to have a tail that needs to be overlapped by limbs...
if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the user's species is flagged to have a tail that needs to be overlapped by limbs... (having a non-tail body accessory like the snake body will override this)
overlays_standing[LIMBS_LAYER] = image(stand_icon) // Diverts limbs to their own layer so they can overlay things (i.e. tails).
else
overlays_standing[LIMBS_LAYER] = null // So we don't get the old species' sprite splatted on top of the new one's
@@ -360,29 +360,32 @@ var/global/list/damage_icon_parts = list()
//MARKINGS OVERLAY
/mob/living/carbon/human/proc/update_markings(var/update_icons=1)
//Reset our markings
//Reset our markings.
overlays_standing[MARKINGS_LAYER] = null
//Base icon.
var/icon/markings_standing = new/icon('icons/mob/body_accessory.dmi',"accessory_none_s")
//Body markings.
var/obj/item/organ/external/chest/chest_organ = get_organ("chest")
if(!chest_organ || chest_organ.is_stump() || (chest_organ.status & ORGAN_DESTROYED) )
if(update_icons) update_icons()
return
//base icons
var/icon/markings_standing = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s")
if(m_style && m_style != "None")
var/datum/sprite_accessory/marking_style = marking_styles_list[m_style]
if(marking_style)
var/obj/item/organ/external/head/head_organ = get_organ("head")
if((!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED)) && marking_style.marking_location == "head")
return //If the head is destroyed and it is the organ the marking is located on, get us out of here. This prevents floating optical markings on decapitated IPCs, for example.
var/icon/markings_s = new/icon("icon" = marking_style.icon, "icon_state" = "[marking_style.icon_state]_s")
if(marking_style.do_colouration)
markings_s.Blend(rgb(r_markings, g_markings, b_markings), ICON_ADD)
markings_standing.Blend(markings_s, ICON_OVERLAY)
else
//warning("Invalid m_style for [species.name]: [m_style]")
if(chest_organ && !chest_organ.is_stump() && !(chest_organ.status & ORGAN_DESTROYED) && m_styles["body"])
var/body_marking = m_styles["body"]
var/datum/sprite_accessory/body_marking_style = marking_styles_list[body_marking]
if(body_marking_style && body_marking_style.species_allowed && (species.name in body_marking_style.species_allowed))
var/icon/b_marking_s = new/icon("icon" = body_marking_style.icon, "icon_state" = "[body_marking_style.icon_state]_s")
if(body_marking_style.do_colouration)
b_marking_s.Blend(m_colours["body"], ICON_ADD)
markings_standing.Blend(b_marking_s, ICON_OVERLAY)
//Head markings.
var/obj/item/organ/external/head/head_organ = get_organ("head")
if(head_organ && !head_organ.is_stump() && !(head_organ.status & ORGAN_DESTROYED) && m_styles["head"]) //If the head is destroyed, forget the head markings. This prevents floating optical markings on decapitated IPCs, for example.
var/head_marking = m_styles["head"]
var/datum/sprite_accessory/head_marking_style = marking_styles_list[head_marking]
if(head_marking_style && head_marking_style.species_allowed && (head_organ.species.name in head_marking_style.species_allowed))
var/icon/h_marking_s = new/icon("icon" = head_marking_style.icon, "icon_state" = "[head_marking_style.icon_state]_s")
if(head_marking_style.do_colouration)
h_marking_s.Blend(m_colours["head"], ICON_ADD)
markings_standing.Blend(h_marking_s, ICON_OVERLAY)
overlays_standing[MARKINGS_LAYER] = image(markings_standing)
@@ -399,7 +402,7 @@ var/global/list/damage_icon_parts = list()
return
//masks and helmets can obscure our head accessory
if( (head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR)))
if((head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR)))
if(update_icons) update_icons()
return
@@ -426,15 +429,15 @@ var/global/list/damage_icon_parts = list()
//HAIR OVERLAY
/mob/living/carbon/human/proc/update_hair(var/update_icons=1)
//Reset our hair
overlays_standing[HAIR_LAYER] = null
overlays_standing[HAIR_LAYER] = null
var/obj/item/organ/external/head/head_organ = get_organ("head")
if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED) )
if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED))
if(update_icons) update_icons()
return
//masks and helmets can obscure our hair, unless we're a synthetic
if( (head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR)))
if((head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR)))
if(update_icons) update_icons()
return
@@ -454,13 +457,19 @@ var/global/list/damage_icon_parts = list()
else if(hair_style.do_colouration)
hair_s.Blend(rgb(head_organ.r_hair, head_organ.g_hair, head_organ.b_hair), ICON_ADD)
if(hair_style.secondary_theme)
var/icon/hair_secondary_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_[hair_style.secondary_theme]_s")
if(!hair_style.no_sec_colour)
hair_secondary_s.Blend(rgb(head_organ.r_hair_sec, head_organ.g_hair_sec, head_organ.b_hair_sec), ICON_ADD)
hair_s.Blend(hair_secondary_s, ICON_OVERLAY)
hair_standing = hair_s //hair_standing.Blend(hair_s, ICON_OVERLAY)
//Having it this way preserves animations. Useful for IPC screens.
else
//warning("Invalid h_style for [species.name]: [h_style]")
//hair_standing.Blend(debrained_s, ICON_OVERLAY)//how does i overlay for fish?
overlays_standing[HAIR_LAYER] = image(hair_standing)
overlays_standing[HAIR_LAYER] = image(hair_standing)
if(update_icons) update_icons()
@@ -468,15 +477,15 @@ var/global/list/damage_icon_parts = list()
//FACIAL HAIR OVERLAY
/mob/living/carbon/human/proc/update_fhair(var/update_icons=1)
//Reset our facial hair
overlays_standing[FHAIR_LAYER] = null
overlays_standing[FHAIR_LAYER] = null
var/obj/item/organ/external/head/head_organ = get_organ("head")
if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED) )
if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED))
if(update_icons) update_icons()
return
//masks and helmets can obscure our facial hair, unless we're a synthetic
if( (head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR)))
if((head && (head.flags & BLOCKHAIR)) || (wear_mask && (wear_mask.flags & BLOCKHAIR)))
if(update_icons) update_icons()
return
@@ -492,11 +501,18 @@ var/global/list/damage_icon_parts = list()
facial_s.Blend(rgb(r_skin, g_skin, b_skin, 160), ICON_AND)
else if(facial_hair_style.do_colouration)
facial_s.Blend(rgb(head_organ.r_facial, head_organ.g_facial, head_organ.b_facial), ICON_ADD)
if(facial_hair_style.secondary_theme)
var/icon/facial_secondary_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_[facial_hair_style.secondary_theme]_s")
if(!facial_hair_style.no_sec_colour)
facial_secondary_s.Blend(rgb(head_organ.r_facial_sec, head_organ.g_facial_sec, head_organ.b_facial_sec), ICON_ADD)
facial_s.Blend(facial_secondary_s, ICON_OVERLAY)
face_standing.Blend(facial_s, ICON_OVERLAY)
else
//warning("Invalid f_style for [species.name]: [f_style]")
overlays_standing[FHAIR_LAYER] = image(face_standing)
overlays_standing[FHAIR_LAYER] = image(face_standing)
if(update_icons) update_icons()
@@ -536,7 +552,7 @@ var/global/list/damage_icon_parts = list()
/mob/living/carbon/human/proc/update_mutantrace(var/update_icons=1)
//BS12 EDIT
var/skel = (SKELETON in src.mutations)
var/skel = (SKELETON in mutations)
if(skel)
skeleton = 'icons/mob/human_races/r_skeleton.dmi'
else
@@ -562,7 +578,7 @@ var/global/list/damage_icon_parts = list()
..()
if(notransform) return
update_mutations(0)
update_body(0)
update_body(0, 1) //Update the body and force limb icon regeneration.
update_hair(0)
update_head_accessory(0)
update_fhair(0)
@@ -997,13 +1013,21 @@ var/global/list/damage_icon_parts = list()
if(inv)
inv.update_icon()
if(wear_mask && (istype(wear_mask, /obj/item/clothing/mask) || istype(wear_mask, /obj/item/clothing/accessory)))
var/obj/item/organ/external/head/head_organ = get_organ("head")
var/datum/sprite_accessory/alt_heads/alternate_head
if(head_organ.alt_head && head_organ.alt_head != "None")
alternate_head = alt_heads_list[head_organ.alt_head]
var/image/standing
var/icon/mask_icon = new(wear_mask.icon)
if(wear_mask.icon_override)
standing = image("icon" = wear_mask.icon_override, "icon_state" = "[wear_mask.icon_state]")
mask_icon = new(wear_mask.icon_override)
standing = image("icon" = wear_mask.icon_override, "icon_state" = "[wear_mask.icon_state][(alternate_head && ("[wear_mask.icon_state]_[alternate_head.suffix]" in mask_icon.IconStates())) ? "_[alternate_head.suffix]" : ""]")
else if(wear_mask.sprite_sheets && wear_mask.sprite_sheets[species.name])
standing = image("icon" = wear_mask.sprite_sheets[species.name], "icon_state" = "[wear_mask.icon_state]")
mask_icon = new(wear_mask.sprite_sheets[species.name])
standing = image("icon" = wear_mask.sprite_sheets[species.name], "icon_state" = "[wear_mask.icon_state][(alternate_head && ("[wear_mask.icon_state]_[alternate_head.suffix]" in mask_icon.IconStates())) ? "_[alternate_head.suffix]" : ""]")
else
standing = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state]")
standing = image("icon" = 'icons/mob/mask.dmi', "icon_state" = "[wear_mask.icon_state][(alternate_head && ("[wear_mask.icon_state]_[alternate_head.suffix]" in mask_icon.IconStates())) ? "_[alternate_head.suffix]" : ""]")
if(!istype(wear_mask, /obj/item/clothing/mask/cigarette) && wear_mask.blood_DNA)
var/image/bloodsies = image("icon" = species.blood_mask, "icon_state" = "maskblood")
@@ -1053,7 +1077,7 @@ var/global/list/damage_icon_parts = list()
clear_alert("legcuffed")
if(legcuffed)
overlays_standing[LEGCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff1")
throw_alert("legcuffed", /obj/screen/alert/restrained/legcuffed, new_master = src.legcuffed)
throw_alert("legcuffed", /obj/screen/alert/restrained/legcuffed, new_master = legcuffed)
if(m_intent != "walk")
m_intent = "walk"
if(hud_used && hud_used.move_intent)
@@ -1121,71 +1145,66 @@ var/global/list/damage_icon_parts = list()
/mob/living/carbon/human/proc/update_tail_layer(var/update_icons=1)
overlays_standing[TAIL_UNDERLIMBS_LAYER] = null // SEW direction icons, overlayed by LIMBS_LAYER.
overlays_standing[TAIL_LAYER] = null // This will be one of two things:
// If the species' tail is overlapped by limbs, this will be only the N direction icon so tails can still appear on the outside of uniforms and such.
// Otherwise, since the user's tail isn't overlapped by limbs, it will be a full icon with all directions.
overlays_standing[TAIL_LAYER] = null /* This will be one of two things:
If the species' tail is overlapped by limbs, this will be only the N direction icon so tails can still appear on the outside of uniforms and such.
Otherwise, since the user's tail isn't overlapped by limbs, it will be a full icon with all directions. */
var/icon/tail_marking_icon
var/datum/sprite_accessory/body_markings/tail/tail_marking_style
if(m_styles["tail"] != "None" && (species.bodyflags & HAS_TAIL_MARKINGS))
var/tail_marking = m_styles["tail"]
tail_marking_style = marking_styles_list[tail_marking]
tail_marking_icon = new/icon("icon" = tail_marking_style.icon, "icon_state" = "[tail_marking_style.icon_state]_s")
tail_marking_icon.Blend(m_colours["tail"], ICON_ADD)
if(body_accessory)
if(body_accessory.try_restrictions(src))
var/icon/accessory_s = new/icon("icon" = body_accessory.icon, "icon_state" = body_accessory.icon_state)
if(species.bodyflags & HAS_SKIN_COLOR)
accessory_s.Blend(rgb(r_skin, g_skin, b_skin), body_accessory.blend_mode)
if(species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs...
if(tail_marking_icon && (body_accessory.name in tail_marking_style.tails_allowed))
accessory_s.Blend(tail_marking_icon, ICON_OVERLAY)
if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this)
// Gives the underlimbs layer SEW direction icons since it's overlayed by limbs and just about everything else anyway.
var/icon/temp1 = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s")
if(species.name in body_accessory.allowed_species)
var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "[species.tail]_delay")
temp1 = temp
else
var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "vulptail_delay")
temp1 = temp
var/icon/under = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "accessory_none_s")
under.Insert(new/icon(accessory_s, dir=SOUTH), dir=SOUTH)
under.Insert(new/icon(accessory_s, dir=EAST), dir=EAST)
under.Insert(new/icon(accessory_s, dir=WEST), dir=WEST)
temp1.Insert(new/icon(accessory_s,dir=SOUTH),dir=SOUTH)
temp1.Insert(new/icon(accessory_s,dir=EAST),dir=EAST)
temp1.Insert(new/icon(accessory_s,dir=WEST),dir=WEST)
overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(temp1, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset)
overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(under, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset)
// Creates a blank icon, and copies accessory_s' north direction sprite into it
// before passing that to the tail layer that overlays uniforms and such.
var/icon/temp2 = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s")
if(species.name in body_accessory.allowed_species)
var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "[species.tail]_delay")
temp2 = temp
else
var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "vulptail_delay")
temp2 = temp
var/icon/over = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "accessory_none_s")
over.Insert(new/icon(accessory_s, dir=NORTH), dir=NORTH)
temp2.Insert(new/icon(accessory_s,dir=NORTH),dir=NORTH)
overlays_standing[TAIL_LAYER] = image(temp2, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset)
overlays_standing[TAIL_LAYER] = image(over, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset)
else // Otherwise, since the user's tail isn't overlapped by limbs, go ahead and use default icon generation.
overlays_standing[TAIL_LAYER] = image(accessory_s, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset)
overlays_standing[TAIL_LAYER] = image(accessory_s, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset)
else if(species.tail && species.bodyflags & HAS_TAIL) //no tailless tajaran
if(!wear_suit || !(wear_suit.flags_inv & HIDETAIL) && !istype(wear_suit, /obj/item/clothing/suit/space))
var/icon/tail_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_s")
if(species.bodyflags & HAS_SKIN_COLOR)
tail_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
if(species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs...
if(tail_marking_icon)
tail_s.Blend(tail_marking_icon, ICON_OVERLAY)
if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this)
// Gives the underlimbs layer SEW direction icons since it's overlayed by limbs and just about everything else anyway.
var/icon/temp1 = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_delay")
temp1.Insert(new/icon(tail_s,dir=SOUTH),dir=SOUTH)
temp1.Insert(new/icon(tail_s,dir=EAST),dir=EAST)
temp1.Insert(new/icon(tail_s,dir=WEST),dir=WEST)
var/icon/under = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "blank")
under.Insert(new/icon(tail_s, dir=SOUTH), dir=SOUTH)
under.Insert(new/icon(tail_s, dir=EAST), dir=EAST)
under.Insert(new/icon(tail_s, dir=WEST), dir=WEST)
overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(temp1)
overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(under)
// Creates a blank icon, and copies accessory_s' north direction sprite into it
// before passing that to the tail layer that overlays uniforms and such.
var/icon/temp2 = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_delay")
temp2.Insert(new/icon(tail_s,dir=NORTH),dir=NORTH)
// Creates a blank icon, and copies accessory_s' north direction sprite into it before passing that to the tail layer that overlays uniforms and such.
var/icon/over = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "blank")
over.Insert(new/icon(tail_s, dir=NORTH), dir=NORTH)
overlays_standing[TAIL_LAYER] = image(temp2)
overlays_standing[TAIL_LAYER] = image(over)
else // Otherwise, since the user's tail isn't overlapped by limbs, go ahead and use default icon generation.
overlays_standing[TAIL_LAYER] = image(tail_s)
overlays_standing[TAIL_LAYER] = image(tail_s)
if(update_icons)
update_icons()
@@ -1193,70 +1212,67 @@ var/global/list/damage_icon_parts = list()
/mob/living/carbon/human/proc/start_tail_wagging(var/update_icons=1)
overlays_standing[TAIL_UNDERLIMBS_LAYER] = null // SEW direction icons, overlayed by LIMBS_LAYER.
overlays_standing[TAIL_LAYER] = null // This will be one of two things:
// If the species' tail is overlapped by limbs, this will be only the N direction icon so tails can still appear on the outside of uniforms and such.
// Otherwise, since the user's tail isn't overlapped by limbs, it will be a full icon with all directions.
overlays_standing[TAIL_LAYER] = null /* This will be one of two things:
If the species' tail is overlapped by limbs, this will be only the N direction icon so tails can still appear on the outside of uniforms and such.
Otherwise, since the user's tail isn't overlapped by limbs, it will be a full icon with all directions. */
var/icon/tail_marking_icon
var/datum/sprite_accessory/body_markings/tail/tail_marking_style
if(m_styles["tail"] != "None" && (species.bodyflags & HAS_TAIL_MARKINGS))
var/tail_marking = m_styles["tail"]
tail_marking_style = marking_styles_list[tail_marking]
tail_marking_icon = new/icon("icon" = tail_marking_style.icon, "icon_state" = "[tail_marking_style.icon_state]w_s")
tail_marking_icon.Blend(m_colours["tail"], ICON_ADD)
if(body_accessory)
var/icon/accessory_s = new/icon("icon" = body_accessory.get_animated_icon(), "icon_state" = body_accessory.get_animated_icon_state())
if(species.bodyflags & HAS_SKIN_COLOR)
accessory_s.Blend(rgb(r_skin, g_skin, b_skin), body_accessory.blend_mode)
if(species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs...
if(tail_marking_icon && (body_accessory.name in tail_marking_style.tails_allowed))
accessory_s.Blend(tail_marking_icon, ICON_OVERLAY)
if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this)
// Gives the underlimbs layer SEW direction icons since it's overlayed by limbs and just about everything else anyway.
var/icon/temp1 = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s")
if(body_accessory.allowed_species)
if(species.name in body_accessory.allowed_species)
var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "[species.tail]_delay")
temp1 = temp
else
var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "vulptail_delay")
temp1 = temp
var/icon/under = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "Vulpkanin_tail_delay")
if(body_accessory.allowed_species && (species.name in body_accessory.allowed_species))
under = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.name]_tail_delay")
under.Insert(new/icon(accessory_s, dir=SOUTH), dir=SOUTH)
under.Insert(new/icon(accessory_s, dir=EAST), dir=EAST)
under.Insert(new/icon(accessory_s, dir=WEST), dir=WEST)
temp1.Insert(accessory_s,dir=SOUTH)
temp1.Insert(accessory_s,dir=EAST)
temp1.Insert(accessory_s,dir=WEST)
overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(under, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset)
overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(temp1, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset)
// Creates a blank icon, and copies accessory_s' north direction sprite into it before passing that to the tail layer that overlays uniforms and such.
var/icon/over = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "Vulpkanin_tail_delay")
if(body_accessory.allowed_species && (species.name in body_accessory.allowed_species)) // If the user's species is in the list of allowed species for the currently selected body accessory, use the appropriate animation timing blank
over = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.name]_tail_delay")
over.Insert(new/icon(accessory_s, dir=NORTH), dir=NORTH)
// Creates a blank icon, and copies accessory_s' north direction sprite into it
// before passing that to the tail layer that overlays uniforms and such.
var/icon/temp2 = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s")
if(species.name in body_accessory.allowed_species) // If the user's species is in the list of allowed species for the currently selected body accessory, use the appropriate animation timing blank
var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "[species.tail]_delay")
temp2 = temp
else // Else if the user's species is not in the list of allowed species for the currently selected body accessory, this point must have been reached by admin-override. Use vulpkanin timings as default.
var/icon/temp = new/icon("icon" = 'icons/mob/body_accessory.dmi', "icon_state" = "vulptail_delay")
temp2 = temp
temp2.Insert(accessory_s,dir=NORTH)
overlays_standing[TAIL_LAYER] = image(temp2, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset)
overlays_standing[TAIL_LAYER] = image(over, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset)
else // Otherwise, since the user's tail isn't overlapped by limbs, go ahead and use default icon generation.
overlays_standing[TAIL_LAYER] = image(accessory_s, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset)
overlays_standing[TAIL_LAYER] = image(accessory_s, "pixel_x" = body_accessory.pixel_x_offset, "pixel_y" = body_accessory.pixel_y_offset)
else if(species.tail && species.bodyflags & HAS_TAIL)
var/icon/tailw_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]w_s")
if(species.bodyflags & HAS_SKIN_COLOR)
tailw_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
if(species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs...
if(tail_marking_icon)
tailw_s.Blend(tail_marking_icon, ICON_OVERLAY)
if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this)
// Gives the underlimbs layer SEW direction icons since it's overlayed by limbs and just about everything else anyway.
var/icon/temp1 = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_delay")
temp1.Insert(tailw_s,dir=SOUTH)
temp1.Insert(tailw_s,dir=EAST)
temp1.Insert(tailw_s,dir=WEST)
var/icon/under = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.name]_tail_delay")
under.Insert(new/icon(tailw_s, dir=SOUTH), dir=SOUTH)
under.Insert(new/icon(tailw_s, dir=EAST), dir=EAST)
under.Insert(new/icon(tailw_s, dir=WEST), dir=WEST)
overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(temp1)
overlays_standing[TAIL_UNDERLIMBS_LAYER] = image(under)
// Creates a blank icon, and copies accessory_s' north direction sprite into it
// before passing that to the tail layer that overlays uniforms and such.
var/icon/temp2 = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.tail]_delay")
temp2.Insert(tailw_s,dir=NORTH)
// Creates a blank icon, and copies accessory_s' north direction sprite into it before passing that to the tail layer that overlays uniforms and such.
var/icon/over = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[species.name]_tail_delay")
over.Insert(new/icon(tailw_s, dir=NORTH), dir=NORTH)
overlays_standing[TAIL_LAYER] = image(temp2)
overlays_standing[TAIL_LAYER] = image(over)
else // Otherwise, since the user's tail isn't overlapped by limbs, go ahead and use default icon generation.
overlays_standing[TAIL_LAYER] = image(tailw_s)
overlays_standing[TAIL_LAYER] = image(tailw_s)
if(update_icons)
update_icons()
@@ -1282,17 +1298,17 @@ var/global/list/damage_icon_parts = list()
if(wear_suit.icon_override)
var/icon_path = "[wear_suit.icon_override]"
icon_path = "[copytext(icon_path, 1, findtext(icon_path, "/suit.dmi"))]/collar.dmi" //If this file doesn't exist, the end result is that COLLAR_LAYER will be unchanged (empty).
var/icon/icon_file
if(fexists(icon_path)) //Just ensuring the nonexistance of a file with the above path won't cause a runtime.
icon_file = new(icon_path)
standing = image("icon" = icon_file, "icon_state" = "[wear_suit.icon_state]")
var/icon/icon_file = new(icon_path)
if(wear_suit.icon_state in icon_file.IconStates())
standing = image("icon" = icon_file, "icon_state" = "[wear_suit.icon_state]")
else if(wear_suit.sprite_sheets && wear_suit.sprite_sheets[species.name])
var/icon_path = "[wear_suit.sprite_sheets[species.name]]"
icon_path = "[copytext(icon_path, 1, findtext(icon_path, "/suit.dmi"))]/collar.dmi" //If this file doesn't exist, the end result is that COLLAR_LAYER will be unchanged (empty).
var/icon/icon_file
if(fexists(icon_path)) //Just ensuring the nonexistance of a file with the above path won't cause a runtime.
icon_file = new(icon_path)
standing = image("icon" = icon_file, "icon_state" = "[wear_suit.icon_state]")
var/icon/icon_file = new(icon_path)
if(wear_suit.icon_state in icon_file.IconStates())
standing = image("icon" = icon_file, "icon_state" = "[wear_suit.icon_state]")
else
if(wear_suit.icon_state in C.IconStates())
standing = image("icon" = C, "icon_state" = "[wear_suit.icon_state]")
+8 -5
View File
@@ -80,9 +80,6 @@ proc/get_radio_key_from_channel(var/channel)
verb = "stammers"
speech_problem_flag = 1
if(COMIC in mutations)
message = "<span class='sans'>[message]</span>"
if(!IsVocal())
message = ""
speech_problem_flag = 1
@@ -283,8 +280,14 @@ proc/get_radio_key_from_channel(var/channel)
/mob/living/proc/GetVoice()
return name
/mob/living/emote(var/act, var/type, var/message) //emote code is terrible, this is so that anything that isn't
if(stat) return 0 //already snowflaked to shit can call the parent and handle emoting sanely
/mob/living/emote(var/act, var/type, var/message) //emote code is terrible, this is so that anything that isn't already snowflaked to shit can call the parent and handle emoting sanely
if(client)
if(client.prefs.muted & MUTE_IC)
to_chat(src, "<span class='danger'>You cannot speak in IC (Muted).</span>")
return
if(stat)
return 0
if(..(act, type, message))
return 1
-3
View File
@@ -1,15 +1,12 @@
/mob/living/silicon/Login()
sleeping = 0
if(mind && ticker && ticker.mode)
ticker.mode.remove_traitor(mind)
ticker.mode.remove_traitor_mind(mind)
ticker.mode.remove_revolutionary(mind, 1)
ticker.mode.remove_cultist(mind, 1)
ticker.mode.remove_wizard(mind)
ticker.mode.remove_changeling(mind)
ticker.mode.remove_vampire(mind)
ticker.mode.remove_thrall(mind, 0)
ticker.mode.remove_operative(mind)
ticker.mode.remove_shadowling(mind)
ticker.mode.remove_abductor(mind)
..()
@@ -547,8 +547,7 @@
else
var/datum/gas_mixture/env = T.return_air()
data["reading"] = 1
var/pres = env.return_pressure() * 10
data["pressure"] = "[round(pres/10)].[pres%10]"
data["pressure"] = env.return_pressure()
data["temperature"] = round(env.temperature)
data["temperatureC"] = round(env.temperature-T0C)
@@ -1,4 +1,7 @@
/mob/living/silicon/robot/drone/say(var/message, var/datum/language/speaking = null)
/mob/living/silicon/robot/drone/say(var/message, var/datum/language/speaking = null)
if(copytext(message, 1, 2) == "*")
return emote(copytext(message, 2))
if(!speaking)
speaking = parse_language(message)
if(!speaking)
+12 -26
View File
@@ -730,18 +730,18 @@ var/list/robot_verbs_default = list(
else
to_chat(user, "Unable to locate a radio.")
else if(istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
else if(istype(W, /obj/item/weapon/card/id) || istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
if(emagged)//still allow them to open the cover
to_chat(user, "The interface seems slightly damaged")
to_chat(user, "The interface seems slightly damaged.")
if(opened)
to_chat(user, "You must close the cover to swipe an ID card.")
else
if(allowed(usr))
if(allowed(W))
locked = !locked
to_chat(user, "You [ locked ? "lock" : "unlock"] [src]'s interface.")
update_icons()
else
to_chat(user, "\red Access denied.")
to_chat(user, "<span class='warning'>Access denied.</span>")
else if(istype(W, /obj/item/borg/upgrade/))
var/obj/item/borg/upgrade/U = W
@@ -957,29 +957,15 @@ var/list/robot_verbs_default = list(
user.visible_message("<span class='notice'>[user] pets [src]!</span>", \
"<span class='notice'>You pet [src]!</span>")
/mob/living/silicon/robot/proc/allowed(mob/M)
//check if it doesn't require any access at all
if(check_access(null))
/mob/living/silicon/robot/proc/allowed(obj/item/I)
var/obj/dummy = new /obj(null) // Create a dummy object to check access on as to avoid having to snowflake check_access on every mob
dummy.req_access = req_access
if(dummy.check_access(I))
qdel(dummy)
return 1
if(istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
//if they are holding or wearing a card that has access, that works
if(check_access(H.get_active_hand()) || check_access(H.wear_id))
return 1
return 0
/mob/living/silicon/robot/proc/check_access(obj/item/weapon/card/id/I)
if(!istype(req_access, /list)) //something's very wrong
return 1
var/list/L = req_access
if(!L.len) //no requirements
return 1
if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access
return 0
for(var/req in req_access)
if(req in I.access) //have one of the required accesses
return 1
qdel(dummy)
return 0
/mob/living/silicon/robot/update_icons()
@@ -154,7 +154,7 @@
if(istype(noms, /turf/simulated/wall))
W = noms
nomDelay *= 2
if(W.walltype == "rwall")
if(istype(W, /turf/simulated/wall/r_wall))
nomDelay *= 2
else
return
+2 -1
View File
@@ -517,7 +517,8 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HARM)
var/length
var/pos
for(var/datum/objective/objective in all_objectives)
if(objective.target != mind) continue
if(!mind || objective.target != mind)
continue
length = lentext(oldname)
pos = findtextEx(objective.explanation_text, oldname)
objective.explanation_text = copytext(objective.explanation_text, 1, pos)+newname+copytext(objective.explanation_text, pos+length)
+115 -40
View File
@@ -1,6 +1,10 @@
/datum/preferences
//The mob should have a gender you want before running this proc. Will run fine without H
/datum/preferences/proc/random_character(gender_override)
var/datum/robolimb/robohead
if(species == "Machine")
var/head_model = "[!rlimb_data["head"] ? "Morpheus Cyberkinetics" : rlimb_data["head"]]"
robohead = all_robolimbs[head_model]
if(gender_override)
gender = gender_override
else
@@ -8,18 +12,41 @@
underwear = random_underwear(gender, species)
undershirt = random_undershirt(gender, species)
socks = random_socks(gender, species)
if(species in list("Human", "Drask"))
s_tone = random_skin_tone()
h_style = random_hair_style(gender, species)
f_style = random_facial_hair_style(gender, species)
if(species == "Human" || species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Machine" || species == "Vulpkanin")
if(species == "Vulpkanin")
body_accessory = random_body_accessory(species)
if(body_accessory == "None") //Required to prevent a bug where the information/icons in the character preferences screen wouldn't update despite the data being changed.
body_accessory = null
if(species in list("Human", "Drask", "Vox"))
s_tone = random_skin_tone(species)
h_style = random_hair_style(gender, species, robohead)
f_style = random_facial_hair_style(gender, species, robohead)
if(species in list("Human", "Unathi", "Tajaran", "Skrell", "Machine", "Vulpkanin", "Vox"))
randomize_hair_color("hair")
randomize_hair_color("facial")
randomize_eyes_color()
if(species == "Unathi" || species == "Tajaran" || species == "Skrell" || species == "Vulpkanin")
randomize_hair_color("facial")
if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine"))
ha_style = random_head_accessory(species)
var/list/colours = randomize_skin_color(1)
r_headacc = colours["red"]
g_headacc = colours["green"]
b_headacc = colours["blue"]
if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin"))
m_styles["head"] = random_marking_style("head", species, robohead, null, alt_head)
var/list/colours = randomize_skin_color(1)
m_colours["head"] = rgb(colours["red"], colours["green"], colours["blue"])
if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask"))
m_styles["body"] = random_marking_style("body", species)
var/list/colours = randomize_skin_color(1)
m_colours["body"] = rgb(colours["red"], colours["green"], colours["blue"])
if(species in list("Vox", "Vulpkanin")) //Species with tail markings.
m_styles["tail"] = random_marking_style("tail", species, null, body_accessory)
var/list/colours = randomize_skin_color(1)
m_colours["tail"] = rgb(colours["red"], colours["green"], colours["blue"])
if(species != "Machine")
randomize_eyes_color()
if(species in list("Unathi", "Tajaran", "Skrell", "Vulpkanin"))
randomize_skin_color()
backbag = 2
age = rand(AGE_MIN,AGE_MAX)
age = rand(AGE_MIN, AGE_MAX)
/datum/preferences/proc/randomize_hair_color(var/target = "hair")
@@ -130,7 +157,7 @@
g_eyes = green
b_eyes = blue
/datum/preferences/proc/randomize_skin_color()
/datum/preferences/proc/randomize_skin_color(var/pass_to_list)
var/red
var/green
var/blue
@@ -174,9 +201,17 @@
green = max(min(green + rand (-25, 25), 255), 0)
blue = max(min(blue + rand (-25, 25), 255), 0)
r_skin = red
g_skin = green
b_skin = blue
if(pass_to_list)
var/list/colours = list(
"red" = red,
"blue" = blue,
"green" = green
)
return colours
else
r_skin = red
g_skin = green
b_skin = blue
/datum/preferences/proc/blend_backpack(var/icon/clothes_s,var/backbag,var/satchel,var/backpack="backpack")
switch(backbag)
@@ -222,26 +257,12 @@
fat="_fat"
preview_icon = new /icon(icobase, "torso_[g][fat]")
preview_icon.Blend(new /icon(icobase, "groin_[g]"), ICON_OVERLAY)
preview_icon.Blend(new /icon(icobase, "head_[g]"), ICON_OVERLAY)
//Tail
if(current_species && (current_species.bodyflags & HAS_TAIL))
var/tail_icon
var/tail_icon_state
if(body_accessory)
var/datum/body_accessory/accessory = body_accessory_by_name[body_accessory]
tail_icon = accessory.icon
tail_icon_state = accessory.icon_state
else
tail_icon = "icons/effects/species.dmi"
if(coloured_tail)
tail_icon_state = "[coloured_tail]_s"
else
tail_icon_state = "[current_species.tail]_s"
var/icon/temp = new /icon("icon" = tail_icon, "icon_state" = tail_icon_state)
preview_icon.Blend(temp, ICON_OVERLAY)
var/head = "head"
if(alt_head && current_species.bodyflags & HAS_ALT_HEADS)
var/datum/sprite_accessory/alt_heads/H = alt_heads_list[alt_head]
if(H.icon_state)
head = H.icon_state
preview_icon.Blend(new /icon(icobase, "[head]_[g]"), ICON_OVERLAY)
for(var/name in list("chest", "groin", "head", "r_arm", "r_hand", "r_leg", "r_foot", "l_leg", "l_foot", "l_arm", "l_hand"))
if(organ_data[name] == "amputated") continue
@@ -266,13 +287,53 @@
else
preview_icon.Blend(rgb(-s_tone, -s_tone, -s_tone), ICON_SUBTRACT)
//Body Markings
if(current_species && (current_species.bodyflags & HAS_MARKINGS))
var/datum/sprite_accessory/marking_style = marking_styles_list[m_style]
if(marking_style && marking_style.species_allowed)
var/icon/markings_s = new/icon("icon" = marking_style.icon, "icon_state" = "[marking_style.icon_state]_s")
markings_s.Blend(rgb(r_markings, g_markings, b_markings), ICON_ADD)
preview_icon.Blend(markings_s, ICON_OVERLAY)
//Tail
if(current_species && (current_species.bodyflags & HAS_TAIL))
var/tail_icon
var/tail_icon_state
if(body_accessory)
var/datum/body_accessory/accessory = body_accessory_by_name[body_accessory]
tail_icon = accessory.icon
tail_icon_state = accessory.icon_state
else
tail_icon = "icons/effects/species.dmi"
if(coloured_tail)
tail_icon_state = "[coloured_tail]_s"
else
tail_icon_state = "[current_species.tail]_s"
var/icon/temp = new /icon("icon" = tail_icon, "icon_state" = tail_icon_state)
if(current_species && (current_species.bodyflags & HAS_SKIN_COLOR))
temp.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
if(current_species && (current_species.bodyflags & HAS_TAIL_MARKINGS))
var/tail_marking = m_styles["tail"]
var/datum/sprite_accessory/tail_marking_style = marking_styles_list[tail_marking]
if(tail_marking_style && tail_marking_style.species_allowed)
var/icon/t_marking_s = new/icon("icon" = tail_marking_style.icon, "icon_state" = "[tail_marking_style.icon_state]_s")
t_marking_s.Blend(m_colours["tail"], ICON_ADD)
temp.Blend(t_marking_s, ICON_OVERLAY)
preview_icon.Blend(temp, ICON_OVERLAY)
//Markings
if(current_species && ((current_species.bodyflags & HAS_HEAD_MARKINGS) || (current_species.bodyflags & HAS_BODY_MARKINGS)))
if(current_species.bodyflags & HAS_BODY_MARKINGS) //Body markings.
var/body_marking = m_styles["body"]
var/datum/sprite_accessory/body_marking_style = marking_styles_list[body_marking]
if(body_marking_style && body_marking_style.species_allowed)
var/icon/b_marking_s = new/icon("icon" = body_marking_style.icon, "icon_state" = "[body_marking_style.icon_state]_s")
b_marking_s.Blend(m_colours["body"], ICON_ADD)
preview_icon.Blend(b_marking_s, ICON_OVERLAY)
if(current_species.bodyflags & HAS_HEAD_MARKINGS) //Head markings.
var/head_marking = m_styles["head"]
var/datum/sprite_accessory/head_marking_style = marking_styles_list[head_marking]
if(head_marking_style && head_marking_style.species_allowed)
var/icon/h_marking_s = new/icon("icon" = head_marking_style.icon, "icon_state" = "[head_marking_style.icon_state]_s")
h_marking_s.Blend(m_colours["head"], ICON_ADD)
preview_icon.Blend(h_marking_s, ICON_OVERLAY)
var/icon/face_s = new/icon("icon" = 'icons/mob/human_face.dmi', "icon_state" = "bald_s")
@@ -289,6 +350,13 @@
hair_s.Blend(rgb(r_skin, g_skin, b_skin, 160), ICON_ADD)
else
hair_s.Blend(rgb(r_hair, g_hair, b_hair), ICON_ADD)
if(hair_style.secondary_theme)
var/icon/hair_secondary_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_[hair_style.secondary_theme]_s")
if(!hair_style.no_sec_colour)
hair_secondary_s.Blend(rgb(r_hair_sec, g_hair_sec, b_hair_sec), ICON_ADD)
hair_s.Blend(hair_secondary_s, ICON_OVERLAY)
face_s.Blend(hair_s, ICON_OVERLAY)
//Head Accessory
@@ -306,6 +374,13 @@
facial_s.Blend(rgb(r_skin, g_skin, b_skin, 160), ICON_ADD)
else
facial_s.Blend(rgb(r_facial, g_facial, b_facial), ICON_ADD)
if(facial_hair_style.secondary_theme)
var/icon/facial_secondary_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_[facial_hair_style.secondary_theme]_s")
if(!facial_hair_style.no_sec_colour)
facial_secondary_s.Blend(rgb(r_facial_sec, g_facial_sec, b_facial_sec), ICON_ADD)
facial_s.Blend(facial_secondary_s, ICON_OVERLAY)
face_s.Blend(facial_s, ICON_OVERLAY)
var/icon/underwear_s = null
File diff suppressed because it is too large Load Diff