From 0166543817c0a3fa38d3272b5a98538c22c5a8e1 Mon Sep 17 00:00:00 2001
From: Sharkmare <34294231+Sharkmare@users.noreply.github.com>
Date: Wed, 1 Mar 2023 21:25:42 +0100
Subject: [PATCH 1/4] Adds a blacklist that can modified in mapping for Designs
This allows us to define a proto-lathe to have block EX a VR proto-lathe from making Teleporters
---
code/modules/research/protolathe.dm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm
index 7a5b17dca4..65d9d44f5f 100644
--- a/code/modules/research/protolathe.dm
+++ b/code/modules/research/protolathe.dm
@@ -14,7 +14,7 @@
var/mat_efficiency = 1
var/speed = 1
-
+ var/list/LockedDesigns = list() //CHOMPADDITION: FOR VR mainly.
//VOREStation Edit - Broke this into lines
materials = list(
MAT_STEEL = 0,
@@ -191,6 +191,11 @@
return
/obj/machinery/r_n_d/protolathe/proc/canBuild(var/datum/design/D)
+ //CHOMPADDITION: LOCKED designs
+ for(var/datum/design/X in LockedDesigns)
+ if(X == D)
+ return 0
+ //CHOMPADDITION: LOCKED designs
for(var/M in D.materials)
if(materials[M] < (D.materials[M] * mat_efficiency))
return 0
From 9adfdd2b0d1f3f5da654e76e40d179a826b726fe Mon Sep 17 00:00:00 2001
From: Sharkmare <34294231+Sharkmare@users.noreply.github.com>
Date: Wed, 1 Mar 2023 21:33:05 +0100
Subject: [PATCH 2/4] Update protolathe.dm
---
code/modules/research/protolathe.dm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm
index 65d9d44f5f..ba41ca29c5 100644
--- a/code/modules/research/protolathe.dm
+++ b/code/modules/research/protolathe.dm
@@ -120,6 +120,11 @@
icon_state = "[icon_state]_work"
/obj/machinery/r_n_d/protolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
+ //CHOMPADDITION Locked lathes are hard coded
+ if(LAZYLEN(LockedDesigns))
+ to_chat(user, "\The [src] is can not be deconstructed.")
+ return 1
+ //CHOMPADDITION Locked lathes are hard coded
if(busy)
to_chat(user, "\The [src] is busy. Please wait for completion of previous operation.")
return 1
From bd250dab59aadc185cd2e20f543b8bf7bd3000cb Mon Sep 17 00:00:00 2001
From: Sharkmare <34294231+Sharkmare@users.noreply.github.com>
Date: Wed, 1 Mar 2023 21:38:20 +0100
Subject: [PATCH 3/4] Update protolathe.dm
---
code/modules/research/protolathe.dm | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm
index ba41ca29c5..62c6d1d20f 100644
--- a/code/modules/research/protolathe.dm
+++ b/code/modules/research/protolathe.dm
@@ -120,15 +120,10 @@
icon_state = "[icon_state]_work"
/obj/machinery/r_n_d/protolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
- //CHOMPADDITION Locked lathes are hard coded
- if(LAZYLEN(LockedDesigns))
- to_chat(user, "\The [src] is can not be deconstructed.")
- return 1
- //CHOMPADDITION Locked lathes are hard coded
if(busy)
to_chat(user, "\The [src] is busy. Please wait for completion of previous operation.")
return 1
- if(default_deconstruction_screwdriver(user, O))
+ if(!LAZYLEN(LockedDesigns) && default_deconstruction_screwdriver(user, O))//CHOMPADDITION Locked lathes are hard coded
if(linked_console)
linked_console.linked_lathe = null
linked_console = null
From 2f2a5945b06866f9efe327bccaf9e50e1f516399 Mon Sep 17 00:00:00 2001
From: Sharkmare <34294231+Sharkmare@users.noreply.github.com>
Date: Thu, 2 Mar 2023 08:17:47 +0100
Subject: [PATCH 4/4] rerun unit tests
---
code/modules/research/protolathe.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm
index 62c6d1d20f..84024e345b 100644
--- a/code/modules/research/protolathe.dm
+++ b/code/modules/research/protolathe.dm
@@ -123,7 +123,7 @@
if(busy)
to_chat(user, "\The [src] is busy. Please wait for completion of previous operation.")
return 1
- if(!LAZYLEN(LockedDesigns) && default_deconstruction_screwdriver(user, O))//CHOMPADDITION Locked lathes are hard coded
+ if(!LAZYLEN(LockedDesigns) && default_deconstruction_screwdriver(user, O))//CHOMPADDITION Locked lathes are hard coded
if(linked_console)
linked_console.linked_lathe = null
linked_console = null