mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 15:37:36 +01:00
fet (#28157)
This commit is contained in:
@@ -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()
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user