2018-03-20 18:10:02 +08:00
|
|
|
using System.Collections.Generic;
|
2018-12-30 18:00:05 +08:00
|
|
|
using StardewValley;
|
2018-03-20 18:10:02 +08:00
|
|
|
|
|
|
|
namespace FarmersMarketStall.Framework
|
|
|
|
{
|
|
|
|
public class MarketStall
|
|
|
|
{
|
|
|
|
public List<Item> stock;
|
|
|
|
|
2018-12-30 18:00:05 +08:00
|
|
|
public MarketStall() { }
|
2018-03-20 18:10:02 +08:00
|
|
|
|
|
|
|
public void addItemToSell(Item item)
|
|
|
|
{
|
|
|
|
this.stock.Add(item);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void removeItemFromStock(Item item)
|
|
|
|
{
|
|
|
|
this.stock.Remove(item);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void sellAllItems()
|
|
|
|
{
|
2018-12-30 18:00:05 +08:00
|
|
|
foreach (var item in this.stock)
|
|
|
|
Game1.player.money += (int)(item.salePrice() * 1.10f); //Replace the multiplier with some sort of level.
|
|
|
|
|
2018-03-20 18:10:02 +08:00
|
|
|
this.stock.Clear();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|