Add legal option to items
This commit is contained in:
@@ -14,5 +14,7 @@ namespace ReallifeGamemode.Server.Inventory.Interfaces
|
||||
int Gewicht { get; }
|
||||
string Einheit { get; }
|
||||
int Price { get; }
|
||||
|
||||
bool Legal { get; }
|
||||
}
|
||||
}
|
||||
|
||||
18
ReallifeGamemode.Server/Inventory/Items/BaseItem.cs
Normal file
18
ReallifeGamemode.Server/Inventory/Items/BaseItem.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using ReallifeGamemode.Server.Inventory.Interfaces;
|
||||
|
||||
namespace ReallifeGamemode.Server.Inventory.Items
|
||||
{
|
||||
public abstract class BaseItem : IItem
|
||||
{
|
||||
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 abstract int Price { get; }
|
||||
public virtual bool Legal => true;
|
||||
}
|
||||
}
|
||||
@@ -9,13 +9,13 @@ using ReallifeGamemode.Server.Inventory.Interfaces;
|
||||
|
||||
namespace ReallifeGamemode.Server.Inventory.Items
|
||||
{
|
||||
public class Cannabis : ConsumableItem
|
||||
public class Cannabis : DropItem
|
||||
{
|
||||
public override int Id => 108;
|
||||
|
||||
public override string Name => "Grünes Gift";
|
||||
public override string Name => "Cannabis";
|
||||
|
||||
public override string Description => "puff puff and pass";
|
||||
public override string Description => "kein brokkoli";
|
||||
|
||||
public override int Gewicht => 2;
|
||||
|
||||
@@ -24,14 +24,5 @@ namespace ReallifeGamemode.Server.Inventory.Items
|
||||
public override uint Object => 3076948544;
|
||||
|
||||
public override int Price => 0;
|
||||
|
||||
public override int HpAmount => -5;
|
||||
|
||||
public override float Cooldown => 20000;
|
||||
|
||||
public override void Consume(UserItem uItem)
|
||||
{
|
||||
//nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,17 +8,17 @@ using ReallifeGamemode.Server.Util;
|
||||
|
||||
namespace ReallifeGamemode.Server.Inventory.Items
|
||||
{
|
||||
public abstract class ConsumableItem : IUsableItem
|
||||
public abstract class ConsumableItem : BaseItem, 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 abstract uint Object { get; }
|
||||
public abstract int Price { get; }
|
||||
public override int Id { get; }
|
||||
public override string Name { get; }
|
||||
public override string Description { get; }
|
||||
public override int Gewicht { get; }
|
||||
public override string Einheit { get; }
|
||||
public override int Price { get; }
|
||||
public abstract float Cooldown { get; }
|
||||
public abstract uint Object { get; }
|
||||
|
||||
public abstract void Consume(UserItem uItem);
|
||||
|
||||
|
||||
@@ -6,15 +6,15 @@ using ReallifeGamemode.Server.Managers;
|
||||
|
||||
namespace ReallifeGamemode.Server.Inventory.Items
|
||||
{
|
||||
public abstract class DropItem : IDroppableItem
|
||||
public abstract class DropItem : BaseItem, IDroppableItem
|
||||
{
|
||||
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 override int Id { get; }
|
||||
public override string Name { get; }
|
||||
public override string Description { get; }
|
||||
public override int Gewicht { get; }
|
||||
public override string Einheit { get; }
|
||||
public abstract uint Object { get; }
|
||||
public abstract int Price { get; }
|
||||
public override int Price { get; }
|
||||
|
||||
public void Drop(UserItem uItem, Player player, int amount)
|
||||
{
|
||||
|
||||
@@ -10,15 +10,15 @@ using ReallifeGamemode.Server.Managers;
|
||||
|
||||
namespace ReallifeGamemode.Server.Inventory.Items
|
||||
{
|
||||
public abstract class UseItem : IUsableItem
|
||||
public abstract class UseItem : BaseItem, IUsableItem
|
||||
{
|
||||
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 override int Id { get; }
|
||||
public override string Name { get; }
|
||||
public override string Description { get; }
|
||||
public override int Gewicht { get; }
|
||||
public override string Einheit { get; }
|
||||
public override int Price { get; }
|
||||
public abstract uint Object { get; }
|
||||
public abstract int Price { get; }
|
||||
|
||||
public abstract bool Use(UserItem uItem);
|
||||
|
||||
|
||||
@@ -6,15 +6,15 @@ using ReallifeGamemode.Server.WeaponDeal;
|
||||
|
||||
namespace ReallifeGamemode.Server.Inventory.Items
|
||||
{
|
||||
public abstract class WeaponDealItem : IWeaponDealItem
|
||||
public abstract class WeaponDealItem : BaseItem, IWeaponDealItem
|
||||
{
|
||||
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 override int Id { get; }
|
||||
public override string Name { get; }
|
||||
public override string Description { get; }
|
||||
public override int Gewicht { get; }
|
||||
public override string Einheit { get; }
|
||||
public override int Price { get; }
|
||||
public abstract uint Object { get; }
|
||||
public abstract int Price { get; }
|
||||
|
||||
public bool noTransfer(Player client, UserItem uItem, FactionVehicle fVeh)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user