Predict stripping (#32478)
* Predict stripping Stops mob verbs from getting moved around again. * Bola * Fix ftl
This commit is contained in:
@@ -109,8 +109,7 @@ public abstract partial class InventorySystem
|
||||
// before we drop the item, check that it can be equipped in the first place.
|
||||
if (!CanEquip(actor, held.Value, ev.Slot, out var reason))
|
||||
{
|
||||
if (_gameTiming.IsFirstTimePredicted)
|
||||
_popup.PopupCursor(Loc.GetString(reason));
|
||||
_popup.PopupCursor(Loc.GetString(reason));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -131,7 +130,7 @@ public abstract partial class InventorySystem
|
||||
{
|
||||
if (!Resolve(target, ref inventory, false))
|
||||
{
|
||||
if(!silent && _gameTiming.IsFirstTimePredicted)
|
||||
if(!silent)
|
||||
_popup.PopupCursor(Loc.GetString("inventory-component-can-equip-cannot"));
|
||||
return false;
|
||||
}
|
||||
@@ -142,14 +141,14 @@ public abstract partial class InventorySystem
|
||||
|
||||
if (!TryGetSlotContainer(target, slot, out var slotContainer, out var slotDefinition, inventory))
|
||||
{
|
||||
if(!silent && _gameTiming.IsFirstTimePredicted)
|
||||
if(!silent)
|
||||
_popup.PopupCursor(Loc.GetString("inventory-component-can-equip-cannot"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!force && !CanEquip(actor, target, itemUid, slot, out var reason, slotDefinition, inventory, clothing))
|
||||
{
|
||||
if(!silent && _gameTiming.IsFirstTimePredicted)
|
||||
if(!silent)
|
||||
_popup.PopupCursor(Loc.GetString(reason));
|
||||
return false;
|
||||
}
|
||||
@@ -179,7 +178,7 @@ public abstract partial class InventorySystem
|
||||
|
||||
if (!_containerSystem.Insert(itemUid, slotContainer))
|
||||
{
|
||||
if(!silent && _gameTiming.IsFirstTimePredicted)
|
||||
if(!silent)
|
||||
_popup.PopupCursor(Loc.GetString("inventory-component-can-unequip-cannot"));
|
||||
return false;
|
||||
}
|
||||
@@ -374,14 +373,14 @@ public abstract partial class InventorySystem
|
||||
|
||||
if (!Resolve(target, ref inventory, false))
|
||||
{
|
||||
if(!silent && _gameTiming.IsFirstTimePredicted)
|
||||
if(!silent)
|
||||
_popup.PopupCursor(Loc.GetString("inventory-component-can-unequip-cannot"));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!TryGetSlotContainer(target, slot, out var slotContainer, out var slotDefinition, inventory))
|
||||
{
|
||||
if(!silent && _gameTiming.IsFirstTimePredicted)
|
||||
if(!silent)
|
||||
_popup.PopupCursor(Loc.GetString("inventory-component-can-unequip-cannot"));
|
||||
return false;
|
||||
}
|
||||
@@ -393,7 +392,7 @@ public abstract partial class InventorySystem
|
||||
|
||||
if (!force && !CanUnequip(actor, target, slot, out var reason, slotContainer, slotDefinition, inventory))
|
||||
{
|
||||
if(!silent && _gameTiming.IsFirstTimePredicted)
|
||||
if(!silent)
|
||||
_popup.PopupCursor(Loc.GetString(reason));
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user