From 0111d3ca1edb67268ecde1d7179b8bb0ed8dee69 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 28 Nov 2022 00:17:49 +0100 Subject: [PATCH] [MIRROR] Fixes grilles dropping a stack of 0 iron rods [MDB IGNORE] (#17778) * Fixes grilles dropping a stack of 0 iron rods (#71501) ## About The Pull Request Fixes a bug where grilles drop a stack of 0 iron rods on partial destruction. They now drop one iron rod. Also removes a variable called rods_broken which is useless. ## Why It's Good For The Game The stack of 0 rods acts the same as a normal iron rod except its icon is invisible, meaning it can be snuck past security, this is bad and could be used for cheese. It also meant grilles dropped less iron rods than it takes to build a grille, which makes no sense. Fixes #71203 ## Changelog :cl: fix: fixes grilles dropping stack of 0 iron rods /:cl: Co-authored-by: tattle <66640614+dragomagol@ users.noreply.github.com> Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com> * Fixes grilles dropping a stack of 0 iron rods Co-authored-by: supergrog2 <118997813+supergrog2@users.noreply.github.com> Co-authored-by: tattle <66640614+dragomagol@ users.noreply.github.com> Co-authored-by: Fikou <23585223+Fikou@ users.noreply.github.com> --- code/game/objects/structures/grille.dm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 75cbf25de93..b75869659ee 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -17,7 +17,6 @@ integrity_failure = 0.4 var/rods_type = /obj/item/stack/rods var/rods_amount = 2 - var/rods_broken = TRUE /obj/structure/grille/Initialize(mapload) . = ..() @@ -284,9 +283,8 @@ atom_integrity = 20 broken = TRUE rods_amount = 1 - rods_broken = FALSE - var/obj/R = new rods_type(drop_location(), rods_broken) - transfer_fingerprints_to(R) + var/obj/item/dropped_rods = new rods_type(drop_location(), rods_amount) + transfer_fingerprints_to(dropped_rods) /obj/structure/grille/proc/repair_grille() if(broken) @@ -295,7 +293,6 @@ atom_integrity = max_integrity broken = FALSE rods_amount = 2 - rods_broken = TRUE return TRUE return FALSE @@ -348,7 +345,6 @@ density = FALSE broken = TRUE rods_amount = 1 - rods_broken = FALSE /obj/structure/grille/broken/Initialize(mapload) . = ..()