tgui usr to ui.user

This commit is contained in:
Kashargul
2024-11-13 00:49:17 +01:00
parent 49d89c0059
commit 32c9f971bc
120 changed files with 1037 additions and 1061 deletions
@@ -300,7 +300,7 @@
var/amount_per_pill = CLAMP(reagents.total_volume / count, 0, MAX_UNITS_PER_PILL)
while(count--)
if(reagents.total_volume <= 0)
to_chat(usr, span_notice("Not enough reagents to create these pills!"))
to_chat(ui.user, span_notice("Not enough reagents to create these pills!"))
return
var/obj/item/reagent_containers/pill/P = new(loc)
@@ -336,7 +336,7 @@
// var/is_medical_patch = chemical_safety_check(reagents)
while(count--)
if(reagents.total_volume <= 0)
to_chat(usr, span_notice("Not enough reagents to create these patches!"))
to_chat(ui.user, span_notice("Not enough reagents to create these patches!"))
return
var/obj/item/reagent_containers/pill/patch/P = new(loc)
@@ -363,7 +363,7 @@
var/amount_per_bottle = CLAMP(reagents.total_volume / count, 0, MAX_UNITS_PER_BOTTLE)
while(count--)
if(reagents.total_volume <= 0)
to_chat(usr, span_notice("Not enough reagents to create these bottles!"))
to_chat(ui.user, span_notice("Not enough reagents to create these bottles!"))
return
var/obj/item/reagent_containers/glass/bottle/P = new(loc)
P.name = "[answer] bottle"
@@ -393,8 +393,8 @@
if(tgui_act_modal(action, params, ui, state))
return TRUE
add_fingerprint(usr)
usr.set_machine(src)
add_fingerprint(ui.user)
ui.user.set_machine(src)
. = TRUE
switch(action)
@@ -403,8 +403,8 @@
if("ejectp")
if(loaded_pill_bottle)
loaded_pill_bottle.forceMove(get_turf(src))
if(Adjacent(usr) && !issilicon(usr))
usr.put_in_hands(loaded_pill_bottle)
if(Adjacent(ui.user) && !issilicon(ui.user))
ui.user.put_in_hands(loaded_pill_bottle)
loaded_pill_bottle = null
if("print")
if(printing || condi)
@@ -463,8 +463,8 @@
if(!beaker)
return
beaker.forceMove(get_turf(src))
if(Adjacent(usr) && !issilicon(usr))
usr.put_in_hands(beaker)
if(Adjacent(ui.user) && !issilicon(ui.user))
ui.user.put_in_hands(beaker)
beaker = null
reagents.clear_reagents()
update_icon()