Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split brained tgui #909

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/controllers/subsystem/pai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ SUBSYSTEM_DEF(pai)
/datum/controller/subsystem/pai/ui_state(mob/user)
return GLOB.observer_state

/datum/controller/subsystem/pai/ui_interact(mob/user, datum/tgui/ui)
/datum/controller/subsystem/pai/ui_interact(mob/user, datum/tgui/managed/ui)
. = ..()
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
Expand All @@ -85,7 +85,7 @@ SUBSYSTEM_DEF(pai)
data["name"] = candidate.name
return data

/datum/controller/subsystem/pai/ui_act(action, list/params, datum/tgui/ui)
/datum/controller/subsystem/pai/ui_act(action, list/params, datum/tgui/managed/ui)
. = ..()
if(.)
return
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/shuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ SUBSYSTEM_DEF(shuttle)
/datum/controller/subsystem/shuttle/ui_state(mob/user)
return GLOB.admin_state

/datum/controller/subsystem/shuttle/ui_interact(mob/user, datum/tgui/ui)
/datum/controller/subsystem/shuttle/ui_interact(mob/user, datum/tgui/managed/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "ShuttleManipulator")
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/vote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ SUBSYSTEM_DEF(vote)
/datum/controller/subsystem/vote/ui_state()
return GLOB.always_state

/datum/controller/subsystem/vote/ui_interact(mob/user, datum/tgui/ui)
/datum/controller/subsystem/vote/ui_interact(mob/user, datum/tgui/managed/ui)
// Tracks who is voting
if(user.client?.ckey)
voting |= user.client.ckey
Expand Down
2 changes: 1 addition & 1 deletion code/datums/achievements/_achievement_data.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
/datum/achievement_data/ui_state(mob/user)
return GLOB.always_state

/datum/achievement_data/ui_interact(mob/user, datum/tgui/ui)
/datum/achievement_data/ui_interact(mob/user, datum/tgui/managed/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "Achievements")
Expand Down
4 changes: 2 additions & 2 deletions code/datums/changelog/changelog.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
/datum/changelog/ui_state()
return GLOB.always_state

/datum/changelog/ui_interact(mob/user, datum/tgui/ui)
/datum/changelog/ui_interact(mob/user, datum/tgui/managed/ui)
ui = SStgui.try_update_ui(user, src, ui)
if (!ui)
ui = new(user, src, "Changelog")
ui.open()

/datum/changelog/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
/datum/changelog/ui_act(action, list/params, datum/tgui/managed/ui, datum/ui_state/state)
. = ..()
if(.)
return
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/crafting/crafting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@
return GLOB.not_incapacitated_turf_state

//For the UI related things we're going to assume the user is a mob rather than typesetting it to an atom as the UI isn't generated if the parent is an atom
/datum/component/personal_crafting/ui_interact(mob/user, datum/tgui/ui)
/datum/component/personal_crafting/ui_interact(mob/user, datum/tgui/managed/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
cur_category = categories[1]
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/gps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ GLOBAL_LIST_EMPTY(GPS_list)
to_chat(user, span_notice("[parent] is now tracking, and visible to other GPS devices."))
tracking = TRUE

/datum/component/gps/item/ui_interact(mob/user, datum/tgui/ui)
/datum/component/gps/item/ui_interact(mob/user, datum/tgui/managed/ui)
if(emped)
to_chat(user, span_hear("[parent] fizzles weakly."))
return
Expand Down
4 changes: 2 additions & 2 deletions code/datums/components/religious_tool.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
easy_access_sect.on_sacrifice(the_item,user)
return COMPONENT_NO_AFTERATTACK

/datum/component/religious_tool/ui_interact(mob/user, datum/tgui/ui)
/datum/component/religious_tool/ui_interact(mob/user, datum/tgui/managed/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "ReligiousTool")
Expand Down Expand Up @@ -105,7 +105,7 @@
data["can_sacrifice_item"] = (operation_flags & RELIGION_TOOL_SACRIFICE)
return data

/datum/component/religious_tool/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
/datum/component/religious_tool/ui_act(action, list/params, datum/tgui/managed/ui, datum/ui_state/state)
. = ..()
switch(action)
if("sect_select")
Expand Down
4 changes: 2 additions & 2 deletions code/datums/components/uplink.dm
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
/datum/component/uplink/ui_state(mob/user)
return GLOB.inventory_state

/datum/component/uplink/ui_interact(mob/user, datum/tgui/ui)
/datum/component/uplink/ui_interact(mob/user, datum/tgui/managed/ui)
active = TRUE
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
Expand Down Expand Up @@ -230,7 +230,7 @@
get_asset_datum(/datum/asset/json/uplink)
)

/datum/component/uplink/ui_act(action, params, datum/tgui/ui, datum/ui_state/state)
/datum/component/uplink/ui_act(action, params, datum/tgui/managed/ui, datum/ui_state/state)
. = ..()
if(.)
return
Expand Down
4 changes: 2 additions & 2 deletions code/datums/elements/strippable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@

return ..()

/datum/strip_menu/ui_interact(mob/user, datum/tgui/ui)
/datum/strip_menu/ui_interact(mob/user, datum/tgui/managed/ui)
ui = SStgui.try_update_ui(user, src, ui)
if (!ui)
ui = new(user, src, "StripMenu")
Expand Down Expand Up @@ -389,7 +389,7 @@

return data

/datum/strip_menu/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
/datum/strip_menu/ui_act(action, list/params, datum/tgui/managed/ui, datum/ui_state/state)
. = ..()
if (.)
return
Expand Down
2 changes: 1 addition & 1 deletion code/datums/hotkeys_help.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/datum/hotkeys_help/ui_state()
return GLOB.always_state

/datum/hotkeys_help/ui_interact(mob/user, datum/tgui/ui)
/datum/hotkeys_help/ui_interact(mob/user, datum/tgui/managed/ui)
ui = SStgui.try_update_ui(user, src, ui)
if (!ui)
ui = new(user, src, "HotkeysHelp")
Expand Down
4 changes: 2 additions & 2 deletions code/datums/minigames_menu.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
/datum/minigames_menu/ui_state(mob/user)
return GLOB.observer_state

/datum/minigames_menu/ui_interact(mob/user, datum/tgui/ui)
/datum/minigames_menu/ui_interact(mob/user, datum/tgui/managed/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "MinigamesMenu")
ui.open()

/datum/minigames_menu/ui_act(action, params, datum/tgui/ui)
/datum/minigames_menu/ui_act(action, params, datum/tgui/managed/ui)
. = ..()
if(.)
return
Expand Down
4 changes: 2 additions & 2 deletions code/datums/spawners_menu.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/datum/spawners_menu/ui_state(mob/user)
return GLOB.observer_state

/datum/spawners_menu/ui_interact(mob/user, datum/tgui/ui)
/datum/spawners_menu/ui_interact(mob/user, datum/tgui/managed/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "SpawnersMenu")
Expand Down Expand Up @@ -46,7 +46,7 @@
data["spawners"] += list(this)
return data

/datum/spawners_menu/ui_act(action, params, datum/tgui/ui)
/datum/spawners_menu/ui_act(action, params, datum/tgui/managed/ui)
. = ..()
if(.)
return
Expand Down
2 changes: 1 addition & 1 deletion code/datums/station_alert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
QDEL_NULL(listener)
return ..()

/datum/station_alert/ui_interact(mob/user, datum/tgui/ui)
/datum/station_alert/ui_interact(mob/user, datum/tgui/managed/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "StationAlertConsole", title)
Expand Down
4 changes: 2 additions & 2 deletions code/datums/station_traits/admin_panel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

return data

/datum/station_traits_panel/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state)
/datum/station_traits_panel/ui_act(action, list/params, datum/tgui/managed/ui, datum/ui_state/state)
. = ..()
if (.)
return
Expand Down Expand Up @@ -126,7 +126,7 @@
/datum/station_traits_panel/ui_status(mob/user, datum/ui_state/state)
return check_rights_for(user.client, R_FUN) ? UI_INTERACTIVE : UI_CLOSE

/datum/station_traits_panel/ui_interact(mob/user, datum/tgui/ui)
/datum/station_traits_panel/ui_interact(mob/user, datum/tgui/managed/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "StationTraitsPanel")
Expand Down
2 changes: 1 addition & 1 deletion code/datums/wires/_wires.dm
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@
/datum/wires/ui_state(mob/user)
return GLOB.physical_state

/datum/wires/ui_interact(mob/user, datum/tgui/ui)
/datum/wires/ui_interact(mob/user, datum/tgui/managed/ui)
ui = SStgui.try_update_ui(user, src, ui)
if (!ui)
ui = new(user, src, "Wires", "[holder.name] Wires")
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/PDApainter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
stored_id_card = null
update_appearance(UPDATE_ICON)

/obj/machinery/pdapainter/ui_interact(mob/user, datum/tgui/ui)
/obj/machinery/pdapainter/ui_interact(mob/user, datum/tgui/managed/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "PaintingMachine", name)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/Sleeper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
return GLOB.notcontained_state
return GLOB.default_state

/obj/machinery/sleeper/ui_interact(mob/user, datum/tgui/ui)
/obj/machinery/sleeper/ui_interact(mob/user, datum/tgui/managed/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "Sleeper", name)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/announcement_system.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ GLOBAL_LIST_EMPTY(announcement_systems)
for(var/channel in channels)
radio.talk_into(src, message, channel)

/obj/machinery/announcement_system/ui_interact(mob/user, datum/tgui/ui)
/obj/machinery/announcement_system/ui_interact(mob/user, datum/tgui/managed/ui)
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
ui = new(user, src, "AutomatedAnnouncement")
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/atm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
authenticated_account = inserted_card.registered_account
return TRUE

/obj/machinery/atm/ui_interact(mob/user, datum/tgui/ui)
/obj/machinery/atm/ui_interact(mob/user, datum/tgui/managed/ui)
var/datum/browser/popup = new(user, "atm", name, 460, 270)
popup.set_content(jointext(get_content(), ""))
popup.open()
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/autolathe.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
QDEL_NULL(wires)
return ..()

/obj/machinery/autolathe/ui_interact(mob/user, datum/tgui/ui)
/obj/machinery/autolathe/ui_interact(mob/user, datum/tgui/managed/ui)
if(!is_operational)
return

Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/bank_machine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
radio.talk_into(src, message, radio_channel)
next_warning = world.time + minimum_time_between_warnings

/obj/machinery/computer/bank_machine/ui_interact(mob/user, datum/tgui/ui)
/obj/machinery/computer/bank_machine/ui_interact(mob/user, datum/tgui/managed/ui)
. = ..()
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ DEFINE_INTERACTABLE(/obj/machinery/computer)
if(!user.canUseTopic(src, USE_CLOSE|USE_SILICON_REACH) || !is_operational)
return

/obj/machinery/computer/ui_interact(mob/user, datum/tgui/ui)
/obj/machinery/computer/ui_interact(mob/user, datum/tgui/managed/ui)
SHOULD_CALL_PARENT(TRUE)
. = ..()
update_use_power(ACTIVE_POWER_USE)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/accounting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
circuit = /obj/item/circuitboard/computer/accounting
light_color = LIGHT_COLOR_GREEN

/obj/machinery/computer/accounting/ui_interact(mob/user, datum/tgui/ui)
/obj/machinery/computer/accounting/ui_interact(mob/user, datum/tgui/managed/ui)
. = ..()
ui = SStgui.try_update_ui(user, src, ui)
if (!ui)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/aifixer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
else
return ..()

/obj/machinery/computer/aifixer/ui_interact(mob/user, datum/tgui/ui)
/obj/machinery/computer/aifixer/ui_interact(mob/user, datum/tgui/managed/ui)
. = ..()
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/apc_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
/obj/machinery/computer/apc_control/proc/check_apc(obj/machinery/power/apc/APC)
return APC.z == z && !APC.malfhack && !APC.aidisabled && !(APC.obj_flags & EMAGGED) && !APC.machine_stat && !istype(APC.area, /area/station/ai_monitored) && !(APC.area.area_flags & NO_ALERTS)

/obj/machinery/computer/apc_control/ui_interact(mob/user, datum/tgui/ui)
/obj/machinery/computer/apc_control/ui_interact(mob/user, datum/tgui/managed/ui)
. = ..()
operator = user
ui = SStgui.try_update_ui(user, src, ui)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/arcade/orion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ GLOBAL_LIST_INIT(orion_events, generate_orion_events())
insanity_records.fields["m_stat"] = "*Unstable*"
return

/obj/machinery/computer/arcade/orion_trail/ui_interact(mob/user, datum/tgui/ui)
/obj/machinery/computer/arcade/orion_trail/ui_interact(mob/user, datum/tgui/managed/ui)
. = ..()
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/atmos_alert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
SSpackets.remove_object(src, receive_frequency)
return ..()

/obj/machinery/computer/atmos_alert/ui_interact(mob/user, datum/tgui/ui)
/obj/machinery/computer/atmos_alert/ui_interact(mob/user, datum/tgui/managed/ui)
. = ..()
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ GLOBAL_LIST_EMPTY(atmos_air_controllers)

return TRUE

/obj/machinery/computer/atmos_control/ui_interact(mob/user, datum/tgui/ui)
/obj/machinery/computer/atmos_control/ui_interact(mob/user, datum/tgui/managed/ui)
. = ..()
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/camera.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
network -= i
network += "[port.id]_[i]"

/obj/machinery/computer/security/ui_interact(mob/user, datum/tgui/ui)
/obj/machinery/computer/security/ui_interact(mob/user, datum/tgui/managed/ui)
. = ..()
// Update UI
ui = SStgui.try_update_ui(user, src, ui)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/chef_orders/chef_order.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
for(var/datum/orderable_item/item as anything in grocery_list)
. += grocery_list[item] * item.cost_per_order

/obj/machinery/computer/chef_order/ui_interact(mob/user, datum/tgui/ui)
/obj/machinery/computer/chef_order/ui_interact(mob/user, datum/tgui/managed/ui)
. = ..()
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/communications.dm
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@

return data

/obj/machinery/computer/communications/ui_interact(mob/user, datum/tgui/ui)
/obj/machinery/computer/communications/ui_interact(mob/user, datum/tgui/managed/ui)
. = ..()
ui = SStgui.try_update_ui(user, src, ui)
if (!ui)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/crew.dm
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
JOB_ASSISTANT = 999,
)

/datum/crewmonitor/ui_interact(mob/user, datum/tgui/ui)
/datum/crewmonitor/ui_interact(mob/user, datum/tgui/managed/ui)
ui = SStgui.try_update_ui(user, src, ui)
if (!ui)
ui = new(user, src, "CrewConsole")
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/dna_console.dm
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
// Set the default tgui state
set_default_state()

/obj/machinery/computer/scan_consolenew/ui_interact(mob/user, datum/tgui/ui)
/obj/machinery/computer/scan_consolenew/ui_interact(mob/user, datum/tgui/managed/ui)
. = ..()
// Most of ui_interact is spent setting variables for passing to the tgui
// interface.
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/launchpad_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
var/obj/machinery/launchpad/pad = launchpads[number]
return pad

/obj/machinery/computer/launchpad/ui_interact(mob/user, datum/tgui/ui)
/obj/machinery/computer/launchpad/ui_interact(mob/user, datum/tgui/managed/ui)
. = ..()
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
Expand Down
2 changes: 1 addition & 1 deletion code/game/machinery/computer/mechlaunchpad.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
var/obj/machinery/mechpad/pad = mechpads[number]
return pad

/obj/machinery/computer/mechpad/ui_interact(mob/user, datum/tgui/ui)
/obj/machinery/computer/mechpad/ui_interact(mob/user, datum/tgui/managed/ui)
. = ..()
ui = SStgui.try_update_ui(user, src, ui)
if(!ui)
Expand Down
Loading
Loading