Skip to content

QDEL define for area text#1073

Open
FalloutFalcon wants to merge 1 commit into
DarkPack13:masterfrom
FalloutFalcon:fix-area-harddel
Open

QDEL define for area text#1073
FalloutFalcon wants to merge 1 commit into
DarkPack13:masterfrom
FalloutFalcon:fix-area-harddel

Conversation

@FalloutFalcon
Copy link
Copy Markdown
Member

@FalloutFalcon FalloutFalcon commented May 19, 2026

About The Pull Request

like 50% sure this will fix a reported harddel as well as make the code nicer.

Changelog

🆑
code: Swap callback for a define (which still calls a callback) for area text
/:cl:

@FalloutFalcon FalloutFalcon requested a review from a team as a code owner May 19, 2026 14:42
@chazzyjazzy
Copy link
Copy Markdown
Contributor

we actually recently removed the qdels from area texts on TFN writ large so that the deletion subsystem doesnt get overloaded with a huge destroy cost

// AREAS
/mob/living/update_ambience_area(area/new_area)
	. = ..()
	if(!client)
		return
	if(!new_area.show_area_name)
		return
	if(last_shown_area_name == new_area.name)
		return
	last_shown_area_name = new_area.name
	var/atom/movable/screen/area_text/T = locate() in client.screen
	if(!T)
		T = new()
		client.screen += T
	deltimer(T.timer_id)
	T.maptext = MAPTEXT({"<span style='font-size: 200%; text-shadow: 1px 1px 2px black, 0 0 1em black, 0 0 0.2em black; display: block; text-align: center;'>[new_area.name]</span>"})
	animate(T, alpha = 255, time = 1 SECONDS, easing = EASE_IN)
	T.timer_id = addtimer(CALLBACK(src, PROC_REF(clear_area_text), T), 4 SECONDS, TIMER_STOPPABLE | TIMER_DELETE_ME)

// this shouldnt be here since its not an override or a subtype of a /tg/ proc (like above) but since it's called right there i figured i'd keep things together.
/mob/living/proc/clear_area_text(atom/movable/screen/area_text/A)
	if(!A)
		return
	if(!client)
		return
	animate(A, alpha = 0, time = 1 SECONDS, easing = EASE_OUT)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants