From 496df13d308cedf4ce5f46afbc030a32decd4012 Mon Sep 17 00:00:00 2001
From: SkyratBot <59378654+SkyratBot@users.noreply.github.com>
Date: Thu, 25 Mar 2021 17:59:29 +0100
Subject: [PATCH] [MIRROR] Improves status bar coverage (#4394)
* Improves status bar coverage (#57916)
This PR makes sure all MouseEntered() procs call their parent, which handles the status bar. This fixes instances where the status bar was missing, for example when you hovered over the ghost buttons, you would not be shown a name of the button, but completely different object, like "space", which was very misleading. This also means that the new status bar should have better parity the with the old status bar, which also showed these things.
* Improves status bar coverage
Co-authored-by: Arkatos1 <43862960+Arkatos1@users.noreply.github.com>
---
code/_onclick/hud/action_button.dm | 1 +
code/_onclick/hud/alert.dm | 1 +
code/_onclick/hud/blob_overmind.dm | 5 +++--
code/_onclick/hud/families.dm | 1 +
code/_onclick/hud/ghost.dm | 3 ++-
code/_onclick/hud/screen_objects.dm | 5 +++--
code/datums/status_effects/buffs.dm | 2 +-
code/game/objects/effects/info.dm | 2 +-
8 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/code/_onclick/hud/action_button.dm b/code/_onclick/hud/action_button.dm
index 4b0ecfd25b1..192246cdcee 100644
--- a/code/_onclick/hud/action_button.dm
+++ b/code/_onclick/hud/action_button.dm
@@ -158,6 +158,7 @@
. += hidden ? show_appearance : hide_appearance
/atom/movable/screen/movable/action_button/MouseEntered(location,control,params)
+ . = ..()
if(!QDELETED(src))
openToolTip(usr,src,params,title = name,content = desc,theme = actiontooltipstyle)
diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm
index 4a7dc3109fe..885170c7547 100644
--- a/code/_onclick/hud/alert.dm
+++ b/code/_onclick/hud/alert.dm
@@ -107,6 +107,7 @@
/atom/movable/screen/alert/MouseEntered(location,control,params)
+ . = ..()
if(!QDELETED(src))
openToolTip(usr,src,params,title = name,content = desc,theme = alerttooltipstyle)
diff --git a/code/_onclick/hud/blob_overmind.dm b/code/_onclick/hud/blob_overmind.dm
index 110cabcc746..d0a15386701 100644
--- a/code/_onclick/hud/blob_overmind.dm
+++ b/code/_onclick/hud/blob_overmind.dm
@@ -3,6 +3,7 @@
icon = 'icons/hud/blob.dmi'
/atom/movable/screen/blob/MouseEntered(location,control,params)
+ . = ..()
openToolTip(usr,src,params,title = name,content = desc, theme = "blob")
/atom/movable/screen/blob/MouseExited()
@@ -42,7 +43,7 @@
else
name = initial(name)
desc = initial(desc)
- ..()
+ return ..()
/atom/movable/screen/blob/jump_to_core/Click()
if(isovermind(usr))
@@ -130,7 +131,7 @@
else
name = "[initial(name)] ([BLOB_POWER_REROLL_COST])"
desc = "Allows you to choose a new strain from [BLOB_POWER_REROLL_CHOICES] random choices for [BLOB_POWER_REROLL_COST] resources."
- ..()
+ return ..()
/atom/movable/screen/blob/readapt_strain/Click()
if(isovermind(usr))
diff --git a/code/_onclick/hud/families.dm b/code/_onclick/hud/families.dm
index 1183a82b096..e5e8cab9fd8 100644
--- a/code/_onclick/hud/families.dm
+++ b/code/_onclick/hud/families.dm
@@ -18,6 +18,7 @@
update_appearance()
/atom/movable/screen/wanted/MouseEntered(location,control,params)
+ . = ..()
openToolTip(usr,src,params,title = name,content = desc, theme = "alerttooltipstyle")
/atom/movable/screen/wanted/MouseExited()
diff --git a/code/_onclick/hud/ghost.dm b/code/_onclick/hud/ghost.dm
index 16db4684642..e506cf059a2 100644
--- a/code/_onclick/hud/ghost.dm
+++ b/code/_onclick/hud/ghost.dm
@@ -1,7 +1,8 @@
/atom/movable/screen/ghost
icon = 'icons/hud/screen_ghost.dmi'
-/atom/movable/screen/ghost/MouseEntered()
+/atom/movable/screen/ghost/MouseEntered(location, control, params)
+ . = ..()
flick(icon_state + "_anim", src)
/atom/movable/screen/ghost/spawners_menu
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 7ac15e1baa2..354b0b9356e 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -149,8 +149,8 @@
usr.update_inv_hands()
return TRUE
-/atom/movable/screen/inventory/MouseEntered()
- ..()
+/atom/movable/screen/inventory/MouseEntered(location, control, params)
+ . = ..()
add_overlays()
/atom/movable/screen/inventory/MouseExited()
@@ -500,6 +500,7 @@
return set_selected_zone(choice, usr)
/atom/movable/screen/zone_sel/MouseEntered(location, control, params)
+ . = ..()
MouseMove(location, control, params)
/atom/movable/screen/zone_sel/MouseMove(location, control, params)
diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm
index 75fb7f837a8..90f77167d4d 100644
--- a/code/datums/status_effects/buffs.dm
+++ b/code/datums/status_effects/buffs.dm
@@ -19,7 +19,7 @@
desc += "
Current Bloodthirst: [HG.bloodlust]\
Becomes undroppable at [HIS_GRACE_FAMISHED]\
Will consume you at [HIS_GRACE_CONSUME_OWNER]"
- ..()
+ return ..()
/datum/status_effect/his_grace/on_apply()
owner.log_message("gained His Grace's stun immunity", LOG_ATTACK)
diff --git a/code/game/objects/effects/info.dm b/code/game/objects/effects/info.dm
index 23f341c8a3c..adf609d50c2 100644
--- a/code/game/objects/effects/info.dm
+++ b/code/game/objects/effects/info.dm
@@ -17,7 +17,7 @@
. = ..()
to_chat(usr, info_text)
-/obj/effect/abstract/info/MouseEntered()
+/obj/effect/abstract/info/MouseEntered(location, control, params)
. = ..()
icon_state = "info_hovered"