Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections.Generic;
- using VoidwalkerEngine.Framework.Collections;
- using VoidwalkerEngine.Framework.Interfaces;
- using VoidwalkerEngine.Framework.Logic;
- using VoidwalkerEngine.Framework.Systems.Items.Base;
- namespace VoidwalkerEngine.Framework.Systems.Items.Augmentations
- {
- public class Rune : GameItem, IStackable, IModifierProvider
- {
- public RuneType RuneType { get; set; }
- public int Count { get; set; }
- public int StackSize { get; set; }
- public List<ItemConstraint> ItemConstraints { get; set; }
- public ItemModifierList Modifiers { get; set; }
- public Rune()
- {
- this.StackSize = 20;
- }
- public Rune(RuneType runeType)
- : this()
- {
- this.RuneType = runeType;
- }
- public int GetRemainingStackSpace()
- {
- return this.StackSize - this.Count;
- }
- public bool IsStackableWith(IStackable other)
- {
- if (other is Rune rune)
- {
- if (this.RuneType == rune.RuneType)
- {
- return true;
- }
- }
- return false;
- }
- public static Rune CreateRune(RuneType runeType)
- {
- return new Rune
- {
- Header = runeType.GetRuneHeader(),
- Name = "Rune",
- Quality = QualityType.Rune,
- ItemConstraints = runeType.GetItemConstraints(),
- FlavorText = runeType.GetFlavorText(),
- BaseSellPrice = runeType.GetBaseSellPrice(),
- Modifiers = new ItemModifierList()
- {
- runeType.GetModifier()
- },
- Identifier = "Rune_" + runeType.GetRuneHeader() + "_" + (int)runeType,
- Level = runeType.GetItemLevel(),
- // Icon = blah, blah, unqiue icon for each Rune and shit
- };
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement