mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-25 13:09:11 +01:00
Autolathe Disk Loading (#19331)
* disk loading autolathe * rsf too * oops * kick ci
This commit is contained in:
@@ -426,7 +426,7 @@
|
||||
to_chat(user, "close the panel first!")
|
||||
return
|
||||
|
||||
if(!istype(O, /obj/item/disk/design_disk))
|
||||
if(!istype(O, /obj/item/disk/design_disk) && !istype(O, /obj/item/disk/tech_disk))
|
||||
return ..()
|
||||
|
||||
// The rest has to do with loading from design disks
|
||||
@@ -441,15 +441,37 @@
|
||||
balloon_alert(user, "interrupted!")
|
||||
return
|
||||
|
||||
var/obj/item/disk/design_disk/disky = O
|
||||
var/list/not_imported
|
||||
for(var/datum/design_techweb/blueprint as anything in disky.blueprints)
|
||||
if(!blueprint)
|
||||
continue
|
||||
if(blueprint.build_type & AUTOLATHE)
|
||||
imported_designs[blueprint.id] = TRUE
|
||||
else
|
||||
LAZYADD(not_imported, blueprint.name)
|
||||
var/design_count = 0
|
||||
// Basic design loot disks
|
||||
if(istype(O, /obj/item/disk/design_disk))
|
||||
var/obj/item/disk/design_disk/disky = O
|
||||
for(var/datum/design_techweb/blueprint as anything in disky.blueprints)
|
||||
if(!blueprint)
|
||||
continue
|
||||
if(imported_designs[blueprint.id] || stored_research.researched_designs[blueprint.id])
|
||||
continue
|
||||
if(blueprint.build_type & AUTOLATHE)
|
||||
imported_designs[blueprint.id] = TRUE
|
||||
design_count++
|
||||
else
|
||||
LAZYADD(not_imported, blueprint.name)
|
||||
|
||||
// More complex as it holds multiple nodes of research
|
||||
else if(istype(O, /obj/item/disk/tech_disk))
|
||||
var/obj/item/disk/tech_disk/disky = O
|
||||
var/datum/techweb/disk_web = disky.stored_research
|
||||
for(var/design_id in disk_web.researched_designs)
|
||||
var/datum/design_techweb/blueprint = SSresearch.techweb_design_by_id(design_id)
|
||||
if(imported_designs[blueprint.id] || stored_research.researched_designs[blueprint.id])
|
||||
continue
|
||||
if(blueprint.build_type & AUTOLATHE)
|
||||
imported_designs[blueprint.id] = TRUE
|
||||
design_count++
|
||||
// Don't report failed designs here, techwebs can be huge and the message would be massive for something like the debug disk
|
||||
|
||||
if(design_count)
|
||||
to_chat(user, span_notice("[design_count] design\s imported."))
|
||||
|
||||
if(not_imported)
|
||||
to_chat(user, span_warning("The following design[length(not_imported) > 1 ? "s" : ""] couldn't be imported: [english_list(not_imported)]"))
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
/obj/item/disk/design_disk/rapid_construction
|
||||
name = "rapid fabricator design disk"
|
||||
desc = "A disk containing several rapid fabrication devices."
|
||||
|
||||
/obj/item/disk/design_disk/rapid_construction/Initialize(mapload)
|
||||
. = ..()
|
||||
blueprints += SSresearch.techweb_design_by_id(/datum/design_techweb/rcd_loaded::id)
|
||||
blueprints += SSresearch.techweb_design_by_id(/datum/design_techweb/rcd_ammo::id)
|
||||
blueprints += SSresearch.techweb_design_by_id(/datum/design_techweb/rpd::id)
|
||||
blueprints += SSresearch.techweb_design_by_id(/datum/design_techweb/rms::id)
|
||||
blueprints += SSresearch.techweb_design_by_id(/datum/design_techweb/rsf::id) // may as well
|
||||
@@ -227,7 +227,7 @@
|
||||
name = "Advanced Sensor"
|
||||
desc = "A tier 2 stock part used in the construction of various devices."
|
||||
id = "adv_sensor"
|
||||
build_type = PROTOLATHE | AUTOLATHE
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_STEEL = 50, MAT_GLASS = 20)
|
||||
build_path = /obj/item/stock_parts/scanning_module/adv
|
||||
category = list(
|
||||
|
||||
Reference in New Issue
Block a user