[MIRROR] (i found some cigs) touches up cameranet code and makes it add only one vis_contents to all turfs for static (adding and removing when ai moves in/out of chunk gone) (#5785)

* Touches up cameranet code (#59165)

makes it add only one vis_contents to all turfs for static (adding and removing when ai moves in/out of chunk gone)

original pr: #58522
basically the same but ai's moving in/out of the chunk doesnt affect vis_contents anymore because that was really racking up tidi for some reason.
Why It's Good For The Game

less maptick because theres only 1 vis_contents added instead of 2 and general optimizations to cameranet code

* (i found some cigs) touches up cameranet code and makes it add only one vis_contents to all turfs for static (adding and removing when ai moves in/out of chunk gone)

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
This commit is contained in:
SkyratBot
2021-05-19 14:17:25 +01:00
committed by GitHub
co-authored by Kylerace
parent 0c7315a7cd
commit 2c7daa751d
9 changed files with 94 additions and 141 deletions
+3 -4
View File
@@ -106,7 +106,7 @@
/obj/item/multitool/ai_detect/proc/show_hud(mob/user)
if(user && hud_type)
var/atom/movable/screen/plane_master/camera_static/PM = user.hud_used.plane_masters["[CAMERA_STATIC_PLANE]"]
PM.alpha = 150
PM.alpha = 64
var/datum/atom_hud/H = GLOB.huds[hud_type]
if(!H.hudusers[user])
H.add_hud_to(user)
@@ -148,7 +148,6 @@
/mob/camera/ai_eye/remote/ai_detector
name = "AI detector eye"
ai_detector_visible = FALSE
use_static = USE_STATIC_TRANSPARENT
visible_icon = FALSE
/datum/action/item_action/toggle_multitool
@@ -157,11 +156,11 @@
/datum/action/item_action/toggle_multitool/Trigger()
if(!..())
return 0
return FALSE
if(target)
var/obj/item/multitool/ai_detect/M = target
M.toggle_hud(owner)
return 1
return TRUE
/obj/item/multitool/abductor
name = "alien multitool"