Fishing + Deselected stuff better
This commit is contained in:
parent
1b0f890b0b
commit
147af498c3
2 changed files with 9 additions and 11 deletions
|
|
@ -113,7 +113,7 @@ public class FishingController : MonoBehaviour {
|
|||
Debug.Log("Tried to catch!");
|
||||
if (_fishingTime <= _maxTime) {
|
||||
Debug.Log("Caught!");
|
||||
Inventory.instance.AddItem(ItemContainer.Instance.GetItemByName("Fish"), Math.Max((int)(1 / (_fishingTime/2)), 1));
|
||||
_iv.AddItem(_ic.GetItemByName("Fish"), Math.Max((int)(1 / (_fishingTime/2)), 1));
|
||||
ResetFishing();
|
||||
} else {
|
||||
Debug.Log("Failed to catch!");
|
||||
|
|
|
|||
|
|
@ -35,11 +35,9 @@ public class Inventory : ItemStorage {
|
|||
base.AddItem(item, amount);
|
||||
}
|
||||
|
||||
public override void RemoveItem(Item item, int amount)
|
||||
{
|
||||
public override void RemoveItem(Item item, int amount) {
|
||||
base.RemoveItem(item, amount);
|
||||
if (!items.ContainsKey(item))
|
||||
{
|
||||
if (!items.ContainsKey(item) && PlayerController.instance.GetSelectedItem() == item) {
|
||||
PlayerController.instance.DeselectItem();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue