Refactored inventory system
This commit is contained in:
@@ -11,7 +11,7 @@ using System.Text;
|
||||
|
||||
namespace reallife_gamemode.Server.Inventory.Interfaces
|
||||
{
|
||||
public interface IDroppableItem
|
||||
public interface IDroppableItem : IItem
|
||||
{
|
||||
void Drop(Client player);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ using System.Text;
|
||||
|
||||
namespace reallife_gamemode.Server.Inventory.Interfaces
|
||||
{
|
||||
public interface IUsableItem
|
||||
public interface IUsableItem : IItem
|
||||
{
|
||||
void Use(UserItem uItem, Client player);
|
||||
}
|
||||
|
||||
@@ -11,13 +11,13 @@ using System.Text;
|
||||
|
||||
namespace reallife_gamemode.Server.Inventory.Items
|
||||
{
|
||||
public class Cheeseburger : FoodItem, IItem
|
||||
public class Cheeseburger : FoodItem
|
||||
{
|
||||
public int Id => 2;
|
||||
public string Name => "Cheeseburger";
|
||||
public string Description => "Wie der Hamburger, nur mit Käse.";
|
||||
public int Gewicht => 320;
|
||||
public string Einheit => "g";
|
||||
public override int Id => 2;
|
||||
public override string Name => "Cheeseburger";
|
||||
public override string Description => "Wie der Hamburger, nur mit Käse.";
|
||||
public override int Gewicht => 320;
|
||||
public override string Einheit => "g";
|
||||
public override int HpAmount => 20;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,13 +11,13 @@ using System.Text;
|
||||
|
||||
namespace reallife_gamemode.Server.Inventory.Items
|
||||
{
|
||||
public class Chickenburger : FoodItem, IItem
|
||||
public class Chickenburger : FoodItem
|
||||
{
|
||||
public int Id => 3;
|
||||
public string Name => "Chickenburger";
|
||||
public string Description => "Hühnchenburger";
|
||||
public int Gewicht => 330;
|
||||
public string Einheit => "g";
|
||||
public override int Id => 3;
|
||||
public override string Name => "Chickenburger";
|
||||
public override string Description => "Hühnchenburger";
|
||||
public override int Gewicht => 330;
|
||||
public override string Einheit => "g";
|
||||
public override int HpAmount => 25;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,11 @@ namespace reallife_gamemode.Server.Inventory.Items
|
||||
public abstract class FoodItem : IUsableItem
|
||||
{
|
||||
public abstract int HpAmount { get; }
|
||||
public abstract int Id { get; }
|
||||
public abstract string Name { get; }
|
||||
public abstract string Description { get; }
|
||||
public abstract int Gewicht { get; }
|
||||
public abstract string Einheit { get; }
|
||||
|
||||
public void Use(UserItem uItem, Client player)
|
||||
{
|
||||
|
||||
@@ -11,13 +11,13 @@ using System.Text;
|
||||
|
||||
namespace reallife_gamemode.Server.Inventory.Items
|
||||
{
|
||||
public class Hamburger : FoodItem, IItem
|
||||
public class Hamburger : FoodItem
|
||||
{
|
||||
public int Id => 1;
|
||||
public string Name => "Hamburger";
|
||||
public string Description => "Ein leckerer Hamburger.";
|
||||
public int Gewicht => 300;
|
||||
public string Einheit => "g";
|
||||
public override int Id => 1;
|
||||
public override string Name => "Hamburger";
|
||||
public override string Description => "Ein leckerer Hamburger.";
|
||||
public override int Gewicht => 300;
|
||||
public override string Einheit => "g";
|
||||
public override int HpAmount => 20;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,13 +11,13 @@ using System.Text;
|
||||
|
||||
namespace reallife_gamemode.Server.Inventory.Items
|
||||
{
|
||||
public class Holz : FoodItem, IItem
|
||||
public class Holz : FoodItem
|
||||
{
|
||||
public int Id => 4;
|
||||
public string Name => "Holz";
|
||||
public string Description => "Ich und mein Holz.";
|
||||
public int Gewicht => 1000;
|
||||
public string Einheit => "g";
|
||||
public override int Id => 4;
|
||||
public override string Name => "Holz";
|
||||
public override string Description => "Ich und mein Holz.";
|
||||
public override int Gewicht => 1000;
|
||||
public override string Einheit => "g";
|
||||
public override int HpAmount => 20;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,13 +11,13 @@ using System.Text;
|
||||
|
||||
namespace reallife_gamemode.Server.Inventory.Items
|
||||
{
|
||||
public class Kraftstoff : FoodItem, IItem
|
||||
public class Kraftstoff : FoodItem
|
||||
{
|
||||
public int Id => 5;
|
||||
public string Name => "Kraftstoff";
|
||||
public string Description => "Der Stoff gibt dir Kraft.";
|
||||
public int Gewicht => 1000;
|
||||
public string Einheit => "g";
|
||||
public override int Id => 5;
|
||||
public override string Name => "Kraftstoff";
|
||||
public override string Description => "Der Stoff gibt dir Kraft.";
|
||||
public override int Gewicht => 1000;
|
||||
public override string Einheit => "g";
|
||||
public override int HpAmount => 20;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user