public static string GetPluralName(this Weenie weenie) { var pluralName = weenie.GetProperty(PropertyString.PluralName); if (pluralName == null) { pluralName = weenie.GetProperty(PropertyString.Name).Pluralize(); } return(pluralName); }
public static int GetStackUnitEncumbrance(this Weenie weenie) { if (weenie.IsStackable()) { var stackUnitEncumbrance = weenie.GetProperty(PropertyInt.StackUnitEncumbrance); if (stackUnitEncumbrance != null) { return(stackUnitEncumbrance.Value); } } return(weenie.GetProperty(PropertyInt.EncumbranceVal) ?? 0); }
public static int GetMaxStackSize(this Weenie weenie) { if (weenie.IsStackable()) { var maxStackSize = weenie.GetProperty(PropertyInt.MaxStackSize); if (maxStackSize != null) { return(maxStackSize.Value); } } return(1); }
public static bool IsVendorService(this Weenie weenie) { var vendorService = weenie.GetProperty(PropertyBool.VendorService) ?? false; return(vendorService); }
public static bool RequiresBackpackSlotOrIsContainer(this Weenie weenie) { var requiresBackPackSlot = weenie.GetProperty(PropertyBool.RequiresBackpackSlot) ?? false; return(requiresBackPackSlot || weenie.WeenieType == WeenieType.Container); }
public static bool IsStuck(this Weenie weenie) { var stuck = weenie.GetProperty(PropertyBool.Stuck) ?? false; return(stuck); }
// ===================================== // Utility // ===================================== public static string GetName(this Weenie weenie) { var name = weenie.GetProperty(PropertyString.Name); return(name); }
public static bool IsStuck(this Weenie weenie) { return(weenie.GetProperty(PropertyBool.Stuck) ?? false); }
public static int?GetValue(this Weenie weenie) { var value = weenie.GetProperty(PropertyInt.Value); return(value); }
public static ItemType GetItemType(this Weenie weenie) { var itemType = weenie.GetProperty(PropertyInt.ItemType) ?? 0; return((ItemType)itemType); }