diff --git a/code/controllers/configuration/entries/comms.dm b/code/controllers/configuration/entries/comms.dm index e56ff3f0d1..254622d8ae 100644 --- a/code/controllers/configuration/entries/comms.dm +++ b/code/controllers/configuration/entries/comms.dm @@ -22,11 +22,10 @@ /datum/config_entry/string/cross_comms_name -/datum/config_entry/string/medal_hub_address - -/datum/config_entry/string/medal_hub_password - protection = CONFIG_ENTRY_HIDDEN +/datum/config_entry/string/cross_comms_network + protection = CONFIG_ENTRY_LOCKED +/// cit config /datum/config_entry/keyed_list/cross_server_bunker_override key_mode = KEY_MODE_TEXT value_mode = VALUE_MODE_TEXT @@ -42,6 +41,3 @@ /datum/config_entry/keyed_list/cross_server_bunker_override/ValidateListEntry(key_name, key_value) return key_value != "byond:\\address:port" && ..() - -/datum/config_entry/flag/allow_cross_server_bunker_override - protection = CONFIG_ENTRY_LOCKED diff --git a/code/datums/shuttles.dm b/code/datums/shuttles.dm index e2e6a05b08..17116b922b 100644 --- a/code/datums/shuttles.dm +++ b/code/datums/shuttles.dm @@ -8,12 +8,16 @@ var/description var/prerequisites var/admin_notes - + /// How much does this shuttle cost the cargo budget to purchase? Put in terms of CARGO_CRATE_VALUE to properly scale the cost with the current balance of cargo's income. var/credit_cost = INFINITY + /// Can the be legitimately purchased by the station? Used by hardcoded or pre-mapped shuttles like the lavaland or cargo shuttle. var/can_be_bought = TRUE + /// If set, overrides default movement_force on shuttle + var/list/movement_force var/port_x_offset var/port_y_offset + var/extra_desc = "" /datum/map_template/shuttle/proc/prerequisites_met() return TRUE @@ -23,7 +27,7 @@ mappath = "[prefix][shuttle_id].dmm" . = ..() -/datum/map_template/shuttle/preload_size(path = mappath, force_cache = FALSE) +/datum/map_template/shuttle/preload_size(path, force_cache) . = ..(path, TRUE) // Done this way because we still want to know if someone actualy wanted to cache the map if(!cached_map) return @@ -64,6 +68,9 @@ continue if(length(place.baseturfs) < 2) // Some snowflake shuttle shit continue + // var/list/sanity = place.baseturfs.Copy() // we do not have new baseturfs yet + // sanity.Insert(3, /turf/baseturf_skipover/shuttle) + // place.baseturfs = baseturfs_string_list(sanity, place) place.baseturfs.Insert(3, /turf/baseturf_skipover/shuttle) for(var/obj/docking_port/mobile/port in place) @@ -93,6 +100,7 @@ port.dwidth = port_y_offset - 1 port.dheight = width - port_x_offset + // these three for loops are cit specific. for(var/obj/structure/closet/closet in place) if(closet.anchorable) closet.anchored = TRUE @@ -104,11 +112,10 @@ rack.AddComponent(/datum/component/magnetic_catch) //Whatever special stuff you want -/datum/map_template/shuttle/proc/post_load(obj/docking_port/mobile/M) - return - -/datum/map_template/shuttle/proc/on_bought() - return +/datum/map_template/shuttle/post_load(obj/docking_port/mobile/M) + if(movement_force) + M.movement_force = movement_force.Copy() + M.linkup() /datum/map_template/shuttle/emergency port_id = "emergency" @@ -117,6 +124,7 @@ /datum/map_template/shuttle/cargo port_id = "cargo" name = "Base Shuttle Template (Cargo)" + can_be_bought = FALSE /datum/map_template/shuttle/ferry port_id = "ferry" @@ -137,10 +145,6 @@ port_id = "mining_common" can_be_bought = FALSE -/datum/map_template/shuttle/cargo - port_id = "cargo" - can_be_bought = FALSE - /datum/map_template/shuttle/arrival port_id = "arrival" can_be_bought = FALSE @@ -189,21 +193,23 @@ name = "Backup Shuttle" can_be_bought = FALSE -/datum/map_template/shuttle/emergency/airless - suffix = "airless" +/datum/map_template/shuttle/emergency/construction + suffix = "construction" name = "Build your own shuttle kit" - description = "Save money by building your own shuttle! The chassis will dock upon purchase, but launch will have to be authorized as usual via shuttle call. Interior and lighting not included." + description = "For the enterprising shuttle engineer! The chassis will dock upon purchase, but launch will have to be authorized as usual via shuttle call. Comes stocked with construction materials. Unlocks the ability to buy shuttle engine crates from cargo." admin_notes = "No brig, no medical facilities, just an empty box." credit_cost = -7500 -/datum/map_template/shuttle/emergency/airless/prerequisites_met() +/datum/map_template/shuttle/emergency/construction/prerequisites_met() // first 10 minutes only return world.time - SSticker.round_start_time < 6000 -/datum/map_template/shuttle/emergency/airless/on_bought() - //enable buying engines from cargo - var/datum/supply_pack/P = SSshuttle.supply_packs[/datum/supply_pack/engineering/shuttle_engine] - P.special_enabled = TRUE +// this is broken and does not work. Thanks TG +// /datum/map_template/shuttle/emergency/airless/post_load() +// . = ..() +// //enable buying engines from cargo +// var/datum/supply_pack/P = SSshuttle.supply_packs[/datum/supply_pack/engineering/shuttle_engine] +// P.special_enabled = TRUE /datum/map_template/shuttle/emergency/asteroid @@ -220,6 +226,13 @@ Has medical facilities." credit_cost = 5000 +// /datum/map_template/shuttle/emergency/pod +// suffix = "pod" +// name = "Emergency Pods" +// description = "We did not expect an evacuation this quickly. All we have available is two escape pods." +// admin_notes = "For player punishment." +// can_be_bought = FALSE + /datum/map_template/shuttle/emergency/russiafightpit suffix = "russiafightpit" name = "Mother Russia Bleeds" @@ -230,9 +243,10 @@ /datum/map_template/shuttle/emergency/meteor suffix = "meteor" name = "Asteroid With Engines Strapped To It" - description = "A hollowed out asteroid with engines strapped to it. Due to its size and difficulty in steering it, this shuttle may damage the docking area." + description = "A hollowed out asteroid with engines strapped to it, the hollowing procedure makes it very difficult to hijack but is very expensive. Due to its size and difficulty in steering it, this shuttle may damage the docking area." admin_notes = "This shuttle will likely crush escape, killing anyone there." credit_cost = -5000 + movement_force = list("KNOCKDOWN" = 3, "THROW" = 2) /datum/map_template/shuttle/emergency/luxury suffix = "luxury" @@ -247,6 +261,7 @@ description = "The glorious results of centuries of plasma research done by Nanotrasen employees. This is the reason why you are here. Get on and dance like you're on fire, burn baby burn!" admin_notes = "Flaming hot. The main area has a dance machine as well as plasma floor tiles that will be ignited by players every single time." credit_cost = 10000 + // can_be_bought = FALSE /datum/map_template/shuttle/emergency/arena suffix = "arena" @@ -254,11 +269,22 @@ description = "The crew must pass through an otherworldy arena to board this shuttle. Expect massive casualties. The source of the Bloody Signal must be tracked down and eliminated to unlock this shuttle." admin_notes = "RIP AND TEAR." credit_cost = 10000 + /// Whether the arena z-level has been created + var/arena_loaded = FALSE /datum/map_template/shuttle/emergency/arena/prerequisites_met() - if("bubblegum" in SSshuttle.shuttle_purchase_requirements_met) - return TRUE - return FALSE + return SSshuttle.shuttle_purchase_requirements_met["bubblegum"] + +/datum/map_template/shuttle/emergency/arena/post_load(obj/docking_port/mobile/M) + . = ..() + if(!arena_loaded) + arena_loaded = TRUE + var/datum/map_template/arena/arena_template = new() + arena_template.load_new_z() + +/datum/map_template/arena + name = "The Arena" + mappath = "_maps/templates/the_arena.dmm" /datum/map_template/shuttle/emergency/birdboat suffix = "birdboat" @@ -272,6 +298,13 @@ credit_cost = 2000 description = "The gold standard in emergency exfiltration, this tried and true design is equipped with everything the crew needs for a safe flight home." +// /datum/map_template/shuttle/emergency/donut +// suffix = "donut" +// name = "Donutstation Emergency Shuttle" +// description = "The perfect spearhead for any crude joke involving the station's shape, this shuttle supports a separate containment cell for prisoners and a compact medical wing." +// admin_notes = "Has airlocks on both sides of the shuttle and will probably intersect near the front on some stations that build past departures." +// credit_cost = 2500 + /datum/map_template/shuttle/emergency/clown suffix = "clown" name = "Snappop(tm)!" @@ -316,7 +349,9 @@ credit_cost = -1000 description = "Due to a lack of functional emergency shuttles, we bought this second hand from a scrapyard and pressed it into service. Please do not lean too heavily on the exterior windows, they are fragile." admin_notes = "An abomination with no functional medbay, sections missing, and some very fragile windows. Surprisingly airtight." + movement_force = list("KNOCKDOWN" = 3, "THROW" = 2) +// CIT SPECIFIC /datum/map_template/shuttle/emergency/syndicate suffix = "syndicate" name = "Syndicate GM Battlecruiser" @@ -325,9 +360,7 @@ admin_notes = "An emag exclusive, stocked with syndicate equipment and turrets that will target any simplemob." /datum/map_template/shuttle/emergency/syndicate/prerequisites_met() - if("emagged" in SSshuttle.shuttle_purchase_requirements_met) - return TRUE - return FALSE + return SSshuttle.shuttle_purchase_requirements_met["emagged"] /datum/map_template/shuttle/emergency/narnar suffix = "narnar" @@ -335,6 +368,10 @@ description = "Looks like this shuttle may have wandered into the darkness between the stars on route to the station. Let's not think too hard about where all the bodies came from." admin_notes = "Contains real cult ruins, mob eyeballs, and inactive constructs. Cult mobs will automatically be sentienced by fun balloon. \ Cloning pods in 'medbay' area are showcases and nonfunctional." + credit_cost = 6667 ///The joke is the number so no defines + +/datum/map_template/shuttle/emergency/narnar/prerequisites_met() + return SSshuttle.shuttle_purchase_requirements_met["narsie"] /datum/map_template/shuttle/emergency/pubby suffix = "pubby" @@ -354,7 +391,7 @@ /datum/map_template/shuttle/emergency/supermatter suffix = "supermatter" name = "Hyperfractal Gigashuttle" - description = "(Emag only) \"I dunno, this seems kinda needlessly complicated.\"\n\ + description = "\"I dunno, this seems kinda needlessly complicated.\"\n\ \"This shuttle has very a very high safety record, according to CentCom Officer Cadet Yins.\"\n\ \"Are you sure?\"\n\ \"Yes, it has a safety record of N-A-N, which is apparently larger than 100%.\"" @@ -363,19 +400,19 @@ It does, however, still dust anything on contact, emits high levels of radiation, and induce hallucinations in anyone looking at it without protective goggles. \ Emitters spawn powered on, expect admin notices, they are harmless." credit_cost = 15000 + movement_force = list("KNOCKDOWN" = 3, "THROW" = 2) /datum/map_template/shuttle/emergency/supermatter/prerequisites_met() - if("emagged" in SSshuttle.shuttle_purchase_requirements_met) - return TRUE - return FALSE - + return SSshuttle.shuttle_purchase_requirements_met["emagged"] /datum/map_template/shuttle/emergency/imfedupwiththisworld suffix = "imfedupwiththisworld" name = "Oh, Hi Daniel" description = "How was space work today? Oh, pretty good. We got a new space station and the company will make a lot of money. What space station? I cannot tell you; it's space confidential. \ Aw, come space on. Why not? No, I can't. Anyway, how is your space roleplay life?" admin_notes = "Tiny, with a single airlock and wooden walls. What could go wrong?" + // can_be_bought = FALSE credit_cost = -5000 + movement_force = list("KNOCKDOWN" = 3, "THROW" = 2) /datum/map_template/shuttle/emergency/goon suffix = "goon" @@ -383,6 +420,14 @@ description = "The Nanotrasen Emergency Shuttle Port(NES Port for short) is a shuttle used at other less known Nanotrasen facilities and has a more open inside for larger crowds, but fewer onboard shuttle facilities." credit_cost = 500 +// /datum/map_template/shuttle/emergency/rollerdome +// suffix = "rollerdome" +// name = "Uncle Pete's Rollerdome" +// description = "Developed by a member of Nanotrasen's R&D crew that claims to have travelled from the year 2028. +// He says this shuttle is based off an old entertainment complex from the 1990s, though our database has no records on anything pertaining to that decade." +// admin_notes = "ONLY NINETIES KIDS REMEMBER. Uses the fun balloon and drone from the Emergency Bar." +// credit_cost = 500 * 5 + /datum/map_template/shuttle/emergency/wabbajack suffix = "wabbajack" name = "NT Lepton Violet" @@ -398,6 +443,7 @@ description = "On the smaller size with a modern design, this shuttle is for the crew who like the cosier things, while still being able to stretch their legs." credit_cost = 1000 +// CIT SPECIFIC /datum/map_template/shuttle/emergency/gorilla suffix = "gorilla" name = "Gorilla Cargo Freighter" @@ -405,11 +451,17 @@ credit_cost = 2000 /datum/map_template/shuttle/emergency/gorilla/prerequisites_met() - if("emagged" in SSshuttle.shuttle_purchase_requirements_met) - return TRUE - return FALSE + return SSshuttle.shuttle_purchase_requirements_met["emagged"] + /datum/map_template/shuttle/emergency/cruise + suffix = "cruise" + name = "The NTSS Independence" + description = "Ordinarily reserved for special functions and events, the Cruise Shuttle Independence can bring a summery cheer to your next station evacuation for a 'modest' fee!" + admin_notes = "This motherfucker is BIG. You might need to force dock it." + credit_cost = 8000 + +/datum/map_template/shuttle/emergency/monkey suffix = "nature" name = "Dynamic Environmental Interaction Shuttle" description = "A large shuttle with a center biodome that is flourishing with life. Frolick with the monkeys! (Extra monkeys are stored on the bridge.)" @@ -441,7 +493,7 @@ /datum/map_template/shuttle/ferry/fancy suffix = "fancy" name = "fancy transport ferry" - description = "At some point, someone upgraded the ferry to have fancier flooring... and less seats." + description = "At some point, someone upgraded the ferry to have fancier flooring... and fewer seats." /datum/map_template/shuttle/ferry/kilo suffix = "kilo" @@ -464,6 +516,14 @@ suffix = "cere" name = "NT Construction Vessel" +// /datum/map_template/shuttle/whiteship/kilo +// suffix = "kilo" +// name = "NT Mining Shuttle" + +// /datum/map_template/shuttle/whiteship/donut +// suffix = "donut" +// name = "NT Long-Distance Bluespace Jumper" + /datum/map_template/shuttle/whiteship/delta suffix = "delta" name = "NT Frigate" @@ -476,10 +536,6 @@ suffix = "cog" name = "NT Prisoner Transport" -/datum/map_template/shuttle/cargo/box - suffix = "box" - name = "supply shuttle (Box)" - /datum/map_template/shuttle/cargo/kilo suffix = "kilo" name = "supply shuttle (Kilo)" @@ -488,6 +544,14 @@ suffix = "birdboat" name = "supply shuttle (Birdboat)" +// /datum/map_template/shuttle/cargo/donut +// suffix = "donut" +// name = "supply shuttle (Donut)" + +// /datum/map_template/shuttle/cargo/pubby +// suffix = "pubby" +// name = "supply shuttle (Pubby)" + /datum/map_template/shuttle/emergency/delta suffix = "delta" name = "Delta Station Emergency Shuttle" @@ -497,11 +561,24 @@ /datum/map_template/shuttle/emergency/raven suffix = "raven" - name = "CentCom Raven Battlecruiser" - description = "The CentCom Raven Battlecruiser is currently docked at the CentCom ship bay awaiting a mission, this Battlecruiser has been reassigned as an emergency escape shuttle for currently unknown reasons. The CentCom Raven Battlecruiser should comfortably fit a medium to large crew size crew and is complete with all required facitlities including a top of the range CentCom Medical Bay." - admin_notes = "Comes with turrets that will target any simplemob." + name = "CentCom Raven Cruiser" + description = "The CentCom Raven Cruiser is a former high-risk salvage vessel, now repurposed into an emergency escape shuttle. \ + Once first to the scene to pick through warzones for valuable remains, it now serves as an excellent escape option for stations under heavy fire from outside forces. \ + This escape shuttle boasts shields and numerous anti-personnel turrets guarding its perimeter to fend off meteors and enemy boarding attempts." + admin_notes = "Comes with turrets that will target anything without the neutral faction (nuke ops, xenos etc, but not pets)." credit_cost = 12500 +// /datum/map_template/shuttle/emergency/zeta +// suffix = "zeta" +// name = "Tr%nPo2r& Z3TA" +// description = "A glitch appears on your monitor, flickering in and out of the options laid before you. +// It seems strange and alien, you may need a special technology to access the signal.." +// admin_notes = "Has alien surgery tools, and a void core that provides unlimited power." +// credit_cost = CARGO_CRATE_VALUE * 16 + +// /datum/map_template/shuttle/emergency/zeta/prerequisites_met() +// return SSshuttle.shuttle_purchase_requirements_met[SHUTTLE_UNLOCK_ALIENTECH] + /datum/map_template/shuttle/emergency/cog suffix = "cog" name = "NES Classic" @@ -524,18 +601,22 @@ suffix = "box" name = "labour shuttle (Box)" -/datum/map_template/shuttle/labour/kilo - suffix = "kilo" - name = "labour shuttle (Kilo)" - /datum/map_template/shuttle/labour/cog suffix = "cog" name = "labour shuttle (Cog)" +// /datum/map_template/shuttle/arrival/donut +// suffix = "donut" +// name = "arrival shuttle (Donut)" + /datum/map_template/shuttle/infiltrator/basic suffix = "basic" name = "basic syndicate infiltrator" +// /datum/map_template/shuttle/infiltrator/advanced +// suffix = "advanced" +// name = "advanced syndicate infiltrator" + /datum/map_template/shuttle/cargo/delta suffix = "delta" name = "cargo ferry (Delta)" @@ -548,17 +629,25 @@ suffix = "kilo" name = "mining shuttle (Kilo)" +// /datum/map_template/shuttle/mining/large +// suffix = "large" +// name = "mining shuttle (Large)" + /datum/map_template/shuttle/labour/delta suffix = "delta" name = "labour shuttle (Delta)" +/datum/map_template/shuttle/labour/kilo + suffix = "kilo" + name = "labour shuttle (Kilo)" + /datum/map_template/shuttle/mining_common/meta suffix = "meta" name = "lavaland shuttle (Meta)" -/datum/map_template/shuttle/labour/kilo - suffix = "kilo" - name = "labour shuttle (Kilo)" +// /datum/map_template/shuttle/mining_common/kilo +// suffix = "kilo" +// name = "lavaland shuttle (Kilo)" /datum/map_template/shuttle/arrival/delta suffix = "delta" @@ -608,6 +697,18 @@ suffix = "default" name = "pirate ship (Default)" +/datum/map_template/shuttle/hunter/space_cop + suffix = "space_cop" + name = "Police Spacevan" + +/datum/map_template/shuttle/hunter/russian + suffix = "russian" + name = "Russian Cargo Ship" + +/datum/map_template/shuttle/hunter/bounty + suffix = "bounty" + name = "Bounty Hunter Ship" + /datum/map_template/shuttle/ruin/caravan_victim suffix = "caravan_victim" name = "Small Freighter" @@ -631,15 +732,3 @@ /datum/map_template/shuttle/snowdin/excavation suffix = "excavation" name = "Snowdin Excavation Elevator" - -/datum/map_template/shuttle/hunter/space_cop - suffix = "space_cop" - name = "Police Spacevan" - -/datum/map_template/shuttle/hunter/russian - suffix = "russian" - name = "Russian Cargo Ship" - -/datum/map_template/shuttle/hunter/bounty - suffix = "bounty" - name = "Bounty Hunter Ship" diff --git a/code/datums/view.dm b/code/datums/view.dm index 8eb06c2bd2..5610fb040e 100644 --- a/code/datums/view.dm +++ b/code/datums/view.dm @@ -83,8 +83,6 @@ /datum/viewData/proc/apply() chief.change_view(getView()) safeApplyFormat() - if(chief.prefs.auto_fit_viewport) - chief.fit_viewport() /datum/viewData/proc/supress() is_suppressed = TRUE diff --git a/code/datums/world_topic.dm b/code/datums/world_topic.dm index 7a1f0f6980..415a616c90 100644 --- a/code/datums/world_topic.dm +++ b/code/datums/world_topic.dm @@ -106,8 +106,8 @@ /datum/world_topic/comms_console/Run(list/input, addr) minor_announce(input["message"], "Incoming message from [input["message_sender"]]") - for(var/obj/machinery/computer/communications/CM in GLOB.machines) - CM.overrideCooldown() + for(var/obj/machinery/computer/communications/console in GLOB.machines) + console.override_cooldown() /datum/world_topic/news_report keyword = "News_Report" diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index 19e6768d71..9953b593d9 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -149,7 +149,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event if(isliving(thing)) var/mob/living/living_thing = thing living_thing.visible_message("[src] slams into [living_thing].", "[src] slams into you!.") - A.ex_act(hitpwr) + living_thing.ex_act(hitpwr) //then, ram the turf if it still exists if(T) diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 82dd78eecc..dd2ebf287f 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -96,7 +96,7 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list( /obj/machinery/computer/arcade/proc/prizevend(mob/user, prizes = 1) // if(user.mind?.get_skill_level(/datum/skill/gaming) >= SKILL_LEVEL_LEGENDARY && HAS_TRAIT(user, TRAIT_GAMERGOD)) - // visible_message("[user] inputs an intense cheat code!",\ + // visible_message("[user] inputs an intense cheat code!", // "You hear a flurry of buttons being pressed.") // say("CODE ACTIVATED: EXTRA PRIZES.") // prizes *= 2 diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 3ef887b156..83fae86ad6 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -1,14 +1,10 @@ -#define STATE_DEFAULT 1 -#define STATE_CALLSHUTTLE 2 -#define STATE_CANCELSHUTTLE 3 -#define STATE_MESSAGELIST 4 -#define STATE_VIEWMESSAGE 5 -#define STATE_DELMESSAGE 6 -#define STATE_STATUSDISPLAY 7 -#define STATE_ALERT_LEVEL 8 -#define STATE_CONFIRM_LEVEL 9 -#define STATE_TOGGLE_EMERGENCY 10 -#define STATE_PURCHASE 11 +#define IMPORTANT_ACTION_COOLDOWN (60 SECONDS) +#define MAX_STATUS_LINE_LENGTH 40 + +#define STATE_BUYING_SHUTTLE "buying_shuttle" +#define STATE_CHANGING_STATUS "changing_status" +#define STATE_MAIN "main" +#define STATE_MESSAGES "messages" // The communications computer /obj/machinery/computer/communications @@ -19,423 +15,53 @@ req_access = list(ACCESS_HEADS) circuit = /obj/item/circuitboard/computer/communications light_color = LIGHT_COLOR_BLUE - var/auth_id = "Unknown" //Who is currently logged in? - var/list/datum/comm_message/messages = list() - var/datum/comm_message/currmsg - var/datum/comm_message/aicurrmsg - var/state = STATE_DEFAULT - var/aistate = STATE_DEFAULT - var/message_cooldown = 0 - var/ai_message_cooldown = 0 - var/tmp_alertlevel = 0 - var/static/security_level_cd // used to stop mass spam. - var/stat_msg1 - var/stat_msg2 + /// Cooldown for important actions, such as messaging CentCom or other sectors + COOLDOWN_DECLARE(static/important_action_cooldown) + /// The current state of the UI + var/state = STATE_MAIN -/obj/machinery/computer/communications/proc/checkCCcooldown() - var/obj/item/circuitboard/computer/communications/CM = circuit - if(CM.lastTimeUsed + 600 > world.time) - return FALSE - return TRUE + /// The current state of the UI for AIs + var/cyborg_state = STATE_MAIN + + /// The name of the user who logged in + var/authorize_name + + /// The access that the card had on login + var/list/authorize_access + + /// The messages this console has been sent + var/list/datum/comm_message/messages + + /// How many times the alert level has been changed + /// Used to clear the modal to change alert level + var/alert_level_tick = 0 + + /// The last lines used for changing the status display + var/static/last_status_display /obj/machinery/computer/communications/Initialize() . = ..() GLOB.shuttle_caller_list += src -/obj/machinery/computer/communications/Topic(href, href_list) - if(..()) - return - if(!usr.canUseTopic(src, !issilicon(usr))) - return - if(!is_station_level(z) && !is_reserved_level(z)) //Can only use in transit and on SS13 - to_chat(usr, "Unable to establish a connection: \black You're too far away from the station!") - return - usr.set_machine(src) +/// Are we NOT a silicon, AND we're logged in as the captain? +/obj/machinery/computer/communications/proc/authenticated_as_non_silicon_captain(mob/user) + if (issilicon(user)) + return FALSE + return ACCESS_CAPTAIN in authorize_access +/// Are we a silicon, OR we're logged in as the captain? +/obj/machinery/computer/communications/proc/authenticated_as_silicon_or_captain(mob/user) + if (issilicon(user)) + return TRUE + return ACCESS_CAPTAIN in authorize_access - if(!href_list["operation"]) - return - var/obj/item/circuitboard/computer/communications/CM = circuit - switch(href_list["operation"]) - // main interface - if("main") - state = STATE_DEFAULT - playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE) - if("login") - var/mob/M = usr - - var/obj/item/card/id/I = M.get_idcard(TRUE) - - if(I && istype(I)) - if(check_access(I)) - authenticated = 1 - auth_id = "[I.registered_name] ([I.assignment])" - if((ACCESS_CAPTAIN in I.access)) - authenticated = 2 - playsound(src, 'sound/machines/terminal_on.ogg', 50, FALSE) - if(obj_flags & EMAGGED) - authenticated = 2 - auth_id = "Unknown" - to_chat(M, "[src] lets out a quiet alarm as its login is overridden.") - playsound(src, 'sound/machines/terminal_on.ogg', 50, FALSE) - playsound(src, 'sound/machines/terminal_alert.ogg', 25, FALSE) - if(prob(25)) - for(var/mob/living/silicon/ai/AI in active_ais()) - SEND_SOUND(AI, sound('sound/machines/terminal_alert.ogg', volume = 10)) //Very quiet for balance reasons - if("logout") - authenticated = 0 - playsound(src, 'sound/machines/terminal_off.ogg', 50, FALSE) - - if("swipeidseclevel") - var/mob/M = usr - var/obj/item/card/id/I = M.get_active_held_item() - if (istype(I, /obj/item/pda)) - var/obj/item/pda/pda = I - I = pda.id - if (I && istype(I)) - if(ACCESS_CAPTAIN in I.access) - if(security_level_cd > world.time) - to_chat(usr, "Security level protocols are currently on cooldown. Please stand by.") - return - var/old_level = GLOB.security_level - if(!tmp_alertlevel) - tmp_alertlevel = SEC_LEVEL_GREEN - if(tmp_alertlevel < SEC_LEVEL_GREEN) - tmp_alertlevel = SEC_LEVEL_GREEN - if(tmp_alertlevel > SEC_LEVEL_AMBER) - tmp_alertlevel = SEC_LEVEL_AMBER //Cannot engage delta with this - set_security_level(tmp_alertlevel) - security_level_cd = world.time + 15 SECONDS - if(GLOB.security_level != old_level) - to_chat(usr, "Authorization confirmed. Modifying security level.") - playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) - //Only notify people if an actual change happened - var/security_level = NUM2SECLEVEL(GLOB.security_level) - log_game("[key_name(usr)] has changed the security level to [security_level] with [src] at [AREACOORD(usr)].") - message_admins("[ADMIN_LOOKUPFLW(usr)] has changed the security level to [security_level] with [src] at [AREACOORD(usr)].") - deadchat_broadcast("[usr.real_name] has changed the security level to [security_level] with [src] at [get_area_name(usr, TRUE)].", usr) - tmp_alertlevel = 0 - else - to_chat(usr, "You are not authorized to do this!") - playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE) - tmp_alertlevel = 0 - state = STATE_DEFAULT - else - to_chat(usr, "You need to swipe your ID!") - playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE) - - if("announce") - if(authenticated==2) - playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE) - make_announcement(usr) - - if("crossserver") - if(authenticated==2) - var/dest = href_list["cross_dest"] - if(!checkCCcooldown()) - to_chat(usr, "Arrays recycling. Please stand by.") - playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE) - return - var/warning = dest == "all" ? "Please choose a message to transmit to allied stations." : "Please choose a message to transmit to [dest] sector station." - var/input = stripped_multiline_input(usr, "[warning] Please be aware that this process is very expensive, and abuse will lead to... termination.", "Send a message to an allied station.", "") - if(!input || !(usr in view(1,src)) || !checkCCcooldown()) - return - playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) - if(dest == "all") - send2otherserver("[station_name()]", input,"Comms_Console") - else - send2otherserver("[station_name()]", input,"Comms_Console", list(dest)) - minor_announce(input, title = "Outgoing message to allied station") - usr.log_talk(input, LOG_SAY, tag="message to the other server") - message_admins("[ADMIN_LOOKUPFLW(usr)] has sent a message to the other server.") - deadchat_broadcast("[usr.real_name] has sent an outgoing message to the other station(s).", usr) - CM.lastTimeUsed = world.time - - if("purchase_menu") - state = STATE_PURCHASE - - if("buyshuttle") - if(authenticated==2) - var/list/shuttles = flatten_list(SSmapping.shuttle_templates) - var/datum/map_template/shuttle/S = locate(href_list["chosen_shuttle"]) in shuttles - if(S && istype(S)) - if(SSshuttle.emergency.mode != SHUTTLE_RECALL && SSshuttle.emergency.mode != SHUTTLE_IDLE) - to_chat(usr, "It's a bit late to buy a new shuttle, don't you think?") - return - if(SSshuttle.shuttle_purchased) - to_chat(usr, "A replacement shuttle has already been purchased.") - else if(!S.prerequisites_met()) - to_chat(usr, "You have not met the requirements for purchasing this shuttle.") - else - var/points_to_check - var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR) - if(D) - points_to_check = D.account_balance - if(points_to_check >= S.credit_cost) - SSshuttle.shuttle_purchased = TRUE - SSshuttle.unload_preview() - SSshuttle.load_template(S) - SSshuttle.existing_shuttle = SSshuttle.emergency - SSshuttle.action_load(S) - D.adjust_money(-S.credit_cost) - minor_announce("[usr.real_name] has purchased [S.name] for [S.credit_cost] credits." , "Shuttle Purchase") - message_admins("[ADMIN_LOOKUPFLW(usr)] purchased [S.name].") - log_shuttle("[key_name(usr)] has purchased [S.name].") - SSblackbox.record_feedback("text", "shuttle_purchase", 1, "[S.name]") - else - to_chat(usr, "Insufficient credits.") - - if("callshuttle") - state = STATE_DEFAULT - if(authenticated && SSshuttle.canEvac(usr)) - state = STATE_CALLSHUTTLE - if("callshuttle2") - if(authenticated) - SSshuttle.requestEvac(usr, href_list["call"]) - if(SSshuttle.emergency.timer) - post_status("shuttle") - state = STATE_DEFAULT - if("cancelshuttle") - state = STATE_DEFAULT - if(authenticated) - state = STATE_CANCELSHUTTLE - if("cancelshuttle2") - if(authenticated) - if(SSshuttle.endvote_passed) //Citadel Edit - endvote passing = no recalls - say("Warning: Emergency shuttle recalls have been blocked by Central Command due to ongoing crew transfer procedures.") - else - SSshuttle.cancelEvac(usr) - state = STATE_DEFAULT - if("messagelist") - currmsg = 0 - state = STATE_MESSAGELIST - if("viewmessage") - state = STATE_VIEWMESSAGE - if (!currmsg) - if(href_list["message-num"]) - var/msgnum = text2num(href_list["message-num"]) - currmsg = messages[msgnum] - else - state = STATE_MESSAGELIST - if("delmessage") - state = currmsg ? STATE_DELMESSAGE : STATE_MESSAGELIST - if("delmessage2") - if(authenticated) - if(currmsg) - if(aicurrmsg == currmsg) - aicurrmsg = null - messages -= currmsg - currmsg = null - state = STATE_MESSAGELIST - else - state = STATE_VIEWMESSAGE - if("respond") - var/answer = text2num(href_list["answer"]) - if(!currmsg || !answer || currmsg.possible_answers.len < answer) - state = STATE_MESSAGELIST - else - if(!currmsg.answered) - currmsg.answered = answer - log_game("[key_name(usr)] answered [currmsg.title] comm message. Answer : [currmsg.answered]") - if(currmsg) - currmsg.answer_callback.InvokeAsync() - state = STATE_VIEWMESSAGE - updateDialog() - if("status") - state = STATE_STATUSDISPLAY - if("securitylevel") - tmp_alertlevel = text2num( href_list["newalertlevel"] ) - if(!tmp_alertlevel) - tmp_alertlevel = 0 - state = STATE_CONFIRM_LEVEL - if("changeseclevel") - state = STATE_ALERT_LEVEL - - if("emergencyaccess") - state = STATE_TOGGLE_EMERGENCY - if("enableemergency") - make_maint_all_access() - log_game("[key_name(usr)] enabled emergency maintenance access.") - message_admins("[ADMIN_LOOKUPFLW(usr)] enabled emergency maintenance access.") - deadchat_broadcast("[usr.real_name] enabled emergency maintenance access at [get_area_name(usr, TRUE)].", usr) - state = STATE_DEFAULT - if("disableemergency") - revoke_maint_all_access() - log_game("[key_name(usr)] disabled emergency maintenance access.") - message_admins("[ADMIN_LOOKUPFLW(usr)] disabled emergency maintenance access.") - deadchat_broadcast("[usr.real_name] disabled emergency maintenance access at [get_area_name(usr, TRUE)].", usr) - state = STATE_DEFAULT - - // Status display stuff - if("setstat") - playsound(src, "terminal_type", 50, FALSE) - switch(href_list["statdisp"]) - if("message") - post_status("message", stat_msg1, stat_msg2) - if("alert") - post_status("alert", href_list["alert"]) - else - post_status(href_list["statdisp"]) - - if("setmsg1") - stat_msg1 = reject_bad_text(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 40) - updateDialog() - if("setmsg2") - stat_msg2 = reject_bad_text(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 40) - updateDialog() - - // OMG CENTCOM LETTERHEAD - if("MessageCentCom") - if(authenticated) - if(!checkCCcooldown()) - to_chat(usr, "Arrays recycling. Please stand by.") - return - var/input = stripped_input(usr, "Please choose a message to transmit to CentCom via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "Send a message to CentCom.", "") - if(!input || !(usr in view(1,src)) || !checkCCcooldown()) - return - playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) - CentCom_announce(input, usr) - to_chat(usr, "Message transmitted to Central Command.") - for(var/client/X in GLOB.admins) - if(X.prefs.toggles & SOUND_ADMINHELP) - SEND_SOUND(X, sound('sound/effects/printer.ogg')) - window_flash(X, ignorepref = FALSE) - usr.log_talk(input, LOG_SAY, tag="CentCom announcement") - deadchat_broadcast("[usr.real_name] has messaged CentCom, \"[input]\" at [get_area_name(usr, TRUE)].", usr) - CM.lastTimeUsed = world.time - - // OMG SYNDICATE ...LETTERHEAD - if("MessageSyndicate") - if((authenticated) && (obj_flags & EMAGGED)) - if(!checkCCcooldown()) - to_chat(usr, "Arrays recycling. Please stand by.") - playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE) - return - var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING COORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "Send a message to /??????/.", "") - if(!input || !(usr in view(1,src)) || !checkCCcooldown()) - return - playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) - Syndicate_announce(input, usr) - to_chat(usr, "SYSERR @l(19833)of(transmit.dm): !@$ MESSAGE TRANSMITTED TO SYNDICATE COMMAND.") - for(var/client/X in GLOB.admins) - if(X.prefs.toggles & SOUND_ADMINHELP) - SEND_SOUND(X, sound('sound/effects/printer.ogg')) - window_flash(X, ignorepref = FALSE) - usr.log_talk(input, LOG_SAY, tag="Syndicate announcement") - deadchat_broadcast("[usr.real_name] has messaged the Syndicate, \"[input]\" at [get_area_name(usr, TRUE)].", usr) - CM.lastTimeUsed = world.time - - if("RestoreBackup") - to_chat(usr, "Backup routing data restored!") - playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) - obj_flags &= ~EMAGGED - updateDialog() - - if("nukerequest") //When there's no other way - if(authenticated==2) - if(!checkCCcooldown()) - to_chat(usr, "Arrays recycling. Please stand by.") - return - var/input = stripped_input(usr, "Please enter the reason for requesting the nuclear self-destruct codes. Misuse of the nuclear request system will not be tolerated under any circumstances. Transmission does not guarantee a response.", "Self-Destruct Code Request.","") - if(!input || !(usr in view(1,src)) || !checkCCcooldown()) - return - Nuke_request(input, usr) - to_chat(usr, "Request sent.") - usr.log_message("has requested the nuclear codes from CentCom with reason \"[input]\"", LOG_SAY) - priority_announce("The codes for the on-station nuclear self-destruct have been requested by [usr]. Confirmation or denial of this request will be sent shortly.", "Nuclear Self Destruct Codes Requested","commandreport") - CM.lastTimeUsed = world.time - - - // AI interface - if("ai-main") - aicurrmsg = null - aistate = STATE_DEFAULT - if("ai-callshuttle") - aistate = STATE_DEFAULT - if(SSshuttle.canEvac(usr)) - aistate = STATE_CALLSHUTTLE - if("ai-callshuttle2") - SSshuttle.requestEvac(usr, href_list["call"]) - aistate = STATE_DEFAULT - if("ai-messagelist") - aicurrmsg = null - aistate = STATE_MESSAGELIST - if("ai-viewmessage") - aistate = STATE_VIEWMESSAGE - if (!aicurrmsg) - if(href_list["message-num"]) - var/msgnum = text2num(href_list["message-num"]) - aicurrmsg = messages[msgnum] - else - aistate = STATE_MESSAGELIST - if("ai-delmessage") - aistate = aicurrmsg ? STATE_DELMESSAGE : STATE_MESSAGELIST - if("ai-delmessage2") - if(aicurrmsg) - if(currmsg == aicurrmsg) - currmsg = null - messages -= aicurrmsg - aicurrmsg = null - aistate = STATE_MESSAGELIST - if("ai-respond") - var/answer = text2num(href_list["answer"]) - if(!aicurrmsg || !answer || aicurrmsg.possible_answers.len < answer) - aistate = STATE_MESSAGELIST - else - if(!aicurrmsg.answered) - aicurrmsg.answered = answer - log_game("[key_name(usr)] answered [aicurrmsg.title] comm message. Answer : [aicurrmsg.answered]") - if(aicurrmsg.answer_callback) - aicurrmsg.answer_callback.InvokeAsync() - aistate = STATE_VIEWMESSAGE - if("ai-status") - aistate = STATE_STATUSDISPLAY - if("ai-announce") - make_announcement(usr, 1) - if("ai-securitylevel") - if(security_level_cd > world.time) - to_chat(usr, "Security level protocols are currently on cooldown. Please stand by.") - return - tmp_alertlevel = text2num( href_list["newalertlevel"] ) - if(!tmp_alertlevel) - tmp_alertlevel = SEC_LEVEL_GREEN - var/old_level = GLOB.security_level - if(!tmp_alertlevel) - tmp_alertlevel = SEC_LEVEL_GREEN - if(tmp_alertlevel < SEC_LEVEL_GREEN) - tmp_alertlevel = SEC_LEVEL_GREEN - if(tmp_alertlevel > SEC_LEVEL_AMBER) - tmp_alertlevel = SEC_LEVEL_AMBER //Cannot engage delta with this - set_security_level(tmp_alertlevel) - security_level_cd = world.time + 15 SECONDS - if(GLOB.security_level != old_level) - //Only notify people if an actual change happened - var/security_level = NUM2SECLEVEL(GLOB.security_level) - log_game("[key_name(usr)] has changed the security level to [security_level] from [src] at [AREACOORD(usr)].") - message_admins("[ADMIN_LOOKUPFLW(usr)] has changed the security level to [security_level] from [src] at [AREACOORD(usr)].") - deadchat_broadcast("[usr.real_name] has changed the security level to [security_level] from [src] at [get_area_name(usr, TRUE)].", usr) - tmp_alertlevel = 0 - aistate = STATE_DEFAULT - if("ai-changeseclevel") - aistate = STATE_ALERT_LEVEL - if("ai-emergencyaccess") - aistate = STATE_TOGGLE_EMERGENCY - if("ai-enableemergency") - make_maint_all_access() - log_game("[key_name(usr)] enabled emergency maintenance access.") - message_admins("[ADMIN_LOOKUPFLW(usr)] enabled emergency maintenance access.") - deadchat_broadcast("[usr.real_name] enabled emergency maintenance access.", usr) - aistate = STATE_DEFAULT - if("ai-disableemergency") - revoke_maint_all_access() - log_game("[key_name(usr)] disabled emergency maintenance access.") - message_admins("[ADMIN_LOOKUPFLW(usr)] disabled emergency maintenance access.") - deadchat_broadcast("[usr.real_name] disabled emergency maintenance access.", usr) - aistate = STATE_DEFAULT - - updateUsrDialog() +/// Are we a silicon, OR logged in? +/obj/machinery/computer/communications/proc/authenticated(mob/user) + if (issilicon(user)) + return TRUE + return authenticated /obj/machinery/computer/communications/attackby(obj/I, mob/user, params) if(istype(I, /obj/item/card/id)) @@ -445,292 +71,414 @@ /obj/machinery/computer/communications/emag_act(mob/user) . = ..() - if(obj_flags & EMAGGED) + if (obj_flags & EMAGGED) return obj_flags |= EMAGGED - SSshuttle.shuttle_purchase_requirements_met |= "emagged" - if(authenticated == 1) - authenticated = 2 + if (authenticated) + authorize_access = get_all_accesses() to_chat(user, "You scramble the communication routing circuits!") playsound(src, 'sound/machines/terminal_alert.ogg', 50, FALSE) + return + +/obj/machinery/computer/communications/ui_act(action, list/params) + var/static/list/approved_states = list(STATE_BUYING_SHUTTLE, STATE_CHANGING_STATUS, STATE_MAIN, STATE_MESSAGES) + var/static/list/approved_status_pictures = list("biohazard", "blank", "default", "lockdown", "redalert", "shuttle") + + . = ..() + if (.) + return + + if (!has_communication()) + return + + . = TRUE + + switch (action) + if ("answerMessage") + if (!authenticated(usr)) + return + var/answer_index = text2num(params["answer"]) + var/message_index = text2num(params["message"]) + if (!answer_index || !message_index || answer_index < 1 || message_index < 1) + return + var/datum/comm_message/message = messages[message_index] + if (message.answered) + return + message.answered = answer_index + message.answer_callback.InvokeAsync() + if ("callShuttle") + if (!authenticated(usr)) + return + var/reason = trim(params["reason"], MAX_MESSAGE_LEN) + if (length(reason) < CALL_SHUTTLE_REASON_LENGTH) + return + SSshuttle.requestEvac(usr, reason) + post_status("shuttle") + if ("changeSecurityLevel") + if (!authenticated_as_silicon_or_captain(usr)) + return + + // Check if they have + if (!issilicon(usr)) + var/obj/item/held_item = usr.get_active_held_item() + var/obj/item/card/id/id_card = held_item?.GetID() + if (!istype(id_card)) + to_chat(usr, "You need to swipe your ID!") + playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE) + return + if (!(ACCESS_CAPTAIN in id_card.access)) + to_chat(usr, "You are not authorized to do this!") + playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, FALSE) + return + + var/new_sec_level = SECLEVEL2NUM(params["newSecurityLevel"]) + if (new_sec_level != SEC_LEVEL_GREEN && new_sec_level != SEC_LEVEL_BLUE + && new_sec_level != SEC_LEVEL_AMBER) + return + if (GLOB.security_level == new_sec_level) + return + + set_security_level(new_sec_level) + + to_chat(usr, "Authorization confirmed. Modifying security level.") + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) + + // Only notify people if an actual change happened + log_game("[key_name(usr)] has changed the security level to [params["newSecurityLevel"]] with [src] at [AREACOORD(usr)].") + message_admins("[ADMIN_LOOKUPFLW(usr)] has changed the security level to [params["newSecurityLevel"]] with [src] at [AREACOORD(usr)].") + deadchat_broadcast(" has changed the security level to [params["newSecurityLevel"]] with [src] at [get_area_name(usr, TRUE)].", "[usr.real_name]", usr) + + alert_level_tick += 1 + if ("deleteMessage") + if (!authenticated(usr)) + return + var/message_index = text2num(params["message"]) + if (!message_index) + return + LAZYREMOVE(messages, LAZYACCESS(messages, message_index)) + if ("makePriorityAnnouncement") + if (!authenticated_as_silicon_or_captain(usr)) + return + make_announcement(usr) + if ("messageAssociates") + if (!authenticated_as_non_silicon_captain(usr)) + return + if (!COOLDOWN_FINISHED(src, important_action_cooldown)) + return + + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) + var/message = trim(html_encode(params["message"]), MAX_MESSAGE_LEN) + + var/emagged = obj_flags & EMAGGED + if (emagged) + message_syndicate(message, usr) + to_chat(usr, "SYSERR @l(19833)of(transmit.dm): !@$ MESSAGE TRANSMITTED TO SYNDICATE COMMAND.") + else + message_centcom(message, usr) + to_chat(usr, "Message transmitted to Central Command.") + + var/associates = emagged ? "the Syndicate": "CentCom" + usr.log_talk(message, LOG_SAY, tag = "message to [associates]") + deadchat_broadcast(" has messaged [associates], \"[message]\" at [get_area_name(usr, TRUE)].", "[usr.real_name]", usr) + COOLDOWN_START(src, important_action_cooldown, IMPORTANT_ACTION_COOLDOWN) + if ("purchaseShuttle") + var/can_buy_shuttles_or_fail_reason = can_buy_shuttles(usr) + if (can_buy_shuttles_or_fail_reason != TRUE) + if (can_buy_shuttles_or_fail_reason != FALSE) + to_chat(usr, "[can_buy_shuttles_or_fail_reason]") + return + var/list/shuttles = flatten_list(SSmapping.shuttle_templates) + var/datum/map_template/shuttle/shuttle = locate(params["shuttle"]) in shuttles + if (!istype(shuttle)) + return + if (!shuttle.prerequisites_met()) + to_chat(usr, "You have not met the requirements for purchasing this shuttle.") + return + var/datum/bank_account/bank_account = SSeconomy.get_dep_account(ACCOUNT_CAR) + if (bank_account.account_balance < shuttle.credit_cost) + return + SSshuttle.shuttle_purchased = SHUTTLEPURCHASE_PURCHASED + SSshuttle.unload_preview() + SSshuttle.existing_shuttle = SSshuttle.emergency + SSshuttle.action_load(shuttle, replace = TRUE) + bank_account.adjust_money(-shuttle.credit_cost) + minor_announce("[usr.real_name] has purchased [shuttle.name] for [shuttle.credit_cost] credits.[shuttle.extra_desc ? " [shuttle.extra_desc]" : ""]" , "Shuttle Purchase") + message_admins("[ADMIN_LOOKUPFLW(usr)] purchased [shuttle.name].") + log_shuttle("[key_name(usr)] has purchased [shuttle.name].") + SSblackbox.record_feedback("text", "shuttle_purchase", 1, shuttle.name) + state = STATE_MAIN + if ("recallShuttle") + // AIs cannot recall the shuttle + if (!authenticated(usr) || issilicon(usr)) + return + SSshuttle.cancelEvac(usr) + if ("requestNukeCodes") + if (!authenticated_as_non_silicon_captain(usr)) + return + if (!COOLDOWN_FINISHED(src, important_action_cooldown)) + return + var/reason = trim(html_encode(params["reason"]), MAX_MESSAGE_LEN) + nuke_request(reason, usr) + to_chat(usr, "Request sent.") + usr.log_message("has requested the nuclear codes from CentCom with reason \"[reason]\"", LOG_SAY) + priority_announce("The codes for the on-station nuclear self-destruct have been requested by [usr]. Confirmation or denial of this request will be sent shortly.", "Nuclear Self-Destruct Codes Requested", 'sound/ai/commandreport.ogg') + playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE) + COOLDOWN_START(src, important_action_cooldown, IMPORTANT_ACTION_COOLDOWN) + if ("restoreBackupRoutingData") + if (!authenticated_as_non_silicon_captain(usr)) + return + if (!(obj_flags & EMAGGED)) + return + to_chat(usr, "Backup routing data restored.") + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) + obj_flags &= ~EMAGGED + if ("sendToOtherSector") + if (!authenticated_as_non_silicon_captain(usr)) + return + if (!can_send_messages_to_other_sectors(usr)) + return + if (!COOLDOWN_FINISHED(src, important_action_cooldown)) + return + + var/message = trim(html_encode(params["message"]), MAX_MESSAGE_LEN) + if (!message) + return + + playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) + + var/destination = params["destination"] + var/list/payload = list() + + var/network_name = CONFIG_GET(string/cross_comms_network) + if (network_name) + payload["network"] = network_name + + send2otherserver(station_name(), message, "Comms_Console", destination == "all" ? null : list(destination), additional_data = payload) + minor_announce(message, title = "Outgoing message to allied station") + usr.log_talk(message, LOG_SAY, tag = "message to the other server") + message_admins("[ADMIN_LOOKUPFLW(usr)] has sent a message to the other server\[s].") + deadchat_broadcast(" has sent an outgoing message to the other station(s).", "[usr.real_name]", usr) + + COOLDOWN_START(src, important_action_cooldown, IMPORTANT_ACTION_COOLDOWN) + if ("setState") + if (!authenticated(usr)) + return + if (!(params["state"] in approved_states)) + return + if (state == STATE_BUYING_SHUTTLE && can_buy_shuttles(usr) != TRUE) + return + set_state(usr, params["state"]) + playsound(src, "terminal_type", 50, FALSE) + if ("setStatusMessage") + if (!authenticated(usr)) + return + var/line_one = reject_bad_text(params["lineOne"] || "", MAX_STATUS_LINE_LENGTH) + var/line_two = reject_bad_text(params["lineTwo"] || "", MAX_STATUS_LINE_LENGTH) + post_status("alert", "blank") + post_status("message", line_one, line_two) + last_status_display = list(line_one, line_two) + playsound(src, "terminal_type", 50, FALSE) + if ("setStatusPicture") + if (!authenticated(usr)) + return + var/picture = params["picture"] + if (!(picture in approved_status_pictures)) + return + post_status("alert", picture) + playsound(src, "terminal_type", 50, FALSE) + if ("toggleAuthentication") + // Log out if we're logged in + if (authorize_name) + authenticated = FALSE + authorize_access = null + authorize_name = null + playsound(src, 'sound/machines/terminal_off.ogg', 50, FALSE) + return + + if (obj_flags & EMAGGED) + authenticated = TRUE + authorize_access = get_all_accesses() + authorize_name = "Unknown" + to_chat(usr, "[src] lets out a quiet alarm as its login is overridden.") + playsound(src, 'sound/machines/terminal_alert.ogg', 25, FALSE) + else if(isliving(usr)) + var/mob/living/L = usr + var/obj/item/card/id/id_card = L.get_idcard(hand_first = TRUE) + if (check_access(id_card)) + authenticated = TRUE + authorize_access = id_card.access + authorize_name = "[id_card.registered_name] - [id_card.assignment]" + + state = STATE_MAIN + playsound(src, 'sound/machines/terminal_on.ogg', 50, FALSE) + if ("toggleEmergencyAccess") + if (!authenticated_as_silicon_or_captain(usr)) + return + if (GLOB.emergency_access) + revoke_maint_all_access() + log_game("[key_name(usr)] disabled emergency maintenance access.") + message_admins("[ADMIN_LOOKUPFLW(usr)] disabled emergency maintenance access.") + deadchat_broadcast(" disabled emergency maintenance access at [get_area_name(usr, TRUE)].", "[usr.real_name]", usr) + else + make_maint_all_access() + log_game("[key_name(usr)] enabled emergency maintenance access.") + message_admins("[ADMIN_LOOKUPFLW(usr)] enabled emergency maintenance access.") + deadchat_broadcast(" enabled emergency maintenance access at [get_area_name(usr, TRUE)].", "[usr.real_name]", usr) + +/obj/machinery/computer/communications/ui_data(mob/user) + var/list/data = list( + "authenticated" = FALSE, + "emagged" = FALSE, + "hasConnection" = has_communication(), + ) + + var/ui_state = issilicon(user) ? cyborg_state : state + + if (authenticated || issilicon(user)) + data["authenticated"] = TRUE + data["canLogOut"] = !issilicon(user) + data["page"] = ui_state + + if (obj_flags & EMAGGED) + data["emagged"] = TRUE + + switch (ui_state) + if (STATE_MAIN) + data["canBuyShuttles"] = can_buy_shuttles(user) + data["canMakeAnnouncement"] = FALSE + data["canMessageAssociates"] = FALSE + data["canRecallShuttles"] = !issilicon(user) + data["canRequestNuke"] = FALSE + data["canSendToSectors"] = FALSE + data["canSetAlertLevel"] = FALSE + data["canToggleEmergencyAccess"] = FALSE + data["importantActionReady"] = COOLDOWN_FINISHED(src, important_action_cooldown) + data["shuttleCalled"] = FALSE + data["shuttleLastCalled"] = FALSE + + data["alertLevel"] = GLOB.security_level + data["authorizeName"] = authorize_name + data["canLogOut"] = !issilicon(user) + data["shuttleCanEvacOrFailReason"] = SSshuttle.canEvac(user) + + if (authenticated_as_non_silicon_captain(user)) + data["canMessageAssociates"] = TRUE + data["canRequestNuke"] = TRUE + + if (can_send_messages_to_other_sectors(user)) + data["canSendToSectors"] = TRUE + + var/list/sectors = list() + var/our_id = CONFIG_GET(string/cross_comms_name) + + for (var/server in CONFIG_GET(keyed_list/cross_server)) + if (server == our_id) + continue + sectors += server + + data["sectors"] = sectors + + if (authenticated_as_silicon_or_captain(user)) + data["canToggleEmergencyAccess"] = TRUE + data["emergencyAccess"] = GLOB.emergency_access + + data["alertLevelTick"] = alert_level_tick + data["canMakeAnnouncement"] = TRUE + data["canSetAlertLevel"] = issilicon(user) ? "NO_SWIPE_NEEDED" : "SWIPE_NEEDED" + + if (SSshuttle.emergency.mode != SHUTTLE_IDLE && SSshuttle.emergency.mode != SHUTTLE_RECALL) + data["shuttleCalled"] = TRUE + data["shuttleRecallable"] = SSshuttle.canRecall() + + if (SSshuttle.emergencyCallAmount) + data["shuttleCalledPreviously"] = TRUE + if (SSshuttle.emergencyLastCallLoc) + data["shuttleLastCalled"] = format_text(SSshuttle.emergencyLastCallLoc.name) + if (STATE_MESSAGES) + data["messages"] = list() + + if (messages) + for (var/_message in messages) + var/datum/comm_message/message = _message + data["messages"] += list(list( + "answered" = message.answered, + "content" = message.content, + "title" = message.title, + "possibleAnswers" = message.possible_answers, + )) + if (STATE_BUYING_SHUTTLE) + var/datum/bank_account/bank_account = SSeconomy.get_dep_account(ACCOUNT_CAR) + var/list/shuttles = list() + + for (var/shuttle_id in SSmapping.shuttle_templates) + var/datum/map_template/shuttle/shuttle_template = SSmapping.shuttle_templates[shuttle_id] + if (!shuttle_template.can_be_bought || shuttle_template.credit_cost == INFINITY) + continue + shuttles += list(list( + "name" = shuttle_template.name, + "description" = shuttle_template.description, + "creditCost" = shuttle_template.credit_cost, + "prerequisites" = shuttle_template.prerequisites, + "ref" = REF(shuttle_template), + )) + + data["budget"] = bank_account.account_balance + data["shuttles"] = shuttles + if (STATE_CHANGING_STATUS) + data["lineOne"] = last_status_display ? last_status_display[1] : "" + data["lineTwo"] = last_status_display ? last_status_display[2] : "" + + return data + +/obj/machinery/computer/communications/ui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if (!ui) + ui = new(user, src, "CommunicationsConsole") + ui.open() + +/obj/machinery/computer/communications/ui_static_data(mob/user) + return list( + "callShuttleReasonMinLength" = CALL_SHUTTLE_REASON_LENGTH, + "maxStatusLineLength" = MAX_STATUS_LINE_LENGTH, + "maxMessageLength" = MAX_MESSAGE_LEN, + ) + +/// Returns whether or not the communications console can communicate with the station +/obj/machinery/computer/communications/proc/has_communication() + var/turf/current_turf = get_turf(src) + var/z_level = current_turf.z + return is_station_level(z_level) || is_centcom_level(z_level) + +/obj/machinery/computer/communications/proc/set_state(mob/user, new_state) + if (issilicon(user)) + cyborg_state = new_state + else + state = new_state + +/// Returns TRUE if the user can buy shuttles. +/// If they cannot, returns FALSE or a string detailing why. +/obj/machinery/computer/communications/proc/can_buy_shuttles(mob/user) + if (!SSmapping.config.allow_custom_shuttles) + return FALSE + if (!authenticated_as_non_silicon_captain(user)) + return FALSE + if (SSshuttle.emergency.mode != SHUTTLE_RECALL && SSshuttle.emergency.mode != SHUTTLE_IDLE) + return "The shuttle is already in transit." + if (SSshuttle.shuttle_purchased == SHUTTLEPURCHASE_PURCHASED) + return "A replacement shuttle has already been purchased." + if (SSshuttle.shuttle_purchased == SHUTTLEPURCHASE_FORCED) + return "Due to unforseen circumstances, shuttle purchasing is no longer available." return TRUE -/obj/machinery/computer/communications/ui_interact(mob/user) - . = ..() - if (z > 6) - to_chat(user, "Unable to establish a connection: \black You're too far away from the station!") +/obj/machinery/computer/communications/proc/can_send_messages_to_other_sectors(mob/user) + if (!authenticated_as_non_silicon_captain(user)) return - var/dat = "" - if(SSshuttle.emergency.mode == SHUTTLE_CALL) - var/timeleft = SSshuttle.emergency.timeLeft() - dat += "Emergency shuttle\n
\nETA: [timeleft / 60 % 60]:[add_leading(num2text(timeleft % 60), 2, "0")]" + return length(CONFIG_GET(keyed_list/cross_server)) > 0 - - var/datum/browser/popup = new(user, "communications", "Communications Console", 400, 500) - - if(issilicon(user)) - var/dat2 = interact_ai(user) // give the AI a different interact proc to limit its access - if(dat2) - dat += dat2 - popup.set_content(dat) - popup.open() - return - - switch(state) - if(STATE_DEFAULT) - if (authenticated) - if(SSshuttle.emergencyCallAmount) - if(SSshuttle.emergencyLastCallLoc) - dat += "Most recent shuttle call/recall traced to: [format_text(SSshuttle.emergencyLastCallLoc.name)]
" - else - dat += "Unable to trace most recent shuttle call/recall signal.
" - dat += "Logged in as: [auth_id]" - dat += "
" - dat += "
\[ Log Out \]
" - dat += "
General Functions" - dat += "
\[ Message List \]" - switch(SSshuttle.emergency.mode) - if(SHUTTLE_IDLE, SHUTTLE_RECALL) - dat += "
\[ Call Emergency Shuttle \]" - else - dat += "
\[ Cancel Shuttle Call \]" - - dat += "
\[ Set Status Display \]" - if (authenticated==2) - dat += "

Captain Functions" - dat += "
\[ Make a Captain's Announcement \]" - var/list/cross_servers = CONFIG_GET(keyed_list/cross_server) - var/our_id = CONFIG_GET(string/cross_comms_name) - if(cross_servers.len) - for(var/server in cross_servers) - if(server == our_id) - continue - dat += "
\[ Send a message to station in [server] sector. \]" - if(cross_servers.len > 2) - dat += "
\[ Send a message to all allied stations \]" - if(SSmapping.config.allow_custom_shuttles) - dat += "
\[ Purchase Shuttle \]" - dat += "
\[ Change Alert Level \]" - dat += "
\[ Emergency Maintenance Access \]" - dat += "
\[ Request Nuclear Authentication Codes \]" - if(!(obj_flags & EMAGGED)) - dat += "
\[ Send Message to CentCom \]" - else - dat += "
\[ Send Message to \[UNKNOWN\] \]" - dat += "
\[ Restore Backup Routing Data \]" - else - dat += "
\[ Log In \]" - if(STATE_CALLSHUTTLE) - dat += get_call_shuttle_form() - playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE) - if(STATE_CANCELSHUTTLE) - dat += get_cancel_shuttle_form() - playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE) - if(STATE_MESSAGELIST) - dat += "Messages:" - for(var/i in 1 to messages.len) - var/datum/comm_message/M = messages[i] - dat += "
[M.title]" - playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) - if(STATE_VIEWMESSAGE) - if (currmsg) - dat += "[currmsg.title]

[currmsg.content]" - if(!currmsg.answered && currmsg.possible_answers.len) - for(var/i in 1 to currmsg.possible_answers.len) - var/answer = currmsg.possible_answers[i] - dat += "
\[ Answer : [answer] \]" - else if(currmsg.answered) - var/answered = currmsg.possible_answers[currmsg.answered] - dat += "
Archived Answer : [answered]" - dat += "

\[ Delete \]" - else - aistate = STATE_MESSAGELIST - attack_hand(user) - return - if(STATE_DELMESSAGE) - if (currmsg) - dat += "Are you sure you want to delete this message? \[ OK | Cancel \]" - else - state = STATE_MESSAGELIST - attack_hand(user) - return - if(STATE_STATUSDISPLAY) - dat += "Set Status Displays
" - dat += "\[ Clear \]
" - dat += "\[ Shuttle ETA \]
" - dat += "\[ Message \]" - dat += "
" - dat += "\[ Alert: None |" - dat += " Red Alert |" - dat += " Lockdown |" - dat += " Biohazard \]

" - playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, FALSE) - if(STATE_ALERT_LEVEL) - dat += "Current alert level: [NUM2SECLEVEL(GLOB.security_level)]
" - if(GLOB.security_level == SEC_LEVEL_DELTA) - dat += "The self-destruct mechanism is active. Find a way to deactivate the mechanism to lower the alert level or evacuate." - else - dat += "Amber
" - dat += "Blue
" - dat += "Green" - if(STATE_CONFIRM_LEVEL) - dat += "Current alert level: [NUM2SECLEVEL(GLOB.security_level)]
" - dat += "Confirm the change to: [NUM2SECLEVEL(tmp_alertlevel)]
" - dat += "Swipe ID to confirm change.
" - if(STATE_TOGGLE_EMERGENCY) - playsound(src, 'sound/machines/terminal_prompt.ogg', 50, FALSE) - if(GLOB.emergency_access == 1) - dat += "Emergency Maintenance Access is currently ENABLED" - dat += "
Restore maintenance access restrictions?
\[ OK | Cancel \]" - else - dat += "Emergency Maintenance Access is currently DISABLED" - dat += "
Lift access restrictions on maintenance and external airlocks?
\[ OK | Cancel \]" - - if(STATE_PURCHASE) - var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR) - dat += "Budget: [D.account_balance] Credits.
" - dat += "
" - dat += "Caution: Purchasing dangerous shuttles may lead to mutiny and/or death.
" - dat += "
" - for(var/shuttle_id in SSmapping.shuttle_templates) - var/datum/map_template/shuttle/S = SSmapping.shuttle_templates[shuttle_id] - if(S.can_be_bought && S.credit_cost < INFINITY) - dat += "[S.name] | [S.credit_cost] Credits
" - dat += "[S.description]
" - if(S.prerequisites) - dat += "Prerequisites: [S.prerequisites]
" - dat += "(Purchase)

" - - dat += "

\[ [(state != STATE_DEFAULT) ? "Main Menu | " : ""]Close \]" - - popup.set_content(dat) - popup.open() - -/obj/machinery/computer/communications/proc/get_javascript_header(form_id) - var/dat = {""} - return dat - -/obj/machinery/computer/communications/proc/get_call_shuttle_form(ai_interface = 0) - var/form_id = "callshuttle" - var/dat = get_javascript_header(form_id) - dat += "
" - dat += "" - dat += "" - dat += "Nature of emergency:
" - dat += "
Are you sure you want to call the shuttle? \[ Call \]" - return dat - -/obj/machinery/computer/communications/proc/get_cancel_shuttle_form() - var/form_id = "cancelshuttle" - var/dat = get_javascript_header(form_id) - dat += "" - dat += "" - dat += "" - - dat += "
Are you sure you want to cancel the shuttle? \[ Cancel \]" - return dat - -/obj/machinery/computer/communications/proc/interact_ai(mob/living/silicon/ai/user) - var/dat = "" - switch(aistate) - if(STATE_DEFAULT) - if(SSshuttle.emergencyCallAmount) - if(SSshuttle.emergencyLastCallLoc) - dat += "Latest emergency signal trace attempt successful.
Last signal origin: [format_text(SSshuttle.emergencyLastCallLoc.name)].
" - else - dat += "Latest emergency signal trace attempt failed.
" - if(authenticated) - dat += "Current login: [auth_id]" - else - dat += "Current login: None" - dat += "

General Functions" - dat += "
\[ Message List \]" - if(SSshuttle.emergency.mode == SHUTTLE_IDLE) - dat += "
\[ Call Emergency Shuttle \]" - dat += "
\[ Set Status Display \]" - dat += "

Special Functions" - dat += "
\[ Make an Announcement \]" - dat += "
\[ Change Alert Level \]" - dat += "
\[ Emergency Maintenance Access \]" - if(STATE_CALLSHUTTLE) - dat += get_call_shuttle_form(1) - if(STATE_MESSAGELIST) - dat += "Messages:" - for(var/i in 1 to messages.len) - var/datum/comm_message/M = messages[i] - dat += "
[M.title]" - if(STATE_VIEWMESSAGE) - if (aicurrmsg) - dat += "[aicurrmsg.title]

[aicurrmsg.content]" - if(!aicurrmsg.answered && aicurrmsg.possible_answers.len) - for(var/i in 1 to aicurrmsg.possible_answers.len) - var/answer = aicurrmsg.possible_answers[i] - dat += "
\[ Answer : [answer] \]" - else if(aicurrmsg.answered) - var/answered = aicurrmsg.possible_answers[aicurrmsg.answered] - dat += "
Archived Answer : [answered]" - dat += "

\[ Delete \]" - else - aistate = STATE_MESSAGELIST - attack_hand(user) - return null - if(STATE_DELMESSAGE) - if(aicurrmsg) - dat += "Are you sure you want to delete this message? \[ OK | Cancel \]" - else - aistate = STATE_MESSAGELIST - attack_hand(user) - return - - if(STATE_STATUSDISPLAY) - dat += "Set Status Displays
" - dat += "\[ Clear \]
" - dat += "\[ Shuttle ETA \]
" - dat += "\[ Message \]" - dat += "
" - dat += "\[ Alert: None |" - dat += " Red Alert |" - dat += " Lockdown |" - dat += " Biohazard \]

" - - if(STATE_ALERT_LEVEL) - dat += "Current alert level: [NUM2SECLEVEL(GLOB.security_level)]
" - if(GLOB.security_level == SEC_LEVEL_DELTA) - dat += "The self-destruct mechanism is active. Find a way to deactivate the mechanism to lower the alert level or evacuate." - else - dat += "Amber
" - dat += "Blue
" - dat += "Green" - - if(STATE_TOGGLE_EMERGENCY) - if(GLOB.emergency_access == 1) - dat += "Emergency Maintenance Access is currently ENABLED" - dat += "
Restore maintenance access restrictions?
\[ OK | Cancel \]" - else - dat += "Emergency Maintenance Access is currently DISABLED" - dat += "
Lift access restrictions on maintenance and external airlocks?
\[ OK | Cancel \]" - - dat += "

\[ [(aistate != STATE_DEFAULT) ? "Main Menu | " : ""]Close \]" - return dat - -/obj/machinery/computer/communications/proc/make_announcement(mob/living/user, is_silicon) - if(!SScommunications.can_announce(user, is_silicon)) +/obj/machinery/computer/communications/proc/make_announcement(mob/living/user) + var/is_ai = issilicon(user) + if(!SScommunications.can_announce(user, is_ai)) to_chat(user, "Intercomms recharging. Please stand by.") return var/input = stripped_input(user, "Please choose a message to announce to the station crew.", "What?") @@ -741,8 +489,8 @@ to_chat(user, "You find yourself unable to speak.") else input = user.treat_message(input) //Adds slurs and so on. Someone should make this use languages too. - SScommunications.make_announcement(user, is_silicon, input) - deadchat_broadcast("[user.real_name] made an priority announcement from [get_area_name(usr, TRUE)].", user) + SScommunications.make_announcement(user, is_ai, input) + deadchat_broadcast(" made a priority announcement from [get_area_name(usr, TRUE)].", "[user.real_name]", user) /obj/machinery/computer/communications/proc/post_status(command, data1, data2) @@ -761,18 +509,18 @@ frequency.post_signal(src, status_signal) - /obj/machinery/computer/communications/Destroy() GLOB.shuttle_caller_list -= src SSshuttle.autoEvac() return ..() -/obj/machinery/computer/communications/proc/overrideCooldown() - var/obj/item/circuitboard/computer/communications/CM = circuit - CM.lastTimeUsed = 0 +/// Override the cooldown for special actions +/// Used in places such as CentCom messaging back so that the crew can answer right away +/obj/machinery/computer/communications/proc/override_cooldown() + COOLDOWN_RESET(src, important_action_cooldown) /obj/machinery/computer/communications/proc/add_message(datum/comm_message/new_message) - messages += new_message + LAZYADD(messages, new_message) /datum/comm_message var/title @@ -790,14 +538,9 @@ if(new_possible_answers) possible_answers = new_possible_answers -#undef STATE_DEFAULT -#undef STATE_CALLSHUTTLE -#undef STATE_CANCELSHUTTLE -#undef STATE_MESSAGELIST -#undef STATE_VIEWMESSAGE -#undef STATE_DELMESSAGE -#undef STATE_STATUSDISPLAY -#undef STATE_ALERT_LEVEL -#undef STATE_CONFIRM_LEVEL -#undef STATE_TOGGLE_EMERGENCY -#undef STATE_PURCHASE +#undef IMPORTANT_ACTION_COOLDOWN +#undef MAX_STATUS_LINE_LENGTH +#undef STATE_BUYING_SHUTTLE +#undef STATE_CHANGING_STATUS +#undef STATE_MAIN +#undef STATE_MESSAGES diff --git a/code/game/objects/items/circuitboards/circuitboard.dm b/code/game/objects/items/circuitboards/circuitboard.dm index 6dc5db970d..6dcc344037 100644 --- a/code/game/objects/items/circuitboards/circuitboard.dm +++ b/code/game/objects/items/circuitboards/circuitboard.dm @@ -14,8 +14,41 @@ w_class = WEIGHT_CLASS_SMALL grind_results = list(/datum/reagent/silicon = 20) var/build_path = null + ///determines if the circuit board originated from a vendor off station or not. + var/onstation = TRUE /obj/item/circuitboard/proc/apply_default_parts(obj/machinery/M) + if(LAZYLEN(M.component_parts)) + // This really shouldn't happen. If it somehow does, print out a stack trace and gracefully handle it. + stack_trace("apply_defauly_parts called on machine that already had component_parts: [M]") + + // Move to nullspace so you don't trigger handle_atom_del logic and remove existing parts. + for(var/obj/item/part in M.component_parts) + part.moveToNullspace(loc) + qdel(part) + + // List of components always contains the circuit board used to build it. + M.component_parts = list(src) + forceMove(M) + + if(M.circuit != src) + // This really shouldn't happen. If it somehow does, print out a stack trace and gracefully handle it. + stack_trace("apply_default_parts called from a circuit board that does not belong to machine: [M]") + + // Move to nullspace so you don't trigger handle_atom_del logic, remove old circuit, add new circuit. + M.circuit.moveToNullspace() + qdel(M.circuit) + M.circuit = src + + return + +/** + * Used to allow the circuitboard to configure a machine in some way, shape or form. + * + * Arguments: + * * machine - The machine to attempt to configure. + */ +/obj/item/circuitboard/proc/configure_machine(obj/machinery/machine) return // Circuitboard/machine @@ -36,8 +69,7 @@ micro-manipulator, console screen, beaker, Microlaser, matter bin, power cells. if(!req_components) return - M.component_parts = list(src) // List of components always contains a board - moveToNullspace() + . = ..() for(var/comp_path in req_components) var/comp_amt = req_components[comp_path] @@ -48,10 +80,10 @@ micro-manipulator, console screen, beaker, Microlaser, matter bin, power cells. comp_path = def_components[comp_path] if(ispath(comp_path, /obj/item/stack)) - M.component_parts += new comp_path(null, comp_amt) + M.component_parts += new comp_path(M, comp_amt) else for(var/i in 1 to comp_amt) - M.component_parts += new comp_path(null) + M.component_parts += new comp_path(M) M.RefreshParts() diff --git a/code/game/objects/items/circuitboards/computer_circuitboards.dm b/code/game/objects/items/circuitboards/computer_circuitboards.dm index 9a1c770417..bbb2289eb5 100644 --- a/code/game/objects/items/circuitboards/computer_circuitboards.dm +++ b/code/game/objects/items/circuitboards/computer_circuitboards.dm @@ -1,58 +1,22 @@ -/obj/item/circuitboard/computer/turbine_computer - name = "Turbine Computer (Computer Board)" - build_path = /obj/machinery/computer/turbine_computer - -/obj/item/circuitboard/computer/launchpad_console - name = "Launchpad Control Console (Computer Board)" - build_path = /obj/machinery/computer/launchpad - -/obj/item/circuitboard/computer/message_monitor - name = "Message Monitor (Computer Board)" - build_path = /obj/machinery/computer/message_monitor - -/obj/item/circuitboard/computer/security - name = "Security Cameras (Computer Board)" - build_path = /obj/machinery/computer/security - -/obj/item/circuitboard/computer/security/shuttle - name = "Shuttlelinking Security Cameras (Computer Board)" - build_path = /obj/machinery/computer/security/shuttle - -/obj/item/circuitboard/computer/xenobiology - name = "circuit board (Xenobiology Console)" - build_path = /obj/machinery/computer/camera_advanced/xenobio - -/obj/item/circuitboard/computer/base_construction - name = "circuit board (Aux Mining Base Construction Console)" - build_path = /obj/machinery/computer/camera_advanced/base_construction +//Command /obj/item/circuitboard/computer/aiupload name = "AI Upload (Computer Board)" + icon_state = "command" build_path = /obj/machinery/computer/upload/ai /obj/item/circuitboard/computer/borgupload name = "Cyborg Upload (Computer Board)" + icon_state = "command" build_path = /obj/machinery/computer/upload/borg -/obj/item/circuitboard/computer/med_data - name = "Medical Records Console (Computer Board)" - build_path = /obj/machinery/computer/med_data - -/obj/item/circuitboard/computer/pandemic - name = "PanD.E.M.I.C. 2200 (Computer Board)" - build_path = /obj/machinery/computer/pandemic - -/obj/item/circuitboard/computer/scan_consolenew - name = "DNA Machine (Computer Board)" - build_path = /obj/machinery/computer/scan_consolenew - -/obj/item/circuitboard/computer/communications - name = "Communications (Computer Board)" - build_path = /obj/machinery/computer/communications - var/lastTimeUsed = 0 +/obj/item/circuitboard/computer/bsa_control + name = "Bluespace Artillery Controls (Computer Board)" + build_path = /obj/machinery/computer/bsa_control /obj/item/circuitboard/computer/card name = "ID Console (Computer Board)" + icon_state = "command" build_path = /obj/machinery/computer/card /obj/item/circuitboard/computer/card/centcom @@ -66,279 +30,251 @@ var/list/dept_list = list("Civilian","Security","Medical","Science","Engineering","Cargo") /obj/item/circuitboard/computer/card/minor/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/screwdriver)) + if(I.tool_behaviour == TOOL_SCREWDRIVER) target_dept = (target_dept == dept_list.len) ? 1 : (target_dept + 1) to_chat(user, "You set the board to \"[dept_list[target_dept]]\".") else return ..() /obj/item/circuitboard/computer/card/minor/examine(user) - . = ..() - . += "Currently set to \"[dept_list[target_dept]]\"." + ..() + to_chat(user, "Currently set to \"[dept_list[target_dept]]\".") + //obj/item/circuitboard/computer/shield // name = "Shield Control (Computer Board)" +// icon_state = "command" // build_path = /obj/machinery/computer/stationshield -/obj/item/circuitboard/computer/teleporter - name = "Teleporter (Computer Board)" - build_path = /obj/machinery/computer/teleporter -/obj/item/circuitboard/computer/secure_data - name = "Security Records Console (Computer Board)" - build_path = /obj/machinery/computer/secure_data +//Engineering -/obj/item/circuitboard/computer/stationalert - name = "Station Alerts (Computer Board)" - build_path = /obj/machinery/computer/station_alert +/obj/item/circuitboard/computer/apc_control + name = "\improper Power Flow Control Console (Computer Board)" + icon_state = "engineering" + build_path = /obj/machinery/computer/apc_control + +/obj/item/circuitboard/computer/atmos_alert + name = "Atmospheric Alert (Computer Board)" + icon_state = "engineering" + build_path = /obj/machinery/computer/atmos_alert /obj/item/circuitboard/computer/atmos_control name = "Atmospheric Monitor (Computer Board)" + icon_state = "engineering" build_path = /obj/machinery/computer/atmos_control +/obj/item/circuitboard/computer/atmos_control/incinerator + name = "Incinerator Air Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/incinerator + +/obj/item/circuitboard/computer/atmos_control/toxinsmix + name = "Toxins Mixing Air Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/toxinsmix + /obj/item/circuitboard/computer/atmos_control/tank name = "Tank Control (Computer Board)" build_path = /obj/machinery/computer/atmos_control/tank -/obj/item/circuitboard/computer/atmos_alert - name = "Atmospheric Alert (Computer Board)" - build_path = /obj/machinery/computer/atmos_alert +/obj/item/circuitboard/computer/atmos_control/tank/oxygen_tank + name = "Oxygen Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/oxygen_tank -/obj/item/circuitboard/computer/pod - name = "Massdriver control (Computer Board)" - build_path = /obj/machinery/computer/pod +/obj/item/circuitboard/computer/atmos_control/tank/toxin_tank + name = "Plasma Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/toxin_tank -/obj/item/circuitboard/computer/robotics - name = "Robotics Control (Computer Board)" - build_path = /obj/machinery/computer/robotics +/obj/item/circuitboard/computer/atmos_control/tank/air_tank + name = "Mixed Air Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/air_tank -/obj/item/circuitboard/computer/cloning - name = "Cloning (Computer Board)" - build_path = /obj/machinery/computer/cloning - var/list/records = list() +/obj/item/circuitboard/computer/atmos_control/tank/mix_tank + name = "Gas Mix Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/mix_tank -/obj/item/circuitboard/computer/cloning/prototype - name = "Prototype Cloning (Computer Board)" - build_path = /obj/machinery/computer/cloning/prototype +/obj/item/circuitboard/computer/atmos_control/tank/nitrous_tank + name = "Nitrous Oxide Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/nitrous_tank -/obj/item/circuitboard/computer/arcade/battle - name = "Arcade Battle (Computer Board)" - build_path = /obj/machinery/computer/arcade/battle +/obj/item/circuitboard/computer/atmos_control/tank/nitrogen_tank + name = "Nitrogen Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/nitrogen_tank -/obj/item/circuitboard/computer/arcade/orion_trail - name = "Orion Trail (Computer Board)" - build_path = /obj/machinery/computer/arcade/orion_trail +/obj/item/circuitboard/computer/atmos_control/tank/carbon_tank + name = "Carbon Dioxide Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/carbon_tank -/obj/item/circuitboard/computer/arcade/minesweeper - name = "Minesweeper (Computer Board)" - build_path = /obj/machinery/computer/arcade/minesweeper +/obj/item/circuitboard/computer/atmos_control/tank/bz_tank + name = "BZ Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/bz_tank -/obj/item/circuitboard/computer/arcade/amputation - name = "Mediborg's Amputation Adventure (Computer Board)" - build_path = /obj/machinery/computer/arcade/amputation +/obj/item/circuitboard/computer/atmos_control/tank/freon_tank + name = "Freon Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/freon_tank -/obj/item/circuitboard/computer/turbine_control - name = "Turbine control (Computer Board)" - build_path = /obj/machinery/computer/turbine_computer +/obj/item/circuitboard/computer/atmos_control/tank/halon_tank + name = "Halon Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/halon_tank -/obj/item/circuitboard/computer/solar_control - name = "Solar Control (Computer Board)" //name fixed 250810 - build_path = /obj/machinery/power/solar_control +/obj/item/circuitboard/computer/atmos_control/tank/healium_tank + name = "Healium Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/healium_tank -/obj/item/circuitboard/computer/powermonitor - name = "Power Monitor (Computer Board)" //name fixed 250810 - build_path = /obj/machinery/computer/monitor +/obj/item/circuitboard/computer/atmos_control/tank/hydrogen_tank + name = "Hydrogen Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/hydrogen_tank -/obj/item/circuitboard/computer/powermonitor/secret - name = "Outdated Power Monitor (Computer Board)" //Variant used on ruins to prevent them from showing up on PDA's. - build_path = /obj/machinery/computer/monitor/secret +/obj/item/circuitboard/computer/atmos_control/tank/hypernoblium_tank + name = "Hypernoblium Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/hypernoblium_tank -/obj/item/circuitboard/computer/olddoor - name = "DoorMex (Computer Board)" - build_path = /obj/machinery/computer/pod/old +/obj/item/circuitboard/computer/atmos_control/tank/miasma_tank + name = "Miasma Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/miasma_tank -/obj/item/circuitboard/computer/syndicatedoor - name = "ProComp Executive (Computer Board)" - build_path = /obj/machinery/computer/pod/old/syndicate +/obj/item/circuitboard/computer/atmos_control/tank/nitryl_tank + name = "Nitryl Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/nitryl_tank -/obj/item/circuitboard/computer/swfdoor - name = "Magix (Computer Board)" - build_path = /obj/machinery/computer/pod/old/swf +/obj/item/circuitboard/computer/atmos_control/tank/pluoxium_tank + name = "Pluoxium Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/pluoxium_tank -/obj/item/circuitboard/computer/prisoner - name = "Prisoner Management Console (Computer Board)" - build_path = /obj/machinery/computer/prisoner/management +/obj/item/circuitboard/computer/atmos_control/tank/proto_nitrate_tank + name = "Proto-Nitrate Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/proto_nitrate_tank -/obj/item/circuitboard/computer/gulag_teleporter_console - name = "Labor Camp teleporter console (Computer Board)" - build_path = /obj/machinery/computer/prisoner/gulag_teleporter_computer +/obj/item/circuitboard/computer/atmos_control/tank/stimulum_tank + name = "Stimulum Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/stimulum_tank -/obj/item/circuitboard/computer/rdconsole/production - name = "R&D Console Production Only (Computer Board)" - build_path = /obj/machinery/computer/rdconsole/production +/obj/item/circuitboard/computer/atmos_control/tank/tritium_tank + name = "Tritium Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/tritium_tank -/obj/item/circuitboard/computer/rdconsole - name = "R&D Console (Computer Board)" - build_path = /obj/machinery/computer/rdconsole/core +/obj/item/circuitboard/computer/atmos_control/tank/water_vapor + name = "Water Vapor Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/water_vapor -/obj/item/circuitboard/computer/rdconsole/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/screwdriver)) - if(build_path == /obj/machinery/computer/rdconsole/core) - name = "R&D Console - Robotics (Computer Board)" - build_path = /obj/machinery/computer/rdconsole/robotics - to_chat(user, "Access protocols successfully updated.") - else - name = "R&D Console (Computer Board)" - build_path = /obj/machinery/computer/rdconsole/core - to_chat(user, "Defaulting access protocols.") - else - return ..() +/obj/item/circuitboard/computer/atmos_control/tank/zauker_tank + name = "Zauker Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/zauker_tank -/obj/item/circuitboard/computer/mecha_control - name = "Exosuit Control Console (Computer Board)" - build_path = /obj/machinery/computer/mecha +/obj/item/circuitboard/computer/atmos_control/tank/helium_tank + name = "Helium Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/helium_tank -/obj/item/circuitboard/computer/rdservercontrol - name = "R&D Server Control (Computer Board)" - build_path = /obj/machinery/computer/rdservercontrol +/obj/item/circuitboard/computer/atmos_control/tank/antinoblium_tank + name = "Antinoblium Supply Control (Computer Board)" + build_path = /obj/machinery/computer/atmos_control/tank/antinoblium_tank -/obj/item/circuitboard/computer/crew - name = "Crew Monitoring Console (Computer Board)" - build_path = /obj/machinery/computer/crew +/obj/item/circuitboard/computer/auxiliary_base + name = "Auxiliary Base Management Console (Computer Board)" + icon_state = "engineering" + build_path = /obj/machinery/computer/auxiliary_base -/obj/item/circuitboard/computer/mech_bay_power_console - name = "Mech Bay Power Control Console (Computer Board)" - build_path = /obj/machinery/computer/mech_bay_power_console +/obj/item/circuitboard/computer/base_construction + name = "circuit board (Generic Base Construction Console)" + icon_state = "engineering" + build_path = /obj/machinery/computer/camera_advanced/base_construction -/obj/item/circuitboard/computer/cargo - name = "Supply Console (Computer Board)" - build_path = /obj/machinery/computer/cargo - var/contraband = FALSE +/obj/item/circuitboard/computer/base_construction/aux + name = "circuit board (Aux Mining Base Construction Console)" + icon_state = "engineering" + build_path = /obj/machinery/computer/camera_advanced/base_construction/aux -/obj/item/circuitboard/computer/cargo/multitool_act(mob/living/user) - if(!(obj_flags & EMAGGED)) - contraband = !contraband - to_chat(user, "Receiver spectrum set to [contraband ? "Broad" : "Standard"].") - else - to_chat(user, "The spectrum chip is unresponsive.") - -/obj/item/circuitboard/computer/cargo/emag_act(mob/living/user) - . = ..() - if(obj_flags & EMAGGED) - return - contraband = TRUE - obj_flags |= EMAGGED - to_chat(user, "You adjust [src]'s routing and receiver spectrum, unlocking special supplies and contraband.") - return TRUE - -/obj/item/circuitboard/computer/cargo/express - name = "Express Supply Console (Computer Board)" - build_path = /obj/machinery/computer/cargo/express - -/obj/item/circuitboard/computer/cargo/express/multitool_act(mob/living/user) - if (!(obj_flags & EMAGGED)) - to_chat(user, "Routing protocols are already set to: \"factory defaults\".") - else - to_chat(user, "You reset the routing protocols to: \"factory defaults\".") - obj_flags &= ~EMAGGED - -/obj/item/circuitboard/computer/cargo/express/emag_act(mob/living/user) - . = SEND_SIGNAL(src, COMSIG_ATOM_EMAG_ACT) - if(obj_flags & EMAGGED) - return - to_chat(user, "You change the routing protocols, allowing the Drop Pod to land anywhere on the station.") - obj_flags |= EMAGGED - return TRUE - -/obj/item/circuitboard/computer/cargo/request - name = "Supply Request Console (Computer Board)" - build_path = /obj/machinery/computer/cargo/request - -/obj/item/circuitboard/computer/bounty - name = "Nanotrasen Bounty Console (Computer Board)" - build_path = /obj/machinery/computer/bounty - -/obj/item/circuitboard/computer/operating - name = "Operating Computer (Computer Board)" - build_path = /obj/machinery/computer/operating - -/obj/item/circuitboard/computer/mining - name = "Outpost Status Display (Computer Board)" - build_path = /obj/machinery/computer/security/mining - -/obj/item/circuitboard/computer/research - name = "Research Monitor (Computer Board)" - build_path = /obj/machinery/computer/security/research +/obj/item/circuitboard/computer/base_construction/centcom + name = "circuit board (Centcom Base Construction Console)" + icon_state = "engineering" + build_path = /obj/machinery/computer/camera_advanced/base_construction/centcom /obj/item/circuitboard/computer/comm_monitor name = "Telecommunications Monitor (Computer Board)" + icon_state = "engineering" build_path = /obj/machinery/computer/telecomms/monitor /obj/item/circuitboard/computer/comm_server name = "Telecommunications Server Monitor (Computer Board)" + icon_state = "engineering" build_path = /obj/machinery/computer/telecomms/server -/obj/item/circuitboard/computer/labor_shuttle - name = "Labor Shuttle (Computer Board)" - build_path = /obj/machinery/computer/shuttle/labor +/obj/item/circuitboard/computer/communications + name = "Communications (Computer Board)" + icon_state = "engineering" + build_path = /obj/machinery/computer/communications -/obj/item/circuitboard/computer/labor_shuttle/one_way - name = "Prisoner Shuttle Console (Computer Board)" - build_path = /obj/machinery/computer/shuttle/labor/one_way +/obj/item/circuitboard/computer/message_monitor + name = "Message Monitor (Computer Board)" + icon_state = "engineering" + build_path = /obj/machinery/computer/message_monitor -/obj/item/circuitboard/computer/ferry - name = "Transport Ferry (Computer Board)" - build_path = /obj/machinery/computer/shuttle/ferry +/obj/item/circuitboard/computer/powermonitor + name = "Power Monitor (Computer Board)" //name fixed 250810 + icon_state = "engineering" + build_path = /obj/machinery/computer/monitor -/obj/item/circuitboard/computer/ferry/request - name = "Transport Ferry Console (Computer Board)" - build_path = /obj/machinery/computer/shuttle/ferry/request +/obj/item/circuitboard/computer/powermonitor/secret + name = "Outdated Power Monitor (Computer Board)" //Variant used on ruins to prevent them from showing up on PDA's. + icon_state = "engineering" + build_path = /obj/machinery/computer/monitor/secret -/obj/item/circuitboard/computer/mining_shuttle - name = "Mining Shuttle (Computer Board)" - build_path = /obj/machinery/computer/shuttle/mining +/obj/item/circuitboard/computer/sat_control + name = "Satellite Network Control (Computer Board)" + icon_state = "engineering" + build_path = /obj/machinery/computer/sat_control -/obj/item/circuitboard/computer/mining_shuttle/common - name = "Lavaland Shuttle (Computer Board)" - build_path = /obj/machinery/computer/shuttle/mining/common +/obj/item/circuitboard/computer/solar_control + name = "Solar Control (Computer Board)" //name fixed 250810 + icon_state = "engineering" + build_path = /obj/machinery/power/solar_control -/obj/item/circuitboard/computer/snow_taxi - name = "Snow Taxi (Computer Board)" - build_path = /obj/machinery/computer/shuttle/snow_taxi +/obj/item/circuitboard/computer/stationalert + name = "Station Alerts (Computer Board)" + icon_state = "engineering" + build_path = /obj/machinery/computer/station_alert -/obj/item/circuitboard/computer/white_ship - name = "White Ship (Computer Board)" - build_path = /obj/machinery/computer/shuttle/white_ship +/obj/item/circuitboard/computer/turbine_computer + name = "Turbine Computer (Computer Board)" + icon_state = "engineering" + build_path = /obj/machinery/computer/turbine_computer -/obj/item/circuitboard/computer/white_ship/pod - name = "Salvage Pod (Computer Board)" - build_path = /obj/machinery/computer/shuttle/white_ship/pod +/obj/item/circuitboard/computer/turbine_control + name = "Turbine control (Computer Board)" + icon_state = "engineering" + build_path = /obj/machinery/computer/turbine_computer -/obj/item/circuitboard/computer/white_ship/pod/recall - name = "Salvage Pod Recall (Computer Board)" - build_path = /obj/machinery/computer/shuttle/white_ship/pod/recall +//Generic -/obj/item/circuitboard/computer/auxillary_base - name = "Auxillary Base Management Console (Computer Board)" - build_path = /obj/machinery/computer/auxillary_base +/obj/item/circuitboard/computer/arcade/amputation + name = "Mediborg's Amputation Adventure (Computer Board)" + icon_state = "generic" + build_path = /obj/machinery/computer/arcade/amputation + +/obj/item/circuitboard/computer/arcade/battle + name = "Arcade Battle (Computer Board)" + icon_state = "generic" + build_path = /obj/machinery/computer/arcade/battle + +/obj/item/circuitboard/computer/arcade/orion_trail + name = "Orion Trail (Computer Board)" + + build_path = /obj/machinery/computer/arcade/orion_trail + +/obj/item/circuitboard/computer/arcade/minesweeper + name = "Minesweeper (Computer Board)" + icon_state = "generic" + build_path = /obj/machinery/computer/arcade/minesweeper /obj/item/circuitboard/computer/holodeck// Not going to let people get this, but it's just here for future name = "Holodeck Control (Computer Board)" + icon_state = "generic" build_path = /obj/machinery/computer/holodeck -/obj/item/circuitboard/computer/aifixer - name = "AI Integrity Restorer (Computer Board)" - build_path = /obj/machinery/computer/aifixer - -/obj/item/circuitboard/computer/slot_machine - name = "Slot Machine (Computer Board)" - build_path = /obj/machinery/computer/slot_machine - /obj/item/circuitboard/computer/libraryconsole name = "Library Visitor Console (Computer Board)" build_path = /obj/machinery/computer/libraryconsole /obj/item/circuitboard/computer/libraryconsole/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/screwdriver)) + if(I.tool_behaviour == TOOL_SCREWDRIVER) if(build_path == /obj/machinery/computer/libraryconsole/bookmanagement) name = "Library Visitor Console (Computer Board)" build_path = /obj/machinery/computer/libraryconsole @@ -350,16 +286,34 @@ else return ..() -/obj/item/circuitboard/computer/apc_control - name = "\improper Power Flow Control Console (Computer Board)" - build_path = /obj/machinery/computer/apc_control - /obj/item/circuitboard/computer/monastery_shuttle name = "Monastery Shuttle (Computer Board)" + icon_state = "generic" build_path = /obj/machinery/computer/shuttle/monastery_shuttle +/obj/item/circuitboard/computer/olddoor + name = "DoorMex (Computer Board)" + icon_state = "generic" + build_path = /obj/machinery/computer/pod/old + +/obj/item/circuitboard/computer/pod + name = "Massdriver control (Computer Board)" + icon_state = "generic" + build_path = /obj/machinery/computer/pod + +/obj/item/circuitboard/computer/slot_machine + name = "Slot Machine (Computer Board)" + icon_state = "generic" + build_path = /obj/machinery/computer/slot_machine + +/obj/item/circuitboard/computer/swfdoor + name = "Magix (Computer Board)" + icon_state = "generic" + build_path = /obj/machinery/computer/pod/old/swf + /obj/item/circuitboard/computer/syndicate_shuttle name = "Syndicate Shuttle (Computer Board)" + icon_state = "generic" build_path = /obj/machinery/computer/shuttle/syndicate var/challenge = FALSE var/moved = FALSE @@ -372,25 +326,265 @@ GLOB.syndicate_shuttle_boards -= src return ..() -/obj/item/circuitboard/computer/bsa_control - name = "Bluespace Artillery Controls (Computer Board)" - build_path = /obj/machinery/computer/bsa_control +/obj/item/circuitboard/computer/syndicatedoor + name = "ProComp Executive (Computer Board)" + icon_state = "generic" + build_path = /obj/machinery/computer/pod/old/syndicate -/obj/item/circuitboard/computer/sat_control - name = "Satellite Network Control (Computer Board)" - build_path = /obj/machinery/computer/sat_control +/obj/item/circuitboard/computer/white_ship + name = "White Ship (Computer Board)" + icon_state = "generic" + build_path = /obj/machinery/computer/shuttle/white_ship + +/obj/item/circuitboard/computer/white_ship/bridge + name = "White Ship Bridge (Computer Board)" + icon_state = "generic" + build_path = /obj/machinery/computer/shuttle/white_ship/bridge + +/obj/item/circuitboard/computer/white_ship/pod + name = "Salvage Pod (Computer Board)" + build_path = /obj/machinery/computer/shuttle/white_ship/pod + +/obj/item/circuitboard/computer/white_ship/pod/recall + name = "Salvage Pod Recall (Computer Board)" + build_path = /obj/machinery/computer/shuttle/white_ship/pod/recall + +/obj/item/circuitboard/computer/bountypad + name = "Bounty Pad (Computer Board)" + build_path = /obj/machinery/computer/piratepad_control/civilian + +/obj/item/circuitboard/computer/security/shuttle + name = "Shuttlelinking Security Cameras (Computer Board)" + icon_state = "generic" + build_path = /obj/machinery/computer/security/shuttle + +//Medical + +/obj/item/circuitboard/computer/crew + name = "Crew Monitoring Console (Computer Board)" + icon_state = "medical" + build_path = /obj/machinery/computer/crew + +/obj/item/circuitboard/computer/med_data + name = "Medical Records Console (Computer Board)" + icon_state = "medical" + build_path = /obj/machinery/computer/med_data + +/obj/item/circuitboard/computer/operating + name = "Operating Computer (Computer Board)" + icon_state = "medical" + build_path = /obj/machinery/computer/operating + +/obj/item/circuitboard/computer/pandemic + name = "PanD.E.M.I.C. 2200 (Computer Board)" + icon_state = "medical" + build_path = /obj/machinery/computer/pandemic + +/obj/item/circuitboard/computer/cloning + name = "Cloning (Computer Board)" + icon_state = "medical" + build_path = /obj/machinery/computer/cloning + var/list/records = list() + +/obj/item/circuitboard/computer/cloning/prototype + name = "Prototype Cloning (Computer Board)" + build_path = /obj/machinery/computer/cloning/prototype + +//Science + +/obj/item/circuitboard/computer/aifixer + name = "AI Integrity Restorer (Computer Board)" + icon_state = "science" + build_path = /obj/machinery/computer/aifixer + +/obj/item/circuitboard/computer/launchpad_console + name = "Launchpad Control Console (Computer Board)" + icon_state = "science" + build_path = /obj/machinery/computer/launchpad + +/obj/item/circuitboard/computer/mech_bay_power_console + name = "Mech Bay Power Control Console (Computer Board)" + icon_state = "science" + build_path = /obj/machinery/computer/mech_bay_power_console + +/obj/item/circuitboard/computer/mecha_control + name = "Exosuit Control Console (Computer Board)" + icon_state = "science" + build_path = /obj/machinery/computer/mecha /obj/item/circuitboard/computer/nanite_chamber_control name = "Nanite Chamber Control (Computer Board)" + icon_state = "science" build_path = /obj/machinery/computer/nanite_chamber_control /obj/item/circuitboard/computer/nanite_cloud_controller name = "Nanite Cloud Control (Computer Board)" + icon_state = "science" build_path = /obj/machinery/computer/nanite_cloud_controller -/obj/item/circuitboard/computer/shuttle/flight_control - name = "Shuttle Flight Control (Computer Board)" - build_path = /obj/machinery/computer/custom_shuttle +/obj/item/circuitboard/computer/rdconsole + name = "R&D Console (Computer Board)" + icon_state = "science" + build_path = /obj/machinery/computer/rdconsole + +/obj/item/circuitboard/computer/rdservercontrol + name = "R&D Server Control (Computer Board)" + icon_state = "science" + build_path = /obj/machinery/computer/rdservercontrol + +/obj/item/circuitboard/computer/research + name = "Research Monitor (Computer Board)" + icon_state = "science" + build_path = /obj/machinery/computer/security/research + +/obj/item/circuitboard/computer/robotics + name = "Robotics Control (Computer Board)" + icon_state = "science" + build_path = /obj/machinery/computer/robotics + +/obj/item/circuitboard/computer/teleporter + name = "Teleporter (Computer Board)" + icon_state = "science" + build_path = /obj/machinery/computer/teleporter + +/obj/item/circuitboard/computer/xenobiology + name = "Xenobiology Console (Computer Board)" + icon_state = "science" + build_path = /obj/machinery/computer/camera_advanced/xenobio + +/obj/item/circuitboard/computer/scan_consolenew + name = "DNA Console (Computer Board)" + icon_state = "science" + build_path = /obj/machinery/computer/scan_consolenew + +/obj/item/circuitboard/computer/mechpad + name = "Mecha Orbital Pad Console (Computer Board)" + icon_state = "science" + build_path = /obj/machinery/computer/mechpad + +//Security + +/obj/item/circuitboard/computer/labor_shuttle + name = "Labor Shuttle (Computer Board)" + icon_state = "security" + build_path = /obj/machinery/computer/shuttle/labor + +/obj/item/circuitboard/computer/labor_shuttle/one_way + name = "Prisoner Shuttle Console (Computer Board)" + icon_state = "security" + build_path = /obj/machinery/computer/shuttle/labor/one_way + +/obj/item/circuitboard/computer/gulag_teleporter_console + name = "Labor Camp teleporter console (Computer Board)" + icon_state = "security" + build_path = /obj/machinery/computer/prisoner/gulag_teleporter_computer + +/obj/item/circuitboard/computer/prisoner + name = "Prisoner Management Console (Computer Board)" + icon_state = "security" + build_path = /obj/machinery/computer/prisoner/management + +/obj/item/circuitboard/computer/secure_data + name = "Security Records Console (Computer Board)" + icon_state = "security" + build_path = /obj/machinery/computer/secure_data + +/obj/item/circuitboard/computer/warrant + name = "Security Warrant Viewer (Computer Board)" + icon_state = "security" + build_path = /obj/machinery/computer/warrant + +/obj/item/circuitboard/computer/security + name = "Security Cameras (Computer Board)" + icon_state = "security" + build_path = /obj/machinery/computer/security + +/obj/item/circuitboard/computer/advanced_camera + name = "Advanced Camera Console (Computer Board)" + icon_state = "security" + build_path = /obj/machinery/computer/camera_advanced/syndie + +//Service + +//Supply + +/obj/item/circuitboard/computer/cargo + name = "Supply Console (Computer Board)" + icon_state = "supply" + build_path = /obj/machinery/computer/cargo + var/contraband = FALSE + +/obj/item/circuitboard/computer/cargo/multitool_act(mob/living/user) + . = ..() + if(!(obj_flags & EMAGGED)) + contraband = !contraband + to_chat(user, "Receiver spectrum set to [contraband ? "Broad" : "Standard"].") + else + to_chat(user, "The spectrum chip is unresponsive.") + +/obj/item/circuitboard/computer/cargo/emag_act(mob/living/user) + . = ..() + if(!(obj_flags & EMAGGED)) + contraband = TRUE + obj_flags |= EMAGGED + to_chat(user, "You adjust [src]'s routing and receiver spectrum, unlocking special supplies and contraband.") + +/obj/item/circuitboard/computer/cargo/configure_machine(obj/machinery/computer/cargo/machine) + if(!istype(machine)) + CRASH("Cargo board attempted to configure incorrect machine type: [machine] ([machine?.type])") + + machine.contraband = contraband + if (obj_flags & EMAGGED) + machine.obj_flags |= EMAGGED + else + machine.obj_flags &= ~EMAGGED + +/obj/item/circuitboard/computer/cargo/express + name = "Express Supply Console (Computer Board)" + build_path = /obj/machinery/computer/cargo/express + +/obj/item/circuitboard/computer/cargo/express/emag_act(mob/living/user) + if(!(obj_flags & EMAGGED)) + contraband = TRUE + obj_flags |= EMAGGED + to_chat(user, "You change the routing protocols, allowing the Drop Pod to land anywhere on the station.") + +/obj/item/circuitboard/computer/cargo/express/multitool_act(mob/living/user) + if (!(obj_flags & EMAGGED)) + contraband = !contraband + to_chat(user, "Receiver spectrum set to [contraband ? "Broad" : "Standard"].") + else + to_chat(user, "You reset the destination-routing protocols and receiver spectrum to factory defaults.") + contraband = FALSE + obj_flags &= ~EMAGGED + +/obj/item/circuitboard/computer/cargo/request + name = "Supply Request Console (Computer Board)" + build_path = /obj/machinery/computer/cargo/request + +/obj/item/circuitboard/computer/ferry + name = "Transport Ferry (Computer Board)" + icon_state = "supply" + build_path = /obj/machinery/computer/shuttle/ferry + +/obj/item/circuitboard/computer/ferry/request + name = "Transport Ferry Console (Computer Board)" + icon_state = "supply" + build_path = /obj/machinery/computer/shuttle/ferry/request + +/obj/item/circuitboard/computer/mining + name = "Outpost Status Display (Computer Board)" + icon_state = "supply" + build_path = /obj/machinery/computer/security/mining + +/obj/item/circuitboard/computer/mining_shuttle + name = "Mining Shuttle (Computer Board)" + icon_state = "supply" + build_path = /obj/machinery/computer/shuttle/mining + +/obj/item/circuitboard/computer/mining_shuttle/common + name = "Lavaland Shuttle (Computer Board)" + build_path = /obj/machinery/computer/shuttle/mining/common /obj/item/circuitboard/computer/shuttle/docker name = "Shuttle Navigation Computer (Computer Board)" diff --git a/code/game/objects/items/circuitboards/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machine_circuitboards.dm index 89d566f714..f03a4fb9bc 100644 --- a/code/game/objects/items/circuitboards/machine_circuitboards.dm +++ b/code/game/objects/items/circuitboards/machine_circuitboards.dm @@ -1,27 +1,43 @@ -/obj/item/circuitboard/machine/sleeper - name = "Sleeper (Machine Board)" - build_path = /obj/machinery/sleeper - req_components = list( - /obj/item/stock_parts/matter_bin = 1, - /obj/item/stock_parts/manipulator = 1, - /obj/item/stack/cable_coil = 1, - /obj/item/stack/sheet/glass = 2) +//Command -/obj/item/circuitboard/machine/sleeper/syndie - name = "Syndicate Sleeper (Machine Board)" - build_path = /obj/machinery/sleeper/syndie - -/obj/item/circuitboard/machine/vr_sleeper - name = "VR Sleeper (Machine Board)" - build_path = /obj/machinery/vr_sleeper +/obj/item/circuitboard/machine/bsa/back + name = "Bluespace Artillery Generator (Machine Board)" + icon_state = "command" + build_path = /obj/machinery/bsa/back //No freebies! req_components = list( - /obj/item/stock_parts/manipulator = 1, - /obj/item/stack/cable_coil = 1, - /obj/item/stock_parts/scanning_module = 2, - /obj/item/stack/sheet/glass = 2) + /obj/item/stock_parts/capacitor/quadratic = 5, + /obj/item/stack/cable_coil = 2) + +/obj/item/circuitboard/machine/bsa/front + name = "Bluespace Artillery Bore (Machine Board)" + icon_state = "command" + build_path = /obj/machinery/bsa/front + req_components = list( + /obj/item/stock_parts/manipulator/femto = 5, + /obj/item/stack/cable_coil = 2) + +/obj/item/circuitboard/machine/bsa/middle + name = "Bluespace Artillery Fusor (Machine Board)" + icon_state = "command" + build_path = /obj/machinery/bsa/middle + req_components = list( + /obj/item/stack/ore/bluespace_crystal = 20, + /obj/item/stack/cable_coil = 2) + +/obj/item/circuitboard/machine/dna_vault + name = "DNA Vault (Machine Board)" + icon_state = "command" + build_path = /obj/machinery/dna_vault //No freebies! + req_components = list( + /obj/item/stock_parts/capacitor/super = 5, + /obj/item/stock_parts/manipulator/pico = 5, + /obj/item/stack/cable_coil = 2) + +//Engineering /obj/item/circuitboard/machine/announcement_system name = "Announcement System (Machine Board)" + icon_state = "engineering" build_path = /obj/machinery/announcement_system req_components = list( /obj/item/stack/cable_coil = 2, @@ -29,6 +45,7 @@ /obj/item/circuitboard/machine/autolathe name = "Autolathe (Machine Board)" + icon_state = "engineering" build_path = /obj/machinery/autolathe req_components = list( /obj/item/stock_parts/matter_bin = 3, @@ -39,133 +56,27 @@ name = "Secure Autolathe (Machine Board)" build_path = /obj/machinery/autolathe/secure -/obj/item/circuitboard/machine/bloodbankgen - name = "Blood Bank Generator (Machine Board)" - build_path = /obj/machinery/bloodbankgen +// why is this not a subtype of autolathe? +/obj/item/circuitboard/machine/autolathe/toy + name = "Autoylathe (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/autolathe/toy req_components = list( - /obj/item/stock_parts/matter_bin = 1, + /obj/item/stock_parts/matter_bin = 3, /obj/item/stock_parts/manipulator = 1, - /obj/item/stack/cable_coil = 5, /obj/item/stack/sheet/glass = 1) -/obj/item/circuitboard/machine/medipen_refiller - name = "Medipen Refiller (Machine Board)" - icon_state = "medical" - build_path = /obj/machinery/medipen_refiller - req_components = list( - /obj/item/stock_parts/matter_bin = 1) - -/obj/item/circuitboard/machine/clonepod - name = "Clone Pod (Machine Board)" - build_path = /obj/machinery/clonepod - req_components = list( - /obj/item/stack/cable_coil = 2, - /obj/item/stock_parts/scanning_module = 2, - /obj/item/stock_parts/manipulator = 2, - /obj/item/stack/sheet/glass = 1) - -/obj/item/circuitboard/machine/clonepod/experimental - name = "Experimental Clone Pod (Machine Board)" - build_path = /obj/machinery/clonepod/experimental - -/obj/item/circuitboard/machine/sheetifier - name = "Sheet-meister 2000 (Machine Board)" - icon_state = "supply" - build_path = /obj/machinery/sheetifier - req_components = list( - /obj/item/stock_parts/manipulator = 2, - /obj/item/stock_parts/matter_bin = 2) - -/obj/item/circuitboard/machine/abductor - name = "alien board (Report This)" - icon_state = "abductor_mod" - -/obj/item/circuitboard/machine/clockwork - name = "clockwork board (Report This)" - icon_state = "clock_mod" - -/obj/item/circuitboard/machine/clonescanner - name = "Cloning Scanner (Machine Board)" - build_path = /obj/machinery/dna_scannernew - req_components = list( - /obj/item/stock_parts/scanning_module = 1, - /obj/item/stock_parts/matter_bin = 1, - /obj/item/stock_parts/micro_laser = 1, - /obj/item/stack/sheet/glass = 1, - /obj/item/stack/cable_coil = 2) - -/obj/item/circuitboard/machine/holopad - name = "AI Holopad (Machine Board)" - build_path = /obj/machinery/holopad - req_components = list(/obj/item/stock_parts/capacitor = 1) - needs_anchored = FALSE //wew lad - -/obj/item/circuitboard/machine/launchpad - name = "Bluespace Launchpad (Machine Board)" - build_path = /obj/machinery/launchpad - req_components = list( - /obj/item/stack/ore/bluespace_crystal = 1, - /obj/item/stock_parts/manipulator = 1) - def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial) - -/obj/item/circuitboard/machine/limbgrower - name = "Limb Grower (Machine Board)" - build_path = /obj/machinery/limbgrower - req_components = list( - /obj/item/stock_parts/manipulator = 1, - /obj/item/reagent_containers/glass/beaker = 2, - /obj/item/stack/sheet/glass = 1) - -/obj/item/circuitboard/machine/quantumpad - name = "Quantum Pad (Machine Board)" - build_path = /obj/machinery/quantumpad - req_components = list( - /obj/item/stack/ore/bluespace_crystal = 1, - /obj/item/stock_parts/capacitor = 1, - /obj/item/stock_parts/manipulator = 1, - /obj/item/stack/cable_coil = 1) - def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial) - -/obj/item/circuitboard/machine/recharger - name = "Weapon Recharger (Machine Board)" - build_path = /obj/machinery/recharger +/obj/item/circuitboard/machine/grounding_rod + name = "Grounding Rod (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/power/grounding_rod req_components = list(/obj/item/stock_parts/capacitor = 1) needs_anchored = FALSE -/obj/item/circuitboard/machine/cell_charger - name = "Cell Charger (Machine Board)" - build_path = /obj/machinery/cell_charger - req_components = list(/obj/item/stock_parts/capacitor = 1) - needs_anchored = FALSE - -/obj/item/circuitboard/machine/cyborgrecharger - name = "Cyborg Recharger (Machine Board)" - build_path = /obj/machinery/recharge_station - req_components = list( - /obj/item/stock_parts/capacitor = 2, - /obj/item/stock_parts/cell = 1, - /obj/item/stock_parts/manipulator = 1) - def_components = list(/obj/item/stock_parts/cell = /obj/item/stock_parts/cell/high) - -/obj/item/circuitboard/machine/recycler - name = "Recycler (Machine Board)" - build_path = /obj/machinery/recycler - req_components = list( - /obj/item/stock_parts/matter_bin = 1, - /obj/item/stock_parts/manipulator = 1) - needs_anchored = FALSE - -/obj/item/circuitboard/machine/space_heater - name = "Space Heater (Machine Board)" - build_path = /obj/machinery/space_heater - req_components = list( - /obj/item/stock_parts/micro_laser = 1, - /obj/item/stock_parts/capacitor = 1, - /obj/item/stack/cable_coil = 3) - needs_anchored = FALSE /obj/item/circuitboard/machine/telecomms/broadcaster name = "Subspace Broadcaster (Machine Board)" + icon_state = "engineering" build_path = /obj/machinery/telecomms/broadcaster req_components = list( /obj/item/stock_parts/manipulator = 2, @@ -176,6 +87,7 @@ /obj/item/circuitboard/machine/telecomms/bus name = "Bus Mainframe (Machine Board)" + icon_state = "engineering" build_path = /obj/machinery/telecomms/bus req_components = list( /obj/item/stock_parts/manipulator = 2, @@ -184,14 +96,25 @@ /obj/item/circuitboard/machine/telecomms/hub name = "Hub Mainframe (Machine Board)" + icon_state = "engineering" build_path = /obj/machinery/telecomms/hub req_components = list( /obj/item/stock_parts/manipulator = 2, /obj/item/stack/cable_coil = 2, /obj/item/stock_parts/subspace/filter = 2) +/obj/item/circuitboard/machine/telecomms/message_server + name = "Messaging Server (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/telecomms/message_server + req_components = list( + /obj/item/stock_parts/manipulator = 2, + /obj/item/stack/cable_coil = 1, + /obj/item/stock_parts/subspace/filter = 3) + /obj/item/circuitboard/machine/telecomms/processor name = "Processor Unit (Machine Board)" + icon_state = "engineering" build_path = /obj/machinery/telecomms/processor req_components = list( /obj/item/stock_parts/manipulator = 3, @@ -203,6 +126,7 @@ /obj/item/circuitboard/machine/telecomms/receiver name = "Subspace Receiver (Machine Board)" + icon_state = "engineering" build_path = /obj/machinery/telecomms/receiver req_components = list( /obj/item/stock_parts/subspace/ansible = 1, @@ -212,6 +136,7 @@ /obj/item/circuitboard/machine/telecomms/relay name = "Relay Mainframe (Machine Board)" + icon_state = "engineering" build_path = /obj/machinery/telecomms/relay req_components = list( /obj/item/stock_parts/manipulator = 2, @@ -220,39 +145,369 @@ /obj/item/circuitboard/machine/telecomms/server name = "Telecommunication Server (Machine Board)" + icon_state = "engineering" build_path = /obj/machinery/telecomms/server req_components = list( /obj/item/stock_parts/manipulator = 2, /obj/item/stack/cable_coil = 1, /obj/item/stock_parts/subspace/filter = 1) -/obj/item/circuitboard/machine/teleporter_hub - name = "Teleporter Hub (Machine Board)" - build_path = /obj/machinery/teleport/hub - req_components = list( - /obj/item/stack/ore/bluespace_crystal = 3, - /obj/item/stock_parts/matter_bin = 1) - def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial) +/obj/item/circuitboard/machine/tesla_coil + name = "Tesla Controller (Machine Board)" + icon_state = "engineering" + desc = "You can use a screwdriver to switch between Research and Power Generation." + build_path = /obj/machinery/power/tesla_coil + req_components = list(/obj/item/stock_parts/capacitor = 1) + needs_anchored = FALSE -/obj/item/circuitboard/machine/teleporter_station - name = "Teleporter Station (Machine Board)" - build_path = /obj/machinery/teleport/station - req_components = list( - /obj/item/stack/ore/bluespace_crystal = 2, - /obj/item/stock_parts/capacitor = 2, - /obj/item/stack/sheet/glass = 1) - def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial) +/obj/item/circuitboard/machine/cell_charger + name = "Cell Charger (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/cell_charger + req_components = list(/obj/item/stock_parts/capacitor = 1) + needs_anchored = FALSE -/obj/item/circuitboard/machine/colormate - name = "Colormate (Machine Board)" - build_path = /obj/machinery/gear_painter +/obj/item/circuitboard/machine/circulator + name = "Circulator/Heat Exchanger (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/atmospherics/components/binary/circulator req_components = list() - def_components = list() + +/obj/item/circuitboard/machine/emitter + name = "Emitter (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/power/emitter + req_components = list( + /obj/item/stock_parts/micro_laser = 1, + /obj/item/stock_parts/manipulator = 1) + needs_anchored = FALSE + +/obj/item/circuitboard/machine/generator + name = "Thermo-Electric Generator (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/power/generator + req_components = list() + +/obj/item/circuitboard/machine/ntnet_relay + name = "NTNet Relay (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/ntnet_relay + req_components = list( + /obj/item/stack/cable_coil = 2, + /obj/item/stock_parts/subspace/filter = 1) + +/obj/item/circuitboard/machine/pacman + name = "PACMAN-type Generator (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/power/port_gen/pacman + req_components = list( + /obj/item/stock_parts/matter_bin = 1, + /obj/item/stock_parts/micro_laser = 1, + /obj/item/stack/cable_coil = 2, + /obj/item/stock_parts/capacitor = 1) + needs_anchored = FALSE + +/obj/item/circuitboard/machine/pacman/super + name = "SUPERPACMAN-type Generator (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/power/port_gen/pacman/super + +/obj/item/circuitboard/machine/power_compressor + name = "Power Compressor (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/power/compressor + req_components = list( + /obj/item/stack/cable_coil = 5, + /obj/item/stock_parts/manipulator = 6) + +/obj/item/circuitboard/machine/power_turbine + name = "Power Turbine (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/power/turbine + req_components = list( + /obj/item/stack/cable_coil = 5, + /obj/item/stock_parts/capacitor = 6) + +/obj/item/circuitboard/machine/protolathe/department/engineering + name = "Departmental Protolathe (Machine Board) - Engineering" + icon_state = "engineering" + build_path = /obj/machinery/rnd/production/protolathe/department/engineering + +/obj/item/circuitboard/machine/rad_collector + name = "Radiation Collector (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/power/rad_collector + req_components = list( + /obj/item/stack/cable_coil = 5, + /obj/item/stock_parts/matter_bin = 1, + /obj/item/stack/sheet/plasmarglass = 2, + /obj/item/stock_parts/capacitor = 1, + /obj/item/stock_parts/manipulator = 1) + needs_anchored = FALSE + +/obj/item/circuitboard/machine/rtg + name = "RTG (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/power/rtg + req_components = list( + /obj/item/stack/cable_coil = 5, + /obj/item/stock_parts/capacitor = 1, + /obj/item/stack/sheet/mineral/uranium = 10) // We have no Pu-238, and this is the closest thing to it. + +/obj/item/circuitboard/machine/rtg/advanced + name = "Advanced RTG (Machine Board)" + build_path = /obj/machinery/power/rtg/advanced + req_components = list( + /obj/item/stack/cable_coil = 5, + /obj/item/stock_parts/capacitor = 1, + /obj/item/stock_parts/micro_laser = 1, + /obj/item/stack/sheet/mineral/uranium = 10, + /obj/item/stack/sheet/mineral/plasma = 5) + +/obj/item/circuitboard/machine/scanner_gate + name = "Scanner Gate (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/scanner_gate + req_components = list( + /obj/item/stock_parts/scanning_module = 3) + +/obj/item/circuitboard/machine/smes + name = "SMES (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/power/smes + req_components = list( + /obj/item/stack/cable_coil = 5, + /obj/item/stock_parts/cell = 5, + /obj/item/stock_parts/capacitor = 1) + def_components = list(/obj/item/stock_parts/cell = /obj/item/stock_parts/cell/high/empty) + +/obj/item/circuitboard/machine/techfab/department/engineering + name = "\improper Departmental Techfab (Machine Board) - Engineering" + build_path = /obj/machinery/rnd/production/techfab/department/engineering + +/obj/item/circuitboard/machine/thermomachine + name = "Thermomachine (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/atmospherics/components/unary/thermomachine/freezer + var/pipe_layer = PIPING_LAYER_DEFAULT + req_components = list( + /obj/item/stock_parts/matter_bin = 2, + /obj/item/stock_parts/micro_laser = 2, + /obj/item/stack/cable_coil = 1, + /obj/item/stack/sheet/glass = 1) + +/obj/item/circuitboard/machine/thermomachine/multitool_act(mob/living/user, obj/item/multitool/I) + . = ..() + if (istype(I)) + pipe_layer = (pipe_layer >= PIPING_LAYER_MAX) ? PIPING_LAYER_MIN : (pipe_layer + 1) + to_chat(user, "You change the circuitboard to layer [pipe_layer].") + +/obj/item/circuitboard/machine/thermomachine/examine() + . = ..() + . += "It is set to layer [pipe_layer]." + +/obj/item/circuitboard/machine/HFR_fuel_input + name = "HFR Fuel Input (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/atmospherics/components/unary/hypertorus/fuel_input + req_components = list( + /obj/item/stack/sheet/plasteel = 5) + +/obj/item/circuitboard/machine/HFR_waste_output + name = "HFR Waste Output (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/atmospherics/components/unary/hypertorus/waste_output + req_components = list( + /obj/item/stack/sheet/plasteel = 5) + +/obj/item/circuitboard/machine/HFR_moderator_input + name = "HFR Moderator Input (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/atmospherics/components/unary/hypertorus/moderator_input + req_components = list( + /obj/item/stack/sheet/plasteel = 5) + +/obj/item/circuitboard/machine/HFR_core + name = "HFR core (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/atmospherics/components/unary/hypertorus/core + req_components = list( + /obj/item/stack/cable_coil = 10, + /obj/item/stack/sheet/glass = 10, + /obj/item/stack/sheet/plasteel = 10) + +/obj/item/circuitboard/machine/HFR_corner + name = "HFR Corner (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/hypertorus/corner + req_components = list( + /obj/item/stack/sheet/plasteel = 5) + +/obj/item/circuitboard/machine/HFR_interface + name = "HFR Interface (Machine Board)" + icon_state = "engineering" + build_path = /obj/machinery/hypertorus/interface + req_components = list( + /obj/item/stack/cable_coil = 10, + /obj/item/stack/sheet/glass = 10, + /obj/item/stack/sheet/plasteel = 5) + +//Generic + +/obj/item/circuitboard/machine/circuit_imprinter + name = "Circuit Imprinter (Machine Board)" + icon_state = "generic" + build_path = /obj/machinery/rnd/production/circuit_imprinter + req_components = list( + /obj/item/stock_parts/matter_bin = 1, + /obj/item/stock_parts/manipulator = 1, + /obj/item/reagent_containers/glass/beaker = 2) + +/obj/item/circuitboard/machine/circuit_imprinter/department + name = "Departmental Circuit Imprinter (Machine Board)" + icon_state = "generic" + build_path = /obj/machinery/rnd/production/circuit_imprinter/department + +/obj/item/circuitboard/machine/holopad + name = "AI Holopad (Machine Board)" + icon_state = "generic" + build_path = /obj/machinery/holopad + req_components = list(/obj/item/stock_parts/capacitor = 1) + needs_anchored = FALSE //wew lad + var/secure = FALSE + +/obj/item/circuitboard/machine/holopad/attackby(obj/item/P, mob/user, params) + if(P.tool_behaviour == TOOL_MULTITOOL) + if(secure) + build_path = /obj/machinery/holopad + secure = FALSE + else + build_path = /obj/machinery/holopad //secure + secure = TRUE + to_chat(user, "You [secure? "en" : "dis"]able the security on the [src]") + . = ..() + +/obj/item/circuitboard/machine/holopad/examine(mob/user) + . = ..() + . += "There is a connection port on this board that could be pulsed" + if(secure) + . += "There is a red light flashing next to the word \"secure\"" + +/obj/item/circuitboard/machine/launchpad + name = "Bluespace Launchpad (Machine Board)" + icon_state = "generic" + build_path = /obj/machinery/launchpad + req_components = list( + /obj/item/stack/ore/bluespace_crystal = 1, + /obj/item/stock_parts/manipulator = 1) + def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial) + +/obj/item/circuitboard/machine/paystand + name = "Pay Stand (Machine Board)" + icon_state = "generic" + build_path = /obj/machinery/paystand + req_components = list() + +/obj/item/circuitboard/machine/protolathe + name = "Protolathe (Machine Board)" + icon_state = "generic" + build_path = /obj/machinery/rnd/production/protolathe + req_components = list( + /obj/item/stock_parts/matter_bin = 2, + /obj/item/stock_parts/manipulator = 2, + /obj/item/reagent_containers/glass/beaker = 2) + +/obj/item/circuitboard/machine/protolathe/department + name = "Departmental Protolathe (Machine Board)" + icon_state = "generic" + build_path = /obj/machinery/rnd/production/protolathe/department + +/obj/item/circuitboard/machine/reagentgrinder + name = "Machine Design (All-In-One Grinder)" + icon_state = "generic" + build_path = /obj/machinery/reagentgrinder/constructed + req_components = list( + /obj/item/stock_parts/manipulator = 1) + needs_anchored = FALSE + +/obj/item/circuitboard/machine/smartfridge + name = "Smartfridge (Machine Board)" + build_path = /obj/machinery/smartfridge + req_components = list(/obj/item/stock_parts/matter_bin = 1) + var/static/list/fridges_name_paths = list(/obj/machinery/smartfridge = "plant produce", + /obj/machinery/smartfridge/food = "food", + /obj/machinery/smartfridge/drinks = "drinks", + /obj/machinery/smartfridge/extract = "slimes", + /obj/machinery/smartfridge/organ = "organs", + /obj/machinery/smartfridge/chemistry = "chems", + /obj/machinery/smartfridge/chemistry/virology = "viruses", + /obj/machinery/smartfridge/disks = "disks") + needs_anchored = FALSE + var/is_special_type = FALSE + +/obj/item/circuitboard/machine/smartfridge/apply_default_parts(obj/machinery/smartfridge/M) + build_path = M.base_build_path + if(!fridges_name_paths.Find(build_path, fridges_name_paths)) + name = "[initial(M.name)] (Machine Board)" //if it's a unique type, give it a unique name. + is_special_type = TRUE + return ..() + +/obj/item/circuitboard/machine/smartfridge/attackby(obj/item/I, mob/user, params) + if(!is_special_type && I.tool_behaviour == TOOL_SCREWDRIVER) + var/position = fridges_name_paths.Find(build_path, fridges_name_paths) + position = (position == fridges_name_paths.len) ? 1 : (position + 1) + build_path = fridges_name_paths[position] + to_chat(user, "You set the board to [fridges_name_paths[build_path]].") + else + return ..() + +/obj/item/circuitboard/machine/smartfridge/examine(mob/user) + . = ..() + if(is_special_type) + return + . += "[src] is set to [fridges_name_paths[build_path]]. You can use a screwdriver to reconfigure it." + + +/obj/item/circuitboard/machine/space_heater + name = "Space Heater (Machine Board)" + icon_state = "generic" + build_path = /obj/machinery/space_heater + req_components = list( + /obj/item/stock_parts/micro_laser = 1, + /obj/item/stock_parts/capacitor = 1, + /obj/item/stack/cable_coil = 3) + needs_anchored = FALSE + +/obj/item/circuitboard/machine/electrolyzer + name = "Electrolyzer (Machine Board)" + icon_state = "generic" + build_path = /obj/machinery/electrolyzer + req_components = list( + /obj/item/stock_parts/electrolite = 2, + /obj/item/stock_parts/capacitor = 2, + /obj/item/stack/cable_coil = 5, + /obj/item/stack/sheet/glass = 1) + + needs_anchored = FALSE + + +/obj/item/circuitboard/machine/techfab + name = "\improper Techfab (Machine Board)" + icon_state = "generic" + build_path = /obj/machinery/rnd/production/techfab + req_components = list( + /obj/item/stock_parts/matter_bin = 2, + /obj/item/stock_parts/manipulator = 2, + /obj/item/reagent_containers/glass/beaker = 2) + +/obj/item/circuitboard/machine/techfab/department + name = "\improper Departmental Techfab (Machine Board)" + build_path = /obj/machinery/rnd/production/techfab/department /obj/item/circuitboard/machine/vendor name = "Custom Vendor (Machine Board)" desc = "You can turn the \"brand selection\" dial using a screwdriver." - custom_premium_price = 100 + custom_premium_price = PAYCHECK_ASSISTANT * 1.5 build_path = /obj/machinery/vending/custom req_components = list(/obj/item/vending_refill/custom = 1) @@ -265,15 +520,8 @@ /obj/machinery/vending/games = "\improper Good Clean Fun", /obj/machinery/vending/kink = "KinkMate", /obj/machinery/vending/autodrobe = "AutoDrobe", - /obj/machinery/vending/assist = "\improper Vendomat", - /obj/machinery/vending/engivend = "\improper Engi-Vend", - /obj/machinery/vending/tool = "\improper YouTool", - /obj/machinery/vending/sustenance = "\improper Sustenance Vendor", - /obj/machinery/vending/dinnerware = "\improper Plasteel Chef's Dinnerware Vendor", - /obj/machinery/vending/cart = "\improper PTech", - /obj/machinery/vending/hydronutrients = "\improper NutriMax", - /obj/machinery/vending/hydroseeds = "\improper MegaSeed Servitor", /obj/machinery/vending/wardrobe/sec_wardrobe = "SecDrobe", + /obj/machinery/vending/wardrobe/det_wardrobe = "DetDrobe", /obj/machinery/vending/wardrobe/medi_wardrobe = "MediDrobe", /obj/machinery/vending/wardrobe/engi_wardrobe = "EngiDrobe", /obj/machinery/vending/wardrobe/atmos_wardrobe = "AtmosDrobe", @@ -293,15 +541,30 @@ /obj/machinery/vending/clothing = "ClothesMate", /obj/machinery/vending/medical = "NanoMed Plus", /obj/machinery/vending/wallmed = "NanoMed", + /obj/machinery/vending/assist = "Vendomat", + /obj/machinery/vending/engivend = "Engi-Vend", + /obj/machinery/vending/tool = "YouTool", + /obj/machinery/vending/hydronutrients = "NutriMax", + /obj/machinery/vending/hydroseeds = "MegaSeed Servitor", + /obj/machinery/vending/sustenance = "Sustenance Vendor", + /obj/machinery/vending/dinnerware = "Plasteel Chef's Dinnerware Vendor", + /obj/machinery/vending/cart = "PTech", + /obj/machinery/vending/robotics = "Robotech Deluxe", + /obj/machinery/vending/engineering = "Robco Tool Maker", + /obj/machinery/vending/sovietsoda = "BODA", + /obj/machinery/vending/security = "SecTech", + // /obj/machinery/vending/modularpc = "Deluxe Silicate Selections", /obj/machinery/vending/custom = "Custom Vendor") /obj/item/circuitboard/machine/vendor/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/screwdriver)) - var/position = vending_names_paths.Find(build_path) - position = (position == vending_names_paths.len) ? 1 : (position + 1) - var/typepath = vending_names_paths[position] - set_type(typepath) - to_chat(user, "You set the board to \"[vending_names_paths[typepath]]\".") + if(I.tool_behaviour == TOOL_SCREWDRIVER) + var/static/list/display_vending_names_paths + if(!display_vending_names_paths) + display_vending_names_paths = list() + for(var/path in vending_names_paths) + display_vending_names_paths[vending_names_paths[path]] = path + var/choice = input(user,"Choose a new brand","Select an Item") as null|anything in sortList(display_vending_names_paths) + set_type(display_vending_names_paths[choice]) else return ..() @@ -317,397 +580,44 @@ break return ..() -/obj/item/circuitboard/machine/mech_recharger - name = "Mechbay Recharger (Machine Board)" - build_path = /obj/machinery/mech_bay_recharge_port - req_components = list( - /obj/item/stack/cable_coil = 2, - /obj/item/stock_parts/capacitor = 5) - -/obj/item/circuitboard/machine/mechfab - name = "Exosuit Fabricator (Machine Board)" - build_path = /obj/machinery/mecha_part_fabricator - req_components = list( - /obj/item/stock_parts/matter_bin = 2, - /obj/item/stock_parts/manipulator = 1, - /obj/item/stock_parts/micro_laser = 1, - /obj/item/stack/sheet/glass = 1) - var/offstation_security_levels = TRUE - -/obj/item/circuitboard/machine/mechfab/offstation - offstation_security_levels = FALSE - -/obj/item/circuitboard/machine/mechfab/rnd_crafted(obj/machinery/rnd/production/P) - offstation_security_levels = P.offstation_security_levels - -/obj/item/circuitboard/machine/cryo_tube - name = "Cryotube (Machine Board)" - build_path = /obj/machinery/atmospherics/components/unary/cryo_cell - req_components = list( - /obj/item/stock_parts/matter_bin = 1, - /obj/item/stack/cable_coil = 1, - /obj/item/stack/sheet/glass = 4) - -/obj/item/circuitboard/machine/thermomachine - name = "Thermomachine (Machine Board)" - desc = "You can use a screwdriver to switch between heater and freezer." - var/pipe_layer = PIPING_LAYER_DEFAULT - req_components = list( - /obj/item/stock_parts/matter_bin = 2, - /obj/item/stock_parts/micro_laser = 2, - /obj/item/stack/cable_coil = 1, - /obj/item/stack/sheet/glass = 1) - -#define PATH_FREEZER /obj/machinery/atmospherics/components/unary/thermomachine/freezer -#define PATH_HEATER /obj/machinery/atmospherics/components/unary/thermomachine/heater - -/obj/item/circuitboard/machine/thermomachine/Initialize() - . = ..() - if(!build_path) - if(prob(50)) - name = "Freezer (Machine Board)" - build_path = PATH_FREEZER - else - name = "Heater (Machine Board)" - build_path = PATH_HEATER - -/obj/item/circuitboard/machine/thermomachine/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/screwdriver)) - var/obj/item/circuitboard/new_type - var/new_setting - switch(build_path) - if(PATH_FREEZER) - new_type = /obj/item/circuitboard/machine/thermomachine/heater - new_setting = "Heater" - if(PATH_HEATER) - new_type = /obj/item/circuitboard/machine/thermomachine/freezer - new_setting = "Freezer" - name = initial(new_type.name) - build_path = initial(new_type.build_path) - I.play_tool_sound(src) - to_chat(user, "You change the circuitboard setting to \"[new_setting]\".") - return - - if(I.tool_behaviour == TOOL_MULTITOOL) - pipe_layer = (pipe_layer >= PIPING_LAYER_MAX) ? PIPING_LAYER_MIN : (pipe_layer + 1) - to_chat(user, "You change the circuitboard to layer [pipe_layer].") - return - - . = ..() - -/obj/item/circuitboard/machine/thermomachine/examine() - . = ..() - . += "It is set to layer [pipe_layer]. Use a Multitool on the circuit to change this." - -/obj/item/circuitboard/machine/thermomachine/heater - name = "Heater (Machine Board)" - build_path = PATH_HEATER - -/obj/item/circuitboard/machine/thermomachine/freezer - name = "Freezer (Machine Board)" - build_path = PATH_FREEZER - -#undef PATH_FREEZER -#undef PATH_HEATER - -/obj/item/circuitboard/machine/deep_fryer - name = "circuit board (Deep Fryer)" - build_path = /obj/machinery/deepfryer - req_components = list(/obj/item/stock_parts/micro_laser = 1) - needs_anchored = FALSE - -/obj/item/circuitboard/machine/gibber - name = "Gibber (Machine Board)" - build_path = /obj/machinery/gibber - req_components = list( - /obj/item/stock_parts/matter_bin = 1, - /obj/item/stock_parts/manipulator = 1) - needs_anchored = FALSE - -/obj/item/circuitboard/machine/monkey_recycler - name = "Monkey Recycler (Machine Board)" - build_path = /obj/machinery/monkey_recycler - req_components = list( - /obj/item/stock_parts/matter_bin = 1, - /obj/item/stock_parts/manipulator = 1) - needs_anchored = FALSE - -/obj/item/circuitboard/machine/processor - name = "Food Processor (Machine Board)" - build_path = /obj/machinery/processor - req_components = list( - /obj/item/stock_parts/matter_bin = 1, - /obj/item/stock_parts/manipulator = 1) - needs_anchored = FALSE - -/obj/item/circuitboard/machine/processor/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/screwdriver)) - if(build_path == /obj/machinery/processor) - name = "Slime Processor (Machine Board)" - build_path = /obj/machinery/processor/slime - to_chat(user, "Name protocols successfully updated.") - else - name = "Food Processor (Machine Board)" - build_path = /obj/machinery/processor - to_chat(user, "Defaulting name protocols.") - else - return ..() - -/obj/item/circuitboard/machine/processor/slime - name = "Slime Processor (Machine Board)" - build_path = /obj/machinery/processor/slime - -/obj/item/circuitboard/machine/smartfridge - name = "Smartfridge (Machine Board)" - build_path = /obj/machinery/smartfridge - req_components = list(/obj/item/stock_parts/matter_bin = 1) - var/static/list/fridges_name_paths = list(/obj/machinery/smartfridge = "plant produce", - /obj/machinery/smartfridge/food = "food", - /obj/machinery/smartfridge/drinks = "drinks", - /obj/machinery/smartfridge/extract = "slimes", - /obj/machinery/smartfridge/organ = "organs", - /obj/machinery/smartfridge/chemistry = "chems", - /obj/machinery/smartfridge/chemistry/virology = "viruses", - /obj/machinery/smartfridge/disks = "disks") - needs_anchored = FALSE - -/obj/item/circuitboard/machine/smartfridge/Initialize(mapload, new_type) - if(new_type) - build_path = new_type - return ..() - -/obj/item/circuitboard/machine/smartfridge/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/screwdriver)) - var/position = fridges_name_paths.Find(build_path, fridges_name_paths) - position = (position == fridges_name_paths.len) ? 1 : (position + 1) - build_path = fridges_name_paths[position] - to_chat(user, "You set the board to [fridges_name_paths[build_path]].") - else - return ..() - -/obj/item/circuitboard/machine/smartfridge/examine(mob/user) - . = ..() - . += "[src] is set to [fridges_name_paths[build_path]]. You can use a screwdriver to reconfigure it." - -/obj/item/circuitboard/machine/biogenerator - name = "Biogenerator (Machine Board)" - build_path = /obj/machinery/biogenerator - req_components = list( - /obj/item/stock_parts/matter_bin = 1, - /obj/item/stock_parts/manipulator = 1, - /obj/item/stack/cable_coil = 1, - /obj/item/stack/sheet/glass = 1) - -/obj/item/circuitboard/machine/plantgenes - name = "Plant DNA Manipulator (Machine Board)" - build_path = /obj/machinery/plantgenes - req_components = list( - /obj/item/stock_parts/manipulator = 1, - /obj/item/stock_parts/micro_laser = 1, - /obj/item/stack/sheet/glass = 1, - /obj/item/stock_parts/scanning_module = 1) - -/obj/item/circuitboard/machine/plantgenes/vault - name = "alien board (Plant DNA Manipulator)" - icon_state = "abductor_mod" - // It wasn't made by actual abductors race, so no abductor tech here. - def_components = list( - /obj/item/stock_parts/manipulator = /obj/item/stock_parts/manipulator/femto, - /obj/item/stock_parts/micro_laser = /obj/item/stock_parts/micro_laser/quadultra, - /obj/item/stock_parts/scanning_module = /obj/item/stock_parts/scanning_module/triphasic) - - -/obj/item/circuitboard/machine/hydroponics - name = "Hydroponics Tray (Machine Board)" - build_path = /obj/machinery/hydroponics/constructable - req_components = list( - /obj/item/stock_parts/matter_bin = 2, - /obj/item/stock_parts/manipulator = 1, - /obj/item/stack/sheet/glass = 1) - needs_anchored = FALSE - -/obj/item/circuitboard/machine/hydroponics/automagic - name = "Automatic Hydroponics Tray (Machine Board)" - build_path = /obj/machinery/hydroponics/constructable/automagic - -/obj/item/circuitboard/machine/seed_extractor - name = "Seed Extractor (Machine Board)" - build_path = /obj/machinery/seed_extractor - req_components = list( - /obj/item/stock_parts/matter_bin = 1, - /obj/item/stock_parts/manipulator = 1) - needs_anchored = FALSE - -/obj/item/circuitboard/machine/ore_redemption - name = "Ore Redemption (Machine Board)" - build_path = /obj/machinery/mineral/ore_redemption +/obj/item/circuitboard/machine/vending/donksofttoyvendor + name = "Donksoft Toy Vendor (Machine Board)" + build_path = /obj/machinery/vending/donksofttoyvendor req_components = list( /obj/item/stack/sheet/glass = 1, - /obj/item/stock_parts/matter_bin = 1, - /obj/item/stock_parts/micro_laser = 1, - /obj/item/stock_parts/manipulator = 1, - /obj/item/assembly/igniter = 1) - needs_anchored = FALSE + /obj/item/vending_refill/donksoft = 1) -/obj/item/circuitboard/machine/mining_equipment_vendor - name = "Mining Equipment Vendor (Machine Board)" - build_path = /obj/machinery/mineral/equipment_vendor +/obj/item/circuitboard/machine/vending/syndicatedonksofttoyvendor + name = "Syndicate Donksoft Toy Vendor (Machine Board)" + build_path = /obj/machinery/vending/toyliberationstation req_components = list( /obj/item/stack/sheet/glass = 1, - /obj/item/stock_parts/matter_bin = 3) + /obj/item/vending_refill/donksoft = 1) -/obj/item/circuitboard/machine/mining_equipment_vendor/golem - name = "Golem Ship Equipment Vendor (Machine Board)" - build_path = /obj/machinery/mineral/equipment_vendor/golem - -/obj/item/circuitboard/machine/ntnet_relay - name = "NTNet Relay (Machine Board)" - build_path = /obj/machinery/ntnet_relay +/obj/item/circuitboard/machine/bountypad + name = "Civilian Bounty Pad (Machine Board)" + icon_state = "generic" + build_path = /obj/machinery/piratepad/civilian req_components = list( - /obj/item/stack/cable_coil = 2, - /obj/item/stock_parts/subspace/filter = 1) + /obj/item/stock_parts/card_reader = 1, + /obj/item/stock_parts/scanning_module = 1, + /obj/item/stock_parts/micro_laser = 1 + ) -/obj/item/circuitboard/machine/pacman - name = "PACMAN-type Generator (Machine Board)" - build_path = /obj/machinery/power/port_gen/pacman +/obj/item/circuitboard/machine/accounting + name = "Account Registration Device (Machine Board)" + icon_state = "command" + build_path = /obj/machinery/accounting req_components = list( - /obj/item/stock_parts/matter_bin = 1, - /obj/item/stock_parts/micro_laser = 1, - /obj/item/stack/cable_coil = 2, - /obj/item/stock_parts/capacitor = 1) - needs_anchored = FALSE + /obj/item/stock_parts/card_reader = 1, + /obj/item/stock_parts/scanning_module = 1 + ) -/obj/item/circuitboard/machine/pacman/super - name = "SUPERPACMAN-type Generator (Machine Board)" - build_path = /obj/machinery/power/port_gen/pacman/super - -/obj/item/circuitboard/machine/pacman/mrs - name = "MRSPACMAN-type Generator (Machine Board)" - build_path = /obj/machinery/power/port_gen/pacman/mrs - -/obj/item/circuitboard/machine/rtg - name = "RTG (Machine Board)" - build_path = /obj/machinery/power/rtg - req_components = list( - /obj/item/stack/cable_coil = 5, - /obj/item/stock_parts/capacitor = 1, - /obj/item/stack/sheet/mineral/uranium = 10) // We have no Pu-238, and this is the closest thing to it. - -/obj/item/circuitboard/machine/rtg/advanced - name = "Advanced RTG (Machine Board)" - build_path = /obj/machinery/power/rtg/advanced - req_components = list( - /obj/item/stack/cable_coil = 5, - /obj/item/stock_parts/capacitor = 1, - /obj/item/stock_parts/micro_laser = 1, - /obj/item/stack/sheet/mineral/uranium = 10, - /obj/item/stack/sheet/mineral/plasma = 5) - -/obj/item/circuitboard/machine/abductor/core - name = "alien board (Void Core)" - build_path = /obj/machinery/power/rtg/abductor - req_components = list( - /obj/item/stock_parts/capacitor = 1, - /obj/item/stock_parts/micro_laser = 1, - /obj/item/stock_parts/cell/infinite/abductor = 1) - def_components = list( - /obj/item/stock_parts/capacitor = /obj/item/stock_parts/capacitor/quadratic, - /obj/item/stock_parts/micro_laser = /obj/item/stock_parts/micro_laser/quadultra) - -/obj/item/circuitboard/machine/emitter - name = "Emitter (Machine Board)" - build_path = /obj/machinery/power/emitter - req_components = list( - /obj/item/stock_parts/micro_laser = 1, - /obj/item/stock_parts/manipulator = 1) - needs_anchored = FALSE - -/obj/item/circuitboard/machine/smes - name = "SMES (Machine Board)" - build_path = /obj/machinery/power/smes - req_components = list( - /obj/item/stack/cable_coil = 5, - /obj/item/stock_parts/cell = 5, - /obj/item/stock_parts/capacitor = 1) - def_components = list(/obj/item/stock_parts/cell = /obj/item/stock_parts/cell/high/empty) - -/obj/item/circuitboard/machine/rad_collector - name = "Radiation Collector (Machine Board)" - build_path = /obj/machinery/power/rad_collector - req_components = list( - /obj/item/stack/cable_coil = 5, - /obj/item/stock_parts/matter_bin = 1, - /obj/item/stack/sheet/plasmarglass = 2, - /obj/item/stock_parts/capacitor = 1, - /obj/item/stock_parts/manipulator = 1) - needs_anchored = FALSE - -/obj/item/circuitboard/machine/tesla_coil - name = "Tesla Controller (Machine Board)" - desc = "You can use a screwdriver to switch between Research and Power Generation." - build_path = /obj/machinery/power/tesla_coil - req_components = list(/obj/item/stock_parts/capacitor = 1) - needs_anchored = FALSE - -#define PATH_POWERCOIL /obj/machinery/power/tesla_coil/power -#define PATH_RPCOIL /obj/machinery/power/tesla_coil/research - -/obj/item/circuitboard/machine/tesla_coil/Initialize() - . = ..() - if(build_path) - build_path = PATH_POWERCOIL - -/obj/item/circuitboard/machine/tesla_coil/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/screwdriver)) - var/obj/item/circuitboard/new_type - var/new_setting - switch(build_path) - if(PATH_POWERCOIL) - new_type = /obj/item/circuitboard/machine/tesla_coil/research - new_setting = "Research" - if(PATH_RPCOIL) - new_type = /obj/item/circuitboard/machine/tesla_coil/power - new_setting = "Power" - name = initial(new_type.name) - build_path = initial(new_type.build_path) - I.play_tool_sound(src) - to_chat(user, "You change the circuitboard setting to \"[new_setting]\".") - else - return ..() - -/obj/item/circuitboard/machine/tesla_coil/power - name = "Tesla Coil (Machine Board)" - build_path = PATH_POWERCOIL - -/obj/item/circuitboard/machine/tesla_coil/research - name = "Tesla Corona Researcher (Machine Board)" - build_path = PATH_RPCOIL - -#undef PATH_POWERCOIL -#undef PATH_RPCOIL - -/obj/item/circuitboard/machine/grounding_rod - name = "Grounding Rod (Machine Board)" - build_path = /obj/machinery/power/grounding_rod - req_components = list(/obj/item/stock_parts/capacitor = 1) - needs_anchored = FALSE - -/obj/item/circuitboard/machine/power_compressor - name = "Power Compressor (Machine Board)" - build_path = /obj/machinery/power/compressor - req_components = list( - /obj/item/stack/cable_coil = 5, - /obj/item/stock_parts/manipulator = 6) - -/obj/item/circuitboard/machine/power_turbine - name = "Power Turbine (Machine Board)" - build_path = /obj/machinery/power/turbine - req_components = list( - /obj/item/stack/cable_coil = 5, - /obj/item/stock_parts/capacitor = 6) +//Medical /obj/item/circuitboard/machine/chem_dispenser name = "Chem Dispenser (Machine Board)" + icon_state = "medical" build_path = /obj/machinery/chem_dispenser req_components = list( /obj/item/stock_parts/matter_bin = 2, @@ -729,38 +639,16 @@ /obj/item/stock_parts/cell = 1) def_components = list(/obj/item/stock_parts/cell = /obj/item/stock_parts/cell/upgraded/plus) -/obj/item/circuitboard/machine/chem_dispenser/drinks - name = "Soda Dispenser (Machine Board)" - build_path = /obj/machinery/chem_dispenser/drinks - -/obj/item/circuitboard/machine/chem_dispenser/drinks/beer - name = "Booze Dispenser (Machine Board)" - build_path = /obj/machinery/chem_dispenser/drinks/beer - /obj/item/circuitboard/machine/chem_dispenser/abductor - name = "Reagent Synthetizer (Abductor Machine Board)" + name = "Reagent Synthesizer (Abductor Machine Board)" icon_state = "abductor_mod" build_path = /obj/machinery/chem_dispenser/abductor def_components = list(/obj/item/stock_parts/cell = /obj/item/stock_parts/cell/high) needs_anchored = FALSE -/obj/item/circuitboard/machine/sleeper/party - name = "Party Pod (Machine Board)" - build_path = /obj/machinery/sleeper/party - -/obj/item/circuitboard/machine/smoke_machine - name = "Smoke Machine (Machine Board)" - build_path = /obj/machinery/smoke_machine - req_components = list( - /obj/item/stock_parts/matter_bin = 2, - /obj/item/stock_parts/capacitor = 1, - /obj/item/stock_parts/manipulator = 1, - /obj/item/stack/sheet/glass = 1, - /obj/item/stock_parts/cell = 1) - needs_anchored = FALSE - /obj/item/circuitboard/machine/chem_heater name = "Chemical Heater (Machine Board)" + icon_state = "medical" build_path = /obj/machinery/chem_heater req_components = list( /obj/item/stock_parts/micro_laser = 1, @@ -768,6 +656,7 @@ /obj/item/circuitboard/machine/chem_master name = "ChemMaster 3000 (Machine Board)" + icon_state = "medical" build_path = /obj/machinery/chem_master desc = "You can turn the \"mode selection\" dial using a screwdriver." req_components = list( @@ -777,7 +666,7 @@ needs_anchored = FALSE /obj/item/circuitboard/machine/chem_master/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/screwdriver)) + if(I.tool_behaviour == TOOL_SCREWDRIVER) var/new_name = "ChemMaster" var/new_path = /obj/machinery/chem_master @@ -791,42 +680,169 @@ else return ..() -/obj/item/circuitboard/machine/reagentgrinder - name = "Machine Design (All-In-One Grinder)" - build_path = /obj/machinery/reagentgrinder/constructed - req_components = list( - /obj/item/stock_parts/manipulator = 1) - needs_anchored = FALSE - -/obj/item/circuitboard/machine/chem_master/condi - name = "CondiMaster 3000 (Machine Board)" - build_path = /obj/machinery/chem_master/condimaster - -/obj/item/circuitboard/machine/circuit_imprinter - name = "Circuit Imprinter (Machine Board)" - build_path = /obj/machinery/rnd/production/circuit_imprinter +/obj/item/circuitboard/machine/bloodbankgen + name = "Blood Bank Generator (Machine Board)" + icon_state = "medical" + build_path = /obj/machinery/bloodbankgen req_components = list( /obj/item/stock_parts/matter_bin = 1, /obj/item/stock_parts/manipulator = 1, - /obj/item/reagent_containers/glass/beaker = 2) - var/offstation_security_levels = TRUE + /obj/item/stack/cable_coil = 5, + /obj/item/stack/sheet/glass = 1) -/obj/item/circuitboard/machine/circuit_imprinter/offstation - offstation_security_levels = FALSE +/obj/item/circuitboard/machine/clonepod + name = "Clone Pod (Machine Board)" + icon_state = "medical" + build_path = /obj/machinery/clonepod + req_components = list( + /obj/item/stack/cable_coil = 2, + /obj/item/stock_parts/scanning_module = 2, + /obj/item/stock_parts/manipulator = 2, + /obj/item/stack/sheet/glass = 1) -/obj/item/circuitboard/machine/mechfab/rnd_crafted(obj/machinery/rnd/production/P) - offstation_security_levels = P.offstation_security_levels +/obj/item/circuitboard/machine/clonepod/experimental + name = "Experimental Clone Pod (Machine Board)" + icon_state = "medical" + build_path = /obj/machinery/clonepod/experimental -/obj/item/circuitboard/machine/circuit_imprinter/department - name = "Departmental Circuit Imprinter (Machine Board)" - build_path = /obj/machinery/rnd/production/circuit_imprinter/department +/obj/item/circuitboard/machine/cryo_tube + name = "Cryotube (Machine Board)" + icon_state = "medical" + build_path = /obj/machinery/atmospherics/components/unary/cryo_cell + req_components = list( + /obj/item/stock_parts/matter_bin = 1, + /obj/item/stack/cable_coil = 1, + /obj/item/stack/sheet/glass = 4) + +/obj/item/circuitboard/machine/fat_sucker + name = "Lipid Extractor (Machine Board)" + icon_state = "medical" + build_path = /obj/machinery/fat_sucker + req_components = list(/obj/item/stock_parts/micro_laser = 1, + /obj/item/kitchen/fork = 1) + +/obj/item/circuitboard/machine/harvester + name = "Harvester (Machine Board)" + icon_state = "medical" + build_path = /obj/machinery/harvester + req_components = list(/obj/item/stock_parts/micro_laser = 4) + +/obj/item/circuitboard/machine/medical_kiosk + name = "Medical Kiosk (Machine Board)" + icon_state = "medical" + build_path = /obj/machinery/medical_kiosk + var/custom_cost = 10 + req_components = list( + /obj/item/healthanalyzer = 1, + /obj/item/stock_parts/scanning_module = 1) + +/obj/item/circuitboard/machine/medical_kiosk/multitool_act(mob/living/user) + . = ..() + var/new_cost = input("Set a new cost for using this medical kiosk.","New cost", custom_cost) as num|null + if(!new_cost || (loc != user)) + to_chat(user, "You must hold the circuitboard to change its cost!") + return + custom_cost = clamp(round(new_cost, 1), 10, 1000) + to_chat(user, "The cost is now set to [custom_cost].") + +/obj/item/circuitboard/machine/medical_kiosk/examine(mob/user) + . = ..() + . += "The cost to use this kiosk is set to [custom_cost]." + +/obj/item/circuitboard/machine/limbgrower + name = "Limb Grower (Machine Board)" + icon_state = "medical" + build_path = /obj/machinery/limbgrower + req_components = list( + /obj/item/stock_parts/manipulator = 1, + /obj/item/reagent_containers/glass/beaker = 2, + /obj/item/stack/sheet/glass = 1) + +/obj/item/circuitboard/machine/protolathe/department/medical + name = "Departmental Protolathe (Machine Board) - Medical" + icon_state = "medical" + build_path = /obj/machinery/rnd/production/protolathe/department/medical + +/obj/item/circuitboard/machine/sleeper + name = "Sleeper (Machine Board)" + icon_state = "medical" + build_path = /obj/machinery/sleeper + req_components = list( + /obj/item/stock_parts/matter_bin = 1, + /obj/item/stock_parts/manipulator = 1, + /obj/item/stack/cable_coil = 1, + /obj/item/stack/sheet/glass = 2) + +/obj/item/circuitboard/machine/sleeper/party + name = "Party Pod (Machine Board)" + build_path = /obj/machinery/sleeper/party + +/obj/item/circuitboard/machine/sleeper/syndie + name = "Syndicate Sleeper (Machine Board)" + build_path = /obj/machinery/sleeper/syndie + +/obj/item/circuitboard/machine/vr_sleeper + name = "VR Sleeper (Machine Board)" + build_path = /obj/machinery/vr_sleeper + req_components = list( + /obj/item/stock_parts/manipulator = 1, + /obj/item/stack/cable_coil = 1, + /obj/item/stock_parts/scanning_module = 2, + /obj/item/stack/sheet/glass = 2) + +/obj/item/circuitboard/machine/smoke_machine + name = "Smoke Machine (Machine Board)" + icon_state = "medical" + build_path = /obj/machinery/smoke_machine + req_components = list( + /obj/item/stock_parts/matter_bin = 2, + /obj/item/stock_parts/capacitor = 1, + /obj/item/stock_parts/manipulator = 1, + /obj/item/stack/sheet/glass = 1, + /obj/item/stock_parts/cell = 1) + needs_anchored = FALSE + +/obj/item/circuitboard/machine/stasis + name = "\improper Lifeform Stasis Unit (Machine Board)" + icon_state = "medical" + build_path = /obj/machinery/stasis + req_components = list( + /obj/item/stack/cable_coil = 3, + /obj/item/stock_parts/manipulator = 1, + /obj/item/stock_parts/capacitor = 1) + +/obj/item/circuitboard/machine/medipen_refiller + name = "Medipen Refiller (Machine Board)" + icon_state = "medical" + build_path = /obj/machinery/medipen_refiller + req_components = list( + /obj/item/stock_parts/matter_bin = 1) + +/obj/item/circuitboard/machine/techfab/department/medical + name = "\improper Departmental Techfab (Machine Board) - Medical" + icon_state = "medical" + build_path = /obj/machinery/rnd/production/techfab/department/medical + +//Science /obj/item/circuitboard/machine/circuit_imprinter/department/science name = "Departmental Circuit Imprinter - Science (Machine Board)" + icon_state = "science" build_path = /obj/machinery/rnd/production/circuit_imprinter/department/science +/obj/item/circuitboard/machine/cyborgrecharger + name = "Cyborg Recharger (Machine Board)" + icon_state = "science" + build_path = /obj/machinery/recharge_station + req_components = list( + /obj/item/stock_parts/capacitor = 2, + /obj/item/stock_parts/cell = 1, + /obj/item/stock_parts/manipulator = 1) + def_components = list(/obj/item/stock_parts/cell = /obj/item/stock_parts/cell/high) + /obj/item/circuitboard/machine/destructive_analyzer name = "Destructive Analyzer (Machine Board)" + icon_state = "science" build_path = /obj/machinery/rnd/destructive_analyzer req_components = list( /obj/item/stock_parts/scanning_module = 1, @@ -835,40 +851,52 @@ /obj/item/circuitboard/machine/experimentor name = "E.X.P.E.R.I-MENTOR (Machine Board)" + icon_state = "science" build_path = /obj/machinery/rnd/experimentor req_components = list( /obj/item/stock_parts/scanning_module = 1, /obj/item/stock_parts/manipulator = 2, /obj/item/stock_parts/micro_laser = 2) +/obj/item/circuitboard/machine/mech_recharger + name = "Mechbay Recharger (Machine Board)" + icon_state = "science" + build_path = /obj/machinery/mech_bay_recharge_port + req_components = list( + /obj/item/stack/cable_coil = 2, + /obj/item/stock_parts/capacitor = 5) + +/obj/item/circuitboard/machine/mechfab + name = "Exosuit Fabricator (Machine Board)" + icon_state = "science" + build_path = /obj/machinery/mecha_part_fabricator + req_components = list( + /obj/item/stock_parts/matter_bin = 2, + /obj/item/stock_parts/manipulator = 1, + /obj/item/stock_parts/micro_laser = 1, + /obj/item/stack/sheet/glass = 1) + +/obj/item/circuitboard/machine/monkey_recycler + name = "Monkey Recycler (Machine Board)" + icon_state = "science" + build_path = /obj/machinery/monkey_recycler + req_components = list( + /obj/item/stock_parts/matter_bin = 1, + /obj/item/stock_parts/manipulator = 1) + needs_anchored = FALSE + /obj/item/circuitboard/machine/nanite_chamber name = "Nanite Chamber (Machine Board)" + icon_state = "science" build_path = /obj/machinery/nanite_chamber req_components = list( /obj/item/stock_parts/scanning_module = 2, /obj/item/stock_parts/micro_laser = 2, /obj/item/stock_parts/manipulator = 1) -/obj/item/circuitboard/machine/public_nanite_chamber - name = "Public Nanite Chamber (Machine Board)" - build_path = /obj/machinery/public_nanite_chamber - var/cloud_id = 1 - req_components = list( - /obj/item/stock_parts/micro_laser = 2, - /obj/item/stock_parts/manipulator = 1) - -/obj/item/circuitboard/machine/public_nanite_chamber/multitool_act(mob/living/user) - var/new_cloud = input("Set the public nanite chamber's Cloud ID (1-100).", "Cloud ID", cloud_id) as num|null - if(new_cloud == null) - return - cloud_id = clamp(round(new_cloud, 1), 1, 100) - -/obj/item/circuitboard/machine/public_nanite_chamber/examine(mob/user) - . = ..() - . += "Cloud ID is currently set to [cloud_id]." - /obj/item/circuitboard/machine/nanite_program_hub name = "Nanite Program Hub (Machine Board)" + icon_state = "science" build_path = /obj/machinery/nanite_program_hub req_components = list( /obj/item/stock_parts/matter_bin = 1, @@ -876,163 +904,185 @@ /obj/item/circuitboard/machine/nanite_programmer name = "Nanite Programmer (Machine Board)" + icon_state = "science" build_path = /obj/machinery/nanite_programmer req_components = list( /obj/item/stock_parts/manipulator = 2, /obj/item/stock_parts/micro_laser = 2, /obj/item/stock_parts/scanning_module = 1) -/obj/item/circuitboard/machine/protolathe - name = "Protolathe (Machine Board)" - build_path = /obj/machinery/rnd/production/protolathe - req_components = list( - /obj/item/stock_parts/matter_bin = 2, - /obj/item/stock_parts/manipulator = 2, - /obj/item/reagent_containers/glass/beaker = 2) - var/offstation_security_levels = TRUE - -/obj/item/circuitboard/machine/protolathe/offstation - offstation_security_levels = FALSE - -/obj/item/circuitboard/machine/protolathe/rnd_crafted(obj/machinery/rnd/production/P) - offstation_security_levels = P.offstation_security_levels - -/obj/item/circuitboard/machine/protolathe/department - name = "Departmental Protolathe (Machine Board)" - build_path = /obj/machinery/rnd/production/protolathe/department - -/obj/item/circuitboard/machine/protolathe/department/cargo - name = "Departmental Protolathe (Machine Board) - Cargo" - build_path = /obj/machinery/rnd/production/protolathe/department/cargo - -/obj/item/circuitboard/machine/protolathe/department/engineering - name = "Departmental Protolathe (Machine Board) - Engineering" - build_path = /obj/machinery/rnd/production/protolathe/department/engineering - -/obj/item/circuitboard/machine/protolathe/department/medical - name = "Departmental Protolathe (Machine Board) - Medical" - build_path = /obj/machinery/rnd/production/protolathe/department/medical +/obj/item/circuitboard/machine/processor/slime + name = "Slime Processor (Machine Board)" + icon_state = "science" + build_path = /obj/machinery/processor/slime /obj/item/circuitboard/machine/protolathe/department/science name = "Departmental Protolathe (Machine Board) - Science" + icon_state = "science" build_path = /obj/machinery/rnd/production/protolathe/department/science -/obj/item/circuitboard/machine/protolathe/department/security - name = "Departmental Protolathe (Machine Board) - Security" - build_path = /obj/machinery/rnd/production/protolathe/department/security - -/obj/item/circuitboard/machine/protolathe/department/service - name = "Departmental Protolathe - Service (Machine Board)" - build_path = /obj/machinery/rnd/production/protolathe/department/service - -/obj/item/circuitboard/machine/bepis - name = "BEPIS Chamber (Machine Board)" - build_path = /obj/machinery/rnd/bepis +/obj/item/circuitboard/machine/public_nanite_chamber + name = "Public Nanite Chamber (Machine Board)" + icon_state = "science" + build_path = /obj/machinery/public_nanite_chamber + var/cloud_id = 1 req_components = list( - /obj/item/stack/cable_coil = 5, + /obj/item/stock_parts/micro_laser = 2, + /obj/item/stock_parts/manipulator = 1) + +/obj/item/circuitboard/machine/public_nanite_chamber/multitool_act(mob/living/user) + . = ..() + var/new_cloud = input("Set the public nanite chamber's Cloud ID (1-100).", "Cloud ID", cloud_id) as num|null + if(!new_cloud || (loc != user)) + to_chat(user, "You must hold the circuitboard to change its Cloud ID!") + return + cloud_id = clamp(round(new_cloud, 1), 1, 100) + +/obj/item/circuitboard/machine/public_nanite_chamber/examine(mob/user) + . = ..() + . += "Cloud ID is currently set to [cloud_id]." + +/obj/item/circuitboard/machine/quantumpad + name = "Quantum Pad (Machine Board)" + icon_state = "science" + build_path = /obj/machinery/quantumpad + req_components = list( + /obj/item/stack/ore/bluespace_crystal = 1, /obj/item/stock_parts/capacitor = 1, /obj/item/stock_parts/manipulator = 1, - /obj/item/stock_parts/micro_laser = 1, - /obj/item/stock_parts/scanning_module = 1) - -/obj/item/circuitboard/machine/techfab - name = "\improper Techfab (Machine Board)" - build_path = /obj/machinery/rnd/production/techfab - req_components = list( - /obj/item/stock_parts/matter_bin = 2, - /obj/item/stock_parts/manipulator = 2, - /obj/item/reagent_containers/glass/beaker = 2) - -/obj/item/circuitboard/machine/techfab/department - name = "\improper Departmental Techfab (Machine Board)" - build_path = /obj/machinery/rnd/production/techfab/department - -/obj/item/circuitboard/machine/techfab/department/cargo - name = "\improper Departmental Techfab (Machine Board) - Cargo" - build_path = /obj/machinery/rnd/production/techfab/department/cargo - -/obj/item/circuitboard/machine/techfab/department/engineering - name = "\improper Departmental Techfab (Machine Board) - Engineering" - build_path = /obj/machinery/rnd/production/techfab/department/engineering - -/obj/item/circuitboard/machine/techfab/department/medical - name = "\improper Departmental Techfab (Machine Board) - Medical" - build_path = /obj/machinery/rnd/production/techfab/department/medical - -/obj/item/circuitboard/machine/techfab/department/science - name = "\improper Departmental Techfab (Machine Board) - Science" - build_path = /obj/machinery/rnd/production/techfab/department/science - -/obj/item/circuitboard/machine/techfab/department/security - name = "\improper Departmental Techfab (Machine Board) - Security" - build_path = /obj/machinery/rnd/production/techfab/department/security - -/obj/item/circuitboard/machine/techfab/department/service - name = "\improper Departmental Techfab - Service (Machine Board)" - build_path = /obj/machinery/rnd/production/techfab/department/service + /obj/item/stack/cable_coil = 1) + def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial) /obj/item/circuitboard/machine/rdserver name = "R&D Server (Machine Board)" + icon_state = "science" build_path = /obj/machinery/rnd/server req_components = list( /obj/item/stack/cable_coil = 2, /obj/item/stock_parts/scanning_module = 1) -/obj/item/circuitboard/machine/bsa/back - name = "Bluespace Artillery Generator (Machine Board)" - build_path = /obj/machinery/bsa/back //No freebies! - req_components = list( - /obj/item/stock_parts/capacitor/quadratic = 5, - /obj/item/stack/cable_coil = 2) +/obj/item/circuitboard/machine/techfab/department/science + name = "\improper Departmental Techfab (Machine Board) - Science" + icon_state = "science" + build_path = /obj/machinery/rnd/production/techfab/department/science -/obj/item/circuitboard/machine/bsa/middle - name = "Bluespace Artillery Fusor (Machine Board)" - build_path = /obj/machinery/bsa/middle +/obj/item/circuitboard/machine/teleporter_hub + name = "Teleporter Hub (Machine Board)" + icon_state = "science" + build_path = /obj/machinery/teleport/hub req_components = list( - /obj/item/stack/ore/bluespace_crystal = 20, - /obj/item/stack/cable_coil = 2) + /obj/item/stack/ore/bluespace_crystal = 3, + /obj/item/stock_parts/matter_bin = 1) + def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial) -/obj/item/circuitboard/machine/bsa/front - name = "Bluespace Artillery Bore (Machine Board)" - build_path = /obj/machinery/bsa/front +/obj/item/circuitboard/machine/teleporter_station + name = "Teleporter Station (Machine Board)" + icon_state = "science" + build_path = /obj/machinery/teleport/station req_components = list( - /obj/item/stock_parts/manipulator/femto = 5, - /obj/item/stack/cable_coil = 2) + /obj/item/stack/ore/bluespace_crystal = 2, + /obj/item/stock_parts/capacitor = 2, + /obj/item/stack/sheet/glass = 1) + def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial) -/obj/item/circuitboard/machine/dna_vault - name = "DNA Vault (Machine Board)" - build_path = /obj/machinery/dna_vault //No freebies! +/obj/item/circuitboard/machine/dnascanner + name = "DNA Scanner (Machine Board)" + icon_state = "science" + build_path = /obj/machinery/dna_scannernew req_components = list( - /obj/item/stock_parts/capacitor/super = 5, - /obj/item/stock_parts/manipulator/pico = 5, - /obj/item/stack/cable_coil = 2) - -/obj/item/circuitboard/machine/microwave - name = "Microwave (Machine Board)" - build_path = /obj/machinery/microwave - req_components = list( - /obj/item/stock_parts/micro_laser = 1, + /obj/item/stock_parts/scanning_module = 1, /obj/item/stock_parts/matter_bin = 1, - /obj/item/stack/cable_coil = 2, - /obj/item/stack/sheet/glass = 2) + /obj/item/stock_parts/micro_laser = 1, + /obj/item/stack/sheet/glass = 1, + /obj/item/stack/cable_coil = 2) + +/obj/item/circuitboard/machine/mechpad + name = "Mecha Orbital Pad (Machine Board)" + icon_state = "science" + build_path = /obj/machinery/mechpad + req_components = list() + +//Security + +/obj/item/circuitboard/machine/protolathe/department/security + name = "Departmental Protolathe (Machine Board) - Security" + icon_state = "security" + build_path = /obj/machinery/rnd/production/protolathe/department/security + +/obj/item/circuitboard/machine/recharger + name = "Weapon Recharger (Machine Board)" + icon_state = "security" + build_path = /obj/machinery/recharger + req_components = list(/obj/item/stock_parts/capacitor = 1) needs_anchored = FALSE -/obj/item/circuitboard/machine/vending/donksofttoyvendor - name = "Donksoft Toy Vendor (Machine Board)" - build_path = /obj/machinery/vending/donksofttoyvendor - req_components = list( - /obj/item/stack/sheet/glass = 1, - /obj/item/vending_refill/donksoft = 1) +/obj/item/circuitboard/machine/techfab/department/security + name = "\improper Departmental Techfab (Machine Board) - Security" + icon_state = "security" + build_path = /obj/machinery/rnd/production/techfab/department/security -/obj/item/circuitboard/machine/vending/syndicatedonksofttoyvendor - name = "Syndicate Donksoft Toy Vendor (Machine Board)" - build_path = /obj/machinery/vending/toyliberationstation +//Service + +/obj/item/circuitboard/machine/biogenerator + name = "Biogenerator (Machine Board)" + icon_state = "service" + build_path = /obj/machinery/biogenerator req_components = list( + /obj/item/stock_parts/matter_bin = 1, + /obj/item/stock_parts/manipulator = 1, + /obj/item/stack/cable_coil = 1, + /obj/item/stack/sheet/glass = 1) + +/obj/item/circuitboard/machine/plantgenes + name = "Plant DNA Manipulator (Machine Board)" + icon_state = "service" + build_path = /obj/machinery/plantgenes + req_components = list( + /obj/item/stock_parts/manipulator = 1, + /obj/item/stock_parts/micro_laser = 1, /obj/item/stack/sheet/glass = 1, - /obj/item/vending_refill/donksoft = 1) + /obj/item/stock_parts/scanning_module = 1) + +/obj/item/circuitboard/machine/plantgenes/vault + name = "alien board (Plant DNA Manipulator)" + icon_state = "abductor_mod" + // It wasn't made by actual abductors race, so no abductor tech here. + def_components = list( + /obj/item/stock_parts/manipulator = /obj/item/stock_parts/manipulator/femto, + /obj/item/stock_parts/micro_laser = /obj/item/stock_parts/micro_laser/quadultra, + /obj/item/stock_parts/scanning_module = /obj/item/stock_parts/scanning_module/triphasic) + +/obj/item/circuitboard/machine/chem_dispenser/drinks + name = "Soda Dispenser (Machine Board)" + icon_state = "service" + build_path = /obj/machinery/chem_dispenser/drinks + +/obj/item/circuitboard/machine/chem_dispenser/drinks/beer + name = "Booze Dispenser (Machine Board)" + icon_state = "service" + build_path = /obj/machinery/chem_dispenser/drinks/beer + +/obj/item/circuitboard/machine/chem_master/condi + name = "CondiMaster 3000 (Machine Board)" + icon_state = "service" + build_path = /obj/machinery/chem_master/condimaster + +/obj/item/circuitboard/machine/deep_fryer + name = "circuit board (Deep Fryer)" + icon_state = "service" + build_path = /obj/machinery/deepfryer + req_components = list(/obj/item/stock_parts/micro_laser = 1) + needs_anchored = FALSE +/obj/item/circuitboard/machine/griddle + name = "circuit board (Griddle)" + icon_state = "service" + build_path = /obj/machinery/griddle + req_components = list(/obj/item/stock_parts/micro_laser = 1) + needs_anchored = FALSE /obj/item/circuitboard/machine/dish_drive name = "Dish Drive (Machine Board)" + icon_state = "service" build_path = /obj/machinery/dish_drive req_components = list( /obj/item/stack/sheet/glass = 1, @@ -1052,73 +1102,191 @@ to_chat(user, "You [suction ? "enable" : "disable"] the board's suction function.") /obj/item/circuitboard/machine/dish_drive/AltClick(mob/living/user) - . = ..() if(!user.Adjacent(src)) return transmit = !transmit to_chat(user, "You [transmit ? "enable" : "disable"] the board's automatic disposal transmission.") - return TRUE -/obj/item/circuitboard/machine/stacking_unit_console - name = "Stacking Machine Console (Machine Board)" - build_path = /obj/machinery/mineral/stacking_unit_console +/obj/item/circuitboard/machine/gibber + name = "Gibber (Machine Board)" + icon_state = "service" + build_path = /obj/machinery/gibber req_components = list( - /obj/item/stack/sheet/glass = 2, - /obj/item/stack/cable_coil = 5) + /obj/item/stock_parts/matter_bin = 1, + /obj/item/stock_parts/manipulator = 1) + needs_anchored = FALSE + +/obj/item/circuitboard/machine/hydroponics + name = "Hydroponics Tray (Machine Board)" + icon_state = "service" + build_path = /obj/machinery/hydroponics/constructable + req_components = list( + /obj/item/stock_parts/matter_bin = 2, + /obj/item/stock_parts/manipulator = 1, + /obj/item/stack/sheet/glass = 1) + needs_anchored = FALSE + +/obj/item/circuitboard/machine/microwave + name = "Microwave (Machine Board)" + icon_state = "service" + build_path = /obj/machinery/microwave + req_components = list( + /obj/item/stock_parts/micro_laser = 1, + /obj/item/stock_parts/matter_bin = 1, + /obj/item/stack/cable_coil = 2, + /obj/item/stack/sheet/glass = 2) + needs_anchored = FALSE + +/obj/item/circuitboard/machine/processor + name = "Food Processor (Machine Board)" + icon_state = "service" + build_path = /obj/machinery/processor + req_components = list( + /obj/item/stock_parts/matter_bin = 1, + /obj/item/stock_parts/manipulator = 1) + needs_anchored = FALSE + +/obj/item/circuitboard/machine/processor/attackby(obj/item/I, mob/user, params) + if(I.tool_behaviour == TOOL_SCREWDRIVER) + if(build_path == /obj/machinery/processor) + name = "Slime Processor (Machine Board)" + build_path = /obj/machinery/processor/slime + to_chat(user, "Name protocols successfully updated.") + else + name = "Food Processor (Machine Board)" + build_path = /obj/machinery/processor + to_chat(user, "Defaulting name protocols.") + else + return ..() + +/obj/item/circuitboard/machine/protolathe/department/service + name = "Departmental Protolathe - Service (Machine Board)" + icon_state = "service" + build_path = /obj/machinery/rnd/production/protolathe/department/service + +/obj/item/circuitboard/machine/recycler + name = "Recycler (Machine Board)" + icon_state = "service" + build_path = /obj/machinery/recycler + req_components = list( + /obj/item/stock_parts/matter_bin = 1, + /obj/item/stock_parts/manipulator = 1) + needs_anchored = FALSE + +/obj/item/circuitboard/machine/seed_extractor + name = "Seed Extractor (Machine Board)" + icon_state = "service" + build_path = /obj/machinery/seed_extractor + req_components = list( + /obj/item/stock_parts/matter_bin = 1, + /obj/item/stock_parts/manipulator = 1) + needs_anchored = FALSE + +/obj/item/circuitboard/machine/techfab/department/service + name = "\improper Departmental Techfab - Service (Machine Board)" + icon_state = "service" + build_path = /obj/machinery/rnd/production/techfab/department/service + +/obj/item/circuitboard/machine/vendatray + name = "Vend-A-Tray (Machine Board)" + icon_state = "service" + build_path = /obj/structure/displaycase/forsale + req_components = list( + /obj/item/stock_parts/card_reader = 1) + +//Supply + +/obj/item/circuitboard/machine/mining_equipment_vendor + name = "Mining Equipment Vendor (Machine Board)" + icon_state = "supply" + build_path = /obj/machinery/mineral/equipment_vendor + req_components = list( + /obj/item/stack/sheet/glass = 1, + /obj/item/stock_parts/matter_bin = 3) + +/obj/item/circuitboard/machine/mining_equipment_vendor/golem + name = "Golem Ship Equipment Vendor (Machine Board)" + build_path = /obj/machinery/mineral/equipment_vendor/golem + +/obj/item/circuitboard/machine/ore_redemption + name = "Ore Redemption (Machine Board)" + icon_state = "supply" + build_path = /obj/machinery/mineral/ore_redemption + req_components = list( + /obj/item/stack/sheet/glass = 1, + /obj/item/stock_parts/matter_bin = 1, + /obj/item/stock_parts/micro_laser = 1, + /obj/item/stock_parts/manipulator = 1, + /obj/item/assembly/igniter = 1) + needs_anchored = FALSE + +/obj/item/circuitboard/machine/ore_silo + name = "Ore Silo (Machine Board)" + icon_state = "supply" + build_path = /obj/machinery/ore_silo + req_components = list() + +/obj/item/circuitboard/machine/protolathe/department/cargo + name = "Departmental Protolathe (Machine Board) - Cargo" + icon_state = "supply" + build_path = /obj/machinery/rnd/production/protolathe/department/cargo /obj/item/circuitboard/machine/stacking_machine name = "Stacking Machine (Machine Board)" + icon_state = "supply" build_path = /obj/machinery/mineral/stacking_machine req_components = list( /obj/item/stock_parts/manipulator = 2, /obj/item/stock_parts/matter_bin = 2) -/obj/item/circuitboard/machine/generator - name = "Thermo-Electric Generator (Machine Board)" - build_path = /obj/machinery/power/generator - req_components = list() - -/obj/item/circuitboard/machine/circulator - name = "Circulator/Heat Exchanger (Machine Board)" - build_path = /obj/machinery/atmospherics/components/binary/circulator - req_components = list() - -/obj/item/circuitboard/machine/harvester - name = "Harvester (Machine Board)" - build_path = /obj/machinery/harvester - req_components = list(/obj/item/stock_parts/micro_laser = 4) - -/obj/item/circuitboard/machine/ore_silo - name = "Ore Silo (Machine Board)" - build_path = /obj/machinery/ore_silo - req_components = list() - -/obj/item/circuitboard/machine/paystand - name = "Pay Stand (Machine Board)" - build_path = /obj/machinery/paystand - req_components = list() - -/obj/item/circuitboard/machine/autobottler - name = "Auto-Bottler (Machine Board)" - build_path = /obj/machinery/rnd/production/protolathe/department/autobottler //Manips make you print things cheaper, even chems - req_components = list(/obj/item/stock_parts/matter_bin = 5, - /obj/item/stack/sheet/glass = 2, - /obj/item/stock_parts/capacitor = 1, - /obj/item/stack/cable_coil = 5, - /obj/item/reagent_containers/glass/beaker = 6) //So it can hold lots of chems - -/obj/item/circuitboard/machine/kinkmate - name = "Kinkmate Vendor (Machine Board)" - build_path = /obj/machinery/vending/kink - req_components = list(/obj/item/vending_refill/kink = 1) - -/obj/item/circuitboard/machine/autolathe/toy - name = "Autoylathe (Machine Board)" - build_path = /obj/machinery/autolathe/toy +/obj/item/circuitboard/machine/stacking_unit_console + name = "Stacking Machine Console (Machine Board)" + icon_state = "supply" + build_path = /obj/machinery/mineral/stacking_unit_console req_components = list( - /obj/item/stock_parts/matter_bin = 3, + /obj/item/stack/sheet/glass = 2, + /obj/item/stack/cable_coil = 5) + +/obj/item/circuitboard/machine/techfab/department/cargo + name = "\impropfierer Departmental Techfab (Machine Board) - Cargo" + icon_state = "supply" + build_path = /obj/machinery/rnd/production/techfab/department/cargo + +/obj/item/circuitboard/machine/bepis + name = "BEPIS Chamber (Machine Board)" + icon_state = "supply" + build_path = /obj/machinery/rnd/bepis + req_components = list( + /obj/item/stack/cable_coil = 5, + /obj/item/stock_parts/capacitor = 1, /obj/item/stock_parts/manipulator = 1, - /obj/item/stack/sheet/glass = 1) + /obj/item/stock_parts/micro_laser = 1, + /obj/item/stock_parts/scanning_module = 1) + +//Misc +/obj/item/circuitboard/machine/sheetifier + name = "Sheet-meister 2000 (Machine Board)" + icon_state = "supply" + build_path = /obj/machinery/sheetifier + req_components = list( + /obj/item/stock_parts/manipulator = 2, + /obj/item/stock_parts/matter_bin = 2) + needs_anchored = FALSE + +/obj/item/circuitboard/machine/abductor + name = "alien board (Report This)" + icon_state = "abductor_mod" + +/obj/item/circuitboard/machine/abductor/core + name = "alien board (Void Core)" + build_path = /obj/machinery/power/rtg/abductor + req_components = list( + /obj/item/stock_parts/capacitor = 1, + /obj/item/stock_parts/micro_laser = 1, + /obj/item/stock_parts/cell/infinite/abductor = 1) + def_components = list( + /obj/item/stock_parts/capacitor = /obj/item/stock_parts/capacitor/quadratic, + /obj/item/stock_parts/micro_laser = /obj/item/stock_parts/micro_laser/quadultra) /obj/item/circuitboard/machine/hypnochair name = "Enhanced Interrogation Chamber (Machine Board)" @@ -1129,13 +1297,35 @@ /obj/item/stock_parts/scanning_module = 2 ) +/obj/item/circuitboard/machine/plumbing_receiver + name = "Chemical Recipient (Machine Board)" + icon_state = "medical" + build_path = /obj/machinery/plumbing/receiver + req_components = list( + /obj/item/stack/ore/bluespace_crystal = 1, + /obj/item/stock_parts/capacitor = 2, + /obj/item/stack/sheet/glass = 1) + def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial) + needs_anchored = FALSE + +// /obj/item/circuitboard/machine/skill_station +// name = "Skill Station (Machine Board)" +// build_path = /obj/machinery/skill_station +// req_components = list( +// /obj/item/stock_parts/matter_bin = 2, +// /obj/item/stock_parts/micro_laser = 2, +// /obj/item/stock_parts/scanning_module = 2 +// ) +// DIY SHUTTLE /obj/item/circuitboard/machine/shuttle/engine name = "Thruster (Machine Board)" + icon_state = "engineering" build_path = /obj/machinery/shuttle/engine req_components = list() /obj/item/circuitboard/machine/shuttle/engine/plasma name = "Plasma Thruster (Machine Board)" + icon_state = "engineering" build_path = /obj/machinery/shuttle/engine/plasma req_components = list(/obj/item/stock_parts/capacitor = 2, /obj/item/stack/cable_coil = 5, @@ -1143,6 +1333,7 @@ /obj/item/circuitboard/machine/shuttle/engine/void name = "Void Thruster (Machine Board)" + icon_state = "engineering" build_path = /obj/machinery/shuttle/engine/void req_components = list(/obj/item/stock_parts/capacitor/quadratic = 2, /obj/item/stack/cable_coil = 5, @@ -1150,11 +1341,13 @@ /obj/item/circuitboard/machine/shuttle/heater name = "Electronic Engine Heater (Machine Board)" + icon_state = "engineering" build_path = /obj/machinery/atmospherics/components/unary/shuttle/heater req_components = list(/obj/item/stock_parts/micro_laser = 2, /obj/item/stock_parts/matter_bin = 1) /obj/item/circuitboard/machine/explosive_compressor name = "Explosive Compressor (Machine Board)" + icon_state = "engineering" build_path = /obj/machinery/research/explosive_compressor req_components = list(/obj/item/stock_parts/matter_bin = 3) diff --git a/code/game/objects/items/storage/boxes.dm b/code/game/objects/items/storage/boxes.dm index 3f9c3a019e..ea40b49c5f 100644 --- a/code/game/objects/items/storage/boxes.dm +++ b/code/game/objects/items/storage/boxes.dm @@ -1143,9 +1143,9 @@ desc = "A box containing a gift for worthy golems." /obj/item/storage/box/rndboards/PopulateContents() - new /obj/item/circuitboard/machine/protolathe/offstation(src) + new /obj/item/circuitboard/machine/protolathe(src) new /obj/item/circuitboard/machine/destructive_analyzer(src) - new /obj/item/circuitboard/machine/circuit_imprinter/offstation(src) + new /obj/item/circuitboard/machine/circuit_imprinter(src) new /obj/item/circuitboard/computer/rdconsole(src) /obj/item/storage/box/silver_sulf diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 45d05c70b9..efcd529ddd 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -605,21 +605,49 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) msg2 = replacetext(replacetext(msg2, "\proper", ""), "\improper", "") world.TgsTargetedChatBroadcast("[msg] | [msg2]", TRUE) -/proc/send2otherserver(source,msg,type = "Ahelp") - var/comms_key = CONFIG_GET(string/comms_key) - if(!comms_key) +/** + * Sends a message to a set of cross-communications-enabled servers using world topic calls + * + * Arguments: + * * source - Who sent this message + * * msg - The message body + * * type - The type of message, becomes the topic command under the hood + * * target_servers - A collection of servers to send the message to, defined in config + * * additional_data - An (optional) associated list of extra parameters and data to send with this world topic call + */ +/proc/send2otherserver(source, msg, type = "Ahelp", target_servers, list/additional_data = list()) + if(!CONFIG_GET(string/comms_key)) + debug_world_log("Server cross-comms message not sent for lack of configured key") return - var/list/message = list() - message["message_sender"] = source - message["message"] = msg - message["source"] = "([CONFIG_GET(string/cross_comms_name)])" - message["key"] = comms_key - message += type + + var/our_id = CONFIG_GET(string/cross_comms_name) + additional_data["message_sender"] = source + additional_data["message"] = msg + additional_data["source"] = "([our_id])" + additional_data += type var/list/servers = CONFIG_GET(keyed_list/cross_server) for(var/I in servers) - world.Export("[servers[I]]?[list2params(message)]") + if(I == our_id) //No sending to ourselves + continue + if(target_servers && !(I in target_servers)) + continue + world.send_cross_comms(I, additional_data) +/// Sends a message to a given cross comms server by name (by name for security). +/world/proc/send_cross_comms(server_name, list/message, auth = TRUE) + set waitfor = FALSE + if (auth) + var/comms_key = CONFIG_GET(string/comms_key) + if(!comms_key) + debug_world_log("Server cross-comms message not sent for lack of configured key") + return + message["key"] = comms_key + var/list/servers = CONFIG_GET(keyed_list/cross_server) + var/server_url = servers[server_name] + if (!server_url) + CRASH("Invalid cross comms config: [server_name]") + world.Export("[server_url]?[list2params(message)]") /proc/ircadminwho() var/list/message = list("Admins: ") diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index e532dcc2b2..873007a2a5 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -3,7 +3,7 @@ set name = "Pray" if(GLOB.say_disabled) //This is here to try to identify lag problems - to_chat(usr, "Speech is currently admin-disabled.") + to_chat(usr, "Speech is currently admin-disabled.", confidential = TRUE) return msg = copytext_char(sanitize(msg), 1, MAX_MESSAGE_LEN) @@ -12,7 +12,7 @@ log_prayer("[src.key]/([src.name]): [msg]") if(usr.client) if(usr.client.prefs.muted & MUTE_PRAY) - to_chat(usr, "You cannot pray (muted).") + to_chat(usr, "You cannot pray (muted).", confidential = TRUE) return if(src.client.handle_spam_prevention(msg,MUTE_PRAY)) return @@ -44,34 +44,35 @@ for(var/client/C in GLOB.admins) if(C.prefs.chat_toggles & CHAT_PRAYER) - to_chat(C, msg) + to_chat(C, msg, confidential = TRUE) if(C.prefs.toggles & SOUND_PRAYERS) if(usr.job == "Chaplain") SEND_SOUND(C, sound('sound/effects/pray.ogg')) - else - SEND_SOUND(C, sound('sound/effects/ding.ogg')) - to_chat(usr, "You pray to the gods: \"[msg_tmp]\"") + to_chat(usr, "You pray to the gods: \"[msg_tmp]\"", confidential = TRUE) SSblackbox.record_feedback("tally", "admin_verb", 1, "Prayer") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! //log_admin("HELP: [key_name(src)]: [msg]") -/proc/CentCom_announce(text , mob/Sender) +/// Used by communications consoles to message CentCom +/proc/message_centcom(text, mob/sender) var/msg = copytext_char(sanitize(text), 1, MAX_MESSAGE_LEN) - msg = "CENTCOM:[ADMIN_FULLMONTY(Sender)] [ADMIN_CENTCOM_REPLY(Sender)]: [msg]" - to_chat(GLOB.admins, msg) - for(var/obj/machinery/computer/communications/C in GLOB.machines) - C.overrideCooldown() + msg = "CENTCOM:[ADMIN_FULLMONTY(sender)] [ADMIN_CENTCOM_REPLY(sender)]: [msg]" + to_chat(GLOB.admins, msg, confidential = TRUE) + for(var/obj/machinery/computer/communications/console in GLOB.machines) + console.override_cooldown() -/proc/Syndicate_announce(text , mob/Sender) +/// Used by communications consoles to message the Syndicate +/proc/message_syndicate(text, mob/sender) var/msg = copytext_char(sanitize(text), 1, MAX_MESSAGE_LEN) - msg = "SYNDICATE:[ADMIN_FULLMONTY(Sender)] [ADMIN_SYNDICATE_REPLY(Sender)]: [msg]" - to_chat(GLOB.admins, msg) - for(var/obj/machinery/computer/communications/C in GLOB.machines) - C.overrideCooldown() + msg = "SYNDICATE:[ADMIN_FULLMONTY(sender)] [ADMIN_SYNDICATE_REPLY(sender)]: [msg]" + to_chat(GLOB.admins, msg, confidential = TRUE) + for(var/obj/machinery/computer/communications/console in GLOB.machines) + console.override_cooldown() -/proc/Nuke_request(text , mob/Sender) +/// Used by communications consoles to request the nuclear launch codes +/proc/nuke_request(text, mob/sender) var/msg = copytext_char(sanitize(text), 1, MAX_MESSAGE_LEN) - msg = "NUKE CODE REQUEST:[ADMIN_FULLMONTY(Sender)] [ADMIN_CENTCOM_REPLY(Sender)] [ADMIN_SET_SD_CODE]: [msg]" - to_chat(GLOB.admins, msg) - for(var/obj/machinery/computer/communications/C in GLOB.machines) - C.overrideCooldown() + msg = "NUKE CODE REQUEST:[ADMIN_FULLMONTY(sender)] [ADMIN_CENTCOM_REPLY(sender)] [ADMIN_SET_SD_CODE]: [msg]" + to_chat(GLOB.admins, msg, confidential = TRUE) + for(var/obj/machinery/computer/communications/console in GLOB.machines) + console.override_cooldown() diff --git a/code/modules/cargo/console.dm b/code/modules/cargo/console.dm index 5a976b0abb..52f3a44831 100644 --- a/code/modules/cargo/console.dm +++ b/code/modules/cargo/console.dm @@ -3,8 +3,14 @@ desc = "Used to order supplies, approve requests, and control the shuttle." icon_screen = "supply" circuit = /obj/item/circuitboard/computer/cargo + light_color = "#E2853D"//orange + ///Can the supply console send the shuttle back and forth? Used in the UI backend. + var/can_send = TRUE + ///Can this console only send requests? var/requestonly = FALSE + ///Can you approve requests placed for cargo? Works differently between the app and the computer. + var/can_approve_requests = TRUE var/contraband = FALSE var/self_paid = FALSE var/safety_warning = "For safety reasons, the automated supply shuttle \ @@ -16,25 +22,21 @@ /// var that tracks message cooldown var/message_cooldown var/list/loaded_coupons - - light_color = "#E2853D"//orange + /// var that makes express console use rockets + var/is_express = FALSE /obj/machinery/computer/cargo/request name = "supply request console" desc = "Used to request supplies from cargo." icon_screen = "request" circuit = /obj/item/circuitboard/computer/cargo/request + can_send = FALSE + can_approve_requests = FALSE requestonly = TRUE /obj/machinery/computer/cargo/Initialize() . = ..() radio = new /obj/item/radio/headset/headset_cargo(src) - var/obj/item/circuitboard/computer/cargo/board = circuit - contraband = board.contraband - if (board.obj_flags & EMAGGED) - obj_flags |= EMAGGED - else - obj_flags &= ~EMAGGED /obj/machinery/computer/cargo/Destroy() QDEL_NULL(radio) @@ -64,6 +66,10 @@ board.obj_flags |= EMAGGED update_static_data(user) +/obj/machinery/computer/cargo/on_construction() + . = ..() + circuit.configure_machine(src) + /obj/machinery/computer/cargo/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) if(!ui) @@ -81,6 +87,8 @@ data["docked"] = SSshuttle.supply.mode == SHUTTLE_IDLE data["loan"] = !!SSshuttle.shuttle_loan data["loan_dispatched"] = SSshuttle.shuttle_loan && SSshuttle.shuttle_loan.dispatched + data["can_send"] = can_send + data["can_approve_requests"] = can_approve_requests var/message = "Remember to stamp and send back the supply manifests." if(SSshuttle.centcom_message) message = SSshuttle.centcom_message @@ -128,14 +136,15 @@ "id" = pack, "desc" = P.desc || P.name, // If there is a description, use it. Otherwise use the pack's name. "goody" = P.goody, - "private_goody" = P.goody == PACK_GOODY_PRIVATE, "access" = P.access, + "private_goody" = P.goody == PACK_GOODY_PRIVATE, "can_private_buy" = P.can_private_buy )) return data /obj/machinery/computer/cargo/ui_act(action, params, datum/tgui/ui) - if(..()) + . = ..() + if(.) return switch(action) if("send") @@ -172,6 +181,8 @@ log_game("[key_name(usr)] accepted a shuttle loan event.") . = TRUE if("add") + if(is_express) + return var/id = text2path(params["id"]) var/datum/supply_pack/pack = SSshuttle.supply_packs[id] if(!istype(pack)) @@ -195,9 +206,9 @@ rank = "Silicon" var/datum/bank_account/account - if(self_paid && ishuman(usr)) - var/mob/living/carbon/human/H = usr - var/obj/item/card/id/id_card = H.get_idcard(TRUE) + if(self_paid && isliving(usr)) + var/mob/living/L = usr + var/obj/item/card/id/id_card = L.get_idcard(TRUE) if(!istype(id_card)) say("No ID card detected.") return diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 503a7cfc3a..1865ce1318 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -968,7 +968,7 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( var/mob/living/M = mob M.update_damage_hud() if (prefs.auto_fit_viewport) - fit_viewport() + addtimer(CALLBACK(src,.verb/fit_viewport,10)) //Delayed to avoid wingets from Login calls. SEND_SIGNAL(mob, COMSIG_MOB_CLIENT_CHANGE_VIEW, src, old_view, actualview) /client/proc/generate_clickcatcher() diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 7cc8be800c..22eaa3aef2 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -62,9 +62,15 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/UI_style = null var/buttons_locked = FALSE var/hotkeys = FALSE + + ///Runechat preference. If true, certain messages will be displayed on the map, not ust on the chat area. Boolean. var/chat_on_map = TRUE + ///Limit preference on the size of the message. Requires chat_on_map to have effect. var/max_chat_length = CHAT_MESSAGE_MAX_LENGTH + ///Whether non-mob messages will be displayed, such as machine vendor announcements. Requires chat_on_map to have effect. Boolean. var/see_chat_non_mob = TRUE + ///Whether emotes will be displayed on runechat. Requires chat_on_map to have effect. Boolean. + var/see_rc_emotes = TRUE /// Custom Keybindings var/list/key_bindings = list() @@ -160,13 +166,13 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/auto_fit_viewport = FALSE ///Should we be in the widescreen mode set by the config? var/widescreenpref = TRUE - ///What size should pixels be displayed as? 0 is strech to fit var/pixel_size = 0 ///What scaling method should we use? var/scaling_method = "normal" - var/uplink_spawn_loc = UPLINK_PDA + ///The playtime_reward_cloak variable can be set to TRUE from the prefs menu only once the user has gained over 5K playtime hours. If true, it allows the user to get a cool looking roundstart cloak. + var/playtime_reward_cloak = FALSE var/hud_toggle_flash = TRUE var/hud_toggle_color = "#ffffff" @@ -209,8 +215,17 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/autostand = TRUE var/auto_ooc = FALSE + ///This var stores the amount of points the owner will get for making it out alive. + var/hardcore_survival_score = 0 + + ///Someone thought we were nice! We get a little heart in OOC until we join the server past the below time (we can keep it until the end of the round otherwise) + var/hearted + ///If we have a hearted commendations, we honor it every time the player loads preferences until this time has been passed + var/hearted_until /// If we have persistent scars enabled var/persistent_scars = TRUE + ///If we want to broadcast deadchat connect/disconnect messages + var/broadcast_login_logout = TRUE /// We have 5 slots for persistent scars, if enabled we pick a random one to load (empty by default) and scars at the end of the shift if we survived as our original person var/list/scars_list = list("1" = "", "2" = "", "3" = "", "4" = "", "5" = "") /// Which of the 5 persistent scar slots we randomly roll to load for this round, if enabled. Actually rolled in [/datum/preferences/proc/load_character(slot)] diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 35fa40e15d..7fc8a4f1d5 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -13,6 +13,7 @@ active_power_usage = 100 circuit = /obj/item/circuitboard/machine/smartfridge + var/base_build_path = /obj/machinery/smartfridge ///What path boards used to construct it should build into when dropped. Needed so we don't accidentally have them build variants with items preloaded in them. var/max_n_of_items = 1500 var/allow_ai_retrieve = FALSE var/list/initial_contents @@ -43,7 +44,7 @@ SSvis_overlays.remove_vis_overlay(src, managed_vis_overlays) if(!stat) SSvis_overlays.add_vis_overlay(src, icon, "smartfridge-light-mask", EMISSIVE_LAYER, EMISSIVE_PLANE, dir, alpha) - if(visible_contents) + if (visible_contents) switch(contents.len) if(0) icon_state = "[initial(icon_state)]" @@ -111,10 +112,10 @@ if(loaded) if(contents.len >= max_n_of_items) user.visible_message("[user] loads \the [src] with \the [O].", \ - "You fill \the [src] with \the [O].") + "You fill \the [src] with \the [O].") else user.visible_message("[user] loads \the [src] with \the [O].", \ - "You load \the [src] with \the [O].") + "You load \the [src] with \the [O].") if(O.contents.len > 0) to_chat(user, "Some items are refused.") if (visible_contents) @@ -172,6 +173,10 @@ var/listofitems = list() for (var/I in src) + // We do not vend our own components. + if(I in component_parts) + continue + var/atom/movable/O = I if (!QDELETED(O)) var/md5name = md5(O.name) // This needs to happen because of a bug in a TGUI component, https://github.com/ractivejs/ractive/issues/744 @@ -212,6 +217,8 @@ if(desired == 1 && Adjacent(usr) && !issilicon(usr)) for(var/obj/item/O in src) if(O.name == params["name"]) + if(O in component_parts) + CRASH("Attempted removal of [O] component_part from vending machine via vending interface.") dispense(O, usr) break if (visible_contents) @@ -222,6 +229,8 @@ if(desired <= 0) break if(O.name == params["name"]) + if(O in component_parts) + CRASH("Attempted removal of [O] component_part from vending machine via vending interface.") dispense(O, usr) desired-- if (visible_contents) @@ -242,13 +251,21 @@ idle_power_usage = 5 active_power_usage = 200 visible_contents = FALSE + base_build_path = /obj/machinery/smartfridge/drying_rack //should really be seeing this without admin fuckery. var/drying = FALSE /obj/machinery/smartfridge/drying_rack/Initialize() . = ..() - if(component_parts && component_parts.len) - component_parts.Cut() + + // Cache the old_parts first, we'll delete it after we've changed component_parts to a new list. + // This stops handle_atom_del being called on every part when not necessary. + var/list/old_parts = component_parts.Copy() + component_parts = null + circuit = null + + QDEL_LIST(old_parts) + RefreshParts() /obj/machinery/smartfridge/drying_rack/on_deconstruction() new /obj/item/stack/sheet/mineral/wood(drop_location(), 10) @@ -280,25 +297,18 @@ return TRUE return FALSE -// /obj/machinery/smartfridge/drying_rack/powered() do we have this? no. -// if(!anchored) -// return FALSE -// return ..() +/obj/machinery/smartfridge/drying_rack/powered() + if(!anchored) + return FALSE + return ..() /obj/machinery/smartfridge/drying_rack/power_change() - if(powered() && anchored) - stat &= ~NOPOWER - else - stat |= NOPOWER + . = ..() + if(!powered()) toggle_drying(TRUE) - update_icon() - // . = ..() - // if(!powered()) - // toggle_drying(TRUE) - -/obj/machinery/smartfridge/drying_rack/load() //For updating the filled overlay - ..() +/obj/machinery/smartfridge/drying_rack/load(/obj/item/dried_object) //For updating the filled overlay + . = ..() update_icon() /obj/machinery/smartfridge/drying_rack/update_overlays() @@ -363,6 +373,7 @@ /obj/machinery/smartfridge/drinks name = "drink showcase" desc = "A refrigerated storage unit for tasty tasty alcohol." + base_build_path = /obj/machinery/smartfridge/drinks /obj/machinery/smartfridge/drinks/accept_check(obj/item/O) if(!istype(O, /obj/item/reagent_containers) || (O.item_flags & ABSTRACT) || !O.reagents || !O.reagents.reagent_list.len) @@ -375,6 +386,7 @@ // ---------------------------- /obj/machinery/smartfridge/food desc = "A refrigerated storage unit for food." + base_build_path = /obj/machinery/smartfridge/food /obj/machinery/smartfridge/food/accept_check(obj/item/O) if(istype(O, /obj/item/reagent_containers/food/snacks/)) @@ -387,6 +399,7 @@ /obj/machinery/smartfridge/extract name = "smart slime extract storage" desc = "A refrigerated storage unit for slime extracts." + base_build_path = /obj/machinery/smartfridge/extract /obj/machinery/smartfridge/extract/accept_check(obj/item/O) if(istype(O, /obj/item/slime_extract)) @@ -405,6 +418,7 @@ name = "smart organ storage" desc = "A refrigerated storage unit for organ storage." max_n_of_items = 20 //vastly lower to prevent processing too long + base_build_path = /obj/machinery/smartfridge/organ var/repair_rate = 0 /obj/machinery/smartfridge/organ/accept_check(obj/item/O) @@ -429,14 +443,14 @@ /obj/machinery/smartfridge/organ/RefreshParts() for(var/obj/item/stock_parts/matter_bin/B in component_parts) max_n_of_items = 20 * B.rating - repair_rate = max(0, STANDARD_ORGAN_HEALING * (B.rating - 1)) + repair_rate = max(0, STANDARD_ORGAN_HEALING * (B.rating - 1) * 0.5) -/obj/machinery/smartfridge/organ/process() +/obj/machinery/smartfridge/organ/process(delta_time) for(var/organ in contents) var/obj/item/organ/O = organ if(!istype(O)) return - O.applyOrganDamage(-repair_rate) + O.applyOrganDamage(-repair_rate * delta_time) /obj/machinery/smartfridge/organ/Exited(atom/movable/AM, atom/newLoc) . = ..() @@ -444,7 +458,9 @@ var/obj/item/organ/O = AM O.organ_flags &= ~ORGAN_FROZEN -/obj/machinery/smartfridge/organ/preloaded //cit specific?????? +//cit specific?????? +/obj/machinery/smartfridge/organ/preloaded + base_build_path = /obj/machinery/smartfridge/organ/preloaded initial_contents = list( /obj/item/reagent_containers/medspray/synthtissue = 1, /obj/item/reagent_containers/medspray/sterilizine = 1) @@ -461,6 +477,7 @@ /obj/machinery/smartfridge/chemistry name = "smart chemical storage" desc = "A refrigerated storage unit for medicine storage." + base_build_path = /obj/machinery/smartfridge/chemistry /obj/machinery/smartfridge/chemistry/accept_check(obj/item/O) var/static/list/chemfridge_typecache = typecacheof(list( @@ -502,6 +519,7 @@ /obj/machinery/smartfridge/chemistry/virology name = "smart virus storage" desc = "A refrigerated storage unit for volatile sample storage." + base_build_path = /obj/machinery/smartfridge/chemistry/virology /obj/machinery/smartfridge/chemistry/virology/preloaded initial_contents = list( @@ -523,6 +541,7 @@ icon_state = "disktoaster" pass_flags = PASSTABLE visible_contents = FALSE + base_build_path = /obj/machinery/smartfridge/disks /obj/machinery/smartfridge/disks/accept_check(obj/item/O) if(istype(O, /obj/item/disk/)) diff --git a/code/modules/mapping/map_template.dm b/code/modules/mapping/map_template.dm index 087552fada..cc3bfc201e 100644 --- a/code/modules/mapping/map_template.dm +++ b/code/modules/mapping/map_template.dm @@ -196,6 +196,9 @@ deleted_atoms++ log_world("Annihilated [deleted_atoms] objects.") +/datum/map_template/proc/post_load() + return + //for your ever biggening badminnery kevinz000 //❤ - Cyberboss /proc/load_new_z_level(file, name, orientation, list/ztraits) diff --git a/code/modules/mapping/verify.dm b/code/modules/mapping/verify.dm index 1f071aaec7..7fe07d3b9e 100644 --- a/code/modules/mapping/verify.dm +++ b/code/modules/mapping/verify.dm @@ -1,4 +1,4 @@ -/// An error report generated by [parsed_map/check_for_errors]. +/// An error report generated by [/datum/parsed_map/proc/check_for_errors]. /datum/map_report var/original_path var/list/bad_paths = list() diff --git a/code/modules/research/machinery/_production.dm b/code/modules/research/machinery/_production.dm index 5a50120833..072fa54c6f 100644 --- a/code/modules/research/machinery/_production.dm +++ b/code/modules/research/machinery/_production.dm @@ -3,7 +3,6 @@ desc = "Makes researched and prototype items with materials and energy." layer = BELOW_OBJ_LAYER var/consoleless_interface = TRUE //Whether it can be used without a console. - var/offstation_security_levels = TRUE var/print_cost_coeff = 1 //Materials needed * coeff = actual. var/list/categories = list() var/datum/component/remote_materials/materials @@ -19,7 +18,11 @@ var/screen = RESEARCH_FABRICATOR_SCREEN_MAIN var/selected_category + var/offstation_security_levels + /obj/machinery/rnd/production/Initialize(mapload) + if(mapload && offstation_security_levels) + log_mapping("Depricated var named \"offstation_security_levels\" at ([x], [y], [z])!") . = ..() create_reagents(0, OPENCONTAINER) matching_designs = list() diff --git a/code/modules/research/machinery/circuit_imprinter.dm b/code/modules/research/machinery/circuit_imprinter.dm index b80e96a1e9..c1c386cb31 100644 --- a/code/modules/research/machinery/circuit_imprinter.dm +++ b/code/modules/research/machinery/circuit_imprinter.dm @@ -22,12 +22,3 @@ /obj/machinery/rnd/production/circuit_imprinter/disconnect_console() linked_console.linked_imprinter = null ..() - -/obj/machinery/rnd/production/circuit_imprinter/calculate_efficiency() - . = ..() - var/obj/item/circuitboard/machine/circuit_imprinter/C = circuit - offstation_security_levels = C.offstation_security_levels - -/obj/machinery/rnd/production/circuit_imprinter/offstation - offstation_security_levels = FALSE - circuit = /obj/item/circuitboard/machine/circuit_imprinter/offstation diff --git a/code/modules/research/machinery/protolathe.dm b/code/modules/research/machinery/protolathe.dm index b1b31a279c..684f27ccad 100644 --- a/code/modules/research/machinery/protolathe.dm +++ b/code/modules/research/machinery/protolathe.dm @@ -23,12 +23,3 @@ /obj/machinery/rnd/production/protolathe/disconnect_console() linked_console.linked_lathe = null ..() - -/obj/machinery/rnd/production/protolathe/calculate_efficiency() - . = ..() - var/obj/item/circuitboard/machine/protolathe/C = circuit - offstation_security_levels = C.offstation_security_levels - -/obj/machinery/rnd/production/protolathe/offstation - offstation_security_levels = FALSE - circuit = /obj/item/circuitboard/machine/protolathe/offstation diff --git a/config/comms.txt b/config/comms.txt index 5a32f10fd3..ae336d484b 100644 --- a/config/comms.txt +++ b/config/comms.txt @@ -1,7 +1,7 @@ ## Communication key for receiving data through world/Topic(), you don't want to give this out #COMMS_KEY default_pwd -## World address and port for server recieving cross server messages +## World address and port for server receiving cross server messages ## Use '+' to denote spaces in ServerName ## Repeat this entry to add more servers #CROSS_SERVER ServerName byond:\\address:port @@ -9,9 +9,7 @@ ## Name that the server calls itself in communications #CROSS_COMMS_NAME -## Hub address for tracking stats -## example: Hubmakerckey.Hubname -#MEDAL_HUB_ADDRESS - -## Password for the hub page -#MEDAL_HUB_PASSWORD \ No newline at end of file +## Network-name used for cross-server broadcasts made from communication consoles. +## Servers that do not match this network-name will have their messages discarded. +## Leaving this commented will allow all messages through, regardless of network. +#CROSS_COMMS_NETWORK default_network diff --git a/tgui/packages/tgui/interfaces/Cargo.js b/tgui/packages/tgui/interfaces/Cargo.js index 9854e21833..584a6996fa 100644 --- a/tgui/packages/tgui/interfaces/Cargo.js +++ b/tgui/packages/tgui/interfaces/Cargo.js @@ -6,6 +6,19 @@ import { formatMoney } from '../format'; import { Window } from '../layouts'; export const Cargo = (props, context) => { + return ( + + + + + + ); +}; + +export const CargoContent = (props, context) => { const { act, data } = useBackend(context); const [tab, setTab] = useSharedState(context, 'tab', 'catalog'); const { @@ -14,53 +27,48 @@ export const Cargo = (props, context) => { const cart = data.cart || []; const requests = data.requests || []; return ( - - - -
- + + +
+ + setTab('catalog')}> + Catalog + + 0 + && 'yellow'} + selected={tab === 'requests'} + onClick={() => setTab('requests')}> + Requests ({requests.length}) + + {!requestonly && ( setTab('catalog')}> - Catalog - - 0 + icon="shopping-cart" + textColor={tab !== 'cart' + && cart.length > 0 && 'yellow'} - selected={tab === 'requests'} - onClick={() => setTab('requests')}> - Requests ({requests.length}) + selected={tab === 'cart'} + onClick={() => setTab('cart')}> + Checkout ({cart.length}) - {!requestonly && ( - 0 - && 'yellow'} - selected={tab === 'cart'} - onClick={() => setTab('cart')}> - Checkout ({cart.length}) - - )} - -
- {tab === 'catalog' && ( - - )} - {tab === 'requests' && ( - - )} - {tab === 'cart' && ( - - )} - - + )} +
+
+ {tab === 'catalog' && ( + + )} + {tab === 'requests' && ( + + )} + {tab === 'cart' && ( + + )} + ); }; @@ -75,6 +83,7 @@ const CargoStatus = (props, context) => { message, points, requestonly, + can_send, } = data; return (
{ )}> - {docked && !requestonly && ( + {docked && !requestonly && can_send &&(