From 75692d71e6d4a1fa44748fdff13df2c20e345a0f Mon Sep 17 00:00:00 2001 From: Pinta <68373373+softcerv@users.noreply.github.com> Date: Tue, 7 Feb 2023 21:31:00 -0500 Subject: [PATCH] [MODULAR] Replacces the NIFSoft Vendor with a PDA app (#18955) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * start * It's now a PDA app * Update nifsoft_catalog.dm * nice * 🦀 * NIF GHOST BOX NIF GHOST BOX * price updates * whoops * Update modular_skyrat/modules/modular_implants/code/nifs.dm Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com> * Update modular_skyrat/modules/modular_implants/code/nifs.dm Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com> * Update nifsoft_catalog.dm * a * Update wardrobes.dm * Update wardrobes.dm * Update nifsoft_catalog.dm * Update NtosNifsoftCatalog.js * Update modular_skyrat/modules/modular_implants/code/nifsoft_catalog.dm Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> * Update wardrobes.dm * Update nifsoft_catalog.dm * Update wardrobes.dm --------- Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com> Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com> --- ...oon_underground_syndicate_base1_skyrat.dmm | 1 - ...avaland_surface_syndicate_base1_skyrat.dmm | 1 - _maps/map_files/VoidRaptor/VoidRaptor.dmm | 1 - _maps/map_files/generic/CentCom_skyrat_z2.dmm | 18 +++- code/__DEFINES/~skyrat_defines/nifsofts.dm | 6 ++ .../machines/machine_circuitboards.dm | 1 - code/modules/research/techweb/all_nodes.dm | 3 - .../modules/research/designs/misc_designs.dm | 11 --- modular_skyrat/modules/cargo/code/packs.dm | 37 +++++-- .../modules/mapping/code/wardrobes.dm | 3 + .../modules/modular_implants/code/nifs.dm | 12 +++ .../modular_implants/code/nifsoft_catalog.dm | 99 +++++++++++++++++++ .../modular_implants/code/nifsoft_shop.dm | 43 -------- .../modules/modular_implants/code/nifsofts.dm | 4 + .../code/nifsofts/hivemind.dm | 2 + .../code/nifsofts/money_sense.dm | 1 + .../code/nifsofts/prop_summoner.dm | 3 +- .../code/nifsofts/shapeshifter.dm | 2 + tgstation.dme | 3 +- .../tgui/interfaces/NtosNifsoftCatalog.js | 71 +++++++++++++ 20 files changed, 247 insertions(+), 75 deletions(-) create mode 100644 code/__DEFINES/~skyrat_defines/nifsofts.dm create mode 100644 modular_skyrat/modules/modular_implants/code/nifsoft_catalog.dm delete mode 100644 modular_skyrat/modules/modular_implants/code/nifsoft_shop.dm create mode 100644 tgui/packages/tgui/interfaces/NtosNifsoftCatalog.js diff --git a/_maps/RandomRuins/IceRuins/skyrat/icemoon_underground_syndicate_base1_skyrat.dmm b/_maps/RandomRuins/IceRuins/skyrat/icemoon_underground_syndicate_base1_skyrat.dmm index 6d661549b9e..8e6cf55c6e8 100644 --- a/_maps/RandomRuins/IceRuins/skyrat/icemoon_underground_syndicate_base1_skyrat.dmm +++ b/_maps/RandomRuins/IceRuins/skyrat/icemoon_underground_syndicate_base1_skyrat.dmm @@ -942,7 +942,6 @@ /area/ruin/syndicate_lava_base/medbay) "hf" = ( /obj/machinery/atmospherics/components/unary/vent_pump/on/layer4, -/obj/machinery/vending/nifsoft/ghost, /turf/open/floor/iron, /area/ruin/syndicate_lava_base/testlab) "hp" = ( diff --git a/_maps/RandomRuins/LavaRuins/skyrat/lavaland_surface_syndicate_base1_skyrat.dmm b/_maps/RandomRuins/LavaRuins/skyrat/lavaland_surface_syndicate_base1_skyrat.dmm index e486361c620..95c7e5cbb3e 100644 --- a/_maps/RandomRuins/LavaRuins/skyrat/lavaland_surface_syndicate_base1_skyrat.dmm +++ b/_maps/RandomRuins/LavaRuins/skyrat/lavaland_surface_syndicate_base1_skyrat.dmm @@ -3251,7 +3251,6 @@ /area/ruin/syndicate_lava_base/testlab) "Hz" = ( /obj/machinery/atmospherics/components/unary/vent_pump/on/layer4, -/obj/machinery/vending/nifsoft/ghost, /turf/open/floor/iron, /area/ruin/syndicate_lava_base/testlab) "HA" = ( diff --git a/_maps/map_files/VoidRaptor/VoidRaptor.dmm b/_maps/map_files/VoidRaptor/VoidRaptor.dmm index 976ca4b0bb4..d055cd99d82 100644 --- a/_maps/map_files/VoidRaptor/VoidRaptor.dmm +++ b/_maps/map_files/VoidRaptor/VoidRaptor.dmm @@ -46667,7 +46667,6 @@ /obj/effect/turf_decal/trimline/purple/filled/line{ dir = 1 }, -/obj/machinery/vending/nifsoft, /turf/open/floor/iron/white, /area/station/hallway/primary/fore) "ncv" = ( diff --git a/_maps/map_files/generic/CentCom_skyrat_z2.dmm b/_maps/map_files/generic/CentCom_skyrat_z2.dmm index c01f9b0d5e8..8545ecc3347 100644 --- a/_maps/map_files/generic/CentCom_skyrat_z2.dmm +++ b/_maps/map_files/generic/CentCom_skyrat_z2.dmm @@ -3817,6 +3817,17 @@ dir = 8 }, /obj/effect/turf_decal/trimline/blue/filled/line, +/obj/structure/rack, +/obj/item/storage/box/nif_ghost_box, +/obj/item/storage/box/nif_ghost_box, +/obj/item/storage/box/nif_ghost_box, +/obj/item/storage/box/nif_ghost_box, +/obj/item/storage/box/nif_ghost_box, +/obj/item/storage/box/nif_ghost_box, +/obj/item/storage/box/nif_ghost_box, +/obj/item/storage/box/nif_ghost_box, +/obj/item/storage/box/nif_ghost_box, +/obj/item/storage/box/nif_ghost_box, /turf/open/indestructible/hoteltile{ icon_state = "floor" }, @@ -11514,7 +11525,6 @@ dir = 8 }, /obj/effect/turf_decal/trimline/blue/filled/line, -/obj/machinery/vending/nifsoft/ghost, /turf/open/indestructible/hoteltile{ icon_state = "floor" }, @@ -58800,7 +58810,7 @@ aAu aur aLO aOI -sIb +aSg aqf aUo axQ @@ -59057,7 +59067,7 @@ azT azT azT asC -aSg +sIb ang aUo aUo @@ -60342,7 +60352,7 @@ aOI aKB aWq aDA -aSg +sIb ang aUo aUo diff --git a/code/__DEFINES/~skyrat_defines/nifsofts.dm b/code/__DEFINES/~skyrat_defines/nifsofts.dm new file mode 100644 index 00000000000..ebf138343c0 --- /dev/null +++ b/code/__DEFINES/~skyrat_defines/nifsofts.dm @@ -0,0 +1,6 @@ +//Bitflags for what kind product category a NIFSoft goes under + +#define NIFSOFT_CATEGORY_GENERAL "General" +#define NIFSOFT_CATEGORY_COSMETIC "Cosmetic" +#define NIFSOFT_CATEGORY_UTILITY "Utility" +#define NIFSOFT_CATEGORY_FUN "Fun" diff --git a/code/game/objects/items/circuitboards/machines/machine_circuitboards.dm b/code/game/objects/items/circuitboards/machines/machine_circuitboards.dm index 02db56fc0a3..272d05f3d41 100644 --- a/code/game/objects/items/circuitboards/machines/machine_circuitboards.dm +++ b/code/game/objects/items/circuitboards/machines/machine_circuitboards.dm @@ -587,7 +587,6 @@ /obj/machinery/vending/tool = "YouTool", /obj/machinery/vending/custom = "Custom Vendor", /obj/machinery/vending/dorms = "LustWish", //SKYRAT EDIT CHANGE - ERP UPDATE - ORIGINAL: /obj/machinery/vending/dorms = "KinkVend" - /obj/machinery/vending/nifsoft = "NIFSoft Vendor", //SKYRAT EDIT ADDITION NIFs /obj/machinery/vending/access/command = "Command Outfitting Station", //SKYRAT EDIT ADDITION /obj/machinery/vending/barbervend = "Fab-O-Vend", //SKYRAT EDIT ADDITION /obj/machinery/vending/imported = "NT Sustenance Supplier", //SKYRAT EDIT ADDITION diff --git a/code/modules/research/techweb/all_nodes.dm b/code/modules/research/techweb/all_nodes.dm index 4766244fa6d..7ad6094f286 100644 --- a/code/modules/research/techweb/all_nodes.dm +++ b/code/modules/research/techweb/all_nodes.dm @@ -570,9 +570,6 @@ design_ids = list( "bounty_pad", "bounty_pad_control", - //SKYRAT EDIT ADDITION - START - "nifsoft_vendor" - //SKYRAT EDIT ADDITION - END ) research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500) diff --git a/modular_skyrat/master_files/code/modules/research/designs/misc_designs.dm b/modular_skyrat/master_files/code/modules/research/designs/misc_designs.dm index 71a559175b4..f511f6056e0 100644 --- a/modular_skyrat/master_files/code/modules/research/designs/misc_designs.dm +++ b/modular_skyrat/master_files/code/modules/research/designs/misc_designs.dm @@ -45,14 +45,3 @@ RND_CATEGORY_TOOLS + RND_SUBCATEGORY_EQUIPMENT_MEDICAL ) departmental_flags = DEPARTMENT_BITFLAG_MEDICAL - -/datum/design/nifosft_vendor - name = "NIFSoft Vendor Refill" - desc = "A refill canister for NIFSoft Vendors" - id = "nifsoft_vendor" - build_type = PROTOLATHE | AWAY_LATHE - materials = list(/datum/material/iron = 10000, /datum/material/plastic = 5000, /datum/material/silver = 2000, /datum/material/gold = 2000) - build_path = /obj/item/vending_refill/nifsoft_shop - category = list(RND_CATEGORY_STOCK_PARTS + RND_SUBCATEGORY_STOCK_PARTS_MISC) - departmental_flags = DEPARTMENT_BITFLAG_SCIENCE - diff --git a/modular_skyrat/modules/cargo/code/packs.dm b/modular_skyrat/modules/cargo/code/packs.dm index 9ff94568b39..ecf7d62f736 100644 --- a/modular_skyrat/modules/cargo/code/packs.dm +++ b/modular_skyrat/modules/cargo/code/packs.dm @@ -749,14 +749,35 @@ /obj/item/nif_repair_kit, ) -/datum/supply_pack/service/money_nifsoft - name = "Money Sense NIFSofts" - desc = "Contains three Money Sense NIFSoft datadisks." - cost = CARGO_CRATE_VALUE * 5 - access_view = ACCESS_CARGO +/datum/supply_pack/goody/money_sense_nifsoft + name = "Automatic Appraisal NIFSoft" + desc = "Contains a single Automatic Appraisal NIFSoft uploader disk." + cost = CARGO_CRATE_VALUE * 2 contains = list( /obj/item/disk/nifsoft_uploader/money_sense, - /obj/item/disk/nifsoft_uploader/money_sense, - /obj/item/disk/nifsoft_uploader/money_sense, ) - crate_name = "Money sense NIFSoft crate" + +/datum/supply_pack/goody/shapeshifter_nifsoft + name = "Polymorph NIFSoft" + desc = "Contains a single Polymorph NIFSoft uploader disk." + cost = CARGO_CRATE_VALUE * 2 + contains = list( + /obj/item/disk/nifsoft_uploader/shapeshifter, + ) + +/datum/supply_pack/goody/hivemind_nifsoft + name = "Hivemind NIFSoft" + desc = "Contains a single Hivemind NIFSoft uploader disk." + cost = CARGO_CRATE_VALUE * 2 + contains = list( + /obj/item/disk/nifsoft_uploader/summoner, + ) + +/datum/supply_pack/goody/summoner_nifsoft + name = "Grimoire Caeruleam NIFSoft" + desc = "Contains a single Grimoire Caeruleam NIFSoft uploader disk." + cost = CARGO_CRATE_VALUE * 1 + contains = list( + /obj/item/disk/nifsoft_uploader/summoner, + ) + diff --git a/modular_skyrat/modules/mapping/code/wardrobes.dm b/modular_skyrat/modules/mapping/code/wardrobes.dm index e4ba7e5ccfc..2a2a8c27236 100644 --- a/modular_skyrat/modules/mapping/code/wardrobes.dm +++ b/modular_skyrat/modules/mapping/code/wardrobes.dm @@ -8,6 +8,7 @@ icon_state = "syndrobe" product_ads = "Put a Donk on it!;Aim, Style, Shoot!;Brigged for wearing the best!" vend_reply = "Thank you for using the SynDrobe!" + products = list( /obj/item/clothing/under/syndicate/skyrat/tactical = 3, /obj/item/clothing/under/syndicate/skyrat/tactical/skirt = 3, @@ -36,7 +37,9 @@ /obj/item/clothing/under/syndicate/skyrat/maid = 5, /obj/item/clothing/gloves/combat/maid = 5, /obj/item/clothing/head/maidheadband/syndicate = 5, + /obj/item/storage/box/nif_ghost_box = 10, ) + refill_canister = /obj/item/vending_refill/wardrobe/syndie_wardrobe light_color = COLOR_MOSTLY_PURE_RED diff --git a/modular_skyrat/modules/modular_implants/code/nifs.dm b/modular_skyrat/modules/modular_implants/code/nifs.dm index 816c6345c49..22b891b4deb 100644 --- a/modular_skyrat/modules/modular_implants/code/nifs.dm +++ b/modular_skyrat/modules/modular_implants/code/nifs.dm @@ -469,6 +469,18 @@ starting_organ = /obj/item/organ/internal/cyberimp/brain/nif/debug uses = 1 +/obj/item/storage/box/nif_ghost_box + name = "\improper NIF Starter Kit" + desc = "Contains a calibration-free NIF along with a variety of NIFSofts." + illustration = "disk_kit" + +/obj/item/storage/box/nif_ghost_box/PopulateContents() + new /obj/item/autosurgeon/organ/nif/ghost_role(src) + new /obj/item/disk/nifsoft_uploader/hivemind(src) + new /obj/item/disk/nifsoft_uploader/shapeshifter(src) + new /obj/item/disk/nifsoft_uploader/summoner(src) + new /obj/item/disk/nifsoft_uploader/money_sense(src) + #undef NIF_CALIBRATION_STAGE_1 #undef NIF_CALIBRATION_STAGE_1_END #undef NIF_CALIBRATION_STAGE_2 diff --git a/modular_skyrat/modules/modular_implants/code/nifsoft_catalog.dm b/modular_skyrat/modules/modular_implants/code/nifsoft_catalog.dm new file mode 100644 index 00000000000..7cf3ee44b9c --- /dev/null +++ b/modular_skyrat/modules/modular_implants/code/nifsoft_catalog.dm @@ -0,0 +1,99 @@ +GLOBAL_LIST_INIT(purchasable_nifsofts, list( + /datum/nifsoft/hivemind, + /datum/nifsoft/summoner, + /datum/nifsoft/shapeshifter, +)) + +/datum/computer_file/program/nifsoft_downloader + filename = "nifsoftcatalog" + filedesc = "NIFSoft Catalog" + extended_desc = "A virtual storefront that allows the user to install NIFSofts and purchase various NIF related products" + category = PROGRAM_CATEGORY_MISC + size = 3 + tgui_id = "NtosNifsoftCatalog" + program_icon = "bag-shopping" + usage_flags = PROGRAM_TABLET + ///What bank account is money being drawn out of? + var/datum/bank_account/paying_account + ///What NIF are the NIFSofts being sent to? + var/datum/weakref/target_nif + +/datum/computer_file/program/nifsoft_downloader/Destroy(force) + paying_account = null + target_nif = null + + return ..() + +//TGUI STUFF + +/datum/computer_file/program/nifsoft_downloader/ui_data(mob/user) + var/list/data = list() + + paying_account = computer.computer_id_slot?.registered_account || null + data["paying_account"] = paying_account + + return data + +/datum/computer_file/program/nifsoft_downloader/ui_static_data(mob/user) + var/list/data = get_header_data() + var/list/product_list = list() + + var/mob/living/carbon/human/nif_user = user + if(nif_user) + var/obj/item/organ/internal/cyberimp/brain/nif/user_nif = nif_user.getorgan(/obj/item/organ/internal/cyberimp/brain/nif) + target_nif = user_nif || null + + data["target_nif"] = target_nif + + for(var/datum/nifsoft/buyable_nifsoft as anything in GLOB.purchasable_nifsofts) + if(!buyable_nifsoft) + continue + + var/list/nifsoft_details = list( + "name" = initial(buyable_nifsoft.name), + "desc" = initial(buyable_nifsoft.program_desc), + "price" = initial(buyable_nifsoft.purchase_price), + "category" = initial(buyable_nifsoft.buying_category), + "reference" = buyable_nifsoft + ) + var/category = nifsoft_details["category"] + if(!(category in product_list)) + product_list[category] += (list(name = category, products = list())) + + product_list[category]["products"] += list(nifsoft_details) + + for(var/product_category in product_list) + data["product_list"] += list(product_list[product_category]) + + return data + +/datum/computer_file/program/nifsoft_downloader/ui_act(action, list/params) + . = ..() + if(.) + return + + switch(action) + if("purchase_product") + var/product_to_buy = text2path(params["product_to_buy"]) + if(!product_to_buy || !paying_account) + return FALSE + + var/amount_to_charge = (params["product_cost"]) + + if(!paying_account.has_money(amount_to_charge)) + paying_account.bank_card_talk("You lack the money to make this purchase.") + return FALSE + + if(!ispath(product_to_buy, /datum/nifsoft) || !target_nif) + paying_account.bank_card_talk("You are unable to buy this.") + return FALSE + + var/datum/nifsoft/installed_nifsoft = new product_to_buy(target_nif) + if(!installed_nifsoft.parent_nif) + paying_account.bank_card_talk("Install failed, your purchase has been refunded.") + return FALSE + + paying_account.adjust_money(-amount_to_charge, "NIFSoft purchase") + paying_account.bank_card_talk("Transaction complete, you have been charged [amount_to_charge]cr.") + + return TRUE diff --git a/modular_skyrat/modules/modular_implants/code/nifsoft_shop.dm b/modular_skyrat/modules/modular_implants/code/nifsoft_shop.dm deleted file mode 100644 index 141a758771a..00000000000 --- a/modular_skyrat/modules/modular_implants/code/nifsoft_shop.dm +++ /dev/null @@ -1,43 +0,0 @@ -/obj/machinery/vending/nifsoft - name = "NIFSoft Vendor" - desc = "A hardlight vendor self-contained in a floating projector. This salescreen is far more advanced than the backwater old-style vendors normally found scattered around the Frontier, mostly owing to it not selling any physical product. Instead, this interface is meant for users of Nanite Implant Frameworks, forming a connection with the latent field of nanomachinery surrounding Framework users to download new programming and software from various distribution networks and directories. While many are available, Corporations are actively attempting to stop vendors such as this one from selling NIFsofts capable of harming their assets." - icon = 'modular_skyrat/modules/modular_implants/icons/obj/machines/vendors.dmi' - refill_canister = /obj/item/vending_refill/nifsoft_shop - icon_state = "proj" - tiltable = FALSE - density = FALSE - default_price = 300 - extra_price = 900 - - product_categories = list( - list( - "name" = "NIFSofts", - "icon" = "download", - "products" = list( - /obj/item/disk/nifsoft_uploader/shapeshifter = 10, - /obj/item/disk/nifsoft_uploader/summoner = 10, - /obj/item/disk/nifsoft_uploader/hivemind = 10, - ) - ) - ) - - premium = list( - /obj/item/autosurgeon/organ/nif/disposable = 5, - ) - -/obj/machinery/vending/nifsoft/ghost //Contains every NIFSoft and contains the standard NIF with persistence removed. Mostly here for ghost cafe and syndies - default_price = 0 - extra_price = 0 - products = list( - /obj/item/disk/nifsoft_uploader/shapeshifter = 10, - /obj/item/disk/nifsoft_uploader/summoner/ghost = 10, - /obj/item/disk/nifsoft_uploader/hivemind = 10, - /obj/item/disk/nifsoft_uploader/money_sense = 10, - ) - - premium = list( - /obj/item/autosurgeon/organ/nif/ghost_role = 5, - ) - -/obj/item/vending_refill/nifsoft_shop - machine_name = "NIFSoft Vendor" diff --git a/modular_skyrat/modules/modular_implants/code/nifsofts.dm b/modular_skyrat/modules/modular_implants/code/nifsofts.dm index 89a17ce22b2..72dfa94acb0 100644 --- a/modular_skyrat/modules/modular_implants/code/nifsofts.dm +++ b/modular_skyrat/modules/modular_implants/code/nifsofts.dm @@ -12,6 +12,10 @@ var/datum/weakref/parent_nif ///Who is the NIF currently linked to? var/mob/living/carbon/human/linked_mob + ///How much does the program cost to buy in credits? + var/purchase_price = 300 + ///What catagory is the NIFSoft under? + var/buying_category = NIFSOFT_CATEGORY_GENERAL ///Can the program be installed with other instances of itself? var/single_install = TRUE diff --git a/modular_skyrat/modules/modular_implants/code/nifsofts/hivemind.dm b/modular_skyrat/modules/modular_implants/code/nifsofts/hivemind.dm index a47206ac400..0fa5904cc5c 100644 --- a/modular_skyrat/modules/modular_implants/code/nifsofts/hivemind.dm +++ b/modular_skyrat/modules/modular_implants/code/nifsofts/hivemind.dm @@ -11,6 +11,8 @@ GLOBAL_LIST_EMPTY(hivemind_users) activation_cost = 10 active_mode = TRUE active_cost = 0.2 + purchase_price = 500 + buying_category = NIFSOFT_CATEGORY_UTILITY ///The network that the user is currently hosting var/datum/component/mind_linker/nif/user_network ///What networks are the user connected to? diff --git a/modular_skyrat/modules/modular_implants/code/nifsofts/money_sense.dm b/modular_skyrat/modules/modular_implants/code/nifsofts/money_sense.dm index b91dcf96386..74f579c2e8b 100644 --- a/modular_skyrat/modules/modular_implants/code/nifsofts/money_sense.dm +++ b/modular_skyrat/modules/modular_implants/code/nifsofts/money_sense.dm @@ -8,6 +8,7 @@ active_mode = TRUE active_cost = 0.5 compatible_nifs = list(/obj/item/organ/internal/cyberimp/brain/nif/standard) + buying_category = NIFSOFT_CATEGORY_UTILITY /datum/nifsoft/money_sense/activate() . = ..() diff --git a/modular_skyrat/modules/modular_implants/code/nifsofts/prop_summoner.dm b/modular_skyrat/modules/modular_implants/code/nifsofts/prop_summoner.dm index fe1f4b4d4ff..dec7068f526 100644 --- a/modular_skyrat/modules/modular_implants/code/nifsofts/prop_summoner.dm +++ b/modular_skyrat/modules/modular_implants/code/nifsofts/prop_summoner.dm @@ -9,17 +9,18 @@ /obj/item/disk/nifsoft_uploader/summoner/ghost custom_price = 0 - /datum/nifsoft/summoner name = "Grimoire Caeruleam" program_desc = "The Grimoire Caeruleam is an open-source, virtual decentralized directory of summonable objects originally developed by the Altspace Coven, a post-pagan group of witches first digitized into engrams in the year 2544. These summonable constructs, or 'Icons,' are comprised of delicate patterns of nanomachines serving as a framework and projector for hardlight; the name 'Caeruleam' referencing the blue light an Icon casts in the summoner's hand. While the Grimoire has served thousands thus far, Corporate interests have blocked all access to Icons capable of harming their assets." cooldown = TRUE activation_cost = 100 // Around 1/10th the energy of a standard NIF + buying_category = NIFSOFT_CATEGORY_FUN /// Does the resulting object have a holographic like filter appiled to it? var/holographic_filter = TRUE /// Is there any special tag added at the begining of the resulting object name? var/name_tag = "cerulean " + purchase_price = 250 ///The list of items that can be summoned from the NIFSoft. var/static/list/summonable_items = list( diff --git a/modular_skyrat/modules/modular_implants/code/nifsofts/shapeshifter.dm b/modular_skyrat/modules/modular_implants/code/nifsofts/shapeshifter.dm index 747b2c74263..e880c4dad7d 100644 --- a/modular_skyrat/modules/modular_implants/code/nifsofts/shapeshifter.dm +++ b/modular_skyrat/modules/modular_implants/code/nifsofts/shapeshifter.dm @@ -9,6 +9,8 @@ active_mode = TRUE active_cost = 1 compatible_nifs = list(/obj/item/organ/internal/cyberimp/brain/nif/standard) + purchase_price = 500 + buying_category = NIFSOFT_CATEGORY_COSMETIC ///The NIF version of the Shapeshifter Ability var/datum/action/innate/alter_form/nif/shapeshifter diff --git a/tgstation.dme b/tgstation.dme index 4ae248786a1..753f1d25e58 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -356,6 +356,7 @@ #include "code\__DEFINES\~skyrat_defines\mapping.dm" #include "code\__DEFINES\~skyrat_defines\medical_defines.dm" #include "code\__DEFINES\~skyrat_defines\mobs.dm" +#include "code\__DEFINES\~skyrat_defines\nifsofts.dm" #include "code\__DEFINES\~skyrat_defines\obj_flags.dm" #include "code\__DEFINES\~skyrat_defines\opposing_force_defines.dm" #include "code\__DEFINES\~skyrat_defines\pinpointers.dm" @@ -6163,7 +6164,7 @@ #include "modular_skyrat\modules\modular_implants\code\nif_research.dm" #include "modular_skyrat\modules\modular_implants\code\nifs.dm" #include "modular_skyrat\modules\modular_implants\code\nifs_tgui.dm" -#include "modular_skyrat\modules\modular_implants\code\nifsoft_shop.dm" +#include "modular_skyrat\modules\modular_implants\code\nifsoft_catalog.dm" #include "modular_skyrat\modules\modular_implants\code\nifsofts.dm" #include "modular_skyrat\modules\modular_implants\code\nifsofts\hivemind.dm" #include "modular_skyrat\modules\modular_implants\code\nifsofts\money_sense.dm" diff --git a/tgui/packages/tgui/interfaces/NtosNifsoftCatalog.js b/tgui/packages/tgui/interfaces/NtosNifsoftCatalog.js new file mode 100644 index 00000000000..84aa05987fe --- /dev/null +++ b/tgui/packages/tgui/interfaces/NtosNifsoftCatalog.js @@ -0,0 +1,71 @@ +import { useBackend, useSharedState } from '../backend'; +import { NtosWindow } from '../layouts'; +import { BlockQuote, Button, Collapsible, Flex, Section, Tabs } from '../components'; + +export const NtosNifsoftCatalog = (props, context) => { + const { act, data } = useBackend(context); + const { product_list = [] } = data; + const [tab, setTab] = useSharedState( + context, + 'product_category', + product_list[0].name + ); + + const products = + product_list.find((product_category) => product_category.name === tab) + ?.products || []; + + return ( + + + + {product_list.map((product_category) => ( + setTab(product_category.name)} + selected={tab === product_category.name}> + {product_category.name} + + ))} + + + + + ); +}; + +const ProductCategory = (props, context) => { + const { act, data } = useBackend(context); + const { target_nif, paying_account } = data; + const { products } = props; + + return ( +
+ + {products.map((product) => ( + +
+ +
{product.desc}
+
+ +
+
+ ))} +
+
+ ); +};