no more errors
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
desc = "You shouldn't see this."
|
||||
icon = 'GainStation13/icons/mob/accessories.dmi'
|
||||
icon_state = "gato_middleman"
|
||||
item_color = "gato" //btw I had to move the sprite for this to 'icons/mob/accessories.dmi', the shitty code made me do it!! GS13 will just have a backup but it's not referenced here
|
||||
above_suit = TRUE
|
||||
|
||||
/obj/item/clothing/accessory/medal/gato_badge/middleman
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
icon_state = "haydee_helmet"
|
||||
item_state = "item_haydee_helmet"
|
||||
armor = list("melee" = 10, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 0, "bio" = 0, "rad" = 25, "fire" = 25, "acid" = 25)
|
||||
item_color = "white"
|
||||
slowdown = 0
|
||||
mutantrace_variation = NONE
|
||||
actions_types = list()
|
||||
@@ -14,8 +13,8 @@
|
||||
/obj/item/clothing/suit/space/hardsuit/engine/haydee
|
||||
name = "Haydee Suit"
|
||||
desc = "A strangely voluptous suit. Offers little to no protection. It also appears to have minor flab-compressing properties."
|
||||
icon = 'GainStation13/icons/obj/clothing/haydee_modular.dmi'
|
||||
alternate_worn_icon = 'GainStation13/icons/obj/clothing/haydee_modular.dmi'
|
||||
mob_overlay_icon = 'GainStation13/icons/obj/clothing/haydee_modular.dmi'
|
||||
anthro_mob_worn_overlay = 'GainStation13/icons/obj/clothing/haydee_modular.dmi'
|
||||
icon_state = "haydee_suit1"
|
||||
item_state = "item_haydee"
|
||||
armor = list("melee" = 10, "bullet" = 5, "laser" = 10, "energy" = 5, "bomb" = 10, "bio" = 0, "rad" = 25, "fire" = 25, "acid" = 25)
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
playsound(M.loc, 'sound/effects/splat.ogg',rand(10,50), 1)
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/juice
|
||||
name = "berry juice"
|
||||
desc = "It's blue and smells enticingly sweet."
|
||||
@@ -69,3 +69,7 @@
|
||||
/obj/effect/decal/cleanable/juice/streak
|
||||
random_icon_states = list("streak1", "streak2", "streak3", "streak4", "streak5")
|
||||
|
||||
/obj/effect/decal/cleanable/blood/update_icon()
|
||||
color = blood_DNA_to_color()
|
||||
if(blood_state == BLOOD_STATE_JUICE)
|
||||
color = BLOOD_COLOR_JUICE
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
message_admins("A choco slime has been delivered to [ADMIN_VERBOSEJMP(T)].")
|
||||
log_game("A choco slime has been delivered to [AREACOORD(T)]")
|
||||
var/message = "Attention [station_name()], we have entrusted you with a research specimen in [get_area_name(T, TRUE)]. Remember to follow all safety precautions when dealing with the specimen."
|
||||
SSticker.OnRoundstart(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(addtimer), CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(print_command_report), message), announcement_time))
|
||||
SSticker.OnRoundstart(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(_addtimer), CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(print_command_report), message), announcement_time))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
|
||||
|
||||
|
||||
@@ -16,12 +16,14 @@
|
||||
var/mob/living/carbon/C = quirk_holder
|
||||
C.hider_remove(src)
|
||||
|
||||
/*
|
||||
/datum/quirk/fatrousal/proc/fat_hide(var/mob/living/carbon/user)
|
||||
if(iscarbon(quirk_holder))
|
||||
var/mob/living/carbon/C = quirk_holder
|
||||
return C.getArousalLoss()*35
|
||||
|
||||
return FALSE
|
||||
*/
|
||||
|
||||
///mob/living/adjust_arousal(amount, updating_arousal=1)
|
||||
// if(HAS_TRAIT(src, TRAIT_FATROUSAL))
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
name = "web bindings"
|
||||
desc = "A mesh of sticky web that binds whoever is stuck inside of it"
|
||||
icon = 'GainStation13/icons/obj/clothing/web.dmi'
|
||||
worn_icon = 'GainStation13/icons/mob/web.dmi'
|
||||
mob_overlay_icon = 'GainStation13/icons/mob/web.dmi'
|
||||
icon_state = "web_bindings"
|
||||
item_state = "web_bindings"
|
||||
breakouttime = 600 //1 minute is reasonable.
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
/obj/item/clothing
|
||||
var/alternate_worn_icon
|
||||
/// Where do we want to grab the file from? use this for GS13 specific clothing.
|
||||
var/icon/alternate_worn_icon
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
. += mutable_appearance('GainStation13/icons/mob/modclothes/chefmodular.dmi', "belly_9_d", GENITALS_UNDER_LAYER)
|
||||
if(istype(O, /obj/item/organ/genital/butt))
|
||||
G = O
|
||||
if(suit_style == DIGITIGRADE_SUIT_STYLE)
|
||||
if(mutantrace_variation == STYLE_DIGITIGRADE)
|
||||
if(G.size <= 10)
|
||||
. += mutable_appearance('GainStation13/icons/mob/modclothes/chefmodular.dmi', "butt_[G.size]_l", GENITALS_FRONT_LAYER)
|
||||
. += mutable_appearance('GainStation13/icons/mob/modclothes/chefmodular.dmi', "butt_[G.size]_l_NORTH", GENITALS_FRONT_LAYER)
|
||||
@@ -62,8 +62,8 @@
|
||||
. += mutable_appearance('icons/effects/item_damage.dmi', "damageduniform")
|
||||
if(blood_DNA)
|
||||
. += mutable_appearance('icons/effects/blood.dmi', "uniformblood", color = blood_DNA_to_color())
|
||||
if(accessory_overlay)
|
||||
. += accessory_overlay
|
||||
if(length(accessory_overlays))
|
||||
. += accessory_overlays
|
||||
|
||||
/obj/item/clothing/under/color/grey/modular
|
||||
name = "grey modular jumpsuit" //change name from base clothes to distinguish them
|
||||
@@ -103,9 +103,9 @@
|
||||
. += mutable_appearance(icon_location, "belly_[G.size]_d", GENITALS_UNDER_LAYER)
|
||||
else
|
||||
. += mutable_appearance(icon_location, "belly_9_d", GENITALS_UNDER_LAYER)
|
||||
if(istype(O, /obj/item/organ/genital/anus)) //if that organ is the butt
|
||||
if(istype(O, /obj/item/organ/genital/butt)) //if that organ is the butt
|
||||
G = O
|
||||
if(suit_style == DIGITIGRADE_SUIT_STYLE) //check if the suit needs to use sprites for digitigrade characters
|
||||
if(mutantrace_variation == STYLE_DIGITIGRADE) //check if the suit needs to use sprites for digitigrade characters
|
||||
if(G.size <= 10)
|
||||
. += mutable_appearance(icon_location, "butt_[G.size]_l", GENITALS_FRONT_LAYER)
|
||||
. += mutable_appearance(icon_location, "butt_[G.size]_l_NORTH", GENITALS_FRONT_LAYER) //to not adjust overlays every time a character turns, north-facing breasts and bellies are drawn separately, with individual icons
|
||||
@@ -143,8 +143,8 @@
|
||||
. += mutable_appearance('icons/effects/item_damage.dmi', "damageduniform")
|
||||
if(blood_DNA)
|
||||
. += mutable_appearance('icons/effects/blood.dmi', "uniformblood", color = blood_DNA_to_color())
|
||||
if(accessory_overlay)
|
||||
. += accessory_overlay
|
||||
if(length(accessory_overlays))
|
||||
. += accessory_overlays
|
||||
|
||||
|
||||
/obj/item/clothing/under/color/grey/modular/bra
|
||||
@@ -153,4 +153,4 @@
|
||||
icon_location = 'GainStation13/icons/mob/modclothes/graymodular_bra.dmi'
|
||||
icon_state = "grey"
|
||||
item_state = "grey_bra"
|
||||
item_color = "grey_bra"
|
||||
// item_color = "grey_bra"
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
/datum/emote/living/burp/fart/goon // Fart but it's funny !
|
||||
key = "goonfart"
|
||||
key_third_person = "goonfarts"
|
||||
noise_type = 'goon/sound/voice/farts/fart4.ogg'
|
||||
noise_type = 'GainStation13/sound/voice/farts/fart4.ogg'
|
||||
|
||||
//Shhh... It's a secret! Don't tell or I'll steal your legs
|
||||
/datum/emote/living/burunyu
|
||||
|
||||
@@ -338,117 +338,3 @@
|
||||
FATNESS_LEVEL_FAT,
|
||||
null,
|
||||
"<span class='danger'>You suddenly feel blubbery!</span>")
|
||||
|
||||
/datum/species/proc/handle_digestion(mob/living/carbon/human/H)
|
||||
if(HAS_TRAIT(src, TRAIT_NOHUNGER))
|
||||
return //hunger is for BABIES
|
||||
|
||||
handle_fatness(H) // GS13
|
||||
|
||||
// nutrition decrease and satiety
|
||||
if (H.nutrition > 0 && H.stat != DEAD && !HAS_TRAIT(H, TRAIT_NOHUNGER))
|
||||
// THEY HUNGER
|
||||
var/hunger_rate = HUNGER_FACTOR
|
||||
var/datum/component/mood/mood = H.GetComponent(/datum/component/mood)
|
||||
if(mood && mood.sanity > SANITY_DISTURBED)
|
||||
hunger_rate *= max(0.5, 1 - 0.002 * mood.sanity) //0.85 to 0.75
|
||||
|
||||
// Whether we cap off our satiety or move it towards 0
|
||||
if(H.satiety > MAX_SATIETY)
|
||||
H.satiety = MAX_SATIETY
|
||||
else if(H.satiety > 0)
|
||||
H.satiety--
|
||||
else if(H.satiety < -MAX_SATIETY)
|
||||
H.satiety = -MAX_SATIETY
|
||||
else if(H.satiety < 0)
|
||||
H.satiety++
|
||||
if(prob(round(-H.satiety/40)))
|
||||
H.Jitter(5)
|
||||
hunger_rate = 3 * HUNGER_FACTOR
|
||||
hunger_rate *= H.physiology.hunger_mod
|
||||
H.nutrition = max(0, H.nutrition - hunger_rate)
|
||||
|
||||
|
||||
if (H.nutrition > NUTRITION_LEVEL_FULL)
|
||||
// fatConversionRate is functionally useless. It seems under normal curcumstances, each tick only processes, at most, 1 nutrition anyway. reducing the value has no effect.
|
||||
var/fatConversionRate = 100 //GS13 what percentage of the excess nutrition should go to fat (total nutrition to transfer can't be under 1)
|
||||
var/nutritionThatBecomesFat = max((H.nutrition - NUTRITION_LEVEL_FULL)*(fatConversionRate / 100),1)
|
||||
H.nutrition -= nutritionThatBecomesFat
|
||||
H.adjust_fatness(nutritionThatBecomesFat, FATTENING_TYPE_FOOD)
|
||||
if(H.fullness > FULLNESS_LEVEL_EMPTY)//GS13 stomach-emptying routine
|
||||
var/ticksToEmptyStomach = 20 // GS13 how many ticks it takes to decrease the fullness by 1
|
||||
if(HAS_TRAIT(H, TRAIT_VORACIOUS))
|
||||
ticksToEmptyStomach = ticksToEmptyStomach * 0.5
|
||||
H.fullness -= 1/ticksToEmptyStomach
|
||||
if (H.fullness > FULLNESS_LEVEL_BLOATED) //GS13 overeating depends on fullness now
|
||||
if(H.overeatduration < 5000) //capped so people don't take forever to unfat
|
||||
H.overeatduration++
|
||||
else
|
||||
if(H.overeatduration > 1)
|
||||
H.overeatduration -= 1 //doubled the unfat rate -- GS13 Nah, put it back
|
||||
|
||||
//metabolism change
|
||||
if(H.nutrition > NUTRITION_LEVEL_FULL +100)
|
||||
H.metabolism_efficiency = 1
|
||||
else if(H.nutrition > NUTRITION_LEVEL_FED && H.satiety > 80)
|
||||
if(H.metabolism_efficiency != 1.25 && !HAS_TRAIT(H, TRAIT_NOHUNGER))
|
||||
to_chat(H, "<span class='notice'>You feel vigorous.</span>")
|
||||
H.metabolism_efficiency = 1.25
|
||||
else if(H.nutrition < NUTRITION_LEVEL_STARVING + 50)
|
||||
if(H.metabolism_efficiency != 0.8)
|
||||
to_chat(H, "<span class='notice'>You feel sluggish.</span>")
|
||||
H.metabolism_efficiency = 0.8
|
||||
else
|
||||
if(H.metabolism_efficiency == 1.25)
|
||||
to_chat(H, "<span class='notice'>You no longer feel vigorous.</span>")
|
||||
H.metabolism_efficiency = 1
|
||||
|
||||
switch(H.nutrition)
|
||||
if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FULL)
|
||||
H.clear_alert("nutrition")
|
||||
if(NUTRITION_LEVEL_STARVING to NUTRITION_LEVEL_HUNGRY)
|
||||
H.throw_alert("nutrition", /atom/movable/screen/alert/hungry)
|
||||
if(0 to NUTRITION_LEVEL_STARVING)
|
||||
H.throw_alert("nutrition", /atom/movable/screen/alert/starving)
|
||||
|
||||
switch(H.fullness)
|
||||
if(0 to FULLNESS_LEVEL_BLOATED)
|
||||
H.clear_alert("fullness")
|
||||
if(FULLNESS_LEVEL_BLOATED to FULLNESS_LEVEL_BEEG)
|
||||
H.throw_alert("fullness", /atom/movable/screen/alert/gs13/bloated)
|
||||
if(FULLNESS_LEVEL_BEEG to FULLNESS_LEVEL_NOMOREPLZ)
|
||||
H.throw_alert("fullness", /atom/movable/screen/alert/gs13/stuffed)
|
||||
if(FULLNESS_LEVEL_NOMOREPLZ to INFINITY)
|
||||
H.throw_alert("fullness", /atom/movable/screen/alert/gs13/beegbelly)
|
||||
|
||||
|
||||
switch(H.fatness)
|
||||
if(FATNESS_LEVEL_BLOB to INFINITY)
|
||||
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/blob)
|
||||
|
||||
if(FATNESS_LEVEL_IMMOBILE to FATNESS_LEVEL_BLOB)
|
||||
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/immobile)
|
||||
|
||||
if(FATNESS_LEVEL_BARELYMOBILE to FATNESS_LEVEL_IMMOBILE)
|
||||
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/barelymobile)
|
||||
|
||||
if(FATNESS_LEVEL_EXTREMELY_OBESE to FATNESS_LEVEL_BARELYMOBILE)
|
||||
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/extremelyobese)
|
||||
|
||||
if(FATNESS_LEVEL_MORBIDLY_OBESE to FATNESS_LEVEL_EXTREMELY_OBESE)
|
||||
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/morbidlyobese)
|
||||
|
||||
if(FATNESS_LEVEL_OBESE to FATNESS_LEVEL_MORBIDLY_OBESE)
|
||||
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/obese)
|
||||
|
||||
if(FATNESS_LEVEL_VERYFAT to FATNESS_LEVEL_OBESE)
|
||||
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/veryfat)
|
||||
|
||||
if(FATNESS_LEVEL_FATTER to FATNESS_LEVEL_VERYFAT)
|
||||
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/fatter)
|
||||
|
||||
if(FATNESS_LEVEL_FAT to FATNESS_LEVEL_FATTER)
|
||||
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/fat)
|
||||
|
||||
if(0 to FATNESS_LEVEL_FAT)
|
||||
H.clear_alert("fatness")
|
||||
|
||||
Binary file not shown.
@@ -154,6 +154,8 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache)
|
||||
#define BLOOD_STATE_OIL "oil"
|
||||
#define BLOOD_STATE_NOT_BLOODY "no blood whatsoever"
|
||||
#define BLOOD_AMOUNT_PER_DECAL 20
|
||||
// GS13 EDIT
|
||||
#define BLOOD_STATE_JUICE "juice"
|
||||
|
||||
//Blood Decal Colors
|
||||
#define BLOOD_COLOR_HUMAN "#dc0000"
|
||||
@@ -165,7 +167,8 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache)
|
||||
#define BLOOD_COLOR_UNIVERSAL "#db3300"
|
||||
#define BLOOD_COLOR_BUG "#ffc933"
|
||||
#define BLOOD_COLOR_PLANT "#3d610e"
|
||||
|
||||
// GS13 EDIT
|
||||
#define BLOOD_COLOR_JUICE "#0004ff"
|
||||
|
||||
//suit sensors: sensor_mode defines
|
||||
|
||||
|
||||
@@ -1502,6 +1502,9 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
if(HAS_TRAIT(H, TRAIT_NOHUNGER))
|
||||
return //hunger is for BABIES
|
||||
|
||||
handle_fatness(H) // GS13 EDIT
|
||||
|
||||
/*
|
||||
//The fucking TRAIT_FAT mutation is the dumbest shit ever. It makes the code so difficult to work with
|
||||
if(HAS_TRAIT(H, TRAIT_FAT))//I share your pain, past coder.
|
||||
if(H.overeatduration < 100)
|
||||
@@ -1517,6 +1520,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
H.add_movespeed_modifier(/datum/movespeed_modifier/obesity)
|
||||
H.update_inv_w_uniform()
|
||||
H.update_inv_wear_suit()
|
||||
*/
|
||||
|
||||
// nutrition decrease and satiety
|
||||
if (H.nutrition > 0 && H.stat != DEAD && !HAS_TRAIT(H, TRAIT_NOHUNGER))
|
||||
@@ -1588,6 +1592,38 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
if(0 to NUTRITION_LEVEL_STARVING)
|
||||
H.throw_alert("nutrition", /atom/movable/screen/alert/starving)
|
||||
|
||||
//GS13 EDIT
|
||||
switch(H.fatness)
|
||||
if(FATNESS_LEVEL_BLOB to INFINITY)
|
||||
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/blob)
|
||||
|
||||
if(FATNESS_LEVEL_IMMOBILE to FATNESS_LEVEL_BLOB)
|
||||
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/immobile)
|
||||
|
||||
if(FATNESS_LEVEL_BARELYMOBILE to FATNESS_LEVEL_IMMOBILE)
|
||||
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/barelymobile)
|
||||
|
||||
if(FATNESS_LEVEL_EXTREMELY_OBESE to FATNESS_LEVEL_BARELYMOBILE)
|
||||
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/extremelyobese)
|
||||
|
||||
if(FATNESS_LEVEL_MORBIDLY_OBESE to FATNESS_LEVEL_EXTREMELY_OBESE)
|
||||
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/morbidlyobese)
|
||||
|
||||
if(FATNESS_LEVEL_OBESE to FATNESS_LEVEL_MORBIDLY_OBESE)
|
||||
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/obese)
|
||||
|
||||
if(FATNESS_LEVEL_VERYFAT to FATNESS_LEVEL_OBESE)
|
||||
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/veryfat)
|
||||
|
||||
if(FATNESS_LEVEL_FATTER to FATNESS_LEVEL_VERYFAT)
|
||||
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/fatter)
|
||||
|
||||
if(FATNESS_LEVEL_FAT to FATNESS_LEVEL_FATTER)
|
||||
H.throw_alert("fatness", /atom/movable/screen/alert/gs13/fat)
|
||||
|
||||
if(0 to FATNESS_LEVEL_FAT)
|
||||
H.clear_alert("fatness")
|
||||
|
||||
/datum/species/proc/update_health_hud(mob/living/carbon/human/H)
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -17,6 +17,83 @@
|
||||
M.Translate(0, 16*(size_multiplier-1)) //translate by 16 * size_multiplier - 1 on Y axis
|
||||
src.transform = M //the source of transform is M
|
||||
|
||||
//IMPORTANT: Multiple animate() calls do not stack well, so try to do them all at once if you can.
|
||||
/mob/living/carbon/update_transform()
|
||||
var/matrix/ntransform = matrix(transform) //aka transform.Copy()
|
||||
var/final_pixel_y = pixel_y
|
||||
var/final_dir = dir
|
||||
var/changed = 0
|
||||
|
||||
if(lying != lying_prev && rotate_on_lying)
|
||||
changed++
|
||||
ntransform.TurnTo(lying_prev,lying)
|
||||
if(lying == 0) //Lying to standing
|
||||
final_pixel_y = get_standard_pixel_y_offset()
|
||||
if(size_multiplier >= 1) //if its bigger than normal
|
||||
ntransform.Translate(0,16 * (size_multiplier-1))
|
||||
else
|
||||
if(lying_prev == 90)
|
||||
ntransform.Translate(16 * (size_multiplier-1),16 * (size_multiplier-1))
|
||||
|
||||
if(lying_prev == 270)
|
||||
ntransform.Translate(-16 * (size_multiplier-1),16 * (size_multiplier-1))
|
||||
|
||||
else //if(lying != 0)
|
||||
if(lying_prev == 0) //Standing to lying
|
||||
pixel_y = get_standard_pixel_y_offset()
|
||||
final_pixel_y = get_standard_pixel_y_offset(lying)
|
||||
if(lying == 90) //Check the angle of the sprite to offset it accordingly.
|
||||
ntransform.Translate(-16 * (size_multiplier-1),0)
|
||||
if(size_multiplier < 1) //if its smaller than normal
|
||||
ntransform.Translate(0,16 * (size_multiplier-1)) //we additionally offset the sprite downwards
|
||||
|
||||
if(lying == 270) //check the angle of the sprite to offset it accordingly
|
||||
ntransform.Translate(16 * (size_multiplier-1),0)
|
||||
if(size_multiplier < 1) //if its smaller than normal
|
||||
ntransform.Translate(0,16 * (size_multiplier-1)) //we additionally offset the sprite downwards
|
||||
|
||||
if(dir & (EAST|WEST)) //Facing east or west
|
||||
final_dir = pick(NORTH, SOUTH) //So you fall on your side rather than your face or ass
|
||||
|
||||
if(resize != RESIZE_DEFAULT_SIZE)
|
||||
changed++
|
||||
ntransform.Scale(resize)
|
||||
resize = RESIZE_DEFAULT_SIZE
|
||||
|
||||
//Apply size multiplier, thank NeverExisted for this
|
||||
if(size_multiplier != previous_size)
|
||||
changed++
|
||||
//now we offset the sprite
|
||||
//Scaling affects offset. There's probably a smarter and easier way to do this, but this way it works for sure (?)
|
||||
//Just to be clear. All this bullshit is needed because someone wanted to store the old transform matrix instead of using a new one each iteration
|
||||
//Winfre is currently doing a great job at coating my nuts in slobber while i code this
|
||||
if(!lying) //when standing. People of all sizes are affected equally
|
||||
ntransform.Translate(0,-16 * (previous_size-1)) //reset the sprite
|
||||
ntransform.Scale(size_multiplier/previous_size) //scale the sprite accordingly.
|
||||
ntransform.Translate(0,16 * (size_multiplier-1)) //apply the new offset
|
||||
else //when lying. Macros dont get an offset, Micros do. We must also check the cases when a micro becomes a macro and viceversa
|
||||
if(previous_size <= 1 && size_multiplier <= 1) //micro stays a micro. We modify the side-offset
|
||||
ntransform.Translate(0,-16 * (previous_size-1)) //reset the sprite
|
||||
ntransform.Scale(size_multiplier/previous_size) //scale the sprite accordingly
|
||||
ntransform.Translate(0,16 * (size_multiplier-1)) //apply the new offset
|
||||
|
||||
if(previous_size <= 1 && size_multiplier > 1) //micro becomes a macro. We remove the side-offset
|
||||
ntransform.Translate(0,-16 * (previous_size-1)) //reset the sprite
|
||||
ntransform.Scale(size_multiplier/previous_size) //scale the sprite accordingly
|
||||
|
||||
if(previous_size > 1 && size_multiplier <= 1) //macro becomes a micro. We add an offset
|
||||
ntransform.Scale(size_multiplier/previous_size) //scale the sprite accordingly.
|
||||
ntransform.Translate(0,16 * (size_multiplier-1)) //apply the new offset
|
||||
|
||||
if(previous_size > 1 && size_multiplier > 1) //macro stays a macro. We just scale the sprite with no offset changes
|
||||
ntransform.Scale(size_multiplier/previous_size) //scale the sprite accordingly
|
||||
|
||||
|
||||
if(changed)
|
||||
animate(src, transform = ntransform, time = 2, pixel_y = final_pixel_y, dir = final_dir, easing = EASE_IN|EASE_OUT)
|
||||
setMovetype(movement_type & ~FLOATING) // If we were without gravity, the bouncing animation got stopped, so we make sure we restart it in next life().
|
||||
|
||||
|
||||
/mob/proc/get_effective_size()
|
||||
return 100000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user