From b0e34a4edb3595e8dbd9375b62c27c6ee09f7740 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sun, 4 Apr 2021 03:04:18 +0700 Subject: [PATCH] Remove TODO about certain code duplication This is about code that looks through player's inventory for items of a particular classes and similar code being used in several other places. While `AcediaCore` now comes with an API method that does precisely that, the algorithm itself is idiomatic enough to not be bothered with it being rewritten in sevral different places and trying to replace every such piece of code simply for getting rid of code duplication can lead to introduction of new bugs with little to no actual benefit to maintability. --- sources/FixAmmoSelling/MutatorListener_FixAmmoSelling.uc | 1 - 1 file changed, 1 deletion(-) diff --git a/sources/FixAmmoSelling/MutatorListener_FixAmmoSelling.uc b/sources/FixAmmoSelling/MutatorListener_FixAmmoSelling.uc index 91d1165..0c7a528 100644 --- a/sources/FixAmmoSelling/MutatorListener_FixAmmoSelling.uc +++ b/sources/FixAmmoSelling/MutatorListener_FixAmmoSelling.uc @@ -69,7 +69,6 @@ private static function ReplaceOldPickup(Pickup oldPickup) KFWeaponPickup(newPickup).bThrown = true; } -// TODO: this is code duplication, some sort of solution is needed static final function KFWeapon GetWeaponOfClass( Pawn playerPawn, class weaponClass