diff --git a/code/modules/cargo/console.dm b/code/modules/cargo/console.dm index d1d895ca69..6968a5ccd8 100644 --- a/code/modules/cargo/console.dm +++ b/code/modules/cargo/console.dm @@ -119,6 +119,7 @@ var/list/data = list() data["requestonly"] = requestonly data["supplies"] = list() + data["emagged"] = obj_flags & EMAGGED for(var/pack in SSshuttle.supply_packs) var/datum/supply_pack/P = SSshuttle.supply_packs[pack] if(!data["supplies"][P.group]) @@ -133,7 +134,8 @@ "cost" = P.cost, "id" = pack, "desc" = P.desc || P.name, // If there is a description, use it. Otherwise use the pack's name. - "access" = P.access + "access" = P.access, + "can_private_buy" = P.can_private_buy )) return data @@ -195,9 +197,10 @@ rank = "Silicon" var/datum/bank_account/account - if(self_paid && ishuman(usr)) - var/mob/living/carbon/human/H = usr - var/obj/item/card/id/id_card = H.get_idcard(TRUE) + if(self_paid) + if(!pack.can_private_buy && !(obj_flags & EMAGGED)) + return + var/obj/item/card/id/id_card = usr.get_idcard(TRUE) if(!istype(id_card)) say("No ID card detected.") return diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index 96557d58ef..f82e16ad5c 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -15,6 +15,7 @@ var/special_enabled = FALSE var/DropPodOnly = FALSE //only usable by the Bluespace Drop Pod via the express cargo console var/admin_spawned = FALSE //Can only an admin spawn this crate? + var/can_private_buy = TRUE //Can it be purchased privately by each crewmember? /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/armory.dm b/code/modules/cargo/packs/armory.dm index bcfbc83001..3a3357cc42 100644 --- a/code/modules/cargo/packs/armory.dm +++ b/code/modules/cargo/packs/armory.dm @@ -10,6 +10,7 @@ group = "Armory" access = ACCESS_ARMORY crate_type = /obj/structure/closet/crate/secure/weapon + can_private_buy = FALSE /datum/supply_pack/security/armory/bulletarmor name = "Bulletproof Armor Crate" diff --git a/code/modules/cargo/packs/engine.dm b/code/modules/cargo/packs/engine.dm index 89775c07ee..499881a110 100644 --- a/code/modules/cargo/packs/engine.dm +++ b/code/modules/cargo/packs/engine.dm @@ -148,7 +148,7 @@ crate_name = "supermatter shard crate" crate_type = /obj/structure/closet/crate/secure/engineering dangerous = TRUE - + /datum/supply_pack/engine/tesla_coils name = "Tesla Coil Crate" desc = "Whether it's high-voltage executions, creating research points, or just plain old power generation: This pack of four Tesla coils can do it all!" diff --git a/code/modules/cargo/packs/medical.dm b/code/modules/cargo/packs/medical.dm index 5d02bbe60f..ab188f235b 100644 --- a/code/modules/cargo/packs/medical.dm +++ b/code/modules/cargo/packs/medical.dm @@ -252,6 +252,7 @@ crate_name = "virus crate" crate_type = /obj/structure/closet/crate/secure/plasma dangerous = TRUE + can_private_buy = FALSE /datum/supply_pack/medical/anitvirus name = "Virus Containment Crate" @@ -271,4 +272,4 @@ /obj/item/storage/box/syringes, /obj/item/storage/box/beakers) crate_name = "virus containment unit crate" - crate_type = /obj/structure/closet/crate/secure/plasma \ No newline at end of file + crate_type = /obj/structure/closet/crate/secure/plasma diff --git a/code/modules/cargo/packs/science.dm b/code/modules/cargo/packs/science.dm index 51bb2b728f..fd6fee362d 100644 --- a/code/modules/cargo/packs/science.dm +++ b/code/modules/cargo/packs/science.dm @@ -17,6 +17,7 @@ cost = 2500 contains = list (/obj/item/reagent_containers/food/snacks/cube/ape) crate_name = "ape cube crate" + can_private_buy = FALSE /datum/supply_pack/science/beakers name = "Chemistry Beakers Crate" diff --git a/code/modules/cargo/packs/security.dm b/code/modules/cargo/packs/security.dm index d134d7bab8..a48874e974 100644 --- a/code/modules/cargo/packs/security.dm +++ b/code/modules/cargo/packs/security.dm @@ -10,6 +10,7 @@ group = "Security" access = ACCESS_SECURITY crate_type = /obj/structure/closet/crate/secure/gear + can_private_buy = FALSE /datum/supply_pack/security/ammo name = "Ammo Crate - General Purpose" @@ -57,6 +58,7 @@ /obj/item/toy/crayon/white, /obj/item/clothing/head/fedora/det_hat) crate_name = "forensics crate" + can_private_buy = TRUE /datum/supply_pack/security/helmets name = "Helmets Crate" @@ -134,6 +136,7 @@ /obj/item/grenade/barrier) cost = 2000 crate_name = "security barriers crate" + can_private_buy = TRUE /datum/supply_pack/security/securityclothes name = "Security Clothing Crate" @@ -152,6 +155,7 @@ /obj/item/clothing/suit/armor/hos/navyblue, /obj/item/clothing/head/beret/sec/navyhos) crate_name = "security clothing crate" + can_private_buy = TRUE /datum/supply_pack/security/supplies name = "Security Supplies Crate" @@ -179,6 +183,7 @@ contains = list(/obj/item/clothing/head/helmet/justice, /obj/item/clothing/mask/gas/sechailer) crate_name = "security clothing crate" + can_private_buy = TRUE /datum/supply_pack/security/baton name = "Stun Batons Crate" @@ -207,3 +212,19 @@ /obj/item/storage/box/wall_flash, /obj/item/storage/box/wall_flash) crate_name = "wall-mounted flash crate" + +/datum/supply_pack/security/hunting + name = "Hunting Gear" + desc = "Even in space, we can find prey to hunt, this crate contains everthing a fine hunter needs to have a sporting time. This crate needs armory access to open. A true huntter only needs a fine bottle of cognac, a nice coat, some good o' cigars, and of cource a hunting shotgun. " + cost = 3500 + contraband = TRUE + contains = list(/obj/item/clothing/head/flatcap, + /obj/item/clothing/suit/hooded/wintercoat/captain, + /obj/item/reagent_containers/food/drinks/bottle/cognac, + /obj/item/storage/fancy/cigarettes/cigars/havana, + /obj/item/clothing/gloves/color/white, + /obj/item/clothing/under/rank/civilian/curator, + /obj/item/gun/ballistic/shotgun/lethal) + access = ACCESS_ARMORY + crate_name = "sporting crate" + crate_type = /obj/structure/closet/crate/secure // Would have liked a wooden crate but access >:( diff --git a/code/modules/cargo/packs/vending.dm b/code/modules/cargo/packs/vending.dm index 344d19f6c9..810cfd8d6e 100644 --- a/code/modules/cargo/packs/vending.dm +++ b/code/modules/cargo/packs/vending.dm @@ -99,6 +99,7 @@ contains = list(/obj/machinery/vending/security) crate_name = "SecTech supply crate" crate_type = /obj/structure/closet/crate/secure/gear + can_private_buy = FALSE /datum/supply_pack/vending/snack name = "Snack Supply Crate" diff --git a/tgui-next/packages/tgui/interfaces/Cargo.js b/tgui-next/packages/tgui/interfaces/Cargo.js index b31a25c611..133b1b00ab 100644 --- a/tgui-next/packages/tgui/interfaces/Cargo.js +++ b/tgui-next/packages/tgui/interfaces/Cargo.js @@ -154,6 +154,10 @@ const Catalog = props => {