diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 2c2f77be8..0be7986da 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -30,6 +30,8 @@ var/stat_msg1 var/stat_msg2 + var/datum/lore/atc_controller/ATC + light_color = LIGHT_COLOR_BLUE /obj/machinery/computer/communications/proc/checkCCcooldown() @@ -40,6 +42,7 @@ /obj/machinery/computer/communications/Initialize() . = ..() + ATC = atc GLOB.shuttle_caller_list += src /obj/machinery/computer/communications/process() @@ -208,6 +211,8 @@ if("messagelist") currmsg = 0 state = STATE_MESSAGELIST + if("toggleatc") + src.ATC.squelched = !src.ATC.squelched if("viewmessage") state = STATE_VIEWMESSAGE if (!currmsg) @@ -476,6 +481,7 @@ dat += "
\[ Log Out \]
" dat += "
General Functions" dat += "
\[ Message List \]" + dat += "
\[ [ATC.squelched ? "Enable" : "Disable"] ATC Relay \]" switch(SSshuttle.emergency.mode) if(SHUTTLE_IDLE, SHUTTLE_RECALL) dat += "
\[ Call Emergency Shuttle \]" @@ -641,6 +647,7 @@ dat += "Current login: None" dat += "

General Functions" dat += "
\[ Message List \]" + dat += "
\[ [ATC.squelched ? "Enable" : "Disable"] ATC Relay \]" if(SSshuttle.emergency.mode == SHUTTLE_IDLE) dat += "
\[ Call Emergency Shuttle \]" dat += "
\[ Set Status Display \]" diff --git a/hyperstation/code/modules/busy_space/air_traffic.dm b/hyperstation/code/modules/busy_space/air_traffic.dm new file mode 100644 index 000000000..4a3ec6352 --- /dev/null +++ b/hyperstation/code/modules/busy_space/air_traffic.dm @@ -0,0 +1,129 @@ +//Cactus, Speedbird, Dynasty, oh my + +var/datum/lore/atc_controller/atc = new/datum/lore/atc_controller + +/datum/lore/atc_controller + var/delay_max = 25 MINUTES //How long between ATC traffic, max. Default is 25 mins. + var/delay_min = 40 MINUTES //How long between ATC traffic, min. Default is 40 mins. + var/backoff_delay = 5 MINUTES //How long to back off if we can't talk and want to. Default is 5 mins. + var/next_message //When the next message should happen in world.time + var/force_chatter_type //Force a specific type of messages + + var/squelched = 0 //If ATC is squelched currently + +/datum/lore/atc_controller/New(msg) + spawn(30 SECONDS) //Lots of lag at the start of a shift. + msg("New shift beginning, resuming traffic control.") + next_message = world.time + rand(delay_min,delay_max) + process() + +/datum/lore/atc_controller/process() + if(world.time >= next_message) + if(squelched) + next_message = world.time + backoff_delay + else + next_message = world.time + rand(delay_min,delay_max) + random_convo() + + spawn(1 MINUTES) + process() + +/datum/lore/atc_controller/proc/msg(var/message,var/sender) + ASSERT(message) + atc_announce("[message]", title = "Airspace Announcements", sound = 'sound/misc/compiler-stage2.ogg') + +/datum/lore/atc_controller/proc/reroute_traffic(var/yes = 1) + if(yes) + if(!squelched) + msg("Rerouting traffic away from Layenia.") + squelched = 1 + else + if(squelched) + msg("Resuming normal traffic routing around Layenia.") + squelched = 0 + +/datum/lore/atc_controller/proc/shift_ending(var/evac = 0) + msg("Automated Shuttle departing Layenia for Kinaris Sector Command on routine transfer route.","Automated Shuttle") + sleep(5 SECONDS) + msg("Automated Shuttle, cleared to complete routine transfer from Layenia to Kinaris Sector Command.") + +/datum/lore/atc_controller/proc/random_convo() + var/one = pick(loremaster.organizations) //These will pick an index, not an instance + var/two = pick(loremaster.organizations) + + var/datum/lore/organization/source = loremaster.organizations[one] //Resolve to the instances + var/datum/lore/organization/dest = loremaster.organizations[two] + + //Let's get some mission parameters + var/owner = source.short_name //Use the short name + var/prefix = pick(source.ship_prefixes) //Pick a random prefix + var/mission = source.ship_prefixes[prefix] //The value of the prefix is the mission type that prefix does + var/shipname = pick(source.ship_names) //Pick a random ship name to go with it + var/destname = pick(dest.destination_names) //Pick a random holding from the destination + + var/combined_name = "[owner] [prefix] [shipname]" + var/alt_atc_names = list("Layenia TraCon","Layenia Control","Layenia STC","Layenia Airspace") + var/wrong_atc_names = list("Sol Command","New Reykjavik StarCon") + var/mission_noun = list("flight","mission","route") + var/request_verb = list("requesting","calling for","asking for") + + //First response is 'yes', second is 'no' + var/requests = list("Kinaris Sector Command transit clearance" = list("permission for transit granted", "permission for transit denied, contact regional on 953.5"), + "planetary flight rules" = list("authorizing planetary flight rules", "denying planetary flight rules right now due to traffic"), + "special flight rules" = list("authorizing special flight rules", "denying special flight rules, not allowed for your traffic class"), + "current solar weather info" = list("sending you the relevant information via tightbeam", "cannot fulfill your request at the moment"), + "nearby traffic info" = list("sending you current traffic info", "no available info in your area"), + "remote telemetry data" = list("sending telemetry now", "no uplink from your ship, recheck your uplink and ask again"), + "refueling information" = list("sending refueling information now", "no fuel for your ship class in this sector"), + "a current system time sync" = list("sending time sync ping to you now", "your ship isn't compatible with our time sync, set time manually"), + "current system starcharts" = list("transmitting current starcharts", "your request is queued, overloaded right now"), + "permission to engage FTL" = list("permission to engage FTL granted, good day", "permission denied, wait for current traffic to pass"), + "permission to transit system" = list("permission to transit granted, good day", "permission denied, wait for current traffic to pass"), + "permission to depart system" = list("permission to depart granted, good day", "permission denied, wait for current traffic to pass"), + "permission to enter system" = list("good day, permission to enter granted", "permission denied, wait for current traffic to pass"), + ) + + //Random chance things for variety + var/chatter_type = "normal" + if(force_chatter_type) + chatter_type = force_chatter_type + else + chatter_type = pick(2;"emerg",5;"wrong_freq","normal") //Be nice to have wrong_lang... + + var/yes = prob(90) //Chance for them to say yes vs no + + var/request = pick(requests) + var/callname = pick(alt_atc_names) + var/response = requests[request][yes ? 1 : 2] //1 is yes, 2 is no + + var/full_request + var/full_response + var/full_closure + + switch(chatter_type) + if("wrong_freq") + callname = pick(wrong_atc_names) + full_request = "[callname], this is [combined_name] on a [mission] [pick(mission_noun)] to [destname], [pick(request_verb)] [request]." + full_response = "[combined_name], this is Layenia TraCon, wrong frequency. Switch to [rand(700,999)].[rand(1,9)]." + full_closure = "Layenia TraCon, understood, apologies." + if("wrong_lang") + //Can't implement this until autosay has language support + if("emerg") + var/problem = pick("hull breaches on multiple decks","unknown life forms on board","a drive about to go critical","asteroids impacting the hull","a total loss of engine power","people trying to board the ship") + full_request = "This is [combined_name] declaring an emergency! We have [problem]!" + full_response = "[combined_name], this is Layenia TraCon, copy. Switch to emergency responder channel [rand(700,999)].[rand(1,9)]." + full_closure = "Layenia TraCon, okay, switching now." + else + full_request = "[callname], this is [combined_name] on a [mission] [pick(mission_noun)] to [destname], [pick(request_verb)] [request]." + full_response = "[combined_name], this is Layenia TraCon, [response]." //Station TraCon always calls themselves TraCon + full_closure = "Layenia TraCon, [yes ? "thank you" : "understood"], good day." //They always copy what TraCon called themselves in the end when they realize they said it wrong + + //Ship sends request to ATC + msg(full_request,"[prefix] [shipname]") + sleep(5 SECONDS) + //ATC sends response to ship + msg(full_response) + sleep(5 SECONDS) + //Ship sends response to ATC + msg(full_closure,"[prefix] [shipname]") + return \ No newline at end of file diff --git a/hyperstation/code/modules/busy_space/atc_controller.dm b/hyperstation/code/modules/busy_space/atc_controller.dm new file mode 100644 index 000000000..c77d2249b --- /dev/null +++ b/hyperstation/code/modules/busy_space/atc_controller.dm @@ -0,0 +1,13 @@ +///////// +// This is simply a copy of 'priority announcements' with minor edits to better fit the ATC system. +// This is required, as we don't have a PA system like most of the Bay-based servers. +///////// +/proc/atc_announce(message, title = "Airspace Announcements", sound = 'sound/misc/compiler-stage2.ogg') + if(!message) + return + + for(var/mob/M in GLOB.player_list) + if(!isnewplayer(M) && M.can_hear()) + to_chat(M, "[html_encode(title)]
[html_encode(message)]

") + if(M.client.prefs.toggles & SOUND_ANNOUNCEMENTS) + SEND_SOUND(M, sound('sound/misc/compiler-stage2.ogg')) diff --git a/hyperstation/code/modules/busy_space/loremaster.dm b/hyperstation/code/modules/busy_space/loremaster.dm new file mode 100644 index 000000000..21fc73352 --- /dev/null +++ b/hyperstation/code/modules/busy_space/loremaster.dm @@ -0,0 +1,11 @@ +var/datum/lore/loremaster/loremaster = new/datum/lore/loremaster + +/datum/lore/loremaster + var/list/organizations = list() + +/datum/lore/loremaster/New() + + var/list/paths = typesof(/datum/lore/organization) - /datum/lore/organization + for(var/path in paths) + var/datum/lore/organization/instance = new path() + organizations[path] = instance \ No newline at end of file diff --git a/hyperstation/code/modules/busy_space/organisations.dm b/hyperstation/code/modules/busy_space/organisations.dm new file mode 100644 index 000000000..fee1672a5 --- /dev/null +++ b/hyperstation/code/modules/busy_space/organisations.dm @@ -0,0 +1,313 @@ +//Datums for different companies that can be used by busy_space +/datum/lore/organization + var/name = "" // Organization's name + var/short_name = "" // Organization's shortname (NanoTrasen for "NanoTrasen Incorporated") + var/desc = "" // One or two paragraph description of the organization, but only current stuff. Currently unused. + var/history = "" // Historical discription of the organization's origins Currently unused. + var/work = "" // Short description of their work, eg "an arms manufacturer" + var/headquarters = "" // Location of the organization's HQ. Currently unused. + var/motto = "" // A motto/jingle/whatever, if they have one. Currently unused. + + var/list/ship_prefixes = list() //Some might have more than one! Like NanoTrasen. Value is the mission they perform, e.g. ("ABC" = "mission desc") + var/list/ship_names = list( //Names of spaceships. This is a mostly generic list that all the other organizations inherit from if they don't have anything better. + "Kestrel", + "Beacon", + "Signal", + "Freedom", + "Glory", + "Axiom", + "Eternal", + "Icarus", + "Harmony", + "Light", + "Discovery", + "Endeavour", + "Explorer", + "Swift", + "Dragonfly", + "Ascendant", + "Tenacious", + "Pioneer", + "Hawk", + "Haste", + "Radiant", + "Luminous" + ) + var/list/destination_names = list() //Names of static holdings that the organization's ships visit regularly. + var/autogenerate_destination_names = TRUE + +/datum/lore/organization/New() + ..() + if(autogenerate_destination_names) // Lets pad out the destination names. + var/i = rand(6, 10) + var/list/star_names = list( + "Sol", "Alpha Centauri", "Sirius", "Vega", "Regulus", "Vir", "Algol", "Aldebaran", + "Delta Doradus", "Menkar", "Geminga", "Elnath", "Gienah", "Mu Leporis", "Nyx", "Tau Ceti", + "Wazn", "Alphard", "Phact", "Altair") + var/list/destination_types = list("dockyard", "station", "vessel", "waystation", "telecommunications satellite", "spaceport", "distress beacon", "anomaly", "colony", "outpost") + while(i) + destination_names.Add("a [pick(destination_types)] in [pick(star_names)]") + i-- + +////////////////////////////////////////////////////////////////////////////////// + +// TSCs +/datum/lore/organization/nanotrasen + name = "NanoTrasen Incorporated" + short_name = "NanoTrasen" + desc = "" // Todo: Write this. + history = "" // This too. + work = "research giant" + headquarters = "Luna" + motto = "" + + ship_prefixes = list("NSV" = "exploration", "NTV" = "hauling", "NDV" = "patrol", "NRV" = "emergency response") + // Note that the current station being used will be pruned from this list upon being instantiated + destination_names = list( + "NSS Exodus in Nyx", + "NCS Northern Star in Vir", + "NCS Southern Cross in Vir", + "NDV Icarus in Nyx", + "NAS Vir Central Command", + "a dockyard orbiting Sif", + "an asteroid orbiting Kara", + "an asteroid orbiting Rota", + "Vir Interstellar Spaceport" + ) + +/datum/lore/organization/hephaestus + name = "Hephaestus Industries" + short_name = "Hephaestus" + desc = "Hephaestus Industries is the largest supplier of arms, ammunition, and small millitary vehicles in Sol space. \ + Hephaestus products have a reputation for reliability, and the corporation itself has a noted tendency to stay removed \ + from corporate politics. They enforce their neutrality with the help of a fairly large asset-protection contingent which \ + prevents any contracting polities from using their own materiel against them. SolGov itself is one of Hephastus’ largest \ + bulk contractors owing to the above factors." + history = "" + work = "arms manufacturer" + headquarters = "" + motto = "" + + ship_prefixes = list("HTV" = "freight", "HTV" = "munitions resupply") + destination_names = list( + "a SolGov dockyard on Luna" + ) + +/datum/lore/organization/vey_med + name = "Vey Medical" + short_name = "Vey Med" + desc = "Vey-Med is one of the newer TSCs on the block and is notable for being largely owned and opperated by Skrell. \ + Despite the suspicion and prejudice leveled at them for their alien origin, Vey-Med has obtained market dominance in \ + the sale of medical equipment-- from surgical tools to large medical devices to the Oddyseus trauma response mecha \ + and everything in between. Their equipment tends to be top-of-the-line, most obviously shown by their incredibly \ + human-like FBP designs. Vey’s rise to stardom came from their introduction of ressurective cloning, although in \ + recent years they’ve been forced to diversify as their patents expired and NanoTrasen-made medications became \ + essential to modern cloning." + history = "" + work = "medical equipment supplier" + headquarters = "" + motto = "" + + ship_prefixes = list("VTV" = "transportation", "VMV" = "medical resupply") + destination_names = list() + +/datum/lore/organization/zeng_hu + name = "Zeng-Hu pharmaceuticals" + short_name = "Zeng-Hu" + desc = "Zeng-Hu is an old TSC, based in the Sol system. Until the discovery of Phoron, Zeng-Hu maintained a stranglehold \ + on the market for medications, and many household names are patentted by Zeng-Hu-- Bicaridyne, Dylovene, Tricordrizine, \ + and Dexalin all came from a Zeng-Hu medical laboratory. Zeng-Hu’s fortunes have been in decline as Nanotrasen’s near monopoly \ + on phoron research cuts into their R&D and Vey-Med’s superior medical equipment effectively decimated their own equipment \ + interests. The three-way rivalry between these companies for dominance in the medical field is well-known and a matter of \ + constant economic speculation." + history = "" + work = "pharmaceuticals company" + headquarters = "" + motto = "" + + ship_prefixes = list("ZTV" = "transportation", "ZMV" = "medical resupply") + destination_names = list() + +/datum/lore/organization/ward_takahashi + name = "Ward-Takahashi General Manufacturing Conglomerate" + short_name = "Ward-Takahashi" + desc = "Ward-Takahashi focuses on the sale of small consumer electronics, with its computers, communicators, \ + and even mid-class automobiles a fixture of many households. Less famously, Ward-Takahashi also supplies most \ + of the AI cores on which vital control systems are mounted, and it is this branch of their industry that has \ + led to their tertiary interest in the development and sale of high-grade AI systems. Ward-Takahashi’s economies \ + of scale frequently steal market share from Nanotrasen’s high-price products, leading to a bitter rivalry in the \ + consumer electronics market." + history = "" + work = "electronics manufacturer" + headquarters = "" + motto = "" + + ship_prefixes = list("WTV" = "freight") + destination_names = list() + +/datum/lore/organization/bishop + name = "Bishop Cybernetics" + short_name = "Bishop" + desc = "Bishop’s focus is on high-class, stylish cybernetics. A favorite among transhumanists (and a bête noire for \ + bioconservatives), Bishop manufactures not only prostheses but also brain augmentation, synthetic organ replacements, \ + and odds and ends like implanted wrist-watches. Their business model tends towards smaller, boutique operations, giving \ + it a reputation for high price and luxury, with Bishop cyberware often rivalling Vey-Med’s for cost. Bishop’s reputation \ + for catering towards the interests of human augmentation enthusiasts instead of positronics have earned it ire from the \ + Positronic Rights Group and puts it in ideological (but not economic) comptetition with Morpheus Cyberkinetics." + history = "" + work = "cybernetics and augmentation manufacturer" + headquarters = "" + motto = "" + + ship_prefixes = list("BTV" = "transportation") + destination_names = list() + +/datum/lore/organization/morpheus + name = "Morpheus Cyberkinetics" + short_name = "Morpheus" + desc = "The only large corporation run by positronic intelligences, Morpheus caters almost exclusively to their sensibilities \ + and needs. A product of the synthetic colony of Shelf, Morpheus eschews traditional advertising to keep their prices low and \ + relied on word of mouth among positronics to reach their current economic dominance. Morpheus in exchange lobbies heavily for \ + positronic rights, sponsors positronics through their Jans-Fhriede test, and tends to other positronic concerns to earn them \ + the good-will of the positronics, and the ire of those who wish to exploit them." + history = "" + work = "cybernetics manufacturer" + headquarters = "" + motto = "" + + ship_prefixes = list("MTV" = "freight") + // Culture names, because Anewbe told me so. + ship_names = list( + "Nervous Energy", + "Prosthetic Conscience", + "Revisionist", + "Trade Surplus", + "Flexible Demeanour", + "Just Read The Instructions", + "Limiting Factor", + "Cargo Cult", + "Gunboat Diplomat", + "A Ship With A View", + "Cantankerous", + "I Thought He Was With You", + "Never Talk To Strangers", + "Sacrificial Victim", + "Unwitting Accomplice", + "Bad For Business", + "Just Testing", + "Size Isn't Everything", + "Yawning Angel", + "Liveware Problem", + "Very Little Gravitas Indeed", + "Zero Gravitas", + "Gravitas Free Zone", + "Absolutely No You-Know-What", + "Existence Is Pain", + "I'm Walking Here", + "Screw Loose", + "Of Course I Still Love You", + "Limiting Factor", + "So Much For Subtley", + "Unfortunate Conflict Of Evidence", + "Prime Mover", + "It's One Of Ours", + "Thank You And Goodnight", + "Boo!", + "Reasonable Excuse", + "Honest Mistake", + "Appeal To Reason", + "My First Ship II", + "Hidden Income", + "Anything Legal Considered", + "New Toy", + "Me, I'm Always Counting", + "Just Five More Minutes" + + + ) + destination_names = list() + +/datum/lore/organization/xion + name = "Xion Manufacturing Group" + short_name = "Xion" + desc = "Xion, quietly, controls most of the market for industrial equipment. Their portfolio includes mining exosuits, \ + factory equipment, rugged positronic chassis, and other pieces of equipment vital to the function of the economy. Xion \ + keeps its control of the market by leasing, not selling, their equipment, and through infamous and bloody patent protection \ + lawsuits. Xion are noted to be a favorite contractor for SolGov engineers, owing to their low cost and rugged design." + history = "" + work = "industrial equipment manufacturer" + headquarters = "" + motto = "" + + ship_prefixes = list("XTV" = "hauling") + destination_names = list() + +// Governments + +/datum/lore/organization/sifgov + name = "Sif Governmental Authority" + short_name = "SifGov" + desc = "SifGov is the sole governing administration for the Vir system, based in New Reykjavik, Sif. It is a representative \ + democratic government, and a fully recognized member of the Solar Confederate Government. Anyone operating inside of Vir must \ + comply with SifGov's legislation and regulations." + history = "" // Todo like the rest of them + work = "governing body of Sif" + headquarters = "New Reykjavik, Sif" + motto = "" + autogenerate_destination_names = FALSE + + ship_prefixes = list("SGA" = "hauling", "SGA" = "energy relay") + destination_names = list( + "New Reykjavik on Sif", + "Radiance Energy Chain", + "a dockyard orbiting Sif", + "a telecommunications satellite", + "Vir Interstellar Spaceport" + ) + +/datum/lore/organization/solgov + name = "Solar Confederate Government" + short_name = "SolGov" + desc = "SolGov is a decentralized confederation of human governmental entities based on Luna, Sol, which defines top-level law for their member states. \ + Member states receive various benefits such as defensive pacts, trade agreements, social support and funding, and being able to participate \ + in the Colonial Assembly. The majority, but not all human territories are members of SolGov. As such, SolGov is a major power and \ + defacto represents humanity on the galatic stage." + history = "" // Todo + work = "governing polity of humanity's Confederation" + headquarters = "Luna" + motto = "Nil Mortalibus Ardui Est" // Latin, because latin. Says 'Nothing is too steep for mortals'. + autogenerate_destination_names = TRUE + + ship_prefixes = list("SCG-T" = "transportation", "SCG-D" = "diplomatic", "SCG-F" = "freight") + destination_names = list( + "Venus", + "Earth", + "Luna", + "Mars", + "Titan" + )// autogen will add a lot of other places as well. + +// Military + +/datum/lore/organization/sif_guard + name = "Sif Homeguard Forces" // Todo: Get better name from lorepeople. + short_name = "SifGuard" + desc = "" + history = "" + work = "Sif Governmental Authority's military" + headquarters = "Sif" // Make this more specific later. + motto = "" + autogenerate_destination_names = FALSE // Kinda weird if SifGuard goes to Nyx. + + ship_prefixes = list("SGSC" = "military", "SGSC" = "patrol", "SGSC" = "rescue", "SGSC" = "emergency response") // Todo: Replace prefix with better one. + destination_names = list( + "a classified location in SolGov territory", + "Sif orbit", + "the rings of Kara", + "the rings of Rota", + "Firnir orbit", + "Tyr orbit", + "Magni orbit", + "a wreck in SifGov territory", + "a military outpost", + ) \ No newline at end of file diff --git a/tgstation.dme b/tgstation.dme index 1f769e695..10a170781 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3111,6 +3111,10 @@ #include "hyperstation\code\modules\antagonists\werewolf\werewolf.dm" #include "hyperstation\code\modules\arousal\arousalhud.dm" #include "hyperstation\code\modules\arousal\creampie.dm" +#include "hyperstation\code\modules\busy_space\air_traffic.dm" +#include "hyperstation\code\modules\busy_space\atc_controller.dm" +#include "hyperstation\code\modules\busy_space\loremaster.dm" +#include "hyperstation\code\modules\busy_space\organisations.dm" #include "hyperstation\code\modules\cargo\exports\engineering.dm" #include "hyperstation\code\modules\cargo\exports\sweatshop.dm" #include "hyperstation\code\modules\cargo\packs\misc.dm"