mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
defines, color-coding
This commit is contained in:
@@ -25,6 +25,11 @@
|
||||
|
||||
#define APC_UPDATE_ICON_COOLDOWN 200 // 20 seconds
|
||||
|
||||
// main_status var
|
||||
#define APC_EXTERNAL_POWER_NOTCONNECTED 0
|
||||
#define APC_EXTERNAL_POWER_NOENERGY 1
|
||||
#define APC_EXTERNAL_POWER_GOOD 2
|
||||
|
||||
// APC malf status
|
||||
#define APC_MALF_NOT_HACKED 1
|
||||
#define APC_MALF_HACKED 2 // APC hacked by user, and user is in its core.
|
||||
@@ -75,7 +80,7 @@
|
||||
var/lastused_equip = 0
|
||||
var/lastused_environ = 0
|
||||
var/lastused_total = 0
|
||||
var/main_status = 0
|
||||
var/main_status = APC_EXTERNAL_POWER_NOTCONNECTED
|
||||
powernet = 0 // set so that APCs aren't found as powernet nodes //Hackish, Horrible, was like this before I changed it :(
|
||||
var/malfhack = 0 //New var for my changes to AI malf. --NeoFite
|
||||
var/mob/living/silicon/ai/malfai = null //See above --NeoFite
|
||||
@@ -1083,11 +1088,11 @@
|
||||
var/excess = surplus()
|
||||
|
||||
if(!avail())
|
||||
main_status = 0
|
||||
main_status = APC_EXTERNAL_POWER_NOTCONNECTED
|
||||
else if(excess < 0)
|
||||
main_status = 1
|
||||
main_status = APC_EXTERNAL_POWER_NOENERGY
|
||||
else
|
||||
main_status = 2
|
||||
main_status = APC_EXTERNAL_POWER_GOOD
|
||||
|
||||
if(debug)
|
||||
log_debug("Status: [main_status] - Excess: [excess] - Last Equip: [lastused_equip] - Last Light: [lastused_light] - Longterm: [longtermpower]")
|
||||
@@ -1314,3 +1319,7 @@
|
||||
CHECK_TICK
|
||||
|
||||
#undef APC_UPDATE_ICON_COOLDOWN
|
||||
|
||||
#undef APC_EXTERNAL_POWER_NOTCONNECTED
|
||||
#undef APC_EXTERNAL_POWER_NOENERGY
|
||||
#undef APC_EXTERNAL_POWER_GOOD
|
||||
|
||||
@@ -96,8 +96,9 @@ const ApcContent = (props, context) => {
|
||||
color={chargingStatus.color}
|
||||
buttons={(
|
||||
<Button
|
||||
icon={data.chargeMode ? 'sync' : 'close'}
|
||||
icon={data.chargeMode ? 'sync' : 'times'}
|
||||
content={data.chargeMode ? 'Auto' : 'Off'}
|
||||
selected={data.chargeMode}
|
||||
disabled={locked}
|
||||
onClick={() => act('charge')} />
|
||||
)}>
|
||||
@@ -141,12 +142,12 @@ const ApcContent = (props, context) => {
|
||||
onClick={() => act('channel', topicParams.off)} />
|
||||
</Fragment>
|
||||
)}>
|
||||
{channel.powerLoad}
|
||||
{channel.powerLoad}W
|
||||
</LabeledList.Item>
|
||||
);
|
||||
})}
|
||||
<LabeledList.Item label="Total Load">
|
||||
<b>{data.totalLoad}</b>
|
||||
<b>{data.totalLoad}W</b>
|
||||
</LabeledList.Item>
|
||||
</LabeledList>
|
||||
</Section>
|
||||
@@ -173,6 +174,7 @@ const ApcContent = (props, context) => {
|
||||
<Button
|
||||
icon={data.coverLocked ? 'lock' : 'unlock'}
|
||||
content={data.coverLocked ? 'Engaged' : 'Disengaged'}
|
||||
selected={data.coverLocked}
|
||||
disabled={locked}
|
||||
onClick={() => act('cover')} />
|
||||
)} />
|
||||
@@ -182,6 +184,7 @@ const ApcContent = (props, context) => {
|
||||
<Button
|
||||
icon="lightbulb-o"
|
||||
content={data.nightshiftLights ? 'Enabled' : 'Disabled'}
|
||||
selected={data.nightshiftLights}
|
||||
onClick={() => act('toggle_nightshift')} />
|
||||
)} />
|
||||
</Section>
|
||||
|
||||
@@ -33,10 +33,10 @@ export const InterfaceLockNoticeBox = (props, context) => {
|
||||
<Flex.Item>
|
||||
Interface lock status:
|
||||
</Flex.Item>
|
||||
<Flex.Item grow={1} />
|
||||
<Flex.Item grow="1" />
|
||||
<Flex.Item>
|
||||
<Button
|
||||
m={0}
|
||||
m="0"
|
||||
color={normallyLocked ? 'red' : 'green'}
|
||||
icon={normallyLocked ? 'lock' : 'unlock'}
|
||||
content={normallyLocked ? 'Locked' : 'Unlocked'}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user