Cyborgs grabbing ore works consistently

This commit is contained in:
CitadelStationBot
2017-07-31 07:10:17 -05:00
parent f53d66b319
commit d3f488a5ee
3 changed files with 53 additions and 64 deletions

View File

@@ -656,29 +656,6 @@
add_overlay(head_overlay)
update_fire()
#define BORG_CAMERA_BUFFER 30
/mob/living/silicon/robot/proc/do_camera_update(oldLoc)
if(oldLoc != src.loc)
GLOB.cameranet.updatePortableCamera(src.camera)
updating = 0
/mob/living/silicon/robot/Move(a, b, flag)
var/oldLoc = src.loc
. = ..()
if(.)
if(src.camera)
if(!updating)
updating = 1
addtimer(CALLBACK(src, .proc/do_camera_update, oldLoc), BORG_CAMERA_BUFFER)
if(module)
if(istype(module, /obj/item/weapon/robot_module/miner))
if(istype(loc, /turf/open/floor/plating/asteroid))
for(var/obj/item/I in held_items)
if(istype(I, /obj/item/weapon/storage/bag/ore))
loc.attackby(I, src)
#undef BORG_CAMERA_BUFFER
/mob/living/silicon/robot/proc/self_destruct()
if(emagged)
if(mmi)

View File

@@ -1,3 +1,24 @@
/mob/living/silicon/robot/Moved(oldLoc, dir)
. = ..()
update_camera_location(oldLoc)
/mob/living/silicon/robot/forceMove(atom/destination)
. = ..()
update_camera_location(destination)
/mob/living/silicon/robot/proc/do_camera_update(oldLoc)
if(!QDELETED(camera) && oldLoc != get_turf(src))
GLOB.cameranet.updatePortableCamera(camera)
updating = FALSE
#define BORG_CAMERA_BUFFER 30
/mob/living/silicon/robot/proc/update_camera_location(oldLoc)
oldLoc = get_turf(oldLoc)
if(!QDELETED(camera) && !updating && oldLoc != get_turf(src))
updating = TRUE
addtimer(CALLBACK(src, .proc/do_camera_update, oldLoc), BORG_CAMERA_BUFFER)
#undef BORG_CAMERA_BUFFER
/mob/living/silicon/robot/Process_Spacemove(movement_dir = 0)
if(ionpulse())
return 1