[MODULAR] Replacces the NIFSoft Vendor with a PDA app (#18955)

* 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>
This commit is contained in:
Pinta
2023-02-07 21:31:00 -05:00
committed by GitHub
parent 1a7be4a302
commit 75692d71e6
20 changed files with 247 additions and 75 deletions
@@ -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" = (
@@ -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" = (
@@ -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" = (
+14 -4
View File
@@ -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
@@ -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"
@@ -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
@@ -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)
@@ -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
+29 -8
View File
@@ -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,
)
@@ -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
@@ -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
@@ -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
@@ -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"
@@ -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
@@ -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?
@@ -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()
. = ..()
@@ -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(
@@ -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
+2 -1
View File
@@ -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"
@@ -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 (
<NtosWindow width={500} height={700}>
<NtosWindow.Content scrollable>
<Tabs fluid>
{product_list.map((product_category) => (
<Tabs.Tab
key={product_category.key}
textAlign="center"
onClick={() => setTab(product_category.name)}
selected={tab === product_category.name}>
<b>{product_category.name}</b>
</Tabs.Tab>
))}
</Tabs>
<ProductCategory products={products} />
</NtosWindow.Content>
</NtosWindow>
);
};
const ProductCategory = (props, context) => {
const { act, data } = useBackend(context);
const { target_nif, paying_account } = data;
const { products } = props;
return (
<Section>
<Flex direction="Column">
{products.map((product) => (
<Flex.Item key={product.key}>
<Section title={product.name} fill={false}>
<Collapsible title="Product Notes">
<BlockQuote>{product.desc}</BlockQuote>
</Collapsible>
<Button
icon="shopping-bag"
color="green"
disabled={!paying_account}
onClick={() =>
act('purchase_product', {
product_to_buy: product.reference,
product_cost: product.price,
})
}
fluid>
Purchase for {product.price}cr
</Button>
</Section>
</Flex.Item>
))}
</Flex>
</Section>
);
};