Revert "12/21 modernizations from TG live"
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
icon = 'icons/obj/machines/research.dmi'
|
||||
icon_state = "server"
|
||||
var/datum/research/files
|
||||
var/heat_health = 100
|
||||
var/health = 100
|
||||
var/list/id_with_upload = list() //List of R&D consoles with upload to server access.
|
||||
var/list/id_with_download = list() //List of R&D consoles with download from server access.
|
||||
var/id_with_upload_string = "" //String versions for easy editing in map editor.
|
||||
@@ -56,12 +56,12 @@
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
switch(environment.temperature)
|
||||
if(0 to T0C)
|
||||
heat_health = min(100, heat_health + 1)
|
||||
health = min(100, health + 1)
|
||||
if(T0C to (T20C + 20))
|
||||
heat_health = Clamp(heat_health, 0, 100)
|
||||
health = Clamp(health, 0, 100)
|
||||
if((T20C + 20) to (T0C + 70))
|
||||
heat_health = max(0, heat_health - 1)
|
||||
if(heat_health <= 0)
|
||||
health = max(0, health - 1)
|
||||
if(health <= 0)
|
||||
/*griefProtection() This seems to get called twice before running any code that deletes/damages the server or it's files anwyay.
|
||||
refreshParts and the hasReq procs that get called by this are laggy and do not need to be called by every server on the map every tick */
|
||||
var/updateRD = 0
|
||||
@@ -84,10 +84,18 @@
|
||||
griefProtection()
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/r_n_d/server/ex_act(severity, target)
|
||||
griefProtection()
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/r_n_d/server/blob_act(obj/effect/blob/B)
|
||||
griefProtection()
|
||||
..()
|
||||
|
||||
|
||||
|
||||
//Backup files to centcom to help admins recover data after greifer attacks
|
||||
/obj/machinery/r_n_d/server/proc/griefProtection()
|
||||
for(var/obj/machinery/r_n_d/server/centcom/C in machines)
|
||||
@@ -121,7 +129,7 @@
|
||||
air_update_turf()
|
||||
|
||||
//called when the server is deconstructed.
|
||||
/obj/machinery/r_n_d/server/on_deconstruction()
|
||||
/obj/machinery/r_n_d/server/deconstruction()
|
||||
griefProtection()
|
||||
..()
|
||||
|
||||
@@ -226,7 +234,7 @@
|
||||
|
||||
else if(href_list["reset_tech"])
|
||||
var/choice = alert("Technology Data Reset", "Are you sure you want to reset this technology to its default data? Data lost cannot be recovered.", "Continue", "Cancel")
|
||||
if(choice == "Continue" && usr.canUseTopic(src))
|
||||
if(choice == "Continue")
|
||||
var/datum/tech/T = temp_server.files.known_tech[href_list["reset_tech"]]
|
||||
if(T)
|
||||
T.level = 1
|
||||
@@ -234,7 +242,7 @@
|
||||
|
||||
else if(href_list["reset_design"])
|
||||
var/choice = alert("Design Data Deletion", "Are you sure you want to delete this design? Data lost cannot be recovered.", "Continue", "Cancel")
|
||||
if(choice == "Continue" && usr.canUseTopic(src))
|
||||
if(choice == "Continue")
|
||||
var/datum/design/D = temp_server.files.known_designs[href_list["reset_design"]]
|
||||
if(D)
|
||||
temp_server.files.known_designs -= D.id
|
||||
|
||||
Reference in New Issue
Block a user