Bitrunners can't leave domains while glitches remain in them (#96171)

## About The Pull Request

When bitrunners attempt to leave their domain via the ladder, they will
fail if there is an active, living bitrunning glitch antagonist within
the domain. Other methods of leaving such as death or taking the red
pill are unaffected.

they can also leave if the crate's delivered

sorta a sister PR to #95934

## Why It's Good For The Game

enter domain -> get alert about bitrunning glitch -> leave -> turn off
domain
What a fun gameplay loop, for everyone involved.
You'll fight the glitch and you'll like it. (liking it
[pending](https://github.com/tgstation/tgstation/pull/96138))

You can still leave if you REALLY, REALLY need to at the cost of a
little brain damage, but otherwise the literal only obstacle that will
ever be in your path should be something you have to engage with.

## Changelog
🆑

balance: Bitrunners can't back out of domains via the ladder while
bitrunning glitches remain in them

/🆑
This commit is contained in:
Leland Kemble
2026-06-01 16:23:46 -04:00
committed by GitHub
parent 30ebfa780a
commit dec8c784f6
4 changed files with 13 additions and 0 deletions
@@ -64,6 +64,14 @@
if(isnull(user.mind))
return
var/obj/machinery/quantum_server/our_server = server_ref.resolve()
if(!our_server.domain_complete)
for(var/datum/weakref/ghostrole_weakref as anything in our_server.spawned_threat_refs)
var/mob/living/ghostrole = ghostrole_weakref.resolve()
if(ghostrole?.stat == CONSCIOUS && ghostrole.client && ghostrole.mind.has_antag_datum(/datum/antagonist/bitrunning_glitch))
to_chat(user, span_danger("A being in the simulation is preventing your retreat. You must either complete your mission or remove the obstacle before safe exit will be possible."))
return
if(!HAS_TRAIT(user, TRAIT_TEMPORARY_BODY))
balloon_alert(user, "no connection detected")
return