public Picker(Package package, WeaponBelt weaponBelt) { _Package = package; _WeaponBelt = weaponBelt; PublicEvents.PickupItem.AddListener(Pickup); }
public void Pickup(ItemGroup group) { if (WeaponBelt.IsWeapon(group.Id)) { _WeaponBelt.PutItem((group.Id, 1)); return; } if (!_Package.CanPackage(group.Id)) { return; } _Package.PutItem(group); }