other fixes
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
stored_research = new
|
||||
host_research = SSresearch.science_tech
|
||||
update_research()
|
||||
materials = AddComponent(/datum/component/remote_materials, "lathe", mapload)
|
||||
materials = AddComponent(/datum/component/remote_materials, "lathe", mapload, _after_insert=CALLBACK(src, .proc/AfterMaterialInsert))
|
||||
RefreshParts()
|
||||
|
||||
/obj/machinery/rnd/production/Destroy()
|
||||
|
||||
@@ -31,3 +31,6 @@
|
||||
/obj/machinery/rnd/production/circuit_imprinter/offstation
|
||||
offstation_security_levels = FALSE
|
||||
circuit = /obj/item/circuitboard/machine/circuit_imprinter/offstation
|
||||
|
||||
/obj/machinery/rnd/production/circuit_imprinter/AfterMaterialInsert() //doesnt use have an animation like lathes do
|
||||
return
|
||||
|
||||
@@ -94,13 +94,13 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/rnd/proc/AfterMaterialInsert(item_inserted, id_inserted, amount_inserted)
|
||||
var/stack_name
|
||||
var/mat_name
|
||||
if(istype(item_inserted, /obj/item/stack/ore/bluespace_crystal))
|
||||
stack_name = "bluespace"
|
||||
mat_name = "bluespace"
|
||||
use_power(MINERAL_MATERIAL_AMOUNT / 10)
|
||||
else
|
||||
var/obj/item/stack/S = item_inserted
|
||||
stack_name = S.name
|
||||
var/datum/material/M = id_inserted
|
||||
mat_name = M.name
|
||||
use_power(min(1000, (amount_inserted / 100)))
|
||||
add_overlay("protolathe_[stack_name]")
|
||||
addtimer(CALLBACK(src, /atom/proc/cut_overlay, "protolathe_[stack_name]"), 10)
|
||||
add_overlay("protolathe_[mat_name]")
|
||||
addtimer(CALLBACK(src, /atom/proc/cut_overlay, "protolathe_[mat_name]"), 10)
|
||||
|
||||
Reference in New Issue
Block a user