mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +01:00
[TM] Verb Queue - Port of TG SSverb subsystem (#19863)
* Some verbs queue up now * Damn you 515 * Screw you Topic * Update client_procs.dm * Fixes for unit testing * Update MC.dm * verb * Update callback.dm * Tweaks * Linters might not have liked that, * More tweaks, and fix * Update verb_manager.dm
This commit is contained in:
@@ -597,6 +597,9 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
set name = "Examine"
|
||||
set category = "IC"
|
||||
|
||||
DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, PROC_REF(run_examinate), A))
|
||||
|
||||
/mob/proc/run_examinate(atom/A)
|
||||
if(!has_vision(information_only = TRUE) && !isobserver(src))
|
||||
to_chat(src, "<span class='notice'>Something is there but you can't see it.</span>")
|
||||
return 1
|
||||
@@ -649,6 +652,10 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
set category = null
|
||||
set src = usr
|
||||
|
||||
DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, PROC_REF(run_mode)))
|
||||
|
||||
///proc version to finish /mob/verb/mode() execution. used in case the proc needs to be queued for the tick after its first called
|
||||
/mob/proc/run_mode()
|
||||
if(ismecha(loc)) return
|
||||
|
||||
if(hand)
|
||||
@@ -1569,3 +1576,13 @@ GLOBAL_LIST_INIT(holy_areas, typecacheof(list(
|
||||
. = stat
|
||||
stat = new_stat
|
||||
SEND_SIGNAL(src, COMSIG_MOB_STATCHANGE, new_stat, .)
|
||||
|
||||
///Makes a call in the context of a different usr. Use sparingly
|
||||
/world/proc/invoke_callback_with_usr(mob/user_mob, datum/callback/invoked_callback, ...)
|
||||
var/temp = usr
|
||||
usr = user_mob
|
||||
if (length(args) > 2)
|
||||
. = invoked_callback.Invoke(arglist(args.Copy(3)))
|
||||
else
|
||||
. = invoked_callback.Invoke()
|
||||
usr = temp
|
||||
|
||||
Reference in New Issue
Block a user