Merge branch 'master' into upstream-merge-8298

This commit is contained in:
Novacat
2022-03-04 09:57:28 -05:00
committed by GitHub
825 changed files with 158690 additions and 79022 deletions
+1 -1
View File
@@ -23,7 +23,7 @@
/// For showing to the pilot of the ship, so they see the 'real' appearance, despite others seeing the unknown ones
var/image/real_appearance
light_system = MOVABLE_LIGHT
//light_system = MOVABLE_LIGHT
light_on = FALSE
/obj/effect/overmap/Initialize()
@@ -66,7 +66,7 @@
else
data["status"] = "OK"
var/list/contacts = list()
for(var/obj/effect/overmap/O in view(7,linked))
for(var/obj/effect/overmap/O in range(7,linked))
if(linked == O)
continue
if(!O.scannable)
@@ -125,10 +125,9 @@
return
if(sensors && sensors.use_power && sensors.powered())
var/sensor_range = round(sensors.range*1.5) + 1
linked.set_light_range(sensor_range + 0.5)
linked.set_light_on(TRUE)
linked.set_light(sensor_range + 0.5)
else
linked.set_light_on(FALSE)
linked.set_light(0)
/obj/machinery/shipsensors
name = "sensors suite"
+3 -4
View File
@@ -199,11 +199,10 @@
switch(status)
if(SHIP_STATUS_LANDED)
var/obj/effect/overmap/visitable/location = loc
if(istype(loc, /obj/effect/overmap/visitable/sector))
return "Landed on \the [location.name]. Use secondary thrust to get clear before activating primary engines."
if(istype(loc, /obj/effect/overmap/visitable/ship))
if(location.in_space)
return "Docked with \the [location.name]. Use secondary thrust to get clear before activating primary engines."
return "Docked with an unknown object."
else
return "Landed on \the [location.name]. Use secondary thrust to get clear before activating primary engines."
if(SHIP_STATUS_TRANSIT)
return "Maneuvering under secondary thrust."
if(SHIP_STATUS_OVERMAP)
+12 -7
View File
@@ -14,13 +14,10 @@
// But pick an empty z level to use
map_z += global.using_map.get_empty_zlevel()
. = ..()
if(!map_z[1])
log_and_message_admins("Could not create empty sector at [x], [y]. No available z levels to allocate.")
return INITIALIZE_HINT_QDEL
map_sectors["[map_z[1]]"] = src
testing("Temporary sector at [x],[y] was created, corresponding zlevel is [map_z[1]].")
testing("Temporary sector at [x],[y],[z] was created, corresponding zlevel is [english_list(map_z)].")
/obj/effect/overmap/visitable/sector/temporary/Destroy()
for(var/zlevel in map_z)
@@ -28,6 +25,9 @@
testing("Temporary sector at [x],[y] was destroyed, returning empty zlevel [map_z[1]] to map datum.")
return ..()
/obj/effect/overmap/visitable/sector/temporary/find_z_levels()
LAZYADD(map_z, global.using_map.get_empty_zlevel())
/obj/effect/overmap/visitable/sector/temporary/proc/is_empty(var/mob/observer)
if(!LAZYLEN(map_z))
log_and_message_admins("CANARY: [src] tried to check is_empty, but map_z is `[map_z || "null"]`")
@@ -51,8 +51,9 @@
if(istype(res))
return res
res = new /obj/effect/overmap/visitable/sector/temporary(overmap_turf)
if(!QDELETED(res))
return res
if(QDELETED(res))
res = null
return res
/atom/movable/proc/lost_in_space()
for(var/atom/movable/AM in contents)
@@ -138,8 +139,10 @@
if(O != M && O.in_space && prob(50))
TM = O
break
if(!TM)
if(!istype(TM))
TM = get_deepspace(M.x,M.y)
if(!istype(TM))
return
nz = pick(TM.get_space_zlevels())
testing("spacetravel chose [nz],[ny],[nz] in sector [TM] @ ([TM.x],[TM.y],[TM.z])")
@@ -151,5 +154,7 @@
var/mob/D = A
if(D.pulling)
D.pulling.forceMove(dest)
else
to_world("CANARY: Could not move [A] to [nx], [ny], [nz]: [dest ? "[dest]" : "null"]")
M.cleanup()