This commit is contained in:
Vi3trice
2025-01-30 05:25:20 +00:00
committed by GitHub
parent 6fd94ae029
commit 1a2f97c100
@@ -46,19 +46,22 @@
#ifdef GAME_TESTS // DO NOT EAT MY CABLES DURING UNIT TESTS
return
#endif
if(prob(chew_probability) && isturf(loc))
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.get_available_power() && !HAS_TRAIT(src, TRAIT_SHOCKIMMUNE))
visible_message("<span class='warning'>[src] chews through [C]. It's toast!</span>")
playsound(src, 'sound/effects/sparks2.ogg', 100, 1)
toast() // mmmm toasty.
else
visible_message("<span class='warning'>[src] chews through [C].</span>")
investigate_log("was chewed through by a mouse in [get_area(F)]([F.x], [F.y], [F.z] - [ADMIN_JMP(F)])","wires")
C.deconstruct()
if(!prob(chew_probability) || !isfloorturf(loc))
return
var/turf/simulated/floor/F = get_turf(src)
if(F.intact || F.transparent_floor)
return
var/obj/structure/cable/C = locate() in F
if(!C || !prob(15))
return
if(C.get_available_power() && !HAS_TRAIT(src, TRAIT_SHOCKIMMUNE))
visible_message("<span class='warning'>[src] chews through [C]. It's toast!</span>")
playsound(src, 'sound/effects/sparks2.ogg', 100, 1)
toast() // mmmm toasty.
else
visible_message("<span class='warning'>[src] chews through [C].</span>")
investigate_log("was chewed through by a mouse in [get_area(F)]([F.x], [F.y], [F.z] - [ADMIN_JMP(F)])","wires")
C.deconstruct()
/mob/living/simple_animal/mouse/handle_automated_speech()
..()