Removes "name" design datums. Adds logging for null design error. (#17165)

This commit is contained in:
S34N
2021-12-06 07:53:05 +01:00
committed by GitHub
parent 8dfeb1b63c
commit e23ee29fad
3 changed files with 25 additions and 19 deletions
@@ -155,7 +155,7 @@
build_path = /obj/item/reagent_scanner
category = list("Medical")
/datum/design/item/scalpel_laser1
/datum/design/scalpel_laser1
name = "Basic Laser Scalpel"
desc = "A scalpel augmented with a directed laser, for more precise cutting without blood entering the field. This one looks basic and could be improved."
id = "scalpel_laser1"
@@ -165,7 +165,7 @@
build_path = /obj/item/scalpel/laser/laser1
category = list("Medical")
/datum/design/item/scalpel_laser2
/datum/design/scalpel_laser2
name = "Improved Laser Scalpel"
desc = "A scalpel augmented with a directed laser, for more precise cutting without blood entering the field. This one looks somewhat advanced."
id = "scalpel_laser2"
@@ -175,7 +175,7 @@
build_path = /obj/item/scalpel/laser/laser2
category = list("Medical")
/datum/design/item/scalpel_laser3
/datum/design/scalpel_laser3
name = "Advanced Laser Scalpel"
desc = "A scalpel augmented with a directed laser, for more precise cutting without blood entering the field. This one looks to be the pinnacle of precision energy cutlery!"
id = "scalpel_laser3"
@@ -185,7 +185,7 @@
build_path = /obj/item/scalpel/laser/laser3
category = list("Medical")
/datum/design/item/scalpel_manager
/datum/design/scalpel_manager
name = "Incision Management System"
desc = "A true extension of the surgeon's body, this marvel instantly and completely prepares an incision allowing for the immediate commencement of therapeutic steps."
id = "scalpel_manager"
+6 -2
View File
@@ -106,10 +106,13 @@ research holder datum.
return TRUE
/datum/research/proc/AddDesign2Known(datum/design/D)
if(!D)
return FALSE
if(!CanAddDesign2Known(D))
return
return TRUE
// Global datums make me nervous
known_designs[D.id] = D
return TRUE
//Refreshes known_tech and known_designs list.
//Input/Output: n/a
@@ -119,7 +122,8 @@ research holder datum.
AddTech2Known(PT)
for(var/datum/design/PD in possible_designs)
if(DesignHasReqs(PD))
AddDesign2Known(PD)
if(!AddDesign2Known(PD))
log_runtime(EXCEPTION("Game attempted to add a null design to list of known designs! Design: [PD] with ID: [PD.id]"), src)
for(var/v in known_tech)
var/datum/tech/T = known_tech[v]
T.level = clamp(T.level, 0, 20)