Merge pull request #4262 from KasparoVy/IPC-EXTRA-STUFF-REFACTOR

Refactor FBP Parts & Adds Prosthetic Brand Models & More Antennae & Continued....
This commit is contained in:
TheDZD
2016-04-26 19:15:19 -04:00
28 changed files with 369 additions and 96 deletions
+8 -8
View File
@@ -91,14 +91,15 @@
/obj/item/weapon/razor/attack(mob/living/carbon/M as mob, mob/user as mob)
if(ishuman(M))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/head/C = H.organs_by_name["head"]
var/datum/robolimb/robohead = all_robolimbs[C.model]
if(user.zone_sel.selecting == "mouth")
if(!get_location_accessible(H, "mouth"))
to_chat(user, "<span class='warning'>The mask is in the way.</span>")
return
if(H.species && H.species.flags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, but doesn't have one...
if(!H.client.prefs.rlimb_data["head"])
to_chat(user, "<span class='warning'>You find yourself disappointed at the appalling lack of facial hair.</span>")
return
if((H.species && H.species.flags & 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(H.f_style == "Shaved")
to_chat(user, "<span class='notice'>Already clean-shaven.</span>")
return
@@ -127,10 +128,9 @@
if(!get_location_accessible(H, "head"))
to_chat(user, "<span class='warning'>The headgear is in the way.</span>")
return
if(H.species && H.species.flags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, but doesn't have one...
if(!H.client.prefs.rlimb_data["head"])
to_chat(user, "<span class='warning'>You find yourself disappointed at the appalling lack of hair.</span>")
return
if((H.species && H.species.flags & 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(H.h_style == "Bald" || H.h_style == "Balding Hair" || H.h_style == "Skinhead")
to_chat(user, "<span class='notice'>There is not enough hair left to shave...</span>")
return
+25 -11
View File
@@ -30,17 +30,26 @@
//this is largely copypasted from there.
//handle facial hair (if necessary)
var/list/species_facial_hair = list()
var/obj/item/organ/external/head/C = H.organs_by_name["head"]
var/datum/robolimb/robohead = all_robolimbs[C.model]
if(H.gender == MALE || H.get_species() == "Vulpkanin")
if(H.species)
for(var/i in facial_hair_styles_list)
var/datum/sprite_accessory/facial_hair/tmp_facial = facial_hair_styles_list[i]
if(H.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(H.species.flags & 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(H.species.flags & ALL_RPARTS)
if(("head" in H.client.prefs.rlimb_data) && ("Human" in tmp_facial.species_allowed))
species_facial_hair += i
else
if(H.species.flags & 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
else //Otherwise, they won't be getting any hairstyles.
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s face worth cutting. How disappointing.</span>")
return
else
species_facial_hair = facial_hair_styles_list
@@ -51,14 +60,19 @@
for(var/i in hair_styles_list)
var/datum/sprite_accessory/hair/tmp_hair = hair_styles_list[i]
if(H.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((H.species.flags & ALL_RPARTS) && !("head" in H.client.prefs.rlimb_data))
return
if(H.species.flags & 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(H.species.flags & ALL_RPARTS)
if(("head" in H.client.prefs.rlimb_data) && ("Human" in tmp_hair.species_allowed))
species_facial_hair += i
else
if(H.species.flags & 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
else //Otherwise, they won't be getting any hairstyles.
to_chat(user, "<span class='warning'>You are unable to find anything on [H]'s head worth cutting. How disappointing.</span>")
return
else
species_hair = hair_styles_list
@@ -103,7 +117,7 @@
playsound(loc, "sound/items/Wirecutter.ogg", 50, 1, -1)
if(do_after(user, 50, target = H))
playsound(loc, "sound/weapons/bladeslice.ogg", 50, 1, -1)
user.visible_message("<span class='danger'>[user] abruptly stops cutting [M]'s hair and slices their throat!</span>", "<span class='danger'>You stop cutting [M]'s hair and slice their throat!</span>")
user.visible_message("<span class='danger'>[user] abruptly stops cutting [M]'s hair and slices their throat!</span>", "<span class='danger'>You stop cutting [M]'s hair and slice their throat!</span>") //Just a little off the top.
H.losebreath += 10 //30 Oxy damage over time
H.apply_damage(18, BRUTE, "head", sharp =1, edge =1, used_weapon = "scissors")
var/turf/location = get_turf(H)