Certain packs (mostly armory/security) can not be privately bought anymore.
This commit is contained in:
@@ -119,6 +119,7 @@
|
|||||||
var/list/data = list()
|
var/list/data = list()
|
||||||
data["requestonly"] = requestonly
|
data["requestonly"] = requestonly
|
||||||
data["supplies"] = list()
|
data["supplies"] = list()
|
||||||
|
data["emagged"] = obj_flags & EMAGGED
|
||||||
for(var/pack in SSshuttle.supply_packs)
|
for(var/pack in SSshuttle.supply_packs)
|
||||||
var/datum/supply_pack/P = SSshuttle.supply_packs[pack]
|
var/datum/supply_pack/P = SSshuttle.supply_packs[pack]
|
||||||
if(!data["supplies"][P.group])
|
if(!data["supplies"][P.group])
|
||||||
@@ -133,7 +134,8 @@
|
|||||||
"cost" = P.cost,
|
"cost" = P.cost,
|
||||||
"id" = pack,
|
"id" = pack,
|
||||||
"desc" = P.desc || P.name, // If there is a description, use it. Otherwise use the pack's name.
|
"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
|
return data
|
||||||
|
|
||||||
@@ -195,9 +197,10 @@
|
|||||||
rank = "Silicon"
|
rank = "Silicon"
|
||||||
|
|
||||||
var/datum/bank_account/account
|
var/datum/bank_account/account
|
||||||
if(self_paid && ishuman(usr))
|
if(self_paid)
|
||||||
var/mob/living/carbon/human/H = usr
|
if(!pack.can_private_buy && !(obj_flags & EMAGGED))
|
||||||
var/obj/item/card/id/id_card = H.get_idcard(TRUE)
|
return
|
||||||
|
var/obj/item/card/id/id_card = usr.get_idcard(TRUE)
|
||||||
if(!istype(id_card))
|
if(!istype(id_card))
|
||||||
say("No ID card detected.")
|
say("No ID card detected.")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
var/special_enabled = FALSE
|
var/special_enabled = FALSE
|
||||||
var/DropPodOnly = FALSE //only usable by the Bluespace Drop Pod via the express cargo console
|
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/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)
|
/datum/supply_pack/proc/generate(atom/A, datum/bank_account/paying_account)
|
||||||
var/obj/structure/closet/crate/C
|
var/obj/structure/closet/crate/C
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
group = "Armory"
|
group = "Armory"
|
||||||
access = ACCESS_ARMORY
|
access = ACCESS_ARMORY
|
||||||
crate_type = /obj/structure/closet/crate/secure/weapon
|
crate_type = /obj/structure/closet/crate/secure/weapon
|
||||||
|
can_private_buy = FALSE
|
||||||
|
|
||||||
/datum/supply_pack/security/armory/bulletarmor
|
/datum/supply_pack/security/armory/bulletarmor
|
||||||
name = "Bulletproof Armor Crate"
|
name = "Bulletproof Armor Crate"
|
||||||
|
|||||||
@@ -252,6 +252,7 @@
|
|||||||
crate_name = "virus crate"
|
crate_name = "virus crate"
|
||||||
crate_type = /obj/structure/closet/crate/secure/plasma
|
crate_type = /obj/structure/closet/crate/secure/plasma
|
||||||
dangerous = TRUE
|
dangerous = TRUE
|
||||||
|
can_private_buy = FALSE
|
||||||
|
|
||||||
/datum/supply_pack/medical/anitvirus
|
/datum/supply_pack/medical/anitvirus
|
||||||
name = "Virus Containment Crate"
|
name = "Virus Containment Crate"
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
cost = 2500
|
cost = 2500
|
||||||
contains = list (/obj/item/reagent_containers/food/snacks/cube/ape)
|
contains = list (/obj/item/reagent_containers/food/snacks/cube/ape)
|
||||||
crate_name = "ape cube crate"
|
crate_name = "ape cube crate"
|
||||||
|
can_private_buy = FALSE
|
||||||
|
|
||||||
/datum/supply_pack/science/beakers
|
/datum/supply_pack/science/beakers
|
||||||
name = "Chemistry Beakers Crate"
|
name = "Chemistry Beakers Crate"
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
group = "Security"
|
group = "Security"
|
||||||
access = ACCESS_SECURITY
|
access = ACCESS_SECURITY
|
||||||
crate_type = /obj/structure/closet/crate/secure/gear
|
crate_type = /obj/structure/closet/crate/secure/gear
|
||||||
|
can_private_buy = FALSE
|
||||||
|
|
||||||
/datum/supply_pack/security/ammo
|
/datum/supply_pack/security/ammo
|
||||||
name = "Ammo Crate - General Purpose"
|
name = "Ammo Crate - General Purpose"
|
||||||
@@ -57,6 +58,7 @@
|
|||||||
/obj/item/toy/crayon/white,
|
/obj/item/toy/crayon/white,
|
||||||
/obj/item/clothing/head/fedora/det_hat)
|
/obj/item/clothing/head/fedora/det_hat)
|
||||||
crate_name = "forensics crate"
|
crate_name = "forensics crate"
|
||||||
|
can_private_buy = TRUE
|
||||||
|
|
||||||
/datum/supply_pack/security/helmets
|
/datum/supply_pack/security/helmets
|
||||||
name = "Helmets Crate"
|
name = "Helmets Crate"
|
||||||
@@ -134,6 +136,7 @@
|
|||||||
/obj/item/grenade/barrier)
|
/obj/item/grenade/barrier)
|
||||||
cost = 2000
|
cost = 2000
|
||||||
crate_name = "security barriers crate"
|
crate_name = "security barriers crate"
|
||||||
|
can_private_buy = TRUE
|
||||||
|
|
||||||
/datum/supply_pack/security/securityclothes
|
/datum/supply_pack/security/securityclothes
|
||||||
name = "Security Clothing Crate"
|
name = "Security Clothing Crate"
|
||||||
@@ -152,6 +155,7 @@
|
|||||||
/obj/item/clothing/suit/armor/hos/navyblue,
|
/obj/item/clothing/suit/armor/hos/navyblue,
|
||||||
/obj/item/clothing/head/beret/sec/navyhos)
|
/obj/item/clothing/head/beret/sec/navyhos)
|
||||||
crate_name = "security clothing crate"
|
crate_name = "security clothing crate"
|
||||||
|
can_private_buy = TRUE
|
||||||
|
|
||||||
/datum/supply_pack/security/supplies
|
/datum/supply_pack/security/supplies
|
||||||
name = "Security Supplies Crate"
|
name = "Security Supplies Crate"
|
||||||
@@ -179,6 +183,7 @@
|
|||||||
contains = list(/obj/item/clothing/head/helmet/justice,
|
contains = list(/obj/item/clothing/head/helmet/justice,
|
||||||
/obj/item/clothing/mask/gas/sechailer)
|
/obj/item/clothing/mask/gas/sechailer)
|
||||||
crate_name = "security clothing crate"
|
crate_name = "security clothing crate"
|
||||||
|
can_private_buy = TRUE
|
||||||
|
|
||||||
/datum/supply_pack/security/baton
|
/datum/supply_pack/security/baton
|
||||||
name = "Stun Batons Crate"
|
name = "Stun Batons Crate"
|
||||||
@@ -207,3 +212,19 @@
|
|||||||
/obj/item/storage/box/wall_flash,
|
/obj/item/storage/box/wall_flash,
|
||||||
/obj/item/storage/box/wall_flash)
|
/obj/item/storage/box/wall_flash)
|
||||||
crate_name = "wall-mounted flash crate"
|
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 >:(
|
||||||
|
|||||||
@@ -99,6 +99,7 @@
|
|||||||
contains = list(/obj/machinery/vending/security)
|
contains = list(/obj/machinery/vending/security)
|
||||||
crate_name = "SecTech supply crate"
|
crate_name = "SecTech supply crate"
|
||||||
crate_type = /obj/structure/closet/crate/secure/gear
|
crate_type = /obj/structure/closet/crate/secure/gear
|
||||||
|
can_private_buy = FALSE
|
||||||
|
|
||||||
/datum/supply_pack/vending/snack
|
/datum/supply_pack/vending/snack
|
||||||
name = "Snack Supply Crate"
|
name = "Snack Supply Crate"
|
||||||
|
|||||||
@@ -154,6 +154,10 @@ const Catalog = props => {
|
|||||||
</td>
|
</td>
|
||||||
<td className="LabeledList__cell LabeledList__buttons">
|
<td className="LabeledList__cell LabeledList__buttons">
|
||||||
<Button fluid
|
<Button fluid
|
||||||
|
disabled={(data.self_paid
|
||||||
|
&& !pack.can_private_buy
|
||||||
|
&& !data.emagged
|
||||||
|
)}
|
||||||
content={(data.self_paid
|
content={(data.self_paid
|
||||||
? Math.round(pack.cost * 1.1)
|
? Math.round(pack.cost * 1.1)
|
||||||
: pack.cost) + ' credits'}
|
: pack.cost) + ' credits'}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user