From 2481a8d7bdda459e995876adfe9db0b2303461bf Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Tue, 22 Dec 2015 11:42:09 -0500 Subject: [PATCH 1/2] Research Lockbox Access Change and Wormhole Projector Lockboxing --- code/modules/research/designs.dm | 1 + code/modules/research/designs/weapon_designs.dm | 2 ++ code/modules/research/rdconsole.dm | 5 +++++ 3 files changed, 8 insertions(+) diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index 8c74c89ac05..21b0c070512 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -44,6 +44,7 @@ other types of metals and chemistry for reagents). var/construction_time //Amount of time required for building the object var/build_path = "" //The file path of the object that gets created var/locked = 0 //If true it will spawn inside a lockbox with currently sec access + var/access_requirement = list(access_armory) //What special access requirements will the lockbox have? Defaults to armory. var/category = null //Primarily used for Mech Fabricators, but can be used for anything var/list/reagents = list() //List of reagents. Format: "id" = amount. diff --git a/code/modules/research/designs/weapon_designs.dm b/code/modules/research/designs/weapon_designs.dm index e0e691e8e45..4a9c5d0b455 100644 --- a/code/modules/research/designs/weapon_designs.dm +++ b/code/modules/research/designs/weapon_designs.dm @@ -68,6 +68,8 @@ build_type = PROTOLATHE materials = list(MAT_SILVER = 1000, MAT_METAL = 5000, MAT_DIAMOND = 3000) build_path = /obj/item/weapon/gun/energy/wormhole_projector + locked = 1 + access_requirement = list(access_rd) //screw you, HoS, this aint yours; this is only for a man of science---and trouble. category = list("Weapons") /datum/design/large_grenade diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 0212dcf4834..3995f5c85a5 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -437,6 +437,11 @@ proc/CallMaterialName(ID) new_item.loc = L L.name += " ([new_item.name])" L.origin_tech = new_item.origin_tech + L.req_access = being_built.access_requirement + var/lockbox_access = null + for(var/A in L.req_access) + lockbox_access = get_access_desc(A) + L.desc = "A locked box. It is locked to [lockbox_access] access." else new_item.loc = linked_lathe.loc linked_lathe.busy = 0 From 41c5a146e0888bd33cd0faa84cd6ce51cfdea05f Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Wed, 23 Dec 2015 01:54:53 -0500 Subject: [PATCH 2/2] multiple access --- code/modules/research/rdconsole.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 3995f5c85a5..b43ca6a38f5 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -438,10 +438,10 @@ proc/CallMaterialName(ID) L.name += " ([new_item.name])" L.origin_tech = new_item.origin_tech L.req_access = being_built.access_requirement - var/lockbox_access = null + var/list/lockbox_access for(var/A in L.req_access) - lockbox_access = get_access_desc(A) - L.desc = "A locked box. It is locked to [lockbox_access] access." + lockbox_access += "[get_access_desc(A)] " + L.desc = "A locked box. It is locked to [lockbox_access]access." else new_item.loc = linked_lathe.loc linked_lathe.busy = 0