[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:
CHOMPStation2StaffMirrorBot
2024-12-01 10:31:19 -07:00
committed by GitHub
parent a7e4ef7dad
commit 0180cc74c5
297 changed files with 1866 additions and 1893 deletions

View File

@@ -71,17 +71,17 @@
return TRUE
if("slot")
var/slot = params["slot"]
var/obj/item/I = usr.get_active_hand()
var/obj/item/I = ui.user.get_active_hand()
if(slot <= LAZYLEN(cooking_objs)) // Inserting
var/datum/cooking_item/CI = cooking_objs[slot]
if(istype(I) && can_insert(I)) // Why do hard work when we can just make them smack us?
attackby(I, usr)
attackby(I, ui.user)
else if(istype(CI))
eject(CI, usr)
eject(CI, ui.user)
return TRUE
if(istype(I)) // Why do hard work when we can just make them smack us?
attackby(I, usr)
attackby(I, ui.user)
return TRUE
/obj/machinery/appliance/cooker/examine(var/mob/user)

View File

@@ -231,20 +231,20 @@
.["locked"] = locked
.["secure"] = is_secure
/obj/machinery/smartfridge/tgui_act(action, params)
/obj/machinery/smartfridge/tgui_act(action, params, datum/tgui/ui)
if(..())
return TRUE
add_fingerprint(usr)
add_fingerprint(ui.user)
switch(action)
if("Release")
var/amount = 0
if(params["amount"])
amount = params["amount"]
else
amount = tgui_input_number(usr, "How many items?", "How many items would you like to take out?", 1)
amount = tgui_input_number(ui.user, "How many items?", "How many items would you like to take out?", 1)
if(QDELETED(src) || QDELETED(usr) || !usr.Adjacent(src))
if(QDELETED(src) || QDELETED(ui.user) || !ui.user.Adjacent(src))
return FALSE
var/index = text2num(params["index"])
@@ -280,11 +280,11 @@
/*
* Secure Smartfridges
*/
/obj/machinery/smartfridge/secure/tgui_act(action, params)
/obj/machinery/smartfridge/secure/tgui_act(action, params, datum/tgui/ui)
if(stat & (NOPOWER|BROKEN))
return TRUE
if(usr.contents.Find(src) || (in_range(src, usr) && istype(loc, /turf)))
if((!allowed(usr) && scan_id) && !emagged && locked != -1 && action == "Release")
to_chat(usr, span_warning("Access denied."))
if(ui.user.contents.Find(src) || (in_range(src, ui.user) && istype(loc, /turf)))
if((!allowed(ui.user) && scan_id) && !emagged && locked != -1 && action == "Release")
to_chat(ui.user, span_warning("Access denied."))
return TRUE
return ..()