Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/label_bounty_issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Label bounty issues

on:
issues:
types:
- opened

permissions:
contents: read
issues: write

jobs:
label:
runs-on: ubuntu-24.04
steps:
- name: Add bounty label
uses: actions/github-script@v9
with:
script: |
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: ["bounty"],
});
2 changes: 1 addition & 1 deletion tgui/packages/tgui-dev-server/link/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function serializeObject(obj: Record<string, any>): string {
// Error object
const isError =
value instanceof Error ||
(value.code && value.message && value.message.includes('Error'));
(value.code && value.message?.includes('Error'));
if (isError) {
return {
__error__: true,
Expand Down
4 changes: 2 additions & 2 deletions tgui/packages/tgui/interfaces/AtmosControlConsole.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const AtmosControlConsole = (props) => {
<Section
title={selectedChamber ? selectedChamber.name : 'Chamber Reading'}
buttons={
!!data.reconnecting && (
data.reconnecting && (
<Button
icon="undo"
content="Reconnect"
Expand All @@ -70,7 +70,7 @@ export const AtmosControlConsole = (props) => {
)
}
>
{!!selectedChamber && !!selectedChamber.gasmix ? (
{selectedChamber?.gasmix ? (
<GasmixParser
gasmix={selectedChamber.gasmix}
gasesOnClick={setActiveGasId}
Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/interfaces/Cargo/CargoCart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function CheckoutItems(props) {
<Table.Cell>{entry.object}</Table.Cell>

<Table.Cell width={11}>
{!!can_send && !!entry.can_be_cancelled ? (
{can_send && entry.can_be_cancelled ? (
<>
<Button
icon="minus"
Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/interfaces/Cargo/CargoStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function CargoStatus(props) {
>
<LabeledList>
<LabeledList.Item label="Shuttle">
{!!docked && !requestonly && !!can_send ? (
{docked && !requestonly && can_send ? (
<Button
color={grocery ? 'orange' : 'green'}
tooltip={
Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/interfaces/Flatpacker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const BoardPreview = (props: BoardPreviewProps) => {
icon="cog"
fontSize={1.2}
textAlign="center"
disabled={!design || design.disableReason !== ''}
disabled={design?.disableReason !== ''}
tooltip={design.disableReason}
tooltipPosition="bottom"
onClick={() => onPrint()}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NtosWindow } from '../layouts';
import { useBackend } from '../backend';
import { SeedTable, SeedData, TraitData } from './SeedTable';
import { SeedTable, type SeedData, type TraitData } from './SeedTable';

type Data = {
seeds: SeedData[];
Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/interfaces/NtosRadar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const TargetDisplay = (props) => {
if (!selected || !target) {
return null;
}
if (!Object.keys(target).length && !!selected) {
if (!Object.keys(target).length && selected) {
return (
<NoticeBox
position="absolute"
Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/interfaces/Orbit/OrbitBlade.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function OrbitInfo(props) {
const { name, full_name, health, job } = orbiting;

let department;
if ('job' in orbiting && !!job) {
if ('job' in orbiting && job) {
department = getDepartmentByJob(job);
}

Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/interfaces/Orbit/OrbitTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function OrbitTooltip(props: Props) {
}

const extraInfo = extra?.split(':');
const displayHealth = !!health && health >= 0 ? `${health}%` : 'Critical';
const displayHealth = health && health >= 0 ? `${health}%` : 'Critical';
const showAFK = 'client' in item && !item.client;
const displayJob = realNameDisplay ? mind_job : job;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { sortBy } from 'es-toolkit';
import { type PropsWithChildren, type ReactNode, useState } from 'react';
import { useBackend } from 'tgui/backend';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const ServerPrefs = createContext<ServerData | undefined>({
jobs: {
departments: {},
jobs: {},
jobs_sorted: [],
},
names: {
types: {},
Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/interfaces/PrisonerManagement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const AllImplantDisplay = (props: { implants: ImplantInfo[] }) => {
</Tabs>
</Stack.Item>
<Stack.Item>
{implantTab && implantsByCategory && implantsByCategory[implantTab] ? (
{implantTab && implantsByCategory?.[implantTab] ? (
implantsByCategory[implantTab].map((implant) => (
<ImplantDisplay key={implant.ref} implant={implant} />
))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const CrimeDisplay = ({ item }: { item: Crime }) => {
const { current_user, higher_access } = data;
const { author, crime_ref, details, fine, name, paid, time, valid, voider } =
item;
const showFine = !!fine && fine > 0 ? `: ${fine} cr` : ': PAID OFF';
const showFine = fine && fine > 0 ? `: ${fine} cr` : ': PAID OFF';

let collapsibleColor = '';
if (!valid) {
Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/interfaces/StationAlertConsole.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const StationAlertConsoleContent = (props) => {
<Stack.Item grow>
<li className="color-average">
{alert.name}{' '}
{!!cameraView && alert.sources > 1
{cameraView && alert.sources > 1
? ` (${alert.sources} sources)`
: ''}
</li>
Expand Down
2 changes: 1 addition & 1 deletion tgui/packages/tgui/interfaces/Techweb/nodes/TechNode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export function TechNode(props: Props) {
!nocontrols && (
<>
{tier > 0 &&
(!!can_unlock && (is_free || queue_nodes.length === 0) ? (
(can_unlock && (is_free || queue_nodes.length === 0) ? (
<Button
icon="lightbulb"
disabled={!can_unlock || tier > 1 || queue_nodes.length > 0}
Expand Down
Loading