From dd00688d06269fa7f1ec52fe8842eafc16fb173d Mon Sep 17 00:00:00 2001 From: Artur Date: Mon, 7 Sep 2020 13:27:25 +0300 Subject: [PATCH] More fixes --- code/modules/awaymissions/gateway.dm | 8 +- tgui/packages/tgui-panel/chat/constants.js | 108 ++++++++++--------- tgui/packages/tgui-panel/settings/reducer.js | 2 +- tgui/packages/tgui/interfaces/SkillPanel.js | 80 +++++++++----- 4 files changed, 115 insertions(+), 83 deletions(-) diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index 8476090f75..ee4f7bd4e2 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -15,7 +15,7 @@ GLOBAL_LIST_EMPTY(gateway_destinations) var/hidden = FALSE /// Will not show on gateway controls at all. /* Can a gateway link to this destination right now. */ -/datum/gateway_destination/proc/is_availible() +/datum/gateway_destination/proc/is_available() return enabled && (world.time - SSticker.round_start_time >= wait) /* Returns user-friendly description why you can't connect to this destination, displayed in UI */ @@ -52,7 +52,7 @@ GLOBAL_LIST_EMPTY(gateway_destinations) . = list() .["ref"] = REF(src) .["name"] = name - .["availible"] = is_availible() + .["availible"] = is_available() .["reason"] = get_availible_reason() if(wait) .["timeout"] = max(1 - (wait - (world.time - SSticker.round_start_time)) / wait, 0) @@ -72,7 +72,7 @@ GLOBAL_LIST_EMPTY(gateway_destinations) if(target_gateway.target == deactivated.destination) target_gateway.deactivate() -/datum/gateway_destination/gateway/is_availible() +/datum/gateway_destination/gateway/is_available() return ..() && target_gateway.calibrated && !target_gateway.target && target_gateway.powered() /datum/gateway_destination/gateway/get_availible_reason() @@ -319,7 +319,7 @@ GLOBAL_LIST_EMPTY(gateway_destinations) /obj/machinery/computer/gateway_control/proc/try_to_connect(datum/gateway_destination/D) if(!D || !G) return - if(!D.is_availible() || G.target) + if(!D.is_available() || G.target) return G.activate(D) diff --git a/tgui/packages/tgui-panel/chat/constants.js b/tgui/packages/tgui-panel/chat/constants.js index b33f929246..f32d81b64c 100644 --- a/tgui/packages/tgui-panel/chat/constants.js +++ b/tgui/packages/tgui-panel/chat/constants.js @@ -14,125 +14,131 @@ export const IMAGE_RETRY_DELAY = 250; export const IMAGE_RETRY_LIMIT = 10; export const IMAGE_RETRY_MESSAGE_AGE = 60000; -// Default message type -export const MESSAGE_TYPE_UNKNOWN = 'unknown'; - -// Internal message type -export const MESSAGE_TYPE_INTERNAL = 'internal'; - -// Must match the set of defines in code/__DEFINES/chat.dm -export const MESSAGE_TYPE_SYSTEM = 'system'; -export const MESSAGE_TYPE_LOCALCHAT = 'localchat'; -export const MESSAGE_TYPE_RADIO = 'radio'; -export const MESSAGE_TYPE_INFO = 'info'; -export const MESSAGE_TYPE_WARNING = 'warning'; -export const MESSAGE_TYPE_DEADCHAT = 'deadchat'; -export const MESSAGE_TYPE_OOC = 'ooc'; -export const MESSAGE_TYPE_ADMINPM = 'adminpm'; -export const MESSAGE_TYPE_COMBAT = 'combat'; -export const MESSAGE_TYPE_ADMINCHAT = 'adminchat'; -export const MESSAGE_TYPE_MODCHAT = 'modchat'; -export const MESSAGE_TYPE_EVENTCHAT = 'eventchat'; -export const MESSAGE_TYPE_ADMINLOG = 'adminlog'; -export const MESSAGE_TYPE_ATTACKLOG = 'attacklog'; -export const MESSAGE_TYPE_DEBUG = 'debug'; - -// Metadata for each message type export const MESSAGE_TYPES = [ // Always-on types { - type: MESSAGE_TYPE_SYSTEM, + type: 'system', name: 'System Messages', description: 'Messages from your client, always enabled', - selector: '.boldannounce', + selector: '.boldannounce, .filter_system', important: true, }, // Basic types { - type: MESSAGE_TYPE_LOCALCHAT, + type: 'localchat', name: 'Local', description: 'In-character local messages (say, emote, etc)', - selector: '.say, .emote', + selector: '.filter_say, .say, .emote', }, { - type: MESSAGE_TYPE_RADIO, + type: 'radio', name: 'Radio', description: 'All departments of radio messages', - selector: '.alert, .syndradio, .centradio, .airadio, .entradio, .comradio, .secradio, .engradio, .medradio, .sciradio, .supradio, .srvradio, .expradio, .radio, .deptradio, .newscaster', + selector: '.filter_radio, .alert, .syndradio, .centradio, .airadio, .entradio, .comradio, .secradio, .engradio, .medradio, .sciradio, .supradio, .srvradio, .expradio, .radio, .deptradio, .newscaster', }, { - type: MESSAGE_TYPE_INFO, + type: 'info', name: 'Info', description: 'Non-urgent messages from the game and items', - selector: '.notice:not(.pm), .adminnotice, .info, .sinister, .cult', + selector: '.filter_notice, .notice:not(.pm), .adminnotice, .info, .sinister, .cult', }, { - type: MESSAGE_TYPE_WARNING, + type: 'warning', name: 'Warnings', description: 'Urgent messages from the game and items', - selector: '.warning:not(.pm), .critical, .userdanger, .italics', + selector: '.filter_warning, .warning:not(.pm), .critical, .userdanger, .italics', }, { - type: MESSAGE_TYPE_DEADCHAT, + type: 'deadchat', name: 'Deadchat', description: 'All of deadchat', - selector: '.deadsay', + selector: '.filter_deadsay, .deadsay', }, { - type: MESSAGE_TYPE_OOC, + type: 'ooc', name: 'OOC', description: 'The bluewall of global OOC messages', - selector: '.ooc, .adminooc', + selector: '.filter_ooc, .ooc, .adminooc', }, { - type: MESSAGE_TYPE_ADMINPM, + type: 'looc', + name: 'LOOC', + description: 'Local OOC Chat. Less of a bluewall', + selector: '.filter_looc, .looc', + }, + { + type: 'antagooc', + name: 'AOOC', + description: 'Antag OOC Chat.', + selector: '.filter_aooc, .antagooc', + }, + { + type: 'adminpm', name: 'Admin PMs', description: 'Messages to/from admins (adminhelp)', - selector: '.pm, .adminhelp', + selector: '.filter_pm, .pm', }, { - type: MESSAGE_TYPE_COMBAT, + type: 'combat', name: 'Combat Log', description: 'Urist McTraitor has stabbed you with a knife!', - selector: '.danger', + selector: '.filter_combat, .danger', }, { - type: MESSAGE_TYPE_UNKNOWN, + type: 'unknown', name: 'Unsorted', description: 'Everything we could not sort, always enabled', }, + // Semi-admin stuff. + { + type: 'mentorchat', + name: 'Mentor Chat', + description: 'Mhelp how do i not die?', + selector: '.filter_MSAY, .mentor_channel', + }, // Admin stuff { - type: MESSAGE_TYPE_ADMINCHAT, + type: 'adminchat', name: 'Admin Chat', description: 'ASAY messages', - selector: '.admin_channel, .adminsay', + selector: '.filter_ASAY, .admin_channel', admin: true, }, + /* { - type: MESSAGE_TYPE_MODCHAT, + type: 'modchat', name: 'Mod Chat', description: 'MSAY messages', - selector: '.mod_channel', + selector: '.filter_MSAY, .mod_channel', + admin: true, + }, + */ + { + type: 'eventchat', + name: 'Event Chat', + description: 'ESAY messages', + selector: '.filter_ESAY, .event_channel', admin: true, }, { - type: MESSAGE_TYPE_ADMINLOG, + type: 'adminlog', name: 'Admin Log', description: 'ADMIN LOG: Urist McAdmin has jumped to coordinates X, Y, Z', - selector: '.log_message', + selector: '.filter_adminlog, .log_message', admin: true, }, { - type: MESSAGE_TYPE_ATTACKLOG, + type: 'attacklog', name: 'Attack Log', description: 'Urist McTraitor has shot John Doe', + selector: '.filter_attacklog', admin: true, }, { - type: MESSAGE_TYPE_DEBUG, + type: 'debuglog', name: 'Debug Log', description: 'DEBUG: SSPlanets subsystem Recover().', + selector: '.filter_debuglog', admin: true, }, ]; diff --git a/tgui/packages/tgui-panel/settings/reducer.js b/tgui/packages/tgui-panel/settings/reducer.js index 547ca13b46..b214e7a7de 100644 --- a/tgui/packages/tgui-panel/settings/reducer.js +++ b/tgui/packages/tgui-panel/settings/reducer.js @@ -11,7 +11,7 @@ const initialState = { version: 1, fontSize: 13, lineHeight: 1.2, - theme: 'light', + theme: 'default', adminMusicVolume: 0.5, highlightText: '', highlightColor: '#ffdd44', diff --git a/tgui/packages/tgui/interfaces/SkillPanel.js b/tgui/packages/tgui/interfaces/SkillPanel.js index 361cd99680..e4d3d38941 100644 --- a/tgui/packages/tgui/interfaces/SkillPanel.js +++ b/tgui/packages/tgui/interfaces/SkillPanel.js @@ -1,6 +1,7 @@ import { useBackend } from '../backend'; import { Box, Button, LabeledList, ProgressBar, Section } from '../components'; import { Window } from '../layouts'; +import { Fragment } from 'inferno'; const skillgreen = { color: 'lightgreen', @@ -32,16 +33,20 @@ export const SkillPanel = (props, context) => { {skill.desc}
- + {!!skill.level_based && ( + + +
+
+ )} + Total Experience: [{skill.value_base} XP]
- Total Experience: [{skill.exp} XP] -
- XP To Next Level:  - {skill.exp_req !== 0 ? ( + XP To Next Level: + {skill.level_based ? ( - [{skill.exp_prog} / {skill.exp_req}] + {skill.xp_next_lvl_base} ) : ( @@ -49,28 +54,32 @@ export const SkillPanel = (props, context) => { )}
- Overall Skill Progress: [{skill.exp} / {skill.max_exp}] + {skill.base_readout}
-