From 7e5513d8b0b213616d42755c6bafe88be3d26ff2 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 17 Dec 2022 04:40:04 +0100 Subject: [PATCH] [MIRROR] Fixes FRAME cartridges [MDB IGNORE] (#18072) * Fixes FRAME cartridges (#71875) ## About The Pull Request The NTmessenger has been passing along itself to the send_virus proc instead of the computer it is running on, which has caused runtimes, due to computer programs not having certain variables. In addition, the send_virus override for the frame cartrdige was missing an argument. Lastly, the uplink code has not been actually assigned to the uplink, so once it has been closed, it stayed closed. These have been fixed. I have checked the other viruses, they seem to be working even after my changes. ## Why It's Good For The Game Fixes #71843 You can once again frame people, and maybe, tempt them. ## Changelog :cl: fix: F.R.A.M.E. cartridges work again /:cl: * Fixes FRAME cartridges Co-authored-by: Profakos --- .../modular_computers/computers/item/disks/virus_disk.dm | 7 ++++--- .../modular_computers/file_system/programs/ntmessenger.dm | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/code/modules/modular_computers/computers/item/disks/virus_disk.dm b/code/modules/modular_computers/computers/item/disks/virus_disk.dm index 7416a13348e..7a38f1dc8e1 100644 --- a/code/modules/modular_computers/computers/item/disks/virus_disk.dm +++ b/code/modules/modular_computers/computers/item/disks/virus_disk.dm @@ -120,14 +120,14 @@ telecrystal_stack.use(telecrystal_stack.amount) -/obj/item/computer_disk/virus/frame/send_virus(obj/item/modular_computer/pda/target, mob/living/user) +/obj/item/computer_disk/virus/frame/send_virus(obj/item/modular_computer/pda/source, obj/item/modular_computer/pda/target, mob/living/user) . = ..() if(!.) return FALSE charges-- - var/lock_code = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]" - to_chat(user, span_notice("Success! The unlock code to the target is: [lock_code]")) + var/unlock_code = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]" + to_chat(user, span_notice("Success! The unlock code to the target is: [unlock_code]")) var/datum/component/uplink/hidden_uplink = target.GetComponent(/datum/component/uplink) if(!hidden_uplink) var/datum/mind/target_mind @@ -144,6 +144,7 @@ else target_mind = pick(backup_players) hidden_uplink = target.AddComponent(/datum/component/uplink, target_mind, enabled = TRUE, starting_tc = telecrystals, has_progression = TRUE) + hidden_uplink.unlock_code = unlock_code hidden_uplink.uplink_handler.has_objectives = TRUE hidden_uplink.uplink_handler.owner = target_mind hidden_uplink.uplink_handler.can_take_objectives = FALSE diff --git a/code/modules/modular_computers/file_system/programs/ntmessenger.dm b/code/modules/modular_computers/file_system/programs/ntmessenger.dm index 7414825de84..b4f9fddcfbe 100644 --- a/code/modules/modular_computers/file_system/programs/ntmessenger.dm +++ b/code/modules/modular_computers/file_system/programs/ntmessenger.dm @@ -180,7 +180,7 @@ if(sending_virus) var/obj/item/computer_disk/virus/disk = computer.inserted_disk if(istype(disk)) - disk.send_virus(src, target, usr) + disk.send_virus(computer, target, usr) return UI_UPDATE send_message(usr, list(target))