Skip to content

Commit

Permalink
TGUI Mass Port (#634)
Browse files Browse the repository at this point in the history
* tgui: Borg tablets and RoboTact as a borg self-management app (#53373)

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* take one

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* part 2

* Automatic changelog compile [ci skip]

* part 3

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* part three I think

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* who even knows what step I'm on anymore

* and another one

* Automatic changelog compile [ci skip]

* PR time

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Forward Progress

* Automatic changelog compile [ci skip]

* Merge remote-tracking branch 'upstream/master' into SiliScreen

* more foward progress

* RoboTact

* bad tab

* Improvements all around

Plus some changes to vis_overlay to allow for color

* Lights and things

* borg network card

borg tablets lose networking when borg is locked or has no power

* hud changes

not done yet, but getting close

* better modPC screen button

* updoot

* more useful colors

* linter

* Do I finally get a green ✓

* better law sync catching

* hate linters

Co-authored-by: Changelogs <[email protected]>

* Fix tgui-chat linkifying IC text (#53533)

* Fixes canvas default window size. (#53585)

Lowered canvas dotsize to 24 so the max overall size now is 624x624

* tgui: Mass Driver Control (#53633)

This PR converts Mass Driver Control from a html based interface to tgui, with some tweaks and code cleanup. You can now set any mass driver power level you wish, instead of having to choose from a limited presets, although minimum and maximum limits are the same.

I also fixed one hard delete caused by mass drivers, as they did not clear their reference to their connected controls upon deletion. Lastly, with the help of Timberpoes I have introduced manual processing to this particular machine, so they are processing only when needed instead of all the time.

* tgui: Stack menu (#53657)

* Stack TGUI

* Improvements

* Cyborg sanity

* It's not confirmMessage, it's confirmContent (#53752)

* tgui: Interface improvements (#53902)

* Tgui improvements

* Shuttle Console tweaks

* Status color keys

* Rebuild tgui

Co-authored-by: Aleksej Komarov <[email protected]>

* Biogen dispenses botany chems in more user-friendly volumes. (#53959)

* Enforce preserving parent proc return values across ui_act call stacks (#53964)

All ui_act procs should call parent by default. All procs should preserve the value of the parent proc when it's TRUTHY and pass it down the call stack. No UI should be interactible when its flags or state indicate it should not be, except when explicity overriden by child procs intentionally disregarding parent return values to achieve a specific goal.

* updates our UIs

* NT Software Hub shows programs you do not have permissions to download (#54075)

* Show disabled downloads so you know what exists

* sorted list of apps

* Orbit Menu: Auto-Observe mode, Refresh button, Alive/Ghost counters (#54031)

Observe, Refresh, alive/ghost count, and no more [ghost]

Apply suggestions from mr jaredfogle

Co-authored-by: Jared-Fogle <[email protected]>
mister jaredfogle

yes? he built? tgui it

* tgui: Icon Stacking (#54212)

* adds icon stacking to tgui

* Docmentation for Icon.Stack, added classnames to icon, Added a component that can stack child icons.

Co-authored-by: Style Mistake <[email protected]>

* Cosmetic 1

* Cosmetic 2

Co-authored-by: Style Mistake <[email protected]>

* tgui: Communications Console (#54220)

* Start of work

* More work

* Finish visuals for main page for AIs, start work on behavior

* More functionality--authenticating and calling shuttle

* Set security level

* Message list

* Purchasing shuttles

* Emagging, messaing associates, nuke codes, permission fixes

* Sending message to allied sectors (done?)

* CentComm -> CentCom

* Resolve part of feedback

* Remove now unused pageComponent variable

* Change children to not use array

* Split lines

* Flex box allied stations

* Don't use ternary

* Fix lints

* Rebuild tgui

* Change icon to biohazard

* Clean up color property

* Rebuild tgui

* Cross server evacuation messages now include the evacuation reason (#53980)

Co-authored-by: Bobbahbrown <[email protected]>

* Adds Cross-Server Communication Network Option (PAID* CODE) (#54070)

* tgui: Comms Console Day One Fixes (#54381)

* Silicons now interact with the comms console just like AI, and are told they cannot recall

* Make allied sectors use columns I HAVENT TESTED THIS YET DONT MERGE WITHOUT TELLING ME AAAAAAAA

* Rebuild tgui

* Periodic tgui maintenance (#54567)

    Upgraded Yarn to 2.3.3
        Fixes building for people who use non-latin characters and spaces in their paths to tgstation repo.
    Removed webpack notifier
        RIP
        WSL users can now build tgui and not get errors about .pipe.

* Fix runtime with NTOS apps and improve code involved (#53779)

There exists a specific state where ui.open() can be called yet the 
result would be a null window and such behaviour would be intentional. 
The following CRASH in ui.send_asset() would thus be misleading, 
because send_asset() was called after open().

This PR adds more information to the CRASH about when the failure state 
can occur, makes open() return a value based on whether it actually 
opened a new pooled window or not, and makes sure modular computer apps 
don't send_assets unless a new pooled window was created.

* Unhardcodes Modular PC icons (#54158)

* Changes modPC program icons to not be hardcoded

* icons

* tgui.bundle.js, we meet again

* Updates modular PC program names to have some flavor (#52492)

* Better program names

* Forgot a few things.

* oops

* Notification support in modular computer apps and CIMS (#54724)

Allows modPC programs to send alerts, and adds a proc in the computer object to handle playing the sound effect and sending a message to visible users. These notifications can be muted on a per-program basis. Programs can also set themselves to highlighted in the NTOS Main menu; this is intended to be used along side alerts, but really can be used any time a program wishes to tell the user there is new information.

NT CIMS (SM monitor) now plays an alert during SM delaminations if the app is closed. The app must have had an SM selected before closing, or it will not send alerts. Notifications are sent when the SM makes a radio alert. If the app is currently the active program, the app will instead send a notification just once, when the SM begins delamination, so as to not annoy engineers that are already aware of the issue.

* HTML formatting on communication consoles, HTML sanitization (#54765)

Fixes #54713

Lets the comms console display HTML by telling react to set the HTML directly.

Also lets admins send HTML formatted command updates to the console. However, if the message is also sent to the crew, the raw HTML string will be sent in the chat box!

Shoutout to Timberpoes for helping me out with this!

Now with sanitize spun off into its own thing for anyone to reuse!

Accepts a string with HTML tags in it as input, and optionally allowed tags/forbidden attributes to override the defaults, then spits out a sanitised version of the same string!

* Admins can now see chronological order of events in logging tabs. (#54939)

* Labels logging better. (#54997)

* tgui: Refactor Asset Delivery (#54895)

* tgui: Refactor Asset Delivery

* Re-enable printing of initial backend update payload

* Fix oopsie woopsie hotkey, tgui.html syntax and ntos flavor

* tgui: Refactor Asset Delivery, part 2 (#54971)

* tgui: Refactor Asset Delivery, part 2

* Simplify inject code

* Updated strip menus (#55094)

Partiallyfixes #34369

Modified xenomorph, monkey, dog, and parrot strip menu UI to be like humanoids'. Also fixed an issue with parrot strip menu where it wouldn't refresh once you removed its headset, and fixed an inconsistency where human handcuff/legcuff removal buttons were different.

* tgui: Fix issues detected by SonarQube (#55098)

* tgui: Fix issues detected by sonarqube

* MacOS compatibility

* Rebuild tgui

* tgui: Safe (#55109)

This PR refactors safes and brings their UI from html to tgui based on the PR above.

Paradise has more features for safes than us, and these features were not ported along to accommodate feature freeze. Only our current safe features settings were refactored, for example number of tumblers stays 2, no extra safe information on examine and safe codes are not generated on paper for command.

Co-authored-by: Aleksej Komarov <[email protected]>

* Replace tgalert with tgui_alert (#55157)

Adds TGUI-based alerts to replace the old tgalert system. Replaces all uses of tgalert with tgui_alert except for one, the 'Report Issue' button, as people were (understandably) concerned that this button using tgui will prevent a tgui bug from being easily reported.

These windows have a nice little progress bar indicator of how much time they have left, and will automatically close themselves after this time elapses.

Co-authored-by: Aleksej Komarov <[email protected]>

* tgui: Stacking Machine Console and Safe UI fix (#55171)

This PR refactors Stacking Machine Console from using html based UI to tgui with some code cleanup and documentation. Also fixes a bug I noticed when using Stacking Machine Console - some materials could get stuck there if they were number subtypes (for example /obj/item/stack/sheet/metal/twenty), because console did not check for their merge_type for releasing like stacking machine itself does when the sheet is put inside. This is fixed now.

Also fixes a small safe UI bug, where some buttons could be hard to press due to the dialer image being too close to the buttons. Bundling this together to prevent merge conflicts with other tgui PRs. Fixes #55169

* tgui: Round Gauge (#55230)

This PR introduces the wacky round gauge for showing all of your favourite metrics in half-circle format. Show off those wacky numbers, use some scary blinking lights, feel alive!

I've also gone ahead and included this in the canister and tank (think internals) UIs. I've also done some refactoring of data sending from canisters because GOSH DANG it required some.

* Update links to Yarn documentation (#55235)

Updates tgui documentation to show that yarn berry (v2) is now used.

Co-authored-by: oranges <[email protected]>
Co-authored-by: Aleksej Komarov <[email protected]>

* Fix roulette wheel tgui error (#55376)

Fixes #54394

Once upon a time, tgui probably sent numbers to DM as a string. Now they're sent as actual numbers. Progress!

Roulette wheel seems to expect strings DM-side (and has valid text inputs from tgui) and the JS code also expected strings in `data`.

If you select any of the single bets, it sends a non-string type back to DM which then feeds back as a non-string type to JS, it then attempts to call `startsWith` on this non-string type and triggers the script error.

I've opted to fix this tgui-side by making sure it sends only strings back to the game, which allowed me to use the roulette wheel again, bet on singles without crashing and indeed in testing I could successfully win on a single as well. So it appears to restore full functionality.

* fixes

* Support for expansion-class modPC hardware (#52644)

* Support for expansion-class modPC hardware

* end of the line

* As requested

Did anyone know that the tablet vendor was attaching the wrong ModPC printer? I bet no one knew that.

* update

* readds the particle accelerator UI

* rebuilds TGUI, FUCK

* Revert "Support for expansion-class modPC hardware (#52644)"

This reverts commit 94c4367ede78b800cf802c462ab330798588d731.

* rebuilds tgui

* BotKeeper (tablet app) list populates based on bot unlock access (#54730)

Anyone can now download BotKeeper. Only bots your current ID can unlock will be listed to control. Stylised Botkeeper as BotKeeper because it looks better.

* tgui: Cyborg Boot Debug (#55584)

This PR refactors Cyborg Boot Debug and brings it's UI from html based one to tgui with some improvements and cleanup. I also took a liberty to add tooltip to each setting to shed some light on its function, as it could be quite unclear what exactly it meant.

Co-authored-by: zxaber <[email protected]>
Co-authored-by: Changelogs <[email protected]>
Co-authored-by: Tad Hardesty <[email protected]>
Co-authored-by: AnturK <[email protected]>
Co-authored-by: Arkatos1 <[email protected]>
Co-authored-by: ThePotato97 <[email protected]>
Co-authored-by: Aleksej Komarov <[email protected]>
Co-authored-by: Winterous <[email protected]>
Co-authored-by: Timberpoes <[email protected]>
Co-authored-by: NightRed <[email protected]>
Co-authored-by: Emmanuel S <[email protected]>
Co-authored-by: Jared-Fogle <[email protected]>
Co-authored-by: Hulkamania <[email protected]>
Co-authored-by: Bobbahbrown <[email protected]>
Co-authored-by: prodirus <[email protected]>
Co-authored-by: uomo <[email protected]>
Co-authored-by: tattlemothe <[email protected]>
Co-authored-by: Mordent <[email protected]>
Co-authored-by: oranges <[email protected]>
Co-authored-by: cacogen <[email protected]>
  • Loading branch information
1 parent b7069e3 commit c223d74
Show file tree
Hide file tree
Showing 312 changed files with 5,780 additions and 2,509 deletions.
13 changes: 7 additions & 6 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"recommendations": [
"gbasood.byond-dm-language-support",
"platymuus.dm-langclient",
"EditorConfig.EditorConfig",
"dbaeumer.vscode-eslint"
]
"recommendations": [
"gbasood.byond-dm-language-support",
"platymuus.dm-langclient",
"EditorConfig.EditorConfig",
"arcanis.vscode-zipfs",
"dbaeumer.vscode-eslint"
]
}
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
{
"eslint.nodePath": "tgui/.yarn/sdks",
"eslint.workingDirectories": [
"./tgui"
],
"dreammaker.extoolsDLL": "byond-extools.dll",
"search.exclude": {
"tgui/.yarn": true,
"tgui/.pnp.*": true
},
"workbench.editorAssociations": [
{
"filenamePattern": "*.dmi",
"viewType": "imagePreview.previewEditor"
}
],
"files.eol": "\n"
"files.eol": "\n",
"gitlens.advanced.blame.customArguments": ["-w"]
}
16 changes: 13 additions & 3 deletions code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,19 @@
#define COMSIG_OBJ_HIDE "obj_hide"

// /obj/machinery signals
#define COMSIG_MACHINERY_BROKEN "machinery_broken" //from /obj/machinery/obj_break(damage_flag): (damage_flag)
#define COMSIG_MACHINERY_POWER_LOST "machinery_power_lost" //from base power_change() when power is lost
#define COMSIG_MACHINERY_POWER_RESTORED "machinery_power_restored" //from base power_change() when power is restored

///from /obj/machinery/obj_break(damage_flag): (damage_flag)
#define COMSIG_MACHINERY_BROKEN "machinery_broken"
///from base power_change() when power is lost
#define COMSIG_MACHINERY_POWER_LOST "machinery_power_lost"
///from base power_change() when power is restored
#define COMSIG_MACHINERY_POWER_RESTORED "machinery_power_restored"

// /obj/machinery/power/supermatter_crystal signals
/// from /obj/machinery/power/supermatter_crystal/process_atmos(); when the SM delam reaches the point of sounding alarms
#define COMSIG_SUPERMATTER_DELAM_START_ALARM "sm_delam_start_alarm"
/// from /obj/machinery/power/supermatter_crystal/process_atmos(); when the SM sounds an audible alarm
#define COMSIG_SUPERMATTER_DELAM_ALARM "sm_delam_alarm"

// /obj/item signals
#define COMSIG_ITEM_ATTACK "item_attack" //from base of obj/item/attack(): (/mob/living/target, /mob/living/user)
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -163,3 +163,6 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define EWDIRFLIP(d) (d^(EAST|WEST))
///Turns the dir by 180 degrees
#define DIRFLIP(d) turn(d, 180)

/// 33554431 (2^24 - 1) is the maximum value our bitflags can reach.
#define MAX_BITFLAG_DIGITS 8
9 changes: 5 additions & 4 deletions code/__HELPERS/game.dm
Original file line number Diff line number Diff line change
Expand Up @@ -395,19 +395,20 @@
SEND_SOUND(M, 'sound/misc/notice2.ogg') //Alerting them to their consideration
if(flashwindow)
window_flash(M.client)
switch(ignore_category ? askuser(M,Question,"Please answer in [DisplayTimeText(poll_time)]!","Yes","No","Never for this round", StealFocus=0, Timeout=poll_time) : askuser(M,Question,"Please answer in [DisplayTimeText(poll_time)]!","Yes","No", StealFocus=0, Timeout=poll_time))
if(1)
var/list/answers = ignore_category ? list("Yes", "No", "Never for this round") : list("Yes", "No")
switch(tgui_alert(M, Question, "A limited-time offer!", answers, timeout=poll_time))
if("Yes")
to_chat(M, "<span class='notice'>Choice registered: Yes.</span>")
if(time_passed + poll_time <= world.time)
to_chat(M, "<span class='danger'>Sorry, you answered too late to be considered!</span>")
SEND_SOUND(M, 'sound/machines/buzz-sigh.ogg')
candidates -= M
else
candidates += M
if(2)
if("No")
to_chat(M, "<span class='danger'>Choice registered: No.</span>")
candidates -= M
if(3)
if("Never for this round")
var/list/L = GLOB.poll_ignore[ignore_category]
if(!L)
GLOB.poll_ignore[ignore_category] = list()
Expand Down
4 changes: 2 additions & 2 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ Turf and target are separate in case you want to teleport some distance from a t
return "[pick("!","@","#","$","%","^","&")][pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")][pick("!","@","#","$","%","^","&","*")]"

//Returns a list of all items of interest with their name
/proc/getpois(mobs_only=0,skip_mindless=0)
/proc/getpois(mobs_only = FALSE, skip_mindless = FALSE, specify_dead_role = TRUE)
var/list/mobs = sortmobs()
var/list/namecounts = list()
var/list/pois = list()
Expand All @@ -247,7 +247,7 @@ Turf and target are separate in case you want to teleport some distance from a t

if(M.real_name && M.real_name != M.name)
name += " \[[M.real_name]\]"
if(M.stat == DEAD)
if(M.stat == DEAD && specify_dead_role)
if(isobserver(M))
name += " \[ghost\]"
else
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/cyborg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
if(check_click_intercept(params,A))
return

if(stat || lockcharge || IsParalyzed() || IsStun())
if(stat || (lockcharge) || IsParalyzed() || IsStun())
return

var/list/modifiers = params2list(params)
Expand Down
7 changes: 3 additions & 4 deletions code/_onclick/hud/_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,15 @@
#define ui_borg_pull "EAST-2:26,SOUTH+1:7"
#define ui_borg_radio "EAST-1:28,SOUTH+1:7"
#define ui_borg_intents "EAST-2:26,SOUTH:5"
#define ui_borg_sensor "CENTER-3:16, SOUTH:5"
#define ui_borg_lamp "CENTER-4:16, SOUTH:5"
#define ui_borg_thrusters "CENTER-5:16, SOUTH:5"
#define ui_borg_lamp "CENTER-3:16, SOUTH:5"
#define ui_borg_tablet "CENTER-4:16, SOUTH:5"
#define ui_inv1 "CENTER-2:16,SOUTH:5"
#define ui_inv2 "CENTER-1 :16,SOUTH:5"
#define ui_inv3 "CENTER :16,SOUTH:5"
#define ui_borg_module "CENTER+1:16,SOUTH:5"
#define ui_borg_store "CENTER+2:16,SOUTH:5"
#define ui_borg_camera "CENTER+3:21,SOUTH:5"
#define ui_borg_album "CENTER+4:21,SOUTH:5"
#define ui_borg_alerts "CENTER+4:21,SOUTH:5"
#define ui_borg_language_menu "CENTER+4:21,SOUTH+1:5"

//Aliens
Expand Down
3 changes: 0 additions & 3 deletions code/_onclick/hud/ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,6 @@
if(isAI(usr))
var/mob/living/silicon/ai/AI = usr
AI.aicamera.viewpictures(usr)
else if(iscyborg(usr))
var/mob/living/silicon/robot/R = usr
R.aicamera.viewpictures(usr)

/obj/screen/ai/sensors
name = "Sensor Augmentation"
Expand Down
101 changes: 61 additions & 40 deletions code/_onclick/hud/robot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,26 +68,6 @@
var/mob/living/silicon/robot/R = usr
R.uneq_active()

/obj/screen/robot/lamp
name = "headlamp"
icon_state = "lamp0"

/obj/screen/robot/lamp/Click()
if(..())
return
var/mob/living/silicon/robot/R = usr
R.control_headlamp()

/obj/screen/robot/thrusters
name = "ion thrusters"
icon_state = "ionpulse0"

/obj/screen/robot/thrusters/Click()
if(..())
return
var/mob/living/silicon/robot/R = usr
R.toggle_ionpulse()

/datum/hud/robot
ui_style = 'icons/mob/screen_cyborg.dmi'

Expand Down Expand Up @@ -127,36 +107,36 @@

//End of module select

//Photography stuff
using = new /obj/screen/ai/image_take()
using.screen_loc = ui_borg_camera
using.hud = src
static_inventory += using

using = new /obj/screen/ai/image_view()
using.screen_loc = ui_borg_album
using = new /obj/screen/robot/lamp()
using.screen_loc = ui_borg_lamp
using.hud = src
static_inventory += using
mymobR.lampButton = using
var/obj/screen/robot/lamp/lampscreen = using
lampscreen.robot = mymobR

//Sec/Med HUDs
using = new /obj/screen/ai/sensors()
using.screen_loc = ui_borg_sensor
//Photography stuff
using = new /obj/screen/ai/image_take()
using.screen_loc = ui_borg_camera
using.hud = src
static_inventory += using

//Headlamp control
using = new /obj/screen/robot/lamp()
using.screen_loc = ui_borg_lamp
//Borg Integrated Tablet
using = new /obj/screen/robot/modPC()
using.screen_loc = ui_borg_tablet
using.hud = src
static_inventory += using
mymobR.lamp_button = using

//Thrusters
using = new /obj/screen/robot/thrusters()
using.screen_loc = ui_borg_thrusters
mymobR.interfaceButton = using
if(mymobR.modularInterface)
using.vis_contents += mymobR.modularInterface
var/obj/screen/robot/modPC/tabletbutton = using
tabletbutton.robot = mymobR

//Alerts
using = new /obj/screen/robot/alerts()
using.screen_loc = ui_borg_alerts
using.hud = src
static_inventory += using
mymobR.thruster_button = using

//Intent
action_intent = new /obj/screen/act_intent/robot()
Expand Down Expand Up @@ -285,3 +265,44 @@
else
for(var/obj/item/I in R.held_items)
screenmob.client.screen -= I

/obj/screen/robot/lamp
name = "headlamp"
icon_state = "lamp_off"
var/mob/living/silicon/robot/robot

/obj/screen/robot/lamp/Click()
. = ..()
if(.)
return
robot?.toggle_headlamp()
update_icon()

/obj/screen/robot/lamp/update_icon()
if(robot?.lamp_enabled)
icon_state = "lamp_on"
else
icon_state = "lamp_off"

/obj/screen/robot/modPC
name = "Modular Interface"
icon_state = "template"
var/mob/living/silicon/robot/robot

/obj/screen/robot/modPC/Click()
. = ..()
if(.)
return
robot.modularInterface?.interact(robot)

/obj/screen/robot/alerts
name = "Alert Panel"
icon = 'icons/mob/screen_ai.dmi'
icon_state = "alerts"

/obj/screen/robot/alerts/Click()
. = ..()
if(.)
return
var/mob/living/silicon/robot/borgo = usr
borgo.robot_alerts()
3 changes: 3 additions & 0 deletions code/controllers/configuration/entries/comms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@
protection = CONFIG_ENTRY_HIDDEN

/datum/config_entry/string/bot_ip

/datum/config_entry/string/cross_comms_network
protection = CONFIG_ENTRY_LOCKED
31 changes: 15 additions & 16 deletions code/controllers/subsystem/shuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -171,31 +171,26 @@ SUBSYSTEM_DEF(shuttle)
return S
WARNING("couldn't find dock with id: [id]")

/// Check if we can call the evac shuttle.
/// Returns TRUE if we can. Otherwise, returns a string detailing the problem.
/datum/controller/subsystem/shuttle/proc/canEvac(mob/user)
var/srd = CONFIG_GET(number/shuttle_refuel_delay)
if(world.time - SSticker.round_start_time < srd && user != null) //WaspStation Edit - Autotransfer
to_chat(user, "<span class='alert'>The emergency shuttle is refueling. Please wait [DisplayTimeText(srd - (world.time - SSticker.round_start_time))] before trying again.</span>")
return FALSE
return "The emergency shuttle is refueling. Please wait [DisplayTimeText(srd - (world.time - SSticker.round_start_time))] before attempting to call."

switch(emergency.mode)
if(SHUTTLE_RECALL)
to_chat(user, "<span class='alert'>The emergency shuttle may not be called while returning to CentCom.</span>")
return FALSE
return "The emergency shuttle may not be called while returning to CentCom."
if(SHUTTLE_CALL)
to_chat(user, "<span class='alert'>The emergency shuttle is already on its way.</span>")
return FALSE
return "The emergency shuttle is already on its way."
if(SHUTTLE_DOCKED)
to_chat(user, "<span class='alert'>The emergency shuttle is already here.</span>")
return FALSE
return "The emergency shuttle is already here."
if(SHUTTLE_IGNITING)
to_chat(user, "<span class='alert'>The emergency shuttle is firing its engines to leave.</span>")
return FALSE
return "The emergency shuttle is firing its engines to leave."
if(SHUTTLE_ESCAPE)
to_chat(user, "<span class='alert'>The emergency shuttle is moving away to a safe distance.</span>")
return FALSE
return "The emergency shuttle is moving away to a safe distance."
if(SHUTTLE_STRANDED)
to_chat(user, "<span class='alert'>The emergency shuttle has been disabled by CentCom.</span>")
return FALSE
return "The emergency shuttle has been disabled by CentCom."

return TRUE

Expand All @@ -213,7 +208,9 @@ SUBSYSTEM_DEF(shuttle)
Good luck.")
emergency = backup_shuttle

if(!canEvac(user))
var/can_evac_or_fail_reason = SSshuttle.canEvac(user)
if(can_evac_or_fail_reason != TRUE)
to_chat(user, "<span class='alert'>[can_evac_or_fail_reason]</span>")
return

call_reason = trim(html_encode(call_reason))
Expand Down Expand Up @@ -246,6 +243,7 @@ SUBSYSTEM_DEF(shuttle)
if(call_reason)
SSblackbox.record_feedback("text", "shuttle_reason", 1, "[call_reason]")
log_shuttle("Shuttle call reason: [call_reason]")
SSticker.emergency_reason = call_reason
message_admins("[ADMIN_LOOKUPFLW(user)] has called the shuttle. (<A HREF='?_src_=holder;[HrefToken()];trigger_centcom_recall=1'>TRIGGER CENTCOM RECALL</A>)")

/datum/controller/subsystem/shuttle/proc/centcom_recall(old_timer, admiral_message)
Expand Down Expand Up @@ -825,7 +823,8 @@ SUBSYSTEM_DEF(shuttle)
return data

/datum/controller/subsystem/shuttle/ui_act(action, params)
if(..())
. = ..()
if(.)
return

var/mob/user = usr
Expand Down
8 changes: 7 additions & 1 deletion code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ SUBSYSTEM_DEF(ticker)
var/list/crewobjlist = list()
var/list/crewobjjobs = list()

/// Why an emergency shuttle was called
var/emergency_reason

/datum/controller/subsystem/ticker/Initialize(timeofday)
load_mode()

Expand Down Expand Up @@ -526,7 +529,10 @@ SUBSYSTEM_DEF(ticker)
if(STATION_DESTROYED_NUKE)
news_message = "We would like to reassure all employees that the reports of a Syndicate backed nuclear attack on [station_name()] are, in fact, a hoax. Have a secure day!"
if(STATION_EVACUATED)
news_message = "The crew of [station_name()] has been evacuated amid unconfirmed reports of enemy activity."
if(emergency_reason)
news_message = "[station_name()] has been evacuated after transmitting the following distress beacon:\n\n[emergency_reason]"
else
news_message = "The crew of [station_name()] has been evacuated amid unconfirmed reports of enemy activity."
if(BLOB_WIN)
news_message = "[station_name()] was overcome by an unknown biological outbreak, killing all crew on board. Don't let it happen to you! Remember, a clean work station is a safe work station."
if(BLOB_NUKE)
Expand Down
Loading

0 comments on commit c223d74

Please sign in to comment.