Updates components to TG and fixes can

This commit is contained in:
Artur
2020-07-06 10:58:48 +03:00
parent 7ebc785437
commit 3154e8c596
31 changed files with 237 additions and 8 deletions

View File

@@ -266,8 +266,7 @@ obj/machinery/portable_atmospherics/canister/welder_act(mob/living/user, obj/ite
return TRUE
/obj/machinery/portable_atmospherics/canister/obj_break(damage_flag)
. = ..()
if(!.)
if((stat & BROKEN) || (flags_1 & NODECONSTRUCT_1))
return
canister_break()

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { clamp, toFixed } from 'common/math';
import { Component } from 'inferno';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { classes } from 'common/react';
import { Box } from './Box';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { classes, isFalsy, pureComponentHooks } from 'common/react';
import { createVNode } from 'inferno';
import { ChildFlags, VNodeFlags } from 'inferno-vnode-flags';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { classes, pureComponentHooks } from 'common/react';
import { Component, createRef } from 'inferno';
import { IS_IE8 } from '../byond';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { shallowDiffers } from 'common/react';
import { debounce } from 'common/timer';
import { Component, createRef } from 'inferno';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { map, zipWith } from 'common/collections';
import { pureComponentHooks } from 'common/react';
import { Component, createRef } from 'inferno';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { Component } from 'inferno';
import { Box } from './Box';
import { Button } from './Button';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { classes, pureComponentHooks } from 'common/react';
import { computeBoxClassName, computeBoxProps } from './Box';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { classes } from 'common/react';
import { Box } from './Box';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { classes } from 'common/react';
export const Divider = props => {

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { clamp } from 'common/math';
import { pureComponentHooks } from 'common/react';
import { Component, createRef } from 'inferno';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { classes } from 'common/react';
import { Component } from 'inferno';
import { Box } from './Box';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { classes, pureComponentHooks } from 'common/react';
import { IS_IE8 } from '../byond';
import { Box, unit } from './Box';
@@ -16,7 +22,11 @@ export const computeFlexProps = props => {
return {
className: classes([
'Flex',
IS_IE8 && 'Flex--ie8',
IS_IE8 && (
direction === 'column'
? 'Flex--ie8--column'
: 'Flex--ie8'
),
inline && 'Flex--inline',
spacing > 0 && 'Flex--spacing--' + spacing,
className,

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { Table } from './Table';
import { pureComponentHooks } from 'common/react';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { classes, pureComponentHooks } from 'common/react';
import { Box } from './Box';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { classes, isFalsy } from 'common/react';
import { Component, createRef } from 'inferno';
import { Box } from './Box';
@@ -77,6 +83,10 @@ export class Input extends Component {
if (input) {
input.value = toInputValue(nextValue);
}
if (this.props.autoFocus) {
setTimeout(() => input.focus(), 1);
}
}
componentDidUpdate(prevProps, prevState) {

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { keyOfMatchingRange, scale } from 'common/math';
import { classes } from 'common/react';
import { IS_IE8 } from '../byond';

View File

@@ -0,0 +1,53 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { Flex } from './Flex';
export const LabeledControls = props => {
const {
children,
...rest
} = props;
return (
<Flex
mx={-0.5}
align="stretch"
justify="space-between"
{...rest}>
{children}
</Flex>
);
};
const LabeledControlsItem = props => {
const {
label,
children,
...rest
} = props;
return (
<Flex.Item mx={1}>
<Flex
minWidth="52px"
height="100%"
direction="column"
align="center"
textAlign="center"
justify="space-between"
{...rest}>
<Flex.Item />
<Flex.Item>
{children}
</Flex.Item>
<Flex.Item color="label">
{label}
</Flex.Item>
</Flex>
</Flex.Item>
);
};
LabeledControls.Item = LabeledControlsItem;

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { classes, pureComponentHooks } from 'common/react';
import { Box, unit } from './Box';
import { Divider } from './Divider';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { classes } from 'common/react';
import { computeBoxClassName, computeBoxProps } from './Box';
import { Dimmer } from './Dimmer';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { classes, pureComponentHooks } from 'common/react';
import { Box } from './Box';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { clamp } from 'common/math';
import { classes, pureComponentHooks } from 'common/react';
import { Component, createRef } from 'inferno';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { clamp01, scale, keyOfMatchingRange, toFixed } from 'common/math';
import { classes, pureComponentHooks } from 'common/react';
import { computeBoxClassName, computeBoxProps } from './Box';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { classes, isFalsy, pureComponentHooks } from 'common/react';
import { Box } from './Box';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { clamp01, keyOfMatchingRange, scale } from 'common/math';
import { classes } from 'common/react';
import { IS_IE8 } from '../byond';

View File

@@ -1,5 +1,11 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { classes, pureComponentHooks } from 'common/react';
import { Box, computeBoxClassName, computeBoxProps } from './Box';
import { computeBoxClassName, computeBoxProps } from './Box';
export const Table = props => {
const {

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { classes } from 'common/react';
import { computeBoxClassName, computeBoxProps } from './Box';
import { Button } from './Button';

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
import { classes } from 'common/react';
export const Tooltip = props => {

View File

@@ -1,3 +1,9 @@
/**
* @file
* @copyright 2020 Aleksej Komarov
* @license MIT
*/
export { AnimatedNumber } from './AnimatedNumber';
export { BlockQuote } from './BlockQuote';
export { Box } from './Box';
@@ -14,6 +20,7 @@ export { Grid } from './Grid';
export { Icon } from './Icon';
export { Input } from './Input';
export { Knob } from './Knob';
export { LabeledControls } from './LabeledControls';
export { LabeledList } from './LabeledList';
export { Modal } from './Modal';
export { NoticeBox } from './NoticeBox';
@@ -22,6 +29,6 @@ export { ProgressBar } from './ProgressBar';
export { Section } from './Section';
export { Slider } from './Slider';
export { Table } from './Table';
export { TextArea } from './TextArea';
export { Tabs } from './Tabs';
export { Tooltip } from './Tooltip';
export { TextArea } from './TextArea';

File diff suppressed because one or more lines are too long