mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-28 07:20:09 +01:00
Makes cats glow when subjected to radiation (#9186)
Makes cat pets glow when subjected to radiation as per
This commit is contained in:
@@ -445,4 +445,4 @@
|
||||
return reagents
|
||||
|
||||
/mob/living/carbon/proc/should_have_organ(var/organ_check)
|
||||
return 0
|
||||
return 0
|
||||
@@ -1993,6 +1993,27 @@
|
||||
var/matrix/M = new()
|
||||
B.transform = M.Scale(scale)
|
||||
|
||||
/mob/living/carbon/human/apply_radiation_effects()
|
||||
. = ..()
|
||||
if(. == TRUE)
|
||||
if(src.is_diona())
|
||||
var/damage = rand(15, 30)
|
||||
src.adjustToxLoss(-damage)
|
||||
if(prob(5))
|
||||
damage = rand(20, 60)
|
||||
src.adjustToxLoss(-damage)
|
||||
to_chat(src, SPAN_NOTICE("You can feel flow of energy which makes you regenerate."))
|
||||
|
||||
src.apply_effect((rand(15,30)),IRRADIATE,blocked = src.getarmor(null, "rad"))
|
||||
if(prob(4))
|
||||
src.apply_effect((rand(20,60)),IRRADIATE,blocked = src.getarmor(null, "rad"))
|
||||
if (prob(75))
|
||||
randmutb(src) // Applies bad mutation
|
||||
domutcheck(src,null,MUTCHK_FORCED)
|
||||
else
|
||||
randmutg(src) // Applies good mutation
|
||||
domutcheck(src,null,MUTCHK_FORCED)
|
||||
|
||||
/mob/living/carbon/human/proc/get_accent_icon(var/datum/language/speaking = null)
|
||||
if(accent && speaking && speaking.allow_accents)
|
||||
var/used_accent = accent //starts with the mob's default accent
|
||||
|
||||
@@ -940,6 +940,16 @@ default behaviour is:
|
||||
update_icons()
|
||||
return TRUE
|
||||
|
||||
/mob/living/proc/apply_radiation_effects()
|
||||
var/area/A = get_area(src)
|
||||
if(!A)
|
||||
return FALSE
|
||||
if(isNotStationLevel(A.z))
|
||||
return FALSE
|
||||
if(A.flags & RAD_SHIELDED)
|
||||
return FALSE
|
||||
. = TRUE
|
||||
|
||||
/mob/living/Destroy()
|
||||
if(auras)
|
||||
for(var/a in auras)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
icon_living = "cat2"
|
||||
icon_dead = "cat2_dead"
|
||||
icon_rest = "cat2_rest"
|
||||
color = list(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1, 0,0,0,0)
|
||||
can_nap = 1
|
||||
speak = list("Meow!","Esp!","Purr!","HSSSSS")
|
||||
speak_emote = list("purrs", "meows")
|
||||
@@ -33,11 +34,19 @@
|
||||
var/mob/living/simple_animal/rat/rattarget = null
|
||||
seek_speed = 5
|
||||
pass_flags = PASSTABLE
|
||||
//Counter for how intense the radlight is
|
||||
var/radlight = 0
|
||||
//How many metabolism procs to wait before rapidly dropping the levels down so the cats stop glowing fairly quickly
|
||||
var/radlight_fade_delay = 10
|
||||
canbrush = TRUE
|
||||
possession_candidate = 1
|
||||
emote_sounds = list('sound/effects/creatures/cat_meow.ogg', 'sound/effects/creatures/cat_meow2.ogg')
|
||||
butchering_products = list(/obj/item/stack/material/animalhide/cat = 2)
|
||||
|
||||
/mob/living/simple_animal/cat/Initialize()
|
||||
. = ..()
|
||||
src.filters += filter(type="drop_shadow", size = 2, offset = 2, color = rgb(0,208,0,0))
|
||||
|
||||
/mob/living/simple_animal/cat/think()
|
||||
//MICE!
|
||||
..()
|
||||
@@ -96,10 +105,60 @@
|
||||
addtimer(CALLBACK(src, .proc/attack_mice), 3)
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/cat/proc/handle_radiation_light()
|
||||
radlight = clamp(radlight, 0, 98)
|
||||
if (radlight > 0)
|
||||
radlight_fade_delay = clamp(radlight_fade_delay-1, 0, 10)
|
||||
var/cc = radlight/120.0
|
||||
if(radlight_fade_delay == 0)
|
||||
radlight = clamp(radlight - 11, 0, 100)
|
||||
var/cshift = list()
|
||||
var/radintensity = round(radlight/33.0)
|
||||
switch(radintensity)
|
||||
if(0)
|
||||
cc = cc+(cc/2.0)
|
||||
cshift = list(1,cc,0,0, 0,1,0,0, 0,cc,1,0, 0,0,0,1, 0,0,0,0)
|
||||
if(1)
|
||||
cc = cc+(cc/2.0)
|
||||
cshift = list(1,0,0,0, 0,1,0,0, cc,cc,1,0, 0,0,0,1, 0,0,0,0)
|
||||
if(2)
|
||||
cshift = list(1,0,0,0, cc,1,0,0, cc,0,1,0, 0,0,0,1, 0,0,0,0)
|
||||
|
||||
if(color != cshift || radlight == 0)
|
||||
animate(src, color=cshift,time=8,flags=ANIMATION_PARALLEL)
|
||||
switch(radintensity)
|
||||
if(0)
|
||||
animate(src.filters[1], color=rgb(0,208,0,140), time=10, easing = SINE_EASING,flags=ANIMATION_PARALLEL)
|
||||
set_light(1.4, radlight/15, "#2cfa1f",)
|
||||
if(1)
|
||||
animate(src.filters[1], color=rgb(208,208,0,140), time=10, easing = SINE_EASING,flags=ANIMATION_PARALLEL)
|
||||
set_light(1.4, radlight/25, "#ffff00",)
|
||||
if(2)
|
||||
animate(src.filters[1], color=rgb(208,0,0,140), time=10, easing = SINE_EASING,flags=ANIMATION_PARALLEL)
|
||||
set_light(1.4, radlight/30, "#ca0b00",)
|
||||
if (radlight == 0)
|
||||
animate(src.filters[1], color=rgb(0,255,0,0), time=5,flags=ANIMATION_PARALLEL)
|
||||
color = color = list(1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1, 0,0,0,0)
|
||||
|
||||
/mob/living/simple_animal/cat/apply_radiation(var/rads)
|
||||
radlight += rads*2
|
||||
radlight_fade_delay = 10
|
||||
total_radiation += rads
|
||||
if (total_radiation < 0)
|
||||
total_radiation = 0
|
||||
|
||||
/mob/living/simple_animal/cat/death()
|
||||
.=..()
|
||||
stat = DEAD
|
||||
|
||||
/mob/living/simple_animal/cat/Life()
|
||||
. = ..()
|
||||
handle_radiation_light()
|
||||
|
||||
/mob/living/simple_animal/cat/apply_radiation_effects()
|
||||
. = ..()
|
||||
if(.)
|
||||
apply_effect((rand(30,60)),IRRADIATE,blocked=0)
|
||||
|
||||
/mob/living/simple_animal/cat/proc/handle_flee_target()
|
||||
//see if we should stop fleeing
|
||||
|
||||
Reference in New Issue
Block a user