diff --git a/code/__DEFINES/economy.dm b/code/__DEFINES/economy.dm index a1108ba7fb0..c98a5c49b82 100644 --- a/code/__DEFINES/economy.dm +++ b/code/__DEFINES/economy.dm @@ -81,3 +81,12 @@ #define MARKET_TREND_STABLE 0 #define MARKET_EVENT_PROBABILITY 8 //Probability of a market event firing, in percent. Fires once per material, every stock market tick. + +/// The symbol for the default type of money used in the code. +#define MONEY_SYMBOL "cr" +/// The name for the default type of money used in the code. +#define MONEY_NAME "credits" +#define MONEY_NAME_SINGULAR "credit" + +#define MONEY_MINING_SYMBOL "mp" +#define MONEY_BITRUNNING_SYMBOL "np" diff --git a/code/game/machinery/computer/orders/order_computer/mining_order.dm b/code/game/machinery/computer/orders/order_computer/mining_order.dm index 97e9e74b5ce..b7082507a87 100644 --- a/code/game/machinery/computer/orders/order_computer/mining_order.dm +++ b/code/game/machinery/computer/orders/order_computer/mining_order.dm @@ -1,4 +1,4 @@ -#define CREDIT_TYPE_MINING "mp" + /obj/machinery/computer/order_console/mining name = "mining equipment order console" @@ -15,7 +15,7 @@ and hopefully get delivered by them. 35% cheaper than express delivery."} express_tooltip = @{"Sends your purchases instantly."} - credit_type = CREDIT_TYPE_MINING + credit_type = MONEY_MINING_SYMBOL order_categories = list( CATEGORY_MINING, @@ -127,6 +127,5 @@ points += amount to_chat(user, span_notice("You transfer [amount] mining points from [attacking_id] to [src].")) -#undef CREDIT_TYPE_MINING #undef TO_POINT_CARD #undef TO_USER_ID diff --git a/code/game/machinery/computer/orders/order_computer/order_computer.dm b/code/game/machinery/computer/orders/order_computer/order_computer.dm index 02b26438d50..d89dd05c434 100644 --- a/code/game/machinery/computer/orders/order_computer/order_computer.dm +++ b/code/game/machinery/computer/orders/order_computer/order_computer.dm @@ -1,6 +1,5 @@ ///List of all items that can be found in the different types of order consoles, to purchase. GLOBAL_LIST_EMPTY(order_console_products) -#define CREDIT_TYPE_CREDIT "credit" /obj/machinery/computer/order_console name = "Orders Console" @@ -25,7 +24,7 @@ GLOBAL_LIST_EMPTY(order_console_products) var/announcement_line ///The kind of cash does the console use. - var/credit_type = CREDIT_TYPE_CREDIT + var/credit_type = MONEY_SYMBOL ///Whether the console can only use express mode ONLY var/forced_express = FALSE ///Multiplied cost to use for cargo mode @@ -250,5 +249,3 @@ GLOBAL_LIST_EMPTY(order_console_products) announcement_lines_map["Error"] = "Unknown Error happened, while we tried to procceed an order, please report this to Nanotrasen." . = ..() - -#undef CREDIT_TYPE_CREDIT diff --git a/code/modules/bitrunning/objects/vendor.dm b/code/modules/bitrunning/objects/vendor.dm index c42a954b978..a850cd75c99 100644 --- a/code/modules/bitrunning/objects/vendor.dm +++ b/code/modules/bitrunning/objects/vendor.dm @@ -1,5 +1,3 @@ -#define CREDIT_TYPE_BITRUNNING "np" - /obj/machinery/computer/order_console/bitrunning name = "bitrunning supplies order console" desc = "NexaCache(tm)! Dubiously authentic gear for the digital daredevil." @@ -15,7 +13,7 @@ and hopefully get delivered by them. 35% cheaper than express delivery."} express_tooltip = @{"Sends your purchases instantly."} - credit_type = CREDIT_TYPE_BITRUNNING + credit_type = MONEY_BITRUNNING_SYMBOL order_categories = list( CATEGORY_BITRUNNING_FLAIR, @@ -84,5 +82,3 @@ name = "[purchaser]'s Bitrunning Order" src.cost = cost src.contains = contains - -#undef CREDIT_TYPE_BITRUNNING diff --git a/code/modules/cargo/materials_market.dm b/code/modules/cargo/materials_market.dm index 019c8f94503..22983d671e2 100644 --- a/code/modules/cargo/materials_market.dm +++ b/code/modules/cargo/materials_market.dm @@ -317,7 +317,7 @@ orderer_rank = GALATIC_MATERIAL_ORDER, orderer_ckey = living_user.ckey, paying_account = is_ordering_private ? account_payable : null, - cost_type = "cr", + cost_type = MONEY_SYMBOL, can_be_cancelled = FALSE ) //first time order compute the correct cost and compare diff --git a/code/modules/cargo/order.dm b/code/modules/cargo/order.dm index 9241cf9da99..b31dc83c459 100644 --- a/code/modules/cargo/order.dm +++ b/code/modules/cargo/order.dm @@ -72,7 +72,7 @@ coupon, charge_on_purchase = TRUE, manifest_can_fail = TRUE, - cost_type = "cr", + cost_type = MONEY_SYMBOL, can_be_cancelled = TRUE, ) id = SSshuttle.order_number++ diff --git a/code/modules/cargo/orderconsole.dm b/code/modules/cargo/orderconsole.dm index e3a17a52ff9..a66e53bc0a3 100644 --- a/code/modules/cargo/orderconsole.dm +++ b/code/modules/cargo/orderconsole.dm @@ -157,6 +157,9 @@ "packs" = get_packs_data(pack.group), ) + data["displayed_currency_full_name"] = " [MONEY_NAME]" + data["displayed_currency_name"] = " [MONEY_SYMBOL]" + return data /** diff --git a/code/modules/mob/living/basic/trader/trader.dm b/code/modules/mob/living/basic/trader/trader.dm index 9b01261fa51..c23726a562b 100644 --- a/code/modules/mob/living/basic/trader/trader.dm +++ b/code/modules/mob/living/basic/trader/trader.dm @@ -23,7 +23,7 @@ ///Sound used when item sold/bought var/sell_sound = 'sound/effects/cashregister.ogg' ///The currency name - var/currency_name = "credits" + var/currency_name = MONEY_NAME ///The spawner we use to create our look var/spawner_path = /obj/effect/mob_spawn/corpse/human/generic_assistant ///Our species to create our look diff --git a/code/modules/mob/living/basic/trader/trader_data.dm b/code/modules/mob/living/basic/trader/trader_data.dm index c47e200154f..6af2c85530e 100644 --- a/code/modules/mob/living/basic/trader/trader_data.dm +++ b/code/modules/mob/living/basic/trader/trader_data.dm @@ -8,7 +8,7 @@ ///Sound used when item sold/bought var/sell_sound = 'sound/effects/cashregister.ogg' ///The currency name - var/currency_name = "credits" + var/currency_name = MONEY_NAME ///The initial products that the trader offers var/list/initial_products = list( /obj/item/food/burger/ghost = list(PAYCHECK_CREW * 4, INFINITY), diff --git a/code/modules/vending/sustenance.dm b/code/modules/vending/sustenance.dm index 05f71b4eb6b..71313d74140 100644 --- a/code/modules/vending/sustenance.dm +++ b/code/modules/vending/sustenance.dm @@ -50,7 +50,7 @@ icon_state = "sustenance_labor" all_products_free = FALSE displayed_currency_icon = "digging" - displayed_currency_name = " LP" + displayed_currency_name = "LP" allow_custom = FALSE /obj/machinery/vending/sustenance/labor_camp/proceed_payment(obj/item/card/id/advanced/prisoner/paying_scum_id, mob/living/mob_paying, datum/data/vending_product/product_to_vend, price_to_use) diff --git a/code/modules/vending/vendor/_vending.dm b/code/modules/vending/vendor/_vending.dm index 3df88989705..eb27528a0c8 100644 --- a/code/modules/vending/vendor/_vending.dm +++ b/code/modules/vending/vendor/_vending.dm @@ -153,7 +153,7 @@ ///fontawesome icon name to use in to display the user's balance in the vendor UI var/displayed_currency_icon = "coins" ///String of the used currency to display in the vendor UI - var/displayed_currency_name = " cr" + var/displayed_currency_name = MONEY_SYMBOL ///Whether our age check is currently functional var/age_restrictions = TRUE /// How many credits does this vending machine have? 20% of all sales go to this pool, and are given freely when the machine is restocked, or successfully tilted. Lost on deconstruction. diff --git a/code/modules/vending/vendor/ui_data.dm b/code/modules/vending/vendor/ui_data.dm index 49e90b946de..c375e0a78d6 100644 --- a/code/modules/vending/vendor/ui_data.dm +++ b/code/modules/vending/vendor/ui_data.dm @@ -70,7 +70,7 @@ data["jobDiscount"] = DEPARTMENT_DISCOUNT data["product_records"] = list() data["displayed_currency_icon"] = displayed_currency_icon - data["displayed_currency_name"] = displayed_currency_name + data["displayed_currency_name"] = " [displayed_currency_name]" var/list/categories = list() diff --git a/tgui/packages/tgui/interfaces/Cargo/CargoButtons.tsx b/tgui/packages/tgui/interfaces/Cargo/CargoButtons.tsx index 04b201017dd..f069fd94f11 100644 --- a/tgui/packages/tgui/interfaces/Cargo/CargoButtons.tsx +++ b/tgui/packages/tgui/interfaces/Cargo/CargoButtons.tsx @@ -6,7 +6,7 @@ import type { CargoData } from './types'; export function CargoCartButtons(props) { const { act, data } = useBackend(); - const { cart = [], requestonly, can_send, can_approve_requests } = data; + const { cart = [], requestonly, can_send, can_approve_requests, displayed_currency_name } = data; let total = 0; let amount = 0; @@ -24,7 +24,7 @@ export function CargoCartButtons(props) { {amount === 0 && 'Cart is empty'} {amount === 1 && '1 item'} {amount >= 2 && `${amount} items`}{' '} - {total > 0 && `(${formatMoney(total)} cr)`} + {total > 0 && `(${formatMoney(total)}${displayed_currency_name})`}