mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-16 05:02:42 +00:00
Simple animals can now attack/interact (as described in my last commit) with:
Humanoid Aliens Alien Larva Monkeys Cyborgs AIs Metroids Other simple animals git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2810 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -202,6 +202,16 @@
|
|||||||
for (var/mob/O in viewers(src, null))
|
for (var/mob/O in viewers(src, null))
|
||||||
O.show_message("<B>[src]</B> [act].")
|
O.show_message("<B>[src]</B> [act].")
|
||||||
|
|
||||||
|
|
||||||
|
/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M as mob)
|
||||||
|
if(M.melee_damage_upper == 0)
|
||||||
|
M.emote("[M.friendly] [src]")
|
||||||
|
else
|
||||||
|
for(var/mob/O in viewers(src, null))
|
||||||
|
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||||
|
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||||
|
health -= damage
|
||||||
|
|
||||||
/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M as mob)
|
/mob/living/simple_animal/attack_hand(mob/living/carbon/human/M as mob)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
|||||||
@@ -558,6 +558,16 @@
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/humanoid/attack_animal(mob/living/simple_animal/M as mob)
|
||||||
|
if(M.melee_damage_upper == 0)
|
||||||
|
M.emote("[M.friendly] [src]")
|
||||||
|
else
|
||||||
|
for(var/mob/O in viewers(src, null))
|
||||||
|
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||||
|
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||||
|
adjustBruteLoss(damage)
|
||||||
|
updatehealth()
|
||||||
|
|
||||||
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M as mob)
|
/mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M as mob)
|
||||||
if (!ticker)
|
if (!ticker)
|
||||||
M << "You cannot attack people before the game has started."
|
M << "You cannot attack people before the game has started."
|
||||||
|
|||||||
@@ -284,6 +284,19 @@
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/mob/living/carbon/alien/larva/attack_animal(mob/living/simple_animal/M as mob)
|
||||||
|
if(M.melee_damage_upper == 0)
|
||||||
|
M.emote("[M.friendly] [src]")
|
||||||
|
else
|
||||||
|
for(var/mob/O in viewers(src, null))
|
||||||
|
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||||
|
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||||
|
adjustBruteLoss(damage)
|
||||||
|
updatehealth()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/alien/larva/attack_paw(mob/living/carbon/monkey/M as mob)
|
/mob/living/carbon/alien/larva/attack_paw(mob/living/carbon/monkey/M as mob)
|
||||||
if(!(istype(M, /mob/living/carbon/monkey))) return//Fix for aliens receiving double messages when attacking other aliens.
|
if(!(istype(M, /mob/living/carbon/monkey))) return//Fix for aliens receiving double messages when attacking other aliens.
|
||||||
|
|
||||||
|
|||||||
@@ -348,6 +348,17 @@
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/mob/living/carbon/metroid/attack_animal(mob/living/simple_animal/M as mob)
|
||||||
|
if(M.melee_damage_upper == 0)
|
||||||
|
M.emote("[M.friendly] [src]")
|
||||||
|
else
|
||||||
|
for(var/mob/O in viewers(src, null))
|
||||||
|
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||||
|
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||||
|
adjustBruteLoss(damage)
|
||||||
|
updatehealth()
|
||||||
|
|
||||||
/mob/living/carbon/metroid/attack_paw(mob/living/carbon/monkey/M as mob)
|
/mob/living/carbon/metroid/attack_paw(mob/living/carbon/monkey/M as mob)
|
||||||
if(!(istype(M, /mob/living/carbon/monkey))) return//Fix for aliens receiving double messages when attacking other aliens.
|
if(!(istype(M, /mob/living/carbon/monkey))) return//Fix for aliens receiving double messages when attacking other aliens.
|
||||||
|
|
||||||
|
|||||||
@@ -313,6 +313,15 @@
|
|||||||
updatehealth()
|
updatehealth()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/mob/living/carbon/monkey/attack_animal(mob/living/simple_animal/M as mob)
|
||||||
|
if(M.melee_damage_upper == 0)
|
||||||
|
M.emote("[M.friendly] [src]")
|
||||||
|
else
|
||||||
|
for(var/mob/O in viewers(src, null))
|
||||||
|
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||||
|
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||||
|
adjustBruteLoss(damage)
|
||||||
|
updatehealth()
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/monkey/attack_metroid(mob/living/carbon/metroid/M as mob)
|
/mob/living/carbon/monkey/attack_metroid(mob/living/carbon/metroid/M as mob)
|
||||||
|
|||||||
@@ -320,6 +320,19 @@
|
|||||||
M << "\red <b>ERROR</b>: \black Remote access channel disabled."
|
M << "\red <b>ERROR</b>: \black Remote access channel disabled."
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/mob/living/silicon/ai/attack_animal(mob/living/simple_animal/M as mob)
|
||||||
|
if(M.melee_damage_upper == 0)
|
||||||
|
M.emote("[M.friendly] [src]")
|
||||||
|
else
|
||||||
|
for(var/mob/O in viewers(src, null))
|
||||||
|
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||||
|
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||||
|
adjustBruteLoss(damage)
|
||||||
|
updatehealth()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/mob/living/silicon/ai/proc/switchCamera(var/obj/machinery/camera/C)
|
/mob/living/silicon/ai/proc/switchCamera(var/obj/machinery/camera/C)
|
||||||
usr:cameraFollow = null
|
usr:cameraFollow = null
|
||||||
if (!C)
|
if (!C)
|
||||||
|
|||||||
@@ -579,6 +579,17 @@
|
|||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/mob/living/silicon/robot/attack_animal(mob/living/simple_animal/M as mob)
|
||||||
|
if(M.melee_damage_upper == 0)
|
||||||
|
M.emote("[M.friendly] [src]")
|
||||||
|
else
|
||||||
|
for(var/mob/O in viewers(src, null))
|
||||||
|
O.show_message("\red <B>[M]</B> [M.attacktext] [src]!", 1)
|
||||||
|
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||||
|
adjustBruteLoss(damage)
|
||||||
|
updatehealth()
|
||||||
|
|
||||||
|
|
||||||
/mob/living/silicon/robot/attack_hand(mob/user)
|
/mob/living/silicon/robot/attack_hand(mob/user)
|
||||||
|
|
||||||
add_fingerprint(user)
|
add_fingerprint(user)
|
||||||
|
|||||||
Reference in New Issue
Block a user