From 4e14d06748a823641e104f1000dab83414f5d80b Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Fri, 6 Nov 2020 01:43:15 +0100 Subject: [PATCH] [MIRROR] Fixes infective nanite programs not syncing cloud id (#1576) * Fixes infective nanite programs not syncing cloud id (#54793) ## About The Pull Request I have always meant to have infective programs copy over every property of the infector nanites, and i've only recently noticed from some log diving that this wasn't the case, and cloud IDs were defaulting to 0 (unsynced). I probably never updated it since i made cloud nanites the default, assuming that the AddComponent handled it on its own. Since an unsynced cloud ID causes constant software errors, this makes the infective programs much less useful than they're meant to be. **Note: I'd also love to make the infectee's cloud ID a customizable parameter to allow for a wider range of possible uses, but avoided doing so to not violate the feature freeze. I'd gladly add that part if a maintainer gives the ok.** ## Why It's Good For The Game Makes Viral Replica not obligatory for anyone who wants to use a spreading nanite program. Without it, the cloud IDs of infectees are defaulted to 0, causing degenerative software errors due to lack of cloud sync, which are likely to ruin any gimmick that involves infecting unsuspecting victims. * Fixes infective nanite programs not syncing cloud id Co-authored-by: XDTM --- code/modules/research/nanites/nanite_programs/utility.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/research/nanites/nanite_programs/utility.dm b/code/modules/research/nanites/nanite_programs/utility.dm index d1bc6f176d2..2d305c56905 100644 --- a/code/modules/research/nanites/nanite_programs/utility.dm +++ b/code/modules/research/nanites/nanite_programs/utility.dm @@ -258,6 +258,7 @@ //this will potentially take over existing nanites! infectee.AddComponent(/datum/component/nanites, 10) SEND_SIGNAL(infectee, COMSIG_NANITE_SYNC, nanites) + SEND_SIGNAL(infectee, COMSIG_NANITE_SET_CLOUD, nanites.cloud_id) infectee.investigate_log("was infected by spreading nanites by [key_name(host_mob)] at [AREACOORD(infectee)].", INVESTIGATE_NANITES) /datum/nanite_program/nanite_sting @@ -282,6 +283,7 @@ //unlike with Infective Exo-Locomotion, this can't take over existing nanites, because Nanite Sting only targets non-hosts. infectee.AddComponent(/datum/component/nanites, 5) SEND_SIGNAL(infectee, COMSIG_NANITE_SYNC, nanites) + SEND_SIGNAL(infectee, COMSIG_NANITE_SET_CLOUD, nanites.cloud_id) infectee.investigate_log("was infected by a nanite cluster by [key_name(host_mob)] at [AREACOORD(infectee)].", INVESTIGATE_NANITES) to_chat(infectee, "You feel a tiny prick.")