- 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

View File

@@ -177,7 +177,7 @@
/obj/machinery/turret/proc/target()
while(src && check_target(cur_target))
while(src && enabled && !stat && check_target(cur_target))
src.dir = get_dir(src, cur_target)
shootAt(cur_target)
sleep(shot_delay)

View File

@@ -31,6 +31,10 @@
return
/obj/mecha/combat/marauder/relaymove(mob/user,direction)
if(user != src.occupant) //While not "realistic", this piece is player friendly.
user.loc = get_turf(src)
user << "You climb out from [src]"
return 0
if(!can_move)
return 0
if(zoom)

View File

@@ -172,7 +172,11 @@
//////////////////////////////////
/obj/mecha/relaymove(mob/user,direction)
if(!can_move || user != src.occupant)
if(user != src.occupant) //While not "realistic", this piece is player friendly.
user.loc = get_turf(src)
user << "You climb out from [src]"
return 0
if(!can_move)
return 0
if(connected_port)
if(world.time - last_message > 20)

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)