Removes Deformed Sprites (#15588)

This commit is contained in:
Fox McCloud
2021-02-24 12:45:58 +00:00
committed by GitHub
parent 78cb60f160
commit 7b7ea0a191
40 changed files with 10 additions and 53 deletions
@@ -19,7 +19,6 @@
var/force_icon
var/icobase = 'icons/mob/human_races/r_human.dmi' // Normal icon set.
var/deform = 'icons/mob/human_races/r_def_human.dmi' // Mutated icon set.
var/damage_state = "00"
var/brute_dam = 0
@@ -109,7 +108,6 @@
..()
var/mob/living/carbon/human/H = holder
icobase = dna.species.icobase
deform = dna.species.deform
if(istype(H))
replaced(H)
sync_colour_to_human(H)
@@ -674,14 +672,10 @@ Note that amputating the affected organ does in fact remove the infection from t
desc = "[R.desc]"
/obj/item/organ/external/proc/mutate()
src.status |= ORGAN_MUTATED
if(owner)
owner.update_body(TRUE) //Forces all bodyparts to update in order to correctly render the deformed sprite.
status |= ORGAN_MUTATED
/obj/item/organ/external/proc/unmutate()
src.status &= ~ORGAN_MUTATED
if(owner)
owner.update_body(TRUE) //Forces all bodyparts to update in order to correctly return them to normal.
status &= ~ORGAN_MUTATED
/obj/item/organ/external/proc/get_damage() //returns total damage
return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use health?
+5 -9
View File
@@ -14,15 +14,14 @@ GLOBAL_LIST_EMPTY(limb_icon_cache)
overlays += organ.mob_icon
child_icons += organ.mob_icon
/obj/item/organ/external/proc/change_organ_icobase(var/new_icobase, var/new_deform, var/owner_sensitive) //Change the icobase/deform of this organ. If owner_sensitive is set, that means the proc won't mess with frankenstein limbs.
if(owner_sensitive) //This and the below statements mean that the icobase/deform will only get updated if the limb is the same species as and is owned by the mob it's attached to.
/obj/item/organ/external/proc/change_organ_icobase(new_icobase, owner_sensitive) //Change the icobase of this organ. If owner_sensitive is set, that means the proc won't mess with frankenstein limbs.
if(owner_sensitive) //This and the below statements mean that the icobase will only get updated if the limb is the same species as and is owned by the mob it's attached to.
if(dna.species && owner.dna.species && dna.species.name != owner.dna.species.name)
return
if(dna.unique_enzymes != owner.dna.unique_enzymes) // This isn't MY arm
return
icobase = new_icobase ? new_icobase : icobase
deform = new_deform ? new_deform : deform
/obj/item/organ/external/proc/sync_colour_to_human(var/mob/living/carbon/human/H)
if(is_robotic() && !istype(dna.species, /datum/species/machine)) //machine people get skin color
@@ -41,7 +40,7 @@ GLOBAL_LIST_EMPTY(limb_icon_cache)
s_col = H.skin_colour
if(H.dna.species.bodyflags & HAS_ICON_SKIN_TONE)
var/obj/item/organ/external/chest/C = H.get_organ("chest")
change_organ_icobase(C.icobase, C.deform)
change_organ_icobase(C.icobase)
/obj/item/organ/external/proc/sync_colour_to_dna()
if(is_robotic())
@@ -180,11 +179,8 @@ GLOBAL_LIST_EMPTY(limb_icon_cache)
else if(is_robotic())
icon_file = 'icons/mob/human_races/robotic.dmi'
else
if(status & ORGAN_MUTATED)
icon_file = deform
else
// Congratulations, you are normal
icon_file = icobase
// Congratulations, you are normal
icon_file = icobase
return list(icon_file, new_icon_state)
// new damage icon system