mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 12:35:33 +01:00
[MIRROR] Fix forensic component inheritance inserting null entries into lists and causing to_chat errors. (#6630)
* Fix forensic component inheritance inserting null entries into lists and causing to_chat errors. (#59873) Fixing the following runtime: [17:13:04] Runtime in to_chat.dm,88: Empty or null string in to_chat proc call. proc name: to chat (/proc/to_chat) usr: Cowboy_penis_monster/(Zackary Mason) usr.loc: (Telecomms Control Room (105,89,2)) src: null call stack: to chat(Zackary Mason (/mob/living/carbon/human), "", null, "", 0, 1, 1, 0) the forensic scanner (/obj/item/detective_scanner): add log("", 1) the forensic scanner (/obj/item/detective_scanner): scan(Control Room (/obj/machinery/door/airlock/command/glass), Zackary Mason (/mob/living/carbon/human)) Forensic scanner attempting to add "" to the logs, which eventually gets output to_chat. Tracked error down to forensic component lazylists and the fun of trying to OR two lazylists together. * Fix forensic component inheritance inserting null entries into lists and causing to_chat errors. Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
This commit is contained in:
@@ -7,10 +7,10 @@
|
||||
var/list/fibers //assoc print = print
|
||||
|
||||
/datum/component/forensics/InheritComponent(datum/component/forensics/F, original) //Use of | and |= being different here is INTENTIONAL.
|
||||
fingerprints = fingerprints | F.fingerprints
|
||||
hiddenprints = hiddenprints | F.hiddenprints
|
||||
blood_DNA = blood_DNA | F.blood_DNA
|
||||
fibers = fibers | F.fibers
|
||||
fingerprints = LAZY_LISTS_OR(fingerprints, F.fingerprints)
|
||||
hiddenprints = LAZY_LISTS_OR(hiddenprints, F.hiddenprints)
|
||||
blood_DNA = LAZY_LISTS_OR(blood_DNA, F.blood_DNA)
|
||||
fibers = LAZY_LISTS_OR(fibers, F.fibers)
|
||||
check_blood()
|
||||
return ..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user