[MIRROR] Fixes the null law check for the law panel not working adds an alert for non-observers using it [MDB IGNORE] (#19767)

* Fixes the `null` law check for the law panel not working adds an alert for non-observers using it (#73859)

## About The Pull Request

- The `null` law check for the law panel existed in the UI side, but on
the dm side it didn't pass it as null correctly. Fixes that

- Adds a message admins for non-observers using the panel, a la Check
Antagonists. Just to be safe

## Changelog

Nothing player facing

* Fixes the `null` law check for the law panel not working adds an alert for non-observers using it

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-03-11 01:42:17 +00:00
committed by GitHub
co-authored by MrMelbert Gandalf
parent ed2b280720
commit 18af69f81d
2 changed files with 16 additions and 6 deletions
+7 -1
View File
@@ -4,6 +4,8 @@
if(!check_rights(R_ADMIN))
return
if(!isobserver(usr) && SSticker.HasRoundStarted())
message_admins("[key_name_admin(usr)] checked AI laws via the Law Panel.")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Law Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
var/datum/law_panel/tgui = new()
@@ -283,7 +285,11 @@
borg_information["ref"] = REF(borgo)
var/datum/ai_laws/lawset = borgo.laws
if(!isnull(lawset))
if(isnull(lawset))
// Whoopsie something wrong wrong this isn't supposed to happen
borg_information["laws"] = null
else
var/list/borg_laws = list()
// zeroth law on top
if(lawset.zeroth || lawset.zeroth_borg)