mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
-Made tracking Cyborgs smoother by depending on their cameras first, and then checking to see if they're in camera vision.
-Corrosive Acid will check it still has a target before performing a tick. Made them a tiny bit quicker too, I wish they would take the time depending on w_class and or if anchored. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4616 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -45,10 +45,8 @@
|
||||
if(!hood.canremove)
|
||||
continue
|
||||
|
||||
if(!isturf(M.loc))
|
||||
continue
|
||||
// Now, are they viewable by a camera? (This is last because it's the most intensive check)
|
||||
if(!cameranet.checkCameraVis(M))
|
||||
if(!near_camera(M))
|
||||
continue
|
||||
|
||||
var/name = M.name
|
||||
@@ -105,11 +103,8 @@
|
||||
U << "Follow camera mode ended."
|
||||
U.cameraFollow = null
|
||||
return
|
||||
if (!isturf(target.loc)) //in a closet
|
||||
U << "Target is not on or near any active cameras on the station. We'll check again in 5 seconds (unless you use the cancel-camera verb)."
|
||||
sleep(50) //because we're sleeping another second after this (a few lines down)
|
||||
continue
|
||||
if(!cameranet.checkCameraVis(target))
|
||||
|
||||
if (!near_camera(target))
|
||||
U << "Target is not on or near any active cameras on the station. We'll check again in 5 seconds (unless you use the cancel-camera verb)."
|
||||
sleep(50) //because we're sleeping another second after this (a few lines down)
|
||||
continue
|
||||
@@ -121,6 +116,17 @@
|
||||
return
|
||||
sleep(10)
|
||||
|
||||
/proc/near_camera(var/mob/M)
|
||||
if (!isturf(M.loc))
|
||||
return 0
|
||||
if(isrobot(M))
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if(!(R.camera && R.camera.can_use()) && !cameranet.checkCameraVis(M))
|
||||
return 0
|
||||
else if(!cameranet.checkCameraVis(M))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/machinery/camera/attack_ai(var/mob/living/silicon/ai/user as mob)
|
||||
if (!istype(user))
|
||||
return
|
||||
|
||||
@@ -296,6 +296,8 @@ Alien plants should do something if theres a lot of poison
|
||||
var/ticks = 0
|
||||
|
||||
/obj/effect/alien/acid/proc/tick()
|
||||
if(!target)
|
||||
del(src)
|
||||
ticks += 1
|
||||
for(var/mob/O in hearers(src, null))
|
||||
O.show_message("\green <B>[src.target] sizzles and begins to melt under the bubbling mess of acid!</B>", 1)
|
||||
@@ -307,7 +309,7 @@ Alien plants should do something if theres a lot of poison
|
||||
del(target)
|
||||
del(src)
|
||||
return
|
||||
spawn(rand(200, 600)) tick()
|
||||
spawn(rand(200, 400)) tick()
|
||||
|
||||
/*
|
||||
* Egg
|
||||
|
||||
Reference in New Issue
Block a user