consuming a red pill will now eject you from the Matrix (#79533)

## About The Pull Request

If your bitrunning avatar somehow acquires and consumes a red pill, they
will be disconnected from the Matrix.

Note that this, like the 5% chance to receive a red pill message, only
happens with pills with the fully red pill sprite (pill4). As far as I'm
aware, only custom pills dispensed from a ChemMaster can have this
sprite.

## Why It's Good For The Game

hehe funny reference

proof of testing:

![image](https://github.com/tgstation/tgstation/assets/42606352/8be936cb-ad98-4808-92aa-5445199524df)

I also tested consuming normal and red pills in the non-bitrunning world
to ensure that they still transfer chems, that red pill messages still
work, and that they don't break anything.

## Changelog

🆑 ATHATH
add: If your bitrunning avatar somehow acquires and consumes a red pill,
they will be disconnected from the Matrix.
/🆑
This commit is contained in:
ATH1909
2023-12-14 18:24:17 +01:00
committed by GitHub
parent fccb061d17
commit fe51ce7f66
3 changed files with 12 additions and 6 deletions
@@ -82,7 +82,7 @@
* - Mailed in a cache
* - Click / Stand on the ladder
*/
RegisterSignals(parent, list(COMSIG_BITRUNNER_ALERT_SEVER, COMSIG_BITRUNNER_CACHE_SEVER, COMSIG_BITRUNNER_LADDER_SEVER), PROC_REF(on_safe_disconnect))
RegisterSignals(parent, list(COMSIG_BITRUNNER_ALERT_SEVER, COMSIG_BITRUNNER_CACHE_SEVER, COMSIG_BITRUNNER_LADDER_SEVER, COMSIG_BITRUNNER_RED_PILL_SEVER), PROC_REF(on_safe_disconnect))
RegisterSignal(parent, COMSIG_LIVING_DEATH, PROC_REF(on_sever_connection))
RegisterSignal(parent, COMSIG_MOB_APPLY_DAMAGE, PROC_REF(on_linked_damage))
@@ -91,6 +91,7 @@
UnregisterSignal(parent, COMSIG_BITRUNNER_ALERT_SEVER)
UnregisterSignal(parent, COMSIG_BITRUNNER_CACHE_SEVER)
UnregisterSignal(parent, COMSIG_BITRUNNER_LADDER_SEVER)
UnregisterSignal(parent, COMSIG_BITRUNNER_RED_PILL_SEVER)
UnregisterSignal(parent, COMSIG_LIVING_DEATH)
UnregisterSignal(parent, COMSIG_MOB_APPLY_DAMAGE)