mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-25 06:07:22 +01:00
Merge pull request #5830 from Sharkmare/patch-5
Adds a blacklist that can modified in mapping for Designs
This commit is contained in:
@@ -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,
|
||||
@@ -123,7 +123,7 @@
|
||||
if(busy)
|
||||
to_chat(user, "<span class='notice'>\The [src] is busy. Please wait for completion of previous operation.</span>")
|
||||
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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user