515 Compatibility (#19636)

* 515 compat

* double spaces

* Callback documentation, aa review

* spacing

* NAMEOF_STATIC

* big beta
This commit is contained in:
S34N
2022-11-08 23:08:40 +00:00
committed by GitHub
parent 2e7e556383
commit 667dd5d4ac
378 changed files with 928 additions and 919 deletions
+8 -8
View File
@@ -323,7 +323,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
linked_destroy.busy = TRUE
add_wait_message("Processing and Updating Database...", DECONSTRUCT_DELAY)
flick("d_analyzer_process", linked_destroy)
addtimer(CALLBACK(src, .proc/finish_destroyer, user, temp_tech), DECONSTRUCT_DELAY)
addtimer(CALLBACK(src, PROC_REF(finish_destroyer), user, temp_tech), DECONSTRUCT_DELAY)
// Sends salvaged materials to a linked protolathe, if any.
/obj/machinery/computer/rdconsole/proc/send_mats()
@@ -451,7 +451,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
machine.reagents.remove_reagent(R, being_built.reagents_list[R] * coeff)
var/key = usr.key
addtimer(CALLBACK(src, .proc/finish_machine, key, amount, enough_materials, machine, being_built, efficient_mats), time_to_construct)
addtimer(CALLBACK(src, PROC_REF(finish_machine), key, amount, enough_materials, machine, being_built, efficient_mats), time_to_construct)
/obj/machinery/computer/rdconsole/proc/finish_machine(key, amount, enough_materials, obj/machinery/r_n_d/machine, datum/design/being_built, list/efficient_mats)
if(machine)
@@ -529,7 +529,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if("updt_tech") //Update the research holder with information from the technology disk.
add_wait_message("Updating Database...", TECH_UPDATE_DELAY)
addtimer(CALLBACK(src, .proc/update_from_disk), TECH_UPDATE_DELAY)
addtimer(CALLBACK(src, PROC_REF(update_from_disk)), TECH_UPDATE_DELAY)
if("clear_tech") //Erase data on the technology disk.
if(t_disk)
@@ -554,7 +554,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if("updt_design") //Updates the research holder with design data from the design disk.
add_wait_message("Updating Database...", DESIGN_UPDATE_DELAY)
addtimer(CALLBACK(src, .proc/update_from_disk), DESIGN_UPDATE_DELAY)
addtimer(CALLBACK(src, PROC_REF(update_from_disk)), DESIGN_UPDATE_DELAY)
if("clear_design") //Erases data on the design disk.
if(d_disk)
@@ -607,7 +607,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
else
add_wait_message("Syncing Database...", SYNC_RESEARCH_DELAY)
griefProtection() //Putting this here because I dont trust the sync process
addtimer(CALLBACK(src, .proc/sync_research), SYNC_RESEARCH_DELAY)
addtimer(CALLBACK(src, PROC_REF(sync_research)), SYNC_RESEARCH_DELAY)
if("togglesync") //Prevents the console from being synced by other consoles. Can still send data.
sync = !sync
@@ -642,7 +642,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if("find_device") //The R&D console looks for devices nearby to link up with.
add_wait_message("Syncing with nearby devices...", SYNC_DEVICE_DELAY)
addtimer(CALLBACK(src, .proc/find_devices), SYNC_DEVICE_DELAY)
addtimer(CALLBACK(src, PROC_REF(find_devices)), SYNC_DEVICE_DELAY)
if("disconnect") //The R&D console disconnects with a specific device.
switch(params["item"])
@@ -664,7 +664,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
var/choice = alert("Are you sure you want to reset the R&D console's database? Data lost cannot be recovered.", "R&D Console Database Reset", "Continue", "Cancel")
if(choice == "Continue")
add_wait_message("Resetting Database...", RESET_RESEARCH_DELAY)
addtimer(CALLBACK(src, .proc/reset_research), RESET_RESEARCH_DELAY)
addtimer(CALLBACK(src, PROC_REF(reset_research)), RESET_RESEARCH_DELAY)
if("search") //Search for designs with name matching pattern
var/query = params["to_search"]
@@ -913,7 +913,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
//helper proc that guarantees the wait message will not freeze the UI
/obj/machinery/computer/rdconsole/proc/add_wait_message(message, delay)
wait_message = message
wait_message_timer = addtimer(CALLBACK(src, .proc/clear_wait_message), delay, TIMER_UNIQUE | TIMER_STOPPABLE)
wait_message_timer = addtimer(CALLBACK(src, PROC_REF(clear_wait_message)), delay, TIMER_UNIQUE | TIMER_STOPPABLE)
// This is here to guarantee that we never lock the console, so long as the timer
// process is running
+1 -1
View File
@@ -16,7 +16,7 @@
/obj/machinery/r_n_d/Initialize(mapload)
. = ..()
materials = AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TRANQUILLITE, MAT_TITANIUM, MAT_BLUESPACE, MAT_PLASTIC), 0, TRUE, /obj/item/stack, CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert))
materials = AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TRANQUILLITE, MAT_TITANIUM, MAT_BLUESPACE, MAT_PLASTIC), 0, TRUE, /obj/item/stack, CALLBACK(src, PROC_REF(is_insertion_ready)), CALLBACK(src, PROC_REF(AfterMaterialInsert)))
materials.precise_insertion = TRUE
/obj/machinery/r_n_d/Destroy()
@@ -116,12 +116,12 @@
hotkey_help.Grant(user)
actions += hotkey_help
RegisterSignal(user, COMSIG_XENO_SLIME_CLICK_CTRL, .proc/XenoSlimeClickCtrl)
RegisterSignal(user, COMSIG_XENO_SLIME_CLICK_ALT, .proc/XenoSlimeClickAlt)
RegisterSignal(user, COMSIG_XENO_SLIME_CLICK_SHIFT, .proc/XenoSlimeClickShift)
RegisterSignal(user, COMSIG_XENO_TURF_CLICK_SHIFT, .proc/XenoTurfClickShift)
RegisterSignal(user, COMSIG_XENO_TURF_CLICK_CTRL, .proc/XenoTurfClickCtrl)
RegisterSignal(user, COMSIG_XENO_MONKEY_CLICK_CTRL, .proc/XenoMonkeyClickCtrl)
RegisterSignal(user, COMSIG_XENO_SLIME_CLICK_CTRL, PROC_REF(XenoSlimeClickCtrl))
RegisterSignal(user, COMSIG_XENO_SLIME_CLICK_ALT, PROC_REF(XenoSlimeClickAlt))
RegisterSignal(user, COMSIG_XENO_SLIME_CLICK_SHIFT, PROC_REF(XenoSlimeClickShift))
RegisterSignal(user, COMSIG_XENO_TURF_CLICK_SHIFT, PROC_REF(XenoTurfClickShift))
RegisterSignal(user, COMSIG_XENO_TURF_CLICK_CTRL, PROC_REF(XenoTurfClickCtrl))
RegisterSignal(user, COMSIG_XENO_MONKEY_CLICK_CTRL, PROC_REF(XenoMonkeyClickCtrl))
if(!connected_recycler)
for(var/obj/machinery/monkey_recycler/recycler in GLOB.monkey_recyclers)
@@ -255,7 +255,7 @@
else
to_chat(user, "<span class='notice'>[M] looks interested for a moment, but then looks back down. Maybe you should try again later.</span>")
heat_stage += 1
addtimer(CALLBACK(src, .proc/cooldown_potion), 60 SECONDS)
addtimer(CALLBACK(src, PROC_REF(cooldown_potion)), 60 SECONDS)
if(user.Adjacent(src))
switch(heat_stage)
if(1)