mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-06 07:22:15 +00:00
Removed the rd-core computer's process()
- All it contained was some anti-griefing protection. - The protection is now only called when needed, not every tick. - This should eliminate hundreds of proc calls every tick. - Note: There will likely be no noticeable lag reduction from this change, but every little bit helps. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3845 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -114,6 +114,15 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
D.linked_console = src
|
||||
return
|
||||
|
||||
//Have it automatically push research to the centcomm server so wild griffins can't fuck up R&D's work --NEO
|
||||
griefProtection()
|
||||
for(var/obj/machinery/r_n_d/server/centcom/C in world)
|
||||
for(var/datum/tech/T in files.known_tech)
|
||||
C.files.AddTech2Known(T)
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
C.files.AddDesign2Known(D)
|
||||
C.files.RefreshResearch()
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
@@ -126,13 +135,10 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
initialize()
|
||||
SyncRDevices()
|
||||
|
||||
/* Instead of calling this every tick, it is only being called when needed
|
||||
process()
|
||||
for(var/obj/machinery/r_n_d/server/centcom/C in world) //have it automatically push research to the centcomm server so wild griffins can't fuck up R&D's work --NEO
|
||||
for(var/datum/tech/T in files.known_tech)
|
||||
C.files.AddTech2Known(T)
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
C.files.AddDesign2Known(D)
|
||||
C.files.RefreshResearch()
|
||||
griefProtection()
|
||||
*/
|
||||
|
||||
attackby(var/obj/item/weapon/D as obj, var/mob/user as mob)
|
||||
//The construction/deconstruction of the console code.
|
||||
@@ -203,6 +209,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
screen = 1.2
|
||||
files.AddTech2Known(t_disk.stored)
|
||||
updateUsrDialog()
|
||||
griefProtection() //Update centcomm too
|
||||
|
||||
else if(href_list["clear_tech"]) //Erase data on the technology disk.
|
||||
t_disk.stored = null
|
||||
@@ -225,6 +232,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
screen = 1.4
|
||||
files.AddDesign2Known(d_disk.blueprint)
|
||||
updateUsrDialog()
|
||||
griefProtection() //Update centcomm too
|
||||
|
||||
else if(href_list["clear_design"]) //Erases data on the design disk.
|
||||
d_disk.blueprint = null
|
||||
@@ -301,6 +309,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
if(!sync)
|
||||
usr << "\red You must connect to the network first!"
|
||||
else
|
||||
griefProtection() //Putting this here because I dont trust the sync process
|
||||
spawn(30)
|
||||
if(src)
|
||||
for(var/obj/machinery/r_n_d/server/S in world)
|
||||
@@ -508,6 +517,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
linked_imprinter = null
|
||||
|
||||
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")
|
||||
screen = 0.0
|
||||
|
||||
@@ -26,6 +26,10 @@
|
||||
RefreshParts()
|
||||
src.initialize(); //Agouri
|
||||
|
||||
Del()
|
||||
griefProtection()
|
||||
..()
|
||||
|
||||
RefreshParts()
|
||||
var/tot_rating = 0
|
||||
for(var/obj/item/weapon/stock_parts/SP in src)
|
||||
@@ -56,6 +60,7 @@
|
||||
if((T20C + 20) to (T0C + 70))
|
||||
health = max(0, health - 1)
|
||||
if(health <= 0)
|
||||
griefProtection() //I dont like putting this in process() but it's the best I can do without re-writing a chunk of rd servers.
|
||||
files.known_designs = list()
|
||||
for(var/datum/tech/T in files.known_tech)
|
||||
if(prob(1))
|
||||
@@ -67,8 +72,36 @@
|
||||
produce_heat(heat_gen)
|
||||
delay = initial(delay)
|
||||
|
||||
meteorhit(var/obj/O as obj)
|
||||
griefProtection()
|
||||
..()
|
||||
|
||||
|
||||
emp_act(severity)
|
||||
griefProtection()
|
||||
..()
|
||||
|
||||
|
||||
ex_act(severity)
|
||||
griefProtection()
|
||||
..()
|
||||
|
||||
|
||||
blob_act()
|
||||
griefProtection()
|
||||
..()
|
||||
|
||||
|
||||
proc
|
||||
//Backup files to centcomm to help admins recover data after greifer attacks
|
||||
griefProtection()
|
||||
for(var/obj/machinery/r_n_d/server/centcom/C in world)
|
||||
for(var/datum/tech/T in files.known_tech)
|
||||
C.files.AddTech2Known(T)
|
||||
for(var/datum/design/D in files.known_designs)
|
||||
C.files.AddDesign2Known(D)
|
||||
C.files.RefreshResearch()
|
||||
|
||||
produce_heat(heat_amt)
|
||||
if(!(stat & (NOPOWER|BROKEN))) //Blatently stolen from space heater.
|
||||
var/turf/simulated/L = loc
|
||||
@@ -106,6 +139,7 @@
|
||||
return
|
||||
if (opened)
|
||||
if(istype(O, /obj/item/weapon/crowbar))
|
||||
griefProtection()
|
||||
playsound(src.loc, 'Crowbar.ogg', 50, 1)
|
||||
var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
|
||||
M.state = 2
|
||||
|
||||
Reference in New Issue
Block a user