This commit is contained in:
Hatterhat
2021-11-18 00:48:21 -06:00
parent 952cbe0bdf
commit 8b05c6cc15
4 changed files with 23 additions and 9 deletions
+3 -3
View File
@@ -183,7 +183,7 @@
. += "The access panel is [locked? "locked" : "unlocked"]."
. += "The maintenance panel is [open ? "open" : "closed"]."
. += "Hardsuit systems are [offline ? "<span class='warning'>offline</span>" : "<span class='notice'>online</span>"]."
. += "The cooling stystem is [cooling_on ? "active" : "inactive"]."
. += "The cooling system is [cooling_on ? "active" : "inactive"]."
if(open)
. += "It's equipped with [english_list(installed_modules)]."
@@ -414,10 +414,10 @@
if(!cell)
return
if(cell.charge <= 0)
to_chat(user, "<span class='notice'>\The [src] has no power!.</span>")
to_chat(user, "<span class='notice'>\The [src] has no power!</span>")
return
if(!suit_is_deployed())
to_chat(user, "<span class='notice'>The hardsuit needs to be deployed first!.</span>")
to_chat(user, "<span class='notice'>The hardsuit needs to be deployed first!</span>")
return
cooling_on = 1
@@ -51,6 +51,7 @@
else
data["ai"] = FALSE
data["cooling"] = cooling_on
data["sealed"] = !canremove
data["sealing"] = sealing
data["helmet"] = (helmet ? "[helmet.name]" : "None.")
@@ -130,6 +131,9 @@
if("toggle_seals")
toggle_seals(usr)
. = TRUE
if("toggle_cooling")
toggle_cooling(usr) // cooling toggles have its own to_chats, tbf
. = TRUE
if("toggle_ai_control")
ai_override_enabled = !ai_override_enabled
notify_ai("Synthetic suit control has been [ai_override_enabled ? "enabled" : "disabled"].")
+15 -5
View File
@@ -25,7 +25,7 @@ export const RIGSuit = (props, context) => {
// Non-AI trying to control the hardsuit while it's AI control overridden
override = <Box color="bad">-- HARDSUIT CONTROL OVERRIDDEN BY AI --</Box>;
}
return (
<Window
height={480}
@@ -46,7 +46,7 @@ export const RIGSuit = (props, context) => {
const RIGSuitStatus = (props, context) => {
const { act, data } = useBackend(context);
const {
// Power Bar
chargestatus,
@@ -57,6 +57,7 @@ const RIGSuitStatus = (props, context) => {
// Suit Status
sealing,
sealed,
cooling,
// Cover Locks
emagged,
securitycheck,
@@ -77,6 +78,14 @@ const RIGSuitStatus = (props, context) => {
onClick={() => act("toggle_seals")} />
);
const CoolingButton = (
<Button
content={"Suit Cooling " + (cooling ? "is Active": "is Inactive")}
icon={"power-off"}
selected={cooling}
onClick={() => act("toggle_cooling")} />
);
const AIButton = (
<Button
content={"AI Control " + (aioverride ? "Enabled" : "Disabled")}
@@ -92,6 +101,7 @@ const RIGSuitStatus = (props, context) => {
<Fragment>
{SealButton}
{AIButton}
{CoolingButton}
</Fragment>
)}>
<LabeledList>
@@ -125,7 +135,7 @@ const RIGSuitStatus = (props, context) => {
const RIGSuitHardware = (props, context) => {
const { act, data } = useBackend(context);
const {
// Disables buttons while the suit is busy
sealing,
@@ -198,7 +208,7 @@ const RIGSuitHardware = (props, context) => {
const RIGSuitModules = (props, context) => {
const { act, data } = useBackend(context);
const {
// Seals disable Modules
sealed,
@@ -309,4 +319,4 @@ const RIGSuitModules = (props, context) => {
))}
</Section>
);
};
};
File diff suppressed because one or more lines are too long