mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 12:37:50 +01:00
Merge branch 'master' of https://github.com/PolarisSS13/Polaris into fifty_stacks
This commit is contained in:
@@ -306,4 +306,11 @@
|
||||
cost = 25
|
||||
containertype = "/obj/structure/closet/crate/secure"
|
||||
containername = "Virus sample crate"
|
||||
access = access_cmo
|
||||
access = access_cmo
|
||||
|
||||
/datum/supply_packs/med/defib
|
||||
name = "Defibrilator crate"
|
||||
contains = list(/obj/item/device/defib_kit = 4)
|
||||
cost = 30
|
||||
containertype = /obj/structure/closet/crate/medical
|
||||
containername = "Defibrilator crate"
|
||||
@@ -3,11 +3,11 @@
|
||||
*/
|
||||
/datum/stored_item
|
||||
var/item_name = "name" //Name of the item(s) displayed
|
||||
var/item_path = null
|
||||
var/item_path = null
|
||||
var/amount = 0
|
||||
var/list/instances //What items are actually stored
|
||||
var/stored //The thing holding it is
|
||||
|
||||
|
||||
/datum/stored_item/New(var/stored, var/path, var/name = null, var/amount = 0)
|
||||
src.item_path = path
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
src.item_name = initial(tmp.name)
|
||||
else
|
||||
src.item_name = name
|
||||
|
||||
|
||||
src.amount = amount
|
||||
src.stored = stored
|
||||
|
||||
|
||||
..()
|
||||
|
||||
/datum/stored_item/Destroy()
|
||||
@@ -29,10 +29,10 @@
|
||||
qdel(product)
|
||||
instances.Cut()
|
||||
. = ..()
|
||||
|
||||
|
||||
/datum/stored_item/proc/get_amount()
|
||||
return instances ? instances.len : amount
|
||||
|
||||
|
||||
/datum/stored_item/proc/get_product(var/product_location)
|
||||
if(!get_amount() || !product_location)
|
||||
return
|
||||
@@ -41,14 +41,15 @@
|
||||
var/atom/movable/product = instances[instances.len] // Remove the last added product
|
||||
instances -= product
|
||||
product.forceMove(product_location)
|
||||
|
||||
return product
|
||||
|
||||
/datum/stored_item/proc/add_product(var/atom/movable/product)
|
||||
if(product.type != item_path)
|
||||
return 0
|
||||
init_products()
|
||||
product.forceMove(stored)
|
||||
instances += product
|
||||
|
||||
|
||||
/datum/stored_item/proc/init_products()
|
||||
if(instances)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user