From 5d4c8f4c0c159bebb1a84014c22a65164ba9a111 Mon Sep 17 00:00:00 2001 From: Zonespace <41448081+Zonespace27@users.noreply.github.com> Date: Fri, 13 Jan 2023 15:35:52 -0800 Subject: [PATCH] Mirrors #72380 (#18669) * Remove Mining LTSRBT + Change mining vendor costs to be less ass (#72380) Removes Mining LTSRBTs Adds a new cargo_cheaper variable to order consoles to make the tooltips actually imply that express costs 1x Mining Vendor cargo delivery now costs 0.65x (and rounded) Express delivery costs 1x, no cooldown. Costs displayed in the vendor are now multiplied by 0.65 to make them show the cheaper price of buying by cargo Encourage people to not fuck over ghost roles for their gamer mining vendors Encourage miners to cooperate with cargo techs (best case) to get their gear cheaper Encourage miners to talk to their own stationside department for their gamer gear cheaper, while making miners who dont do that, have costlier (normal price) gear * Update interdyne_mining.dm * SR maps Co-authored-by: jimmyl <70376633+mc-oofert@users.noreply.github.com> --- .../SpaceRuins/skyrat/cargodiselost.dmm | 1 - .../SpaceRuins/skyrat/port_tarkon/defcon2.dmm | 1 - .../SpaceRuins/skyrat/port_tarkon/defcon3.dmm | 1 - .../SpaceRuins/skyrat/port_tarkon/defcon4.dmm | 1 - .../SpaceRuins/skyrat/port_tarkon/defcon5.dmm | 1 - code/_globalvars/lists/objects.dm | 3 - .../orders/order_computer/cook_order.dm | 2 +- .../orders/order_computer/golem_order.dm | 1 - .../orders/order_computer/mining_order.dm | 46 ++++---- .../orders/order_computer/order_computer.dm | 19 ++-- .../orders/order_items/mining/order_mining.dm | 6 - code/modules/mining/mining_ltsrbt.dm | 103 ------------------ .../modules/mapping/code/interdyne_mining.dm | 1 - tgstation.dme | 1 - .../tgui/interfaces/ProduceConsole.js | 35 ++---- 15 files changed, 49 insertions(+), 173 deletions(-) delete mode 100644 code/modules/mining/mining_ltsrbt.dm diff --git a/_maps/RandomRuins/SpaceRuins/skyrat/cargodiselost.dmm b/_maps/RandomRuins/SpaceRuins/skyrat/cargodiselost.dmm index 514cfa08218..8bd1fe4d7d0 100644 --- a/_maps/RandomRuins/SpaceRuins/skyrat/cargodiselost.dmm +++ b/_maps/RandomRuins/SpaceRuins/skyrat/cargodiselost.dmm @@ -238,7 +238,6 @@ "fm" = ( /obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden, /obj/machinery/computer/order_console/mining{ - uses_ltsrbt = 0; forced_express = 1; express_cost_multiplier = 1 }, diff --git a/_maps/RandomRuins/SpaceRuins/skyrat/port_tarkon/defcon2.dmm b/_maps/RandomRuins/SpaceRuins/skyrat/port_tarkon/defcon2.dmm index 203bb42a125..f0fa5a3a965 100644 --- a/_maps/RandomRuins/SpaceRuins/skyrat/port_tarkon/defcon2.dmm +++ b/_maps/RandomRuins/SpaceRuins/skyrat/port_tarkon/defcon2.dmm @@ -4873,7 +4873,6 @@ }, /obj/effect/decal/cleanable/dirt/dust, /obj/machinery/computer/order_console/mining{ - uses_ltsrbt = 0; forced_express = 1; express_cost_multiplier = 1 }, diff --git a/_maps/RandomRuins/SpaceRuins/skyrat/port_tarkon/defcon3.dmm b/_maps/RandomRuins/SpaceRuins/skyrat/port_tarkon/defcon3.dmm index ab5ddb70acf..9014846fcf4 100644 --- a/_maps/RandomRuins/SpaceRuins/skyrat/port_tarkon/defcon3.dmm +++ b/_maps/RandomRuins/SpaceRuins/skyrat/port_tarkon/defcon3.dmm @@ -4735,7 +4735,6 @@ dir = 4 }, /obj/machinery/computer/order_console/mining{ - uses_ltsrbt = 0; forced_express = 1; express_cost_multiplier = 1 }, diff --git a/_maps/RandomRuins/SpaceRuins/skyrat/port_tarkon/defcon4.dmm b/_maps/RandomRuins/SpaceRuins/skyrat/port_tarkon/defcon4.dmm index 71d05851663..ff69c41c86a 100644 --- a/_maps/RandomRuins/SpaceRuins/skyrat/port_tarkon/defcon4.dmm +++ b/_maps/RandomRuins/SpaceRuins/skyrat/port_tarkon/defcon4.dmm @@ -4152,7 +4152,6 @@ }, /obj/effect/decal/cleanable/dirt/dust, /obj/machinery/computer/order_console/mining{ - uses_ltsrbt = 0; forced_express = 1; express_cost_multiplier = 1 }, diff --git a/_maps/RandomRuins/SpaceRuins/skyrat/port_tarkon/defcon5.dmm b/_maps/RandomRuins/SpaceRuins/skyrat/port_tarkon/defcon5.dmm index 9da06f435db..7eabedcd506 100644 --- a/_maps/RandomRuins/SpaceRuins/skyrat/port_tarkon/defcon5.dmm +++ b/_maps/RandomRuins/SpaceRuins/skyrat/port_tarkon/defcon5.dmm @@ -4502,7 +4502,6 @@ }, /obj/effect/decal/cleanable/dirt/dust, /obj/machinery/computer/order_console/mining{ - uses_ltsrbt = 0; forced_express = 1; express_cost_multiplier = 1 }, diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm index f59f2052e69..bee8a5c0184 100644 --- a/code/_globalvars/lists/objects.dm +++ b/code/_globalvars/lists/objects.dm @@ -57,6 +57,3 @@ GLOBAL_LIST_EMPTY(alert_consoles) // Station alert consoles, /obj/machinery/comp GLOBAL_LIST_EMPTY(roundstart_station_borgcharger_areas) // List of area names of roundstart station cyborg rechargers, for the low charge/no charge cyborg screen alert tooltips. GLOBAL_LIST_EMPTY(roundstart_station_mechcharger_areas) // List of area names of roundstart station mech rechargers, for the low charge/no charge mech screen alert tooltips. - -///List of all types of '/obj/machinery/mining_ltsrbt' -GLOBAL_LIST_EMPTY(mining_ltsrbt) diff --git a/code/game/machinery/computer/orders/order_computer/cook_order.dm b/code/game/machinery/computer/orders/order_computer/cook_order.dm index 0b0de93b713..2a235660a76 100644 --- a/code/game/machinery/computer/orders/order_computer/cook_order.dm +++ b/code/game/machinery/computer/orders/order_computer/cook_order.dm @@ -8,7 +8,7 @@ CATEGORY_SAUCES_REAGENTS, ) -/obj/machinery/computer/order_console/cook/order_groceries(mob/living/purchaser, obj/item/card/id/card, list/groceries, ltsrbt_delivered = FALSE) +/obj/machinery/computer/order_console/cook/order_groceries(mob/living/purchaser, obj/item/card/id/card, list/groceries) say("Thank you for your purchase! It will arrive on the next cargo shuttle!") radio.talk_into(src, "The kitchen has ordered groceries which will arrive on the cargo shuttle! Please make sure it gets to them as soon as possible!", radio_channel) for(var/datum/orderable_item/ordered_item in groceries) diff --git a/code/game/machinery/computer/orders/order_computer/golem_order.dm b/code/game/machinery/computer/orders/order_computer/golem_order.dm index 848cd720f39..c428ab3634a 100644 --- a/code/game/machinery/computer/orders/order_computer/golem_order.dm +++ b/code/game/machinery/computer/orders/order_computer/golem_order.dm @@ -3,7 +3,6 @@ circuit = /obj/item/circuitboard/computer/order_console/mining/golem forced_express = TRUE express_cost_multiplier = 1 - uses_ltsrbt = FALSE order_categories = list( CATEGORY_GOLEM, CATEGORY_MINING, 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 5cceac263fa..e50d3d7e22a 100644 --- a/code/game/machinery/computer/orders/order_computer/mining_order.dm +++ b/code/game/machinery/computer/orders/order_computer/mining_order.dm @@ -1,3 +1,6 @@ +#define MINING_SHIPPING_MULTIPLIER 0.65 +#define GET_MINING_SHIPPING_MULTIPLIER(cost) round(cost * MINING_SHIPPING_MULTIPLIER,5) + /obj/machinery/computer/order_console/mining name = "mining equipment order console" desc = "An equipment shop for miners, points collected at an ore redemption machine can be spent here." @@ -8,8 +11,12 @@ circuit = /obj/item/circuitboard/computer/order_console/mining cooldown_time = 10 SECONDS //just time to let you know your order went through. - express_cost_multiplier = 1.5 - uses_ltsrbt = TRUE + express_cost_multiplier = 1 + purchase_tooltip = @{"Your purchases will arrive at cargo, + and hopefully get delivered by them. + 35% cheaper than express delivery."} + express_tooltip = @{"Sends your purchases instantly."} + order_categories = list( CATEGORY_MINING, CATEGORY_CONSUMABLES, @@ -20,16 +27,15 @@ /obj/machinery/computer/order_console/mining/purchase_items(obj/item/card/id/card, express = FALSE) var/final_cost = get_total_cost() var/failure_message = "Sorry, but you do not have enough mining points." - if(express) - final_cost *= express_cost_multiplier - failure_message += "Remember, Express upcharges the cost!" + if(!express) + final_cost = GET_MINING_SHIPPING_MULTIPLIER(final_cost) if(final_cost <= card.mining_points) card.mining_points -= final_cost return TRUE say(failure_message) return FALSE -/obj/machinery/computer/order_console/mining/order_groceries(mob/living/purchaser, obj/item/card/id/card, list/groceries, ltsrbt_delivered = FALSE) +/obj/machinery/computer/order_console/mining/order_groceries(mob/living/purchaser, obj/item/card/id/card, list/groceries) var/list/things_to_order = list() for(var/datum/orderable_item/item as anything in groceries) things_to_order[item.item_path] = groceries[item] @@ -53,25 +59,14 @@ cost_type = "mp", can_be_cancelled = FALSE, ) - if(ltsrbt_delivered) - var/obj/machinery/mining_ltsrbt/ltsrbt - for(var/obj/machinery/mining_ltsrbt/all_ltsrbts as anything in GLOB.mining_ltsrbt) - if(all_ltsrbts.machine_stat & (NOPOWER|BROKEN|MAINT)) //not functional - continue - if(!all_ltsrbts.enabled) //not enabled - continue - ltsrbt = all_ltsrbts - break - if(ltsrbt && ltsrbt.recieve_order(new_order)) - return - say("Found no functional mining LTSRBTs. If there is one, it is likely destroyed, powered down, or under maintenance. Your delivery has instead been rerouted to Cargo.") - else - say("Thank you for your purchase! It will arrive on the next cargo shuttle!") + say("Thank you for your purchase! It will arrive on the next cargo shuttle!") radio.talk_into(src, "A shaft miner has ordered equipment which will arrive on the cargo shuttle! Please make sure it gets to them as soon as possible!", radio_channel) SSshuttle.shopping_list += new_order /obj/machinery/computer/order_console/mining/ui_data(mob/user) var/list/data = ..() + var/cost = get_total_cost() + data["total_cost"] = "[GET_MINING_SHIPPING_MULTIPLIER(cost)] (Express: [cost]) " if(!isliving(user)) return data var/mob/living/living_user = user @@ -86,6 +81,15 @@ if(!.) flick("mining-deny", src) +/obj/machinery/computer/order_console/mining/ui_static_data(mob/user) + var/list/data = ..() + for(var/list/order in data["order_datums"]) + var/cost = order["cost"] + if(isnull(cost)) //sanity check + continue + order["cost"] = GET_MINING_SHIPPING_MULTIPLIER(cost) // change costs to reflect mining shipping instead + return data + /obj/machinery/computer/order_console/mining/attackby(obj/item/weapon, mob/user, params) if(istype(weapon, /obj/item/mining_voucher)) redeem_voucher(weapon, user) @@ -206,3 +210,5 @@ #undef TO_POINT_CARD #undef TO_USER_ID +#undef MINING_SHIPPING_MULTIPLIER +#undef GET_MINING_SHIPPING_MULTIPLIER 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 f0933f0694a..ec4e986515c 100644 --- a/code/game/machinery/computer/orders/order_computer/order_computer.dm +++ b/code/game/machinery/computer/orders/order_computer/order_computer.dm @@ -7,14 +7,17 @@ GLOBAL_LIST_EMPTY(order_console_products) icon_screen = "request" icon_keyboard = "generic_key" light_color = LIGHT_COLOR_ORANGE + ///Tooltip for the express button in TGUI + var/express_tooltip = @{"Sends your purchases instantly, + but locks the console longer and increases the price!"} + ///Tooltip for the purchase button in TGUI + var/purchase_tooltip = @{"Your purchases will arrive at cargo, + and hopefully get delivered by them."} ///Cooldown between order uses. COOLDOWN_DECLARE(order_cooldown) ///Cooldown time between uses, express console will have extra time depending on express_cost_multiplier. var/cooldown_time = 60 SECONDS - ///Boolean on whether they can bluespace orders using a '/obj/machinery/mining_ltsrbt' - var/uses_ltsrbt = FALSE - ///The radio the console can speak into var/obj/item/radio/radio ///The channel we will attempt to speak into through our radio. @@ -63,7 +66,8 @@ GLOBAL_LIST_EMPTY(order_console_products) /obj/machinery/computer/order_console/ui_data(mob/user) var/list/data = list() - data["total_cost"] = get_total_cost() + var/cost = get_total_cost() + data["total_cost"] = "[cost] (Express: [cost*express_cost_multiplier])" data["off_cooldown"] = COOLDOWN_FINISHED(src, order_cooldown) if(!isliving(user)) @@ -77,7 +81,8 @@ GLOBAL_LIST_EMPTY(order_console_products) /obj/machinery/computer/order_console/ui_static_data(mob/user) var/list/data = list() - data["ltsrbt_available"] = (uses_ltsrbt && GLOB.mining_ltsrbt.len) + data["express_tooltip"] = express_tooltip + data["purchase_tooltip"] = purchase_tooltip data["forced_express"] = forced_express data["order_categories"] = order_categories data["order_datums"] = list() @@ -128,7 +133,7 @@ GLOBAL_LIST_EMPTY(order_console_products) if(get_total_cost() < CARGO_CRATE_VALUE) say("For the delivery order needs to cost more or equal to [CARGO_CRATE_VALUE] points!") return - order_groceries(living_user, used_id_card, grocery_list, ltsrbt_delivered = (action == "ltsrbt_deliver")) + order_groceries(living_user, used_id_card, grocery_list) grocery_list.Cut() COOLDOWN_START(src, order_cooldown, cooldown_time) if("express") @@ -180,5 +185,5 @@ GLOBAL_LIST_EMPTY(order_console_products) say(failure_message) return FALSE -/obj/machinery/computer/order_console/proc/order_groceries(mob/living/purchaser, obj/item/card/id/card, list/groceries, ltsrbt_delivered = FALSE) +/obj/machinery/computer/order_console/proc/order_groceries(mob/living/purchaser, obj/item/card/id/card, list/groceries) return diff --git a/code/game/machinery/computer/orders/order_items/mining/order_mining.dm b/code/game/machinery/computer/orders/order_items/mining/order_mining.dm index 033a0769249..2e7ad9c4c26 100644 --- a/code/game/machinery/computer/orders/order_items/mining/order_mining.dm +++ b/code/game/machinery/computer/orders/order_items/mining/order_mining.dm @@ -22,12 +22,6 @@ desc = "A mining-themed MODsuit that works best when in a mining environment." cost_per_order = 3000 -/datum/orderable_item/mining/mining_ltsrbt - item_path = /obj/item/circuitboard/machine/mining_ltsrbt - name = "Mining LTSRBT Board" - desc = "Tired of waiting on the Cargo shuttle? This item lets you bluespace mining orders directly to the station." - cost_per_order = 750 - /datum/orderable_item/mining/mining_belt item_path = /obj/item/storage/belt/mining cost_per_order = 500 diff --git a/code/modules/mining/mining_ltsrbt.dm b/code/modules/mining/mining_ltsrbt.dm deleted file mode 100644 index 81e6fd80c15..00000000000 --- a/code/modules/mining/mining_ltsrbt.dm +++ /dev/null @@ -1,103 +0,0 @@ -/obj/item/circuitboard/machine/mining_ltsrbt - name = "Mining LTSRBT" - icon_state = "bluespacearray" - build_path = /obj/machinery/mining_ltsrbt - req_components = list( - /obj/item/stack/ore/bluespace_crystal = 2, - /obj/item/stock_parts/subspace/ansible = 1, - /obj/item/stock_parts/micro_laser = 1, - ) - def_components = list( - /obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial, - ) - -/** - * Mining LTSRBT - * - * Recieves orders from the mining produce console - * Uses power (scaling with parts) to get that item delivered - * Only works if it's enabled, and can only be enabled on-station. - */ -/obj/machinery/mining_ltsrbt - name = "mining LTSRBT" - desc = "A variant of the Long-To-Short-Range-Bluespace-Transceiver used to deliver Mining equipment to the station as required. Nanotrasen denies the existence of any other forms of the LTSRBT." - icon_state = "exonet_node" - circuit = /obj/item/circuitboard/machine/mining_ltsrbt - density = TRUE - - ///Boolean on whether the machine is active or not - var/enabled = FALSE - ///The amount of power each use of the machine costs. - var/power_usage_per_teleport = 10000 - -/obj/machinery/mining_ltsrbt/Initialize(mapload) - . = ..() - GLOB.mining_ltsrbt += src - register_context() - -/obj/machinery/mining_ltsrbt/Destroy() - GLOB.mining_ltsrbt -= src - return ..() - -/obj/machinery/mining_ltsrbt/add_context(atom/source, list/context, obj/item/held_item, mob/user) - . = ..() - if(!held_item) - context[SCREENTIP_CONTEXT_LMB] = "turn [enabled ? "off" : "on"]" - return CONTEXTUAL_SCREENTIP_SET - - if(held_item.tool_behaviour == TOOL_SCREWDRIVER) - context[SCREENTIP_CONTEXT_LMB] = "[panel_open ? "Close" : "Open"] panel" - return CONTEXTUAL_SCREENTIP_SET - if(held_item.tool_behaviour == TOOL_CROWBAR && panel_open) - context[SCREENTIP_CONTEXT_LMB] = "Deconstruct" - return CONTEXTUAL_SCREENTIP_SET - return . - -/obj/machinery/mining_ltsrbt/attack_hand(mob/living/user, list/modifiers) - . = ..() - if(!is_station_level(z)) - balloon_alert(user, "not on station!") - user.playsound_local(loc, 'sound/machines/buzz-two.ogg', 30, TRUE) - return - enabled = !enabled - balloon_alert(user, "turned [enabled ? "on" : "off"]") - update_appearance(UPDATE_ICON) - -/obj/machinery/mining_ltsrbt/update_icon_state() - . = ..() - icon_state = enabled ? initial(icon_state) : "[icon_state]_idle" - -/obj/machinery/mining_ltsrbt/RefreshParts() - . = ..() - for(var/obj/item/stock_parts/micro_laser/laser in component_parts) - power_usage_per_teleport = (initial(power_usage_per_teleport) % laser.rating) - -/obj/machinery/mining_ltsrbt/screwdriver_act(mob/living/user, obj/item/tool) - . = ..() - if(enabled) - enabled = FALSE - update_appearance(UPDATE_ICON) - default_deconstruction_screwdriver(user, icon_state, icon_state, tool) - return TRUE - -/obj/machinery/mining_ltsrbt/crowbar_act(mob/living/user, obj/item/tool) - . = ..() - default_deconstruction_crowbar(tool) - return TRUE - -/** - * # Recieve order - * - * Recieves the order and, if successfully goes through, returns TRUE - * Otherwise will return FALSE to cancel the order. - */ -/obj/machinery/mining_ltsrbt/proc/recieve_order(datum/supply_order/order) - if(!enabled) - return FALSE - order.generate(get_turf(src)) - use_power(power_usage_per_teleport) - var/datum/effect_system/spark_spread/sparks = new - sparks.set_up(5, 1, get_turf(src)) - sparks.attach(src) - sparks.start() - return TRUE diff --git a/modular_skyrat/modules/mapping/code/interdyne_mining.dm b/modular_skyrat/modules/mapping/code/interdyne_mining.dm index 8a05b38f6a4..53e5e6a3967 100644 --- a/modular_skyrat/modules/mapping/code/interdyne_mining.dm +++ b/modular_skyrat/modules/mapping/code/interdyne_mining.dm @@ -9,7 +9,6 @@ circuit = /obj/item/circuitboard/computer/order_console/mining/interdyne forced_express = TRUE express_cost_multiplier = 1 - uses_ltsrbt = FALSE order_categories = list( CATEGORY_MINING, CATEGORY_CONSUMABLES, diff --git a/tgstation.dme b/tgstation.dme index b20d6c6a13f..dbd3a9e2e9b 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3654,7 +3654,6 @@ #include "code\modules\mining\machine_unloading.dm" #include "code\modules\mining\mine_items.dm" #include "code\modules\mining\minebot.dm" -#include "code\modules\mining\mining_ltsrbt.dm" #include "code\modules\mining\money_bag.dm" #include "code\modules\mining\ores_coins.dm" #include "code\modules\mining\satchel_ore_boxdm.dm" diff --git a/tgui/packages/tgui/interfaces/ProduceConsole.js b/tgui/packages/tgui/interfaces/ProduceConsole.js index 6c70525c5a0..2ce218eac06 100644 --- a/tgui/packages/tgui/interfaces/ProduceConsole.js +++ b/tgui/packages/tgui/interfaces/ProduceConsole.js @@ -1,4 +1,4 @@ -import { capitalize, multiline } from 'common/string'; +import { capitalize } from 'common/string'; import { useBackend, useLocalState } from '../backend'; import { Box, Button, Dimmer, Divider, Icon, NumberInput, Section, Stack } from '../components'; import { Window } from '../layouts'; @@ -94,7 +94,13 @@ const ShoppingTab = (props, context) => { const CheckoutTab = (props, context) => { const { data, act } = useBackend(context); - const { ltsrbt_available, forced_express, order_datums, total_cost } = data; + const { + purchase_tooltip, + express_tooltip, + forced_express, + order_datums, + total_cost, + } = data; const checkout_list = order_datums.filter((food) => food && (food.amt || 0)); return ( @@ -160,40 +166,19 @@ const CheckoutTab = (props, context) => { fluid icon="plane-departure" content="Purchase" - tooltip={multiline` - Your groceries will arrive at cargo, - and hopefully get delivered by them. - `} + tooltip={purchase_tooltip} tooltipPosition="top" onClick={() => act('purchase')} /> )} - {!!ltsrbt_available && ( - -