Merge pull request #3389 from Verkister/mobvors

Fixes resting and vore icon issues with mobs and silicons
This commit is contained in:
Spades
2018-04-10 14:44:36 -04:00
committed by GitHub
10 changed files with 30 additions and 23 deletions

View File

@@ -1060,7 +1060,7 @@ default behaviour is:
if(lying != lying_prev)
lying_prev = lying
update_transform()
return canmove
// Adds overlays for specific modifiers.
@@ -1088,10 +1088,10 @@ default behaviour is:
/mob/living/proc/is_sentient()
return TRUE
/* //VOREStation Edit. We have a better system in place.
/mob/living/update_transform()
// First, get the correct size.
var/desired_scale = icon_scale
var/desired_scale = size_multiplier //VOREStation edit
for(var/datum/modifier/M in modifiers)
if(!isnull(M.icon_scale_percent))
desired_scale *= M.icon_scale_percent
@@ -1101,8 +1101,8 @@ default behaviour is:
M.Scale(desired_scale)
M.Translate(0, 16*(desired_scale-1))
src.transform = M
animate(src, transform = M, time = 10)
*/ //VOREStation Edit
//animate(src, transform = M, time = 10) //VOREStation edit
// This handles setting the client's color variable, which makes everything look a specific color.
// This proc is here so it can be called without needing to check if the client exists, or if the client relogs.

View File

@@ -314,6 +314,12 @@
else
ma.icon_state = initial(icon_state)
//VOREStation edit start
var/vore_icon_state = update_vore_icon()
if(vore_icon_state)
ma.icon_state = vore_icon_state
//VOREStation edit end
if(has_hands)
if(r_hand_sprite)
ma.overlays += r_hand_sprite

View File

@@ -44,21 +44,21 @@
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
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]"
/mob/living/simple_animal/proc/update_vore_icon()
if(!vore_active)
return 0
update_fullness()
if(!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]"
/mob/living/simple_animal/proc/will_eat(var/mob/living/M)
if(client) //You do this yourself, dick!

View File

@@ -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..."

View File

@@ -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"

View File

@@ -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

View File

@@ -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

View File

@@ -64,7 +64,7 @@ var/const/RESIZE_A_SMALLTINY = (RESIZE_SMALL + RESIZE_TINY) / 2
/mob/living/proc/resize(var/new_size, var/animate = TRUE)
if(size_multiplier == new_size)
return 1
size_multiplier = new_size //Change size_multiplier so that other items can interact with them
if(animate)
var/change = new_size - size_multiplier