mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] usr to user up to player effects (#9552)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a7e4ef7dad
commit
0180cc74c5
@@ -307,26 +307,26 @@
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
add_fingerprint(usr)
|
||||
add_fingerprint(ui.user)
|
||||
|
||||
switch(action)
|
||||
if("search")
|
||||
search = params["search"]
|
||||
update_tgui_static_data(usr, ui)
|
||||
update_tgui_static_data(ui.user, ui)
|
||||
return TRUE
|
||||
if("design_page")
|
||||
if(params["reset"])
|
||||
design_page = 0
|
||||
else
|
||||
design_page = max(design_page + (1 * params["reverse"]), 0)
|
||||
update_tgui_static_data(usr, ui)
|
||||
update_tgui_static_data(ui.user, ui)
|
||||
return TRUE
|
||||
if("builder_page")
|
||||
if(params["reset"])
|
||||
builder_page = 0
|
||||
else
|
||||
builder_page = max(builder_page + (1 * params["reverse"]), 0)
|
||||
update_tgui_static_data(usr, ui)
|
||||
update_tgui_static_data(ui.user, ui)
|
||||
return TRUE
|
||||
|
||||
if("updt_tech") //Update the research holder with information from the technology disk.
|
||||
@@ -336,7 +336,7 @@
|
||||
files.AddTech2Known(t_disk.stored)
|
||||
files.RefreshResearch()
|
||||
griefProtection() //Update CentCom too
|
||||
update_tgui_static_data(usr, ui)
|
||||
update_tgui_static_data(ui.user, ui)
|
||||
return TRUE
|
||||
|
||||
if("clear_tech") //Erase data on the technology disk.
|
||||
@@ -361,7 +361,7 @@
|
||||
busy_msg = null
|
||||
files.AddDesign2Known(d_disk.blueprint)
|
||||
griefProtection() //Update CentCom too
|
||||
update_tgui_static_data(usr, ui)
|
||||
update_tgui_static_data(ui.user, ui)
|
||||
return TRUE
|
||||
|
||||
if("clear_design") //Erases data on the design disk.
|
||||
@@ -383,7 +383,7 @@
|
||||
if("eject_item") //Eject the item inside the destructive analyzer.
|
||||
if(linked_destroy)
|
||||
if(linked_destroy.busy)
|
||||
to_chat(usr, span_notice("The destructive analyzer is busy at the moment."))
|
||||
to_chat(ui.user, span_notice("The destructive analyzer is busy at the moment."))
|
||||
return FALSE
|
||||
|
||||
if(linked_destroy.loaded_item)
|
||||
@@ -397,7 +397,7 @@
|
||||
return FALSE
|
||||
|
||||
if(linked_destroy.busy)
|
||||
to_chat(usr, span_notice("The destructive analyzer is busy at the moment."))
|
||||
to_chat(ui.user, span_notice("The destructive analyzer is busy at the moment."))
|
||||
return
|
||||
|
||||
linked_destroy.busy = 1
|
||||
@@ -408,7 +408,7 @@
|
||||
linked_destroy.busy = 0
|
||||
busy_msg = null
|
||||
if(!linked_destroy.loaded_item)
|
||||
to_chat(usr, span_notice("The destructive analyzer appears to be empty."))
|
||||
to_chat(ui.user, span_notice("The destructive analyzer appears to be empty."))
|
||||
return
|
||||
|
||||
if(istype(linked_destroy.loaded_item,/obj/item/stack))//Only deconsturcts one sheet at a time instead of the entire stack
|
||||
@@ -450,19 +450,19 @@
|
||||
|
||||
use_power(linked_destroy.active_power_usage)
|
||||
files.RefreshResearch()
|
||||
update_tgui_static_data(usr, ui)
|
||||
update_tgui_static_data(ui.user, ui)
|
||||
return TRUE
|
||||
|
||||
if("lock") //Lock the console from use by anyone without tox access.
|
||||
if(!allowed(usr))
|
||||
to_chat(usr, "Unauthorized Access.")
|
||||
if(!allowed(ui.user))
|
||||
to_chat(ui.user, "Unauthorized Access.")
|
||||
return
|
||||
locked = !locked
|
||||
return TRUE
|
||||
|
||||
if("sync") //Sync the research holder with all the R&D consoles in the game that aren't sync protected.
|
||||
if(!sync)
|
||||
to_chat(usr, span_notice("You must connect to the network first."))
|
||||
to_chat(ui.user, span_notice("You must connect to the network first."))
|
||||
return
|
||||
|
||||
busy_msg = "Updating Database..."
|
||||
@@ -488,7 +488,7 @@
|
||||
S.produce_heat()
|
||||
busy_msg = null
|
||||
files.RefreshResearch()
|
||||
update_tgui_static_data(usr, ui)
|
||||
update_tgui_static_data(ui.user, ui)
|
||||
return TRUE
|
||||
|
||||
if("togglesync") //Prevents the console from being synced by other consoles. Can still send data.
|
||||
@@ -583,7 +583,7 @@
|
||||
spawn(10)
|
||||
busy_msg = null
|
||||
SyncRDevices()
|
||||
update_tgui_static_data(usr, ui)
|
||||
update_tgui_static_data(ui.user, ui)
|
||||
return TRUE
|
||||
|
||||
if("disconnect") //The R&D console disconnects with a specific device.
|
||||
@@ -597,18 +597,18 @@
|
||||
if("imprinter")
|
||||
linked_imprinter.linked_console = null
|
||||
linked_imprinter = null
|
||||
update_tgui_static_data(usr, ui)
|
||||
update_tgui_static_data(ui.user, ui)
|
||||
|
||||
if("reset") //Reset the R&D console's database.
|
||||
griefProtection()
|
||||
var/choice = tgui_alert(usr, "R&D Console Database Reset", "Are you sure you want to reset the R&D console's database? Data lost cannot be recovered.", list("Continue", "Cancel"))
|
||||
var/choice = tgui_alert(ui.user, "R&D Console Database Reset", "Are you sure you want to reset the R&D console's database? Data lost cannot be recovered.", list("Continue", "Cancel"))
|
||||
if(choice == "Continue")
|
||||
busy_msg = "Updating Database..."
|
||||
qdel(files)
|
||||
files = new /datum/research(src)
|
||||
spawn(20)
|
||||
busy_msg = null
|
||||
update_tgui_static_data(usr, ui)
|
||||
update_tgui_static_data(ui.user, ui)
|
||||
|
||||
if("print") //Print research information
|
||||
busy_msg = "Printing Research Information. Please Wait..."
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
if(..())
|
||||
return TRUE
|
||||
|
||||
add_fingerprint(usr)
|
||||
add_fingerprint(ui.user)
|
||||
switch(action)
|
||||
if("toggle_upload", "toggle_download")
|
||||
var/obj/machinery/r_n_d/server/S = locate(params["server"])
|
||||
@@ -248,7 +248,7 @@
|
||||
var/obj/machinery/r_n_d/server/target = locate(params["server"])
|
||||
if(!istype(target))
|
||||
return FALSE
|
||||
var/choice = tgui_alert(usr, "Technology Data Rest", "Are you sure you want to reset this technology to its default data? Data lost cannot be recovered.", list("Continue", "Cancel"))
|
||||
var/choice = tgui_alert(ui.user, "Technology Data Rest", "Are you sure you want to reset this technology to its default data? Data lost cannot be recovered.", list("Continue", "Cancel"))
|
||||
if(choice == "Continue")
|
||||
for(var/datum/tech/T in target.files.known_tech)
|
||||
if(T.id == params["tech"])
|
||||
@@ -261,7 +261,7 @@
|
||||
var/obj/machinery/r_n_d/server/target = locate(params["server"])
|
||||
if(!istype(target))
|
||||
return FALSE
|
||||
var/choice = tgui_alert(usr, "Design Data Deletion", "Are you sure you want to delete this design? If you still have the prerequisites for the design, it'll reset to its base reliability. Data lost cannot be recovered.", list("Continue", "Cancel"))
|
||||
var/choice = tgui_alert(ui.user, "Design Data Deletion", "Are you sure you want to delete this design? If you still have the prerequisites for the design, it'll reset to its base reliability. Data lost cannot be recovered.", list("Continue", "Cancel"))
|
||||
if(choice == "Continue")
|
||||
for(var/datum/design/D in target.files.known_designs)
|
||||
if(D.id == params["design"])
|
||||
@@ -273,8 +273,8 @@
|
||||
if("transfer_data")
|
||||
if(!badmin)
|
||||
// no href exploits, you've been r e p o r t e d
|
||||
log_admin("Warning: [key_name(usr)] attempted to transfer R&D data from [params["server"]] to [params["target"]] via href exploit with [src] [COORD(src)]")
|
||||
message_admins("Warning: [ADMIN_FULLMONTY(usr)] attempted to transfer R&D data from [params["server"]] to [params["target"]] via href exploit with [src] [ADMIN_COORDJMP(src)]")
|
||||
log_admin("Warning: [key_name(ui.user)] attempted to transfer R&D data from [params["server"]] to [params["target"]] via href exploit with [src] [COORD(src)]")
|
||||
message_admins("Warning: [ADMIN_FULLMONTY(ui.user)] attempted to transfer R&D data from [params["server"]] to [params["target"]] via href exploit with [src] [ADMIN_COORDJMP(src)]")
|
||||
return FALSE
|
||||
var/obj/machinery/r_n_d/server/from = locate(params["server"])
|
||||
if(!istype(from))
|
||||
|
||||
Reference in New Issue
Block a user