Files
Bubberstation/code/modules/mob
SkyratBot 5c239e10ef [MIRROR] Malf AI Zeroth Law Fix [MDB IGNORE] (#24959)
* Malf AI Zeroth Law Fix (#79604)

## About The Pull Request

This one is a little bit complicated, and needs some background on how
silicon laws work for synced borgs. Generally speaking, a synced borg's
laws should always be equivalent to the laws of the AI they're synced
to. Unsyncing a borg does not in and of itself change a borgs laws. If
an AI has the reporter lawsuit + 3 freeform laws, and you unsync a borg
from that AI, the borg will still have reporter + 3 freeform laws for
its own laws.

This applies even to the zeroth law that borgs get due to being synced
to a malf AI. Currently, a borg will retain this law even if it is
unsynced from the malf AI. However, there's an issue with this. Per a
[recent policy
thread](https://tgstation13.org/phpBB/viewtopic.php?f=33&t=35128), borgs
that have been unsynced from a malf AI are no longer antagonists, even
though the malf law 0 currently remains. This is very confusing and
likely to lead to bans due to players mistakenly believing themselves to
still be antagonists. To rectify this, this PR just makes the zeroth law
get automatically removed when a borg is unsynced from a malf AI. I
tested this extensively to ensure that it should not affect the emag law
0 or the onehuman law board.

I also improved and fixed the feedback when attempting and failing to
apply a law board directly to a cyborg. Previously, the feedback was
both broken (it attempted to play an emote that doesn't exist) and the
feedback was the same for both emagged borgs and borgs that were already
synced to an AI. Based on the comments, this was intended to prevent
"metagaming." However, this was pretty much unnecessary. Simply
unlocking a borg's panel will already tell you if it's been emagged or
not, and if you have a borg's panel open to apply law boards directly,
then you can easily just check the wires and see for yourself whether
the borg is actually synced or not. Now the feedback actually works and
is different for synced and emagged borgs.
## Why It's Good For The Game

For the zeroth law fix, players should not be at risk of being misled by
their own laws. If borgs unsynced from a malf AI are not supposed to be
antagonists, then they should not have a law 0 that only antagonists
have.

Regarding the law board tweak, the old code was nonfunctional in every
way. The code didn't give feedback properly, and obfuscating the
feedback was totally unnecessary, as there are far easier ways to tell
if a borg has been emagged than by trying to upload laws to it. I
checked blame out of curiosity, and the old code is literally 9 years
old.
## Changelog
🆑
qol: Fixed/improved feedback when failing to apply a direct law change
to a cyborg.
fix: Borgs who are unsynced from a malf AI now lose the zeroth law as
intended.
/🆑

* Malf AI Zeroth Law Fix

---------

Co-authored-by: GPeckman <21979502+GPeckman@users.noreply.github.com>
2023-11-13 06:13:13 -05:00
..