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

[MIRROR] [MODULAR] Fixes borg temp ftext overlay + popout window #1531

Merged
merged 1 commit into from
Jan 14, 2024
Merged
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
6 changes: 6 additions & 0 deletions modular_nova/modules/borgs/code/update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
add_overlay("[model.cyborg_base_icon]_cl")
update_altborg_icons()

if(combat_indicator)
add_overlay(GLOB.combat_indicator_overlay)

if(temporary_flavor_text)
add_overlay(GLOB.temporary_flavor_text_indicator)

/mob/living/silicon/robot/proc/update_altborg_icons()
var/extra_overlay
for(var/i in held_items)
Expand Down
13 changes: 8 additions & 5 deletions modular_nova/modules/customization/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
/mob/living/Topic(href, href_list)
. = ..()
if(href_list["temporary_flavor"])
if(temporary_flavor_text)
var/datum/browser/popup = new(usr, "[name]'s temporary flavor text", "[name]'s Temporary Flavor Text", 500, 200)
popup.set_content(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", "[name]'s temporary flavor text", replacetext(temporary_flavor_text, "\n", "<BR>")))
popup.open()
return
show_temp_ftext(usr)

/mob/living/proc/show_temp_ftext(mob/user)
if(temporary_flavor_text)
var/datum/browser/popup = new(user, "[name]'s temporary flavor text", "[name]'s Temporary Flavor Text", 500, 200)
popup.set_content(text("<HTML><HEAD><TITLE>[]</TITLE></HEAD><BODY><TT>[]</TT></BODY></HTML>", "[name]'s temporary flavor text", replacetext(temporary_flavor_text, "\n", "<BR>")))
popup.open()
return
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
if(href_list["lookup_info"] == "open_examine_panel")
examine_panel.holder = src
examine_panel.ui_interact(usr) //datum has a tgui component, here we open the window
if(href_list["temporary_flavor"]) // we need this here because tg code doesnt call parent in /mob/living/silicon/Topic()
show_temp_ftext(usr)
5 changes: 0 additions & 5 deletions modular_nova/modules/indicators/code/combat_indicator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ GLOBAL_VAR_INIT(combat_indicator_overlay, GenerateCombatOverlay())
if(combat_indicator)
. += GLOB.combat_indicator_overlay

/mob/living/silicon/robot/update_icons()
. = ..()
if(combat_indicator)
add_overlay(GLOB.combat_indicator_overlay)

/obj/vehicle/sealed/update_overlays()
. = ..()
if(combat_indicator_vehicle)
Expand Down
Loading