diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index 334a1c6fbc..13b0ae81ec 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -37,10 +37,7 @@
/obj/structure/closet/examine(mob/user)
- if(get_dist(src, user) > 1)
- return ..(user)
-
- if(opened)
+ if(..(user, 1) && !opened)
var/content_size = 0
for(var/obj/item/I in src.contents)
if(!I.anchored)
diff --git a/code/game/supplyshuttle.dm b/code/game/supplyshuttle.dm
index caf2c11fca..253d96174d 100644
--- a/code/game/supplyshuttle.dm
+++ b/code/game/supplyshuttle.dm
@@ -123,9 +123,6 @@ var/list/mechtoys = list(
var/comment = null
/datum/controller/supply
- var/processing = 1
- var/processing_interval = 300
- var/iteration = 0
//supply points
var/points = 50
var/points_per_process = 1
@@ -145,20 +142,14 @@ var/list/mechtoys = list(
New()
ordernum = rand(1,9000)
- //Supply shuttle ticker - handles supply point regenertion and shuttle travelling between centcomm and the station
- proc/process()
for(var/typepath in (typesof(/datum/supply_packs) - /datum/supply_packs))
var/datum/supply_packs/P = new typepath()
supply_packs[P.name] = P
- spawn(0)
- set background = 1
- while(1)
- if(processing)
- iteration++
- points += points_per_process
-
- sleep(processing_interval)
+ // Supply shuttle ticker - handles supply point regeneration
+ // This is called by the process scheduler every thirty seconds
+ proc/process()
+ points += points_per_process
//To stop things being sent to centcomm which should not be sent to centcomm. Recursively checks for these types.
proc/forbidden_atoms_check(atom/A)
@@ -251,23 +242,30 @@ var/list/mechtoys = list(
var/datum/supply_order/SO = S
var/datum/supply_packs/SP = SO.object
- var/atom/A = new SP.containertype(pickedloc)
+ var/obj/A = new SP.containertype(pickedloc)
A.name = "[SP.containername] [SO.comment ? "([SO.comment])":"" ]"
//supply manifest generation begin
- var/obj/item/weapon/paper/manifest/slip = new /obj/item/weapon/paper/manifest(A)
- slip.is_copy = 0
- slip.info = "
[command_name()] Shipping Manifest
"
- slip.info +="Order #[SO.ordernum]
"
- slip.info +="Destination: [station_name]
"
- slip.info +="[shoppinglist.len] PACKAGES IN THIS SHIPMENT
"
- slip.info +="CONTENTS:
"
+ var/obj/item/weapon/paper/manifest/slip
+ if(!SP.contraband)
+ slip = new /obj/item/weapon/paper/manifest(A)
+ slip.is_copy = 0
+ slip.info = "[command_name()] Shipping Manifest
"
+ slip.info +="Order #[SO.ordernum]
"
+ slip.info +="Destination: [station_name]
"
+ slip.info +="[shoppinglist.len] PACKAGES IN THIS SHIPMENT
"
+ slip.info +="CONTENTS:
"
//spawn the stuff, finish generating the manifest while you're at it
if(SP.access)
- A:req_access = list()
- A:req_access += text2num(SP.access)
+ if(isnum(SP.access))
+ A.req_access = list(SP.access)
+ else if(islist(SP.access))
+ var/list/L = SP.access // access var is a plain var, we need a list
+ A.req_access = L.Copy()
+ else
+ world << "Supply pack with invalid access restriction [SP.access] encountered!"
var/list/contains
if(istype(SP,/datum/supply_packs/randomised))
@@ -283,12 +281,12 @@ var/list/mechtoys = list(
if(!typepath) continue
var/atom/B2 = new typepath(A)
if(SP.amount && B2:amount) B2:amount = SP.amount
- slip.info += "- [B2.name]
" //add the item to the manifest
+ if(slip) slip.info += "- [B2.name]
" //add the item to the manifest
//manifest finalisation
- slip.info += "
"
- slip.info += "CHECK CONTENTS AND STAMP BELOW THE LINE TO CONFIRM RECEIPT OF GOODS
"
- if (SP.contraband) slip.loc = null //we are out of blanks for Form #44-D Ordering Illicit Drugs.
+ if(slip)
+ slip.info += "
"
+ slip.info += "CHECK CONTENTS AND STAMP BELOW THE LINE TO CONFIRM RECEIPT OF GOODS
"
shoppinglist.Cut()
return
diff --git a/code/modules/reagents/dispenser/supply.dm b/code/modules/reagents/dispenser/supply.dm
index f208991712..d0b1cd559f 100644
--- a/code/modules/reagents/dispenser/supply.dm
+++ b/code/modules/reagents/dispenser/supply.dm
@@ -144,7 +144,7 @@
_tname {\
name = _name ;\
containername = _cname ;\
- containertype = /obj/structure/closet/crate/secure;\
+ containertype = /obj/structure/closet/crate;\
cost = _cost ;\
contains = list( _type , _type );\
group = "Reagent Cartridges"\