Browse Source

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.
master
Anton Tarasenko 4 years ago
parent
commit
b0e34a4edb
  1. 1
      sources/FixAmmoSelling/MutatorListener_FixAmmoSelling.uc

1
sources/FixAmmoSelling/MutatorListener_FixAmmoSelling.uc

@ -69,7 +69,6 @@ private static function ReplaceOldPickup(Pickup oldPickup)
KFWeaponPickup(newPickup).bThrown = true; KFWeaponPickup(newPickup).bThrown = true;
} }
// TODO: this is code duplication, some sort of solution is needed
static final function KFWeapon GetWeaponOfClass( static final function KFWeapon GetWeaponOfClass(
Pawn playerPawn, Pawn playerPawn,
class<Inventory> weaponClass class<Inventory> weaponClass

Loading…
Cancel
Save