mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 02:57:48 +01:00
Merge remote-tracking branch 'upstream/master' into IPC-buffs
This commit is contained in:
@@ -305,10 +305,14 @@
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "wire1"
|
||||
flags = NOBLUDGEON
|
||||
var/drawing_power = FALSE
|
||||
|
||||
/obj/item/apc_powercord/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
if(!istype(target, /obj/machinery/power/apc) || !ishuman(user) || !proximity_flag)
|
||||
return ..()
|
||||
if(drawing_power)
|
||||
to_chat(user, "<span class='warning'>You're already charging.</span>")
|
||||
return
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
var/obj/machinery/power/apc/A = target
|
||||
var/mob/living/carbon/human/H = user
|
||||
@@ -329,6 +333,7 @@
|
||||
|
||||
/obj/item/apc_powercord/proc/powerdraw_loop(obj/machinery/power/apc/A, mob/living/carbon/human/H)
|
||||
H.visible_message("<span class='notice'>[H] inserts a power connector into \the [A].</span>", "<span class='notice'>You begin to draw power from \the [A].</span>")
|
||||
drawing_power = TRUE
|
||||
while(do_after(H, 10, target = A))
|
||||
if(loc != H)
|
||||
to_chat(H, "<span class='warning'>You must keep your connector out while charging!</span>")
|
||||
@@ -350,6 +355,7 @@
|
||||
to_chat(H, "<span class='notice'>You are now fully charged.</span>")
|
||||
break
|
||||
H.visible_message("<span class='notice'>[H] unplugs from \the [A].</span>", "<span class='notice'>You unplug from \the [A].</span>")
|
||||
drawing_power = FALSE
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/telebaton
|
||||
name = "telebaton implant"
|
||||
|
||||
@@ -141,9 +141,11 @@
|
||||
/obj/item/organ/internal/cyberimp/brain/anti_stun/emp_act(severity)
|
||||
if(crit_fail || emp_proof)
|
||||
return
|
||||
crit_fail = 1
|
||||
spawn(90 / severity)
|
||||
crit_fail = 0
|
||||
crit_fail = TRUE
|
||||
addtimer(CALLBACK(src, .proc/reboot), 90 / severity)
|
||||
|
||||
/obj/item/organ/internal/cyberimp/brain/anti_stun/proc/reboot()
|
||||
crit_fail = FALSE
|
||||
|
||||
/obj/item/organ/internal/cyberimp/brain/clown_voice
|
||||
name = "Comical implant"
|
||||
@@ -230,11 +232,13 @@
|
||||
if(owner.stat == DEAD)
|
||||
return
|
||||
if(owner.nutrition <= hunger_threshold)
|
||||
synthesizing = 1
|
||||
synthesizing = TRUE
|
||||
to_chat(owner, "<span class='notice'>You feel less hungry...</span>")
|
||||
owner.adjust_nutrition(50)
|
||||
spawn(50)
|
||||
synthesizing = 0
|
||||
addtimer(CALLBACK(src, .proc/synth_cool), 50)
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/nutriment/proc/synth_cool()
|
||||
synthesizing = FALSE
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/nutriment/emp_act(severity)
|
||||
if(!owner || emp_proof)
|
||||
@@ -309,10 +313,15 @@
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if(H.stat != DEAD && prob(50 / severity))
|
||||
H.set_heartattack(TRUE)
|
||||
spawn(600 / severity)
|
||||
H.set_heartattack(FALSE)
|
||||
if(H.stat == CONSCIOUS)
|
||||
to_chat(H, "<span class='notice'>You feel your heart beating again!</span>")
|
||||
addtimer(CALLBACK(src, .proc/undo_heart_attack), 600 / severity)
|
||||
|
||||
/obj/item/organ/internal/cyberimp/chest/reviver/proc/undo_heart_attack()
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if(!istype(H))
|
||||
return
|
||||
H.set_heartattack(FALSE)
|
||||
if(H.stat == CONSCIOUS)
|
||||
to_chat(H, "<span class='notice'>You feel your heart beating again!</span>")
|
||||
|
||||
//BOX O' IMPLANTS
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
bleed_rate = max(bleed_rate - 0.5, temp_bleed)//if no wounds, other bleed effects naturally decreases
|
||||
|
||||
var/additional_bleed = round(Clamp((reagents.get_reagent_amount("heparin") / 10), 0, 2), 1) //Heparin worsens existing bleeding
|
||||
var/additional_bleed = round(clamp((reagents.get_reagent_amount("heparin") / 10), 0, 2), 1) //Heparin worsens existing bleeding
|
||||
|
||||
if(internal_bleeding_rate && !(status_flags & FAKEDEATH))
|
||||
bleed_internal(internal_bleeding_rate + additional_bleed)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
return
|
||||
var/mob/living/carbon/C = owner
|
||||
// genetic deafness prevents the body from using the ears, even if healthy
|
||||
if(C.disabilities & DEAF)
|
||||
if(DEAF in C.mutations)
|
||||
deaf = max(deaf, 1)
|
||||
else
|
||||
if(ishuman(C))
|
||||
@@ -35,9 +35,9 @@
|
||||
/obj/item/organ/internal/ears/proc/RestoreEars()
|
||||
deaf = 0
|
||||
ear_damage = 0
|
||||
|
||||
|
||||
var/mob/living/carbon/C = owner
|
||||
if(istype(C) && C.disabilities & DEAF)
|
||||
if(istype(C) && (DEAF in C.mutations))
|
||||
deaf = 1
|
||||
|
||||
/obj/item/organ/internal/ears/proc/AdjustEarDamage(ddmg, ddeaf)
|
||||
@@ -66,3 +66,15 @@
|
||||
if(ears)
|
||||
ears.MinimumDeafTicks(value)
|
||||
|
||||
/obj/item/organ/internal/ears/cybernetic
|
||||
name = "cybernetic ears"
|
||||
icon_state = "ears-c"
|
||||
desc = "a basic cybernetic designed to mimic the operation of ears."
|
||||
origin_tech = "biotech=4"
|
||||
status = ORGAN_ROBOT
|
||||
|
||||
/obj/item/organ/internal/ears/cybernetic/emp_act(severity)
|
||||
if(emp_proof)
|
||||
return
|
||||
..()
|
||||
AdjustEarDamage(30, 120)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var/list/colourmatrix = null
|
||||
var/list/colourblind_matrix = MATRIX_GREYSCALE //Special colourblindness parameters. By default, it's black-and-white.
|
||||
var/list/replace_colours = LIST_GREYSCALE_REPLACE
|
||||
var/dependent_disabilities = null //Gets set by eye-dependent disabilities such as colourblindness so the eyes can transfer the disability during transplantation.
|
||||
var/dependent_disabilities = list() //Gets set by eye-dependent disabilities such as colourblindness so the eyes can transfer the disability during transplantation.
|
||||
var/weld_proof = null //If set, the eyes will not take damage during welding. eg. IPC optical sensors do not take damage when they weld things while all other eyes will.
|
||||
|
||||
var/vision_flags = 0
|
||||
@@ -30,7 +30,7 @@
|
||||
return eyes_icon
|
||||
|
||||
/obj/item/organ/internal/eyes/proc/get_colourmatrix() //Returns a special colour matrix if the eyes are organic and the mob is colourblind, otherwise it uses the current one.
|
||||
if(!is_robotic() && owner.disabilities & COLOURBLIND)
|
||||
if(!is_robotic() && (COLOURBLIND in owner.mutations))
|
||||
return colourblind_matrix
|
||||
else
|
||||
return colourmatrix
|
||||
@@ -44,16 +44,16 @@
|
||||
if(istype(M) && eye_colour)
|
||||
M.update_body() //Apply our eye colour to the target.
|
||||
|
||||
if(!(M.disabilities & COLOURBLIND) && (dependent_disabilities & COLOURBLIND)) //If the eyes are colourblind and we're not, carry over the gene.
|
||||
dependent_disabilities &= ~COLOURBLIND
|
||||
if(!(COLOURBLIND in M.mutations) && (COLOURBLIND in dependent_disabilities)) //If the eyes are colourblind and we're not, carry over the gene.
|
||||
dependent_disabilities -= COLOURBLIND
|
||||
M.dna.SetSEState(GLOB.colourblindblock,1)
|
||||
genemutcheck(M,GLOB.colourblindblock,null,MUTCHK_FORCED)
|
||||
else
|
||||
M.update_client_colour() //If we're here, that means the mob acquired the colourblindness gene while they didn't have eyes. Better handle it.
|
||||
|
||||
/obj/item/organ/internal/eyes/remove(mob/living/carbon/human/M, special = 0)
|
||||
if(!special && (M.disabilities & COLOURBLIND)) //If special is set, that means these eyes are getting deleted (i.e. during set_species())
|
||||
if(!(dependent_disabilities & COLOURBLIND)) //We only want to change COLOURBLINDBLOCK and such it the eyes are being surgically removed.
|
||||
if(!special && (COLOURBLIND in M.mutations)) //If special is set, that means these eyes are getting deleted (i.e. during set_species())
|
||||
if(!(COLOURBLIND in dependent_disabilities)) //We only want to change COLOURBLINDBLOCK and such it the eyes are being surgically removed.
|
||||
dependent_disabilities |= COLOURBLIND
|
||||
M.dna.SetSEState(GLOB.colourblindblock,0)
|
||||
genemutcheck(M,GLOB.colourblindblock,null,MUTCHK_FORCED)
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
/obj/item/organ/internal/eyes/cybernetic
|
||||
name = "cybernetic eyes"
|
||||
icon_state = "eyes-prosthetic"
|
||||
icon_state = "eyes-c"
|
||||
desc = "An electronic device designed to mimic the functions of a pair of human eyes. It has no benefits over organic eyes, but is easy to produce."
|
||||
origin_tech = "biotech=4"
|
||||
status = ORGAN_ROBOT
|
||||
|
||||
@@ -23,9 +23,8 @@
|
||||
Stop()
|
||||
return
|
||||
|
||||
spawn(120)
|
||||
if(!owner)
|
||||
Stop()
|
||||
if(!special)
|
||||
addtimer(CALLBACK(src, .proc/stop_if_unowned), 120)
|
||||
|
||||
/obj/item/organ/internal/heart/emp_act(intensity)
|
||||
if(!is_robotic() || emp_proof)
|
||||
@@ -43,14 +42,16 @@
|
||||
return
|
||||
if(!beating)
|
||||
Restart()
|
||||
spawn(80)
|
||||
if(!owner)
|
||||
Stop()
|
||||
addtimer(CALLBACK(src, .proc/stop_if_unowned), 80)
|
||||
|
||||
/obj/item/organ/internal/heart/safe_replace(mob/living/carbon/human/target)
|
||||
Restart()
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/heart/proc/stop_if_unowned()
|
||||
if(!owner)
|
||||
Stop()
|
||||
|
||||
/obj/item/organ/internal/heart/proc/Stop()
|
||||
beating = FALSE
|
||||
update_icon()
|
||||
@@ -238,6 +239,8 @@
|
||||
/obj/item/organ/internal/heart/cybernetic/upgraded/shock_organ(intensity)
|
||||
if(!ishuman(owner))
|
||||
return
|
||||
if(emp_proof)
|
||||
return
|
||||
intensity = min(intensity, 100)
|
||||
var/numHigh = round(intensity / 5)
|
||||
var/numMid = round(intensity / 10)
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
var/N2_pp = breath.get_breath_partial_pressure(breath.nitrogen)
|
||||
var/Toxins_pp = breath.get_breath_partial_pressure(breath.toxins)
|
||||
var/CO2_pp = breath.get_breath_partial_pressure(breath.carbon_dioxide)
|
||||
var/SA_pp = breath.get_breath_partial_pressure(breath.sleeping_agent)
|
||||
|
||||
|
||||
//-- OXY --//
|
||||
@@ -230,16 +231,14 @@
|
||||
|
||||
//-- TRACES --//
|
||||
|
||||
if(breath.trace_gases.len) // If there's some other shit in the air lets deal with it here.
|
||||
for(var/datum/gas/sleeping_agent/SA in breath.trace_gases)
|
||||
var/SA_pp = breath.get_breath_partial_pressure(SA.moles)
|
||||
if(SA_pp > SA_para_min)
|
||||
H.Paralyse(3) // 3 gives them one second to wake up and run away a bit!
|
||||
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
|
||||
H.AdjustSleeping(8, bound_lower = 0, bound_upper = 10)
|
||||
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
|
||||
if(prob(20))
|
||||
H.emote(pick("giggle", "laugh"))
|
||||
if(breath.sleeping_agent) // If there's some other shit in the air lets deal with it here.
|
||||
if(SA_pp > SA_para_min)
|
||||
H.Paralyse(3) // 3 gives them one second to wake up and run away a bit!
|
||||
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
|
||||
H.AdjustSleeping(8, bound_lower = 0, bound_upper = 10)
|
||||
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
|
||||
if(prob(20))
|
||||
H.emote(pick("giggle", "laugh"))
|
||||
|
||||
handle_breath_temperature(breath, H)
|
||||
|
||||
|
||||
@@ -116,18 +116,19 @@
|
||||
necrotize()
|
||||
|
||||
else if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
|
||||
//** Handle antibiotics and curing infections
|
||||
handle_antibiotics()
|
||||
handle_germ_effects()
|
||||
// Handle antibiotics and curing infections
|
||||
if(germ_level)
|
||||
handle_germs()
|
||||
return TRUE
|
||||
|
||||
/obj/item/organ/proc/is_preserved()
|
||||
if(istype(loc,/obj/item/mmi))
|
||||
germ_level = max(0, germ_level - 1) // So a brain can slowly recover from being left out of an MMI
|
||||
return 1
|
||||
return TRUE
|
||||
if(is_found_within(/obj/structure/closet/crate/freezer))
|
||||
return 1
|
||||
return TRUE
|
||||
if(is_found_within(/obj/machinery/clonepod))
|
||||
return 1
|
||||
return TRUE
|
||||
if(isturf(loc))
|
||||
if(world.time - last_freezer_update_time > freezer_update_period)
|
||||
// I don't want to loop through everything in the tile constantly, especially since it'll be a pile of organs
|
||||
@@ -142,7 +143,7 @@
|
||||
return is_in_freezer // I'd like static varibles, please
|
||||
|
||||
// You can do your cool location temperature organ preserving effects here!
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/obj/item/organ/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -152,33 +153,30 @@
|
||||
else
|
||||
. += "<span class='notice'>It looks in need of repairs.</span>"
|
||||
|
||||
/obj/item/organ/proc/handle_germ_effects()
|
||||
//** Handle the effects of infections
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
|
||||
if(germ_level > 0 && germ_level < INFECTION_LEVEL_ONE/2 && prob(30))
|
||||
/obj/item/organ/proc/handle_germs()
|
||||
if(germ_level > 0 && germ_level < INFECTION_LEVEL_ONE / 2 && prob(30))
|
||||
germ_level--
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_ONE/2)
|
||||
if(germ_level >= INFECTION_LEVEL_ONE / 2)
|
||||
//aiming for germ level to go from ambient to INFECTION_LEVEL_TWO in an average of 15 minutes
|
||||
if(antibiotics < 5 && prob(round(germ_level/6)))
|
||||
if(prob(round(germ_level / 6)))
|
||||
germ_level++
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_ONE)
|
||||
var/fever_temperature = (owner.dna.species.heat_level_1 - owner.dna.species.body_temperature - 5)* min(germ_level/INFECTION_LEVEL_TWO, 1) + owner.dna.species.body_temperature
|
||||
owner.bodytemperature += between(0, (fever_temperature - T20C)/BODYTEMP_COLD_DIVISOR + 1, fever_temperature - owner.bodytemperature)
|
||||
var/fever_temperature = (owner.dna.species.heat_level_1 - owner.dna.species.body_temperature - 5) * min(germ_level / INFECTION_LEVEL_TWO, 1) + owner.dna.species.body_temperature
|
||||
owner.bodytemperature += between(0, (fever_temperature - T20C) / BODYTEMP_COLD_DIVISOR + 1, fever_temperature - owner.bodytemperature)
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_TWO)
|
||||
var/obj/item/organ/external/parent = owner.get_organ(parent_organ)
|
||||
//spread germs
|
||||
if(antibiotics < 5 && parent.germ_level < germ_level && ( parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30) ))
|
||||
if(parent.germ_level < germ_level && ( parent.germ_level < INFECTION_LEVEL_ONE * 2 || prob(30)))
|
||||
parent.germ_level++
|
||||
|
||||
/obj/item/organ/internal/handle_germ_effects()
|
||||
/obj/item/organ/internal/handle_germs()
|
||||
..()
|
||||
if(germ_level >= INFECTION_LEVEL_TWO)
|
||||
if(prob(3)) //about once every 30 seconds
|
||||
receive_damage(1,silent=prob(30))
|
||||
receive_damage(1, silent = prob(30))
|
||||
|
||||
/obj/item/organ/proc/rejuvenate()
|
||||
damage = 0
|
||||
@@ -200,21 +198,6 @@
|
||||
/obj/item/organ/proc/is_broken()
|
||||
return (damage >= min_broken_damage || ((status & ORGAN_BROKEN) && !(status & ORGAN_SPLINTED)))
|
||||
|
||||
//Germs
|
||||
/obj/item/organ/proc/handle_antibiotics()
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
|
||||
if(!germ_level || antibiotics <= 0.4)
|
||||
return
|
||||
|
||||
if(germ_level < INFECTION_LEVEL_ONE)
|
||||
germ_level = 0 //cure instantly
|
||||
else if(germ_level < INFECTION_LEVEL_TWO)
|
||||
germ_level -= 24 //at germ_level == 500, this should cure the infection in 15 seconds
|
||||
else
|
||||
germ_level -= 8 // at germ_level == 1000, this will cure the infection in 1 minute, 15 seconds
|
||||
// Let's not drag this on, medbay has only so much antibiotics
|
||||
|
||||
//Adds autopsy data for used_weapon.
|
||||
/obj/item/organ/proc/add_autopsy_data(var/used_weapon = "Unknown", var/damage)
|
||||
var/datum/autopsy_data/W = autopsy_data[used_weapon]
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
icon_state = dead_icon
|
||||
if(owner)
|
||||
to_chat(owner, "<span class='notice'>You can't feel your [name] anymore...</span>")
|
||||
owner.update_body(update_sprite)
|
||||
owner.update_body()
|
||||
if(vital)
|
||||
owner.death()
|
||||
|
||||
@@ -336,10 +336,10 @@ This function completely restores a damaged organ to perfect condition.
|
||||
if(!(status & ORGAN_BROKEN))
|
||||
perma_injury = 0
|
||||
|
||||
//Infections
|
||||
update_germs()
|
||||
else
|
||||
..()
|
||||
if(..())
|
||||
if(owner.germ_level > germ_level && infection_check())
|
||||
//Open wounds can become infected
|
||||
germ_level++
|
||||
|
||||
//Updating germ levels. Handles organ germ levels and necrosis.
|
||||
/*
|
||||
@@ -356,40 +356,16 @@ the actual time is dependent on RNG.
|
||||
INFECTION_LEVEL_ONE below this germ level nothing happens, and the infection doesn't grow
|
||||
INFECTION_LEVEL_TWO above this germ level the infection will start to spread to internal and adjacent organs
|
||||
INFECTION_LEVEL_THREE above this germ level the player will take additional toxin damage per second, and will die in minutes without
|
||||
antitox. also, above this germ level you will need to overdose on spaceacillin to reduce the germ_level.
|
||||
antitox..
|
||||
|
||||
Note that amputating the affected organ does in fact remove the infection from the player's body.
|
||||
*/
|
||||
/obj/item/organ/external/proc/update_germs()
|
||||
|
||||
if(is_robotic() || (NO_GERMS in owner.dna.species.species_traits)) //Robotic limbs shouldn't be infected, nor should nonexistant limbs.
|
||||
germ_level = 0
|
||||
return
|
||||
|
||||
if(owner.bodytemperature >= 170) //cryo stops germs from moving and doing their bad stuffs
|
||||
//** Syncing germ levels with external wounds
|
||||
handle_germ_sync()
|
||||
|
||||
//** Handle antibiotics and curing infections
|
||||
handle_antibiotics()
|
||||
|
||||
//** Handle the effects of infections
|
||||
handle_germ_effects()
|
||||
|
||||
/obj/item/organ/external/proc/handle_germ_sync()
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
if(antibiotics < 5)
|
||||
//Open wounds can become infected
|
||||
if(owner.germ_level > germ_level && infection_check())
|
||||
germ_level++
|
||||
|
||||
/obj/item/organ/external/handle_germ_effects()
|
||||
/obj/item/organ/external/handle_germs()
|
||||
|
||||
if(germ_level < INFECTION_LEVEL_TWO)
|
||||
return ..()
|
||||
|
||||
var/antibiotics = owner.reagents.get_reagent_amount("spaceacillin")
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_TWO)
|
||||
//spread the infection to internal organs
|
||||
var/obj/item/organ/internal/target_organ = null //make internal organs become infected one at a time instead of all at once
|
||||
@@ -414,17 +390,16 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if(children)
|
||||
for(var/obj/item/organ/external/child in children)
|
||||
if(child.germ_level < germ_level && !child.is_robotic())
|
||||
if(child.germ_level < INFECTION_LEVEL_ONE*2 || prob(30))
|
||||
if(child.germ_level < INFECTION_LEVEL_ONE * 2 || prob(30))
|
||||
child.germ_level++
|
||||
|
||||
if(parent)
|
||||
if(parent.germ_level < germ_level && !parent.is_robotic())
|
||||
if(parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30))
|
||||
if(parent.germ_level < INFECTION_LEVEL_ONE * 2 || prob(30))
|
||||
parent.germ_level++
|
||||
|
||||
if(germ_level >= INFECTION_LEVEL_THREE && antibiotics < 30) //overdosing is necessary to stop severe infections
|
||||
if(germ_level >= INFECTION_LEVEL_THREE)
|
||||
necrotize()
|
||||
|
||||
germ_level++
|
||||
owner.adjustToxLoss(1)
|
||||
|
||||
@@ -703,12 +678,12 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
/obj/item/organ/external/proc/mutate()
|
||||
src.status |= ORGAN_MUTATED
|
||||
if(owner)
|
||||
owner.update_body(1, 1) //Forces all bodyparts to update in order to correctly render the deformed sprite.
|
||||
owner.update_body(TRUE) //Forces all bodyparts to update in order to correctly render the deformed sprite.
|
||||
|
||||
/obj/item/organ/external/proc/unmutate()
|
||||
src.status &= ~ORGAN_MUTATED
|
||||
if(owner)
|
||||
owner.update_body(1, 1) //Forces all bodyparts to update in order to correctly return them to normal.
|
||||
owner.update_body(TRUE) //Forces all bodyparts to update in order to correctly return them to normal.
|
||||
|
||||
/obj/item/organ/external/proc/get_damage() //returns total damage
|
||||
return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use health?
|
||||
|
||||
@@ -62,7 +62,7 @@ GLOBAL_LIST_EMPTY(limb_icon_cache)
|
||||
get_icon()
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/external/proc/get_icon(skeletal, fat)
|
||||
/obj/item/organ/external/proc/get_icon(skeletal)
|
||||
// Kasparrov, you monster
|
||||
if(force_icon)
|
||||
mob_icon = new /icon(force_icon, "[icon_name]")
|
||||
@@ -138,7 +138,7 @@ GLOBAL_LIST_EMPTY(limb_icon_cache)
|
||||
add_overlay(facial_s)
|
||||
|
||||
if(h_style)
|
||||
if(!owner.isSynthetic() || (owner.isSynthetic() && ((owner.head && (owner.head.flags & BLOCKHEADHAIR)) || (owner.wear_mask && (owner.wear_mask.flags & BLOCKHEADHAIR)))))
|
||||
if(!ismachineperson(owner) || (ismachineperson(owner) && ((owner.head && (owner.head.flags & BLOCKHEADHAIR)) || (owner.wear_mask && (owner.wear_mask.flags & BLOCKHEADHAIR)))))
|
||||
var/datum/sprite_accessory/hair_style = GLOB.hair_styles_full_list[h_style]
|
||||
if(hair_style && ((dna.species.name in hair_style.species_allowed) || (dna.species.bodyflags & ALL_RPARTS)))
|
||||
var/icon/hair_s = new /icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
|
||||
@@ -181,13 +181,6 @@ GLOBAL_LIST_EMPTY(limb_icon_cache)
|
||||
icon_file = icobase
|
||||
return list(icon_file, new_icon_state)
|
||||
|
||||
/obj/item/organ/external/chest/get_icon_state(skeletal)
|
||||
var/result = ..()
|
||||
if(fat && !skeletal && !is_robotic() && (CAN_BE_FAT in dna.species.species_traits))
|
||||
result[2] += "_fat"
|
||||
return result
|
||||
|
||||
|
||||
// new damage icon system
|
||||
// adjusted to set damage_state to brute/burn code only (without r_name0 as before)
|
||||
/obj/item/organ/external/update_icon()
|
||||
|
||||
@@ -234,7 +234,6 @@
|
||||
slot = "brain_tumor"
|
||||
var/organhonked = 0
|
||||
var/suffering_delay = 900
|
||||
var/datum/component/waddle
|
||||
var/datum/component/squeak
|
||||
|
||||
/obj/item/organ/internal/honktumor/insert(mob/living/carbon/M, special = 0)
|
||||
@@ -246,7 +245,7 @@
|
||||
genemutcheck(M,GLOB.clumsyblock,null,MUTCHK_FORCED)
|
||||
genemutcheck(M,GLOB.comicblock,null,MUTCHK_FORCED)
|
||||
organhonked = world.time
|
||||
waddle = M.AddComponent(/datum/component/waddling)
|
||||
M.AddElement(/datum/element/waddling)
|
||||
squeak = M.AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg' = 1), 50)
|
||||
|
||||
/obj/item/organ/internal/honktumor/remove(mob/living/carbon/M, special = 0)
|
||||
@@ -258,7 +257,7 @@
|
||||
M.dna.SetSEState(GLOB.comicblock,0)
|
||||
genemutcheck(M,GLOB.clumsyblock,null,MUTCHK_FORCED)
|
||||
genemutcheck(M,GLOB.comicblock,null,MUTCHK_FORCED)
|
||||
QDEL_NULL(waddle)
|
||||
M.RemoveElement(/datum/element/waddling)
|
||||
QDEL_NULL(squeak)
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -15,27 +15,8 @@
|
||||
gendered_icon = 1
|
||||
parent_organ = null
|
||||
encased = "ribcage"
|
||||
var/fat = FALSE
|
||||
convertable_children = list(/obj/item/organ/external/groin)
|
||||
|
||||
/obj/item/organ/external/chest/proc/makeFat(update_body_icon = 1)
|
||||
fat = TRUE
|
||||
if(owner)
|
||||
owner.update_body(update_body_icon)
|
||||
else
|
||||
// get_icon updates the sprite icon, update_icon updates the injuries overlay.
|
||||
// Madness.
|
||||
get_icon()
|
||||
|
||||
/obj/item/organ/external/chest/proc/makeSlim(update_body_icon = 1)
|
||||
fat = FALSE
|
||||
if(owner)
|
||||
owner.update_body(update_body_icon)
|
||||
else
|
||||
// get_icon updates the sprite icon, update_icon updates the injuries overlay.
|
||||
// Madness.
|
||||
get_icon()
|
||||
|
||||
/obj/item/organ/external/groin
|
||||
name = "lower body"
|
||||
limb_name = "groin"
|
||||
|
||||
Reference in New Issue
Block a user