merge conflict and job/dept discounts support.
This commit is contained in:
@@ -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
Reference in New Issue
Block a user