mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
Mark ui_data procs as SHOULD_NOT_SLEEP(TRUE) (#17847)
* mark ui_data procs as SHOULD_NOT_SLEEP(TRUE) * Address dm warnings
This commit is contained in:
@@ -13,32 +13,20 @@
|
||||
return acct
|
||||
|
||||
|
||||
/obj/proc/get_card_account(obj/item/card/I, mob/user=null, terminal_name="", transaction_purpose="", require_pin=0)
|
||||
if(terminal_name=="")
|
||||
terminal_name=src.name
|
||||
/obj/proc/get_card_account(obj/item/card/I)
|
||||
if(istype(I, /obj/item/card/id))
|
||||
var/obj/item/card/id/C = I
|
||||
var/attempt_pin=0
|
||||
var/datum/money_account/D = get_money_account(C.associated_account_number)
|
||||
if(require_pin && user)
|
||||
attempt_pin = input(user,"Enter pin code", "Transaction") as num
|
||||
if(D.remote_access_pin != attempt_pin)
|
||||
return null
|
||||
if(D)
|
||||
return D
|
||||
|
||||
/mob/proc/get_worn_id_account(require_pin=0, mob/user=null)
|
||||
/mob/proc/get_worn_id_account()
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H=src
|
||||
var/obj/item/card/id/I=H.get_idcard()
|
||||
if(!I || !istype(I))
|
||||
return null
|
||||
var/attempt_pin=0
|
||||
var/datum/money_account/D = get_money_account(I.associated_account_number)
|
||||
if(require_pin && user)
|
||||
attempt_pin = input(user,"Enter pin code", "Transaction") as num
|
||||
if(D.remote_access_pin != attempt_pin)
|
||||
return null
|
||||
return D
|
||||
else if(issilicon(src))
|
||||
return GLOB.station_account
|
||||
|
||||
@@ -29,6 +29,11 @@
|
||||
* * mob/user - The mob interacting with the UI.
|
||||
*/
|
||||
/datum/proc/ui_data(mob/user)
|
||||
// Two good reasons why it shouldn't:
|
||||
// 1) this is polled several times a second, so sleeping means more running threads, needlessly tanking performance
|
||||
// 2) if you try to sleep, you get fun bugs ranging from BSOD to uninteractable white windows, to windows straight up vanishing.
|
||||
// Just don't.
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
return list() // Not implemented.
|
||||
|
||||
/**
|
||||
@@ -43,6 +48,7 @@
|
||||
* * mob/user - The mob interacting with the UI.
|
||||
*/
|
||||
/datum/proc/ui_static_data(mob/user)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
return list()
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user