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)

@github-actions
Copy link
Copy Markdown
Contributor

This PR has been inactive for long enough to be automatically marked as stale. This means it is at risk of being auto closed in ~7 days. Please address any outstanding review items and ensure your PR is finished - if both are true, and you have auto-staled anyway, you need to actively ask maintainers (by pinging them in the /tg/station Discord) to (re)review or merge your PR. If no maintainer responds to your request, you may wish to close this PR yourself while you seek maintainer comment, as you will later be able to reopen the PR yourself.

@github-actions github-actions Bot added the Stale label May 30, 2026
@chazzyjazzy chazzyjazzy removed the Stale label May 31, 2026
FalloutFalcon pushed a commit that referenced this pull request Jun 1, 2026
## About The Pull Request

#1073 alternative which removes the use of the deletion subsystem
entirely cutting out the concern for deletion cost

just invisible-izes the text instead of deleting

also adds some music

## Why It's Good For The Game

pretty essential fix to reduce lag

## Changelog

:cl:

code: removes hard deletes on area texts by cutting out the qdeletion
method for making the text disappear, just setting the text to be
invisible instead

/:cl:
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