mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-28 04:47:07 +01:00
refactors attack_hand, attackby, attack_self (#5120)
Co-authored-by: silicons <no@you.cat>
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
/obj/machinery/ntnet_relay/attack_hand(var/mob/living/user)
|
||||
/obj/machinery/ntnet_relay/attack_hand(mob/user, list/params)
|
||||
nano_ui_interact(user)
|
||||
|
||||
/obj/machinery/ntnet_relay/Topic(href, href_list)
|
||||
|
||||
@@ -109,13 +109,16 @@
|
||||
/obj/item/modular_computer/attack_ai(mob/user)
|
||||
return attack_self(user)
|
||||
|
||||
/obj/item/modular_computer/attack_hand(mob/user)
|
||||
/obj/item/modular_computer/attack_hand(mob/user, list/params)
|
||||
if(anchored)
|
||||
return attack_self(user)
|
||||
return ..()
|
||||
|
||||
/// On-click handling. Turns on the computer if it's off and opens the GUI.
|
||||
/obj/item/modular_computer/attack_self(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(enabled && screen_on)
|
||||
nano_ui_interact(user)
|
||||
else if(!enabled && screen_on)
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/lapvend/attack_hand(var/mob/user)
|
||||
/obj/machinery/lapvend/attack_hand(mob/user, list/params)
|
||||
nano_ui_interact(user)
|
||||
|
||||
/obj/machinery/lapvend/nano_ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
|
||||
Reference in New Issue
Block a user