Skip to content

Commit

Permalink
port dump_harddel_info impls from tg
Browse files Browse the repository at this point in the history
  • Loading branch information
Absolucy committed Jan 27, 2025
1 parent 5863c5b commit 909d8af
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions code/datums/datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -431,3 +431,10 @@
/// Can be called more then once per object, use harddel_deets_dumped to avoid duplicate calls (I am so sorry)
/datum/proc/dump_harddel_info()
return

///images are pretty generic, this should help a bit with tracking harddels related to them
/image/dump_harddel_info()
if(harddel_deets_dumped)
return
harddel_deets_dumped = TRUE
return "Image icon: [icon] - icon_state: [icon_state] [loc ? "loc: [loc] ([loc.x],[loc.y],[loc.z])" : ""]"
10 changes: 10 additions & 0 deletions code/datums/progressbar.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
var/last_progress = 0
///Variable to ensure smooth visual stacking on multiple progress bars.
var/listindex = 0
///The type of our last value for bar_loc, for debugging
var/location_type
///border image
var/image/border
///shown image
Expand Down Expand Up @@ -49,6 +51,7 @@
qdel(src)
return
goal = goal_number
src.location_type = target.type
src.old_format = old_format
src.active_color = active_color
src.fail_color = fail_color
Expand Down Expand Up @@ -211,6 +214,13 @@
animate(border_look_accessory, alpha = 0, time = PROGRESSBAR_ANIMATION_TIME)
QDEL_IN(border_look_accessory, PROGRESSBAR_ANIMATION_TIME * 2) //for garbage collection safety

///Progress bars are very generic, and what hangs a ref to them depends heavily on the context in which they're used
///So let's make hunting harddels easier yeah?
/datum/progressbar/dump_harddel_info()
if(harddel_deets_dumped)
return
harddel_deets_dumped = TRUE
return "Owner's type: [location_type]"

/obj/effect/world_progressbar
///The progress bar visual element.
Expand Down
6 changes: 6 additions & 0 deletions code/modules/mob/living/carbon/human/_species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1929,6 +1929,12 @@ GLOBAL_LIST_EMPTY(features_by_species)
var/obj/item/bodypart/head/fake_head = bodypart_overrides[BODY_ZONE_HEAD]
return (initial(fake_head.head_flags) & check_flags)

/datum/species/dump_harddel_info()
if(harddel_deets_dumped)
return
harddel_deets_dumped = TRUE
return "Gained / Owned: [properly_gained ? "Yes" : "No"]"

/datum/species/proc/spec_revival(mob/living/carbon/human/H)
return

Expand Down

0 comments on commit 909d8af

Please sign in to comment.