From 19433e8e1b59f06738d3b1a11986027d83cce430 Mon Sep 17 00:00:00 2001 From: dj-34 Date: Sat, 27 Jan 2024 00:35:09 +0500 Subject: [PATCH] [S] Fix hivelord core exploits & dupe with ore redemption (#23949) * Fix infinite hivelord cores exploit using lazarus * Fixed resource exploit for ore redemption --- code/modules/mining/machine_redemption.dm | 4 +++- .../mob/living/simple_animal/hostile/mining/hivelord.dm | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index 746107d96a74..81faa38130b0 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -328,12 +328,14 @@ return FALSE var/stored = get_num_smeltable_alloy(D) var/desired = min(amount, stored, MAX_STACK_SIZE) + if(!desired) + return FALSE materials.use_amount(D.materials, desired) // Spawn the alloy var/result = new D.build_path(src) if(istype(result, /obj/item/stack/sheet)) var/obj/item/stack/sheet/mineral/A = result - A.amount = amount + A.amount = desired unload_mineral(A) else unload_mineral(result) diff --git a/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm b/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm index ea3714913e5c..0c674ca45282 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm @@ -30,7 +30,7 @@ retreat_distance = 3 minimum_distance = 3 pass_flags = PASSTABLE - loot = list(/obj/item/organ/internal/regenerative_core) + butcher_results = list(/obj/item/organ/internal/regenerative_core = 1) var/brood_type = /mob/living/simple_animal/hostile/asteroid/hivelordbrood /mob/living/simple_animal/hostile/asteroid/hivelord/OpenFire(the_target) @@ -172,6 +172,7 @@ throw_message = "bounces harmlessly off of" crusher_loot = /obj/item/crusher_trophy/legion_skull loot = list(/obj/item/organ/internal/regenerative_core/legion) + butcher_results = null brood_type = /mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion del_on_death = TRUE stat_attack = UNCONSCIOUS