12/21 modernizations from TG live (#103)

* sync (#3)

* shuttle auto call

* Merge /vore into /master (#39)

* progress

* Compile errors fixed

No idea if it's test worthy tho as conflicts with race overhaul and
narky removal.

* Update admins.txt

* efforts continue

Fuck grab code, seriously

* grab code is cancer

* Execute the Narkism

Do not hesitate.

Show no mercy.

* holy shit grab code is awful

* have I bitched about grab code

My bitching, let me show you it

* código de agarre es una mierda

No really it is

* yeah I don't even know anymore.

* Lolnope. Fuck grab code

* I'm not even sure what to fix anymore

* Self eating is not an acceptable fate

* Taste the void, son.

* My code doesn't pass it's own sanity check.

Maybe it's a sign of things to come.

* uncommented and notes

* It Works and I Don't Know Why (#38)

* shuttle auto call

* it works and I don't know why

* Subsystem 12/21

Most Recent TG subsystem folder

* globalvars 12/21

Tossed out the flavor_misc and parallax files

* Onclick 12/21

as well as .dme updates

* _defines 12/21

ommited old _MC.dm

* _HELPERS 12/21

Preserved snowflake placement of furry sprites

* _defeines/genetics

reapplied narkism holdover for snowflake races.

* Oops forgot mutant colors

* modules porting 12/21 + Sounds/icons

Admin, Client and most of mob life files ommitted

* enviroment file

* Admin optimizations

ahelp log system kept

* Mob ports 12/21

Flavor text preserved

* datums ported 12/21

* Game ported 12/21

* batch of duplicate fixes/dogborg work

Dogborgs need to be modernized to refractored borg standards.

* moar fixes

* Maps and futher compile fixes
This commit is contained in:
Poojawa
2016-12-22 03:57:55 -06:00
committed by GitHub
parent f5e143a452
commit cf59ac1c3d
2215 changed files with 707445 additions and 87041 deletions
+126 -79
View File
@@ -22,8 +22,8 @@ operations to skip that console. This is useful if you want to make a "public" R
a circuit imprinter with certain designs on it and don't want it accidentally updating. The downside of this method is that you have
to have physical access to the other console to send data back. Note: An R&D console is on Centcom so if a random griffan happens to
cause a ton of data to be lost, an admin can go send it back.
- The second method is with Technology Disks and Design Disks. Each of these disks can hold a single technology or design datum in
it's entirety. You can then take the disk to any R&D console and upload it's data to it. This method is a lot more secure (since it
- The second method is with Technology Disks and Design Disks. Each of these disks can hold technology or design datums in
their entirety. You can then take the disk to any R&D console and upload it's data to it. This method is a lot more secure (since it
won't update every console in existence) but it's more of a hassle to do. Also, the disks can be stolen.
@@ -34,7 +34,6 @@ won't update every console in existence) but it's more of a hassle to do. Also,
icon_screen = "rdcomp"
icon_keyboard = "rd_key"
circuit = /obj/item/weapon/circuitboard/computer/rdconsole
light_color = LIGHT_COLOR_PINK
var/datum/research/files //Stores all the collected research data.
var/obj/item/weapon/disk/tech_disk/t_disk = null //Stores the technology disk.
var/obj/item/weapon/disk/design_disk/d_disk = null //Stores the design disk.
@@ -52,6 +51,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
var/selected_category
var/list/datum/design/matching_designs = list() //for the search function
var/disk_slot_selected = 0
/proc/CallTechName(ID) //A simple helper proc to find the name of a tech with a given ID.
@@ -122,8 +122,10 @@ won't update every console in existence) but it's more of a hassle to do. Also,
user << "A disk is already loaded into the machine."
return
if(istype(D, /obj/item/weapon/disk/tech_disk)) t_disk = D
else if (istype(D, /obj/item/weapon/disk/design_disk)) d_disk = D
if(istype(D, /obj/item/weapon/disk/tech_disk))
t_disk = D
else if (istype(D, /obj/item/weapon/disk/design_disk))
d_disk = D
else
user << "<span class='danger'>Machine cannot accept disks in that format.</span>"
return
@@ -136,7 +138,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
updateUsrDialog()
/obj/machinery/computer/rdconsole/deconstruction()
/obj/machinery/computer/rdconsole/on_deconstruction()
if(linked_destroy)
linked_destroy.linked_console = null
linked_destroy = null
@@ -162,6 +164,9 @@ won't update every console in existence) but it's more of a hassle to do. Also,
add_fingerprint(usr)
usr.set_machine(src)
if(href_list["disk_slot"])
disk_slot_selected = text2num(href_list["disk_slot"])
if(href_list["menu"]) //Switches menu screens. Converts a sent text string into a number. Saves a LOT of code.
var/temp_screen = text2num(href_list["menu"])
screen = temp_screen
@@ -170,16 +175,34 @@ won't update every console in existence) but it's more of a hassle to do. Also,
selected_category = href_list["category"]
else if(href_list["updt_tech"]) //Update the research holder with information from the technology disk.
var/n = text2num(href_list["updt_tech"])
screen = 0.0
spawn(50)
var/wait = 50
if(!n)
wait = 0
for(var/D in t_disk.tech_stored)
if(D)
wait += 50
spawn(wait)
screen = 1.2
files.AddTech2Known(t_disk.stored)
updateUsrDialog()
griefProtection() //Update centcom too
if(t_disk)
if(!n)
for(var/tech in t_disk.tech_stored)
if(tech)
files.AddTech2Known(tech)
else
files.AddTech2Known(t_disk.tech_stored[n])
updateUsrDialog()
griefProtection() //Update centcom too
else if(href_list["clear_tech"]) //Erase data on the technology disk.
if(t_disk)
t_disk.stored = null
var/n = text2num(href_list["clear_tech"])
if(!n)
for(var/i in 1 to t_disk.max_tech_stored)
t_disk.tech_stored[i] = null
else
t_disk.tech_stored[n] = null
else if(href_list["eject_tech"]) //Eject the technology disk.
if(t_disk)
@@ -188,20 +211,39 @@ won't update every console in existence) but it's more of a hassle to do. Also,
screen = 1.0
else if(href_list["copy_tech"]) //Copy some technology data from the research holder to the disk.
t_disk.stored = files.known_tech[href_list["copy_tech_ID"]]
var/slot = text2num(href_list["copy_tech"])
t_disk.tech_stored[slot] = files.known_tech[href_list["copy_tech_ID"]]
screen = 1.2
else if(href_list["updt_design"]) //Updates the research holder with design data from the design disk.
var/n = text2num(href_list["updt_design"])
screen = 0.0
spawn(50)
var/wait = 50
if(!n)
wait = 0
for(var/D in d_disk.blueprints)
if(D)
wait += 50
spawn(wait)
screen = 1.4
files.AddDesign2Known(d_disk.blueprint)
updateUsrDialog()
griefProtection() //Update centcom too
if(d_disk)
if(!n)
for(var/D in d_disk.blueprints)
if(D)
files.AddDesign2Known(D)
else
files.AddDesign2Known(d_disk.blueprints[n])
updateUsrDialog()
griefProtection() //Update centcom too
else if(href_list["clear_design"]) //Erases data on the design disk.
if(d_disk)
d_disk.blueprint = null
var/n = text2num(href_list["clear_design"])
if(!n)
for(var/i in 1 to d_disk.max_blueprints)
d_disk.blueprints[i] = null
else
d_disk.blueprints[n] = null
else if(href_list["eject_design"]) //Eject the design disk.
if(d_disk)
@@ -210,10 +252,11 @@ won't update every console in existence) but it's more of a hassle to do. Also,
screen = 1.0
else if(href_list["copy_design"]) //Copy design data from the research holder to the design disk.
var/slot = text2num(href_list["copy_design"])
var/datum/design/D = files.known_designs[href_list["copy_design_ID"]]
if(D)
var/autolathe_friendly = 1
if(D.reagents.len)
if(D.reagents_list.len)
autolathe_friendly = 0
D.category -= "Imported"
else
@@ -225,7 +268,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(D.build_type & (AUTOLATHE|PROTOLATHE|CRAFTLATHE)) // Specifically excludes circuit imprinter and mechfab
D.build_type = autolathe_friendly ? (D.build_type | AUTOLATHE) : D.build_type
D.category |= "Imported"
d_disk.blueprint = D
d_disk.blueprints[slot] = D
screen = 1.4
else if(href_list["eject_item"]) //Eject the item inside the destructive analyzer.
@@ -234,7 +277,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
usr << "<span class='danger'>The destructive analyzer is busy at the moment.</span>"
else if(linked_destroy.loaded_item)
linked_destroy.loaded_item.loc = linked_destroy.loc
linked_destroy.loaded_item.forceMove(linked_destroy.loc)
linked_destroy.loaded_item = null
linked_destroy.icon_state = "d_analyzer"
screen = 1.0
@@ -342,6 +385,9 @@ won't update every console in existence) but it's more of a hassle to do. Also,
var/datum/design/being_built = files.known_designs[href_list["build"]]
var/amount = text2num(href_list["amount"])
if(being_built.make_reagents.len)
return 0
if(!linked_lathe || !being_built || !amount)
updateUsrDialog()
return
@@ -380,18 +426,21 @@ won't update every console in existence) but it's more of a hassle to do. Also,
enough_materials = 0
g2g = 0
else
for(var/R in being_built.reagents)
if(!linked_lathe.reagents.has_reagent(R, being_built.reagents[R]*coeff))
for(var/R in being_built.reagents_list)
if(!linked_lathe.reagents.has_reagent(R, being_built.reagents_list[R]*coeff))
linked_lathe.say("Not enough reagents to complete prototype.")
enough_materials = 0
g2g = 0
if(enough_materials)
linked_lathe.materials.use_amount(efficient_mats, amount)
for(var/R in being_built.reagents)
linked_lathe.reagents.remove_reagent(R, being_built.reagents[R]*coeff)
for(var/R in being_built.reagents_list)
linked_lathe.reagents.remove_reagent(R, being_built.reagents_list[R]*coeff)
var/P = being_built.build_path //lets save these values before the spawn() just in case. Nobody likes runtimes.
coeff *= being_built.lathe_time_factor
spawn(32*coeff*amount**0.8)
if(linked_lathe)
if(g2g) //And if we only fail the material requirements, we still spend time and power
@@ -453,16 +502,16 @@ won't update every console in existence) but it's more of a hassle to do. Also,
enough_materials = 0
g2g = 0
else
for(var/R in being_built.reagents)
if(!linked_imprinter.reagents.has_reagent(R, being_built.reagents[R]/coeff))
for(var/R in being_built.reagents_list)
if(!linked_imprinter.reagents.has_reagent(R, being_built.reagents_list[R]/coeff))
linked_imprinter.say("Not enough reagents to complete prototype.")
enough_materials = 0
g2g = 0
if(enough_materials)
linked_imprinter.materials.use_amount(efficient_mats)
for(var/R in being_built.reagents)
linked_imprinter.reagents.remove_reagent(R, being_built.reagents[R]/coeff)
for(var/R in being_built.reagents_list)
linked_imprinter.reagents.remove_reagent(R, being_built.reagents_list[R]/coeff)
var/P = being_built.build_path //lets save these values before the spawn() just in case. Nobody likes runtimes.
spawn(16)
@@ -522,7 +571,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
else if(href_list["reset"]) //Reset the R&D console's database.
griefProtection()
var/choice = alert("R&D Console Database Reset", "Are you sure you want to reset the R&D console's database? Data lost cannot be recovered.", "Continue", "Cancel")
if(choice == "Continue")
if(choice == "Continue" && usr.canUseTopic(src))
message_admins("[key_name_admin(usr)] reset \the [src.name]'s database")
log_game("[key_name_admin(usr)] reset \the [src.name]'s database")
screen = 0.0
@@ -640,22 +689,19 @@ won't update every console in existence) but it's more of a hassle to do. Also,
dat += "</div>"
if(1.2) //Technology Disk Menu
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
dat += "<div class='statusDisplay'>Technology Data Disk Contents:<BR><BR>"
if(t_disk.stored == null)
dat += "The disk has no data stored on it.</div>"
dat += "Operations: "
dat += "<A href='?src=\ref[src];menu=1.3'>Load Tech to Disk</A>"
else
dat += "Name: [t_disk.stored.name]<BR>"
dat += "Level: [t_disk.stored.level]<BR>"
dat += "Description: [t_disk.stored.desc]</div>"
dat += "Operations: "
dat += "<A href='?src=\ref[src];updt_tech=1'>Upload to Database</A>"
dat += "<A href='?src=\ref[src];clear_tech=1'>Clear Disk</A>"
dat += "<A href='?src=\ref[src];eject_tech=1'>Eject Disk</A>"
dat += "Disk Operations: <A href='?src=\ref[src];clear_tech=0'>Clear Disk</A><A href='?src=\ref[src];updt_tech=0'>Upload All</A><A href='?src=\ref[src];eject_tech=1'>Eject Disk</A>"
for(var/i in 1 to t_disk.max_tech_stored)
dat += "<div class='statusDisplay'>"
if(t_disk.tech_stored[i])
var/datum/tech/tech = t_disk.tech_stored[i]
dat += "Name: [tech.name]<BR>"
dat += "Level: [tech.level]<BR>"
dat += "Description: [tech.desc]<BR>"
dat += "Operations: <A href='?src=\ref[src];updt_tech=[i]'>Upload to Database</A><A href='?src=\ref[src];clear_tech=[i]'>Clear Slot</A>"
else
dat += "Empty Slot<BR>Operations: <A href='?src=\ref[src];menu=1.3;disk_slot=[i]'>Load Tech to Slot</A>"
dat += "</div>"
if(1.3) //Technology Disk submenu
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A>"
dat += "<A href='?src=\ref[src];menu=1.2'>Return to Disk Operations</A><div class='statusDisplay'>"
@@ -664,42 +710,41 @@ won't update every console in existence) but it's more of a hassle to do. Also,
var/datum/tech/T = files.known_tech[v]
if(T.level <= 0)
continue
dat += "[T.name] "
dat += "<A href='?src=\ref[src];copy_tech=1;copy_tech_ID=[T.id]'>Copy to Disk</A><BR>"
dat += "[T.name]"
dat += "<A href='?src=\ref[src];copy_tech=[disk_slot_selected];copy_tech_ID=[T.id]'>Copy to Disk</A><BR>"
dat += "</div>"
if(1.4) //Design Disk menu.
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><div class='statusDisplay'>"
if(d_disk.blueprint == null)
dat += "The disk has no data stored on it.</div>"
dat += "Operations: "
dat += "<A href='?src=\ref[src];menu=1.5'>Load Design to Disk</A>"
else
dat += "Name: [d_disk.blueprint.name]<BR>"
var/b_type = d_disk.blueprint.build_type
if(b_type)
dat += "Lathe Types:<BR>"
if(b_type & IMPRINTER) dat += "Circuit Imprinter<BR>"
if(b_type & PROTOLATHE) dat += "Protolathe<BR>"
if(b_type & AUTOLATHE) dat += "Autolathe<BR>"
if(b_type & MECHFAB) dat += "Exosuit Fabricator<BR>"
dat += "Required Materials:<BR>"
var/all_mats = d_disk.blueprint.materials + d_disk.blueprint.reagents
for(var/M in all_mats)
dat += "* [CallMaterialName(M)] x [all_mats[M]]<BR>"
dat += "</div>Operations: "
dat += "<A href='?src=\ref[src];updt_design=1'>Upload to Database</A>"
dat += "<A href='?src=\ref[src];clear_design=1'>Clear Disk</A>"
dat += "<A href='?src=\ref[src];eject_design=1'>Eject Disk</A>"
if(1.5) //Technology disk submenu
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A><HR>"
dat += "Disk Operations: <A href='?src=\ref[src];clear_design=0'>Clear Disk</A><A href='?src=\ref[src];updt_design=0'>Upload All</A><A href='?src=\ref[src];eject_design=1'>Eject Disk</A>"
for(var/i in 1 to d_disk.max_blueprints)
dat += "<div class='statusDisplay'>"
if(d_disk.blueprints[i])
var/datum/design/D = d_disk.blueprints[i]
dat += "Name: [D.name]<BR>"
if(D.build_type)
dat += "Lathe Types:<BR>"
if(D.build_type & IMPRINTER) dat += "Circuit Imprinter<BR>"
if(D.build_type & PROTOLATHE) dat += "Protolathe<BR>"
if(D.build_type & AUTOLATHE) dat += "Autolathe<BR>"
if(D.build_type & MECHFAB) dat += "Exosuit Fabricator<BR>"
if(D.build_type & BIOGENERATOR) dat += "Biogenerator<BR>"
dat += "Required Materials:<BR>"
var/all_mats = D.materials + D.reagents_list
for(var/M in all_mats)
dat += "* [CallMaterialName(M)] x [all_mats[M]]<BR>"
dat += "Operations: <A href='?src=\ref[src];updt_design=[i]'>Upload to Database</A> <A href='?src=\ref[src];clear_design=[i]'>Clear Slot</A>"
else
dat += "Empty Slot<BR>Operations: <A href='?src=\ref[src];menu=1.5;disk_slot=[i]'>Load Design to Slot</A>"
dat += "</div>"
if(1.5) //Design disk submenu
dat += "<A href='?src=\ref[src];menu=1.0'>Main Menu</A>"
dat += "<A href='?src=\ref[src];menu=1.4'>Return to Disk Operations</A><div class='statusDisplay'>"
dat += "<h3>Load Design to Disk:</h3><BR>"
for(var/v in files.known_designs)
var/datum/design/D = files.known_designs[v]
dat += "[D.name] "
dat += "<A href='?src=\ref[src];copy_design=1;copy_design_ID=[D.id]'>Copy to Disk</A><BR>"
dat += "<A href='?src=\ref[src];copy_design=[disk_slot_selected];copy_design_ID=[D.id]'>Copy to Disk</A><BR>"
dat += "</div>"
if(1.6) //R&D console settings
@@ -806,7 +851,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
var/c = 50
var/t
var/all_materials = D.materials + D.reagents
var/all_materials = D.materials + D.reagents_list
for(var/M in all_materials)
t = linked_lathe.check_mat(D, M)
temp_material += " | "
@@ -840,13 +885,14 @@ won't update every console in existence) but it's more of a hassle to do. Also,
var/temp_material
var/c = 50
var/t
for(var/M in D.materials)
var/all_materials = D.materials + D.reagents_list
for(var/M in all_materials)
t = linked_lathe.check_mat(D, M)
temp_material += " | "
if (t < 1)
temp_material += "<span class='bad'>[D.materials[M]*coeff] [CallMaterialName(M)]</span>"
temp_material += "<span class='bad'>[all_materials[M]*coeff] [CallMaterialName(M)]</span>"
else
temp_material += " [D.materials[M]*coeff] [CallMaterialName(M)]"
temp_material += " [all_materials[M]*coeff] [CallMaterialName(M)]"
c = min(c,t)
if (c >= 1)
@@ -924,7 +970,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
var/temp_materials
var/check_materials = 1
var/all_materials = D.materials + D.reagents
var/all_materials = D.materials + D.reagents_list
for(var/M in all_materials)
temp_materials += " | "
@@ -950,13 +996,14 @@ won't update every console in existence) but it's more of a hassle to do. Also,
for(var/datum/design/D in matching_designs)
var/temp_materials
var/check_materials = 1
for(var/M in D.materials)
var/all_materials = D.materials + D.reagents_list
for(var/M in all_materials)
temp_materials += " | "
if (!linked_imprinter.check_mat(D, M))
check_materials = 0
temp_materials += " <span class='bad'>[D.materials[M]/coeff] [CallMaterialName(M)]</span>"
temp_materials += " <span class='bad'>[all_materials[M]/coeff] [CallMaterialName(M)]</span>"
else
temp_materials += " [D.materials[M]/coeff] [CallMaterialName(M)]"
temp_materials += " [all_materials[M]/coeff] [CallMaterialName(M)]"
if (check_materials)
dat += "<A href='?src=\ref[src];imprint=[D.id]'>[D.name]</A>[temp_materials]<BR>"
else