mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Optimize a couple things
This commit is contained in:
@@ -14,8 +14,7 @@ GLOBAL_DATUM_INIT(overmap_event_handler, /decl/overmap_event_handler, new)
|
||||
// Acquire the list of not-yet utilized overmap turfs on this Z-level
|
||||
var/list/overmap_turfs = block(locate(OVERMAP_EDGE, OVERMAP_EDGE, z_level), locate(overmap_size - OVERMAP_EDGE, overmap_size - OVERMAP_EDGE, z_level))
|
||||
var/list/candidate_turfs = list()
|
||||
for(var/Trf in overmap_turfs)
|
||||
var/turf/T = Trf
|
||||
for(var/turf/T as anything in overmap_turfs)
|
||||
if(!(locate(/obj/effect/overmap/visitable) in T))
|
||||
candidate_turfs += T
|
||||
|
||||
|
||||
@@ -240,8 +240,7 @@
|
||||
|
||||
testing("Putting overmap on [global.using_map.overmap_z]")
|
||||
var/area/overmap/A = new
|
||||
for (var/square in block(locate(1,1,global.using_map.overmap_z), locate(global.using_map.overmap_size,global.using_map.overmap_size,global.using_map.overmap_z)))
|
||||
var/turf/T = square
|
||||
for(var/turf/T as anything in block(locate(1,1,global.using_map.overmap_z), locate(global.using_map.overmap_size,global.using_map.overmap_size,global.using_map.overmap_z)))
|
||||
if(T.x == 1 || T.y == 1 || T.x == global.using_map.overmap_size || T.y == global.using_map.overmap_size)
|
||||
T = T.ChangeTurf(/turf/unsimulated/map/edge)
|
||||
else
|
||||
|
||||
@@ -86,8 +86,7 @@
|
||||
controller = new(src)
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
|
||||
for(var/ship in SSshuttles.ships)
|
||||
var/obj/effect/overmap/visitable/ship/S = ship
|
||||
for(var/obj/effect/overmap/visitable/ship/S as anything in SSshuttles.ships)
|
||||
if(S.check_ownership(src))
|
||||
S.engines |= controller
|
||||
if(dir != S.fore_dir)
|
||||
|
||||
@@ -66,8 +66,7 @@
|
||||
var/turf/us = get_turf(src)
|
||||
|
||||
for(var/hz in hear_z)
|
||||
for(var/m in GLOB.players_by_zlevel[hz])
|
||||
var/mob/M = m
|
||||
for(var/mob/M as anything in GLOB.players_by_zlevel[hz])
|
||||
var/sound/SND = sound('sound/misc/emergency_beacon_launched.ogg') // Inside the loop because playsound_local modifies it for each person, so, need separate instances
|
||||
var/turf/them = get_turf(M)
|
||||
var/volume = max(0.20, 1-(get_dist(us,them) / mapsize*0.8))*100
|
||||
|
||||
Reference in New Issue
Block a user