From 4a81fcf8d8f592736a79ae874616ac8e509e626f Mon Sep 17 00:00:00 2001 From: Verkister Date: Thu, 5 Apr 2018 09:59:24 +0300 Subject: [PATCH] Fixes a bunch of simple animal vore icon issues. --- .../mob/living/simple_animal/simple_animal.dm | 3 +++ .../living/simple_animal/simple_animal_vr.dm | 24 +++++++++++-------- .../mob/living/simple_animal/vore/badboi.dm | 2 +- .../mob/living/simple_animal/vore/otie.dm | 2 +- .../mob/living/simple_animal/vore/panther.dm | 2 +- .../simple_animal/vore/zz_vore_overrides.dm | 3 ++- 6 files changed, 22 insertions(+), 14 deletions(-) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 450580fbb4..dd6b6723d5 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -314,6 +314,9 @@ else ma.icon_state = initial(icon_state) + if(update_vore_icon()) // VOREStation edit + ma.icon_state = update_vore_icon() + if(has_hands) if(r_hand_sprite) ma.overlays += r_hand_sprite diff --git a/code/modules/mob/living/simple_animal/simple_animal_vr.dm b/code/modules/mob/living/simple_animal/simple_animal_vr.dm index 90d899fa08..4f9ab80bf4 100644 --- a/code/modules/mob/living/simple_animal/simple_animal_vr.dm +++ b/code/modules/mob/living/simple_animal/simple_animal_vr.dm @@ -44,21 +44,25 @@ var/obj/belly/B = belly for(var/mob/living/M in B) new_fullness += M.size_multiplier - new_fullness = round(new_fullness, 1) // Because intervals of 0.25 are going to make sprite artists cry. + new_fullness = round(new_fullness, 1) // Because intervals of 0.25 are going to make sprite artists cry. vore_fullness = min(vore_capacity, new_fullness) -/mob/living/simple_animal/update_icon() - . = ..() // Call sideways "parent" to decide state +/mob/living/simple_animal/proc/update_vore_icon() if(vore_active) update_fullness() if(!vore_fullness) - return - else if(icon_state == icon_living && (vore_icons & SA_ICON_LIVING)) - icon_state = "[icon_state]-[vore_fullness]" - else if(icon_state == icon_dead && (vore_icons & SA_ICON_DEAD)) - icon_state = "[icon_state]-[vore_fullness]" - else if(icon_state == icon_rest && (vore_icons & SA_ICON_REST)) - icon_state = "[icon_state]-[vore_fullness]" + return 0 + else if((stat == CONSCIOUS) && (!icon_rest || !resting || !incapacitated(INCAPACITATION_DISABLED)) && (vore_icons & SA_ICON_LIVING)) + return "[icon_living]-[vore_fullness]" + else if(stat >= DEAD && (vore_icons & SA_ICON_DEAD)) + return "[icon_dead]-[vore_fullness]" + else if(((stat == UNCONSCIOUS) || resting || incapacitated(INCAPACITATION_DISABLED) ) && icon_rest && (vore_icons & SA_ICON_REST)) + return "[icon_rest]-[vore_fullness]" + return 0 + +/mob/living/simple_animal/lay_down() + ..() + update_icons() /mob/living/simple_animal/proc/will_eat(var/mob/living/M) if(client) //You do this yourself, dick! diff --git a/code/modules/mob/living/simple_animal/vore/badboi.dm b/code/modules/mob/living/simple_animal/vore/badboi.dm index 11ede1c105..735d593891 100644 --- a/code/modules/mob/living/simple_animal/vore/badboi.dm +++ b/code/modules/mob/living/simple_animal/vore/badboi.dm @@ -51,7 +51,7 @@ vore_active = TRUE vore_capacity = 1 vore_pounce_chance = 30 - vore_icons = SA_ICON_LIVING + vore_icons = SA_ICON_LIVING | SA_ICON_REST vore_stomach_name = "fuel processor" vore_stomach_flavor = "You have ended up in the fuel processor of this corrupted machine. This place was definitely not designed with safety and comfort in mind. The heated and cramped surroundings oozing potent fluids all over your form, eager to do nothing less than breaking you apart to fuel its rampage for the next few days... hours... minutes? Oh dear..." diff --git a/code/modules/mob/living/simple_animal/vore/otie.dm b/code/modules/mob/living/simple_animal/vore/otie.dm index 26057fc87b..766ed7a4ae 100644 --- a/code/modules/mob/living/simple_animal/vore/otie.dm +++ b/code/modules/mob/living/simple_animal/vore/otie.dm @@ -56,7 +56,7 @@ vore_active = 1 vore_capacity = 1 vore_pounce_chance = 20 - vore_icons = SA_ICON_LIVING + vore_icons = SA_ICON_LIVING | SA_ICON_REST /mob/living/simple_animal/otie/feral //gets the pet2tame feature. starts out hostile tho so get gamblin' name = "mutated feral otie" diff --git a/code/modules/mob/living/simple_animal/vore/panther.dm b/code/modules/mob/living/simple_animal/vore/panther.dm index 3e723e68fc..454ef4d927 100644 --- a/code/modules/mob/living/simple_animal/vore/panther.dm +++ b/code/modules/mob/living/simple_animal/vore/panther.dm @@ -32,4 +32,4 @@ vore_active = 1 vore_capacity = 2 vore_pounce_chance = 10 - vore_icons = SA_ICON_LIVING + vore_icons = SA_ICON_LIVING | SA_ICON_REST diff --git a/code/modules/mob/living/simple_animal/vore/zz_vore_overrides.dm b/code/modules/mob/living/simple_animal/vore/zz_vore_overrides.dm index c71cc1d36e..755b4a9093 100644 --- a/code/modules/mob/living/simple_animal/vore/zz_vore_overrides.dm +++ b/code/modules/mob/living/simple_animal/vore/zz_vore_overrides.dm @@ -65,7 +65,7 @@ icon_state = "queen_s" icon_living = "queen_s" icon_dead = "queen_dead" - vore_icons = SA_ICON_LIVING + vore_icons = SA_ICON_LIVING | SA_ICON_REST old_x = -16 old_y = 0 default_pixel_x = -16 @@ -77,6 +77,7 @@ /mob/living/simple_animal/hostile/alien/sentinel/praetorian icon = 'icons/mob/vore64x64.dmi' + vore_icons = SA_ICON_LIVING | SA_ICON_REST /mob/living/simple_animal/hostile/alien/queen/empress/mother vore_icons = 0 // NO VORE SPRITES