- Turrets should now disable properly

- Mobs can climb out from mechs (think chestbuster chestbusting or similar).
- Cleaned up alien weed code.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1495 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
panurgomatic
2011-04-24 02:00:35 +00:00
parent 58ffb9797f
commit 0504256a1c
4 changed files with 28 additions and 27 deletions
+18 -25
View File
@@ -1,10 +1,16 @@
/obj/alien/weeds/New()
..()
if(istype(src.loc, /turf/space))
del(src)
return
src.icon_state = pick("weeds", "weeds1", "weeds2")
spawn(rand(150,300))
if(src)
src.Life()
return
/obj/alien/weeds/proc/Life()
var/turf/U = src.loc
var/turf/U = get_turf(src)
/*
if (locate(/obj/movable, U))
U = locate(/obj/movable, U)
@@ -22,35 +28,22 @@ Alien plants should do something if theres a lot of poison
del(src)
return
for(var/dirn in cardinal)
var/turf/T = get_step(src, dirn)
direction_loop:
for(var/dirn in cardinal)
var/turf/T = get_step(src, dirn)
if (istype(T.loc, /area/arrival))
continue
if (!istype(T) || T.density || locate(/obj/alien/weeds) in T || istype(T.loc, /area/arrival) || istype(T, /turf/space))
continue
// if (locate(/obj/movable, T)) // don't propogate into movables
// continue
// if (locate(/obj/movable, T)) // don't propogate into movables
// continue
var/cont = 0
for(var/obj/O in T)
if(O.density)
cont = 1
break
for(var/obj/O in T)
if(O.density)
continue direction_loop
if(cont)
continue
new /obj/alien/weeds(T)
var/obj/alien/weeds/B = new /obj/alien/weeds(U)
B.icon_state = pick("weeds", "weeds1", "weeds2")
if(T.Enter(B,src) && !(locate(/obj/alien/weeds) in T))
B.loc = T
spawn(200)
if(B)
B.Life()
// open cell, so expand
else
del(B)
/obj/alien/weeds/ex_act(severity)
switch(severity)