CogEngine: Make the Cheat Execution implementable in blueprint

- Deprecate CogAbilityWindow_Cheats as it is now replaced with CogEngineWindow_Cheats
- Add CogAbilityCheat_Execution_ActivateAbility for cheats that rely on an ability
- CogSample: Add new cheats
This commit is contained in:
Arnaud Jamin
2025-02-04 21:52:53 -05:00
parent 27c309ad87
commit 74dd726c2c
20 changed files with 237 additions and 426 deletions
@@ -230,16 +230,16 @@ void ACogEngineReplicator::Server_ApplyCheat_Implementation(const AActor* CheatI
return;
}
Cheat.Execution->Execute(CheatInstigator, Targets);
Cheat.Execution->Execute(GetWorld(), CheatInstigator, Targets);
}
//--------------------------------------------------------------------------------------------------------------------------
ECogEngineCheat_ActiveState ACogEngineReplicator::IsCheatActiveOnTargets(const TArray<AActor*>& Targets, const FCogEngineCheat& Cheat)
ECogEngineCheat_ActiveState ACogEngineReplicator::IsCheatActiveOnTargets(const TArray<AActor*>& Targets, const FCogEngineCheat& Cheat) const
{
if (Cheat.Execution == nullptr)
{
return ECogEngineCheat_ActiveState::Inactive;
}
return Cheat.Execution->IsActiveOnTargets(Targets);
return Cheat.Execution->IsActiveOnTargets(GetWorld(), Targets);
}