From d5738657cc49c34cd0d8f191af0a261d88e812a0 Mon Sep 17 00:00:00 2001 From: "sieve32@gmail.com" Date: Fri, 27 Jul 2012 02:55:11 +0000 Subject: [PATCH] Fixed an issue with AIs not being properly listed (Gotta love that special-snowflake code). While I was at it, implemented the attack sounds for simple animals, most importantly constructs. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4189 316c924e-a436-60f5-8080-3fe189b3f50e --- .../modules/mob/living/carbon/alien/humanoid/humanoid.dm | 2 ++ code/modules/mob/living/carbon/human/human.dm | 2 ++ code/modules/mob/living/carbon/metroid/metroid.dm | 2 ++ code/modules/mob/living/carbon/monkey/monkey.dm | 2 ++ code/modules/mob/living/silicon/ai/ai.dm | 3 +++ code/modules/mob/living/silicon/robot/robot.dm | 2 ++ code/modules/mob/living/simple_animal/behemoth.dm | 1 + code/modules/mob/living/simple_animal/constructs.dm | 9 +++++++++ code/modules/mob/living/simple_animal/life.dm | 2 ++ 9 files changed, 25 insertions(+) diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 6b63ad92ede..99a19402250 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -338,6 +338,8 @@ if(M.melee_damage_upper == 0) M.emote("[M.friendly] [src]") else + if(M.attack_sound) + playsound(loc, M.attack_sound, 50, 1, 1) for(var/mob/O in viewers(src, null)) O.show_message("\red [M] [M.attacktext] [src]!", 1) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 925cdb0f123..5891c5c2461 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -363,6 +363,8 @@ if(M.melee_damage_upper == 0) M.emote("[M.friendly] [src]") else + if(M.attack_sound) + playsound(loc, M.attack_sound, 50, 1, 1) for(var/mob/O in viewers(src, null)) O.show_message("\red [M] [M.attacktext] [src]!", 1) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index 4b9fd879d25..0bb4e003a57 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -319,6 +319,8 @@ if(M.melee_damage_upper == 0) M.emote("[M.friendly] [src]") else + if(M.attack_sound) + playsound(loc, M.attack_sound, 50, 1, 1) for(var/mob/O in viewers(src, null)) O.show_message("\red [M] [M.attacktext] [src]!", 1) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 41170bb7824..3128c55f26a 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -316,6 +316,8 @@ if(M.melee_damage_upper == 0) M.emote("[M.friendly] [src]") else + if(M.attack_sound) + playsound(loc, M.attack_sound, 50, 1, 1) for(var/mob/O in viewers(src, null)) O.show_message("\red [M] [M.attacktext] [src]!", 1) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 9474c1b869e..c1f49bbf7fc 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -60,6 +60,7 @@ spawn(0) ainame(src) living_mob_list += src + mob_list += src return @@ -347,6 +348,8 @@ if(M.melee_damage_upper == 0) M.emote("[M.friendly] [src]") else + if(M.attack_sound) + playsound(loc, M.attack_sound, 50, 1, 1) for(var/mob/O in viewers(src, null)) O.show_message("\red [M] [M.attacktext] [src]!", 1) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index b9551cd290f..5dfde1342b3 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -666,6 +666,8 @@ if(M.melee_damage_upper == 0) M.emote("[M.friendly] [src]") else + if(M.attack_sound) + playsound(loc, M.attack_sound, 50, 1, 1) for(var/mob/O in viewers(src, null)) O.show_message("\red [M] [M.attacktext] [src]!", 1) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) diff --git a/code/modules/mob/living/simple_animal/behemoth.dm b/code/modules/mob/living/simple_animal/behemoth.dm index cda54e35043..3a5d9bf14bb 100644 --- a/code/modules/mob/living/simple_animal/behemoth.dm +++ b/code/modules/mob/living/simple_animal/behemoth.dm @@ -29,6 +29,7 @@ a_intent = "harm" stop_automated_movement = 1 status_flags = CANPARALYSE + attack_sound = 'punch4.ogg' var/energy = 0 var/max_energy = 1000 diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index b6daba20d63..722c863dd1c 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -32,6 +32,7 @@ a_intent = "harm" stop_automated_movement = 1 status_flags = CANPARALYSE + attack_sound = 'punch3.ogg' Life() @@ -108,6 +109,8 @@ if(M.melee_damage_upper <= 0) M.emote("[M.friendly] \the [src]") else + if(M.attack_sound) + playsound(loc, M.attack_sound, 50, 1, 1) for(var/mob/O in viewers(src, null)) O.show_message("\The [M] [M.attacktext] \the [src]!", 1) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) @@ -169,6 +172,7 @@ stop_automated_movement = 1 status_flags = CANPARALYSE see_in_dark = 7 + attack_sound = 'bladeslice.ogg' Life() ..() @@ -238,6 +242,8 @@ if(M.melee_damage_upper <= 0) M.emote("[M.friendly] \the [src]") else + if(M.attack_sound) + playsound(loc, M.attack_sound, 50, 1, 1) for(var/mob/O in viewers(src, null)) O.show_message("\The [M] [M.attacktext] \the [src]!", 1) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) @@ -300,6 +306,7 @@ a_intent = "harm" stop_automated_movement = 1 status_flags = CANPARALYSE + attack_sound = 'punch2.ogg' Life() ..() @@ -320,6 +327,8 @@ if(M.melee_damage_upper <= 0) M.emote("[M.friendly] \the [src]") else + if(M.attack_sound) + playsound(loc, M.attack_sound, 50, 1, 1) for(var/mob/O in viewers(src, null)) O.show_message("\The [M] [M.attacktext] \the [src]!", 1) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) diff --git a/code/modules/mob/living/simple_animal/life.dm b/code/modules/mob/living/simple_animal/life.dm index 51af460178c..2fd5572e188 100644 --- a/code/modules/mob/living/simple_animal/life.dm +++ b/code/modules/mob/living/simple_animal/life.dm @@ -255,6 +255,8 @@ if(M.melee_damage_upper == 0) M.emote("[M.friendly] [src]") else + if(M.attack_sound) + playsound(loc, M.attack_sound, 50, 1, 1) for(var/mob/O in viewers(src, null)) O.show_message("\red [M] [M.attacktext] [src]!", 1) var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)