From e8d89bf03470d231cd08d3194f7e8c0c1810cb15 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 2 Feb 2023 17:15:59 +0100 Subject: [PATCH] [MIRROR] [WEBEDIT INCOMING]Allows any atom that is not an effect to increase supermatter matter power on consumption. [MDB IGNORE] (#19109) * [WEBEDIT INCOMING]Allows any atom that is not an effect to increase supermatter matter power on consumption. (#73029) If the consumed_object does not pass the isitem check, then it increases the matter_increase by half of consumed_object.max_integrity, capped at 1000. # WEBEDIT INFORMATION This is indeed a webedit, but I tested the changes on local. ## About The Pull Request If the atom is not an item, the matter power increase will be half of the object's max integrity, up to a maximum of 1GeV (in case some object has an absurd amount of integrity). ## Why It's Good For The Game When a physical object gets consumed by the supermatter, people expect it to do what it does for items, to give it trickled power over time. It's confusing when it doesn't increase the power. ## Changelog :cl: fix: Objects that are not items can increase supermatter power on consumption. /:cl: * [WEBEDIT INCOMING]Allows any atom that is not an effect to increase supermatter matter power on consumption. --------- Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com> --- code/datums/components/supermatter_crystal.dm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/code/datums/components/supermatter_crystal.dm b/code/datums/components/supermatter_crystal.dm index abee150b087..f9902058319 100644 --- a/code/datums/components/supermatter_crystal.dm +++ b/code/datums/components/supermatter_crystal.dm @@ -259,10 +259,13 @@ message_admins("[atom_source] has consumed [consumed_object], [suspicion] [ADMIN_JMP(atom_source)].") atom_source.investigate_log("has consumed [consumed_object] - [suspicion].", INVESTIGATE_ENGINE) qdel(consumed_object) - if(!iseffect(consumed_object) && isitem(consumed_object)) - var/obj/item/consumed_item = consumed_object - object_size = consumed_item.w_class - matter_increase += 70 * object_size + if(!iseffect(consumed_object) && !isliving(consumed_object)) + if(isitem(consumed_object)) + var/obj/item/consumed_item = consumed_object + object_size = consumed_item.w_class + matter_increase += 70 * object_size + else + matter_increase += min(0.5 * consumed_object.max_integrity, 1000) //Some poor sod got eaten, go ahead and irradiate people nearby. radiation_pulse(atom_source, max_range = 6, threshold = 1.2 / max(object_size, 1), chance = 10 * object_size)