mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Added option to print research levels and researched devices to RD consoles
This commit is contained in:
@@ -122,6 +122,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
C.files.AddDesign2Known(D)
|
C.files.AddDesign2Known(D)
|
||||||
C.files.RefreshResearch()
|
C.files.RefreshResearch()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/rdconsole/New()
|
/obj/machinery/computer/rdconsole/New()
|
||||||
..()
|
..()
|
||||||
files = new /datum/research(src) //Setup the research data holder.
|
files = new /datum/research(src) //Setup the research data holder.
|
||||||
@@ -523,9 +525,52 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
spawn(20)
|
spawn(20)
|
||||||
screen = 1.6
|
screen = 1.6
|
||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
|
|
||||||
|
else if (href_list["print"]) //Print research information
|
||||||
|
screen = 0.5
|
||||||
|
spawn(20)
|
||||||
|
var/obj/item/weapon/paper/PR = new/obj/item/weapon/paper
|
||||||
|
if( text2num(href_list["print"]) == 2)
|
||||||
|
PR.name = "research list"
|
||||||
|
PR.info = GetResearchListInfo()
|
||||||
|
else
|
||||||
|
PR.name = "research levels"
|
||||||
|
PR.info = GetResearchLevelsInfo()
|
||||||
|
PR.info_links = PR.info
|
||||||
|
PR.icon_state = "paper_words"
|
||||||
|
PR.loc = src.loc
|
||||||
|
spawn(10)
|
||||||
|
screen = ((text2num(href_list["print"]) == 2) ? 5.0 : 1.1)
|
||||||
|
updateUsrDialog()
|
||||||
|
|
||||||
updateUsrDialog()
|
updateUsrDialog()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/obj/machinery/computer/rdconsole/proc/GetResearchLevelsInfo()
|
||||||
|
var/dat
|
||||||
|
dat += "Current Research Levels:<BR><BR>"
|
||||||
|
dat += "<UL>"
|
||||||
|
for(var/datum/tech/T in files.known_tech)
|
||||||
|
dat += "<LI>"
|
||||||
|
dat += "[T.name]"
|
||||||
|
dat += "<UL>"
|
||||||
|
dat += "<LI>Level: [T.level]"
|
||||||
|
dat += "<LI>Summary: [T.desc]"
|
||||||
|
dat += "</UL>"
|
||||||
|
return dat
|
||||||
|
|
||||||
|
/obj/machinery/computer/rdconsole/proc/GetResearchListInfo()
|
||||||
|
var/dat
|
||||||
|
dat += "List of Researched Technologies and Designs:"
|
||||||
|
dat += "<UL>"
|
||||||
|
for(var/datum/design/D in files.known_designs)
|
||||||
|
if(D.build_path)
|
||||||
|
dat += "<LI><B>[D.name]</B>: [D.desc]"
|
||||||
|
dat += "</UL>"
|
||||||
|
return dat
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/rdconsole/attack_hand(mob/user as mob)
|
/obj/machinery/computer/rdconsole/attack_hand(mob/user as mob)
|
||||||
if(stat & (BROKEN|NOPOWER))
|
if(stat & (BROKEN|NOPOWER))
|
||||||
return
|
return
|
||||||
@@ -570,6 +615,9 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
if(0.4)
|
if(0.4)
|
||||||
dat += "Imprinting Circuit. Please Wait..."
|
dat += "Imprinting Circuit. Please Wait..."
|
||||||
|
|
||||||
|
if(0.5)
|
||||||
|
dat += "Printing Research Information. Please Wait..."
|
||||||
|
|
||||||
if(1.0) //Main Menu
|
if(1.0) //Main Menu
|
||||||
dat += "Main Menu:<BR><BR>"
|
dat += "Main Menu:<BR><BR>"
|
||||||
dat += "Loaded disk: "
|
dat += "Loaded disk: "
|
||||||
@@ -593,16 +641,9 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
dat += "</UL>"
|
dat += "</UL>"
|
||||||
|
|
||||||
if(1.1) //Research viewer
|
if(1.1) //Research viewer
|
||||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
|
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
||||||
dat += "Current Research Levels:<BR><BR>"
|
dat += "<A href='?src=\ref[src];print=1'>Print This Page</A><HR>"
|
||||||
dat += "<UL>"
|
dat += GetResearchLevelsInfo()
|
||||||
for(var/datum/tech/T in files.known_tech)
|
|
||||||
dat += "<LI>"
|
|
||||||
dat += "[T.name]"
|
|
||||||
dat += "<UL>"
|
|
||||||
dat += "<LI>Level: [T.level]"
|
|
||||||
dat += "<LI>Summary: [T.desc]"
|
|
||||||
dat += "</UL>"
|
|
||||||
dat += "</UL>"
|
dat += "</UL>"
|
||||||
|
|
||||||
if(1.2) //Technology Disk Menu
|
if(1.2) //Technology Disk Menu
|
||||||
@@ -897,18 +938,15 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
|||||||
|
|
||||||
///////////////////Research Information Browser////////////////////
|
///////////////////Research Information Browser////////////////////
|
||||||
if(5.0)
|
if(5.0)
|
||||||
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
|
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A> || "
|
||||||
dat += "List of Researched Technologies and Designs:"
|
dat += "<A href='?src=\ref[src];print=2'>Print This Page</A><HR>"
|
||||||
dat += "<UL>"
|
dat += GetResearchListInfo()
|
||||||
for(var/datum/design/D in files.known_designs)
|
|
||||||
if(D.build_path)
|
|
||||||
dat += "<LI><B>[D.name]</B>: [D.desc]"
|
|
||||||
dat += "</UL>"
|
|
||||||
|
|
||||||
|
|
||||||
user << browse("<TITLE>Research and Development Console</TITLE><HR>[dat]", "window=rdconsole;size=850x600")
|
user << browse("<TITLE>Research and Development Console</TITLE><HR>[dat]", "window=rdconsole;size=850x600")
|
||||||
onclose(user, "rdconsole")
|
onclose(user, "rdconsole")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/computer/rdconsole/robotics
|
/obj/machinery/computer/rdconsole/robotics
|
||||||
name = "Robotics R&D Console"
|
name = "Robotics R&D Console"
|
||||||
id = 2
|
id = 2
|
||||||
|
|||||||
Reference in New Issue
Block a user