From 5b4eff3bdabd65a8f6ac25b4fc96de3c7885394a Mon Sep 17 00:00:00 2001 From: rye-rice <58402542+rye-rice@users.noreply.github.com> Date: Fri, 29 Nov 2024 12:20:09 -0800 Subject: [PATCH] Factional Cargo, done in a day (#3758) ## About The Pull Request Split off from Overmap Expansion # 5 This was done in a day. Yes. This Thing that has been anticipated for 2-3 years was done in a day. How did I even accomplish this? While attempting to unhardcode cargo/clean up outpost code, I noticed that factional cargo was actually really easy to do. So I did it. If I really wanted to be fancy, I could take 12 months to code cargo from scratch. But this was easier. So I did it. huge thanks to @firebudgy for coding support and adding more stuff to factional cargo instead of this just being a bare framework ## Why It's Good For The Game ![November 12 2024 462](https://github.com/user-attachments/assets/49e8e086-767b-4f8b-abbf-375e4d61d822) ![November 12 2024 461](https://github.com/user-attachments/assets/6777d7d5-a7d1-48d7-9eb1-57685123dae1) ![November 12 2024 460](https://github.com/user-attachments/assets/95df2b56-f499-4895-8600-28dbfebae145) ## Changelog :cl: rye-rice, firebudgy add: Factional cargo. del: the remminants of the P16 as it was already completely removed in Serene Sporting balance: Sporter is now 400 credits. /:cl: --------- Signed-off-by: rye-rice <58402542+rye-rice@users.noreply.github.com> Signed-off-by: Mark Suckerberg Co-authored-by: retlaw34 <58402542+retlaw34@users.noreply.github.com> Co-authored-by: Mark Suckerberg --- check_regex.yaml | 2 +- code/controllers/subsystem/shuttle.dm | 15 - .../objects/items/storage/filled_guncases.dm | 143 +++++- code/modules/cargo/console.dm | 180 ++++--- code/modules/cargo/order.dm | 7 +- code/modules/cargo/packs.dm | 4 +- code/modules/cargo/packs/civilian.dm | 2 +- code/modules/cargo/packs/costumes_toys.dm | 2 +- code/modules/cargo/packs/food.dm | 2 +- code/modules/cargo/packs/gun.dm | 464 +++++++++++++++--- code/modules/cargo/packs/magazines.dm | 121 ++++- code/modules/cargo/packs/material.dm | 3 +- code/modules/cargo/packs/medical.dm | 16 +- code/modules/cargo/packs/sec_supply.dm | 50 +- code/modules/cargo/packs/spacesuit_armor.dm | 11 +- code/modules/events/stray_cargo.dm | 76 --- code/modules/faction/faction_datum.dm | 23 + .../overmap/objects/outpost/outpost.dm | 18 + .../overmap/objects/outpost/outpost_types.dm | 1 + .../projectiles/guns/ballistic/assault.dm | 28 -- .../reagents/reagent_containers/bottle.dm | 5 + .../spells/spell_types/rightandwrong.dm | 2 +- shiptest.dme | 1 - .../OutpostCommunications/Catalog.js | 22 +- 24 files changed, 865 insertions(+), 333 deletions(-) delete mode 100644 code/modules/events/stray_cargo.dm diff --git a/check_regex.yaml b/check_regex.yaml index 95d3738da5dc..335b1b005c74 100644 --- a/check_regex.yaml +++ b/check_regex.yaml @@ -31,7 +31,7 @@ standards: - exactly: [4, "/mob text paths", '"/mob'] - exactly: [33, "/obj text paths", '"/obj'] - exactly: [0, "/turf text paths", '"/turf'] - - exactly: [114, "text2path uses", "text2path"] + - exactly: [113, "text2path uses", "text2path"] - exactly: [18, "world<< uses", 'world[ \t]*<<'] - exactly: [0, "world.log<< uses", 'world.log[ \t]*<<'] diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index 4dcfa7598a9e..a6a3dafd1590 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -30,23 +30,11 @@ SUBSYSTEM_DEF(shuttle) /// Whether express consoles are blocked from ordering anything or not var/supplyBlocked = FALSE - /// Order number given to next cargo order - var/ordernum = 1 - /// List of all singleton supply pack instances - var/list/supply_packs = list() /// Stops ALL shuttles from being able to move var/lockdown = FALSE /datum/controller/subsystem/shuttle/Initialize(timeofday) - ordernum = rand(1, 9000) - - for(var/pack in subtypesof(/datum/supply_pack)) - var/datum/supply_pack/P = new pack() - if(!P.contains) - continue - supply_packs[P.type] = P - for(var/obj/docking_port/stationary/stationary_port as anything in stationary) stationary_port.load_roundstart() CHECK_TICK @@ -193,10 +181,7 @@ SUBSYSTEM_DEF(shuttle) transit_requesters = SSshuttle.transit_requesters if (istype(SSshuttle.transit_request_failures)) transit_request_failures = SSshuttle.transit_request_failures - if (istype(SSshuttle.supply_packs)) - supply_packs = SSshuttle.supply_packs - ordernum = SSshuttle.ordernum lockdown = SSshuttle.lockdown /datum/controller/subsystem/shuttle/proc/is_in_shuttle_bounds(atom/A) diff --git a/code/game/objects/items/storage/filled_guncases.dm b/code/game/objects/items/storage/filled_guncases.dm index cc432f85b0b3..c61a56114973 100644 --- a/code/game/objects/items/storage/filled_guncases.dm +++ b/code/game/objects/items/storage/filled_guncases.dm @@ -23,6 +23,9 @@ /obj/item/storage/guncase/pistol/shadow gun_type = /obj/item/gun/ballistic/revolver/shadow +/obj/item/storage/guncase/pistol/ashhand + gun_type = /obj/item/gun/ballistic/revolver/ashhand + /obj/item/storage/guncase/hellfire gun_type = /obj/item/gun/ballistic/shotgun/hellfire @@ -52,6 +55,14 @@ /obj/item/storage/guncase/absolution gun_type = /obj/item/gun/ballistic/shotgun/flamingarrow/absolution +/obj/item/storage/guncase/firestorm + gun_type = /obj/item/gun/ballistic/automatic/smg/firestorm + mag_type = /obj/item/ammo_box/magazine/c45_firestorm_mag + +/obj/item/storage/guncase/vickland + gun_type = /obj/item/gun/ballistic/automatic/marksman/vickland + mag_type = /obj/item/ammo_box/vickland_a308 + /* Scarbourough */ /obj/item/storage/guncase/pistol/a357 @@ -86,6 +97,34 @@ gun_type = /obj/item/gun/ballistic/automatic/marksman/boomslang/indie mag_type = /obj/item/ammo_box/magazine/boomslang/short +/obj/item/storage/guncase/boomslangmilitary + gun_type = /obj/item/gun/ballistic/automatic/marksman/boomslang + mag_type = /obj/item/ammo_box/magazine/boomslang/short + +/obj/item/storage/guncase/rattlesnake + gun_type = /obj/item/gun/ballistic/automatic/pistol/rattlesnake + mag_type = /obj/item/ammo_box/magazine/m9mm_rattlesnake + +/obj/item/storage/guncase/bulldog + gun_type = /obj/item/gun/ballistic/shotgun/automatic/bulldog + mag_type = /obj/item/ammo_box/magazine/m12g_bulldog + +/obj/item/storage/guncase/sidewinder + gun_type = /obj/item/gun/ballistic/automatic/smg/sidewinder + mag_type = /obj/item/ammo_box/magazine/m57_39_sidewinder + +/obj/item/storage/guncase/hydra + gun_type = /obj/item/gun/ballistic/automatic/assault/hydra + mag_type = /obj/item/ammo_box/magazine/m556_42_hydra + +/obj/item/storage/guncase/sbr80 + gun_type = /obj/item/gun/ballistic/automatic/assault/hydra/dmr + mag_type = /obj/item/ammo_box/magazine/m556_42_hydra/small + +/obj/item/storage/guncase/taipan + gun_type = /obj/item/gun/ballistic/automatic/marksman/taipan + mag_type = /obj/item/ammo_box/magazine/sniper_rounds + /* Etherbor */ /obj/item/storage/guncase/pistol/kalixpistol @@ -96,6 +135,18 @@ gun_type = /obj/item/gun/energy/kalix mag_type = /obj/item/stock_parts/cell/gun/kalix +/obj/item/storage/guncase/energy/bg16 + gun_type = /obj/item/gun/energy/kalix/pgf + mag_type = /obj/item/stock_parts/cell/gun/pgf + +/obj/item/storage/guncase/energy/hbg7 + gun_type = /obj/item/gun/energy/kalix/pgf/heavy + mag_type = /obj/item/stock_parts/cell/gun/pgf + +/obj/item/storage/guncase/energy/hbg7l + gun_type = /obj/item/gun/energy/kalix/pgf/heavy/sniper + mag_type = /obj/item/stock_parts/cell/gun/pgf + /* Serene Outdoors Guns */ /obj/item/storage/guncase/pistol/m17 @@ -124,12 +175,32 @@ gun_type = /obj/item/gun/ballistic/automatic/powered/gauss/modelh mag_type = /obj/item/ammo_box/magazine/modelh +/obj/item/storage/guncase/pistol/pistolec + gun_type = /obj/item/gun/ballistic/automatic/pistol/solgov + mag_type = /obj/item/ammo_box/magazine/pistol556mm + +/obj/item/storage/guncase/ssg669 + gun_type = /obj/item/gun/ballistic/rifle/solgov + mag_type = /obj/item/ammo_box/a858 + +/obj/item/storage/guncase/claris + gun_type = /obj/item/gun/ballistic/automatic/powered/gauss/claris + mag_type = /obj/item/ammo_box/amagpellet_claris + +/obj/item/storage/guncase/gar + gun_type = /obj/item/gun/ballistic/automatic/powered/gauss/gar + mag_type = /obj/item/ammo_box/magazine/gar + /* VI */ /obj/item/storage/guncase/pistol/commander gun_type = /obj/item/gun/ballistic/automatic/pistol/commander mag_type = /obj/item/ammo_box/magazine/co9mm +/obj/item/storage/guncase/vector + gun_type = /obj/item/gun/ballistic/automatic/smg/vector + mag_type = /obj/item/ammo_box/magazine/smgm9mm + /* Sharplite */ /obj/item/storage/guncase/pistol/miniegun @@ -148,11 +219,24 @@ /obj/item/storage/guncase/energy/iongun gun_type = /obj/item/gun/energy/ionrifle +/obj/item/storage/guncase/hades + gun_type = /obj/item/gun/energy/e_gun/hades + mag_type = /obj/item/stock_parts/cell/gun/upgraded + /* Old NT */ + /obj/item/storage/guncase/wt550 gun_type = /obj/item/gun/ballistic/automatic/smg/wt550 mag_type = /obj/item/ammo_box/magazine/wt550m9 +/obj/item/storage/guncase/gauss + gun_type = /obj/item/gun/ballistic/automatic/powered/gauss + mag_type = /obj/item/ammo_box/magazine/gauss + +/obj/item/storage/guncase/saber + gun_type = /obj/item/gun/ballistic/automatic/smg/skm_carbine/saber + mag_type = /obj/item/ammo_box/magazine/smgm9mm + /* Minutemen */ /obj/item/storage/guncase/pistol/cm23 @@ -167,6 +251,56 @@ gun_type = /obj/item/gun/ballistic/automatic/pistol/cm357 mag_type = /obj/item/ammo_box/magazine/cm357 +/obj/item/storage/guncase/cm5 + gun_type = /obj/item/gun/ballistic/automatic/smg/cm5 + mag_type = /obj/item/ammo_box/magazine/cm5_9mm + +/obj/item/storage/guncase/cm82 + gun_type = /obj/item/gun/ballistic/automatic/assault/cm82 + mag_type = /obj/item/ammo_box/magazine/p16 + +/obj/item/storage/guncase/cmf4 + gun_type = /obj/item/gun/ballistic/automatic/marksman/f4 + mag_type = /obj/item/ammo_box/magazine/f4_308 + +/obj/item/storage/guncase/cm15 + gun_type = /obj/item/gun/ballistic/shotgun/cm15 + mag_type = /obj/item/ammo_box/magazine/cm15_12g + +/obj/item/storage/guncase/cmf90 + gun_type = /obj/item/gun/ballistic/automatic/marksman/f90 + mag_type = /obj/item/ammo_box/magazine/f90 + +/obj/item/storage/guncase/cm40 + gun_type = /obj/item/gun/ballistic/automatic/hmg/cm40 + mag_type = /obj/item/ammo_box/magazine/cm40_762_40_box + +/* Inteq */ + +/obj/item/storage/guncase/skm_inteq + gun_type = /obj/item/gun/ballistic/automatic/assault/skm/inteq + mag_type = /obj/item/ammo_box/magazine/skm_762_40 + +/obj/item/storage/guncase/commissioner + gun_type = /obj/item/gun/ballistic/automatic/pistol/commander/inteq + mag_type = /obj/item/ammo_box/magazine/co9mm + +/obj/item/storage/guncase/mongrel + gun_type = /obj/item/gun/ballistic/automatic/smg/skm_carbine/inteq + mag_type = /obj/item/ammo_box/magazine/smgm10mm + +/obj/item/storage/guncase/mastiff + gun_type = /obj/item/gun/ballistic/shotgun/automatic/bulldog/inteq + mag_type = /obj/item/ammo_box/magazine/m12g_bulldog + +/obj/item/storage/guncase/kingsnake + gun_type = /obj/item/gun/ballistic/automatic/pistol/rattlesnake/inteq + mag_type = /obj/item/ammo_box/magazine/m9mm_rattlesnake + +/obj/item/storage/guncase/ssg04 + gun_type = /obj/item/gun/ballistic/automatic/marksman/f4/inteq + mag_type = /obj/item/ammo_box/magazine/f4_308 + /* idk */ /obj/item/storage/guncase/pistol/disposable @@ -174,11 +308,10 @@ new /obj/item/gun/ballistic/automatic/pistol/disposable(src) new /obj/item/gun/ballistic/automatic/pistol/disposable(src) -/obj/item/storage/guncase/p16 - gun_type = /obj/item/gun/ballistic/automatic/assault/p16 - mag_type = /obj/item/ammo_box/magazine/p16 - - /obj/item/storage/guncase/skm gun_type = /obj/item/gun/ballistic/automatic/assault/skm mag_type = /obj/item/ammo_box/magazine/skm_762_40 + +/obj/item/storage/guncase/skm_lmg + gun_type = /obj/item/gun/ballistic/automatic/hmg/skm_lmg + mag_type = /obj/item/ammo_box/magazine/skm_762_40/drum diff --git a/code/modules/cargo/console.dm b/code/modules/cargo/console.dm index c06b7c6bc51e..1d937060b8c0 100644 --- a/code/modules/cargo/console.dm +++ b/code/modules/cargo/console.dm @@ -13,6 +13,8 @@ circuit = /obj/item/circuitboard/computer/cargo light_color = COLOR_BRIGHT_ORANGE + /// The ship we reside on for ease of access + var/datum/overmap/ship/controlled/current_ship var/contraband = FALSE var/self_paid = FALSE var/safety_warning = "For safety reasons, the automated supply shuttle \ @@ -47,7 +49,6 @@ obj_flags |= EMAGGED else obj_flags &= ~EMAGGED - generate_pack_data() /obj/machinery/computer/cargo/Destroy() if(beacon) @@ -77,6 +78,9 @@ board.obj_flags |= EMAGGED update_static_data(user) +/obj/machinery/computer/cargo/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock) + current_ship = port.current_ship + /obj/machinery/computer/cargo/ui_interact(mob/user, datum/tgui/ui) ui = SStgui.try_update_ui(user, src, ui) if(!ui) @@ -85,21 +89,23 @@ if(!charge_account) reconnect() +/obj/machinery/computer/cargo/ui_static_data(mob/user) + . = ..() + var/outpost_docked = istype(current_ship.docked_to, /datum/overmap/outpost) + if(outpost_docked) + generate_pack_data() + else + supply_pack_data = list() + /obj/machinery/computer/cargo/ui_data(mob/user) var/canBeacon = beacon && (isturf(beacon.loc) || ismob(beacon.loc))//is the beacon in a valid location? var/list/data = list() - // not a big fan of get_containing_shuttle - var/obj/docking_port/mobile/D = SSshuttle.get_containing_shuttle(src) - var/datum/overmap/ship/controlled/ship - var/outpost_docked = FALSE - if(D) - ship = D.current_ship - outpost_docked = istype(ship.docked_to, /datum/overmap/outpost) - - data["onShip"] = !isnull(ship) - data["numMissions"] = ship ? LAZYLEN(ship.missions) : 0 - data["maxMissions"] = ship ? ship.max_missions : 0 + var/outpost_docked = istype(current_ship.docked_to, /datum/overmap/outpost) + + data["onShip"] = !isnull(current_ship) + data["numMissions"] = current_ship ? LAZYLEN(current_ship.missions) : 0 + data["maxMissions"] = current_ship ? current_ship.max_missions : 0 data["outpostDocked"] = outpost_docked data["points"] = charge_account ? charge_account.account_balance : 0 data["siliconUser"] = user.has_unlimited_silicon_privilege && check_ship_ai_access(user) @@ -120,9 +126,7 @@ else if (use_beacon && !canBeacon) message = "BEACON ERROR: MUST BE EXPOSED"//beacon's loc/user's loc must be a turf data["message"] = message - if(!supply_pack_data) - generate_pack_data() - stack_trace("You didn't give the cargo tech good advice, and he ripped the manifest. As a result, there was no pack data for [src]") + data["supplies"] = supply_pack_data if (cooldown > 0)//cooldown used for printing beacons cooldown-- @@ -130,37 +134,16 @@ data["shipMissions"] = list() data["outpostMissions"] = list() - if(ship) - for(var/datum/mission/M as anything in ship.missions) + if(current_ship) + for(var/datum/mission/M as anything in current_ship.missions) data["shipMissions"] += list(M.get_tgui_info()) if(outpost_docked) - var/datum/overmap/outpost/out = ship.docked_to + var/datum/overmap/outpost/out = current_ship.docked_to for(var/datum/mission/M as anything in out.missions) data["outpostMissions"] += list(M.get_tgui_info()) return data -/obj/machinery/computer/cargo/ui_static_data(mob/user) - var/list/data = list() - data["supplies"] = list() - for(var/pack in SSshuttle.supply_packs) - var/datum/supply_pack/P = SSshuttle.supply_packs[pack] - if(!data["supplies"][P.group]) - data["supplies"][P.group] = list( - "name" = P.group, - "packs" = list() - ) - if(P.hidden && !(obj_flags & EMAGGED)) - continue - data["supplies"][P.group]["packs"] += list(list( - "name" = P.name, - "cost" = P.cost, - "id" = pack, - "desc" = P.desc || P.name, // If there is a description, use it. Otherwise use the pack's name. - "small_item" = P.small_item, - )) - return data - /obj/machinery/computer/cargo/ui_act(action, params, datum/tgui/ui) . = ..() if(.) @@ -196,49 +179,49 @@ printed_beacons++//printed_beacons starts at 0, so the first one out will be called beacon # 1 beacon.name = "Supply Pod Beacon #[printed_beacons]" if("add") - var/area/ship/current_area = get_area(src) - var/datum/supply_pack/pack = SSshuttle.supply_packs[text2path(params["id"])] - if( \ - !pack || !charge_account?.has_money(pack.cost) || !istype(current_area) || \ - !istype(current_area.mobile_port.current_ship.docked_to, /datum/overmap/outpost) \ - ) - return + var/datum/overmap/outpost/current_outpost = current_ship.docked_to + if(istype(current_ship.docked_to)) + var/datum/supply_pack/current_pack = locate(params["ref"]) in current_outpost.supply_packs + var/same_faction = current_pack.faction ? current_pack.faction.allowed_faction(current_ship.faction_datum) : FALSE + var/total_cost = (same_faction && current_pack.faction_discount) ? current_pack.cost - (current_pack.cost * (current_pack.faction_discount * 0.01)) : current_pack.cost + if(!current_pack || !charge_account?.has_money(total_cost)) + return - var/turf/landing_turf - if(!isnull(beacon) && use_beacon) // prioritize beacons over landing in cargobay - landing_turf = get_turf(beacon) - beacon.update_status(SP_LAUNCH) - else if(!use_beacon)// find a suitable supplypod landing zone in cargobay - var/list/empty_turfs = list() - if(!landingzone) - reconnect() + var/turf/landing_turf + if(!isnull(beacon) && use_beacon) // prioritize beacons over landing in cargobay + landing_turf = get_turf(beacon) + beacon.update_status(SP_LAUNCH) + else if(!use_beacon)// find a suitable supplypod landing zone in cargobay + var/list/empty_turfs = list() if(!landingzone) - WARNING("[src] couldnt find a Ship/Cargo (aka cargobay) area on a ship, and as such it has set the supplypod landingzone to the area it resides in.") - landingzone = get_area(src) - for(var/turf/open/floor/T in landingzone.contents)//uses default landing zone - if(T.is_blocked_turf()) - continue - empty_turfs += T - CHECK_TICK - landing_turf = pick(empty_turfs) - - // note that, because of CHECK_TICK above, we aren't sure if we can - // afford the pack, even though we checked earlier. luckily adjust_money - // returns false if the account can't afford the price - if(landing_turf && charge_account.adjust_money(-pack.cost, CREDIT_LOG_CARGO)) - var/name = "*None Provided*" - var/rank = "*None Provided*" - if(ishuman(usr)) - var/mob/living/carbon/human/H = usr - name = H.get_authentification_name() - rank = H.get_assignment(hand_first = TRUE) - else if(issilicon(usr)) - name = usr.real_name - rank = "Silicon" - var/datum/supply_order/SO = new(pack, name, rank, usr.ckey, "") - new /obj/effect/pod_landingzone(landing_turf, podType, SO) - update_appearance() // ?????????????????? - return TRUE + reconnect() + if(!landingzone) + WARNING("[src] couldnt find a Ship/Cargo (aka cargobay) area on a ship, and as such it has set the supplypod landingzone to the area it resides in.") + landingzone = get_area(src) + for(var/turf/open/floor/T in landingzone.contents)//uses default landing zone + if(T.is_blocked_turf()) + continue + empty_turfs += T + CHECK_TICK + landing_turf = pick(empty_turfs) + + // note that, because of CHECK_TICK above, we aren't sure if we can + // afford the pack, even though we checked earlier. luckily adjust_money + // returns false if the account can't afford the price + if(landing_turf && charge_account.adjust_money(-total_cost, CREDIT_LOG_CARGO)) + var/name = "*None Provided*" + var/rank = "*None Provided*" + if(ishuman(usr)) + var/mob/living/carbon/human/H = usr + name = H.get_authentification_name() + rank = H.get_assignment(hand_first = TRUE) + else if(issilicon(usr)) + name = usr.real_name + rank = "Silicon" + var/datum/supply_order/SO = new(current_pack, name, rank, usr.ckey, "", ordering_outpost = current_ship.docked_to) + new /obj/effect/pod_landingzone(landing_turf, podType, SO) + update_appearance() // ?????????????????? + return TRUE if("mission-act") var/datum/mission/mission = locate(params["ref"]) @@ -292,20 +275,35 @@ /obj/machinery/computer/cargo/proc/generate_pack_data() supply_pack_data = list() - for(var/pack in SSshuttle.supply_packs) - var/datum/supply_pack/P = SSshuttle.supply_packs[pack] - if(!supply_pack_data[P.group]) - supply_pack_data[P.group] = list( - "name" = P.group, + + if(!current_ship.docked_to) + return supply_pack_data + + var/datum/overmap/outpost/outpost_docked = current_ship.docked_to + + if(!istype(outpost_docked)) + return supply_pack_data + + for(var/datum/supply_pack/current_pack as anything in outpost_docked.supply_packs) + if(!supply_pack_data[current_pack.group]) + supply_pack_data[current_pack.group] = list( + "name" = current_pack.group, "packs" = list() ) - if((P.hidden)) + if((current_pack.hidden)) + continue + var/same_faction = current_pack.faction ? current_pack.faction.allowed_faction(current_ship.faction_datum) : FALSE + var/discountedcost = (same_faction && current_pack.faction_discount) ? current_pack.cost - (current_pack.cost * (current_pack.faction_discount * 0.01)) : null + if(current_pack.faction_locked && !same_faction) continue - supply_pack_data[P.group]["packs"] += list(list( - "name" = P.name, - "cost" = P.cost, - "id" = pack, - "desc" = P.desc || P.name // If there is a description, use it. Otherwise use the pack's name. + supply_pack_data[current_pack.group]["packs"] += list(list( + "name" = current_pack.name, + "cost" = current_pack.cost, + "discountedcost" = discountedcost ? discountedcost : null, + "discountpercent" = current_pack.faction_discount, + "faction_locked" = current_pack.faction_locked, //this will only show if you are same faction, so no issue + "ref" = REF(current_pack), + "desc" = (current_pack.desc || current_pack.name) + (discountedcost ? "\n-[current_pack.faction_discount]% off due to your faction affiliation.\nWas [current_pack.cost]" : "") + (current_pack.faction_locked ? "\nYou are able to purchase this item due to your faction affiliation." : "") // If there is a description, use it. Otherwise use the pack's name. )) /obj/machinery/computer/cargo/retro diff --git a/code/modules/cargo/order.dm b/code/modules/cargo/order.dm index 2e176efdbafc..010e4e3d0ef7 100644 --- a/code/modules/cargo/order.dm +++ b/code/modules/cargo/order.dm @@ -15,15 +15,18 @@ var/reason var/datum/supply_pack/pack var/datum/bank_account/paying_account + var/datum/overmap/outpost/ordering_outpost -/datum/supply_order/New(datum/supply_pack/pack, orderer, orderer_rank, orderer_ckey, reason, paying_account) - id = SSshuttle.ordernum++ +/datum/supply_order/New(datum/supply_pack/pack, orderer, orderer_rank, orderer_ckey, reason, paying_account, ordering_outpost) src.pack = pack src.orderer = orderer src.orderer_rank = orderer_rank src.orderer_ckey = orderer_ckey src.reason = reason src.paying_account = paying_account + src.ordering_outpost = ordering_outpost + if(src.ordering_outpost) + id = src.ordering_outpost.ordernum++ if(pack) SSblackbox.record_feedback("nested tally", "crate_ordered", 1, list(pack.name, "amount")) SSblackbox.record_feedback("nested tally", "crate_ordered", pack.cost, list(pack.name, "cost")) diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index e6555fc58b6e..4e26a713a6b2 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -10,11 +10,9 @@ var/admin_spawned = FALSE var/small_item = FALSE //Small items can be grouped into a single crate. - var/faction - /* to be implmented + var/datum/faction/faction var/faction_discount = 15 var/faction_locked = FALSE - */ /datum/supply_pack/proc/generate(atom/A, datum/bank_account/paying_account) var/obj/structure/closet/crate/C diff --git a/code/modules/cargo/packs/civilian.dm b/code/modules/cargo/packs/civilian.dm index 61be8f4bfdbc..9e0e8c7af6f7 100644 --- a/code/modules/cargo/packs/civilian.dm +++ b/code/modules/cargo/packs/civilian.dm @@ -78,7 +78,7 @@ contains = list(/obj/item/storage/box/fountainpens) crate_name = "calligraphy crate" crate_type = /obj/structure/closet/crate/wooden - faction = FACTION_SOLGOV + faction = /datum/faction/solgov /datum/supply_pack/civilian/wrapping_paper name = "Festive Wrapping Paper Crate" diff --git a/code/modules/cargo/packs/costumes_toys.dm b/code/modules/cargo/packs/costumes_toys.dm index 4d24698480f5..03d8cffd0368 100644 --- a/code/modules/cargo/packs/costumes_toys.dm +++ b/code/modules/cargo/packs/costumes_toys.dm @@ -151,7 +151,7 @@ /obj/item/lipstick/random) crate_name = "formalwear crate" crate_type = /obj/structure/closet/crate/wooden - faction = FACTION_SOLGOV + faction = /datum/faction/solgov // this is technically armor but you aren't buying it for that. it's a joke pack so it goes here /datum/supply_pack/costumes_toys/justiceinbound diff --git a/code/modules/cargo/packs/food.dm b/code/modules/cargo/packs/food.dm index ff0e7afc5ec4..1661e4a6637d 100644 --- a/code/modules/cargo/packs/food.dm +++ b/code/modules/cargo/packs/food.dm @@ -16,7 +16,7 @@ /obj/item/storage/box/donkpockets/donkpockethonk) crate_name = "donk pocket crate" crate_type = /obj/structure/closet/crate/freezer - faction = FACTION_SYNDICATE + faction = /datum/faction/syndicate /datum/supply_pack/food/donkpockets/fill(obj/structure/closet/crate/C) for(var/i in 1 to 3) diff --git a/code/modules/cargo/packs/gun.dm b/code/modules/cargo/packs/gun.dm index fd5eac41c228..e364a73032ed 100644 --- a/code/modules/cargo/packs/gun.dm +++ b/code/modules/cargo/packs/gun.dm @@ -1,6 +1,7 @@ /datum/supply_pack/gun group = "Guns" crate_type = /obj/structure/closet/crate/secure/weapon + faction_discount = 10 /* Pistols @@ -12,7 +13,6 @@ cost = 300 contains = list(/obj/item/storage/guncase/pistol/disposable) crate_name = "disposable gun crate" - faction = FACTION_FRONTIER /datum/supply_pack/gun/derringer name = ".38 Derringer Crate" @@ -20,12 +20,12 @@ cost = 350 contains = list(/obj/item/storage/guncase/pistol/derringer) crate_name = "derringer crate" - faction = FACTION_SRM + faction = /datum/faction/srm /datum/supply_pack/gun/m17 name = "M17 pistol Crate" desc = "A cheap target shooting pistol manufactured by Serene Outdoors. Chambered in .22lr" - cost = 200 + cost = 400 contains = list(/obj/item/storage/guncase/pistol/m17) crate_name = "pistol crate" @@ -34,48 +34,113 @@ desc = "Contains a modified Candor 'Commander' pistol, produced by Nanotrasen and chambered in 9mm." cost = 750 contains = list(/obj/item/storage/guncase/pistol/commander) - faction = FACTION_NT + faction = /datum/faction/nt /datum/supply_pack/gun/ringneck name = "Ringneck Pistol Crate" desc = "Contains a civilian variant of the Ringneck pistol, produced by Scarborough Arms and chambered in 10mm." cost = 1000 contains = list(/obj/item/storage/guncase/pistol/ringneck) - faction = FACTION_SYNDICATE + faction = /datum/faction/syndicate/scarborough_arms + +/datum/supply_pack/gun/cm23 + name = "CM-23 Pistol Crate" + desc = "Contains a 10mm CM-23 Pistol, standard issue of the Colonial Minutemen." + cost = 1000 + contains = list(/obj/item/storage/guncase/pistol/cm23) + faction = /datum/faction/clip + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/cm70 + name = "CM-70 Machinepistol Crate" + desc = "Contains a 9mm machinepistol produced proudly within Lanchester City. Colonial Minuteman issue only." + cost = 2500 + contains = list(/obj/item/storage/guncase/pistol/cm70) + faction = /datum/faction/clip + faction_discount = 0 + faction_locked = TRUE /datum/supply_pack/gun/candors name = "Candor Pistol Crate" desc = "Contains a Candor pistol, the trusty sidearm of any spacer, produced by Hunter's Pride and chambered in .45 ACP." cost = 1000 contains = list(/obj/item/storage/guncase/pistol/candor) - faction = FACTION_SRM + faction = /datum/faction/srm + +/datum/supply_pack/gun/asp + name = "BC-81 'Asp' Crate" + desc = "Contains a compact armor-piercing sidearm, chambered in 5.7mm" + cost = 1250 + contains = list(/obj/item/storage/guncase/pistol/asp) + faction = /datum/faction/syndicate/scarborough_arms + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/pistolec + name = "Pistole 'C' Crate" + desc = "Contains a compact solarian-produced sidearm, chambered in 5.56mm HITP. Not to be confused with 5.56x42 CLIP." + cost = 1000 + contains = list(/obj/item/storage/guncase/pistol/pistolec) + faction = /datum/faction/solgov + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/pistolec + name = "Model 'H' Gauss Pistol Crate" + desc = "Contains a compact solarian-produced gauss pistol, chambered in ferromagnetic slugs. Remember to sign your necessary forms upon arrival." + cost = 2000 + contains = list(/obj/item/storage/guncase/pistol/modelh) + faction = /datum/faction/solgov + faction_discount = 0 + faction_locked = TRUE /datum/supply_pack/gun/pepperbox name = "HP Firebrand Pepperbox Revolver Crate" desc = "Contains a concealable pepperbox revolver manufactured by the Saint Roumain Militia, chambered in .357." cost = 1250 contains = list(/obj/item/storage/guncase/pistol/firebrand) - faction = FACTION_SRM + faction = /datum/faction/srm /datum/supply_pack/gun/detrevolver name = "Hunter's Pride Detective Revolver Crate" desc = "Contains a concealable revolver favored by police departments around the sector, chambered in .38." cost = 600 contains = list(/obj/item/storage/guncase/pistol/detective) - faction = FACTION_SRM + faction = /datum/faction/srm /datum/supply_pack/gun/shadowrevolver name = "Shadow Revolver Crate" desc = "Contains a concealable Shadow revolver, chambered in .44 Roumain." cost = 1000 contains = list(/obj/item/storage/guncase/pistol/shadow) - faction = FACTION_SRM + faction = /datum/faction/srm /datum/supply_pack/gun/viperrevolver name = "Viper-23 Revolver Crate" - desc = "Contains a a civilian variant of the Viper revolver, chambered in .357 magnum." + desc = "Contains a civilian variant of the Viper revolver, chambered in .357 magnum." cost = 2500 contains = list(/obj/item/storage/guncase/pistol/viper) + faction = /datum/faction/syndicate/scarborough_arms + faction_discount = 5 + +/datum/supply_pack/gun/a357 + name = "R-23 'Viper' Revolver Crate" + desc = "Contains a double-action military variant of the Viper revolver, chambered in .357 magnum." + cost = 3000 + contains = list(/obj/item/storage/guncase/pistol/a357) + faction = /datum/faction/syndicate/scarborough_arms + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/ashhand + name = "Ashhand Hunting Revolver Crate" + desc = "Contains a single-action .45-70 hunting revolver manufactured by Hunter's Pride for use against the biggest game." + cost = 3500 + contains = list(/obj/item/storage/guncase/pistol/ashhand) + faction = /datum/faction/srm + faction_discount = 0 + faction_locked = TRUE /* Energy @@ -87,6 +152,7 @@ cost = 1000 contains = list(/obj/item/storage/guncase/energy/laser) crate_name = "laser crate" + faction = /datum/faction/nt /datum/supply_pack/gun/mini_energy name = "Mini Energy Gun Crate" @@ -94,6 +160,8 @@ cost = 500 contains = list(/obj/item/storage/guncase/pistol/miniegun) crate_name = "laser crate" + faction_discount = 20 + faction = /datum/faction/nt /datum/supply_pack/gun/energy name = "Energy Gun Crate" @@ -102,6 +170,7 @@ contains = list(/obj/item/storage/guncase/energy/egun) crate_name = "energy gun crate" crate_type = /obj/structure/closet/crate/secure/plasma + faction = /datum/faction/nt /datum/supply_pack/gun/ion name = "Ion Rifle Crate" @@ -110,6 +179,7 @@ contains = list(/obj/item/storage/guncase/energy/iongun) crate_name = "ion rifle crate" crate_type = /obj/structure/closet/crate/secure/plasma + faction = /datum/faction/nt /datum/supply_pack/gun/laser/kalix/pistol name = "Etherbor SG-8 Beam Pistol Crate" @@ -117,6 +187,7 @@ cost = 1000 contains = list(/obj/item/storage/guncase/pistol/kalixpistol) crate_name = "beam pistol crate" + faction = /datum/faction/pgf /datum/supply_pack/gun/laser/kalix name = "Etherbor BG-12 Beam Rifle Crate" @@ -124,6 +195,35 @@ cost = 3000 contains = list(/obj/item/storage/guncase/energy/kalixrifle) crate_name = "beam rifle crate" + faction = /datum/faction/pgf + +/datum/supply_pack/gun/laser/bg16 + name = "Etherbor BG-16 Beam Rifle Crate" + desc = "Contains a single BG-16 Beam Rifle, a military-grade automatic developed in the PGF and manufactured by Etherbor Industries for use within the Marine Corps." + cost = 3000 + contains = list(/obj/item/storage/guncase/energy/bg16) + crate_name = "beam rifle crate" + faction = /datum/faction/pgf + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/energy/disabler + name = "Disabler Crate" + desc = "One stamina-draining disabler weapon, for use in non-lethal pacification." + cost = 1000 + contains = list(/obj/item/gun/energy/disabler) + crate_name = "disabler crate" + faction = /datum/faction/nt + +/datum/supply_pack/gun/energy/taser + name = "Hybrid Taser Crate" + desc = "Contains one disabler-taser hybrid weapon." + cost = 1250 + contains = list(/obj/item/gun/energy/e_gun/advtaser) + crate_name = "hybrid taser crate" + faction = /datum/faction/nt + faction_discount = 0 + faction_locked = TRUE /* Shotguns @@ -134,15 +234,16 @@ desc = "For when you need to deal with 2 drunkards the old-fashioned way. Contains a double-barreled shotgun, favored by Bartenders. Warranty voided if sawed off." cost = 1000 contains = list(/obj/item/storage/guncase/doublebarrel) - crate_name = "shotguns crate" - faction = FACTION_SRM + crate_name = "shotgun crate" + faction = /datum/faction/srm /datum/supply_pack/gun/conflagration name = "Conflagration Lever Action Shotgun Crate" desc = "For when you need to deal with 6 hooligans and look good doing it. Contains one lever-action shotgun, with a 6 round capacity." cost = 1500 contains = list(/obj/item/storage/guncase/conflagration) - crate_name = "shotguns crate" + crate_name = "shotgun crate" + faction = /datum/faction/srm /datum/supply_pack/gun/hellfire_shotgun name = "Hellfire Shotgun Crate" @@ -150,7 +251,7 @@ cost = 2000 contains = list(/obj/item/storage/guncase/hellfire) crate_name = "shotgun crate" - faction = FACTION_SRM + faction = /datum/faction/srm /datum/supply_pack/gun/brimstone_shotgun name = "Brimstone Shotgun Crate" @@ -158,7 +259,7 @@ cost = 2000 contains = list(/obj/item/storage/guncase/brimstone) crate_name = "shotgun crate" - faction = FACTION_SRM + faction = /datum/faction/srm /datum/supply_pack/gun/buckmaster name = "Buckmaster Shotgun Crate" @@ -167,6 +268,138 @@ cost = 3000 crate_name = "shotgun crate" +/datum/supply_pack/gun/bulldog + name = "Bulldog Shotgun Crate" + desc = "An automatic shotgun chambered in 12ga produced by Scarborough Arms for exclusive use by licensed buyers. Comes with 8-round box magazines." + contains = list(/obj/item/storage/guncase/bulldog) + cost = 4000 + crate_name = "shotgun crate" + faction = /datum/faction/syndicate/scarborough_arms + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/mastiff + name = "Mastiff Shotgun Crate" + desc = "An automatic shotgun modified for exclusive use by the IRMG and chambered in 12ga. Comes with 8-round box magazines." + contains = list(/obj/item/storage/guncase/mastiff) + cost = 4000 + crate_name = "shotgun crate" + faction = /datum/faction/inteq + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/cm15 + name = "CM-15 Shotgun Crate" + desc = "A combat shotgun produced by Lanchester Arms Co. for the Colonial Minuteman and CMM-BARD for use in CQC operations. Chambered in 12ga and equipped with 8-round box magazines." + contains = list(/obj/item/storage/guncase/cm15) + cost = 4000 + crate_name = "shotgun crate" + faction = /datum/faction/clip + faction_discount = 0 + faction_locked = TRUE + +/* + SMGs +*/ + +/datum/supply_pack/gun/cobra20 + name = "Cobra-20 SMG Crate" + desc = "Contains a civilian variant of the Cobra SMG, manufactured by Scaraborough Arms and chambered in .45" + cost = 3000 + contains = list(/obj/item/storage/guncase/cobra) + crate_name = "SMG crate" + faction = /datum/faction/syndicate/scarborough_arms + faction_discount = 10 + +/datum/supply_pack/gun/vector + name = "Vector SMG Crate" + desc = "Contains a Vector PDW produced by Sharplite Defense and chambered in 9mm." + cost = 3000 + contains = list(/obj/item/storage/guncase/vector) + crate_name = "SMG crate" + faction = /datum/faction/nt + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/mongrel + name = "SKM-44v Mongrel SMG Crate" + desc = "Contains a shortened variant of the SKM rechambered to 10mm and painted in the brown-and-gold of Inteq." + cost = 3000 + contains = list(/obj/item/storage/guncase/mongrel) + crate_name = "SMG crate" + faction = /datum/faction/inteq + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/wt550 + name = "WT-550 Auto Rifle Crate" + desc = "Contains a high-powered, automatic personal defense weapon chambered in 4.6x30mm." + cost = 4000 + contains = list(/obj/item/storage/guncase/wt550) + crate_name = "auto rifle crate" + faction_discount = 10 + faction = /datum/faction/nt + +/datum/supply_pack/gun/saber + name = "SABR Prototype SMG Crate" + desc = "Contains a compact 9mm automatic SMG produced by NT Ballistics. For NT employee use only." + cost = 2500 + contains = list(/obj/item/storage/guncase/saber) + crate_name = "SMG crate" + faction = /datum/faction/nt + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/firestorm + name = "Firestorm SMG Crate" + desc = "Contains a Hunter's Pride SMG, intended for internal use by hunters and chambered in .45" + cost = 3000 + contains = list(/obj/item/storage/guncase/firestorm) + crate_name = "SMG crate" + faction = /datum/faction/srm + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/rattlesnake + name = "Rattlesnake Machinepistol Crate" + desc = "Contains an automatic machinepistol produced by Scarborough Arms, chambered in 9mm." + cost = 2500 + contains = list(/obj/item/storage/guncase/rattlesnake) + crate_name = "Machinepistol crate" + faction = /datum/faction/syndicate/scarborough_arms + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/kingsnake + name = "Kingsnake Machinepistol Crate" + desc = "Contains an automatic machinepistol chambered in 9mm, painted in the brown-and-gold of Inteq." + cost = 2500 + contains = list(/obj/item/storage/guncase/kingsnake) + crate_name = "Machinepistol crate" + faction = /datum/faction/inteq + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/cm5 + name = "CM-5 SMG Crate" + desc = "Contains a CM-5 automatic SMG, produced proudly within Lanchester City. Colonial Minuteman issue only." + cost = 2500 + contains = list(/obj/item/storage/guncase/cm5) + crate_name = "SMG crate" + faction = /datum/faction/clip + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/sidewinder + name = "Sidewinder SMG Crate" + desc = "Contains a Sidewinder PDW produced by Scarborough Arms and chambered in 5.7mm for armor-piercing capabilities." + cost = 3000 + contains = list(/obj/item/storage/guncase/sidewinder) + crate_name = "SMG crate" + faction = /datum/faction/syndicate/scarborough_arms + faction_discount = 0 + faction_locked = TRUE + /* Rifles */ @@ -191,7 +424,7 @@ cost = 750 contains = list(/obj/item/storage/guncase/winchester) crate_name = "rifle crate" - faction = FACTION_SRM + faction = /datum/faction/srm /datum/supply_pack/gun/absolution name = "Absolution Lever Action Rifle Crate" @@ -199,6 +432,7 @@ cost = 2000 contains = list(/obj/item/storage/guncase/absolution) crate_name = "shotguns crate" + faction = /datum/faction/srm /datum/supply_pack/gun/illestren name = "Illestren Rifle Crate" @@ -206,7 +440,7 @@ cost = 1250 contains = list(/obj/item/storage/guncase/illestren) crate_name = "rifle crate" - faction = FACTION_SRM + faction = /datum/faction/srm /datum/supply_pack/gun/beacon name = "Beacon Break Action Rifle Crate" @@ -214,54 +448,162 @@ cost = 1000 contains = list(/obj/item/storage/guncase/beacon) crate_name = "rifle crate" - faction = FACTION_SRM + faction = /datum/faction/srm -/datum/supply_pack/gun/scout - name = "Scout Sniper Rifle Crate" - desc = "Contains a traditional scoped rifle to hunt wildlife and big game from a respectful distance. Chambered in powerful .300 Magnum." - cost = 4000 - contains = list(/obj/item/storage/guncase/scout) +/datum/supply_pack/gun/skm + name = "SKM-24 Rifle Crate" + desc = "Contains a high-powered, automatic rifle chambered in 7.62x40mm CLIP." + cost = 5000 + contains = list(/obj/item/storage/guncase/skm) + crate_name = "auto rifle crate" + +/datum/supply_pack/gun/inteq_skm + name = "SKM-44 Rifle Crate" + desc = "Contains a SKM painted in the brown-and-gold of Inteq, chambered in 7.62x40mm CLIP. " + cost = 5000 + contains = list(/obj/item/storage/guncase/skm_inteq) + crate_name = "auto rifle crate" + faction = /datum/faction/inteq + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/hades + name = "SL AL-655 'Hades' energy rifle" + desc = "Contains a high-energy, automatic laser rifle. For NT employee use only." + cost = 5000 + contains = list(/obj/item/storage/guncase/hades) + crate_name = "laser crate" + faction = /datum/faction/nt + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/hydra + name = "SMR-80 'Hydra' Automatic Rifle Crate" + desc = "Contains a high-powered automatic rifle produced by Scarborough Arms and chambered in 5.56 CLIP. This one is a standard variant." + cost = 5000 + contains = list(/obj/item/storage/guncase/hydra) crate_name = "rifle crate" - faction = FACTION_SRM + faction = /datum/faction/syndicate/scarborough_arms + faction_discount = 0 + faction_locked = TRUE -/datum/supply_pack/gun/boomslang90 - name = "Boomslang-90 Rifle Crate" - desc = "Contains a civilian variant of the Boomslang Sniper rifle- modified with a 2x scope, rather than a sniper scope. Chambered in the powerful 6.5x57mm CLIP." +/datum/supply_pack/gun/cm82 + name = "CM-82 Standard Issue Rifle" + desc = "Contains a high-powered rifle chambered in 5.56 CLIP, standard issue of the Colonial Minutemen." cost = 5000 - contains = list(/obj/item/storage/guncase/boomslang) + contains = list(/obj/item/storage/guncase/cm82) crate_name = "rifle crate" + faction = /datum/faction/clip + faction_discount = 0 + faction_locked = TRUE + +/* Marksman Rifles */ + +/datum/supply_pack/gun/cmf4 + name = "CM-F4 Designated Marksman Rifle" + desc = "Contains a high-powered marksman rifle chambered in .308. For Colonial Minuteman issue only." + cost = 3500 + contains = list(/obj/item/storage/guncase/cmf4) + crate_name = "dmr crate" + faction = /datum/faction/clip + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/ssg04 + name = "SsG-04 Designated Marksman Rifle" + desc = "Contains a high-powered marksman rifle chambered in .308. Painted in the brown-and-gold of Inteq." + cost = 3500 + contains = list(/obj/item/storage/guncase/ssg04) + crate_name = "dmr crate" + faction = /datum/faction/inteq + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/sbr80 + name = "SBR-80 'Hydra' Designated Marksman Rifle Crate" + desc = "Contains a high-powered marksman rifle chambered in 5.56 CLIP and produced by Scarborough Arms. A modification of the ever-popular SMR-80 platform." + cost = 3500 + contains = list(/obj/item/storage/guncase/sbr80) + crate_name = "dmr crate" + faction = /datum/faction/syndicate/scarborough_arms + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/vickland + name = "Vickland Battle Rifle" + desc = "Contains a high-powered semi-automatic battle rifle chambered in .308 and produced by Hunter's Pride. Fed via stripper clips with a 10 round capacity." + cost = 3500 + contains = list(/obj/item/storage/guncase/vickland) + crate_name = "dmr crate" + faction = /datum/faction/srm + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/gauss + name = "Prototype Gauss Rifle" + desc = "Contains a high-powered prototype armor-piercing gauss rifle, operable with ferromagnetic pellets. For NT employee use only." + cost = 3500 + contains = list(/obj/item/storage/guncase/gauss) + crate_name = "dmr crate" + faction = /datum/faction/nt + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/claris + name = "Claris Gauss Rifle" + desc = "Contains a high-powered armor-piercing gauss rifle, loaded directly via ferromagnetic pellet speedloaders." + cost = 2500 + contains = list(/obj/item/storage/guncase/claris) + crate_name = "dmr crate" + faction = /datum/faction/solgov + faction_discount = 0 + faction_locked = TRUE -/datum/supply_pack/gun/cobra20 - name = "Cobra-20 SMG Crate" - desc = "Contains a civilian variant of the Cobra SMG, manufactured by Scaraborough Arms and chambered in .45" - cost = 3000 - contains = list(/obj/item/storage/guncase/cobra) - crate_name = "SMG crate" - faction = FACTION_SRM +/datum/supply_pack/gun/boomslang90 + name = "Boomslang-90 Designated Marksman Rifle Crate" + desc = "Contains a civilian variant of the Boomslang Sniper rifle- modified with a 2x scope, rather than a sniper scope. Chambered in the powerful 6.5x57mm CLIP." + cost = 3500 + contains = list(/obj/item/storage/guncase/boomslang) + crate_name = "dmr crate" + faction = /datum/faction/syndicate/scarborough_arms + +/datum/supply_pack/gun/boomslang10 + name = "Boomslang-10 Sniper Rifle Crate" + desc = "Contains a military variant of the Boomslang Sniper rifle equipped with an 8x sniper scope, for licenesed buyers only. Chambered in the powerful 6.5x57mm CLIP." + cost = 4500 + contains = list(/obj/item/storage/guncase/boomslangmilitary) + crate_name = "marksman rifle crate" + faction = /datum/faction/syndicate/scarborough_arms + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/gun/f90 + name = "CM-F90 Sniper Rifle Crate" + desc = "Contains a military sniper rifle equipped with an 8x sniper scope, for Minuteman use only. Chambered in the powerful 6.5x57mm CLIP." + cost = 4500 + contains = list(/obj/item/storage/guncase/cmf90) + crate_name = "marksman rifle crate" + faction = /datum/faction/clip + faction_discount = 0 + faction_locked = TRUE -/datum/supply_pack/gun/wt550 - name = "WT-550 Auto Rifle Crate" - desc = "Contains a high-powered, automatic personal defense weapon chambered in 4.6x30mm." +/datum/supply_pack/gun/scout + name = "Scout Sniper Rifle Crate" + desc = "Contains a traditional scoped rifle to hunt wildlife and big game from a respectful distance. Chambered in powerful .300 Magnum." cost = 4000 - contains = list(/obj/item/storage/guncase/wt550) - crate_name = "auto rifle crate" - faction = FACTION_SRM - -/datum/supply_pack/gun/p16 - name = "P16 Assault Rifle Crate" - desc = "Contains a high-powered, automatic rifle chambered in 5.56mm." - cost = 5000 - contains = list(/obj/item/storage/guncase/p16) - crate_name = "auto rifle crate" - faction = FACTION_SRM + contains = list(/obj/item/storage/guncase/scout) + crate_name = "sniper rifle crate" + faction = /datum/faction/srm -/datum/supply_pack/gun/skm - name = "SKM-24 Rifle Crate" - desc = "Contains a high-powered, automatic rifle chambered in 7.62x40mm CLIP." - cost = 5000 - contains = list(/obj/item/storage/guncase/skm) - crate_name = "auto rifle crate" - faction = FACTION_SRM +/datum/supply_pack/gun/ssg669 + name = "SSG-669C Sniper Rifle Crate" + desc = "Contains a traditional scoped rifle to hunt wildlife and big game from a respectful distance. Chambered in powerful .300 Magnum." + cost = 4000 + contains = list(/obj/item/storage/guncase/ssg669) + crate_name = "sniper rifle crate" + faction = /datum/faction/solgov + faction_discount = 0 + faction_locked = TRUE /* Attachments */ @@ -286,6 +628,16 @@ contains = list(/obj/item/attachment/bayonet) crate_name = "bayonet crate" +/datum/supply_pack/gun/attachment/ebayonet + name = "Energy Bayonet Crate" + desc = "Contains a single energy bayonet to be mounted on a firearm, exclusive for Scarborough Firearms." + cost = 500 + contains = list(/obj/item/attachment/energy_bayonet) + crate_name = "bayonet crate" + faction = /datum/faction/syndicate/scarborough_arms + faction_discount = 0 + faction_locked = TRUE + /datum/supply_pack/gun/attachment/silencer name = "Suppressor Crate" desc = "Contains a single suppressor to be mounted on a firearm." diff --git a/code/modules/cargo/packs/magazines.dm b/code/modules/cargo/packs/magazines.dm index 175b9aa9ff06..a29ed2403d37 100644 --- a/code/modules/cargo/packs/magazines.dm +++ b/code/modules/cargo/packs/magazines.dm @@ -11,6 +11,17 @@ desc = "Contains a 9mm magazine for the standard-issue Commander pistol, containing ten rounds." contains = list(/obj/item/ammo_box/magazine/co9mm) cost = 500 + faction = /datum/faction/nt + +/datum/supply_pack/magazine/smgm9mm_mag + name = "9mm SMG Magazine Crate" + desc = "Contains a 9mm magazine for the Vector and Saber SMGs, containing thirty rounds." + contains = list(/obj/item/ammo_box/magazine/smgm9mm) + cost = 500 + faction = /datum/faction/nt + faction_discount = 0 + faction_locked = TRUE + /* Hunter's Pride */ @@ -19,6 +30,8 @@ desc = "Contains a .38 speedloader for revolvers, containing six rounds." contains = list(/obj/item/ammo_box/c38) cost = 250 + faction_discount = 20 + faction = /datum/faction/srm /datum/supply_pack/magazine/c38match name = ".38 Match Grade Speedloader" @@ -27,6 +40,7 @@ small_item = TRUE contains = list(/obj/item/ammo_box/c38/match) crate_name = ".38 match crate" + faction = /datum/faction/srm /datum/supply_pack/magazine/c38dumdum name = ".38 DumDum Speedloader" @@ -35,18 +49,21 @@ small_item = TRUE contains = list(/obj/item/ammo_box/c38/dumdum) crate_name = ".38 match crate" + faction = /datum/faction/srm /datum/supply_pack/magazine/m45_mag name = ".45 ACP Candor Magazine Crate" desc = "Contains a .45 ACP magazine for the Candor pistol, containing eight rounds." contains = list(/obj/item/ammo_box/magazine/m45) cost = 500 + faction = /datum/faction/srm /datum/supply_pack/magazine/a44roum_speedloader name = ".44 Roumain Speedloader Crate" desc = "Contains a .44 Roumain speedloader for the HP Montagne, containing six rounds." contains = list(/obj/item/ammo_box/a44roum_speedloader) cost = 400 + faction = /datum/faction/srm /* Serene Sporting */ @@ -75,54 +92,73 @@ desc = "Contains a .22lr magazine for the Himehabu pistol, containing ten rounds." contains = list(/obj/item/ammo_box/magazine/m22lr_himehabu) cost = 200 + faction = /datum/faction/syndicate/scarborough_arms -/datum/supply_pack/magazine/himehabu_mag +/datum/supply_pack/magazine/asp_mag name = "Asp Magazine Crate" desc = "Contains a 5.7x39mm magazine for the Asp pistol, containing 12 rounds." contains = list(/obj/item/ammo_box/magazine/m57_39_asp) cost = 400 + faction = /datum/faction/syndicate/scarborough_arms /datum/supply_pack/magazine/m10mm_mag name = "Ringneck Magazine Crate" desc = "Contains a 10mm magazine for the Ringneck pistol, containing ten rounds." contains = list(/obj/item/ammo_box/magazine/m10mm_ringneck) cost = 500 + faction = /datum/faction/syndicate/scarborough_arms /datum/supply_pack/magazine/m9mm_rattlesnake name = "Rattlesnake Magazine Crate" desc = "Contains a 9mm magazine for the Rattlesnake machine pistol, contains 18 rounds." contains = list(/obj/item/ammo_box/magazine/m9mm_rattlesnake) cost = 500 + faction = /datum/faction/syndicate/scarborough_arms /datum/supply_pack/magazine/a357_mag name = ".357 Speedloader Crate" desc = "Contains a .357 speedloader for revolvers, containing seven rounds." contains = list(/obj/item/ammo_box/a357) cost = 750 + faction_discount = 20 + faction = /datum/faction/syndicate/scarborough_arms /datum/supply_pack/magazine/sidewinder_mag name = "Sidewinder Magazine Crate" desc = "Contains a 30 round magazine for the Sidewinder SMG." contains = list(/obj/item/ammo_box/magazine/m57_39_sidewinder) cost = 750 + faction_discount = 20 + faction = /datum/faction/syndicate/scarborough_arms /datum/supply_pack/magazine/c45_cobra_mag name = "Cobra Magazine Crate" desc = "Contains a .45 magazine for the Cobra-20, containing 24 rounds." cost = 750 contains = list(/obj/item/ammo_box/magazine/m45_cobra) + faction_discount = 20 + faction = /datum/faction/syndicate/scarborough_arms -/datum/supply_pack/magazine/hydra_mag - name = "SMR-80 Magazine Crate" - desc = "Contains a 5.56x42mm CLIP for the SMR-80 rifle, containing 20 rounds." +/datum/supply_pack/magazine/short_hydra_mag + name = "SBR-80 DMR Short Magazine Crate" + desc = "Contains a 5.56x42mm CLIP made specially for the SBR-80 Designated Marksman Rifle, containing 20 rounds." contains = list(/obj/item/ammo_box/magazine/m556_42_hydra/small) cost = 1000 + faction = /datum/faction/syndicate/scarborough_arms + +/datum/supply_pack/magazine/hydra_mag + name = "SMR-80 Rifle Magazine Crate" + desc = "Contains a 5.56x42mm CLIP for the SMR-80 assault rifle, containing 30 rounds." + contains = list(/obj/item/ammo_box/magazine/m556_42_hydra) + cost = 1500 + faction = /datum/faction/syndicate/scarborough_arms /datum/supply_pack/magazine/boomslang_mag name = "Boomslang-90 Magazine Crate" - desc = "Contains a 6.5 CLIP magazine for the Boomslang-90 rifle, containing five rounds." + desc = "Contains a 6.5 CLIP magazine for the Boomslang rifle platform, containing five rounds." contains = list(/obj/item/ammo_box/magazine/boomslang/short) cost = 1000 + faction = /datum/faction/syndicate/scarborough_arms /* CM Lancaster */ @@ -131,6 +167,7 @@ desc = "Contains a 5.56mm magazine for the CM-82 rifle, containing thirty rounds. Notably, these are also compatable with the P-16 rifle." contains = list(/obj/item/ammo_box/magazine/p16) cost = 1000 + faction = /datum/faction/clip /datum/supply_pack/magazine/skm_ammo name = "SKM Magazine Crate" @@ -140,9 +177,17 @@ /datum/supply_pack/magazine/f4_mag name = "F4 Magazine Crate" - desc = "Contains a .308 magazine for F4 platform rifles, containing ten rounds." + desc = "Contains a .308 magazine for SsG-04 and CM-F4 platform rifles, containing ten rounds." contains = list(/obj/item/ammo_box/magazine/f4_308) cost = 1000 + faction = /datum/faction/clip + +/datum/supply_pack/magazine/f90 + name = "CM-F90 Magazine Crate" + desc = "Contains a 5-round 6.5mm magazine for use with the CM-F90 sniper rifle." + contains = list(/obj/item/ammo_box/magazine/f90) + cost = 1000 + faction = /datum/faction/clip /* NT */ @@ -151,12 +196,15 @@ desc = "Contains a 20-round magazine for the WT-550 Auto Rifle. Each magazine is designed to facilitate rapid tactical reloads." cost = 750 contains = list(/obj/item/ammo_box/magazine/wt550m9) + faction_discount = 20 + faction = /datum/faction/nt /datum/supply_pack/magazine/ap_wt550_mag name = "WT-550 Auto Rifle AP Magazine Crate" desc = "Contains one magazine of armor-piercing ammunition for the WT-550 Auto Rifle." cost = 1000 contains = list(/obj/item/ammo_box/magazine/wt550m9/ap) + faction = /datum/faction/nt /* Solgov */ @@ -165,26 +213,54 @@ desc = "Contains a 5.56mm magazine for the Pistole C, containing twelve rounds." contains = list(/obj/item/ammo_box/magazine/pistol556mm) cost = 750 - faction = FACTION_SOLGOV + faction = /datum/faction/solgov /datum/supply_pack/magazine/fms_mag name = "Ferromagnetic Slug Magazine Crate" desc = "Contains a ferromagnetic slug magazine for the Model H pistol, containing ten rounds." contains = list(/obj/item/ammo_box/magazine/modelh) cost = 750 - faction = FACTION_SOLGOV + faction = /datum/faction/solgov /datum/supply_pack/magazine/gar_ammo name = "GAR Ferromagnetic Lance Magazine Crate" desc = "Contains a ferromagnetic lance magazine for the GAR rifle, containing thirty two rounds." contains = list(/obj/item/ammo_box/magazine/gar) cost = 1000 + faction = /datum/faction/solgov /datum/supply_pack/magazine/claris_ammo name = "Claris Ferromagnetic Pellet Speedloader Crate" desc = "Contains a ferromagnetic pellet speedloader for the Claris rifle, containing twenty two rounds." contains = list(/obj/item/ammo_box/amagpellet_claris) cost = 1000 + faction = /datum/faction/solgov + +/* Inteq */ + +/datum/supply_pack/magazine/mongrel_mag + name = "Mongrel Magazine Crate" + desc = "Contains a 10mm magazine for the SKM-44v 'Mongrel' SMG, containing twenty-four rounds." + contains = list(/obj/item/ammo_box/magazine/smgm10mm) + cost = 750 + faction = /datum/faction/inteq + +/* Shotguns */ + +/datum/supply_pack/magazine/cm15 + name = "CM-15 Magazine Crate" + desc = "Contains an 8-round 12ga magazine for the CM-15 Automatic Shotgun." + contains = list(/obj/item/ammo_box/magazine/cm15_12g) + cost = 1500 + faction = /datum/faction/clip + +/datum/supply_pack/magazine/bulldog + name = "Bulldog Magazine Crate" + desc = "Contains an 8-round 12ga box magazine for the Bulldog weapons platform." + contains = list(/obj/item/ammo_box/magazine/m12g_bulldog) + cost = 1500 + faction = /datum/faction/syndicate/scarborough_arms + /* energy weapons */ @@ -192,7 +268,26 @@ name = "Weapon Cell Crate" desc = "Contains a weapon cell, compatible with laser guns." contains = list(/obj/item/stock_parts/cell/gun) + faction = /datum/faction/nt + cost = 500 + +/datum/supply_pack/magazine/solgovcell + name = "SolCon Weapon Cell Crate" + desc = "Contains a Solarian weapon cell, compatible with Solarian gauss weaponry." + contains = list(/obj/item/stock_parts/cell/gun/solgov) cost = 500 + faction = /datum/faction/solgov + faction_discount = 0 + faction_locked = TRUE + +/datum/supply_pack/magazine/upgradedguncell + name = "Upgraded Weapon Cell Crate" + desc = "Contains an upgraded weapon cell, compatible with laser guns. For NT use only." + contains = list(/obj/item/stock_parts/cell/gun/upgraded) + cost = 1500 + faction = /datum/faction/nt + faction_discount = 0 + faction_locked = TRUE /* etherbor */ @@ -201,5 +296,15 @@ desc = "Contains an Etherbor weapon cell, compatible with Etherbor armaments with a slightly higher capacity." contains = list(/obj/item/stock_parts/cell/gun/kalix) cost = 600 + faction = /datum/faction/pgf + +/datum/supply_pack/magazine/guncell/pgf + name = "Etherbor Cell Crate" + desc = "Contains a military-grade Etherbor weapon cell produced for the PGFMC, compatible with Etherbor armaments with a significantly higher capacity." + contains = list(/obj/item/stock_parts/cell/gun/pgf) + cost = 1500 + faction = /datum/faction/pgf + faction_discount = 0 + faction_locked = TRUE /* Expand once the energy weapons have been actually expanded upon */ diff --git a/code/modules/cargo/packs/material.dm b/code/modules/cargo/packs/material.dm index f9bacd40f5e3..356856535b77 100644 --- a/code/modules/cargo/packs/material.dm +++ b/code/modules/cargo/packs/material.dm @@ -1,6 +1,7 @@ /datum/supply_pack/material group = "Materials & Sheets" - faction = FACTION_NS_LOGI + faction = /datum/faction/nt/ns_logi + faction_discount = 20 /* Basic construction materials diff --git a/code/modules/cargo/packs/medical.dm b/code/modules/cargo/packs/medical.dm index eac1f9a00b31..76d981dd7b23 100644 --- a/code/modules/cargo/packs/medical.dm +++ b/code/modules/cargo/packs/medical.dm @@ -61,6 +61,13 @@ /obj/item/reagent_containers/glass/bottle/morphine, /obj/item/reagent_containers/glass/bottle/morphine, ) + faction = /datum/faction/syndicate/suns + faction_discount = 25 + +/datum/supply_pack/medical/painkillers/fill(obj/structure/closet/crate/cargo_crate) + . = ..() + if(prob(5)) + new /obj/item/reagent_containers/glass/bottle/painkiller_booze(cargo_crate) /datum/supply_pack/medical/iv_drip name = "IV Drip Crate" @@ -84,6 +91,8 @@ /obj/item/reagent_containers/medigel/sterilizine, /obj/item/roller) crate_name = "surgical supplies crate" + faction = /datum/faction/syndicate/suns + faction_discount = 50 //this shouldnt be 3k but if it is... /datum/supply_pack/medical/anesthetic @@ -93,6 +102,8 @@ contains = list(/obj/item/clothing/mask/breath/medical, /obj/item/tank/internals/anesthetic) crate_name = "anesthetics crate" + faction = /datum/faction/syndicate/suns + faction_discount = 25 /* Bundles and supplies @@ -115,6 +126,8 @@ /obj/item/reagent_containers/blood/synthetic) crate_name = "blood freezer" crate_type = /obj/structure/closet/crate/freezer + faction = /datum/faction/syndicate/suns + faction_discount = 25 /datum/supply_pack/medical/surplus name = "Medical Surplus Crate" @@ -142,7 +155,8 @@ /obj/item/reagent_containers/pill/neurine, /obj/item/vending_refill/medical) crate_name = "medical surplus crate" - faction = FACTION_SUNS + faction = /datum/faction/syndicate/suns + faction_discount = 25 /datum/supply_pack/medical/surplus/fill(obj/structure/closet/crate/C) for(var/i in 1 to 7) diff --git a/code/modules/cargo/packs/sec_supply.dm b/code/modules/cargo/packs/sec_supply.dm index 86d631024705..9e18adec4855 100644 --- a/code/modules/cargo/packs/sec_supply.dm +++ b/code/modules/cargo/packs/sec_supply.dm @@ -98,7 +98,9 @@ contains = list(/obj/item/flamethrower/full) crate_name = "flamethrower crate" crate_type = /obj/structure/closet/crate/secure/weapon - faction = FACTION_NGR + + faction = /datum/faction/syndicate/ngr + faction_discount = 20 /datum/supply_pack/sec_supply/incendiary_grenade name = "Incendiary Grenade Crate" @@ -107,7 +109,18 @@ contains = list(/obj/item/grenade/chem_grenade/incendiary) crate_name = "incendiary grenade crate" crate_type = /obj/structure/closet/crate/secure/plasma - faction = FACTION_NGR + faction = /datum/faction/syndicate/ngr + faction_discount = 20 + +/datum/supply_pack/sec_supply/halberd + name = "Energy Halberd Crate" + desc = "Contains one Solarian Energy Halberd, for issue to your local Sonnensoldner battalion." + cost = 1500 + contains = list(/obj/item/energyhalberd) + crate_name = "energy halberd crate" + faction = /datum/faction/solgov + faction_discount = 0 + faction_locked = TRUE /* Stamina / PVP weapons (intentionally overpriced due to odd balance position of stamina weapons) @@ -129,39 +142,18 @@ /datum/supply_pack/sec_supply/baton name = "Stun Batons Crate" - desc = "Arm the Civil Protection Forces with three stun batons. Batteries included." - cost = 9000 - contains = list(/obj/item/melee/baton/loaded, - /obj/item/melee/baton/loaded, - /obj/item/melee/baton/loaded) + desc = "Arm your vessel security with a stun baton. Batteries included." + cost = 3000 + contains = list(/obj/item/melee/baton/loaded) crate_name = "stun baton crate" -/datum/supply_pack/sec_supply/disabler - name = "Disabler Crate" - desc = "Three stamina-draining disabler weapons." - cost = 9000 - contains = list(/obj/item/gun/energy/disabler, - /obj/item/gun/energy/disabler, - /obj/item/gun/energy/disabler) - crate_name = "disabler crate" - /datum/supply_pack/sec_supply/dragnet name = "DRAGnet Crate" - desc = "Contains three \"Dynamic Rapid-Apprehension of the Guilty\" netting devices, a recent breakthrough in law enforcement prisoner management technology." - cost = 10000 - contains = list(/obj/item/gun/energy/e_gun/dragnet, - /obj/item/gun/energy/e_gun/dragnet, - /obj/item/gun/energy/e_gun/dragnet) + desc = "Contains one \"Dynamic Rapid-Apprehension of the Guilty\" netting device, a recent breakthrough in law enforcement prisoner management technology." + cost = 2000 + contains = list(/obj/item/gun/energy/e_gun/dragnet) crate_name = "\improper DRAGnet crate" -/datum/supply_pack/sec_supply/taser - name = "Hybrid Taser Crate" - desc = "Contains two disabler-taser hybrid weapons." - cost = 12000 - contains = list(/obj/item/gun/energy/e_gun/advtaser, - /obj/item/gun/energy/e_gun/advtaser) - crate_name = "hybrid taser crate" - /datum/supply_pack/sec_supply/claymore name = "C-10 Claymore Crate" desc = "Four motion-activated directional mines, perfect for ambushing enemy infantry. Still debatably legal to sell!" diff --git a/code/modules/cargo/packs/spacesuit_armor.dm b/code/modules/cargo/packs/spacesuit_armor.dm index 2cbe012c71f1..d0b1da6be6d2 100644 --- a/code/modules/cargo/packs/spacesuit_armor.dm +++ b/code/modules/cargo/packs/spacesuit_armor.dm @@ -29,7 +29,6 @@ contains = list(/obj/item/clothing/suit/space/hardsuit/mining/independent) crate_name = "mining hardsuit crate" crate_type = /obj/structure/closet/crate/secure/plasma - faction = FACTION_INDEPENDENT /datum/supply_pack/spacesuit_armor/med_hardsuit name = "Medical Hardsuit Crate" @@ -38,7 +37,7 @@ contains = list(/obj/item/clothing/suit/space/hardsuit/medical) crate_name = "medical hardsuit crate" crate_type = /obj/structure/closet/crate/medical - faction = FACTION_NT + faction = /datum/faction/nt /datum/supply_pack/spacesuit_armor/mining_hardsuit_heavy name = "Heavy Mining Hardsuit Crate" @@ -48,7 +47,7 @@ /obj/item/clothing/shoes/bhop) crate_name = "heavy mining hardsuit crate" crate_type = /obj/structure/closet/crate/secure/plasma - faction = FACTION_NT + faction = /datum/faction/nt /datum/supply_pack/spacesuit_armor/sec_hardsuit_bundle name = "Security Hardsuit Crate" @@ -57,7 +56,7 @@ contains = list(/obj/item/clothing/suit/space/hardsuit/security/independent) crate_name = "security hardsuit crate" crate_type = /obj/structure/closet/crate/secure/gear - faction = FACTION_NT + faction = /datum/faction/nt /datum/supply_pack/spacesuit_armor/sci_hardsuit name = "Science Hardsuit Crate" @@ -66,7 +65,7 @@ contains = list(/obj/item/clothing/suit/space/hardsuit/rd) crate_name = "science hardsuit crate" crate_type = /obj/structure/closet/crate/secure/science - faction = FACTION_NT + faction = /datum/faction/nt /datum/supply_pack/spacesuit_armor/engi_spacesuit_bundle name = "Engineering Space Suit Crate" @@ -84,7 +83,7 @@ contains = list(/obj/item/clothing/suit/space/hardsuit/engine/atmos) crate_name = "atmospherics hardsuit crate" crate_type = /obj/structure/closet/crate/secure/engineering - faction = FACTION_NT + faction = /datum/faction/nt /* Non-spaceworthy (armor) diff --git a/code/modules/events/stray_cargo.dm b/code/modules/events/stray_cargo.dm deleted file mode 100644 index 182ea658a7a9..000000000000 --- a/code/modules/events/stray_cargo.dm +++ /dev/null @@ -1,76 +0,0 @@ -///Spawns a cargo pod containing a random cargo supply pack on a random area of the station -/datum/round_event_control/stray_cargo - name = "Stray Cargo Pod" - typepath = /datum/round_event/stray_cargo - weight = 20 - max_occurrences = 4 - earliest_start = 10 MINUTES - -///Spawns a cargo pod containing a random cargo supply pack on a random area of the station -/datum/round_event/stray_cargo - var/area/impact_area ///Randomly picked area - announceChance = 75 - var/list/possible_pack_types = list() ///List of possible supply packs dropped in the pod, if empty picks from the cargo list - var/static/list/stray_spawnable_supply_packs = list() ///List of default spawnable supply packs, filtered from the cargo list - -/datum/round_event/stray_cargo/announce(fake) - priority_announce("Stray cargo pod detected on long-range scanners. Expected location of impact: [impact_area.name].", "Collision Alert", zlevel = impact_area.virtual_z()) - -/** -* Tries to find a valid area, throws an error if none are found -* Also randomizes the start timer -*/ -/datum/round_event/stray_cargo/setup() - startWhen = rand(20, 40) - impact_area = find_event_area() - if(!impact_area) - CRASH("No valid areas for cargo pod found.") - var/list/turf_test = get_area_turfs(impact_area) - if(!turf_test.len) - CRASH("Stray Cargo Pod : No valid turfs found for [impact_area] - [impact_area.type]") - - if(!stray_spawnable_supply_packs.len) - stray_spawnable_supply_packs = SSshuttle.supply_packs.Copy() - -///Spawns a random supply pack, puts it in a pod, and spawns it on a random tile of the selected area -/datum/round_event/stray_cargo/start() - var/list/turf/valid_turfs = get_area_turfs(impact_area) - //Only target non-dense turfs to prevent wall-embedded pods - for(var/i in valid_turfs) - var/turf/T = i - if(T.density) - valid_turfs -= T - var/turf/LZ = pick(valid_turfs) - var/pack_type - if(possible_pack_types.len) - pack_type = pick(possible_pack_types) - else - pack_type = pick(stray_spawnable_supply_packs) - var/datum/supply_pack/SP = new pack_type - var/obj/structure/closet/crate/crate = SP.generate(null) - crate.locked = FALSE //Unlock secure crates - crate.update_appearance() - var/obj/structure/closet/supplypod/pod = make_pod() - new /obj/effect/pod_landingzone(LZ, pod, crate) - -///Handles the creation of the pod, in case it needs to be modified beforehand -/datum/round_event/stray_cargo/proc/make_pod() - var/obj/structure/closet/supplypod/S = new - return S - -///Picks an area that wouldn't risk critical damage if hit by a pod explosion -/datum/round_event/stray_cargo/proc/find_event_area() - var/static/list/allowed_areas - if(!allowed_areas) - ///Places that shouldn't explode - var/list/safe_area_types = typecacheof(list( - /area/ship/science/ai_chamber, - /area/ship/engineering - )) - - ///Subtypes from the above that actually should explode. - var/list/unsafe_area_subtypes = typecacheof(list()) - allowed_areas = make_associative(typesof(/area/ship)) - safe_area_types + unsafe_area_subtypes - var/list/possible_areas = typecache_filter_list(GLOB.sortedAreas,allowed_areas) - if (length(possible_areas)) - return pick(possible_areas) diff --git a/code/modules/faction/faction_datum.dm b/code/modules/faction/faction_datum.dm index 993fee1e37f3..487d4f9c7810 100644 --- a/code/modules/faction/faction_datum.dm +++ b/code/modules/faction/faction_datum.dm @@ -5,11 +5,28 @@ var/parent_faction /// List of prefixes that ships of this faction uses var/list/prefixes + /// list of factions that are "allowed" with this faction, used for factional cargo + var/list/allowed_factions /datum/faction/New() if(!short_name) short_name = name +/// Easy way to check if something is "allowed", checks to see if it matches the name or faction typepath because factions are a fucking mess +/datum/faction/proc/allowed_faction(value_to_check) + ///Are we the same datum? + if(istype(value_to_check, src)) + return TRUE + ///Allow if we share a parent faction + if(istype(value_to_check, parent_faction)) + return TRUE + //do we have the same faction even if one is a define? + if(value_to_check == name) + return TRUE + if(value_to_check in allowed_factions) + return TRUE + return FALSE + /datum/faction/syndicate name = FACTION_SYNDICATE parent_faction = /datum/faction/syndicate @@ -79,3 +96,9 @@ name = FACTION_INDEPENDENT short_name = "Indie" prefixes = PREFIX_INDEPENDENT + +/datum/faction/syndicate/scarborough_arms + name = "Scarborough Arms" + parent_faction = /datum/faction/syndicate + prefixes = PREFIX_INDEPENDENT + allowed_factions = list(/datum/faction/syndicate) diff --git a/code/modules/overmap/objects/outpost/outpost.dm b/code/modules/overmap/objects/outpost/outpost.dm index 01a100022cbf..09e116491725 100644 --- a/code/modules/overmap/objects/outpost/outpost.dm +++ b/code/modules/overmap/objects/outpost/outpost.dm @@ -41,6 +41,12 @@ var/max_missions = 15 /// List of missions that can be accepted at this outpost. Missions which have been accepted are removed from this list. var/list/datum/mission/missions + /// List of all of the things this outpost offers + var/list/supply_packs = list() + /// our 'Order number' + var/ordernum = 1 + /// Our faction of the outpost + var/datum/faction/faction /datum/overmap/outpost/Initialize(position, ...) . = ..() @@ -64,6 +70,7 @@ Rename(gen_outpost_name()) fill_missions() + populate_cargo() addtimer(CALLBACK(src, PROC_REF(fill_missions)), 10 MINUTES, TIMER_STOPPABLE|TIMER_LOOP|TIMER_DELETE_ME) /datum/overmap/outpost/Destroy(...) @@ -139,6 +146,17 @@ var/datum/mission/M = new mission_type(src) LAZYADD(missions, M) +/datum/overmap/outpost/proc/populate_cargo() + ordernum = rand(1, 99000) + + for(var/datum/supply_pack/current_pack as anything in subtypesof(/datum/supply_pack)) + current_pack = new current_pack() + if(current_pack.faction) + current_pack.faction = new current_pack.faction() + if(!current_pack.contains) + continue + supply_packs += current_pack + /datum/overmap/outpost/proc/load_main_level() if(!main_template) CRASH("[src] ([src.type]) tried to load without a template!") diff --git a/code/modules/overmap/objects/outpost/outpost_types.dm b/code/modules/overmap/objects/outpost/outpost_types.dm index a56b56a4c570..32677d415aa7 100644 --- a/code/modules/overmap/objects/outpost/outpost_types.dm +++ b/code/modules/overmap/objects/outpost/outpost_types.dm @@ -109,6 +109,7 @@ /datum/map_template/outpost/hangar/nt_ice_56x20, /datum/map_template/outpost/hangar/nt_ice_56x40 ) + faction = /datum/faction/nt /datum/overmap/outpost/no_main_level // For example and adminspawn. main_template = null diff --git a/code/modules/projectiles/guns/ballistic/assault.dm b/code/modules/projectiles/guns/ballistic/assault.dm index 0141667d1ce6..fa30b670f99c 100644 --- a/code/modules/projectiles/guns/ballistic/assault.dm +++ b/code/modules/projectiles/guns/ballistic/assault.dm @@ -77,34 +77,6 @@ item_state = "skm_inteq" manufacturer = MANUFACTURER_INTEQ -/obj/item/gun/ballistic/automatic/assault/p16 - name = "\improper P-16" - desc = "An assault rifle pattern from Sol, existing before the Night of Fire. A favorite of professional mercenaries and well-heeled pirates. Chambered in 5.56mm." - icon = 'icons/obj/guns/48x32guns.dmi' - fire_sound = 'sound/weapons/gun/rifle/m16.ogg' - icon_state = "p16" - item_state = "p16" - show_magazine_on_sprite = TRUE - w_class = WEIGHT_CLASS_BULKY - slot_flags = ITEM_SLOT_BACK - default_ammo_type = /obj/item/ammo_box/magazine/p16 - allowed_ammo_types = list( - /obj/item/ammo_box/magazine/p16, - ) - spread = 2 - wield_delay = 0.5 SECONDS - - fire_delay = 0.18 SECONDS - - rack_sound = 'sound/weapons/gun/rifle/m16_cocked.ogg' - load_sound = 'sound/weapons/gun/rifle/m16_reload.ogg' - load_empty_sound = 'sound/weapons/gun/rifle/m16_reload.ogg' - eject_sound = 'sound/weapons/gun/rifle/m16_unload.ogg' - eject_empty_sound = 'sound/weapons/gun/rifle/m16_unload.ogg' - -/obj/item/gun/ballistic/automatic/assault/p16/no_mag - default_ammo_type = FALSE - /obj/item/gun/ballistic/automatic/assault/cm82 name = "\improper CM-16" desc = "The standard-issue rifle of CLIP and an extensively modified reproduction of the P-16. Chambered in 5.56mm." diff --git a/code/modules/reagents/reagent_containers/bottle.dm b/code/modules/reagents/reagent_containers/bottle.dm index df7949c9c654..80d636202f4c 100644 --- a/code/modules/reagents/reagent_containers/bottle.dm +++ b/code/modules/reagents/reagent_containers/bottle.dm @@ -39,6 +39,11 @@ desc = "A small bottle of morphine." list_reagents = list(/datum/reagent/medicine/morphine = 30) +/obj/item/reagent_containers/glass/bottle/painkiller_booze + name = "'painkiller' bottle" + desc = "A small bottle of an unmarked substance called 'painkiller.' Will this really work?" + list_reagents = list(/datum/reagent/consumable/ethanol/painkiller = 30) + /obj/item/reagent_containers/glass/bottle/chloralhydrate name = "chloral hydrate bottle" desc = "A small bottle of Choral Hydrate. Mickey's Favorite!" diff --git a/code/modules/spells/spell_types/rightandwrong.dm b/code/modules/spells/spell_types/rightandwrong.dm index bca247fe9026..a5c542c819ce 100644 --- a/code/modules/spells/spell_types/rightandwrong.dm +++ b/code/modules/spells/spell_types/rightandwrong.dm @@ -18,7 +18,7 @@ GLOBAL_LIST_INIT(summoned_guns, list( /obj/item/gun/ballistic/shotgun/doublebarrel, /obj/item/gun/ballistic/shotgun, /obj/item/gun/ballistic/shotgun/automatic/m11, - /obj/item/gun/ballistic/automatic/assault/p16, + /obj/item/gun/ballistic/automatic/m15, /obj/item/gun/ballistic/revolver/mateba, /obj/item/gun/ballistic/rifle/illestren, /obj/item/pneumatic_cannon/speargun, diff --git a/shiptest.dme b/shiptest.dme index 66f2020bebbe..005bfc1bbc44 100644 --- a/shiptest.dme +++ b/shiptest.dme @@ -2144,7 +2144,6 @@ #include "code\modules\events\spacevine.dm" #include "code\modules\events\spider_infestation.dm" #include "code\modules\events\spontaneous_appendicitis.dm" -#include "code\modules\events\stray_cargo.dm" #include "code\modules\events\vent_clog.dm" #include "code\modules\events\wormholes.dm" #include "code\modules\events\holiday\halloween.dm" diff --git a/tgui/packages/tgui/interfaces/OutpostCommunications/Catalog.js b/tgui/packages/tgui/interfaces/OutpostCommunications/Catalog.js index ebcad5d6a051..74a998cee05c 100644 --- a/tgui/packages/tgui/interfaces/OutpostCommunications/Catalog.js +++ b/tgui/packages/tgui/interfaces/OutpostCommunications/Catalog.js @@ -115,18 +115,28 @@ export const CargoCatalog = (props, context) => {