Skip to content

Commit

Permalink
Merge pull request #233 from project-fika/inventory-changes
Browse files Browse the repository at this point in the history
Inventory changes
  • Loading branch information
Lacyway authored Dec 14, 2024
2 parents 95ff732 + 90a36db commit 6c1c38f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 79 deletions.
29 changes: 0 additions & 29 deletions Fika.Core/Coop/BotClasses/BotMovementContext.cs

This file was deleted.

42 changes: 0 additions & 42 deletions Fika.Core/Coop/ClientClasses/CoopClientInventoryController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,6 @@ public override IPlayerSearchController PlayerSearchController
}
}

/*public override void RollBack()
{
base.RollBack();
ResyncInventoryIdPacket packet = new(coopPlayer.NetId)
{
MongoId = mongoID_0
};
coopPlayer.PacketSender.SendPacket(ref packet, false);
}*/

public override void GetTraderServicesDataFromServer(string traderId)
{
if (FikaBackendUtils.IsClient)
Expand Down Expand Up @@ -272,37 +262,5 @@ public readonly struct ServerOperationStatus(EOperationStatus status, string err
public readonly EOperationStatus Status = status;
public readonly string Error = error;
}

/*private class ClientInventoryCallbackManager
{
public Result<EOperationStatus> result;
public ClientInventoryOperationHandler clientOperationManager;
public void HandleResult(IResult executeResult)
{
if (!executeResult.Succeed && (executeResult.Error is not "skipped skippable" or "skipped _completed"))
{
FikaPlugin.Instance.FikaLogger.LogError($"{clientOperationManager.inventoryController.ID} - Client operation critical failure: {clientOperationManager.inventoryController.ID} - {clientOperationManager.operation}\r\nError: {executeResult.Error}");
}
clientOperationManager.localOperationStatus = EOperationStatus.Succeeded;
if (clientOperationManager.localOperationStatus == clientOperationManager.serverOperationStatus)
{
clientOperationManager.operation.Dispose();
clientOperationManager.callback.Invoke(result);
return;
}
if (clientOperationManager.serverOperationStatus != null)
{
if (clientOperationManager.serverOperationStatus == EOperationStatus.Failed)
{
clientOperationManager.operation.Dispose();
clientOperationManager.callback.Invoke(result);
}
}
}
}*/
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ public override bool CanStartReload()
return base.CanStartReload();
}

public override bool CanPressTrigger()
/*public override bool CanPressTrigger()
{
if (isClient)
{
return !player.WaitingForCallback && base.CanPressTrigger();
}
return base.CanPressTrigger();
}
}*/

public Player.BaseAnimationOperation Weapon1()
{
Expand Down
6 changes: 0 additions & 6 deletions Fika.Core/Coop/Players/CoopBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,6 @@ public override void ConnectSkillManager()
// Do nothing
}

public override void CreateMovementContext()
{
LayerMask movement_MASK = EFTHardSettings.Instance.MOVEMENT_MASK;
MovementContext = BotMovementContext.Create(this, GetBodyAnimatorCommon, GetCharacterControllerCommon, movement_MASK);
}

public override void OnBeenKilledByAggressor(IPlayer aggressor, DamageInfoStruct damageInfo, EBodyPart bodyPart, EDamageType lethalDamageType)
{
base.OnBeenKilledByAggressor(aggressor, damageInfo, bodyPart, lethalDamageType);
Expand Down

0 comments on commit 6c1c38f

Please sign in to comment.