mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Research Archive Quality of Life (#35716)
This commit is contained in:
@@ -405,6 +405,12 @@
|
||||
new /obj/item/weapon/disk(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/storage/lockbox/diskettebox/archive
|
||||
name = "archival diskette box"
|
||||
desc = "Please copy in library."
|
||||
storage_slots = 9
|
||||
mech_flags = MECH_SCAN_FAIL
|
||||
|
||||
|
||||
//---------------------------------PRESETS END-----------------------------
|
||||
|
||||
|
||||
@@ -241,10 +241,14 @@ var/list/important_archivists = list()
|
||||
|
||||
/obj/machinery/researcharchive/examine(mob/user)
|
||||
..()
|
||||
if(diskslot)
|
||||
//This is now handled by the disk itself.
|
||||
//to_chat(user,"<span class='info'>In the slot you can see a disk that contains [diskslot.stored.id] [diskslot.stored.level].</span>")
|
||||
diskslot.examine(user)
|
||||
to_chat(user,"<span class='info'><b>The research archive contains the following research:</span></b>")
|
||||
for(var/datum/tech/T in get_list_of_elements(research_archive_datum.known_tech))
|
||||
if(T.id in list("syndicate", "Nanotrasen", "anomaly"))
|
||||
continue
|
||||
if(T.level < min(6,T.goal_level))
|
||||
to_chat(user,"<span class='info'>The [T.id] research is level [T.level].")
|
||||
else
|
||||
to_chat(user,"<span class='good'>The [T.id] research is complete.</span>")
|
||||
|
||||
/obj/machinery/researcharchive/update_icon()
|
||||
if(stat & (BROKEN))
|
||||
@@ -265,6 +269,14 @@ var/list/important_archivists = list()
|
||||
if (!istype(W,/obj/item/weapon/disk/tech_disk))
|
||||
to_chat(user, "<span class='warning'>\The [src] only accepts technology disks.</span>")
|
||||
return
|
||||
var/obj/item/weapon/disk/tech_disk/TD = W
|
||||
if(!TD.stored)
|
||||
to_chat(user, "<span class='notice'>\The [W] has no data!</span>")
|
||||
return
|
||||
|
||||
if(TD.stored.id in list("syndicate", "Nanotrasen", "anomaly"))
|
||||
to_chat(user, "<span class='notice'>\The [src] cannot process this technology data due to proprietary encoding.</span>")
|
||||
return
|
||||
|
||||
if (!user.drop_item(W, src))
|
||||
return
|
||||
@@ -276,6 +288,7 @@ var/list/important_archivists = list()
|
||||
diskslot = W
|
||||
playsound(loc, 'sound/machines/click.ogg', 50, 1)
|
||||
update_icon()
|
||||
attack_hand(user) //Attempt to archive immediately.
|
||||
|
||||
/obj/machinery/researcharchive/attack_hand(var/mob/user)
|
||||
. = ..()
|
||||
@@ -294,10 +307,6 @@ var/list/important_archivists = list()
|
||||
if(busy)
|
||||
return
|
||||
|
||||
if(diskslot.stored.id in list("syndicate", "Nanotrasen", "anomaly"))
|
||||
to_chat(user, "<span class='notice'>\The [src] cannot process this technology data due to proprietary encoding.</span>")
|
||||
return
|
||||
|
||||
playsound(loc, "sound/machines/heps.ogg", 50, 1)
|
||||
anim(target = src, a_icon = 'icons/obj/library.dmi', flick_anim = "computer_disk_ani")
|
||||
|
||||
|
||||
@@ -148,6 +148,12 @@ The required techs are the following:
|
||||
//log_admin("[total] for [part.name]")
|
||||
return total
|
||||
|
||||
//Do something to this buildable right after we finish building it
|
||||
//obj/O: The freshly created object
|
||||
//obj/machinery/r_n_d/fabricator/F: the machine where the object was just manufactured
|
||||
/datum/design/proc/after_craft(var/obj/O, var/obj/machinery/r_n_d/fabricator/F)
|
||||
return
|
||||
|
||||
////////////////////////////////////////
|
||||
//Disks for transporting design datums//
|
||||
////////////////////////////////////////
|
||||
|
||||
@@ -58,6 +58,25 @@
|
||||
category = "Data"
|
||||
build_path = /obj/item/weapon/disk/tech_disk
|
||||
|
||||
/datum/design/archive_diskset
|
||||
name = "Archive-Ready Diskset"
|
||||
desc = "A set of nine disks ready to be archived. The disks are printed with the technology data from this terminal in a process that is convenient but very resource wasteful."
|
||||
req_tech = list(Tc_PROGRAMMING = 5)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_IRON = 20000, MAT_GLASS = 10000)
|
||||
id = "archivedisks"
|
||||
category = "Data"
|
||||
build_path = /obj/item/weapon/storage/lockbox/diskettebox/archive
|
||||
|
||||
/datum/design/archive_diskset/after_craft(var/obj/O, var/obj/machinery/r_n_d/fabricator/F)
|
||||
for(var/datum/tech/T in get_list_of_elements(F.linked_console.files.known_tech))
|
||||
if(T.id in list("syndicate", "Nanotrasen", "anomaly"))
|
||||
continue
|
||||
var/obj/item/weapon/disk/tech_disk/TD = new(O)
|
||||
TD.stored = create_tech(T.id)
|
||||
TD.stored.level = T.level
|
||||
O.update_icon()
|
||||
|
||||
/datum/design/botany_disk
|
||||
name = "Floral Data Disk"
|
||||
desc = "Produce additional disks for copying botany genetic data."
|
||||
|
||||
@@ -351,6 +351,7 @@
|
||||
being_built.forceMove(L) //Put the thing in the lockbox
|
||||
L.name += " ([being_built.name])"
|
||||
being_built = L //Building the lockbox now, with the thing in it
|
||||
part.after_craft(being_built,src)
|
||||
var/turf/output = get_output()
|
||||
being_built.forceMove(get_turf(output))
|
||||
being_built.anchored = 0
|
||||
|
||||
@@ -333,7 +333,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
for(var/ID in files.known_tech)
|
||||
var/datum/tech/T = files.known_tech[ID]
|
||||
if(href_list["copy_tech_ID"] == T.id)
|
||||
t_disk.stored = T
|
||||
t_disk.stored = create_tech(T.id)
|
||||
t_disk.stored.level = T.level
|
||||
break
|
||||
screen = 1.2
|
||||
|
||||
@@ -735,8 +736,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
dat += "Current Research Levels:<BR><BR>"
|
||||
for(var/ID in files.known_tech)
|
||||
var/datum/tech/T = files.known_tech[ID]
|
||||
dat += {"[T.name]<BR>
|
||||
* Level: [T.level]<BR>
|
||||
dat += {"[T.name]: level [T.level]<BR>
|
||||
* Summary: [T.desc]<HR>"}
|
||||
|
||||
if(1.2) //Technology Disk Menu
|
||||
|
||||
@@ -112,13 +112,7 @@ var/global/list/hidden_tech = list(
|
||||
/datum/research/proc/AddTech2Known(var/datum/tech/T)
|
||||
var/datum/tech/known = GetKTechByID(T.id)
|
||||
if(!known)
|
||||
var/createtype = /datum/tech
|
||||
for(var/type in subtypesof(/datum/tech))
|
||||
var/datum/tech/attempt = type
|
||||
if(initial(attempt.id) == T.id)
|
||||
createtype = type
|
||||
break
|
||||
known = new createtype()
|
||||
known = create_tech(T.id)
|
||||
known_tech[T.id] = known
|
||||
if(T.level > known.level)
|
||||
known.level = T.level
|
||||
@@ -188,6 +182,16 @@ var/global/list/hidden_tech = list(
|
||||
goal_level=max_level
|
||||
..()
|
||||
|
||||
//Creates a tech of the specific subtype you are looking for by id
|
||||
/proc/create_tech(var/Tid)
|
||||
var/createtype = /datum/tech
|
||||
for(var/type in subtypesof(/datum/tech))
|
||||
var/datum/tech/attempt = type
|
||||
if(initial(attempt.id) == Tid)
|
||||
createtype = type
|
||||
break
|
||||
return new createtype()
|
||||
|
||||
//Trunk Technologies (don't require any other techs and you start knowning them).
|
||||
|
||||
/datum/tech/materials
|
||||
@@ -310,7 +314,10 @@ datum/tech/robotics
|
||||
|
||||
/obj/item/weapon/disk/tech_disk/examine(mob/user)
|
||||
..()
|
||||
to_chat(user,"<span class='info'>It contains [stored.id] [stored.level] research.</span>")
|
||||
if(stored)
|
||||
to_chat(user,"<span class='info'>It contains [stored.id] [stored.level] research.</span>")
|
||||
else
|
||||
to_chat(user,"<span class='warning'>It has no data.</span>")
|
||||
|
||||
/obj/item/weapon/disk/tech_disk/nanotrasen
|
||||
name = "Technology Disk (Nanotrasen 1)"
|
||||
|
||||
Reference in New Issue
Block a user