From 83a0f35c714b02ada658edb24c07aeec772adb44 Mon Sep 17 00:00:00 2001 From: shellspeed1 <46614774+shellspeed1@users.noreply.github.com> Date: Sun, 15 Sep 2024 10:45:06 -0700 Subject: [PATCH] The offstation cargo update (Ready) (#1764) ## About The Pull Request First things first, credit to tmyqlfpir aka Feignsleep for making the initial cargo crate import code. I probably butchered it when I messed with it to make it only import on console so make sure to yell at me if there are issues. This PR does several things. FIRST it brings Tarkon up to date with Interdyne as far as cargo goes. In this case, that means an express cargo console, selling pad, and powerator tied to a budget account. Second, thing, both Interdyne and Tarkon now have access to cargo company items. Its a bit janky but it should do for at least now. With how it was done, we should be able to add unique items to the consoles for each faction, although that might need some work. As a minor note, I also nerfed the interdyne powerator. It had a 2x multiplier and I'm not sure that is really needed. ## Why It's Good For The Game Cargo goes brrrt, also Tarkon could use some love. ## Proof Of Testing ![image](https://github.com/Bubberstation/Bubberstation/assets/46614774/a34cd62a-e40d-4c35-9305-20e3f77aed18) ## Changelog :cl: add: Cargo Companies are now available to offstation factions add: Tarkon now has a cargo setup available to them balance: rebalanced something /:cl: --------- Co-authored-by: The Sharkening <95130227+StrangeWeirdKitten@users.noreply.github.com> Co-authored-by: Waterpig <49160555+Majkl-J@users.noreply.github.com> Co-authored-by: Swift --- code/__DEFINES/~~bubber_defines/economy.dm | 6 +- code/controllers/subsystem/economy.dm | 1 + .../tarkon/code/misc-fluff/research.dm | 9 ++- .../code/game/machinery/syndiepad.dm | 24 +++++++ .../code/modules/cargo/expressconsole.dm | 67 +++++++++++++++++-- .../code/modules/power/powerator.dm | 19 ++++-- .../tarkon/code/misc-fluff/research.dm | 48 +++++++++++++ tgstation.dme | 1 + 8 files changed, 163 insertions(+), 12 deletions(-) create mode 100644 modular_zubbers/code/modules/tarkon/code/misc-fluff/research.dm diff --git a/code/__DEFINES/~~bubber_defines/economy.dm b/code/__DEFINES/~~bubber_defines/economy.dm index b61448ade6a..36e732f887c 100644 --- a/code/__DEFINES/~~bubber_defines/economy.dm +++ b/code/__DEFINES/~~bubber_defines/economy.dm @@ -2,6 +2,10 @@ #define CIV_JOB_SMITH 21 //By making this higher we avoid having to maintain this value if more bounties are added upstream #define CIV_JOB_PRISONER 22 //Basically restricted assistant bounties -//This is needed for dauntless to have their own cargo express console/powerator +//This is needed for Dauntless to have their own cargo express console/powerator #define ACCOUNT_INT "INT" #define ACCOUNT_INT_NAME "Interdyne Budget" + +//This is needed for Tarkon to have their own cargo express console/powerator +#define ACCOUNT_TAR "TAR" +#define ACCOUNT_TAR_NAME "Tarkon Budget" diff --git a/code/controllers/subsystem/economy.dm b/code/controllers/subsystem/economy.dm index d21286d93bf..801bc69761e 100644 --- a/code/controllers/subsystem/economy.dm +++ b/code/controllers/subsystem/economy.dm @@ -15,6 +15,7 @@ SUBSYSTEM_DEF(economy) ACCOUNT_CAR = ACCOUNT_CAR_NAME, ACCOUNT_CMD = ACCOUNT_CMD_NAME, // SKYRAT EDIT ACCOUNT_INT = ACCOUNT_INT_NAME, // BUBBER EDIT + ACCOUNT_TAR = ACCOUNT_TAR_NAME, // END BUBBER EDIT ACCOUNT_SEC = ACCOUNT_SEC_NAME) var/list/departmental_accounts = list() /** diff --git a/modular_skyrat/modules/tarkon/code/misc-fluff/research.dm b/modular_skyrat/modules/tarkon/code/misc-fluff/research.dm index ede8a398fd4..829112cf8fa 100644 --- a/modular_skyrat/modules/tarkon/code/misc-fluff/research.dm +++ b/modular_skyrat/modules/tarkon/code/misc-fluff/research.dm @@ -27,7 +27,11 @@ design_ids = list( "mod_plating_tarkon", "arcs", - "rcd_tarkon" + "rcd_tarkon", //BUBBER EDIT (comma) + "powerator_tarkon",//BUBBER EDIT Addition start + "cargoconsole_tarkon", + "bountypad_tarkon", + "bountyconsole_tarkon"//BUBBER EDIT Addition end ) research_costs = list(TECHWEB_POINT_TYPE_GENERIC = TECHWEB_TIER_5_POINTS) hidden = TRUE @@ -80,7 +84,7 @@ RND_CATEGORY_TOOLS + RND_SUBCATEGORY_TOOLS_ENGINEERING_ADVANCED ) departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING - + ///// Now we make the physical server ///// /obj/item/circuitboard/machine/rdserver/tarkon @@ -176,3 +180,4 @@ qdel(research_notes) return return ..() + diff --git a/modular_zubbers/code/game/machinery/syndiepad.dm b/modular_zubbers/code/game/machinery/syndiepad.dm index f1d8cf3be7b..1f324075c28 100644 --- a/modular_zubbers/code/game/machinery/syndiepad.dm +++ b/modular_zubbers/code/game/machinery/syndiepad.dm @@ -135,3 +135,27 @@ pad.icon_state = pad.idle_state #undef SYN_BOUNTY_PAD_WARM_TIME + +//Tarkon Pad +/obj/item/circuitboard/machine/syndiepad/tarkon + name = "tarkon bounty pad" + greyscale_colors = CIRCUIT_COLOR_GENERIC + build_path = /obj/machinery/piratepad/syndiepad/tarkon + +/obj/machinery/piratepad/syndiepad/tarkon + name = "Tarkon bounty pad" + desc = "A standard Tarkon bounty pad used by Tarkon Industries \ + send any (non-living) object to an distant off-sector\ \ + for processing. No returns!" + circuit = /obj/item/circuitboard/machine/syndiepad/tarkon + + +/obj/item/circuitboard/computer/syndiepad/tarkon + name = "tarkon bounty control terminal" + build_path = /obj/machinery/computer/piratepad_control/syndiepad/tarkon + +/obj/machinery/computer/piratepad_control/syndiepad/tarkon + name = "Tarkon bounty control terminal" + desc = "A console for an old model of a citizen bounty pad." + circuit = /obj/item/circuitboard/computer/syndiepad/tarkon + credits_account = ACCOUNT_TAR diff --git a/modular_zubbers/code/modules/cargo/expressconsole.dm b/modular_zubbers/code/modules/cargo/expressconsole.dm index 7f415e517f4..2340b562ab7 100644 --- a/modular_zubbers/code/modules/cargo/expressconsole.dm +++ b/modular_zubbers/code/modules/cargo/expressconsole.dm @@ -10,19 +10,78 @@ being emagged by the Syndicate cadets of the SSV Dauntless." circuit = /obj/item/circuitboard/computer/cargo/express/interdyne req_access = list(ACCESS_SYNDICATE) - - podType = /obj/structure/closet/supplypod/bluespacepod - cargo_account = ACCOUNT_INT + contraband = TRUE + var/allowed_categories = list(COMPANY_NAME_VITEZSTVI_AMMO, //used for company items import supports companies and specific categories + COMPANY_NAME_ALLSTAR_ENERGY, + COMPANY_NAME_MICRON_CONTROL_SYSTEMS, + COMPANY_NAME_SOL_DEFENSE_DEFENSE, + COMPANY_NAME_FRONTIER_EQUIPMENT, + COMPANY_NAME_KAHRAMAN_INDUSTRIES, + COMPANY_NAME_DONK_CO, + COMPANY_NAME_DEFOREST_MEDICAL, + COMPANY_NAME_NRI_SURPLUS, + COMPANY_NAME_BLACKSTEEL_FOUNDATION, + COMPANY_NAME_NAKAMURA_ENGINEERING_MODSUITS + ) + podType = /obj/structure/closet/supplypod/bluespacepod /obj/machinery/computer/cargo/express/interdyne/emag_act(mob/user, obj/item/card/emag/emag_card) if(user) to_chat(user, span_notice("You try to change the routing protocols, however the machine displays a runtime error and reboots.")) return FALSE//never let this console be emagged +/obj/machinery/computer/cargo/express/interdyne/packin_up()//we're the dauntless, add the company imports stuff to our express console + . = ..() + + if(!meme_pack_data["Company Imports"]) + meme_pack_data["Company Imports"] = list( + "name" = "Company Imports", + "packs" = list() + ) + + for(var/armament_category as anything in SSarmaments.entries)//babe! it's 4pm, time for the company importing logic + for(var/subcategory as anything in SSarmaments.entries[armament_category][CATEGORY_ENTRY]) + if(armament_category in allowed_categories) + for(var/datum/armament_entry/armament_entry as anything in SSarmaments.entries[armament_category][CATEGORY_ENTRY][subcategory]) + meme_pack_data["Company Imports"]["packs"] += list(list( + "name" = "[armament_category]: [armament_entry.name]", + "cost" = armament_entry.cost, + "id" = REF(armament_entry), + "description" = armament_entry.description, + )) + /obj/machinery/computer/cargo/express/interdyne/ui_act(action, params, datum/tgui/ui) if(action == "add")//if we're generating a supply order if (!beacon || !usingBeacon)//if not using beacon say("Error! Destination is not whitelisted, aborting.") return - . = ..() + var/id = params["id"] + id = text2path(id) || id + var/datum/supply_pack/is_supply_pack = SSshuttle.supply_packs[id] + if(!is_supply_pack || !istype(is_supply_pack))//if we're ordering a company import pack, add a temp pack to the global supply packs list, and remove it + var/datum/armament_entry/armament_order = locate(id) + params["id"] = length(SSshuttle.supply_packs) + 1 + var/datum/supply_pack/armament/temp_pack = new + temp_pack.name = initial(armament_order.item_type.name) + temp_pack.cost = armament_order.cost + temp_pack.contains = list(armament_order.item_type) + SSshuttle.supply_packs += temp_pack + . = ..() + SSshuttle.supply_packs -= temp_pack + return . + return ..() + + +//Tarkons console +/obj/item/circuitboard/computer/cargo/express/interdyne/tarkon + name = "Tarkon Express Supply Console" + build_path = /obj/machinery/computer/cargo/express/interdyne/tarkon + contraband = TRUE + +/obj/machinery/computer/cargo/express/interdyne/tarkon + name = "interdyne express supply console" + desc = "A standard Tarkon express console." + circuit = /obj/item/circuitboard/computer/cargo/express/interdyne/tarkon + req_access = list(ACCESS_TARKON) + cargo_account = ACCOUNT_TAR diff --git a/modular_zubbers/code/modules/power/powerator.dm b/modular_zubbers/code/modules/power/powerator.dm index 164a18fe955..78069aa4e7c 100644 --- a/modular_zubbers/code/modules/power/powerator.dm +++ b/modular_zubbers/code/modules/power/powerator.dm @@ -1,16 +1,25 @@ /obj/item/circuitboard/machine/powerator/interdyne - name = "Ancient Powerator" + name = "Interdyne Powerator" greyscale_colors = CIRCUIT_COLOR_SUPPLY build_path = /obj/machinery/powerator/interdyne /obj/machinery/powerator/interdyne - name = "ancient powerator" + name = "Interdyne powerator" desc = "Beyond the ridiculous name, it is the standard for transporting and selling energy to power networks that require additional sources! It appears to be an earlier variant before environmental regulation reduced its efficiency." circuit = /obj/item/circuitboard/machine/powerator/interdyne /// the account credits will be sent towards credits_account = ACCOUNT_INT -/obj/machinery/powerator/interdyne/RefreshParts() - . = ..() - divide_ratio *= 2 //Make it easier for the folks down at Interdyne to make some CASH MONEY +/obj/item/circuitboard/machine/powerator/tarkon + name = "Tarkon Powerator" + greyscale_colors = CIRCUIT_COLOR_SUPPLY + build_path = /obj/machinery/powerator/tarkon + +/obj/machinery/powerator/tarkon + name = "Tarkon powerator" + desc = "Beyond the ridiculous name, it is the standard for transporting and selling energy to power networks that require additional sources! It appears to be an earlier variant before environmental regulation reduced its efficiency." + circuit = /obj/item/circuitboard/machine/powerator/tarkon + + /// the account credits will be sent towards + credits_account = ACCOUNT_TAR diff --git a/modular_zubbers/code/modules/tarkon/code/misc-fluff/research.dm b/modular_zubbers/code/modules/tarkon/code/misc-fluff/research.dm new file mode 100644 index 00000000000..30e373ba071 --- /dev/null +++ b/modular_zubbers/code/modules/tarkon/code/misc-fluff/research.dm @@ -0,0 +1,48 @@ +///// Bubber added Tarkon Tech ///// +/datum/design/tarkonpowerator + name = "Tarkon Powerator" + desc = "The circuit board for a machine that can sell power." + id = "powerator_tarkon" + build_type = PROTOLATHE | AWAY_LATHE + materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 1) + build_path = /obj/item/circuitboard/machine/powerator/tarkon + category = list( + RND_CATEGORY_TOOLS + RND_SUBCATEGORY_TOOLS_ENGINEERING_ADVANCED + ) + departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING + +/datum/design/tarkonexpressconsole + name = "Tarkon Express Cargo Console" + desc = "The circuit board for a computer used to purchase goods." + id = "cargoconsole_tarkon" + build_type = PROTOLATHE | AWAY_LATHE + materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 1) + build_path = /obj/item/circuitboard/computer/cargo/express/interdyne/tarkon + category = list( + RND_CATEGORY_TOOLS + RND_SUBCATEGORY_TOOLS_ENGINEERING_ADVANCED + ) + departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING + +/datum/design/bountypad + name = "Tarkon Bounty Pad" + desc = "The circuit board for a machine used to sell goods." + id = "bountypad_tarkon" + build_type = PROTOLATHE | AWAY_LATHE + materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 1) + build_path = /obj/item/circuitboard/machine/syndiepad/tarkon + category = list( + RND_CATEGORY_TOOLS + RND_SUBCATEGORY_TOOLS_ENGINEERING_ADVANCED + ) + departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING + +/datum/design/bountypadconsole + name = "Tarkon Express Cargo Console" + desc = "The circuit board for the Ta used to sell goods." + id = "bountyconsole_tarkon" + build_type = PROTOLATHE | AWAY_LATHE + materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT * 1) + build_path = /obj/item/circuitboard/computer/syndiepad/tarkon + category = list( + RND_CATEGORY_TOOLS + RND_SUBCATEGORY_TOOLS_ENGINEERING_ADVANCED + ) + departmental_flags = DEPARTMENT_BITFLAG_ENGINEERING diff --git a/tgstation.dme b/tgstation.dme index 25f01ccc1ae..b6c4d5999d0 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -9194,6 +9194,7 @@ #include "modular_zubbers\code\modules\surgery\organs\external\wings.dm" #include "modular_zubbers\code\modules\surgery\organs\internal\eyes\_eyes.dm" #include "modular_zubbers\code\modules\surgery\organs\internal\lungs\_lungs.dm" +#include "modular_zubbers\code\modules\tarkon\code\misc-fluff\research.dm" #include "modular_zubbers\code\modules\taur_mechanics\serpentine_taur.dm" #include "modular_zubbers\code\modules\title_screen\code\title_screen_subsystem.dm" #include "modular_zubbers\code\modules\vehicles\mech_fabricator.dm"