Adds CanSmashTurfs proc for simple animals (#30152)

* Adds CanSmashTurfs proc for simple animals

* Changes
This commit is contained in:
ShizCalev
2017-08-25 12:39:01 +02:00
committed by AnturK
parent 9998e65257
commit 6741b652a7
2 changed files with 6 additions and 1 deletions
@@ -71,6 +71,9 @@
var/list/parts = target_bodyparts(target)
return ..() && !istype(the_target, /mob/living/carbon/monkey) && (!parts || parts.len > 3)
/mob/living/simple_animal/hostile/gorilla/CanSmashTurfs(turf/T)
return iswallturf(T)
/mob/living/simple_animal/hostile/gorilla/handle_automated_speech(override)
if(speak_chance && (override || prob(speak_chance)))
playsound(src, "sound/creatures/gorilla.ogg", 200)
@@ -357,13 +357,15 @@
P.fire()
return P
/mob/living/simple_animal/hostile/proc/CanSmashTurfs(turf/T)
return iswallturf(T) || ismineralturf(T)
/mob/living/simple_animal/hostile/proc/DestroySurroundings()
if(environment_smash)
EscapeConfinement()
for(var/dir in GLOB.cardinals)
var/turf/T = get_step(targets_from, dir)
if(iswallturf(T) || ismineralturf(T))
if(CanSmashTurfs(T))
if(T.Adjacent(targets_from))
T.attack_animal(src)
for(var/a in T)