From f6078aba783d2f1d8c7ac761c06e1edd64bb5fae Mon Sep 17 00:00:00 2001
From: "giacomand@gmail.com"
Date: Mon, 14 Jan 2013 17:46:33 +0000
Subject: [PATCH] - Bugfix for user created areas not correctly powering
machinery. - Fix for retaliating hostile mobs to not attack itself. - Grammar
fix for goats and cows. - Fix for malfunction and continuous rounds; which
doesn't stop the count down timer when the AI dies. - Spiderlings won't grow
inside vents and spiderlings are much easier to kill, can be shot with a
projectile and display a message after dying.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5548 316c924e-a436-60f5-8080-3fe189b3f50e
---
.../game/gamemodes/malfunction/malfunction.dm | 1 +
code/game/objects/effects/spiders.dm | 26 ++++++++++++++-----
code/game/objects/items/blueprints.dm | 1 +
.../simple_animal/friendly/farm_animals.dm | 4 +--
.../hostile/retaliate/retaliate.dm | 6 +++--
5 files changed, 28 insertions(+), 10 deletions(-)
diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm
index 3ae48074642..f1d371ee988 100644
--- a/code/game/gamemodes/malfunction/malfunction.dm
+++ b/code/game/gamemodes/malfunction/malfunction.dm
@@ -136,6 +136,7 @@
if(config.continous_rounds)
if(emergency_shuttle)
emergency_shuttle.always_fake_recall = 0
+ malf_mode_declared = 0
else
return 1
return ..() //check for shuttle and nuke
diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm
index 21da336e979..27a1505636e 100644
--- a/code/game/objects/effects/spiders.dm
+++ b/code/game/objects/effects/spiders.dm
@@ -38,6 +38,11 @@
health -= damage
healthcheck()
+/obj/effect/spider/bullet_act(var/obj/item/projectile/Proj)
+ ..()
+ health -= Proj.damage
+ healthcheck()
+
/obj/effect/spider/proc/healthcheck()
if(health <= 0)
del(src)
@@ -89,6 +94,7 @@
icon_state = "spiderling"
anchored = 0
layer = 2.7
+ health = 3
var/amount_grown = 0
var/obj/machinery/atmospherics/unary/vent_pump/entry_vent
var/travelling_in_vent = 0
@@ -103,6 +109,14 @@
else
..()
+/obj/effect/spider/spiderling/proc/die()
+ visible_message("[src] dies!")
+ del(src)
+
+/obj/effect/spider/spiderling/healthcheck()
+ if(health <= 0)
+ die()
+
/obj/effect/spider/spiderling/process()
if(travelling_in_vent)
if(istype(src.loc, /turf))
@@ -162,12 +176,12 @@
entry_vent = v
walk_to(src, entry_vent, 1)
break
-
- amount_grown += rand(0,2)
- if(amount_grown >= 100)
- var/spawn_type = pick(typesof(/mob/living/simple_animal/hostile/giant_spider))
- new spawn_type(src.loc)
- del(src)
+ if(isturf(loc))
+ amount_grown += rand(0,2)
+ if(amount_grown >= 100)
+ var/spawn_type = pick(typesof(/mob/living/simple_animal/hostile/giant_spider))
+ new spawn_type(src.loc)
+ del(src)
/obj/effect/spider/cocoon
name = "cocoon"
diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm
index 6847c684d17..aa8f419b575 100644
--- a/code/game/objects/items/blueprints.dm
+++ b/code/game/objects/items/blueprints.dm
@@ -129,6 +129,7 @@ move an amendment to the drawing.
A.power_equip = 0
A.power_light = 0
A.power_environ = 0
+ A.always_unpowered = 0
move_turfs_to_area(turfs, A)
spawn(5)
//ma = A.master ? "[A.master]" : "(null)"
diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
index 55b351d1c10..d398a483f5b 100644
--- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
+++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm
@@ -66,7 +66,7 @@
/mob/living/simple_animal/hostile/retaliate/goat/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(stat == CONSCIOUS && istype(O, /obj/item/weapon/reagent_containers/glass))
- user.visible_message("[user] milks [src] using the [O].")
+ user.visible_message("[user] milks [src] using \the [O].")
var/obj/item/weapon/reagent_containers/glass/G = O
var/transfered = udder.trans_id_to(G, "milk", rand(5,10))
if(G.reagents.total_volume >= G.volume)
@@ -106,7 +106,7 @@
/mob/living/simple_animal/cow/attackby(var/obj/item/O as obj, var/mob/user as mob)
if(stat == CONSCIOUS && istype(O, /obj/item/weapon/reagent_containers/glass))
- user.visible_message("[user] milks [src] using the [O].")
+ user.visible_message("[user] milks [src] using \the [O].")
var/obj/item/weapon/reagent_containers/glass/G = O
var/transfered = udder.trans_id_to(G, "milk", rand(5,10))
if(G.reagents.total_volume >= G.volume)
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm
index 3ad54193e5e..352574de2a7 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/retaliate.dm
@@ -17,11 +17,13 @@
var/list/mobs_around = viewers(src, 7)
for(var/mob/living/M in mobs_around)
- if(!attack_same && istype(M, type))
+ if(M == src)
+ continue
+ if(!attack_same && M.faction != faction)
enemies += M
for(var/mob/living/simple_animal/hostile/retaliate/H in mobs_around)
- if(istype(H, src.type))
+ if(!attack_same && !H.attack_same && H.faction == faction)
H.enemies += enemies
return 0