[MIRROR] Fixup list helpers, remove listoflist footgun from generic list procs, remove duplicated procs. [MDB IGNORE] (#17749)

* Fixup list helpers, remove listoflist footgun from generic list procs, remove duplicated procs. (#71280)

Add helper defines for handling list values in lists to remove the
footgun where `+=` and `-=` with lists as the Right hand side argument
causes the list contents to be added or removed, not the list itself.

Use said helpers to remove the footgun from list helpers that could
reasonably be expected to get called on list of lists.

Remove duplicated clear nulls from list proc. this pr will fail to
compile until i go move those over to the preexisting one, but the
compile errors will tell me where all the consumers are.

This likely fixes some bug(s) in the issue tracker, but we don't know
what they are.

* Fixup list helpers, remove listoflist footgun from generic list procs, remove duplicated procs.

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
This commit is contained in:
SkyratBot
2022-11-25 16:01:04 +01:00
committed by GitHub
parent 6b96d259ce
commit 7bb8ecb768
4 changed files with 17 additions and 15 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
victim_hiddenprints = list()
var/list/hiddenprints = flatten_list(victim_hiddenprints)
remove_nulls_from_list(hiddenprints)
list_clear_nulls(hiddenprints)
if(!length(hiddenprints))
hiddenprints = list("Nobody has touched this yet!")