mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-13 08:04:22 +01:00
Fix circuit cloning creating invisible clothing (#18435)
* Fix circuit cloning creating invisible clothing * Minor fix
This commit is contained in:
@@ -299,6 +299,9 @@
|
||||
var/restored_path = src.restore_assembly_prefix(assembly_data["t"])
|
||||
var/original_path = text2path(restored_path)
|
||||
if(original_path && ispath(original_path, /obj/item/electronic_assembly))
|
||||
// Reject clothing assemblies
|
||||
if(ispath(original_path, /obj/item/electronic_assembly/clothing))
|
||||
return null
|
||||
assembly = new original_path()
|
||||
|
||||
// Default to medium assembly
|
||||
|
||||
@@ -349,6 +349,13 @@
|
||||
to_chat(user, span_warning("Invalid circuit format!"))
|
||||
return
|
||||
|
||||
if(assembly_data["t"])
|
||||
var/restored_path = src.restore_assembly_prefix(assembly_data["t"])
|
||||
var/assembly_path = text2path(restored_path)
|
||||
if(assembly_path && ispath(assembly_path, /obj/item/electronic_assembly/clothing))
|
||||
to_chat(user, span_warning("Cannot import wearable electronic assemblies!"))
|
||||
return
|
||||
|
||||
// Check if we have enough metal to build all components
|
||||
var/total_cost = 0
|
||||
var/total_complexity = 0
|
||||
|
||||
Reference in New Issue
Block a user