Merge pull request #7326 from Neerti/arrival_announcement_fix

Arrivals Shuttle Message Fix
This commit is contained in:
Atermonera
2020-07-09 15:28:22 -07:00
committed by VirgoBot
parent b8d851ea59
commit a697e83ebd
13 changed files with 31 additions and 26 deletions

View File

@@ -349,3 +349,5 @@ var/global/list/##LIST_NAME = list();\
#define JOB_SILICON_ROBOT 0x2 #define JOB_SILICON_ROBOT 0x2
#define JOB_SILICON_AI 0x4 #define JOB_SILICON_AI 0x4
#define JOB_SILICON 0x6 // 2|4, probably don't set jobs to this, but good for checking #define JOB_SILICON 0x6 // 2|4, probably don't set jobs to this, but good for checking
#define DEFAULT_OVERMAP_RANGE 0 // Makes general computers and devices be able to connect to other overmap z-levels on the same tile.

View File

@@ -143,7 +143,7 @@
/proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank, var/join_message, var/channel = "Common", var/zlevel) /proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank, var/join_message, var/channel = "Common", var/zlevel)
if (ticker.current_state == GAME_STATE_PLAYING) if (ticker.current_state == GAME_STATE_PLAYING)
var/list/zlevels = zlevel ? using_map.get_map_levels(zlevel, TRUE) : null var/list/zlevels = zlevel ? using_map.get_map_levels(zlevel, TRUE, om_range = DEFAULT_OVERMAP_RANGE) : null
if(character.mind.role_alt_title) if(character.mind.role_alt_title)
rank = character.mind.role_alt_title rank = character.mind.role_alt_title
AnnounceArrivalSimple(character.real_name, rank, join_message, channel, zlevels) AnnounceArrivalSimple(character.real_name, rank, join_message, channel, zlevels)

View File

@@ -44,7 +44,7 @@
data["current_network"] = current_network data["current_network"] = current_network
data["networks"] = network ? network : list() data["networks"] = network ? network : list()
var/map_levels = using_map.get_map_levels(src.z, TRUE) var/map_levels = using_map.get_map_levels(src.z, TRUE, om_range = DEFAULT_OVERMAP_RANGE)
data["map_levels"] = map_levels data["map_levels"] = map_levels
if(current_network) if(current_network)

View File

@@ -520,7 +520,7 @@
control_computer._admin_logs += "[key_name(to_despawn)] ([to_despawn.mind.role_alt_title]) at [stationtime2text()]" control_computer._admin_logs += "[key_name(to_despawn)] ([to_despawn.mind.role_alt_title]) at [stationtime2text()]"
log_and_message_admins("[key_name(to_despawn)] ([to_despawn.mind.role_alt_title]) entered cryostorage.") log_and_message_admins("[key_name(to_despawn)] ([to_despawn.mind.role_alt_title]) entered cryostorage.")
announce.autosay("[to_despawn.real_name], [to_despawn.mind.role_alt_title], [on_store_message]", "[on_store_name]", announce_channel, using_map.get_map_levels(z, TRUE)) announce.autosay("[to_despawn.real_name], [to_despawn.mind.role_alt_title], [on_store_message]", "[on_store_name]", announce_channel, using_map.get_map_levels(z, TRUE, om_range = DEFAULT_OVERMAP_RANGE))
//visible_message("<span class='notice'>\The [initial(name)] hums and hisses as it moves [to_despawn.real_name] into storage.</span>", 3) //visible_message("<span class='notice'>\The [initial(name)] hums and hisses as it moves [to_despawn.real_name] into storage.</span>", 3)
visible_message("<span class='notice'>\The [initial(name)] [on_store_visible_message_1] [to_despawn.real_name] [on_store_visible_message_2].</span>", 3) visible_message("<span class='notice'>\The [initial(name)] [on_store_visible_message_1] [to_despawn.real_name] [on_store_visible_message_2].</span>", 3)

View File

@@ -708,4 +708,4 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
if(ad_hoc && src_z == dst_z) if(ad_hoc && src_z == dst_z)
return TRUE return TRUE
return src_z in using_map.get_map_levels(dst_z) return src_z in using_map.get_map_levels(dst_z, TRUE, om_range = DEFAULT_OVERMAP_RANGE)

View File

@@ -336,7 +336,7 @@
next_alarm_notice = world.time + SecondsToTicks(10) next_alarm_notice = world.time + SecondsToTicks(10)
if(alarm.hidden) if(alarm.hidden)
return return
if(alarm.origin && !(get_z(alarm.origin) in using_map.get_map_levels(get_z(src), TRUE))) if(alarm.origin && !(get_z(alarm.origin) in using_map.get_map_levels(get_z(src), TRUE, om_range = DEFAULT_OVERMAP_RANGE)))
return return
var/list/alarms = queued_alarms[alarm_handler] var/list/alarms = queued_alarms[alarm_handler]

View File

@@ -463,7 +463,7 @@
/mob/new_player/proc/AnnounceCyborg(var/mob/living/character, var/rank, var/join_message, var/channel, var/zlevel) /mob/new_player/proc/AnnounceCyborg(var/mob/living/character, var/rank, var/join_message, var/channel, var/zlevel)
if (ticker.current_state == GAME_STATE_PLAYING) if (ticker.current_state == GAME_STATE_PLAYING)
var/list/zlevels = zlevel ? using_map.get_map_levels(zlevel, TRUE) : null var/list/zlevels = zlevel ? using_map.get_map_levels(zlevel, TRUE, om_range = DEFAULT_OVERMAP_RANGE) : null
if(character.mind.role_alt_title) if(character.mind.role_alt_title)
rank = character.mind.role_alt_title rank = character.mind.role_alt_title
// can't use their name here, since cyborg namepicking is done post-spawn, so we'll just say "A new Cyborg has arrived"/"A new Android has arrived"/etc. // can't use their name here, since cyborg namepicking is done post-spawn, so we'll just say "A new Cyborg has arrived"/"A new Android has arrived"/etc.

View File

@@ -68,7 +68,7 @@
data["networks"] = all_networks data["networks"] = all_networks
var/list/map_levels = using_map.get_map_levels(get_z(nano_host()), TRUE) var/list/map_levels = using_map.get_map_levels(get_z(nano_host()), TRUE, om_range = DEFAULT_OVERMAP_RANGE)
if(current_network) if(current_network)
data["cameras"] = camera_repository.cameras_in_network(current_network, map_levels) data["cameras"] = camera_repository.cameras_in_network(current_network, map_levels)

View File

@@ -172,7 +172,7 @@
return 0 return 0
var/list/zlevels_in_range = using_map.get_map_levels(their_z, FALSE) var/list/zlevels_in_range = using_map.get_map_levels(their_z, FALSE)
var/list/zlevels_in_long_range = using_map.get_map_levels(their_z, TRUE) - zlevels_in_range var/list/zlevels_in_long_range = using_map.get_map_levels(their_z, TRUE, om_range = DEFAULT_OVERMAP_RANGE) - zlevels_in_range
var/their_signal = 0 var/their_signal = 0
for(var/relay in ntnet_global.relays) for(var/relay in ntnet_global.relays)
var/obj/machinery/ntnet_relay/R = relay var/obj/machinery/ntnet_relay/R = relay

View File

@@ -35,7 +35,7 @@
data["isAI"] = isAI(user) data["isAI"] = isAI(user)
var/z = get_z(nano_host()) var/z = get_z(nano_host())
var/list/map_levels = using_map.get_map_levels(z, TRUE) var/list/map_levels = using_map.get_map_levels(z, TRUE, om_range = DEFAULT_OVERMAP_RANGE)
data["map_levels"] = map_levels data["map_levels"] = map_levels
data["crewmembers"] = list() data["crewmembers"] = list()

View File

@@ -104,7 +104,7 @@ var/global/ntnet_card_uid = 1
if(!holderz) //no reception in nullspace if(!holderz) //no reception in nullspace
return 0 return 0
var/list/zlevels_in_range = using_map.get_map_levels(holderz, FALSE) var/list/zlevels_in_range = using_map.get_map_levels(holderz, FALSE)
var/list/zlevels_in_long_range = using_map.get_map_levels(holderz, TRUE) - zlevels_in_range var/list/zlevels_in_long_range = using_map.get_map_levels(holderz, TRUE, om_range = DEFAULT_OVERMAP_RANGE) - zlevels_in_range
var/best = 0 var/best = 0
for(var/relay in ntnet_global.relays) for(var/relay in ntnet_global.relays)
var/obj/machinery/ntnet_relay/R = relay var/obj/machinery/ntnet_relay/R = relay

View File

@@ -36,6 +36,7 @@
start_x = 10 start_x = 10
start_y = 10 start_y = 10
map_z = list(Z_LEVEL_STATION_ONE, Z_LEVEL_STATION_TWO, Z_LEVEL_STATION_THREE) map_z = list(Z_LEVEL_STATION_ONE, Z_LEVEL_STATION_TWO, Z_LEVEL_STATION_THREE)
extra_z_levels = list(Z_LEVEL_TRANSIT) // Hopefully temporary, so arrivals announcements work.
/obj/effect/overmap/visitable/planet/Sif/Initialize() /obj/effect/overmap/visitable/planet/Sif/Initialize()
. = ..() . = ..()

View File

@@ -97,6 +97,8 @@
Z_LEVEL_SURFACE_WILD Z_LEVEL_SURFACE_WILD
) )
// Commented out due to causing a lot of bugs. The base proc plus overmap achieves this functionality anyways.
/*
// Short range computers see only the six main levels, others can see the surrounding surface levels. // Short range computers see only the six main levels, others can see the surrounding surface levels.
/datum/map/southern_cross/get_map_levels(var/srcz, var/long_range = TRUE) /datum/map/southern_cross/get_map_levels(var/srcz, var/long_range = TRUE)
if (long_range && (srcz in map_levels)) if (long_range && (srcz in map_levels))
@@ -117,7 +119,7 @@
) )
else else
return list(srcz) //prevents runtimes when using CMC. any Z-level not defined above will be 'isolated' and only show to GPSes/CMCs on that same Z (e.g. CentCom). return list(srcz) //prevents runtimes when using CMC. any Z-level not defined above will be 'isolated' and only show to GPSes/CMCs on that same Z (e.g. CentCom).
*/
/datum/map/southern_cross/perform_map_generation() /datum/map/southern_cross/perform_map_generation()
// First, place a bunch of submaps. This comes before tunnel/forest generation as to not interfere with the submap. // First, place a bunch of submaps. This comes before tunnel/forest generation as to not interfere with the submap.
@@ -186,19 +188,19 @@
/datum/map_z_level/southern_cross/surface /datum/map_z_level/southern_cross/surface
z = Z_LEVEL_SURFACE z = Z_LEVEL_SURFACE
name = "Plains" name = "Plains"
flags = MAP_LEVEL_STATION|MAP_LEVEL_CONTACT|MAP_LEVEL_PLAYER|MAP_LEVEL_SEALED flags = MAP_LEVEL_STATION|MAP_LEVEL_CONTACT|MAP_LEVEL_PLAYER|MAP_LEVEL_SEALED|MAP_LEVEL_CONSOLES
base_turf = /turf/simulated/floor/outdoors/rocks base_turf = /turf/simulated/floor/outdoors/rocks
/datum/map_z_level/southern_cross/surface_mine /datum/map_z_level/southern_cross/surface_mine
z = Z_LEVEL_SURFACE_MINE z = Z_LEVEL_SURFACE_MINE
name = "Mountains" name = "Mountains"
flags = MAP_LEVEL_STATION|MAP_LEVEL_CONTACT|MAP_LEVEL_PLAYER|MAP_LEVEL_SEALED flags = MAP_LEVEL_STATION|MAP_LEVEL_CONTACT|MAP_LEVEL_PLAYER|MAP_LEVEL_SEALED|MAP_LEVEL_CONSOLES
base_turf = /turf/simulated/floor/outdoors/rocks base_turf = /turf/simulated/floor/outdoors/rocks
/datum/map_z_level/southern_cross/surface_wild /datum/map_z_level/southern_cross/surface_wild
z = Z_LEVEL_SURFACE_WILD z = Z_LEVEL_SURFACE_WILD
name = "Wilderness" name = "Wilderness"
flags = MAP_LEVEL_PLAYER|MAP_LEVEL_SEALED flags = MAP_LEVEL_PLAYER|MAP_LEVEL_SEALED|MAP_LEVEL_CONTACT|MAP_LEVEL_CONSOLES
base_turf = /turf/simulated/floor/outdoors/rocks base_turf = /turf/simulated/floor/outdoors/rocks
/datum/map_z_level/southern_cross/misc /datum/map_z_level/southern_cross/misc