mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Removes some designs from the public circuit printer (#8680)
This commit is contained in:
@@ -16,6 +16,8 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
|
|||||||
var/mat_efficiency = 1
|
var/mat_efficiency = 1
|
||||||
var/speed = 1
|
var/speed = 1
|
||||||
|
|
||||||
|
var/list/LockedDesigns = list() //CHOMPADDITION: FOR VR mainly.
|
||||||
|
|
||||||
materials = list(MAT_STEEL = 0, MAT_GLASS = 0, MAT_PLASTEEL = 0, MAT_PLASTIC = 0, MAT_GRAPHITE = 0, MAT_GOLD = 0, MAT_SILVER = 0, MAT_OSMIUM = 0, MAT_LEAD = 0, MAT_PHORON = 0, MAT_URANIUM = 0, MAT_DIAMOND = 0, MAT_DURASTEEL = 0, MAT_VERDANTIUM = 0, MAT_MORPHIUM = 0, MAT_METALHYDROGEN = 0, MAT_SUPERMATTER = 0)
|
materials = list(MAT_STEEL = 0, MAT_GLASS = 0, MAT_PLASTEEL = 0, MAT_PLASTIC = 0, MAT_GRAPHITE = 0, MAT_GOLD = 0, MAT_SILVER = 0, MAT_OSMIUM = 0, MAT_LEAD = 0, MAT_PHORON = 0, MAT_URANIUM = 0, MAT_DIAMOND = 0, MAT_DURASTEEL = 0, MAT_VERDANTIUM = 0, MAT_MORPHIUM = 0, MAT_METALHYDROGEN = 0, MAT_SUPERMATTER = 0)
|
||||||
|
|
||||||
hidden_materials = list(MAT_PLASTEEL, MAT_DURASTEEL, MAT_GRAPHITE, MAT_VERDANTIUM, MAT_MORPHIUM, MAT_METALHYDROGEN, MAT_SUPERMATTER)
|
hidden_materials = list(MAT_PLASTEEL, MAT_DURASTEEL, MAT_GRAPHITE, MAT_VERDANTIUM, MAT_MORPHIUM, MAT_METALHYDROGEN, MAT_SUPERMATTER)
|
||||||
@@ -48,6 +50,11 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
|
|||||||
update_icon()
|
update_icon()
|
||||||
return
|
return
|
||||||
var/datum/design/D = queue[1]
|
var/datum/design/D = queue[1]
|
||||||
|
//CHOMPAdd Start
|
||||||
|
if(!allowedToBuild(D))
|
||||||
|
removeFromQueue(1)
|
||||||
|
return
|
||||||
|
//CHOMPAdd End
|
||||||
if(canBuild(D))
|
if(canBuild(D))
|
||||||
busy = 1
|
busy = 1
|
||||||
progress += speed
|
progress += speed
|
||||||
@@ -174,6 +181,14 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
|
|||||||
queue.Cut(index, index + 1)
|
queue.Cut(index, index + 1)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
//CHOMPAdd Start, Locked Designs
|
||||||
|
/obj/machinery/r_n_d/circuit_imprinter/proc/allowedToBuild(var/datum/design/D)
|
||||||
|
if(is_type_in_list(D, LockedDesigns))
|
||||||
|
visible_message(span_warning("The fabricator denied to print \the [D]."))
|
||||||
|
return 0
|
||||||
|
return 1
|
||||||
|
//CHOMPAdd End, Locked Designs
|
||||||
|
|
||||||
/obj/machinery/r_n_d/circuit_imprinter/proc/canBuild(var/datum/design/D)
|
/obj/machinery/r_n_d/circuit_imprinter/proc/canBuild(var/datum/design/D)
|
||||||
for(var/M in D.materials)
|
for(var/M in D.materials)
|
||||||
if(materials[M] < (D.materials[M] * mat_efficiency))
|
if(materials[M] < (D.materials[M] * mat_efficiency))
|
||||||
|
|||||||
@@ -62,6 +62,11 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
return
|
return
|
||||||
var/datum/design/D = queue[1]
|
var/datum/design/D = queue[1]
|
||||||
|
//CHOMPAdd Start
|
||||||
|
if(!allowedToBuild(D))
|
||||||
|
removeFromQueue(1)
|
||||||
|
return
|
||||||
|
//CHOMPAdd End
|
||||||
if(canBuild(D))
|
if(canBuild(D))
|
||||||
busy = 1
|
busy = 1
|
||||||
progress += speed
|
progress += speed
|
||||||
@@ -123,7 +128,7 @@
|
|||||||
if(busy)
|
if(busy)
|
||||||
to_chat(user, "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>")
|
to_chat(user, "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>")
|
||||||
return 1
|
return 1
|
||||||
if(!LAZYLEN(LockedDesigns) && default_deconstruction_screwdriver(user, O))//CHOMPADDITION Locked lathes are hard coded
|
if(default_deconstruction_screwdriver(user, O))
|
||||||
if(linked_console)
|
if(linked_console)
|
||||||
linked_console.linked_lathe = null
|
linked_console.linked_lathe = null
|
||||||
linked_console = null
|
linked_console = null
|
||||||
@@ -190,12 +195,15 @@
|
|||||||
queue.Cut(index, index + 1)
|
queue.Cut(index, index + 1)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
//CHOMPAdd Start, Locked Designs
|
||||||
|
/obj/machinery/r_n_d/protolathe/proc/allowedToBuild(var/datum/design/D)
|
||||||
|
if(is_type_in_list(D, LockedDesigns))
|
||||||
|
visible_message(span_warning("The fabricator denied to build \the [D]."))
|
||||||
|
return 0
|
||||||
|
return 1
|
||||||
|
//CHOMPAdd End, Locked Designs
|
||||||
|
|
||||||
/obj/machinery/r_n_d/protolathe/proc/canBuild(var/datum/design/D)
|
/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)
|
for(var/M in D.materials)
|
||||||
if(materials[M] < (D.materials[M] * mat_efficiency))
|
if(materials[M] < (D.materials[M] * mat_efficiency))
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
@@ -42,6 +42,9 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
var/obj/machinery/r_n_d/protolathe/linked_lathe = null //Linked Protolathe
|
var/obj/machinery/r_n_d/protolathe/linked_lathe = null //Linked Protolathe
|
||||||
var/obj/machinery/r_n_d/circuit_imprinter/linked_imprinter = null //Linked Circuit Imprinter
|
var/obj/machinery/r_n_d/circuit_imprinter/linked_imprinter = null //Linked Circuit Imprinter
|
||||||
|
|
||||||
|
var/list/LockedLatheDesigns = list() //CHOMPADDITION: FOR VR mainly.
|
||||||
|
var/list/LockedPrinterDesigns = list() //CHOMPADDITION: FOR VR mainly.
|
||||||
|
|
||||||
var/id = 0 //ID of the computer (for server restrictions).
|
var/id = 0 //ID of the computer (for server restrictions).
|
||||||
var/sync = 1 //If sync = 0, it doesn't show up on Server Control Console
|
var/sync = 1 //If sync = 0, it doesn't show up on Server Control Console
|
||||||
var/is_public = FALSE //Above mentions the option for public consoles. But for that, we need to remove the sync tab from the console entirely
|
var/is_public = FALSE //Above mentions the option for public consoles. But for that, we need to remove the sync tab from the console entirely
|
||||||
@@ -90,10 +93,14 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
if(linked_lathe == null)
|
if(linked_lathe == null)
|
||||||
linked_lathe = D
|
linked_lathe = D
|
||||||
D.linked_console = src
|
D.linked_console = src
|
||||||
|
linked_lathe.LockedDesigns.Cut()
|
||||||
|
linked_lathe.LockedDesigns = LockedLatheDesigns.Copy();
|
||||||
else if(istype(D, /obj/machinery/r_n_d/circuit_imprinter))
|
else if(istype(D, /obj/machinery/r_n_d/circuit_imprinter))
|
||||||
if(linked_imprinter == null)
|
if(linked_imprinter == null)
|
||||||
linked_imprinter = D
|
linked_imprinter = D
|
||||||
D.linked_console = src
|
D.linked_console = src
|
||||||
|
linked_imprinter.LockedDesigns.Cut()
|
||||||
|
linked_imprinter.LockedDesigns = LockedPrinterDesigns.Copy();
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/machinery/computer/rdconsole/proc/griefProtection() //Have it automatically push research to the CentCom server so wild griffins can't fuck up R&D's work
|
/obj/machinery/computer/rdconsole/proc/griefProtection() //Have it automatically push research to the CentCom server so wild griffins can't fuck up R&D's work
|
||||||
|
|||||||
@@ -227,6 +227,10 @@
|
|||||||
continue
|
continue
|
||||||
if(search && !findtext(D.name, search))
|
if(search && !findtext(D.name, search))
|
||||||
continue
|
continue
|
||||||
|
//CHOMPAdd Start, Locked Designs
|
||||||
|
if(is_type_in_list(D, LockedLatheDesigns))
|
||||||
|
continue
|
||||||
|
//CHOMPAdd End, Locked Designs
|
||||||
|
|
||||||
var/list/mat_list = list()
|
var/list/mat_list = list()
|
||||||
for(var/M in D.materials)
|
for(var/M in D.materials)
|
||||||
@@ -265,6 +269,10 @@
|
|||||||
continue
|
continue
|
||||||
if(search && !findtext(D.name, search))
|
if(search && !findtext(D.name, search))
|
||||||
continue
|
continue
|
||||||
|
//CHOMPAdd Start, Locked Designs
|
||||||
|
if(is_type_in_list(D, LockedPrinterDesigns))
|
||||||
|
continue
|
||||||
|
//CHOMPAdd End, Locked Designs
|
||||||
|
|
||||||
var/list/mat_list = list()
|
var/list/mat_list = list()
|
||||||
for(var/M in D.materials)
|
for(var/M in D.materials)
|
||||||
|
|||||||
@@ -5,3 +5,4 @@
|
|||||||
is_public = TRUE
|
is_public = TRUE
|
||||||
req_access = ""
|
req_access = ""
|
||||||
circuit = /obj/item/weapon/circuitboard/rdconsole/public
|
circuit = /obj/item/weapon/circuitboard/rdconsole/public
|
||||||
|
LockedPrinterDesigns = list(/datum/design/circuit/protolathe,/datum/design/circuit/circuit_imprinter,/datum/design/circuit/destructive_analyzer)
|
||||||
|
|||||||
Reference in New Issue
Block a user