mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
Adds buttons in the UI for specific components (#61622)
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
This commit is contained in:
co-authored by
Watermelon914
parent
b463e0417e
commit
390f60f571
@@ -17,13 +17,17 @@
|
||||
|
||||
var/port_limit = 10
|
||||
|
||||
ui_buttons = list(
|
||||
"edit" = "action"
|
||||
)
|
||||
|
||||
/obj/item/integrated_circuit/module
|
||||
var/obj/item/circuit_component/module/attached_module
|
||||
|
||||
/obj/item/integrated_circuit/module/ui_host(mob/user)
|
||||
. = ..()
|
||||
if(. == src)
|
||||
return attached_module
|
||||
if(attached_module)
|
||||
return attached_module.ui_host()
|
||||
return ..()
|
||||
|
||||
/obj/item/integrated_circuit/module/set_display_name(new_name)
|
||||
. = ..()
|
||||
@@ -296,6 +300,9 @@
|
||||
|
||||
#undef WITHIN_RANGE
|
||||
|
||||
/obj/item/circuit_component/module/ui_perform_action(mob/user, action)
|
||||
interact(user)
|
||||
|
||||
/obj/item/circuit_component/module/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
|
||||
Reference in New Issue
Block a user