Skip to content

Commit

Permalink
Renaming obj/var for mob modifiers HUD holder
Browse files Browse the repository at this point in the history
  • Loading branch information
MistakeNot4892 committed Feb 8, 2025
1 parent b13bfa5 commit 541240e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion code/_onclick/hud/hud_elements/hud_auxilliary.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
elem_type = /obj/screen/default_attack_selector

/decl/hud_element/modifiers
elem_type = /obj/screen/mob_modifier_master
elem_type = /obj/screen/mob_modifiers

/decl/hud_element/stamina
elem_type = /obj/screen/stamina
Expand Down
24 changes: 12 additions & 12 deletions code/_onclick/hud/screen/screen_mob_modifier.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/obj/screen/mob_modifier_master
/obj/screen/mob_modifiers
screen_loc = "CENTER,TOP"
icon_state = "blank"
requires_ui_style = FALSE
Expand All @@ -11,16 +11,16 @@
var/list/elements
var/static/modifier_size = (world.icon_size + 2)

/obj/screen/mob_modifier_master/Initialize(mapload, mob/_owner, decl/ui_style/ui_style, ui_color, ui_alpha, ui_cat)
/obj/screen/mob_modifiers/Initialize(mapload, mob/_owner, decl/ui_style/ui_style, ui_color, ui_alpha, ui_cat)
. = ..()
START_PROCESSING(SSprocessing, src)

/obj/screen/mob_modifier_master/Destroy()
/obj/screen/mob_modifiers/Destroy()
STOP_PROCESSING(SSprocessing, src)
QDEL_NULL_LIST(elements)
return ..()

/obj/screen/mob_modifier_master/Process()
/obj/screen/mob_modifiers/Process()
if(QDELETED(src))
return PROCESS_KILL
var/mob/living/owner = owner_ref?.resolve()
Expand All @@ -36,7 +36,7 @@
if(istype(element))
element.update_maptext(expire_time == MOB_MODIFIER_INDEFINITE ? MOB_MODIFIER_INDEFINITE : (expire_time - world.time))

/obj/screen/mob_modifier_master/on_update_icon()
/obj/screen/mob_modifiers/on_update_icon()

if(QDELETED(src))
return
Expand Down Expand Up @@ -69,7 +69,7 @@
continue
var/obj/screen/mob_modifier/element = new(null, owner, ui_style, ui_color, ui_alpha, HUD_MODIFIERS)
element.archetype = archetype
element.master = src
element.holder = src
element.pixel_y = 32
element.alpha = 0
element.update_icon()
Expand Down Expand Up @@ -98,17 +98,17 @@

/obj/screen/mob_modifier
alpha = 0
screen_loc = null // not handled via screen loc, but via vis contents of the master object.
screen_loc = null // not handled via screen loc, but via vis contents of the holder object.
maptext_y = -3
icon_state = "modifier_base"
var/decl/mob_modifier/archetype
var/obj/screen/mob_modifier_master/master
var/obj/screen/mob_modifiers/holder

/obj/screen/mob_modifier/Destroy()
if(master)
LAZYREMOVE(master.elements, src)
master.remove_vis_contents(src)
master = null
if(holder)
LAZYREMOVE(holder.elements, src)
holder.remove_vis_contents(src)
holder = null
return ..()

/obj/screen/mob_modifier/rebuild_screen_overlays()
Expand Down

0 comments on commit 541240e

Please sign in to comment.