Skip to content

Commit

Permalink
Merge pull request tgstation#55812 from coiax/tom-fears-no-cable
Browse files Browse the repository at this point in the history
Tweak mice eating cables and electrical immunity
  • Loading branch information
Cyberboss authored Dec 31, 2020
2 parents cec70be + d4bc847 commit 25deeb3
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions code/modules/mob/living/simple_animal/friendly/mouse.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,17 @@
if(istype(F) && !F.intact)
var/obj/structure/cable/C = locate() in F
if(C && prob(15))
if(C.avail())
var/powered = C.avail()
if(powered && !HAS_TRAIT(src, TRAIT_SHOCKIMMUNE))
visible_message("<span class='warning'>[src] chews through the [C]. It's toast!</span>")
playsound(src, 'sound/effects/sparks2.ogg', 100, TRUE)
C.deconstruct()
death(toast=1)
death(toast = TRUE)
else
C.deconstruct()
visible_message("<span class='warning'>[src] chews through the [C].</span>")

C.deconstruct()
if(powered)
playsound(src, 'sound/effects/sparks2.ogg', 100, TRUE)

for(var/obj/item/food/cheesewedge/cheese in range(1, src))
if(prob(10))
be_fruitful()
Expand Down Expand Up @@ -181,6 +184,11 @@
pet_bonus = TRUE
pet_bonus_emote = "squeaks happily!"

/mob/living/simple_animal/mouse/brown/tom/Initialize()
. = ..()
// Tom fears no cable.
ADD_TRAIT(src, TRAIT_SHOCKIMMUNE, SPECIES_TRAIT)

/obj/item/food/deadmouse
name = "dead mouse"
desc = "It looks like somebody dropped the bass on it. A lizard's favorite meal."
Expand Down

0 comments on commit 25deeb3

Please sign in to comment.