module things, jfc
This commit is contained in:
@@ -36,10 +36,6 @@ Note: Must be placed within 3 tiles of the R&D Console
|
||||
. = 1
|
||||
if(!is_insertion_ready(user))
|
||||
return
|
||||
if(istype (O, /obj/item/bodybag/bluespace)) // CITADEL ADD. STOP PUTTING FUCKING BORGS INTO THE ANALYZER
|
||||
if(O.contents.len != 0)
|
||||
to_chat(user, "<span class='warning'>\The [O] has dangerous levels of activity, you cannot put it in the [src.name]!</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(O, src))
|
||||
to_chat(user, "<span class='warning'>\The [O] is stuck to your hand, you cannot put it in the [src.name]!</span>")
|
||||
return
|
||||
@@ -63,11 +59,14 @@ Note: Must be placed within 3 tiles of the R&D Console
|
||||
|
||||
/obj/machinery/rnd/destructive_analyzer/proc/reclaim_materials_from(obj/item/thing)
|
||||
. = 0
|
||||
if(linked_console && linked_console.linked_lathe) //Also sends salvaged materials to a linked protolathe, if any.
|
||||
var/datum/component/material_container/storage = linked_console?.linked_lathe?.materials.mat_container
|
||||
if(storage) //Also sends salvaged materials to a linked protolathe, if any.
|
||||
for(var/material in thing.materials)
|
||||
var/can_insert = min((linked_console.linked_lathe.materials.max_amount - linked_console.linked_lathe.materials.total_amount), (max(thing.materials[material]*(decon_mod/10), thing.materials[material])))
|
||||
linked_console.linked_lathe.materials.insert_amount(can_insert, material)
|
||||
var/can_insert = min((storage.max_amount - storage.total_amount), (max(thing.materials[material]*(decon_mod/10), thing.materials[material])))
|
||||
storage.insert_amount(can_insert, material)
|
||||
. += can_insert
|
||||
if (.)
|
||||
linked_console.linked_lathe.materials.silo_log(src, "reclaimed", 1, "[thing.name]", thing.materials)
|
||||
|
||||
/obj/machinery/rnd/destructive_analyzer/proc/destroy_item(obj/item/thing, innermode = FALSE)
|
||||
if(QDELETED(thing) || QDELETED(src) || QDELETED(linked_console))
|
||||
|
||||
Reference in New Issue
Block a user