Skip to content

Commit

Permalink
camera optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
FalloutFalcon committed May 18, 2024
1 parent 8ccac2c commit 417829f
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions code/game/machinery/camera/presets.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,11 @@

/obj/machinery/camera/autoname/LateInitialize()
. = ..()
number = 1
var/area/A = get_area(src)
if(A)
for(var/obj/machinery/camera/autoname/C in GLOB.machines)
if(C == src)
continue
var/area/CA = get_area(C)
if(CA.type == A.type)
if(C.number)
number = max(number, C.number+1)
c_tag = "[A.name] #[number]"

var/static/list/autonames_in_areas = list()
var/area/camera_area = get_area(src)
number = autonames_in_areas[camera_area] + 1
autonames_in_areas[camera_area] = number
c_tag = "[format_text(camera_area.name)] #[number]"

// UPGRADE PROCS

Expand Down

0 comments on commit 417829f

Please sign in to comment.