Cargo Fluff (#9781)

This commit is contained in:
Geeves
2020-08-28 16:15:08 +02:00
committed by GitHub
parent 6381c8403b
commit 4551b8b7bc
4 changed files with 14 additions and 3 deletions
+1
View File
@@ -340,6 +340,7 @@
#define CARGO_CONTAINER_CRATE "crate"
#define CARGO_CONTAINER_FREEZER "freezer"
#define CARGO_CONTAINER_BOX "box"
#define CARGO_CONTAINER_BODYBAG "bodybag"
// We should start using these.
#define ITEMSIZE_TINY 1
+4 -3
View File
@@ -296,7 +296,7 @@ var/datum/controller/subsystem/cargo/SScargo
return path_error
//Check if a valid container is specified
if(!(ci.container_type == CARGO_CONTAINER_CRATE || ci.container_type == CARGO_CONTAINER_FREEZER || ci.container_type == CARGO_CONTAINER_BOX))
if(!(ci.container_type in list(CARGO_CONTAINER_CRATE, CARGO_CONTAINER_FREEZER, CARGO_CONTAINER_BOX, CARGO_CONTAINER_BODYBAG)))
log_debug("SScargo: Invalid container type specified for item [name] - [id]: Aborting")
qdel(ci)
return "Invalid container type specified for item [name] - [id]"
@@ -676,8 +676,9 @@ var/datum/controller/subsystem/cargo/SScargo
var/obj/A = new containertype(pickedloc)
//Label the crate
//TODO-CARGO: Look into wrapping it in a the suppliers paper
A.name = "[co.order_id] - [co.ordered_by]"
A.name_unlabel = A.name
A.name = "[A.name] ([co.order_id] - [co.ordered_by])"
A.verbs += /atom/proc/remove_label
//Set the access requirement
if(co.required_access.len > 0)
+2
View File
@@ -265,6 +265,8 @@
return /obj/structure/largecrate
if(CARGO_CONTAINER_FREEZER)
return /obj/structure/closet/crate/freezer
if(CARGO_CONTAINER_BODYBAG)
return /obj/structure/closet/body_bag
else
log_debug("Cargo: Tried to get container type for invalid container [container_type]")
return /obj/structure/largecrate