Ports the TG globals controller and converts globals. (#18057)

* SDQL2 update

* fix that verb

* cl

* fix that

* toworld

* this is pointless

* update info

* siiiiick..

* vv edit update

* fix that

* fix editing vars

* fix VV

* Port the /TG/ globals controller.

* part 1

* part 2

* oops

* part 3

* Hollow Purple

* sadas

* bsbsdb

* muda na agaki ta

* ids 1-15

* 16-31

* 41-75

* bring me back to how things used to be before i lost it all

* the strength of mayhem

* final touches

* cl

* protect some vars

* update sdql2 to use glob

* stuff?

* forgot that is not defined there

* whoops

* observ

* but it never gets better

* a

---------

Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Matt Atlas
2023-12-26 01:16:02 +00:00
committed by GitHub
co-authored by Matt Atlas
parent 19292f01d3
commit cadd19beac
966 changed files with 4785 additions and 4784 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
//How far from the edge of overmap zlevel could randomly placed objects spawn
#define OVERMAP_EDGE 2
//Dimension of overmap (squares 4 lyfe)
var/global/list/map_sectors = list()
GLOBAL_LIST_EMPTY(map_sectors)
/area/overmap/
name = "System Map"
@@ -180,11 +180,11 @@
if(tracker in trackers)
trackers -= tracker
destroyed_event.unregister(tracker, src, PROC_REF(remove_tracker))
GLOB.destroyed_event.unregister(tracker, src, PROC_REF(remove_tracker))
to_chat(user, SPAN_NOTICE("You unlink the tracker in \the [P]'s buffer from \the [src]."))
return
trackers += tracker
destroyed_event.register(tracker, src, PROC_REF(remove_tracker))
GLOB.destroyed_event.register(tracker, src, PROC_REF(remove_tracker))
to_chat(user, SPAN_NOTICE("You link the tracker in \the [P]'s buffer to \the [src]."))
/obj/machinery/computer/ship/sensors/proc/remove_tracker(var/obj/item/ship_tracker/tracker)
+5 -5
View File
@@ -126,13 +126,13 @@
if(!active_hazards.len)
hazard_by_turf -= T
entered_event.unregister(T, src, PROC_REF(on_turf_entered))
exited_event.unregister(T, src, PROC_REF(on_turf_exited))
GLOB.entered_event.unregister(T, src, PROC_REF(on_turf_entered))
GLOB.exited_event.unregister(T, src, PROC_REF(on_turf_exited))
else
hazard_by_turf |= T
hazard_by_turf[T] = active_hazards
entered_event.register(T, src, PROC_REF(on_turf_entered))
exited_event.register(T, src, PROC_REF(on_turf_exited))
GLOB.entered_event.register(T, src, PROC_REF(on_turf_entered))
GLOB.exited_event.register(T, src, PROC_REF(on_turf_exited))
for(var/obj/effect/overmap/visitable/ship/ship in T)
var/list/active_ship_events = ship_events[ship]
@@ -212,7 +212,7 @@
start_moving()
/obj/effect/overmap/event/proc/start_moving()
if(!moving_dir) moving_dir = pick(alldirs)
if(!moving_dir) moving_dir = pick(GLOB.alldirs)
START_PROCESSING(SSprocessing, src)
/obj/effect/overmap/event/process()
@@ -15,7 +15,7 @@
/turf/simulated/floor/exoplanet/New()
if(current_map.use_overmap)
var/obj/effect/overmap/visitable/sector/exoplanet/E = map_sectors["[z]"]
var/obj/effect/overmap/visitable/sector/exoplanet/E = GLOB.map_sectors["[z]"]
if(istype(E))
if(E.atmosphere)
initial_gas = E.atmosphere.gas.Copy()
@@ -72,7 +72,7 @@
add_overlay(resource_indicator)
if(LAZYLEN(decals))
add_overlay(decals)
for(var/direction in cardinal)
for(var/direction in GLOB.cardinal)
var/turf/turf_to_check = get_step(src,direction)
if(!istype(turf_to_check, type))
var/image/rock_side = image(icon, "edge[pick(0,1,2)]", dir = turn(direction, 180))
@@ -168,7 +168,7 @@
/turf/simulated/floor/exoplanet/grass/Initialize()
. = ..()
if(current_map.use_overmap)
var/obj/effect/overmap/visitable/sector/exoplanet/E = map_sectors["[z]"]
var/obj/effect/overmap/visitable/sector/exoplanet/E = GLOB.map_sectors["[z]"]
if(istype(E) && E.grass_color)
color = E.grass_color
if(!resources)
@@ -223,7 +223,7 @@
/turf/unsimulated/planet_edge/Initialize()
. = ..()
var/obj/effect/overmap/visitable/sector/exoplanet/E = map_sectors["[z]"]
var/obj/effect/overmap/visitable/sector/exoplanet/E = GLOB.map_sectors["[z]"]
if(!istype(E))
return
var/nx = x
@@ -250,7 +250,7 @@
/turf/unsimulated/planet_edge/CollidedWith(atom/movable/A)
. = ..()
var/obj/effect/overmap/visitable/sector/exoplanet/E = map_sectors["[z]"]
var/obj/effect/overmap/visitable/sector/exoplanet/E = GLOB.map_sectors["[z]"]
if(!istype(E))
return
if(E.planetary_area && istype(loc, world.area))
@@ -49,5 +49,5 @@
icon_state = "drift"
/obj/effect/floor_decal/dune/random/Initialize(mapload, newdir, newcolour, bypass, set_icon_state)
supplied_dir = pick(cardinal)
supplied_dir = pick(GLOB.cardinal)
. = ..()
@@ -9,7 +9,7 @@
/turf/simulated/floor/exoplanet/grass/Initialize()
. = ..()
if(current_map.use_overmap)
var/obj/effect/overmap/visitable/sector/exoplanet/E = map_sectors["[z]"]
var/obj/effect/overmap/visitable/sector/exoplanet/E = GLOB.map_sectors["[z]"]
if(color && istype(E) && E.grass_color)
color = E.grass_color
if(!resources)
+5 -5
View File
@@ -166,8 +166,8 @@
var/mob_type = pick(repopulate_types)
var/mob/S = new mob_type(T)
animals += S
death_event.register(S, src, PROC_REF(remove_animal))
destroyed_event.register(S, src, PROC_REF(remove_animal))
GLOB.death_event.register(S, src, PROC_REF(remove_animal))
GLOB.destroyed_event.register(S, src, PROC_REF(remove_animal))
adapt_animal(S)
if(animals.len >= max_animal_count)
repopulating = 0
@@ -188,8 +188,8 @@
/obj/effect/overmap/visitable/sector/exoplanet/proc/remove_animal(var/mob/M)
animals -= M
death_event.unregister(M, src)
destroyed_event.unregister(M, src)
GLOB.death_event.unregister(M, src)
GLOB.destroyed_event.unregister(M, src)
repopulate_types |= M.type
/obj/effect/overmap/visitable/sector/exoplanet/proc/generate_map()
@@ -445,7 +445,7 @@
return INITIALIZE_HINT_LATELOAD
/obj/effect/landmark/exoplanet_spawn/LateInitialize(mapload)
var/obj/effect/overmap/visitable/sector/exoplanet/E = map_sectors["[z]"]
var/obj/effect/overmap/visitable/sector/exoplanet/E = GLOB.map_sectors["[z]"]
if (istype(E))
do_spawn(E)
@@ -258,7 +258,7 @@
gen_turf.resources[ORE_SAND] = rand(3, 5)
gen_turf.resources[ORE_COAL] = rand(3, 5)
if(ground_resources_roll)
var/image/resource_indicator = image('icons/obj/mining.dmi', null, "indicator_" + ground_resources_roll, gen_turf.layer, pick(cardinal))
var/image/resource_indicator = image('icons/obj/mining.dmi', null, "indicator_" + ground_resources_roll, gen_turf.layer, pick(GLOB.cardinal))
resource_indicator.alpha = rand(30, 60)
gen_turf.resource_indicator = resource_indicator
if(!gen_turf.density)
@@ -351,7 +351,7 @@
var/coord_to_str = (world.maxx * M.y) + M.x
for(var/ore in ore_seeds)
if(text2num(ore_seeds[ore][coord_to_str]))
M.mineral = ore_data[ore]
M.mineral = GLOB.ore_data[ore]
M.UpdateMineral() // It's already a mineral turf, so we can avoid changeturf here
/datum/exoplanet_theme/proc/get_planet_image_extra()
+1 -1
View File
@@ -130,7 +130,7 @@
if(!istype(GS.linked.loc, /turf/unsimulated/map))
to_chat(H, SPAN_WARNING("The safeties won't let you target while you're not on the Overmap!"))
return
var/my_sector = map_sectors["[H.z]"]
var/my_sector = GLOB.map_sectors["[H.z]"]
if(istype(my_sector, /obj/effect/overmap/visitable))
var/obj/effect/overmap/visitable/V = my_sector
if(V != src && length(V.ship_weapons)) //no guns, no lockon
+2 -2
View File
@@ -80,7 +80,7 @@ var/global/area/overmap/map_overmap // Global object used to locate the overmap
var/map_high = current_map.overmap_size - OVERMAP_EDGE
var/turf/home
if (place_near_main)
var/obj/effect/overmap/visitable/main = map_sectors["1"] ? map_sectors["1"] : map_sectors[map_sectors[1]]
var/obj/effect/overmap/visitable/main = GLOB.map_sectors["1"] ? GLOB.map_sectors["1"] : GLOB.map_sectors[GLOB.map_sectors[1]]
if(islist(place_near_main))
place_near_main = Roundm(Frand(place_near_main[1], place_near_main[2]), 0.1)
home = CircularRandomTurfAround(main, abs(place_near_main), map_low, map_low, map_high, map_high)
@@ -141,7 +141,7 @@ var/global/area/overmap/map_overmap // Global object used to locate the overmap
/obj/effect/overmap/visitable/proc/register_z_levels()
for(var/zlevel in map_z)
map_sectors["[zlevel]"] = src
GLOB.map_sectors["[zlevel]"] = src
current_map.player_levels |= map_z
if(!in_space)
@@ -168,13 +168,13 @@
/obj/item/ship_ammunition/touch_map_edge(var/new_z)
if(isprojectile(loc))
transfer_to_overmap(new_z)
origin = map_sectors["[new_z]"]
origin = GLOB.map_sectors["[new_z]"]
return TRUE
else
. = ..()
/obj/item/ship_ammunition/proc/transfer_to_overmap(var/new_z)
var/obj/effect/overmap/start_object = map_sectors["[new_z]"]
var/obj/effect/overmap/start_object = GLOB.map_sectors["[new_z]"]
if(!start_object)
return FALSE
@@ -221,7 +221,7 @@
/obj/item/projectile/ship_ammo/touch_map_edge()
if(primed)
for(var/mob/living/carbon/human/H in human_mob_list)
for(var/mob/living/carbon/human/H in GLOB.human_mob_list)
if(AreConnectedZLevels(H.z, z))
to_chat(H, SPAN_WARNING("The flooring below you vibrates a little as shells fly by the hull of the ship!"))
H.playsound_simple(null, 'sound/effects/explosionfar.ogg', 25)
@@ -137,19 +137,19 @@
/obj/machinery/ship_weapon/proc/on_fire() //We just fired! Cool effects!
if(firing_effects & FIRING_EFFECT_FLAG_EXTREMELY_LOUD)
var/list/connected_z_levels = GetConnectedZlevels(z)
for(var/mob/living/carbon/human/H in player_list)
for(var/mob/living/carbon/human/H in GLOB.player_list)
if(H.z in connected_z_levels)
sound_to(H, sound(heavy_firing_sound, volume = 50))
if(H.is_listening())
H.adjustEarDamage(rand(0, 5), 2, TRUE)
else if(firing_effects & FIRING_EFFECT_FLAG_SILENT)
for(var/mob/living/carbon/human/H in human_mob_list)
for(var/mob/living/carbon/human/H in GLOB.human_mob_list)
if(get_area(H) == get_area(src))
sound_to(H, sound(heavy_firing_sound, volume = 50))
if(H.is_listening())
H.adjustEarDamage(rand(0, 5), 2, TRUE)
else
for(var/mob/living/carbon/human/H in human_mob_list)
for(var/mob/living/carbon/human/H in GLOB.human_mob_list)
var/list/connected_z_levels = GetConnectedZlevels(z)
if(get_area(H) == get_area(src))
sound_to(H, sound(heavy_firing_sound, volume = 50))
@@ -160,19 +160,19 @@
sound_to(H, sound(light_firing_sound, volume = 50))
if(screenshake_type == SHIP_GUN_SCREENSHAKE_ALL_MOBS)
var/list/connected_z_levels = GetConnectedZlevels(z)
for(var/mob/living/carbon/human/H in human_mob_list)
for(var/mob/living/carbon/human/H in GLOB.human_mob_list)
if(H.z in connected_z_levels)
to_chat(H, SPAN_DANGER("<font size=4>Your legs buckle as the ground shakes beneath you!</font>"))
shake_camera(H, 10, 5)
else if(screenshake_type == SHIP_GUN_SCREENSHAKE_SCREEN)
for(var/mob/living/carbon/human/H in human_mob_list)
for(var/mob/living/carbon/human/H in GLOB.human_mob_list)
if(get_area(H) == get_area(src))
if(!H.buckled_to)
to_chat(H, SPAN_DANGER("<font size=4>Your legs buckle as the ground shakes beneath you!</font>"))
shake_camera(H, 10, 5)
if(firing_effects & FIRING_EFFECT_FLAG_THROW_MOBS)
var/list/connected_z_levels = GetConnectedZlevels(z)
for(var/mob/M in living_mob_list)
for(var/mob/M in GLOB.living_mob_list)
if(M.z in connected_z_levels)
if(!M.Check_Shoegrip() && !M.buckled_to && !M.anchored)
M.throw_at_random(FALSE, 7, 10)
@@ -30,7 +30,7 @@
/obj/machinery/computer/ship/targeting/LateInitialize()
if(current_map.use_overmap && !linked)
var/my_sector = map_sectors["[z]"]
var/my_sector = GLOB.map_sectors["[z]"]
if(istype(my_sector, /obj/effect/overmap/visitable))
attempt_hook_up(my_sector)
@@ -114,7 +114,7 @@
qdel(ammunition.original_projectile) //No longer needed.
ammunition.original_projectile = widowmaker
widowmaker.primed = TRUE
var/turf/entry_turf_initial = get_ranged_target_turf(entry_target, reverse_dir[entry_target.dir], 20)
var/turf/entry_turf_initial = get_ranged_target_turf(entry_target, GLOB.reverse_dir[entry_target.dir], 20)
var/entry_dir_choice = (dir & NORTH) || (dir & SOUTH) ? list(EAST, WEST) : list(NORTH, SOUTH)
var/turf/entry_turf = get_ranged_target_turf(entry_turf_initial, entry_dir_choice, 5)
widowmaker.forceMove(entry_turf)
@@ -45,7 +45,7 @@
visible_message(SPAN_DANGER("<font size=5>\The [src] begins lighting up with a powerful hum...</font>"))
var/power_draw = smes.drain_power_simple(active_power_usage)
if(power_draw >= active_power_usage)
for(var/mob/M in living_mob_list)
for(var/mob/M in GLOB.living_mob_list)
if(AreConnectedZLevels(GET_Z(M), z))
if(get_area(M) != get_area(src))
to_chat(M, SPAN_DANGER("<font size=4>The ground below you starts shaking...</font>"))
@@ -56,7 +56,7 @@
ammunition |= L
if(!stat)
visible_message(SPAN_DANGER("<font size=6>\The [src] fires, quaking the ground below you!</font>"))
for(var/mob/M in living_mob_list)
for(var/mob/M in GLOB.living_mob_list)
if(AreConnectedZLevels(M.z, z) && (get_area(M) != get_area(src)))
to_chat(M, SPAN_DANGER("<font size=4>A gigantic shock courses through the hull of the ship!</font>"))
. = ..()
@@ -67,7 +67,7 @@
/obj/machinery/ship_weapon/leviathan/process()
if(firing)
for(var/mob/M in living_mob_list)
for(var/mob/M in GLOB.living_mob_list)
if(AreConnectedZLevels(GET_Z(M), z))
shake_camera(M, 3, 3)
@@ -85,7 +85,7 @@
firing = FALSE
if(use_power != POWER_USE_OFF)
visible_message(SPAN_DANGER("<font size=4>\The [src]'s humming comes to an abrupt halt.</font>"))
for(var/mob/living/L in living_mob_list)
for(var/mob/living/L in GLOB.living_mob_list)
if(AreConnectedZLevels(L.z, z))
sound_to(L, 'sound/effects/ship_weapons/leviathan_powerdown.ogg')
to_chat(L, SPAN_WARNING("The ground below you settles down, no longer vibrating."))
@@ -98,7 +98,7 @@
visible_message(SPAN_DANGER("\The [src] doesn't light up at all! Its maintenance display indicates there is no SMES to draw power from."))
return
visible_message(SPAN_DANGER("<font size=4>\The [src] lights up with a powerful hum...</font>"))
for(var/mob/living/L in living_mob_list)
for(var/mob/living/L in GLOB.living_mob_list)
if(AreConnectedZLevels(L.z, z))
sound_to(L, 'sound/effects/ship_weapons/leviathan_powerup.ogg')
to_chat(L, SPAN_WARNING("The ground below you starts vibrating with a slight hum..."))
@@ -303,7 +303,7 @@
/obj/machinery/leviathan_safeguard/LateInitialize()
if(current_map.use_overmap && !linked)
var/my_sector = map_sectors["[z]"]
var/my_sector = GLOB.map_sectors["[z]"]
if (istype(my_sector, /obj/effect/overmap/visitable))
attempt_hook_up(my_sector)
if(linked)
@@ -357,7 +357,7 @@
/obj/machinery/leviathan_button/LateInitialize()
if(current_map.use_overmap && !linked)
var/my_sector = map_sectors["[z]"]
var/my_sector = GLOB.map_sectors["[z]"]
if (istype(my_sector, /obj/effect/overmap/visitable))
attempt_hook_up(my_sector)
@@ -500,7 +500,7 @@
set_range(range-1) // if working hard, spool down faster too
if(heat > critical_heat)
src.visible_message("<span class='danger'>\The [src] violently spews out sparks!</span>")
spark(src, 3, alldirs)
spark(src, 3, GLOB.alldirs)
take_damage(rand(10,50))
toggle()
if(deep_scan_toggled)
+5 -5
View File
@@ -52,9 +52,9 @@ somewhere on that shuttle. Subtypes of these can be then used to perform ship ov
user.reset_view(linked)
if(user.client)
user.client.view = world.view + extra_view
moved_event.register(user, src, PROC_REF(unlook))
GLOB.moved_event.register(user, src, PROC_REF(unlook))
if(user.eyeobj)
moved_event.register(user.eyeobj, src, PROC_REF(unlook))
GLOB.moved_event.register(user.eyeobj, src, PROC_REF(unlook))
LAZYDISTINCTADD(viewers, WEAKREF(user))
if(linked)
LAZYDISTINCTADD(linked.navigation_viewers, WEAKREF(user))
@@ -74,11 +74,11 @@ somewhere on that shuttle. Subtypes of these can be then used to perform ship ov
c.pixel_x = 0
c.pixel_y = 0
moved_event.unregister(user, src, PROC_REF(unlook))
GLOB.moved_event.unregister(user, src, PROC_REF(unlook))
if(isEye(user)) // If we're an AI eye, the computer has our AI mob in its viewers list not the eye mob
var/mob/abstract/eye/E = user
moved_event.unregister(E.owner, src, PROC_REF(unlook))
GLOB.moved_event.unregister(E.owner, src, PROC_REF(unlook))
LAZYREMOVE(viewers, WEAKREF(E.owner))
LAZYREMOVE(viewers, WEAKREF(user))
if(linked)
@@ -146,6 +146,6 @@ somewhere on that shuttle. Subtypes of these can be then used to perform ship ov
/obj/machinery/computer/ship/Initialize()
. = ..()
if(current_map.use_overmap && !linked)
var/my_sector = map_sectors["[z]"]
var/my_sector = GLOB.map_sectors["[z]"]
if(istype(my_sector, linked_type))
attempt_hook_up(my_sector)
+1 -1
View File
@@ -18,7 +18,7 @@
/obj/machinery/iff_beacon/LateInitialize()
if(current_map.use_overmap && !linked)
var/my_sector = map_sectors["[z]"]
var/my_sector = GLOB.map_sectors["[z]"]
if (istype(my_sector, /obj/effect/overmap/visitable))
attempt_hook_up(my_sector)
+9 -9
View File
@@ -12,7 +12,7 @@
layer = OVERMAP_SHUTTLE_LAYER
/obj/effect/overmap/visitable/ship/landable/Destroy()
shuttle_moved_event.unregister(SSshuttle.shuttles[shuttle], src)
GLOB.shuttle_moved_event.unregister(SSshuttle.shuttles[shuttle], src)
return ..()
/obj/effect/overmap/visitable/ship/landable/can_burn()
@@ -63,10 +63,10 @@
/obj/effect/overmap/visitable/ship/landable/populate_sector_objects()
..()
var/datum/shuttle/shuttle_datum = SSshuttle.shuttles[shuttle]
shuttle_moved_event.register(shuttle_datum, src, PROC_REF(on_shuttle_jump))
GLOB.shuttle_moved_event.register(shuttle_datum, src, PROC_REF(on_shuttle_jump))
on_landing(landmark, shuttle_datum.current_location) // We "land" at round start to properly place ourselves on the overmap.
var/obj/effect/overmap/visitable/mothership = map_sectors["[shuttle_datum.current_location.z]"]
var/obj/effect/overmap/visitable/mothership = GLOB.map_sectors["[shuttle_datum.current_location.z]"]
if(mothership)
for(var/obj/machinery/computer/ship/sensors/sensor_console in consoles)
sensor_console.datalink_add_ship_datalink(mothership)
@@ -86,7 +86,7 @@
. = ..()
/obj/effect/shuttle_landmark/ship/Destroy()
var/obj/effect/overmap/visitable/ship/landable/ship = map_sectors["[z]"]
var/obj/effect/overmap/visitable/ship/landable/ship = GLOB.map_sectors["[z]"]
if(istype(ship) && ship.landmark == src)
ship.landmark = null
. = ..()
@@ -103,11 +103,11 @@
core_landmark = master
name = _name
landmark_tag = master.shuttle_name + _name
destroyed_event.register(master, src, GLOBAL_PROC_REF(qdel))
GLOB.destroyed_event.register(master, src, GLOBAL_PROC_REF(qdel))
. = ..()
/obj/effect/shuttle_landmark/visiting_shuttle/Destroy()
destroyed_event.unregister(core_landmark, src)
GLOB.destroyed_event.unregister(core_landmark, src)
LAZYREMOVE(core_landmark.visitors, src)
core_landmark = null
. = ..()
@@ -125,11 +125,11 @@
/obj/effect/shuttle_landmark/visiting_shuttle/shuttle_arrived(datum/shuttle/shuttle)
..()
LAZYSET(core_landmark.visitors, src, shuttle)
shuttle_moved_event.register(shuttle, src, PROC_REF(shuttle_left))
GLOB.shuttle_moved_event.register(shuttle, src, PROC_REF(shuttle_left))
/obj/effect/shuttle_landmark/visiting_shuttle/proc/shuttle_left(datum/shuttle/shuttle, obj/effect/shuttle_landmark/old_landmark, obj/effect/shuttle_landmark/new_landmark)
if(old_landmark == src)
shuttle_moved_event.unregister(shuttle, src)
GLOB.shuttle_moved_event.unregister(shuttle, src)
LAZYREMOVE(core_landmark.visitors, src)
/obj/effect/overmap/visitable/ship/landable/proc/on_shuttle_jump(datum/shuttle/given_shuttle, obj/effect/shuttle_landmark/from, obj/effect/shuttle_landmark/into)
@@ -148,7 +148,7 @@
on_landing(from, into)
/obj/effect/overmap/visitable/ship/landable/proc/on_landing(obj/effect/shuttle_landmark/from, obj/effect/shuttle_landmark/into)
var/obj/effect/overmap/visitable/target = map_sectors["[into.z]"]
var/obj/effect/overmap/visitable/target = GLOB.map_sectors["[into.z]"]
var/datum/shuttle/shuttle_datum = SSshuttle.shuttles[shuttle]
if(into.landmark_tag == shuttle_datum.motherdock) // If our motherdock is a landable ship, it won't be found properly here so we need to find it manually.
for(var/obj/effect/overmap/visitable/ship/landable/landable in SSshuttle.ships)
+2 -2
View File
@@ -340,7 +340,7 @@ var/const/OVERMAP_SPEED_CONSTANT = (1 SECOND)
speed[2] = 0
update_icon()
dir = get_heading()
for(var/mob/living/L in living_mob_list)
for(var/mob/living/L in GLOB.living_mob_list)
if(L.z in map_z)
if(!gravity_generator?.on && !L.anchored)
to_chat(L, SPAN_DANGER("The ship rapidly turns beneath you!"))
@@ -356,7 +356,7 @@ var/const/OVERMAP_SPEED_CONSTANT = (1 SECOND)
burn()
var/dir_to_move = turn(dir, new_dir == WEST ? 90 : -90)
forceMove(get_step(src, dir_to_move))
for(var/mob/living/L in living_mob_list)
for(var/mob/living/L in GLOB.living_mob_list)
if(L.z in map_z)
if(!gravity_generator?.on && !L.anchored)
to_chat(L, SPAN_DANGER("<font size=4>The ship rapidly inclines beneath you!</font>"))
+4 -4
View File
@@ -13,17 +13,17 @@ var/list/cached_space = list()
x = nx
y = ny
map_z += nz
map_sectors["[nz]"] = src
GLOB.map_sectors["[nz]"] = src
testing("Temporary sector at [x],[y] was created, corresponding zlevel is [nz].")
/obj/effect/overmap/visitable/sector/temporary/Destroy()
map_sectors["[map_z]"] = null
GLOB.map_sectors["[map_z]"] = null
testing("Temporary sector at [x],[y] was deleted.")
return ..()
/obj/effect/overmap/visitable/sector/temporary/proc/can_die(var/mob/observer)
testing("Checking if sector at [map_z[1]] can die.")
for(var/mob/M in player_list)
for(var/mob/M in GLOB.player_list)
if(M != observer && (M.z in map_z))
testing("There are people on it.")
return 0
@@ -58,7 +58,7 @@ var/list/cached_space = list()
if (!T || !A)
return
var/obj/effect/overmap/visitable/M = map_sectors["[T.z]"]
var/obj/effect/overmap/visitable/M = GLOB.map_sectors["[T.z]"]
if (!M)
return