mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-04 06:31:47 +00:00
Merge pull request #11808 from Couls/fat-mice
Mice now have a chance of chewing through wires
This commit is contained in:
@@ -34,13 +34,29 @@
|
||||
holder_type = /obj/item/holder/mouse
|
||||
can_collar = 1
|
||||
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
|
||||
var/chew_probability = 1
|
||||
|
||||
/mob/living/simple_animal/mouse/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/squeak, list('sound/creatures/mousesqueak.ogg' = 1), 100)
|
||||
|
||||
/mob/living/simple_animal/mouse/handle_automated_action()
|
||||
if(prob(chew_probability))
|
||||
var/turf/simulated/floor/F = get_turf(src)
|
||||
if(istype(F) && !F.intact)
|
||||
var/obj/structure/cable/C = locate() in F
|
||||
if(C && prob(15))
|
||||
if(C.avail())
|
||||
visible_message("<span class='warning'>[src] chews through [C]. It's toast!</span>")
|
||||
playsound(src, 'sound/effects/sparks2.ogg', 100, 1)
|
||||
C.deconstruct()
|
||||
toast() // mmmm toasty.
|
||||
else
|
||||
C.deconstruct()
|
||||
visible_message("<span class='warning'>[src] chews through [C].</span>")
|
||||
|
||||
/mob/living/simple_animal/mouse/handle_automated_speech()
|
||||
..()
|
||||
..()
|
||||
if(prob(speak_chance))
|
||||
for(var/mob/M in view())
|
||||
M << squeak_sound
|
||||
@@ -98,7 +114,12 @@
|
||||
to_chat(M, "<span class='notice'>[bicon(src)] Squeek!</span>")
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/mouse/death(gibbed)
|
||||
/mob/living/simple_animal/mouse/proc/toast()
|
||||
add_atom_colour("#3A3A3A", FIXED_COLOUR_PRIORITY)
|
||||
desc = "It's toast."
|
||||
death()
|
||||
|
||||
/mob/living/simple_animal/mouse/death(gibbed)
|
||||
// Only execute the below if we successfully died
|
||||
playsound(src, squeak_sound, 40, 1)
|
||||
. = ..(gibbed)
|
||||
|
||||
Reference in New Issue
Block a user