mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Merge branch 'dev' of https://github.com/Zuhayr/Baystation12 into dev
This commit is contained in:
@@ -166,6 +166,7 @@
|
|||||||
H.f_style = facial_hair_styles_list[beard]
|
H.f_style = facial_hair_styles_list[beard]
|
||||||
|
|
||||||
H.force_update_limbs()
|
H.force_update_limbs()
|
||||||
|
H.update_eyes()
|
||||||
H.update_hair()
|
H.update_hair()
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -235,9 +235,9 @@
|
|||||||
H.r_eyes = hex2num(getblock(structure,8,3))
|
H.r_eyes = hex2num(getblock(structure,8,3))
|
||||||
H.g_eyes = hex2num(getblock(structure,9,3))
|
H.g_eyes = hex2num(getblock(structure,9,3))
|
||||||
H.b_eyes = hex2num(getblock(structure,10,3))
|
H.b_eyes = hex2num(getblock(structure,10,3))
|
||||||
|
|
||||||
if(H.internal_organs_by_name["eyes"])
|
if(H.internal_organs_by_name["eyes"])
|
||||||
var/obj/item/organ/eyes/eyes = H.internal_organs_by_name["eyes"]
|
H.update_eyes()
|
||||||
eyes.eye_colour = list(H.r_eyes,H.g_eyes,H.b_eyes)
|
|
||||||
|
|
||||||
if (isblockon(getblock(structure, 11,3),11 , 1))
|
if (isblockon(getblock(structure, 11,3),11 , 1))
|
||||||
H.gender = FEMALE
|
H.gender = FEMALE
|
||||||
|
|||||||
@@ -21,7 +21,10 @@
|
|||||||
set_species()
|
set_species()
|
||||||
|
|
||||||
if(species)
|
if(species)
|
||||||
name = species.get_random_name(gender)
|
real_name = species.get_random_name(gender)
|
||||||
|
name = real_name
|
||||||
|
if(mind)
|
||||||
|
mind.name = real_name
|
||||||
|
|
||||||
var/datum/reagents/R = new/datum/reagents(1000)
|
var/datum/reagents/R = new/datum/reagents(1000)
|
||||||
reagents = R
|
reagents = R
|
||||||
@@ -926,23 +929,12 @@
|
|||||||
germ_level += n
|
germ_level += n
|
||||||
|
|
||||||
/mob/living/carbon/human/revive()
|
/mob/living/carbon/human/revive()
|
||||||
for (var/obj/item/organ/external/O in organs)
|
|
||||||
O.status &= ~ORGAN_BROKEN
|
|
||||||
O.status &= ~ORGAN_BLEEDING
|
|
||||||
O.status &= ~ORGAN_SPLINTED
|
|
||||||
O.status &= ~ORGAN_CUT_AWAY
|
|
||||||
O.status &= ~ORGAN_ATTACHABLE
|
|
||||||
O.wounds.Cut()
|
|
||||||
O.heal_damage(1000,1000,1,1)
|
|
||||||
|
|
||||||
var/obj/item/organ/external/head/h = organs_by_name["head"]
|
|
||||||
h.disfigured = 0
|
|
||||||
|
|
||||||
if(species && !(species.flags & NO_BLOOD))
|
if(species && !(species.flags & NO_BLOOD))
|
||||||
vessel.add_reagent("blood",560-vessel.total_volume)
|
vessel.add_reagent("blood",560-vessel.total_volume)
|
||||||
fixblood()
|
fixblood()
|
||||||
|
|
||||||
// Fix up any missing organs.
|
// Fix up all organs.
|
||||||
// This will ignore any prosthetics in the prefs currently.
|
// This will ignore any prosthetics in the prefs currently.
|
||||||
species.create_organs(src)
|
species.create_organs(src)
|
||||||
|
|
||||||
@@ -954,11 +946,9 @@
|
|||||||
H.brainmob.mind.transfer_to(src)
|
H.brainmob.mind.transfer_to(src)
|
||||||
del(H)
|
del(H)
|
||||||
|
|
||||||
for(var/obj/item/organ/I in internal_organs)
|
|
||||||
I.damage = 0
|
|
||||||
|
|
||||||
for (var/datum/disease/virus in viruses)
|
for (var/datum/disease/virus in viruses)
|
||||||
virus.cure()
|
virus.cure()
|
||||||
|
|
||||||
for (var/ID in virus2)
|
for (var/ID in virus2)
|
||||||
var/datum/disease2/disease/V = virus2[ID]
|
var/datum/disease2/disease/V = virus2[ID]
|
||||||
V.cure(src)
|
V.cure(src)
|
||||||
|
|||||||
@@ -100,9 +100,9 @@
|
|||||||
var/hit_zone = H.zone_sel.selecting
|
var/hit_zone = H.zone_sel.selecting
|
||||||
var/obj/item/organ/external/affecting = get_organ(hit_zone)
|
var/obj/item/organ/external/affecting = get_organ(hit_zone)
|
||||||
|
|
||||||
if(!affecting || affecting.status & ORGAN_DESTROYED)
|
if(!affecting || affecting.is_stump() || (affecting.status & ORGAN_DESTROYED))
|
||||||
M << "<span class='danger'>They are missing that limb!</span>"
|
M << "<span class='danger'>They are missing that limb!</span>"
|
||||||
return
|
return 1
|
||||||
|
|
||||||
switch(src.a_intent)
|
switch(src.a_intent)
|
||||||
if(I_HELP)
|
if(I_HELP)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/mob/living/carbon/human/proc/update_eyes()
|
/mob/living/carbon/human/proc/update_eyes()
|
||||||
if(internal_organs_by_name["eyes"])
|
var/obj/item/organ/eyes/eyes = internal_organs_by_name["eyes"]
|
||||||
var/obj/item/organ/eyes/eyes = internal_organs_by_name["eyes"]
|
if(eyes)
|
||||||
eyes.eye_colour = list(r_eyes,g_eyes,b_eyes)
|
eyes.update_colour()
|
||||||
regenerate_icons()
|
regenerate_icons()
|
||||||
|
|
||||||
/mob/living/carbon/var/list/internal_organs = list()
|
/mob/living/carbon/var/list/internal_organs = list()
|
||||||
@@ -104,8 +104,12 @@
|
|||||||
|
|
||||||
if(E.is_broken())
|
if(E.is_broken())
|
||||||
if(E.body_part == HAND_LEFT)
|
if(E.body_part == HAND_LEFT)
|
||||||
|
if(!l_hand)
|
||||||
|
continue
|
||||||
drop_from_inventory(l_hand)
|
drop_from_inventory(l_hand)
|
||||||
else
|
else
|
||||||
|
if(!r_hand)
|
||||||
|
continue
|
||||||
drop_from_inventory(r_hand)
|
drop_from_inventory(r_hand)
|
||||||
|
|
||||||
var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ")
|
var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ")
|
||||||
|
|||||||
@@ -168,6 +168,10 @@
|
|||||||
|
|
||||||
/datum/species/proc/get_random_name(var/gender)
|
/datum/species/proc/get_random_name(var/gender)
|
||||||
var/datum/language/species_language = all_languages[language]
|
var/datum/language/species_language = all_languages[language]
|
||||||
|
if(!species_language)
|
||||||
|
species_language = all_languages[default_language]
|
||||||
|
if(!species_language)
|
||||||
|
return "unknown"
|
||||||
return species_language.get_random_name(gender)
|
return species_language.get_random_name(gender)
|
||||||
|
|
||||||
/datum/species/proc/create_organs(var/mob/living/carbon/human/H) //Handles creation of mob organs.
|
/datum/species/proc/create_organs(var/mob/living/carbon/human/H) //Handles creation of mob organs.
|
||||||
|
|||||||
@@ -45,11 +45,8 @@
|
|||||||
if(prob(1))
|
if(prob(1))
|
||||||
H.emote(pick("scratch","jump","roll","tail"))
|
H.emote(pick("scratch","jump","roll","tail"))
|
||||||
|
|
||||||
/datum/species/monkey/handle_post_spawn(var/mob/living/carbon/human/H)
|
/datum/species/monkey/get_random_name()
|
||||||
H.real_name = "[lowertext(name)] ([rand(100,999)])"
|
return "[lowertext(name)] ([rand(100,999)])"
|
||||||
H.name = H.real_name
|
|
||||||
|
|
||||||
..()
|
|
||||||
|
|
||||||
/datum/species/monkey/tajaran
|
/datum/species/monkey/tajaran
|
||||||
name = "Farwa"
|
name = "Farwa"
|
||||||
|
|||||||
@@ -61,6 +61,9 @@
|
|||||||
var/weeds_heal_rate = 1 // Health regen on weeds.
|
var/weeds_heal_rate = 1 // Health regen on weeds.
|
||||||
var/weeds_plasma_rate = 5 // Plasma regen on weeds.
|
var/weeds_plasma_rate = 5 // Plasma regen on weeds.
|
||||||
|
|
||||||
|
/datum/species/xenos/get_random_name()
|
||||||
|
return "alien [caste_name] ([alien_number])"
|
||||||
|
|
||||||
/datum/species/xenos/can_understand(var/mob/other)
|
/datum/species/xenos/can_understand(var/mob/other)
|
||||||
|
|
||||||
if(istype(other,/mob/living/carbon/alien/larva))
|
if(istype(other,/mob/living/carbon/alien/larva))
|
||||||
|
|||||||
@@ -237,24 +237,30 @@ var/global/list/damage_icon_parts = list()
|
|||||||
|
|
||||||
//CACHING: Generate an index key from visible bodyparts.
|
//CACHING: Generate an index key from visible bodyparts.
|
||||||
//0 = destroyed, 1 = normal, 2 = robotic, 3 = necrotic.
|
//0 = destroyed, 1 = normal, 2 = robotic, 3 = necrotic.
|
||||||
|
|
||||||
//Create a new, blank icon for our mob to use.
|
//Create a new, blank icon for our mob to use.
|
||||||
if(stand_icon)
|
if(stand_icon)
|
||||||
del(stand_icon)
|
del(stand_icon)
|
||||||
stand_icon = new(species.icon_template ? species.icon_template : 'icons/mob/human.dmi',"blank")
|
stand_icon = new(species.icon_template ? species.icon_template : 'icons/mob/human.dmi',"blank")
|
||||||
|
var/icon_key = "[species.race_key][g][s_tone][r_skin][g_skin][b_skin]"
|
||||||
|
var/obj/item/organ/eyes/eyes = internal_organs_by_name["eyes"]
|
||||||
|
|
||||||
var/icon_key = "[species.race_key][g][s_tone]"
|
if(eyes)
|
||||||
for(var/obj/item/organ/external/part in organs)
|
icon_key += "[rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3])]"
|
||||||
if(part.is_stump() || (part.status & ORGAN_DESTROYED))
|
else
|
||||||
icon_key = "[icon_key]0"
|
icon_key += "#000000"
|
||||||
|
|
||||||
|
for(var/organ_tag in species.has_limbs)
|
||||||
|
var/obj/item/organ/external/part = organs_by_name[organ_tag]
|
||||||
|
if(isnull(part) || part.is_stump() || (part.status & ORGAN_DESTROYED))
|
||||||
|
icon_key += "0"
|
||||||
else if(part.status & ORGAN_ROBOT)
|
else if(part.status & ORGAN_ROBOT)
|
||||||
icon_key = "[icon_key]2[part.model ? "-[part.model]": ""]"
|
icon_key += "2[part.model ? "-[part.model]": ""]"
|
||||||
else if(part.status & ORGAN_DEAD)
|
else if(part.status & ORGAN_DEAD)
|
||||||
icon_key = "[icon_key]3"
|
icon_key += "3"
|
||||||
else
|
else
|
||||||
icon_key = "[icon_key]1"
|
icon_key += "1"
|
||||||
|
|
||||||
icon_key = "[icon_key][husk ? 1 : 0][fat ? 1 : 0][hulk ? 1 : 0][skeleton ? 1 : 0][s_tone]"
|
icon_key = "[icon_key][husk ? 1 : 0][fat ? 1 : 0][hulk ? 1 : 0][skeleton ? 1 : 0]"
|
||||||
|
|
||||||
var/icon/base_icon
|
var/icon/base_icon
|
||||||
if(human_icon_cache[icon_key])
|
if(human_icon_cache[icon_key])
|
||||||
@@ -784,11 +790,11 @@ var/global/list/damage_icon_parts = list()
|
|||||||
/mob/living/carbon/human/update_inv_r_hand(var/update_icons=1)
|
/mob/living/carbon/human/update_inv_r_hand(var/update_icons=1)
|
||||||
if(r_hand)
|
if(r_hand)
|
||||||
r_hand.screen_loc = ui_rhand //TODO
|
r_hand.screen_loc = ui_rhand //TODO
|
||||||
|
|
||||||
var/t_icon = INV_R_HAND_DEF_ICON
|
var/t_icon = INV_R_HAND_DEF_ICON
|
||||||
if(r_hand.item_icons && (icon_r_hand in r_hand.item_icons))
|
if(r_hand.item_icons && (icon_r_hand in r_hand.item_icons))
|
||||||
t_icon = r_hand.item_icons[icon_r_hand]
|
t_icon = r_hand.item_icons[icon_r_hand]
|
||||||
|
|
||||||
var/t_state = r_hand.item_state //useful for clothing that changes icon_state but retains the same sprite on the mob when held in hand
|
var/t_state = r_hand.item_state //useful for clothing that changes icon_state but retains the same sprite on the mob when held in hand
|
||||||
if(!t_state) t_state = r_hand.icon_state
|
if(!t_state) t_state = r_hand.icon_state
|
||||||
if(r_hand.icon_override)
|
if(r_hand.icon_override)
|
||||||
@@ -800,18 +806,18 @@ var/global/list/damage_icon_parts = list()
|
|||||||
if (handcuffed) drop_r_hand()
|
if (handcuffed) drop_r_hand()
|
||||||
else
|
else
|
||||||
overlays_standing[R_HAND_LAYER] = null
|
overlays_standing[R_HAND_LAYER] = null
|
||||||
|
|
||||||
if(update_icons) update_icons()
|
if(update_icons) update_icons()
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/human/update_inv_l_hand(var/update_icons=1)
|
/mob/living/carbon/human/update_inv_l_hand(var/update_icons=1)
|
||||||
if(l_hand)
|
if(l_hand)
|
||||||
l_hand.screen_loc = ui_lhand //TODO
|
l_hand.screen_loc = ui_lhand //TODO
|
||||||
|
|
||||||
var/t_icon = INV_L_HAND_DEF_ICON
|
var/t_icon = INV_L_HAND_DEF_ICON
|
||||||
if(l_hand.item_icons && (icon_l_hand in l_hand.item_icons))
|
if(l_hand.item_icons && (icon_l_hand in l_hand.item_icons))
|
||||||
t_icon = l_hand.item_icons[icon_l_hand]
|
t_icon = l_hand.item_icons[icon_l_hand]
|
||||||
|
|
||||||
var/t_state = l_hand.item_state //useful for clothing that changes icon_state but retains the same sprite on the mob when held in hand
|
var/t_state = l_hand.item_state //useful for clothing that changes icon_state but retains the same sprite on the mob when held in hand
|
||||||
if(!t_state) t_state = l_hand.icon_state
|
if(!t_state) t_state = l_hand.icon_state
|
||||||
if(l_hand.icon_override)
|
if(l_hand.icon_override)
|
||||||
@@ -823,7 +829,7 @@ var/global/list/damage_icon_parts = list()
|
|||||||
if (handcuffed) drop_l_hand()
|
if (handcuffed) drop_l_hand()
|
||||||
else
|
else
|
||||||
overlays_standing[L_HAND_LAYER] = null
|
overlays_standing[L_HAND_LAYER] = null
|
||||||
|
|
||||||
if(update_icons) update_icons()
|
if(update_icons) update_icons()
|
||||||
|
|
||||||
/mob/living/carbon/human/proc/update_tail_showing(var/update_icons=1)
|
/mob/living/carbon/human/proc/update_tail_showing(var/update_icons=1)
|
||||||
|
|||||||
@@ -1,141 +0,0 @@
|
|||||||
//Monkey Overlays Indexes////////
|
|
||||||
#define M_MASK_LAYER 1
|
|
||||||
#define M_BACK_LAYER 2
|
|
||||||
#define M_HANDCUFF_LAYER 3
|
|
||||||
#define M_L_HAND_LAYER 4
|
|
||||||
#define M_R_HAND_LAYER 5
|
|
||||||
#define TARGETED_LAYER 6
|
|
||||||
#define M_FIRE_LAYER 6
|
|
||||||
#define M_TOTAL_LAYERS 7
|
|
||||||
/////////////////////////////////
|
|
||||||
|
|
||||||
/mob/living/carbon/monkey
|
|
||||||
var/list/overlays_lying[M_TOTAL_LAYERS]
|
|
||||||
var/list/overlays_standing[M_TOTAL_LAYERS]
|
|
||||||
|
|
||||||
/mob/living/carbon/monkey/regenerate_icons()
|
|
||||||
..()
|
|
||||||
update_inv_wear_mask(0)
|
|
||||||
update_inv_back(0)
|
|
||||||
update_inv_r_hand(0)
|
|
||||||
update_inv_l_hand(0)
|
|
||||||
update_inv_handcuffed(0)
|
|
||||||
update_fire(0)
|
|
||||||
update_icons()
|
|
||||||
//Hud Stuff
|
|
||||||
update_hud()
|
|
||||||
return
|
|
||||||
|
|
||||||
/mob/living/carbon/monkey/update_icons()
|
|
||||||
update_hud()
|
|
||||||
lying_prev = lying //so we don't update overlays for lying/standing unless our stance changes again
|
|
||||||
overlays.Cut()
|
|
||||||
for(var/image/I in overlays_standing)
|
|
||||||
overlays += I
|
|
||||||
|
|
||||||
if(lying)
|
|
||||||
var/matrix/M = matrix()
|
|
||||||
M.Turn(90)
|
|
||||||
M.Translate(1,-6)
|
|
||||||
src.transform = M
|
|
||||||
else
|
|
||||||
var/matrix/M = matrix()
|
|
||||||
src.transform = M
|
|
||||||
|
|
||||||
|
|
||||||
////////
|
|
||||||
/mob/living/carbon/monkey/update_inv_wear_mask(var/update_icons=1)
|
|
||||||
if( wear_mask && istype(wear_mask, /obj/item/clothing/mask) )
|
|
||||||
overlays_standing[M_MASK_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "[wear_mask.icon_state]")
|
|
||||||
wear_mask.screen_loc = ui_monkey_mask
|
|
||||||
else
|
|
||||||
overlays_standing[M_MASK_LAYER] = null
|
|
||||||
if(update_icons) update_icons()
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/monkey/update_inv_r_hand(var/update_icons=1)
|
|
||||||
if(r_hand)
|
|
||||||
var/t_icon = INV_R_HAND_DEF_ICON
|
|
||||||
if(r_hand.item_icons && (icon_r_hand in r_hand.item_icons))
|
|
||||||
t_icon = r_hand.item_icons[icon_r_hand]
|
|
||||||
|
|
||||||
var/t_state = r_hand.item_state
|
|
||||||
if(!t_state) t_state = r_hand.icon_state
|
|
||||||
|
|
||||||
overlays_standing[M_R_HAND_LAYER] = image("icon" = t_icon, "icon_state" = t_state)
|
|
||||||
r_hand.screen_loc = ui_rhand
|
|
||||||
if (handcuffed) drop_r_hand()
|
|
||||||
else
|
|
||||||
overlays_standing[M_R_HAND_LAYER] = null
|
|
||||||
|
|
||||||
if(update_icons) update_icons()
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/monkey/update_inv_l_hand(var/update_icons=1)
|
|
||||||
if(l_hand)
|
|
||||||
var/t_icon = INV_L_HAND_DEF_ICON
|
|
||||||
if(l_hand.item_icons && (icon_l_hand in l_hand.item_icons))
|
|
||||||
t_icon = l_hand.item_icons[icon_l_hand]
|
|
||||||
|
|
||||||
var/t_state = l_hand.item_state
|
|
||||||
if(!t_state) t_state = l_hand.icon_state
|
|
||||||
|
|
||||||
overlays_standing[M_L_HAND_LAYER] = image("icon" = t_icon, "icon_state" = t_state)
|
|
||||||
l_hand.screen_loc = ui_lhand
|
|
||||||
if (handcuffed) drop_l_hand()
|
|
||||||
else
|
|
||||||
overlays_standing[M_L_HAND_LAYER] = null
|
|
||||||
|
|
||||||
if(update_icons) update_icons()
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/monkey/update_inv_back(var/update_icons=1)
|
|
||||||
if(back)
|
|
||||||
overlays_standing[M_BACK_LAYER] = image("icon" = 'icons/mob/back.dmi', "icon_state" = "[back.icon_state]")
|
|
||||||
back.screen_loc = ui_monkey_back
|
|
||||||
else
|
|
||||||
overlays_standing[M_BACK_LAYER] = null
|
|
||||||
if(update_icons) update_icons()
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/monkey/update_inv_handcuffed(var/update_icons=1)
|
|
||||||
if(handcuffed)
|
|
||||||
drop_r_hand()
|
|
||||||
drop_l_hand()
|
|
||||||
stop_pulling()
|
|
||||||
overlays_standing[M_HANDCUFF_LAYER] = image("icon" = 'icons/mob/monkey.dmi', "icon_state" = "handcuff1")
|
|
||||||
else
|
|
||||||
overlays_standing[M_HANDCUFF_LAYER] = null
|
|
||||||
if(update_icons) update_icons()
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/monkey/update_hud()
|
|
||||||
if (client)
|
|
||||||
client.screen |= contents
|
|
||||||
|
|
||||||
//Call when target overlay should be added/removed
|
|
||||||
/mob/living/carbon/monkey/update_targeted(var/update_icons=1)
|
|
||||||
if (targeted_by && target_locked)
|
|
||||||
overlays_standing[TARGETED_LAYER] = target_locked
|
|
||||||
else if (!targeted_by && target_locked)
|
|
||||||
del(target_locked)
|
|
||||||
if (!targeted_by)
|
|
||||||
overlays_standing[TARGETED_LAYER] = null
|
|
||||||
if(update_icons) update_icons()
|
|
||||||
|
|
||||||
/mob/living/carbon/monkey/update_fire(var/update_icons=1)
|
|
||||||
if(on_fire)
|
|
||||||
overlays_standing[M_FIRE_LAYER] = image("icon"='icons/mob/OnFire.dmi', "icon_state"="Standing", "layer"= -M_FIRE_LAYER)
|
|
||||||
else
|
|
||||||
overlays_standing[M_FIRE_LAYER] = null
|
|
||||||
if(update_icons) update_icons()
|
|
||||||
//Monkey Overlays Indexes////////
|
|
||||||
#undef M_MASK_LAYER
|
|
||||||
#undef M_BACK_LAYER
|
|
||||||
#undef M_HANDCUFF_LAYER
|
|
||||||
#undef M_L_HAND_LAYER
|
|
||||||
#undef M_R_HAND_LAYER
|
|
||||||
#undef TARGETED_LAYER
|
|
||||||
#undef M_FIRE_LAYER
|
|
||||||
#undef M_TOTAL_LAYERS
|
|
||||||
|
|
||||||
@@ -474,6 +474,7 @@
|
|||||||
|
|
||||||
// Do the initial caching of the player's body icons.
|
// Do the initial caching of the player's body icons.
|
||||||
new_character.force_update_limbs()
|
new_character.force_update_limbs()
|
||||||
|
new_character.update_eyes()
|
||||||
new_character.regenerate_icons()
|
new_character.regenerate_icons()
|
||||||
|
|
||||||
new_character.key = key //Manually transfer the key to log them in
|
new_character.key = key //Manually transfer the key to log them in
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ var/list/organ_cache = list()
|
|||||||
/obj/item/organ
|
/obj/item/organ
|
||||||
name = "organ"
|
name = "organ"
|
||||||
icon = 'icons/obj/surgery.dmi'
|
icon = 'icons/obj/surgery.dmi'
|
||||||
|
var/dead_icon
|
||||||
var/mob/living/carbon/human/owner = null
|
var/mob/living/carbon/human/owner = null
|
||||||
var/status = 0
|
var/status = 0
|
||||||
var/vital //Lose a vital limb, die immediately.
|
var/vital //Lose a vital limb, die immediately.
|
||||||
@@ -50,11 +50,12 @@ var/list/organ_cache = list()
|
|||||||
holder.internal_organs |= src
|
holder.internal_organs |= src
|
||||||
|
|
||||||
/obj/item/organ/proc/die()
|
/obj/item/organ/proc/die()
|
||||||
name = "dead [initial(name)]"
|
if(status & ORGAN_ROBOT)
|
||||||
health = 0
|
return
|
||||||
|
damage = max_damage
|
||||||
processing_objects -= src
|
processing_objects -= src
|
||||||
//TODO: Grey out the icon state.
|
if(dead_icon)
|
||||||
//TODO: Inject an organ with peridaxon to make it alive again.
|
icon_state = dead_icon
|
||||||
|
|
||||||
/obj/item/organ/process()
|
/obj/item/organ/process()
|
||||||
|
|
||||||
@@ -75,10 +76,10 @@ var/list/organ_cache = list()
|
|||||||
if(B && prob(40))
|
if(B && prob(40))
|
||||||
reagents.remove_reagent("blood",0.1)
|
reagents.remove_reagent("blood",0.1)
|
||||||
blood_splatter(src,B,1)
|
blood_splatter(src,B,1)
|
||||||
|
damage += rand(1,3)
|
||||||
health -= rand(1,3)
|
if(damage >= max_damage)
|
||||||
if(health <= 0)
|
|
||||||
die()
|
die()
|
||||||
|
|
||||||
else if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
|
else if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
|
||||||
//** Handle antibiotics and curing infections
|
//** Handle antibiotics and curing infections
|
||||||
handle_antibiotics()
|
handle_antibiotics()
|
||||||
@@ -179,9 +180,10 @@ var/list/organ_cache = list()
|
|||||||
else
|
else
|
||||||
src.damage += amount
|
src.damage += amount
|
||||||
|
|
||||||
var/obj/item/organ/external/parent = owner.get_organ(parent_organ)
|
if(owner && parent_organ)
|
||||||
if (!silent)
|
var/obj/item/organ/external/parent = owner.get_organ(parent_organ)
|
||||||
owner.custom_pain("Something inside your [parent.name] hurts a lot.", 1)
|
if(parent && !silent)
|
||||||
|
owner.custom_pain("Something inside your [parent.name] hurts a lot.", 1)
|
||||||
|
|
||||||
/obj/item/organ/proc/robotize() //Being used to make robutt hearts, etc
|
/obj/item/organ/proc/robotize() //Being used to make robutt hearts, etc
|
||||||
robotic = 2
|
robotic = 2
|
||||||
@@ -241,7 +243,7 @@ var/list/organ_cache = list()
|
|||||||
var/obj/item/organ/external/affected = owner.get_organ(parent_organ)
|
var/obj/item/organ/external/affected = owner.get_organ(parent_organ)
|
||||||
if(affected) affected.internal_organs -= src
|
if(affected) affected.internal_organs -= src
|
||||||
|
|
||||||
loc = owner.loc
|
loc = get_turf(owner)
|
||||||
processing_objects |= src
|
processing_objects |= src
|
||||||
rejecting = null
|
rejecting = null
|
||||||
var/datum/reagent/blood/organ_blood = locate(/datum/reagent/blood) in reagents.reagent_list
|
var/datum/reagent/blood/organ_blood = locate(/datum/reagent/blood) in reagents.reagent_list
|
||||||
@@ -255,6 +257,8 @@ var/list/organ_cache = list()
|
|||||||
msg_admin_attack("[user.name] ([user.ckey]) removed a vital organ ([src]) from [owner.name] ([owner.ckey]) (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
msg_admin_attack("[user.name] ([user.ckey]) removed a vital organ ([src]) from [owner.name] ([owner.ckey]) (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||||
owner.death()
|
owner.death()
|
||||||
|
|
||||||
|
owner = null
|
||||||
|
|
||||||
/obj/item/organ/proc/replaced(var/mob/living/carbon/human/target,var/obj/item/organ/external/affected)
|
/obj/item/organ/proc/replaced(var/mob/living/carbon/human/target,var/obj/item/organ/external/affected)
|
||||||
|
|
||||||
if(!istype(target)) return
|
if(!istype(target)) return
|
||||||
@@ -271,13 +275,13 @@ var/list/organ_cache = list()
|
|||||||
transplant_data["blood_DNA"] = transplant_blood.data["blood_DNA"]
|
transplant_data["blood_DNA"] = transplant_blood.data["blood_DNA"]
|
||||||
|
|
||||||
owner = target
|
owner = target
|
||||||
|
loc = owner
|
||||||
processing_objects -= src
|
processing_objects -= src
|
||||||
target.internal_organs |= src
|
target.internal_organs |= src
|
||||||
affected.internal_organs |= src
|
affected.internal_organs |= src
|
||||||
target.internal_organs_by_name[organ_tag] = src
|
target.internal_organs_by_name[organ_tag] = src
|
||||||
status |= ORGAN_CUT_AWAY
|
if(robotic)
|
||||||
|
status |= ORGAN_ROBOT
|
||||||
del(src)
|
|
||||||
|
|
||||||
/obj/item/organ/eyes/replaced(var/mob/living/carbon/human/target)
|
/obj/item/organ/eyes/replaced(var/mob/living/carbon/human/target)
|
||||||
|
|
||||||
@@ -286,7 +290,7 @@ var/list/organ_cache = list()
|
|||||||
target.r_eyes = eye_colour[1]
|
target.r_eyes = eye_colour[1]
|
||||||
target.g_eyes = eye_colour[2]
|
target.g_eyes = eye_colour[2]
|
||||||
target.b_eyes = eye_colour[3]
|
target.b_eyes = eye_colour[3]
|
||||||
target.update_body()
|
target.update_eyes()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/item/organ/proc/bitten(mob/user)
|
/obj/item/organ/proc/bitten(mob/user)
|
||||||
@@ -298,7 +302,6 @@ var/list/organ_cache = list()
|
|||||||
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in reagents.reagent_list
|
var/datum/reagent/blood/B = locate(/datum/reagent/blood) in reagents.reagent_list
|
||||||
blood_splatter(src,B,1)
|
blood_splatter(src,B,1)
|
||||||
|
|
||||||
|
|
||||||
user.drop_from_inventory(src)
|
user.drop_from_inventory(src)
|
||||||
var/obj/item/weapon/reagent_containers/food/snacks/organ/O = new(get_turf(src))
|
var/obj/item/weapon/reagent_containers/food/snacks/organ/O = new(get_turf(src))
|
||||||
O.name = name
|
O.name = name
|
||||||
|
|||||||
@@ -110,6 +110,8 @@
|
|||||||
if(owner)
|
if(owner)
|
||||||
replaced(owner)
|
replaced(owner)
|
||||||
sync_colour_to_human(owner)
|
sync_colour_to_human(owner)
|
||||||
|
spawn(1)
|
||||||
|
get_icon()
|
||||||
|
|
||||||
/obj/item/organ/external/replaced(var/mob/living/carbon/human/target)
|
/obj/item/organ/external/replaced(var/mob/living/carbon/human/target)
|
||||||
owner = target
|
owner = target
|
||||||
@@ -243,10 +245,10 @@
|
|||||||
status &= ~ORGAN_BROKEN
|
status &= ~ORGAN_BROKEN
|
||||||
perma_injury = 0
|
perma_injury = 0
|
||||||
|
|
||||||
if((brute || burn) && children && children.len && (owner.species.flags & REGENERATES_LIMBS))
|
/*if((brute || burn) && children && children.len && (owner.species.flags & REGENERATES_LIMBS))
|
||||||
var/obj/item/organ/external/stump/S = locate() in children
|
var/obj/item/organ/external/stump/S = locate() in children
|
||||||
if(S)
|
if(S)
|
||||||
world << "Extra healing to go around ([brute+burn]) and [owner] needs a replacement limb."
|
world << "Extra healing to go around ([brute+burn]) and [owner] needs a replacement limb."*/
|
||||||
|
|
||||||
//Sync the organ's damage with its wounds
|
//Sync the organ's damage with its wounds
|
||||||
src.update_damages()
|
src.update_damages()
|
||||||
@@ -634,8 +636,9 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|||||||
"<span class='moderate'><b>Your [src.name] explodes in a shower of gore!</b></span>",\
|
"<span class='moderate'><b>Your [src.name] explodes in a shower of gore!</b></span>",\
|
||||||
"<span class='danger'>You hear the sickening splatter of gore.</span>")
|
"<span class='danger'>You hear the sickening splatter of gore.</span>")
|
||||||
|
|
||||||
src.removed(null, ignore_children)
|
var/mob/living/carbon/human/victim = owner //Keep a reference for post-removed().
|
||||||
owner.traumatic_shock += 60
|
removed(null, ignore_children)
|
||||||
|
victim.traumatic_shock += 60
|
||||||
|
|
||||||
wounds.Cut()
|
wounds.Cut()
|
||||||
if(parent)
|
if(parent)
|
||||||
@@ -649,22 +652,22 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|||||||
parent.wounds |= W
|
parent.wounds |= W
|
||||||
parent.update_damages()
|
parent.update_damages()
|
||||||
else
|
else
|
||||||
var/obj/item/organ/external/stump/stump = new (owner, 0, src)
|
var/obj/item/organ/external/stump/stump = new (victim, 0, src)
|
||||||
stump.wounds |= W
|
stump.wounds |= W
|
||||||
owner.organs |= stump
|
victim.organs |= stump
|
||||||
stump.update_damages()
|
stump.update_damages()
|
||||||
parent = null
|
parent = null
|
||||||
|
|
||||||
spawn(1)
|
spawn(1)
|
||||||
owner.update_body()
|
victim.updatehealth()
|
||||||
owner.updatehealth()
|
victim.UpdateDamageIcon()
|
||||||
owner.UpdateDamageIcon()
|
victim.regenerate_icons()
|
||||||
dir = 2
|
dir = 2
|
||||||
|
|
||||||
switch(disintegrate)
|
switch(disintegrate)
|
||||||
if(DROPLIMB_EDGE)
|
if(DROPLIMB_EDGE)
|
||||||
compile_icon()
|
compile_icon()
|
||||||
add_blood(owner)
|
add_blood(victim)
|
||||||
var/matrix/M = matrix()
|
var/matrix/M = matrix()
|
||||||
M.Turn(rand(180))
|
M.Turn(rand(180))
|
||||||
src.transform = M
|
src.transform = M
|
||||||
@@ -675,13 +678,13 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|||||||
dir = 2
|
dir = 2
|
||||||
return
|
return
|
||||||
if(DROPLIMB_BURN)
|
if(DROPLIMB_BURN)
|
||||||
new /obj/effect/decal/cleanable/ash(get_turf(owner))
|
new /obj/effect/decal/cleanable/ash(get_turf(victim))
|
||||||
if(DROPLIMB_BLUNT)
|
if(DROPLIMB_BLUNT)
|
||||||
var/obj/effect/decal/cleanable/blood/gibs/gore = new owner.species.single_gib_type(get_turf(owner))
|
var/obj/effect/decal/cleanable/blood/gibs/gore = new owner.species.single_gib_type(get_turf(victim))
|
||||||
if(owner.species.flesh_color)
|
if(victim.species.flesh_color)
|
||||||
gore.fleshcolor = owner.species.flesh_color
|
gore.fleshcolor = victim.species.flesh_color
|
||||||
if(owner.species.blood_color)
|
if(victim.species.blood_color)
|
||||||
gore.basecolor = owner.species.blood_color
|
gore.basecolor = victim.species.blood_color
|
||||||
gore.update_icon()
|
gore.update_icon()
|
||||||
gore.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
|
gore.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
|
||||||
|
|
||||||
@@ -699,25 +702,21 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|||||||
/obj/item/organ/external/proc/is_stump()
|
/obj/item/organ/external/proc/is_stump()
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
/obj/item/organ/external/replaced()
|
/obj/item/organ/external/proc/release_restraints(var/mob/living/carbon/human/holder)
|
||||||
get_icon()
|
if(!holder)
|
||||||
icon = mob_icon
|
holder = owner
|
||||||
return ..()
|
if(!holder)
|
||||||
|
return
|
||||||
/obj/item/organ/external/proc/release_restraints()
|
if (holder.handcuffed && body_part in list(ARM_LEFT, ARM_RIGHT, HAND_LEFT, HAND_RIGHT))
|
||||||
if (owner.handcuffed && body_part in list(ARM_LEFT, ARM_RIGHT, HAND_LEFT, HAND_RIGHT))
|
holder.visible_message(\
|
||||||
owner.visible_message(\
|
"\The [holder.handcuffed.name] falls off of [holder.name].",\
|
||||||
"\The [owner.handcuffed.name] falls off of [owner.name].",\
|
"\The [holder.handcuffed.name] falls off you.")
|
||||||
"\The [owner.handcuffed.name] falls off you.")
|
holder.drop_from_inventory(holder.handcuffed)
|
||||||
|
if (holder.legcuffed && body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT))
|
||||||
owner.drop_from_inventory(owner.handcuffed)
|
holder.visible_message(\
|
||||||
|
"\The [holder.legcuffed.name] falls off of [holder.name].",\
|
||||||
if (owner.legcuffed && body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT))
|
"\The [holder.legcuffed.name] falls off you.")
|
||||||
owner.visible_message(\
|
holder.drop_from_inventory(holder.legcuffed)
|
||||||
"\The [owner.legcuffed.name] falls off of [owner.name].",\
|
|
||||||
"\The [owner.legcuffed.name] falls off you.")
|
|
||||||
|
|
||||||
owner.drop_from_inventory(owner.legcuffed)
|
|
||||||
|
|
||||||
/obj/item/organ/external/proc/bandage()
|
/obj/item/organ/external/proc/bandage()
|
||||||
var/rval = 0
|
var/rval = 0
|
||||||
@@ -859,11 +858,15 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|||||||
|
|
||||||
/obj/item/organ/external/removed(var/mob/living/user, var/ignore_children)
|
/obj/item/organ/external/removed(var/mob/living/user, var/ignore_children)
|
||||||
|
|
||||||
|
if(!owner)
|
||||||
|
return
|
||||||
var/is_robotic = status & ORGAN_ROBOT
|
var/is_robotic = status & ORGAN_ROBOT
|
||||||
|
var/mob/living/carbon/human/victim = owner
|
||||||
|
|
||||||
..()
|
..()
|
||||||
|
|
||||||
status |= ORGAN_DESTROYED
|
status |= ORGAN_DESTROYED
|
||||||
owner.bad_external_organs -= src
|
victim.bad_external_organs -= src
|
||||||
|
|
||||||
for(var/implant in implants) //todo: check if this can be left alone
|
for(var/implant in implants) //todo: check if this can be left alone
|
||||||
del(implant)
|
del(implant)
|
||||||
@@ -880,19 +883,19 @@ Note that amputating the affected organ does in fact remove the infection from t
|
|||||||
organ.removed()
|
organ.removed()
|
||||||
organ.loc = src
|
organ.loc = src
|
||||||
|
|
||||||
release_restraints()
|
release_restraints(victim)
|
||||||
owner.organs -= src
|
victim.organs -= src
|
||||||
owner.organs_by_name[limb_name] = null // Remove from owner's vars.
|
victim.organs_by_name[limb_name] = null // Remove from owner's vars.
|
||||||
|
|
||||||
//Robotic limbs explode if sabotaged.
|
//Robotic limbs explode if sabotaged.
|
||||||
if(is_robotic && sabotaged)
|
if(is_robotic && sabotaged)
|
||||||
owner.visible_message(
|
victim.visible_message(
|
||||||
"<span class='danger'>\The [owner]'s [src.name] explodes violently!</span>",\
|
"<span class='danger'>\The [victim]'s [src.name] explodes violently!</span>",\
|
||||||
"<span class='danger'>Your [src.name] explodes!</span>",\
|
"<span class='danger'>Your [src.name] explodes!</span>",\
|
||||||
"<span class='danger'>You hear an explosion!</span>")
|
"<span class='danger'>You hear an explosion!</span>")
|
||||||
explosion(get_turf(owner),-1,-1,2,3)
|
explosion(get_turf(owner),-1,-1,2,3)
|
||||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||||
spark_system.set_up(5, 0, owner)
|
spark_system.set_up(5, 0, victim)
|
||||||
spark_system.attach(owner)
|
spark_system.attach(owner)
|
||||||
spark_system.start()
|
spark_system.start()
|
||||||
spawn(10)
|
spawn(10)
|
||||||
|
|||||||
@@ -5,13 +5,12 @@ var/global/list/limb_icon_cache = list()
|
|||||||
|
|
||||||
/obj/item/organ/external/proc/compile_icon()
|
/obj/item/organ/external/proc/compile_icon()
|
||||||
overlays.Cut()
|
overlays.Cut()
|
||||||
get_icon()
|
|
||||||
// This is a kludge, only one icon has more than one generation of children though.
|
// This is a kludge, only one icon has more than one generation of children though.
|
||||||
for(var/obj/item/organ/external/organ in contents)
|
for(var/obj/item/organ/external/organ in contents)
|
||||||
if(organ.children && organ.children.len)
|
if(organ.children && organ.children.len)
|
||||||
for(var/obj/item/organ/external/child in organ.children)
|
for(var/obj/item/organ/external/child in organ.children)
|
||||||
overlays += child.get_icon()
|
overlays += child.mob_icon
|
||||||
overlays += organ.get_icon()
|
overlays += organ.mob_icon
|
||||||
|
|
||||||
/obj/item/organ/external/proc/sync_colour_to_human(var/mob/living/carbon/human/human)
|
/obj/item/organ/external/proc/sync_colour_to_human(var/mob/living/carbon/human/human)
|
||||||
s_tone = null
|
s_tone = null
|
||||||
@@ -23,6 +22,49 @@ var/global/list/limb_icon_cache = list()
|
|||||||
if(human.species.flags & HAS_SKIN_COLOR)
|
if(human.species.flags & HAS_SKIN_COLOR)
|
||||||
s_col = list(human.r_skin, human.g_skin, human.b_skin)
|
s_col = list(human.r_skin, human.g_skin, human.b_skin)
|
||||||
|
|
||||||
|
/obj/item/organ/external/head/sync_colour_to_human(var/mob/living/carbon/human/human)
|
||||||
|
..()
|
||||||
|
var/obj/item/organ/eyes/eyes = owner.internal_organs_by_name["eyes"]
|
||||||
|
if(eyes) eyes.update_colour()
|
||||||
|
|
||||||
|
/obj/item/organ/external/head/removed()
|
||||||
|
get_icon()
|
||||||
|
..()
|
||||||
|
|
||||||
|
/obj/item/organ/external/head/get_icon()
|
||||||
|
|
||||||
|
..()
|
||||||
|
if(owner.species.has_organ["eyes"])
|
||||||
|
var/obj/item/organ/eyes/eyes = owner.internal_organs_by_name["eyes"]
|
||||||
|
if(owner.species.eyes)
|
||||||
|
var/icon/eyes_icon = new/icon('icons/mob/human_face.dmi', owner.species.eyes)
|
||||||
|
if(eyes)
|
||||||
|
eyes_icon.Blend(rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3]), ICON_ADD)
|
||||||
|
else
|
||||||
|
eyes_icon.Blend(rgb(128,0,0), ICON_ADD)
|
||||||
|
mob_icon.Blend(eyes_icon, ICON_OVERLAY)
|
||||||
|
|
||||||
|
if(owner.lip_style && (owner.species && (owner.species.flags & HAS_LIPS)))
|
||||||
|
mob_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s"), ICON_OVERLAY)
|
||||||
|
|
||||||
|
if(owner.f_style)
|
||||||
|
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[owner.f_style]
|
||||||
|
if(facial_hair_style && facial_hair_style.species_allowed && (owner.species.name in facial_hair_style.species_allowed))
|
||||||
|
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
|
||||||
|
if(facial_hair_style.do_colouration)
|
||||||
|
facial_s.Blend(rgb(owner.r_facial, owner.g_facial, owner.b_facial), ICON_ADD)
|
||||||
|
overlays |= facial_s
|
||||||
|
|
||||||
|
if(owner.h_style && !(owner.head && (owner.head.flags & BLOCKHEADHAIR)))
|
||||||
|
var/datum/sprite_accessory/hair_style = hair_styles_list[owner.h_style]
|
||||||
|
if(hair_style && (owner.species.name in hair_style.species_allowed))
|
||||||
|
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
|
||||||
|
if(hair_style.do_colouration)
|
||||||
|
hair_s.Blend(rgb(owner.r_hair, owner.g_hair, owner.b_hair), ICON_ADD)
|
||||||
|
overlays |= hair_s
|
||||||
|
|
||||||
|
return mob_icon
|
||||||
|
|
||||||
/obj/item/organ/external/proc/get_icon(var/skeletal)
|
/obj/item/organ/external/proc/get_icon(var/skeletal)
|
||||||
|
|
||||||
var/gender
|
var/gender
|
||||||
@@ -66,43 +108,6 @@ var/global/list/limb_icon_cache = list()
|
|||||||
|
|
||||||
return mob_icon
|
return mob_icon
|
||||||
|
|
||||||
/obj/item/organ/external/head/get_icon(var/skeletal)
|
|
||||||
|
|
||||||
if(skeletal || !owner)
|
|
||||||
return
|
|
||||||
|
|
||||||
..()
|
|
||||||
|
|
||||||
if(owner.species.has_organ["eyes"])
|
|
||||||
var/obj/item/organ/eyes/eyes = owner.internal_organs_by_name["eyes"]
|
|
||||||
if(eyes && owner.species.eyes)
|
|
||||||
var/icon/eyes_icon = new/icon('icons/mob/human_face.dmi', owner.species.eyes)
|
|
||||||
eyes_icon.Blend(rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3]), ICON_ADD)
|
|
||||||
mob_icon.Blend(eyes_icon, ICON_OVERLAY)
|
|
||||||
|
|
||||||
if(owner.lip_style && (owner.species && (owner.species.flags & HAS_LIPS)))
|
|
||||||
mob_icon.Blend(new/icon('icons/mob/human_face.dmi', "lips_[owner.lip_style]_s"), ICON_OVERLAY)
|
|
||||||
|
|
||||||
if(owner.f_style)
|
|
||||||
var/datum/sprite_accessory/facial_hair_style = facial_hair_styles_list[owner.f_style]
|
|
||||||
if(facial_hair_style)
|
|
||||||
var/icon/facial = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
|
|
||||||
if(facial_hair_style.do_colouration)
|
|
||||||
facial.Blend(rgb(owner.r_facial, owner.g_facial, owner.b_facial), ICON_ADD)
|
|
||||||
mob_icon.Blend(facial, ICON_OVERLAY)
|
|
||||||
|
|
||||||
if(owner.h_style && !(owner.head && (owner.head.flags & BLOCKHEADHAIR)))
|
|
||||||
var/datum/sprite_accessory/hair_style = hair_styles_list[owner.h_style]
|
|
||||||
if(hair_style)
|
|
||||||
var/icon/hair = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
|
|
||||||
if(hair_style.do_colouration)
|
|
||||||
hair.Blend(rgb(owner.r_hair, owner.g_hair, owner.b_hair), ICON_ADD)
|
|
||||||
|
|
||||||
mob_icon.Blend(hair, ICON_OVERLAY)
|
|
||||||
|
|
||||||
icon = mob_icon
|
|
||||||
return mob_icon
|
|
||||||
|
|
||||||
// new damage icon system
|
// new damage icon system
|
||||||
// adjusted to set damage_state to brute/burn code only (without r_name0 as before)
|
// adjusted to set damage_state to brute/burn code only (without r_name0 as before)
|
||||||
/obj/item/organ/external/update_icon()
|
/obj/item/organ/external/update_icon()
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
icon_state = "heart-on"
|
icon_state = "heart-on"
|
||||||
organ_tag = "heart"
|
organ_tag = "heart"
|
||||||
parent_organ = "chest"
|
parent_organ = "chest"
|
||||||
|
dead_icon = "heart-off"
|
||||||
|
|
||||||
/obj/item/organ/lungs
|
/obj/item/organ/lungs
|
||||||
name = "lungs"
|
name = "lungs"
|
||||||
@@ -69,6 +70,15 @@
|
|||||||
parent_organ = "head"
|
parent_organ = "head"
|
||||||
var/list/eye_colour = list(0,0,0)
|
var/list/eye_colour = list(0,0,0)
|
||||||
|
|
||||||
|
/obj/item/organ/eyes/proc/update_colour()
|
||||||
|
if(!owner)
|
||||||
|
return
|
||||||
|
eye_colour = list(
|
||||||
|
owner.r_eyes ? owner.r_eyes : 0,
|
||||||
|
owner.g_eyes ? owner.g_eyes : 0,
|
||||||
|
owner.b_eyes ? owner.b_eyes : 0
|
||||||
|
)
|
||||||
|
|
||||||
/obj/item/organ/eyes/process() //Eye damage replaces the old eye_stat var.
|
/obj/item/organ/eyes/process() //Eye damage replaces the old eye_stat var.
|
||||||
..()
|
..()
|
||||||
if(!owner)
|
if(!owner)
|
||||||
@@ -78,36 +88,6 @@
|
|||||||
if(is_broken())
|
if(is_broken())
|
||||||
owner.eye_blind = 20
|
owner.eye_blind = 20
|
||||||
|
|
||||||
/obj/item/organ/eyes/New()
|
|
||||||
..()
|
|
||||||
if(owner)
|
|
||||||
eye_colour = list(
|
|
||||||
owner.r_eyes ? owner.r_eyes : 0,
|
|
||||||
owner.g_eyes ? owner.g_eyes : 0,
|
|
||||||
owner.b_eyes ? owner.b_eyes : 0
|
|
||||||
)
|
|
||||||
|
|
||||||
/obj/item/organ/eyes/removed(var/mob/living/target,var/mob/living/user)
|
|
||||||
|
|
||||||
if(!eye_colour)
|
|
||||||
eye_colour = list(0,0,0)
|
|
||||||
|
|
||||||
..() //Make sure target is set so we can steal their eye colour for later.
|
|
||||||
var/mob/living/carbon/human/H = target
|
|
||||||
if(istype(H))
|
|
||||||
eye_colour = list(
|
|
||||||
H.r_eyes ? H.r_eyes : 0,
|
|
||||||
H.g_eyes ? H.g_eyes : 0,
|
|
||||||
H.b_eyes ? H.b_eyes : 0
|
|
||||||
)
|
|
||||||
|
|
||||||
// Leave bloody red pits behind!
|
|
||||||
H.r_eyes = 128
|
|
||||||
H.g_eyes = 0
|
|
||||||
H.b_eyes = 0
|
|
||||||
H.update_body()
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/organ/liver
|
/obj/item/organ/liver
|
||||||
name = "liver"
|
name = "liver"
|
||||||
icon_state = "liver"
|
icon_state = "liver"
|
||||||
@@ -178,14 +158,13 @@
|
|||||||
|
|
||||||
/obj/item/organ/appendix/removed()
|
/obj/item/organ/appendix/removed()
|
||||||
|
|
||||||
..()
|
if(owner)
|
||||||
|
var/inflamed = 0
|
||||||
var/inflamed = 0
|
for(var/datum/disease/appendicitis/appendicitis in owner.viruses)
|
||||||
for(var/datum/disease/appendicitis/appendicitis in owner.viruses)
|
inflamed = 1
|
||||||
inflamed = 1
|
appendicitis.cure()
|
||||||
appendicitis.cure()
|
owner.resistances += appendicitis
|
||||||
owner.resistances += appendicitis
|
if(inflamed)
|
||||||
|
icon_state = "appendixinflamed"
|
||||||
if(inflamed)
|
name = "inflamed appendix"
|
||||||
icon_state = "appendixinflamed"
|
..()
|
||||||
name = "inflamed appendix"
|
|
||||||
@@ -209,9 +209,9 @@
|
|||||||
|
|
||||||
/** WOUND DEFINITIONS **/
|
/** WOUND DEFINITIONS **/
|
||||||
|
|
||||||
//Note that the MINIMUM damage before a wound can be applied should correspond to
|
//Note that the MINIMUM damage before a wound can be applied should correspond to
|
||||||
//the damage amount for the stage with the same name as the wound.
|
//the damage amount for the stage with the same name as the wound.
|
||||||
//e.g. /datum/wound/cut/deep should only be applied for 15 damage and up,
|
//e.g. /datum/wound/cut/deep should only be applied for 15 damage and up,
|
||||||
//because in it's stages list, "deep cut" = 15.
|
//because in it's stages list, "deep cut" = 15.
|
||||||
/proc/get_wound_type(var/type = CUT, var/damage)
|
/proc/get_wound_type(var/type = CUT, var/damage)
|
||||||
switch(type)
|
switch(type)
|
||||||
@@ -323,4 +323,4 @@ datum/wound/cut/massive
|
|||||||
return 0 //cannot be merged
|
return 0 //cannot be merged
|
||||||
|
|
||||||
/datum/wound/lost_limb/small
|
/datum/wound/lost_limb/small
|
||||||
stages = list("ripped stump" = 40, "bloody stump" = 30, "clotted stump" = 15, "scarred stump" = 0)
|
stages = list("ripped hole" = 40, "bloody hole" = 30, "clotted hole" = 15, "scarred hole" = 0)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
//This is an uguu head restoration surgery TOTALLY not yoinked from chinsky's limb reattacher
|
//This is an uguu head restoration surgery TOTALLY not yoinked from chinsky's limb reattacher
|
||||||
/datum/surgery_step/attach_head/
|
/datum/surgery_step/attach_head/
|
||||||
|
priority = 3 // Must be higher than /datum/surgery_step/internal
|
||||||
allowed_tools = list(/obj/item/organ/external/head = 100)
|
allowed_tools = list(/obj/item/organ/external/head = 100)
|
||||||
can_infect = 0
|
can_infect = 0
|
||||||
|
|
||||||
@@ -7,20 +8,20 @@
|
|||||||
max_duration = 100
|
max_duration = 100
|
||||||
|
|
||||||
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
if(..())
|
var/obj/item/organ/external/head = target.get_organ(target_zone)
|
||||||
var/obj/item/organ/external/head = target.get_organ(target_zone)
|
return isnull(head) && target_zone == "head" && !isnull(target.species.has_limbs["head"])
|
||||||
return !head && target_zone == "head"
|
|
||||||
|
|
||||||
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
user.visible_message("[user] starts attaching [tool] to [target]'s reshaped neck.", \
|
user.visible_message("[user] starts attaching [tool] to [target]'s neck.", \
|
||||||
"You start attaching [tool] to [target]'s reshaped neck.")
|
"You start attaching [tool] to [target]'s neck.")
|
||||||
|
|
||||||
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||||
user.visible_message("\blue [user] has attached [target]'s head to the body.", \
|
user.visible_message("\blue [user] has attached [target]'s head to the body.", \
|
||||||
"\blue You have attached [target]'s head to the body.")
|
"\blue You have attached [target]'s head to the body.")
|
||||||
var/obj/item/organ/external/head = tool
|
var/obj/item/organ/external/head = tool
|
||||||
head.loc = target
|
user.drop_from_inventory(head)
|
||||||
head.replaced(target)
|
head.replaced(target)
|
||||||
|
head.loc = target
|
||||||
head.status = 0
|
head.status = 0
|
||||||
target.update_body()
|
target.update_body()
|
||||||
target.updatehealth()
|
target.updatehealth()
|
||||||
|
|||||||
@@ -228,7 +228,7 @@
|
|||||||
var/list/attached_organs = list()
|
var/list/attached_organs = list()
|
||||||
for(var/organ in target.internal_organs_by_name)
|
for(var/organ in target.internal_organs_by_name)
|
||||||
var/obj/item/organ/I = target.internal_organs_by_name[organ]
|
var/obj/item/organ/I = target.internal_organs_by_name[organ]
|
||||||
if(!I.status && I.parent_organ == target_zone)
|
if(I && !I.status && I.parent_organ == target_zone)
|
||||||
attached_organs |= organ
|
attached_organs |= organ
|
||||||
|
|
||||||
var/organ_to_remove = input(user, "Which organ do you want to prepare for removal?") as null|anything in attached_organs
|
var/organ_to_remove = input(user, "Which organ do you want to prepare for removal?") as null|anything in attached_organs
|
||||||
@@ -347,7 +347,7 @@
|
|||||||
return 0
|
return 0
|
||||||
else if(target.species.has_organ[O.organ_tag])
|
else if(target.species.has_organ[O.organ_tag])
|
||||||
|
|
||||||
if(O.is_damaged())
|
if(O.damage > (O.max_damage * 0.75))
|
||||||
user << "\red \The [O.organ_tag] [o_is] in no state to be transplanted."
|
user << "\red \The [O.organ_tag] [o_is] in no state to be transplanted."
|
||||||
return 2
|
return 2
|
||||||
|
|
||||||
@@ -410,7 +410,7 @@
|
|||||||
var/list/removable_organs = list()
|
var/list/removable_organs = list()
|
||||||
for(var/organ in target.internal_organs_by_name)
|
for(var/organ in target.internal_organs_by_name)
|
||||||
var/obj/item/organ/I = target.internal_organs_by_name[organ]
|
var/obj/item/organ/I = target.internal_organs_by_name[organ]
|
||||||
if(I.status & ORGAN_CUT_AWAY && I.parent_organ == target_zone)
|
if(I && I.status & ORGAN_CUT_AWAY && I.parent_organ == target_zone)
|
||||||
removable_organs |= organ
|
removable_organs |= organ
|
||||||
|
|
||||||
var/organ_to_replace = input(user, "Which organ do you want to reattach?") as null|anything in removable_organs
|
var/organ_to_replace = input(user, "Which organ do you want to reattach?") as null|anything in removable_organs
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
for(var/part_name in L.part)
|
for(var/part_name in L.part)
|
||||||
if(!isnull(target.get_organ(part_name)))
|
if(!isnull(target.get_organ(part_name)))
|
||||||
continue
|
continue
|
||||||
var/list/organ_data = target.species.has_limbs["[target_zone]"]
|
var/list/organ_data = target.species.has_limbs["[part_name]"]
|
||||||
if(!organ_data)
|
if(!organ_data)
|
||||||
continue
|
continue
|
||||||
var/new_limb_type = organ_data["path"]
|
var/new_limb_type = organ_data["path"]
|
||||||
|
|||||||
Reference in New Issue
Block a user