Skip to content

Commit

Permalink
bioscan logging
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Jun 28, 2023
1 parent fc69ada commit da75aa8
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions code/game/bioscans.dm
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ GLOBAL_DATUM_INIT(bioscan_data, /datum/bioscan_data, new)
var/marine_planet_location_string = "[marine_planet_location ? ", including one in [marine_planet_location]." : "."]"
var/marine_ship_location_string = "[marine_ship_location ? ", including one in [marine_ship_location]." : "."]"

log_game("BIOSCAN: A Yautja/Ghost bioscan has completed.")
log_game("BIOSCAN: [xenos_on_planet] xenos on planet, with [larva] larva. [xenos_on_ship] xenos on the ship. [marines_on_planet] humans on the planet. [marines_on_ship] humans on the ship.")

//Announce the numbers to Yautja, they have good scanners
for(var/mob/living/carbon/human/yautja as anything in GLOB.yautja_mob_list)
to_chat(yautja, "<h2 class='alert'>Bioscan complete</h2>")
Expand All @@ -112,12 +115,14 @@ GLOBAL_DATUM_INIT(bioscan_data, /datum/bioscan_data, new)
/// The announcement to all Humans. Slightly off for the planet and elsewhere, accurate for the ship.
/datum/bioscan_data/proc/ares_bioscan(forced = FALSE, variance = 2)
if(!forced && !can_ares_bioscan())
message_admins("An ARES Bioscan has failed.")
message_admins("BIOSCAN: An ARES bioscan has failed.")
return

//Adjust the randomness there so everyone gets the same thing
var/fake_xenos_on_planet = max(0, xenos_on_planet + rand(-variance, variance))

log_game("BIOSCAN: ARES bioscan completed.")
log_game("BIOSCAN: Bioscan complete. Sensors indicate [xenos_on_ship_uncontained ? "[xenos_on_ship_uncontained]" : "no"] unknown lifeform signature[!xenos_on_ship_uncontained || xenos_on_ship_uncontained > 1 ? "s":""] present on the ship[xenos_on_ship_uncontained && xenos_ship_location ? ", including one in [xenos_ship_location]," : ""] and [fake_xenos_on_planet ? "approximately [fake_xenos_on_planet]" : "no"] signature[!fake_xenos_on_planet || fake_xenos_on_planet > 1 ? "s":""] located elsewhere[fake_xenos_on_planet && xenos_planet_location ? ", including one in [xenos_planet_location]":""].")

var/name = "[MAIN_AI_SYSTEM] Bioscan Status"
var/input = "Bioscan complete.\n\nSensors indicate [xenos_on_ship_uncontained ? "[xenos_on_ship_uncontained]" : "no"] unknown lifeform signature[!xenos_on_ship_uncontained || xenos_on_ship_uncontained > 1 ? "s":""] present on the ship[xenos_on_ship_uncontained && xenos_ship_location ? ", including one in [xenos_ship_location]," : ""] and [fake_xenos_on_planet ? "approximately [fake_xenos_on_planet]" : "no"] signature[!fake_xenos_on_planet || fake_xenos_on_planet > 1 ? "s":""] located elsewhere[fake_xenos_on_planet && xenos_planet_location ? ", including one in [xenos_planet_location]":""]."
marine_announcement(input, name, 'sound/AI/bioscan.ogg')
Expand All @@ -126,13 +131,17 @@ GLOBAL_DATUM_INIT(bioscan_data, /datum/bioscan_data, new)
/datum/bioscan_data/proc/qm_bioscan(variance = 2)
/// Adjust the randomness there so everyone gets the same thing
var/fake_marines_on_ship = max(0, marines_on_ship + rand(-variance, variance))
var/metalhive_hosts = "[fake_marines_on_ship ? "approximately [fake_marines_on_ship]":"no"]"
var/plural = "[!fake_marines_on_ship || fake_marines_on_ship > 1 ? "s":""]"
var/metalhive_location = "[fake_marines_on_ship&&marine_ship_location?", including one in [marine_ship_location],":""]"
var/planet_hosts = "[marines_on_planet ? "[marines_on_planet]" : "none"]"
var/planet_location = "[marines_on_planet && marine_planet_location ? ", including one in [marine_planet_location]" : ""]"

log_game("BIOSCAN: Queen Mother bioscan completed.")
log_game("BIOSCAN: To my children and their Queen. I sense [metalhive_hosts] host[plural] in the metal hive [metalhive_location] and [planet_hosts] scattered elsewhere[planet_location].")

/// Shout it at everyone
for(var/mob/current_mob as anything in GLOB.living_xeno_list)
current_mob << sound(get_sfx("queen"), wait = 0, volume = 50)
to_chat(current_mob, SPAN_XENOANNOUNCE("The Queen Mother reaches into your mind from worlds away."))
var/metalhive_hosts = "[fake_marines_on_ship ? "approximately [fake_marines_on_ship]":"no"]"
var/plural = "[!fake_marines_on_ship || fake_marines_on_ship > 1 ? "s":""]"
var/metalhive_location = "[fake_marines_on_ship&&marine_ship_location?", including one in [marine_ship_location],":""]"
var/planet_hosts = "[marines_on_planet ? "[marines_on_planet]" : "none"]"
var/planet_location = "[marines_on_planet && marine_planet_location ? ", including one in [marine_planet_location]" : ""]"
to_chat(current_mob, SPAN_XENOANNOUNCE("To my children and their Queen. I sense [metalhive_hosts] host[plural] in the metal hive [metalhive_location] and [planet_hosts] scattered elsewhere[planet_location]."))

0 comments on commit da75aa8

Please sign in to comment.