From c4e0f4ad3bcfcd69b185baa4d4f5a74850d785e6 Mon Sep 17 00:00:00 2001 From: Regen Date: Sun, 6 Sep 2015 22:55:22 +0200 Subject: [PATCH] Lockbox update Makes it so the mech weapons actually do spawn in lockboxes Also adds a large lockbox to fit the mech weapons (No sprite as of yet) --- code/game/mecha/mech_fabricator.dm | 6 +++++- code/game/objects/items/weapons/storage/lockbox.dm | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 4637a47ced0..58e97fd987d 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -182,7 +182,11 @@ desc = initial(desc) var/obj/item/I = new D.build_path - I.loc = get_step(src,SOUTH) + if(D.locked) + var/obj/item/weapon/storage/lockbox/large/L = new /obj/item/weapon/storage/lockbox/large(src.loc) //(Don't use capitals in paths, or single letters. + I.loc = L + else + I.loc = get_step(src,SOUTH) I.materials[MAT_METAL] = get_resource_cost_w_coeff(D,MAT_METAL) I.materials[MAT_GLASS] = get_resource_cost_w_coeff(D,MAT_GLASS) visible_message("\icon[src] \The [src] beeps, \"\The [I] is complete.\"") diff --git a/code/game/objects/items/weapons/storage/lockbox.dm b/code/game/objects/items/weapons/storage/lockbox.dm index 0dd85c270ab..e2e61276046 100644 --- a/code/game/objects/items/weapons/storage/lockbox.dm +++ b/code/game/objects/items/weapons/storage/lockbox.dm @@ -62,6 +62,13 @@ origin_tech = null //wipe out any origin tech if it's unlocked in any way so you can't double-dip tech levels at R&D. return +/obj/item/weapon/storage/lockbox/large + name = "Large lockbox" + desc = "A large lockbox" + max_w_class = 4 + max_combined_w_class = 4 //The sum of the w_classes of all the items in this storage item. + storage_slots = 1 + /obj/item/weapon/storage/lockbox/loyalty name = "Lockbox (Loyalty Implants)" req_access = list(access_security)