Readd nif softshop descriptions as tooltips

This commit is contained in:
Aronai Sieyes
2021-05-07 17:23:17 -04:00
parent e2bd3e806f
commit 4e95d72466
5 changed files with 11 additions and 3 deletions
+1
View File
@@ -3,6 +3,7 @@
*/
/datum/stored_item
var/item_name = "name" //Name of the item(s) displayed
var/item_desc
var/item_path = null
var/amount = 0
var/list/instances //What items are actually stored
+1
View File
@@ -360,6 +360,7 @@ GLOBAL_LIST_EMPTY(vending_products)
listed_products.Add(list(list(
"key" = key,
"name" = I.item_name,
"desc" = I.item_desc,
"price" = I.price,
"color" = I.display_color,
"isatom" = ispath(I.item_path, /atom),
+1
View File
@@ -94,6 +94,7 @@
product.price = initial(NS.cost)
product.amount = 10
product.category = category
product.item_desc = initial(NS.desc)
product_records.Add(product)
+7 -2
View File
@@ -1,7 +1,7 @@
import { classes } from 'common/react';
import { Fragment } from 'inferno';
import { useBackend } from '../backend';
import { Box, Button, Section, Table, LabeledList } from '../components';
import { Box, Button, Section, Table, Tooltip, LabeledList } from '../components';
import { Window } from '../layouts';
const VendingRow = (props, context) => {
@@ -28,7 +28,12 @@ const VendingRow = (props, context) => {
) || null}
</Table.Cell>
<Table.Cell bold color={product.color}>
{product.name}
<Box inline position="relative">
{product.name}
{product.desc
? <Tooltip content={product.desc} position="right" />
: null}
</Box>
</Table.Cell>
<Table.Cell collapsing textAlign="center">
<Box
File diff suppressed because one or more lines are too long