mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-22 11:26:41 +01:00
refactors attack_hand, attackby, attack_self (#5120)
Co-authored-by: silicons <no@you.cat>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user