public override void Emptify(bool removesEmpty) { this.EmptifyInstantly(); if (removesEmpty) { IIconGroup ig = thisItemIcon.GetIconGroup(); ig.RemoveIIAndMutate(thisItemIcon); } }
protected override void ExpireImple() { if (thisRemovesEmpty) { IIconGroup ig = thisItemIcon.GetIconGroup(); ig.RemoveIIAndMutate(thisItemIcon); } thisEngine.SetToWaitingForDisemptifyState(); }
public TestItemIcon CreateTestItemIconWithIG(int maxTransferableQuantity, out IItemIconConstArg arg) { IItemIconConstArg thisArg; TestItemIcon itemIcon = CreateTestItemIcon(out thisArg); IIconGroup ig = Substitute.For <IIconGroup>(); itemIcon.SetIconGroup(ig); arg = thisArg; return(itemIcon); }
public void IsEligibleForHover_ThisIsInSourceIG_ThisIsEmpty_ReturnsTrue() { IEquippableItemIconConstArg arg; TestEqpII testEqpII = CreateTestEqpII(out arg); IEquippableItemIcon pickedEqpII = Substitute.For <IEquippableItemIcon>(); IIconGroup thisIG = Substitute.For <IIconGroup>(); testEqpII.SetIconGroup(thisIG); pickedEqpII.GetIconGroup().Returns(thisIG); IItemIconEmptinessStateEngine emptinessStateEngine = arg.emptinessStateEngine; emptinessStateEngine.IsEmpty().Returns(true); Assert.That(testEqpII.TestIsEligibleForHover(pickedEqpII), Is.True); }
public void IsEligibleForHover_ThisIsInDestIG_ThisIsNotEmpty_ThisDoesNotHaveSameItemTempAsPicked_ReturnsFalse() { IEquippableItemIconConstArg arg; TestEqpII testEqpII = CreateTestEqpII(quantity: 1, tempType: typeof(IBowTemplate), arg: out arg); IEquippableItemIcon pickedEqpII = Substitute.For <IEquippableItemIcon>(); IEquipToolEquippedBowIG thisEqpIG = Substitute.For <IEquipToolEquippedBowIG>(); testEqpII.SetIconGroup(thisEqpIG); IIconGroup otherIG = Substitute.For <IIconGroup>(); pickedEqpII.GetIconGroup().Returns(otherIG); IItemIconEmptinessStateEngine emptinessStateEngine = arg.emptinessStateEngine; emptinessStateEngine.IsEmpty().Returns(false); pickedEqpII.GetItemTemplate().Returns(Substitute.For <IWearTemplate>()); Assert.That(testEqpII.TestIsEligibleForHover(pickedEqpII), Is.False); }
public void IsEligibleForHover_ThisIsInSourceIG_ThisIsNotEmpty_ThisDoesNotHaveSameItemAsPickedEqpII_ReturnsFalse() { IEquippableItemIconConstArg arg; TestEqpII testEqpII = CreateTestEqpII(out arg); IEquippableItemIcon pickedEqpII = Substitute.For <IEquippableItemIcon>(); IIconGroup thisIG = Substitute.For <IIconGroup>(); testEqpII.SetIconGroup(thisIG); pickedEqpII.GetIconGroup().Returns(thisIG); IEquippableUIItem pickedEqpItem = Substitute.For <IEquippableUIItem>(); pickedEqpII.GetEquippableItem().Returns(pickedEqpItem); arg.item.IsSameAs(pickedEqpItem).Returns(false); IItemIconEmptinessStateEngine emptinessStateEngine = arg.emptinessStateEngine; emptinessStateEngine.IsEmpty().Returns(false); Assert.That(testEqpII.TestIsEligibleForHover(pickedEqpII), Is.False); }
public TestItemIcon CreateTestItemIcon(bool isEmpty, bool isReorderable, bool isTransferable, out IItemIconConstArg arg) { IItemIconConstArg thisArg; TestItemIcon itemIcon = CreateTestItemIcon(out thisArg); IItemIconEmptinessStateEngine emptinessStateEngine = thisArg.emptinessStateEngine; emptinessStateEngine.IsEmpty().Returns(isEmpty); IIconGroup ig = Substitute.For <IIconGroup>(); itemIcon.SetIconGroup(ig); ig.GetSize().Returns(2); if (isReorderable) { ig.AllowsInsert().Returns(true); } else { ig.AllowsInsert().Returns(false); } thisArg.transferabilityHandlerImplementor.IsTransferable().Returns(isTransferable); arg = thisArg; return(itemIcon); }
public void SpotTransfer(IIconGroup destIG) { destIG.ReceiveSpotTransfer(thisItemIcon); }
public void TravelTransfer(IIconGroup destIG) { destIG.ReceiveTravelTransfer(thisItemIcon); }
public void SetIconGroup(IIconGroup ig) { thisIG = ig; }
public void SpotTransfer(IIconGroup destIG) { thisTransferabilityHandlerImplementor.SpotTransfer(destIG); }
public Reformation(IIconGroup iconGroup, List <IItemIcon> newProspectiveIIs, IItemIcon travelTransferII, List <IItemIcon> iisToInit) { }