mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Merge pull request #6707 from phil235/HostileAttackingTargetFix
Fixes player controlled hostile simple animal not calling AttackingTarget() for their melee attack.
This commit is contained in:
@@ -47,9 +47,9 @@ F
|
||||
emote("me", 1, "nashes at [.]!")
|
||||
|
||||
/mob/living/simple_animal/hostile/carp/AttackingTarget()
|
||||
. =..()
|
||||
var/mob/living/carbon/L = .
|
||||
if(istype(L))
|
||||
..()
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(prob(15))
|
||||
L.Weaken(3)
|
||||
L.visible_message("<span class='danger'>\the [src] knocks down \the [L]!</span>")
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
emote("me", 1, "wails at [.]!")
|
||||
|
||||
/mob/living/simple_animal/hostile/faithless/AttackingTarget()
|
||||
. =..()
|
||||
var/mob/living/L = .
|
||||
if(istype(L))
|
||||
..()
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(prob(12))
|
||||
L.Weaken(3)
|
||||
L.visible_message("<span class='danger'>\the [src] knocks down \the [L]!</span>")
|
||||
L.visible_message("<span class='danger'>\The [src] knocks down \the [L]!</span>")
|
||||
@@ -311,5 +311,6 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/RangedAttack(var/atom/A, var/params) //Player firing
|
||||
if(ranged && ranged_cooldown <= 0)
|
||||
target = A
|
||||
OpenFire(A)
|
||||
..()
|
||||
@@ -206,13 +206,13 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mimic/copy/AttackingTarget()
|
||||
. =..()
|
||||
..()
|
||||
if(knockdown_people)
|
||||
var/mob/living/L = .
|
||||
if(istype(L))
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(prob(15))
|
||||
L.Weaken(1)
|
||||
L.visible_message("<span class='danger'>\the [src] knocks down \the [L]!</span>")
|
||||
L.visible_message("<span class='danger'>\The [src] knocks down \the [L]!</span>")
|
||||
|
||||
//
|
||||
// Machine Mimics (Made by Malf AI)
|
||||
|
||||
@@ -88,7 +88,11 @@
|
||||
GiveTarget(watching)
|
||||
|
||||
/mob/living/simple_animal/hostile/statue/AttackingTarget()
|
||||
if(!can_be_seen())
|
||||
if(can_be_seen())
|
||||
if(client)
|
||||
src << "<span class='warning'>You cannot attack, there are eyes on you!</span>"
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/statue/DestroySurroundings()
|
||||
@@ -99,13 +103,6 @@
|
||||
if(!can_be_seen())
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/statue/UnarmedAttack()
|
||||
if(can_be_seen())
|
||||
if(client)
|
||||
src << "<span class='warning'>You cannot attack, there are eyes on you!</span>"
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/statue/proc/can_be_seen(var/turf/destination)
|
||||
if(!cannot_be_seen)
|
||||
return null
|
||||
|
||||
@@ -43,12 +43,12 @@
|
||||
emote("me", 1, "growls at [.].")
|
||||
|
||||
/mob/living/simple_animal/hostile/tree/AttackingTarget()
|
||||
. =..()
|
||||
var/mob/living/L = .
|
||||
if(istype(L))
|
||||
..()
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(prob(15))
|
||||
L.Weaken(3)
|
||||
L.visible_message("<span class='danger'>\the [src] knocks down \the [L]!</span>")
|
||||
L.visible_message("<span class='danger'>\The [src] knocks down \the [L]!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/tree/Die()
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user