[MODULAR] NIFSofts now display Font Awesome Icons next to their names (#20796)

nice
This commit is contained in:
Pinta
2023-04-29 09:58:48 +01:00
committed by GitHub
parent 19a276ce72
commit d9f4bd57d9
11 changed files with 29 additions and 5 deletions
@@ -39,6 +39,7 @@
"activation_cost" = nifsoft.activation_cost,
"active_cost" = nifsoft.active_cost,
"reference" = REF(nifsoft),
"ui_icon" = nifsoft.ui_icon,
)
data["loaded_nifsofts"] += list(nifsoft_data)
@@ -76,7 +76,8 @@ GLOBAL_LIST_INIT(purchasable_nifsofts, list(
"rewards_points_rate" = initial(buyable_nifsoft.rewards_points_rate),
"points_purchasable" = initial(buyable_nifsoft.rewards_points_eligible),
"category" = initial(buyable_nifsoft.buying_category),
"reference" = buyable_nifsoft
"ui_icon" = initial(buyable_nifsoft.ui_icon),
"reference" = buyable_nifsoft,
)
var/category = nifsoft_details["category"]
if(!(category in product_list))
@@ -16,6 +16,8 @@
var/purchase_price = 300
///What catagory is the NIFSoft under?
var/buying_category = NIFSOFT_CATEGORY_GENERAL
///What font awesome icon is shown next to the name of the nifsoft?
var/ui_icon = "floppy-disk"
///Can the program be installed with other instances of itself?
var/single_install = TRUE
@@ -8,6 +8,7 @@
holographic_filter = FALSE //No RGB toys
name_tag = "purpura "
lewd_nifsoft = TRUE
ui_icon = "heart"
//This uses a stripped down selection from the dorms vendor.
summonable_items = list(
@@ -96,6 +97,7 @@
program_desc = "Once installed, the Purpura Contract compells the user to follow the rules stored in the data of the NIFSoft. \n OOC NOTE: This is strictly here for adult roleplay. None of the laws here actually need to be obeyed and you can uninstall this NIFSoft at any time."
purchase_price = 0
lewd_nifsoft = TRUE
ui_icon = "file-contract"
/// What "laws" does the person with this NIFSoft installed have?
var/fake_laws = ""
@@ -13,6 +13,8 @@ GLOBAL_LIST_EMPTY(hivemind_users)
active_cost = 0.2
purchase_price = 350
buying_category = NIFSOFT_CATEGORY_UTILITY
ui_icon = "users"
///The network that the user is currently hosting
var/datum/component/mind_linker/nif/user_network
///What networks are the user connected to?
@@ -9,6 +9,7 @@
active_cost = 0.5
compatible_nifs = list(/obj/item/organ/internal/cyberimp/brain/nif/standard)
buying_category = NIFSOFT_CATEGORY_UTILITY
ui_icon = "coins"
/datum/nifsoft/money_sense/activate()
. = ..()
@@ -15,6 +15,7 @@
cooldown = TRUE
activation_cost = 100 // Around 1/10th the energy of a standard NIF
buying_category = NIFSOFT_CATEGORY_FUN
ui_icon = "book-open"
/// Does the resulting object have a holographic like filter appiled to it?
var/holographic_filter = TRUE
@@ -11,6 +11,7 @@
compatible_nifs = list(/obj/item/organ/internal/cyberimp/brain/nif/standard)
purchase_price = 350
buying_category = NIFSOFT_CATEGORY_COSMETIC
ui_icon = "paintbrush"
///The NIF version of the Shapeshifter Ability
var/datum/action/innate/alter_form/nif/shapeshifter
@@ -15,6 +15,7 @@
persistence = TRUE
purchase_price = 0 //It came free with your NIF.
buying_category = NIFSOFT_CATEGORY_FUN
ui_icon = "scroll"
///Is the NIFSoft transmitting data?
var/transmitting_data = TRUE
+7 -2
View File
@@ -1,6 +1,6 @@
import { useBackend, useLocalState } from '../backend';
import { Window } from '../layouts';
import { Box, Dropdown, LabeledList, ProgressBar, Section, Button, Input, BlockQuote, Flex, Collapsible, Table } from '../components';
import { Box, Dropdown, LabeledList, ProgressBar, Section, Button, Input, BlockQuote, Flex, Collapsible, Table, Icon } from '../components';
import { TableCell, TableRow } from '../components/Table';
export const NifPanel = (props, context) => {
@@ -49,7 +49,12 @@ export const NifPanel = (props, context) => {
{loaded_nifsofts.map((nifsoft) => (
<Flex.Item key={nifsoft.name}>
<Collapsible
title={nifsoft.name}
title={
<>
{<Icon name={nifsoft.ui_icon} />}
{nifsoft.name + ' '}
</>
}
buttons={
<Button
icon="play"
@@ -1,6 +1,6 @@
import { useBackend, useSharedState } from '../backend';
import { NtosWindow } from '../layouts';
import { BlockQuote, Button, Collapsible, Flex, Section, Tabs, LabeledList, Box } from '../components';
import { BlockQuote, Button, Collapsible, Flex, Section, Tabs, LabeledList, Box, Icon } from '../components';
export const NtosNifsoftCatalog = (props, context) => {
const { act, data } = useBackend(context);
@@ -55,7 +55,14 @@ const ProductCategory = (props, context) => {
<Flex direction="Column">
{products.map((product) => (
<Flex.Item key={product.key}>
<Section title={product.name} fill={false}>
<Section
title={
<span>
{<Icon name={product.ui_icon} />}
{' ' + product.name}
</span>
}
fill={false}>
<Collapsible title="Product Notes">
<BlockQuote>{product.desc}</BlockQuote>
</Collapsible>