merge conflict and job/dept discounts support.

This commit is contained in:
Ghommie
2020-05-03 02:11:05 +02:00
308 changed files with 6846 additions and 9140 deletions
+4 -12
View File
@@ -47,16 +47,6 @@ export const Vending = props => {
<Section title="Products" >
<Table>
{inventory.map((product => {
const free = (
!data.onstation
|| product.price === 0
|| (
!product.premium
&& data.department
&& data.user
&& data.department === data.user.department
)
);
return (
<Table.Row key={product.name}>
<Table.Cell>
@@ -100,14 +90,16 @@ export const Vending = props => {
disabled={(
data.stock[product.namename] === 0
|| (
!free
data.cost_mult !== 0
&& (
!data.user
|| product.price > data.user.cash
)
)
)}
content={free ? 'FREE' : product.price + ' cr'}
content={(data.cost_mult !== 0
? Math.round(product.price * data.cost_mult) + ' cr'
: '') + data.cost_text}
onClick={() => act(ref, 'vend', {
'ref': product.ref,
})} />
File diff suppressed because one or more lines are too long