diff --git a/Source/DummyHeaders/Public/Audio/AudioMeter/IAudioMeterImpl.h b/Source/DummyHeaders/Public/Audio/AudioMeter/IAudioMeterImpl.h new file mode 100644 index 0000000000..fb5aa5c48d --- /dev/null +++ b/Source/DummyHeaders/Public/Audio/AudioMeter/IAudioMeterImpl.h @@ -0,0 +1,3 @@ +#pragma once + +class DUMMYHEADERS_API IAudioMeterImpl {}; diff --git a/Source/FactoryGame/Private/Audio/FGVoiceChatAudioMeterSubsystem.cpp b/Source/FactoryGame/Private/Audio/FGVoiceChatAudioMeterSubsystem.cpp new file mode 100644 index 0000000000..0cf7a9d9e7 --- /dev/null +++ b/Source/FactoryGame/Private/Audio/FGVoiceChatAudioMeterSubsystem.cpp @@ -0,0 +1,8 @@ +#include "Audio/FGVoiceChatAudioMeterSubsystem.h" + +AFGVoiceChatAudioMeterSubsystem::AFGVoiceChatAudioMeterSubsystem(){ } +void AFGVoiceChatAudioMeterSubsystem::BeginPlay(){ Super::BeginPlay(); } +void AFGVoiceChatAudioMeterSubsystem::EndPlay(const EEndPlayReason::Type EndPlayReason){ Super::EndPlay(EndPlayReason); } +void AFGVoiceChatAudioMeterSubsystem::Tick(float DeltaTime){ Super::Tick(DeltaTime); } +void AFGVoiceChatAudioMeterSubsystem::ConvertPeakToRTPC(float peak, float DeltaTime){ } +void AFGVoiceChatAudioMeterSubsystem::SetRTPC(float AudioMeterValue){ } diff --git a/Source/FactoryGame/Private/AvailabilityDependencies/FGCalendarOpenedDependency.cpp b/Source/FactoryGame/Private/AvailabilityDependencies/FGCalendarOpenedDependency.cpp new file mode 100644 index 0000000000..a270eea219 --- /dev/null +++ b/Source/FactoryGame/Private/AvailabilityDependencies/FGCalendarOpenedDependency.cpp @@ -0,0 +1,7 @@ +#include "AvailabilityDependencies/FGCalendarOpenedDependency.h" + +bool UFGCalendarOpenedDependency::AreDependenciesMet( UObject* worldContext ) const{ return bool(); } +#if WITH_EDITOR +FString UFGCalendarOpenedDependency::ToString() const{ return FString(); } +void UFGCalendarOpenedDependency::FromString( const FString& inString ){ } +#endif diff --git a/Source/FactoryGame/Private/AvailabilityDependencies/FGCalendarSlotUnlockedDependency.cpp b/Source/FactoryGame/Private/AvailabilityDependencies/FGCalendarSlotUnlockedDependency.cpp new file mode 100644 index 0000000000..94798676e8 --- /dev/null +++ b/Source/FactoryGame/Private/AvailabilityDependencies/FGCalendarSlotUnlockedDependency.cpp @@ -0,0 +1,8 @@ +#include "AvailabilityDependencies/FGCalendarSlotUnlockedDependency.h" + +UFGCalendarSlotUnlockedDependency::UFGCalendarSlotUnlockedDependency(){ } +bool UFGCalendarSlotUnlockedDependency::AreDependenciesMet( UObject* worldContext ) const{ return bool(); } +#if WITH_EDITOR +FString UFGCalendarSlotUnlockedDependency::ToString() const{ return FString(); } +void UFGCalendarSlotUnlockedDependency::FromString( const FString& inString ){ } +#endif diff --git a/Source/FactoryGame/Private/AvailabilityDependencies/FGEventDisabledDependency.cpp b/Source/FactoryGame/Private/AvailabilityDependencies/FGEventDisabledDependency.cpp new file mode 100644 index 0000000000..be40fbd6bd --- /dev/null +++ b/Source/FactoryGame/Private/AvailabilityDependencies/FGEventDisabledDependency.cpp @@ -0,0 +1,7 @@ +#include "AvailabilityDependencies/FGEventDisabledDependency.h" + +bool UFGEventDisabledDependency::AreDependenciesMet( UObject* worldContext ) const{ return bool(); } +#if WITH_EDITOR +FString UFGEventDisabledDependency::ToString() const{ return FString(); } +void UFGEventDisabledDependency::FromString( const FString& inString ){ } +#endif diff --git a/Source/FactoryGame/Private/Buildables/FGBuildableCalendar.cpp b/Source/FactoryGame/Private/Buildables/FGBuildableCalendar.cpp index 7bfb802b6b..9e7b9b9371 100644 --- a/Source/FactoryGame/Private/Buildables/FGBuildableCalendar.cpp +++ b/Source/FactoryGame/Private/Buildables/FGBuildableCalendar.cpp @@ -8,7 +8,6 @@ AFGBuildableCalendar::AFGBuildableCalendar() : Super() { this->mInventory = CreateDefaultSubobject(TEXT("CalendarInventory")); this->mPopulatedInitialInventory = false; this->mNumberOfSlotsInCalendar = 25; - this->mCalendarRewardsClass = nullptr; this->mSlotFillerItemClass = nullptr; this->NetDormancy = ENetDormancy::DORM_Awake; } @@ -20,6 +19,7 @@ void AFGBuildableCalendar::GetLifetimeReplicatedProps(TArray& DOREPLIFETIME(AFGBuildableCalendar, mOpenedSlotsInCalendar); } void AFGBuildableCalendar::GetDismantleRefund_Implementation(TArray< FInventoryStack >& out_refund, bool noBuildCostEnabled) const{ } +void AFGBuildableCalendar::OnUse_Implementation(class AFGCharacterPlayer* byCharacter, const FUseState& state) { } void AFGBuildableCalendar::OpenSlot(int32 dayNumber){ } bool AFGBuildableCalendar::GetContentOnSlot(int32 dayNumber, FInventoryStack& out_slotContent){ return bool(); } UFGUnlock* AFGBuildableCalendar::GetUnlockOnSlot(int32 dayNumber){ return nullptr; } diff --git a/Source/FactoryGame/Private/Buildables/FGBuildableConveyorBelt.cpp b/Source/FactoryGame/Private/Buildables/FGBuildableConveyorBelt.cpp index 950294f268..7f0095efec 100644 --- a/Source/FactoryGame/Private/Buildables/FGBuildableConveyorBelt.cpp +++ b/Source/FactoryGame/Private/Buildables/FGBuildableConveyorBelt.cpp @@ -34,9 +34,12 @@ void AFGBuildableConveyorBelt::UpdateMeshLodLevels(int32 newLodLevel){ } TArray AFGBuildableConveyorBelt::GetActorLightweightInstanceData_Implementation(){ return TArray(); } int32 AFGBuildableConveyorBelt::GetDismantleRefundReturnsMultiplier() const{ return int32(); } void AFGBuildableConveyorBelt::OnBuildEffectFinished(){ } +void AFGBuildableConveyorBelt::OnSkinCustomizationApplied_Implementation(TSubclassOf skin){ } float AFGBuildableConveyorBelt::FindOffsetClosestToLocation(const FVector& location) const{ return float(); } void AFGBuildableConveyorBelt::GetLocationAndDirectionAtOffset(float offset, FVector& out_location, FVector& out_direction) const{ } FVector AFGBuildableConveyorBelt::GetVelocityForBase( AActor* basedActor, UPrimitiveComponent* baseComponent) const{ return FVector(); } +TArray AFGBuildableConveyorBelt::SetupAbstractInstances(const FFactoryCustomizationData& CustomizationData) { return TArray(); } +void AFGBuildableConveyorBelt::ApplyCustomizationData_Native(const FFactoryCustomizationData& customizationData){ } FVector AFGBuildableConveyorBelt::GetRefundSpawnLocationAndArea_Implementation(const FVector& aimHitLocation, float& out_radius) const{ return FVector(); } void AFGBuildableConveyorBelt::Upgrade_Implementation(AActor* newActor){ } void AFGBuildableConveyorBelt::CreateClearanceData( USplineComponent* splineComponent, const TArray< FSplinePointData >& splineData, const FTransform& conveyorTransform, TArray< FFGClearanceData >& out_clearanceData, float maxDistance){ } diff --git a/Source/FactoryGame/Private/Buildables/FGBuildableGenerator.cpp b/Source/FactoryGame/Private/Buildables/FGBuildableGenerator.cpp index 03b9fa08c4..5f6a1ae309 100644 --- a/Source/FactoryGame/Private/Buildables/FGBuildableGenerator.cpp +++ b/Source/FactoryGame/Private/Buildables/FGBuildableGenerator.cpp @@ -2,6 +2,10 @@ #include "Buildables/FGBuildableGenerator.h" +void UFGGeneratorClipboardRCO::GetLifetimeReplicatedProps(TArray& OutLifetimeProps) const{ + Super::GetLifetimeReplicatedProps(OutLifetimeProps); +} +void UFGGeneratorClipboardRCO::Server_PasteSettings_Implementation(class AFGBuildableGenerator* generator, AFGCharacterPlayer* player, float overclock, float productionBoost, TSubclassOf overclockingShard, TSubclassOf productionBoostShard){ } AFGBuildableGenerator::AFGBuildableGenerator() : Super() { this->mPowerProduction = 0.0; this->mLoadPercentage = 0.0; @@ -12,6 +16,9 @@ void AFGBuildableGenerator::GetConditionalReplicatedProps(TArray& out_data) const{ } bool AFGBuildablePipeBase::ShouldBlockGuidelinePathForHologram(const AFGHologram* hologram) const{ return bool(); } +void AFGBuildablePipeBase::OnSkinCustomizationApplied_Implementation(TSubclassOf skin){ } +void AFGBuildablePipeBase::ApplyCustomizationData_Native(const FFactoryCustomizationData& customizationData){ } void AFGBuildablePipeBase::Upgrade_Implementation(AActor* newActor){ } void AFGBuildablePipeBase::Dismantle_Implementation(){ } TArray AFGBuildablePipeBase::GetActorLightweightInstanceData_Implementation(){ return TArray(); } @@ -43,6 +45,7 @@ void AFGBuildablePipeBase::SetupForSignificance(){ } float AFGBuildablePipeBase::GetSignificanceRange(){ return float(); } float AFGBuildablePipeBase::FindOffsetClosestToLocation(const FVector& location) const{ return float(); } void AFGBuildablePipeBase::GetLocationAndDirectionAtOffset(float offset, FVector& out_location, FVector& out_direction) const{ } +TArray AFGBuildablePipeBase::SetupAbstractInstances(const FFactoryCustomizationData& CustomizationData){ return TArray(); } UFGConnectionComponent* AFGBuildablePipeBase::GetSplineConnection0() const{ return nullptr; } UFGConnectionComponent* AFGBuildablePipeBase::GetSplineConnection1() const{ return nullptr; } void AFGBuildablePipeBase::CreateClearanceData( USplineComponent* splineComponent, const TArray< FSplinePointData >& splineData, const FTransform& pipeTransform, TArray< FFGClearanceData >& out_clearanceData, float maxDistance){ } diff --git a/Source/FactoryGame/Private/Buildables/FGBuildablePipeline.cpp b/Source/FactoryGame/Private/Buildables/FGBuildablePipeline.cpp index 388e689704..87305764ed 100644 --- a/Source/FactoryGame/Private/Buildables/FGBuildablePipeline.cpp +++ b/Source/FactoryGame/Private/Buildables/FGBuildablePipeline.cpp @@ -52,6 +52,7 @@ void AFGBuildablePipeline::GetLifetimeReplicatedProps(TArray< FLifetimeProperty void AFGBuildablePipeline::BeginPlay(){ Super::BeginPlay(); } void AFGBuildablePipeline::EndPlay(const EEndPlayReason::Type endPlayReason){ Super::EndPlay(endPlayReason); } void AFGBuildablePipeline::Factory_Tick(float dt){ } +bool AFGBuildablePipeline::ShouldRegisterToFactoryTickGroup() const { return bool(); } void AFGBuildablePipeline::PreUpgrade_Implementation(){ } void AFGBuildablePipeline::Upgrade_Implementation(AActor* newActor){ } void AFGBuildablePipeline::GainedSignificance_Implementation(){ } diff --git a/Source/FactoryGame/Private/Buildables/FGBuildableResourceExtractorBase.cpp b/Source/FactoryGame/Private/Buildables/FGBuildableResourceExtractorBase.cpp index 658854ad40..776edeaf88 100644 --- a/Source/FactoryGame/Private/Buildables/FGBuildableResourceExtractorBase.cpp +++ b/Source/FactoryGame/Private/Buildables/FGBuildableResourceExtractorBase.cpp @@ -5,6 +5,10 @@ #include "Hologram/FGResourceExtractorHologram.h" #include "Net/UnrealNetwork.h" +void UFGResourceExtractorClipboardRCO::GetLifetimeReplicatedProps(TArray& OutLifetimeProps) const { + Super::GetLifetimeReplicatedProps(OutLifetimeProps); +} +void UFGResourceExtractorClipboardRCO::Server_PasteSettings_Implementation(class AFGBuildableResourceExtractorBase* extractor, AFGCharacterPlayer* player, float overclock, float productionBoost, TSubclassOf overclockingShard, TSubclassOf productionBoostShard){ } int AFGBuildableResourceExtractorBase::GetDebugLevel(){ return int(); } void AFGBuildableResourceExtractorBase::SetDebugLevel(int level){ } void AFGBuildableResourceExtractorBase::GetLifetimeReplicatedProps(TArray< FLifetimeProperty >& OutLifetimeProps) const { @@ -27,6 +31,8 @@ void AFGBuildableResourceExtractorBase::BeginPlay(){ Super::BeginPlay(); } void AFGBuildableResourceExtractorBase::Destroyed(){ Super::Destroyed(); } bool AFGBuildableResourceExtractorBase::DisconnectExtractableResource(){ return bool(); } void AFGBuildableResourceExtractorBase::PostLoadGame_Implementation(int32 saveVersion, int32 gameVersion){ } +UFGFactoryClipboardSettings* AFGBuildableResourceExtractorBase::CopySettings_Implementation(){ return nullptr; } +bool AFGBuildableResourceExtractorBase::PasteSettings_Implementation(UFGFactoryClipboardSettings* settings) { return bool(); } void AFGBuildableResourceExtractorBase::SetExtractableResource(TScriptInterface< IFGExtractableResourceInterface > extractableInterface){ } void AFGBuildableResourceExtractorBase::SetResourceNode( AFGResourceNode* resourceNode){ } UFXSystemAsset* AFGBuildableResourceExtractorBase::GetMiningParticle(){ return nullptr; } diff --git a/Source/FactoryGame/Private/Buildables/FGBuildableSnowCannon.cpp b/Source/FactoryGame/Private/Buildables/FGBuildableSnowCannon.cpp new file mode 100644 index 0000000000..65b91bc984 --- /dev/null +++ b/Source/FactoryGame/Private/Buildables/FGBuildableSnowCannon.cpp @@ -0,0 +1,9 @@ +#include "Buildables/FGBuildableSnowCannon.h" + +AFGBuildableSnowCannon::AFGBuildableSnowCannon(){ } +void AFGBuildableSnowCannon::BeginPlay(){ Super::BeginPlay(); } +void AFGBuildableSnowCannon::EndPlay(const EEndPlayReason::Type EndPlayReason){ Super::EndPlay(EndPlayReason); } +void AFGBuildableSnowCannon::GainedSignificance_Implementation(){ } +void AFGBuildableSnowCannon::LostSignificance_Implementation(){ } +void AFGBuildableSnowCannon::SetCannonAngle(int32 angle){ } +void AFGBuildableSnowCannon::UpdateCannonMesh(){ } diff --git a/Source/FactoryGame/Private/Creature/FGCreatureSpawner.cpp b/Source/FactoryGame/Private/Creature/FGCreatureSpawner.cpp index f988b744ca..3cf6ba5d77 100644 --- a/Source/FactoryGame/Private/Creature/FGCreatureSpawner.cpp +++ b/Source/FactoryGame/Private/Creature/FGCreatureSpawner.cpp @@ -40,6 +40,9 @@ AFGCreatureSpawner::AFGCreatureSpawner() : Super() { void AFGCreatureSpawner::BeginPlay(){ Super::BeginPlay(); } void AFGCreatureSpawner::EndPlay(const EEndPlayReason::Type endPlayReason){ Super::EndPlay(endPlayReason); } void AFGCreatureSpawner::Tick(float DeltaSeconds){ Super::Tick(DeltaSeconds); } +#if WITH_EDITOR +void AFGCreatureSpawner::GetActorDescProperties(FPropertyPairsMap& PropertyPairsMap) const{ } +#endif void AFGCreatureSpawner::PreSaveGame_Implementation(int32 saveVersion, int32 gameVersion){ } void AFGCreatureSpawner::PostSaveGame_Implementation(int32 saveVersion, int32 gameVersion){ } void AFGCreatureSpawner::PreLoadGame_Implementation(int32 saveVersion, int32 gameVersion){ } @@ -64,7 +67,8 @@ bool AFGCreatureSpawner::IsTimeForCreature() const{ return bool(); } void AFGCreatureSpawner::CreatureDied(AActor* thisActor){ } bool AFGCreatureSpawner::PopulateSpawnData(){ return bool(); } float AFGCreatureSpawner::GetSpawnDistance() const{ return float(); } -void AFGCreatureSpawner::UpdateScannableState(){ } void AFGCreatureSpawner::TryRecoupleCreatureAndSpawner(){ } void AFGCreatureSpawner::RegisterAsNavigationInvoker(bool shouldRegister){ } void AFGCreatureSpawner::TraceForNearbyBase(){ } + +const FName AFGCreatureSpawner::CreatureClassPropertyName = FName(); diff --git a/Source/FactoryGame/Private/Equipment/FGBuildGunPaint.cpp b/Source/FactoryGame/Private/Equipment/FGBuildGunPaint.cpp index d4b878f6ac..3c291e0a06 100644 --- a/Source/FactoryGame/Private/Equipment/FGBuildGunPaint.cpp +++ b/Source/FactoryGame/Private/Equipment/FGBuildGunPaint.cpp @@ -36,6 +36,8 @@ void UFGBuildGunStatePaint::CreateStencilProxy(AActor* selected){ } void UFGBuildGunStatePaint::DestroyStencilProxies(bool destroyComponents){ } void UFGBuildGunStatePaint::Server_ExecutePrimaryFire_Implementation(){ } void UFGBuildGunStatePaint::Server_ExecutePaint_Implementation(uint8 mode, FFactoryCustomizationData customizationData, AActor* hitActor){ } +void UFGBuildGunStatePaint::Server_SetActiveRecipe_Implementation(TSubclassOf customizationRecipe){ } +void UFGBuildGunStatePaint::Server_SetCustomizeClassFilter_Implementation(TSubclassOf actorToFilter){ } void UFGBuildGunStatePaint::SetActiveCustomization(TSubclassOf< UFGFactoryCustomizationDescriptor > customizationDesc){ } void UFGBuildGunStatePaint::SetActiveSwatchDesc(TSubclassOf< UFGFactoryCustomizationDescriptor_Swatch > swatchDesc){ } void UFGBuildGunStatePaint::SetActivePatternDesc(TSubclassOf< UFGFactoryCustomizationDescriptor_Pattern > patternDesc){ } @@ -45,6 +47,7 @@ void UFGBuildGunStatePaint::RemoveCustomization(TSubclassOf< UFGFactoryCustomiza void UFGBuildGunStatePaint::ClearAllCustomizations(){ } void UFGBuildGunStatePaint::SetActiveRecipe(TSubclassOf< UFGCustomizationRecipe > customizationRecipe){ } void UFGBuildGunStatePaint::SetCustomizeClassFilter(AActor* actorToFilter){ } +void UFGBuildGunStatePaint::SetCustomizeClassFilter_Internal(TSubclassOf actorClass, TSubclassOf itemDesc){ } bool UFGBuildGunStatePaint::IsCustomizationActive(TSubclassOf< UFGFactoryCustomizationDescriptor > customization){ return bool(); } bool UFGBuildGunStatePaint::IsRecipeActive(TSubclassOf< UFGCustomizationRecipe > inClass){ return bool(); } TArray< FItemAmount > UFGBuildGunStatePaint::GetCustomizationCost() const{ return TArray(); } diff --git a/Source/FactoryGame/Private/Equipment/FGWeapon.cpp b/Source/FactoryGame/Private/Equipment/FGWeapon.cpp index 2771a4a7bc..5f2082a7c5 100644 --- a/Source/FactoryGame/Private/Equipment/FGWeapon.cpp +++ b/Source/FactoryGame/Private/Equipment/FGWeapon.cpp @@ -56,6 +56,7 @@ bool AFGWeapon::CanReload() const{ return bool(); } float AFGWeapon::GetReloadTimeLeft() const{ return float(); } FVector AFGWeapon::GetWeaponMeshSocketLocation_Implementation(FName socketName) const{ return FVector(); } void AFGWeapon::Server_CycleDesiredAmmunitionType_Implementation(){ } +class UAnimSequence* AFGWeapon::GetNobeliskWeaponIdleAnimationOverride() const{ return nullptr; } void AFGWeapon::CycleDesiredAmmunitionType(){ } void AFGWeapon::Server_SetDesiredAmmoClass_Implementation(TSubclassOf< UFGAmmoType > newDesiredAmmoClass){ } void AFGWeapon::SetDesiredAmmoClass(TSubclassOf< UFGAmmoType > newDesiredAmmoClass){ } diff --git a/Source/FactoryGame/Private/FGBuildableSubsystem.cpp b/Source/FactoryGame/Private/FGBuildableSubsystem.cpp index 0ac7211fda..bea61cd2cf 100644 --- a/Source/FactoryGame/Private/FGBuildableSubsystem.cpp +++ b/Source/FactoryGame/Private/FGBuildableSubsystem.cpp @@ -106,6 +106,7 @@ bool AFGBuildableSubsystem::RemoveConveyorFromBucket(AFGBuildableConveyorBase* c void AFGBuildableSubsystem::RearrangeConveyorBuckets(int32 emptiedBucketID){ } void AFGBuildableSubsystem::RemoveAndSplitConveyorBucket(AFGBuildableConveyorBase* conveyorToRemove){ } bool AFGBuildableSubsystem::IsServerSubSystem() const{ return bool(); } +int32 AFGBuildableSubsystem::GetBuildableCount(TSubclassOf buildableClass) const{ return int32(); } void AFGBuildableSubsystem::GetTypedBuildable(TSubclassOf< AFGBuildable > inClass, TArray< AFGBuildable* >& out_buildables) const{ } void AFGBuildableSubsystem::GetOcclusionAffectingBuildebles(TArray& Out, const FVector& RequestLocation, float Range, bool bParallel) const{ } void AFGBuildableSubsystem::GetNearestBuildables(TArray& Out, const FVector& RequestLocation, float Range) const{ } diff --git a/Source/FactoryGame/Private/FGCharacterPlayer.cpp b/Source/FactoryGame/Private/FGCharacterPlayer.cpp index 633944e632..12deb73bef 100644 --- a/Source/FactoryGame/Private/FGCharacterPlayer.cpp +++ b/Source/FactoryGame/Private/FGCharacterPlayer.cpp @@ -544,6 +544,8 @@ void AFGCharacterPlayer::FadeDamageIndicator(float deltaTime){ } void AFGCharacterPlayer::TickFlashlight(){ } void AFGCharacterPlayer::RadiationIntensityUpdated(){ } bool AFGCharacterPlayer::IsPlayerInOrAboveWater(const FVector& hitPosition) const{ return bool(); } +void AFGCharacterPlayer::ActivateCameraComponents(){ } +void AFGCharacterPlayer::DeactivateCameraComponents(){ } void AFGCharacterPlayer::OnActiveEquipmentChangedInSlot(EEquipmentSlot slot){ } FOnPersistentEquipmentActivated AFGCharacterPlayer::OnPersistentEquipmentActivated = FOnPersistentEquipmentActivated(); FOnEquipmentEquipped AFGCharacterPlayer::OnEquipmentEquipped = FOnEquipmentEquipped(); diff --git a/Source/FactoryGame/Private/FGCheatManager.cpp b/Source/FactoryGame/Private/FGCheatManager.cpp index d37c4d6feb..dc69b7c7b9 100644 --- a/Source/FactoryGame/Private/FGCheatManager.cpp +++ b/Source/FactoryGame/Private/FGCheatManager.cpp @@ -80,6 +80,8 @@ void UFGCheatManager::RunGameplayTest(TSubclassOf gamepla void UFGCheatManager::Server_RunGameplayTest_Implementation(TSubclassOf gameplayTest){ } void UFGCheatManager::Server_SetSAMIntensity_Implementation(int32 newSAMIntensity){ } void UFGCheatManager::SetSAMIntensity(int32 newSAMIntensity){ } +void UFGCheatManager::SpawnFallingGiftBundle(){ } +void UFGCheatManager::Server_SpawnFallingGiftBundle_Implementation(){ } void UFGCheatManager::Server_Creature_CanAttackEachother_Implementation(bool canAttack){ } void UFGCheatManager::Creature_CanAttackEachother(bool canAttack){ } void UFGCheatManager::Creature_SetStressEnabled(bool enable){ } diff --git a/Source/FactoryGame/Private/FGConveyorChainSubsystem.cpp b/Source/FactoryGame/Private/FGConveyorChainSubsystem.cpp index 9510d85668..6ca51cef5c 100644 --- a/Source/FactoryGame/Private/FGConveyorChainSubsystem.cpp +++ b/Source/FactoryGame/Private/FGConveyorChainSubsystem.cpp @@ -49,3 +49,5 @@ void AFGConveyorChainSubsystem::OnRep_ServerFactoryTickTime(float oldValue){ } float AFGConveyorChainSubsystem::GetAndConsumeClientTimeDebt(float updateDelta){ return float(); } float AFGConveyorChainSubsystem::GetAverageServerTickDeltaTime(){ return float(); } bool AFGConveyorChainSubsystem::IsUnusuallyLargeTickDelta(){ return bool(); } + +FGetAdditionalConveyorItemDescriptors AFGConveyorChainSubsystem::GetAdditionalItemDescriptors; diff --git a/Source/FactoryGame/Private/FGCreatureSubsystem.cpp b/Source/FactoryGame/Private/FGCreatureSubsystem.cpp index 9597173f0f..a709f80220 100644 --- a/Source/FactoryGame/Private/FGCreatureSubsystem.cpp +++ b/Source/FactoryGame/Private/FGCreatureSubsystem.cpp @@ -33,7 +33,7 @@ TSubclassOf< class UFGNoise > AFGCreatureSubsystem::GetNoiseClassFromFName(const TSubclassOf< class UFGNoise > AFGCreatureSubsystem::GetNoiseClassFromStimulus(const FAIStimulus& stimulus) const{ return TSubclassOf(); } void AFGCreatureSubsystem::AddCreatureClassOverride(TSubclassOf< AFGCreature > classToReplace, TSubclassOf< AFGCreature > overrideClass, ECreatureReplaceAction replaceAction){ } void AFGCreatureSubsystem::AddCreatureClassOverride(const FCreatureClassOverride& creatureOverride, ECreatureReplaceAction replaceAction){ } -void AFGCreatureSubsystem::RemoveCreatureClassOverride(TSubclassOf< AFGCreature > creatureClass, bool updateScannableState){ } +void AFGCreatureSubsystem::RemoveCreatureClassOverride(TSubclassOf< AFGCreature > creatureClass){ } AFGCreature* AFGCreatureSubsystem::BeginSpawningCreature(TSubclassOf< AFGCreature > creatureClass, const FTransform& spawnTransform){ return nullptr; } void AFGCreatureSubsystem::SetArachnidCreaturesDisabled(bool disabled, ECreatureReplaceAction replaceAction){ } TSubclassOf< AFGCreature > AFGCreatureSubsystem::GetOverriddenCreatureClass(TSubclassOf< AFGCreature > creatureClass) const{ return TSubclassOf(); } diff --git a/Source/FactoryGame/Private/FGDynamicStruct.cpp b/Source/FactoryGame/Private/FGDynamicStruct.cpp index 6c0686cd06..860cc89c66 100644 --- a/Source/FactoryGame/Private/FGDynamicStruct.cpp +++ b/Source/FactoryGame/Private/FGDynamicStruct.cpp @@ -75,6 +75,7 @@ bool FFGDynamicStruct::Serialize( FArchive& Ar ) } return true; } +bool FFGDynamicStruct::NetSerialize(FArchive& Ar, class UPackageMap* Map, bool& bOutSuccess){ return bool(); } FFGDynamicStruct::FFGDynamicStruct(){ } FFGDynamicStruct::FFGDynamicStruct(const FFGDynamicStruct& other){ } diff --git a/Source/FactoryGame/Private/FGEventSubsystem.cpp b/Source/FactoryGame/Private/FGEventSubsystem.cpp index e1ace76434..067424a6f7 100644 --- a/Source/FactoryGame/Private/FGEventSubsystem.cpp +++ b/Source/FactoryGame/Private/FGEventSubsystem.cpp @@ -3,20 +3,30 @@ #include "FGEventSubsystem.h" #include "Net/UnrealNetwork.h" -AFGEventSubsystem::AFGEventSubsystem() : Super() { - this->bIsReplicated = false; -} +AFGEventSubsystem::AFGEventSubsystem() : Super() { } +void AFGEventSubsystem::BeginPlay(){ Super::BeginPlay(); } void AFGEventSubsystem::GetLifetimeReplicatedProps(TArray& OutLifetimeProps) const { Super::GetLifetimeReplicatedProps(OutLifetimeProps); DOREPLIFETIME(AFGEventSubsystem, mCurrentEvents); } AFGEventSubsystem* AFGEventSubsystem::Get(UWorld* world){ return nullptr; } AFGEventSubsystem* AFGEventSubsystem::GetEventSubsystem(UObject* worldContext){ return nullptr; } -TArray< EEvents > AFGEventSubsystem::GetCurrentEvents(){ return TArray(); } +const TArray& AFGEventSubsystem::GetCurrentEvents() const{ return *(new TArray); } +void AFGEventSubsystem::StoreCurrentCalendarData(const FCalendarData& calendarData){ } void AFGEventSubsystem::StoreCalendarData(TSubclassOf calendarRewardClass, const FCalendarData& calendarData){ } -bool AFGEventSubsystem::GetStoredCalendarData(TSubclassOf calendarRewardClass, FCalendarData& out_calendarData) const{ return bool(); } +const FCalendarData* AFGEventSubsystem::GetStoredCalendarData(TSubclassOf calendarRewardClass) const{ return nullptr; } +const FCalendarData* AFGEventSubsystem::GetStoredCurrentCalendarData() const{ return nullptr; } +FCalendarData* AFGEventSubsystem::GetStoredCalendarData(TSubclassOf calendarRewardClass){ return nullptr; } +FCalendarData* AFGEventSubsystem::GetStoredCurrentCalendarData(){ return nullptr; } bool AFGEventSubsystem::CanOpenCalendarSlot(EEvents event, int32 dayNumber){ return bool(); } +void AFGEventSubsystem::OnPlayerOpenedCalendar(class AFGCharacterPlayer* player, class AFGBuildableCalendar* calendar){ } +const TSet& AFGEventSubsystem::GetPlayersThatHaveSeenCalendar(TSubclassOf calendar){ return *(new TSet()); } +const TSet& AFGEventSubsystem::GetPlayersThatHaveSeenCurrentCalendar(){ return *(new TSet()); } +class AFGGiftRainSpawner* AFGEventSubsystem::GetRandomActiveGiftRainSpawner() const{ return nullptr; } +class AFGGiftRainSpawner* AFGEventSubsystem::GetGiftRainSpawnerForEvent(EEvents event) const{ return nullptr; } bool AFGEventSubsystem::GetOverridenEventDateTime(EEvents event, FDateTime& out_OverriddenDateTime){ return bool(); } bool AFGEventSubsystem::ShouldRunEvent(const FSimpleDate& Begin, const FSimpleDate& End, const FDateTime& now){ return bool(); } +void AFGEventSubsystem::OnBeginEvent_Native(EEvents event){} +void AFGEventSubsystem::CacheActiveEvents(){} TSubclassOf AFGEventSubsystem::GetCalendarClassForCurrentEvent(){ return TSubclassOf(); } TSubclassOf AFGEventSubsystem::GetHubMiniGameClassForCurrentEvent(){ return TSubclassOf(); } diff --git a/Source/FactoryGame/Private/FGFactoryColoringTypes.cpp b/Source/FactoryGame/Private/FGFactoryColoringTypes.cpp index bdf038c069..8be1c419f8 100644 --- a/Source/FactoryGame/Private/FGFactoryColoringTypes.cpp +++ b/Source/FactoryGame/Private/FGFactoryColoringTypes.cpp @@ -1,6 +1,7 @@ // This file has been automatically generated by the Unreal Header Implementation tool #include "FGFactoryColoringTypes.h" +#include "FGInventoryComponent.h" UFGFactoryCustomizationDescriptor::UFGFactoryCustomizationDescriptor() : Super() { this->mIcon = nullptr; @@ -22,4 +23,5 @@ UFGFactoryCustomizationCollection::UFGFactoryCustomizationCollection() : Super() void FFactoryCustomizationData::Initialize( AFGGameState* gameState, int32 forceDataSize){ } void FFactoryCustomizationData::InlineCombine(const FFactoryCustomizationData& other){ } void FFactoryCustomizationData::UpdateHasPowerData(){ } -void FFactoryCustomizationData::GetCustomizationArray(TArray< TSubclassOf < UFGFactoryCustomizationDescriptor > >& out_customizations){ } +void FFactoryCustomizationData::GetAppliedRecipes(class UWorld* worldContext, TArray>& out_recipes) const{ } +TArray FFactoryCustomizationData::GetCustomizationRefunds(class UWorld* worldContext, const FFactoryCustomizationData& baseCustomizationData, const FFactoryCustomizationData* newCustomizationData) { return TArray(); } diff --git a/Source/FactoryGame/Private/FGFallingGiftBundle.cpp b/Source/FactoryGame/Private/FGFallingGiftBundle.cpp new file mode 100644 index 0000000000..2dca364373 --- /dev/null +++ b/Source/FactoryGame/Private/FGFallingGiftBundle.cpp @@ -0,0 +1,41 @@ +#include "FGFallingGiftBundle.h" + +AFGFallingGiftBundle::AFGFallingGiftBundle(){ } +void AFGFallingGiftBundle::BeginPlay(){ Super::BeginPlay(); } +void AFGFallingGiftBundle::Tick(float DeltaSeconds){ Super::Tick(DeltaSeconds); } +void AFGFallingGiftBundle::GetLifetimeReplicatedProps(TArray& OutLifetimeProps) const{ Super::GetLifetimeReplicatedProps(OutLifetimeProps); } +void AFGFallingGiftBundle::PostNetReceiveLocationAndRotation(){ Super::PostNetReceiveLocationAndRotation(); } +void AFGFallingGiftBundle::PreSaveGame_Implementation(int32 saveVersion, int32 gameVersion){ } +void AFGFallingGiftBundle::PostSaveGame_Implementation(int32 saveVersion, int32 gameVersion){ } +void AFGFallingGiftBundle::PreLoadGame_Implementation(int32 saveVersion, int32 gameVersion){ } +void AFGFallingGiftBundle::PostLoadGame_Implementation(int32 saveVersion, int32 gameVersion){ } +void AFGFallingGiftBundle::GatherDependencies_Implementation(TArray& out_dependentObjects){ } +bool AFGFallingGiftBundle::NeedTransform_Implementation(){ return bool(); } +bool AFGFallingGiftBundle::ShouldSave_Implementation() const{ return bool(); } +void AFGFallingGiftBundle::GainedSignificance_Implementation(){ } +void AFGFallingGiftBundle::LostSignificance_Implementation(){ } +void AFGFallingGiftBundle::UpdateUseState_Implementation(class AFGCharacterPlayer* byCharacter, const FVector& atLocation, class UPrimitiveComponent* componentHit, FUseState& out_useState){ } +void AFGFallingGiftBundle::OnUse_Implementation(class AFGCharacterPlayer* byCharacter, const FUseState& state){ } +void AFGFallingGiftBundle::OnUseStop_Implementation(class AFGCharacterPlayer* byCharacter, const FUseState& state){ } +bool AFGFallingGiftBundle::IsUseable_Implementation() const{ return bool(); } +void AFGFallingGiftBundle::StartIsLookedAt_Implementation(class AFGCharacterPlayer* byCharacter, const FUseState& state){ } +FText AFGFallingGiftBundle::GetLookAtDecription_Implementation(class AFGCharacterPlayer* byCharacter, const FUseState& state) const{ return FText(); } +void AFGFallingGiftBundle::StopIsLookedAt_Implementation(class AFGCharacterPlayer* byCharacter, const FUseState& state){ } +float AFGFallingGiftBundle::GetFallingSpeed() const{ return float(); } +void AFGFallingGiftBundle::SetIsFalling(bool isFalling){ } +bool AFGFallingGiftBundle::CanBePickedUp(class AFGCharacterPlayer* byCharacter) const{ return bool(); } +void AFGFallingGiftBundle::SelectNewRandomReward(){ } +void AFGFallingGiftBundle::HandleLanding(const FHitResult& sweepResult){ } +void AFGFallingGiftBundle::OnRep_IsFalling(){ } +void AFGFallingGiftBundle::OnRep_SelectedRandomRewardIndex(){ } +void AFGFallingGiftBundle::OnRep_WasPickedUp(){ } +void AFGFallingGiftBundle::OnRep_HasLanded(){ } +void AFGFallingGiftBundle::PickupByPlayer(class AFGCharacterPlayer* player){ } +void AFGFallingGiftBundle::CacheExpectedLandingZ(){ } +void AFGFallingGiftBundle::Multicast_PickedUpByPlayer_Implementation(class AFGCharacterPlayer* player){ } +void AFGFallingGiftBundle::OnLostSignificance_Implementation(){ } +void AFGFallingGiftBundle::OnGainedSignificance_Implementation(){ } +void AFGFallingGiftBundle::OnPickup_Implementation(AFGCharacterPlayer* player){ } +void AFGFallingGiftBundle::OnLanded_Implementation(){ } +void AFGFallingGiftBundle::OnStopFalling_Implementation(){ } +void AFGFallingGiftBundle::OnBeginFalling_Implementation(){ } diff --git a/Source/FactoryGame/Private/FGGiftRainSpawner.cpp b/Source/FactoryGame/Private/FGGiftRainSpawner.cpp new file mode 100644 index 0000000000..9804ae5571 --- /dev/null +++ b/Source/FactoryGame/Private/FGGiftRainSpawner.cpp @@ -0,0 +1,20 @@ +#include "FGGiftRainSpawner.h" + +AFGGiftRainSpawner::AFGGiftRainSpawner(){ } +void AFGGiftRainSpawner::BeginPlay(){ Super::BeginPlay(); } +bool AFGGiftRainSpawner::ShouldAutomaticallySpawnGifts() const{ return bool(); } +void AFGGiftRainSpawner::SetAutomaticGiftSpawningEnabled(bool enabled){ } +void AFGGiftRainSpawner::SetGiftSpawnIntervalMinMax(float intervalSecondsMin, float intervalSecondsMax){ } +void AFGGiftRainSpawner::SetGiftSpawnInterval(const FFloatInterval& intervalSeconds){ } +void AFGGiftRainSpawner::SetAutomaticGiftSpawnLimit(int32 newLimit){ } +void AFGGiftRainSpawner::SetGiftBundleClassBlockedFromSpawning(TSubclassOf giftBundleClass, bool blocked){ } +void AFGGiftRainSpawner::OnGiftBundleSpawned_Native(class AFGFallingGiftBundle* giftBundle){ } +void AFGGiftRainSpawner::GetRelevantPlayerCharacters(TArray& out_playerCharacters) const{ } +void AFGGiftRainSpawner::OnGiftBundleActorDestroyed(AActor* giftBundleActor){ } +void AFGGiftRainSpawner::OnGiftSpawnerTimerFinished(){ } +void AFGGiftRainSpawner::UpdateGiftSpawnerTimer(){ } +int32 AFGGiftRainSpawner::TryDestroyOldestGiftBundles(int32 numToDestroy) const{ return int32(); } +TSubclassOf AFGGiftRainSpawner::GetGiftBundleClassToSpawn_Implementation(){ return TSubclassOf(); } +class AFGFallingGiftBundle* AFGGiftRainSpawner::SpawnRandomGiftAroundAnyPlayer(float spawnDistance){ return nullptr; } +class AFGFallingGiftBundle* AFGGiftRainSpawner::SpawnRandomGiftAroundPlayer(class AFGCharacterPlayer* player, float spawnDistance){ return nullptr; } +class AFGFallingGiftBundle* AFGGiftRainSpawner::SpawnRandomGiftAtLocation(const FVector& location){ return nullptr; } diff --git a/Source/FactoryGame/Private/FGHUD.cpp b/Source/FactoryGame/Private/FGHUD.cpp index 6e8f7b0d09..d60aadb761 100644 --- a/Source/FactoryGame/Private/FGHUD.cpp +++ b/Source/FactoryGame/Private/FGHUD.cpp @@ -43,6 +43,8 @@ void AFGHUD::OnActorRepresentationAdded(UFGActorRepresentation* actorRepresentat void AFGHUD::OnActorRepresentationRemoved(UFGActorRepresentation* actorRepresentation){ } void AFGHUD::OnActorRepresentationUpdated(UFGActorRepresentation* actorRepresentation){ } void AFGHUD::OnActorRepresentationFiltered(ERepresentationType type, bool visible){ } +void AFGHUD::OnCultureChanged(){ } +void AFGHUD::InvalidateCachedTextDimensionsAndGlyphs(){ } void AFGHUD::SetCompassEntryVisibility(UFGActorRepresentation* actorRepresentation, bool visible){ } void AFGHUD::RegisterCardinalCompassDirections(){ } void AFGHUD::OnSetupBinds(){ } diff --git a/Source/FactoryGame/Private/FGInventoryComponent.cpp b/Source/FactoryGame/Private/FGInventoryComponent.cpp index 77be37a3ad..e702c37a11 100644 --- a/Source/FactoryGame/Private/FGInventoryComponent.cpp +++ b/Source/FactoryGame/Private/FGInventoryComponent.cpp @@ -63,6 +63,7 @@ int32 UFGInventoryComponent::FindFirstIndexWithItemType(TSubclassOf& stacks){ } int32 UFGInventoryComponent::AddStackToIndex(const int32 idx, const FInventoryStack& stack, const bool allowPartialAdd , UFGInventoryComponent* sourceInventory){ return int32(); } +int32 UFGInventoryComponent::AddStackToIndex_Unsafe(const int32 idx, const FInventoryStack& stack, const bool allowPartialAdd, UFGInventoryComponent* sourceInventory){ return int32(); } bool UFGInventoryComponent::GetStackFromIndex(const int32 idx, FInventoryStack& out_stack) const{ return bool(); } void UFGInventoryComponent::Remove(TSubclassOf< UFGItemDescriptor > itemClass, int32 num){ } void UFGInventoryComponent::RemoveFromIndex(const int32 idx, const int32 num, UFGInventoryComponent* targetInventory){ } diff --git a/Source/FactoryGame/Private/FGItemPickup.cpp b/Source/FactoryGame/Private/FGItemPickup.cpp index 04abe05f8c..1db6d7347c 100644 --- a/Source/FactoryGame/Private/FGItemPickup.cpp +++ b/Source/FactoryGame/Private/FGItemPickup.cpp @@ -59,6 +59,8 @@ FText AFGItemPickup::GetLookAtDecription_Implementation( AFGCharacterPlayer* byC void AFGItemPickup::StopIsLookedAt_Implementation( AFGCharacterPlayer* byCharacter, const FUseState& state){ } void AFGItemPickup::PickUpByCharacter(AFGCharacterPlayer* byCharacter){ } const AFGPlayerController* AFGItemPickup::EatenByCreature(const int32 amount){ return nullptr; } +bool AFGItemPickup::CanEverRespawn() const{ return bool(); } +bool AFGItemPickup::CanBePickedUp(class AFGCharacterPlayer* byCharacter) const{ return bool(); } void AFGItemPickup::Multicast_PlayPickupEffect_Implementation(){ } float AFGItemPickup::GetNormalizedCollectionProgress(){ return float(); } void AFGItemPickup::RespawnItems(){ } diff --git a/Source/FactoryGame/Private/FGItemPickup_Spawnable.cpp b/Source/FactoryGame/Private/FGItemPickup_Spawnable.cpp index fe505f4ec6..6c64eabac9 100644 --- a/Source/FactoryGame/Private/FGItemPickup_Spawnable.cpp +++ b/Source/FactoryGame/Private/FGItemPickup_Spawnable.cpp @@ -19,8 +19,11 @@ bool AFGItemPickup_Spawnable::NeedTransform_Implementation(){ return bool(); } void AFGItemPickup_Spawnable::UpdateUseState_Implementation( AFGCharacterPlayer* byCharacter, const FVector& atLocation, UPrimitiveComponent* componentHit, FUseState& out_useState){ } void AFGItemPickup_Spawnable::StopIsLookedAt_Implementation( AFGCharacterPlayer* byCharacter, const FUseState& state){ } bool AFGItemPickup_Spawnable::ShouldBeRegisteredForPickup() const{ return bool(); } -AFGItemPickup_Spawnable* AFGItemPickup_Spawnable::CreateItemDrop(UFGInventoryComponent* inventoryComponent, UWorld* world, const FInventoryStack& item, FVector spawnLocation, FRotator spawnRotation, TSubclassOf< AFGItemPickup_Spawnable> itemDropClass , ULevel* spawnLevelOverride , FName spawnNameOverride){ return nullptr; } +bool AFGItemPickup_Spawnable::CanEverRespawn() const{ return Super::CanEverRespawn(); } +AFGItemPickup_Spawnable* AFGItemPickup_Spawnable::CreateItemDrop( UFGInventoryComponent* inventoryComponent, UWorld* world, const FInventoryStack& item, const FVector& spawnLocation, const FRotator& spawnRotation, TSubclassOf< AFGItemPickup_Spawnable> itemDropClass, ULevel* spawnLevelOverride, FName spawnNameOverride){ return nullptr; } void AFGItemPickup_Spawnable::OnColorUpdated(int32 index){ } +void AFGItemPickup_Spawnable::ConfigureMeshComponent(const FInventoryStack& item){ } +void AFGItemPickup_Spawnable::SetCanMove(bool canMove){ } AFGItemPickup_Spawnable* AFGItemPickup_Spawnable::AddItemToWorldStackAtLocation(UFGInventoryComponent* inventoryComponent, const FInventoryStack& item, const FVector& spawnLocation, const FRotator& spawnRotation, TSubclassOf< AFGItemPickup_Spawnable > itemDropClass){ return nullptr; } void AFGItemPickup_Spawnable::CreateItemDropsInCylinder( UWorld* world, const TArray& items, FVector aroundLocation, float sphereRadius, const TArray& actorsToIgnore, TArray& out_itemDrops, TSubclassOf itemDropClass){ } void AFGItemPickup_Spawnable::SpawnInventoryCrate( UWorld* world, const TArray< FInventoryStack >& items, FVector spawnLocation, const TArray& actorsToIgnore, AFGCrate*& out_Crate, EFGCrateType crateType , TSubclassOf< AFGCrate > crateClass){ } diff --git a/Source/FactoryGame/Private/FGObjectReference.cpp b/Source/FactoryGame/Private/FGObjectReference.cpp index 6a48726ff7..ae1827831e 100644 --- a/Source/FactoryGame/Private/FGObjectReference.cpp +++ b/Source/FactoryGame/Private/FGObjectReference.cpp @@ -16,6 +16,7 @@ void FObjectReferenceDisc::Set(const UObject* obj){ } void FObjectReferenceDisc::ParseObjectName(FString& out_objName) const{ } void FObjectReferenceDisc::ParseObjectNameAndPath(FString& out_objPath, FString& out_objName) const{ } FString FObjectReferenceDisc::GetSubPathString() const{ return FString(); } +FString FObjectReferenceDisc::GetTopLevelActorName() const{ return FString(); } void FObjectReferenceDisc::GetRelativePath(const UObject* obj, FString& out_pathName){ } const ULevel* FObjectReferenceDisc::FindOuterLevel(const UObject* obj){ return nullptr; } const UWorldPartitionRuntimeCell* FObjectReferenceDisc::FindWorldPartitionCell(const UWorld* world, const FString& levelName){ return nullptr; } diff --git a/Source/FactoryGame/Private/FGRecipeManager.cpp b/Source/FactoryGame/Private/FGRecipeManager.cpp index 1c265ed387..40ad30862b 100644 --- a/Source/FactoryGame/Private/FGRecipeManager.cpp +++ b/Source/FactoryGame/Private/FGRecipeManager.cpp @@ -30,6 +30,7 @@ bool AFGRecipeManager::ShouldSave_Implementation() const{ return bool(); } void AFGRecipeManager::AddAvailableRecipe(TSubclassOf< UFGRecipe > recipe){ } void AFGRecipeManager::GetAllAvailableRecipes(TArray< TSubclassOf< UFGRecipe > >& out_recipes){ } void AFGRecipeManager::GetAllAvailableCustomizationRecipes(TArray< TSubclassOf< UFGCustomizationRecipe > >& out_recipes){ } +TSubclassOf AFGRecipeManager::GetCustomizationRecipeFromDesc(TSubclassOf desc){ return TSubclassOf(); } void AFGRecipeManager::GetAvailableRecipesForProducer(TSubclassOf< UObject > forProducer, TArray< TSubclassOf< UFGRecipe > >& out_recipes){ } void AFGRecipeManager::GetAffordableRecipesForProducer( AFGCharacterPlayer* player, TSubclassOf< UObject > forProducer, TArray< TSubclassOf< UFGRecipe > >& out_recipes){ } bool AFGRecipeManager::IsRecipeAvailable(TSubclassOf< UFGRecipe > recipeClass) const{ return bool(); } diff --git a/Source/FactoryGame/Private/FGScannableSubsystem.cpp b/Source/FactoryGame/Private/FGScannableSubsystem.cpp index ed83b9e115..c50a27904d 100644 --- a/Source/FactoryGame/Private/FGScannableSubsystem.cpp +++ b/Source/FactoryGame/Private/FGScannableSubsystem.cpp @@ -16,9 +16,6 @@ void AFGScannableSubsystem::RegisterRadarTower( AFGBuildableRadarTower* radarTow void AFGScannableSubsystem::UnRegisterRadarTower( AFGBuildableRadarTower* radarTower){ } void AFGScannableSubsystem::OnLevelPlacedActorDestroyed(AActor* destroyedActor){ } void AFGScannableSubsystem::OnDropPodLooted( AFGDropPod* dropPod){ } -void AFGScannableSubsystem::OnCreatureSpawnerUpdated( AFGCreatureSpawner* creatureSpawner, bool scannable){ } -void AFGScannableSubsystem::OnCreatureSpawnerAdded( AFGCreatureSpawner* creatureSpawner){ } -void AFGScannableSubsystem::OnCreatureSpawnerRemoved( AFGCreatureSpawner* creatureSpawner){ } bool AFGScannableSubsystem::DoesPickupExist(const FGuid& PickupGuid) const{ return bool(); } bool AFGScannableSubsystem::HasDropPodBeenLooted(const FGuid& dropPodGuid) const { return bool(); } -void AFGScannableSubsystem::AssignScannableData(const TArray& itemPickups, const TArray& dropPods){ } +void AFGScannableSubsystem::AssignScannableData( const class AFGWorldScannableDataGenerator* sourceGenerator ){ } diff --git a/Source/FactoryGame/Private/FGStorySubsystem.cpp b/Source/FactoryGame/Private/FGStorySubsystem.cpp index 58ecfc017d..9b8940cc79 100644 --- a/Source/FactoryGame/Private/FGStorySubsystem.cpp +++ b/Source/FactoryGame/Private/FGStorySubsystem.cpp @@ -25,6 +25,9 @@ void AFGStorySubsystem::OnItemManuallyCrafted(AFGPlayerState* playerState, const void AFGStorySubsystem::OnBuildingBuilt(AFGPlayerState* playerState, TSubclassOf< AActor > builtActor, int64 totalBuildCount){ } void AFGStorySubsystem::OnBuildingDismantled(AFGPlayerState* playerState, TSubclassOf< AActor > builtActor, int64 totalDismantledCount){ } void AFGStorySubsystem::OnFirstItemSinkFailure(TSubclassOf itemFailedToSink){ } +void AFGStorySubsystem::OnCalendarSlotUnlocked(int32 slot, bool isRandomUnlock, class UFGUnlock* unlock){ } +void AFGStorySubsystem::OnCalendarOpenedByPlayer(class AFGCharacterPlayer* byCharacter, class AFGBuildableCalendar* calendar, bool firstTime){ } +void AFGStorySubsystem::OnPlayerFinishedSpawning(class AFGCharacterPlayer* player){ } void AFGStorySubsystem::OnSpaceElevatorShipmentLockedIn(AFGPlayerState* playerState, UFGGamePhase* gamePhase){ } void AFGStorySubsystem::OnSpaceElevatorFullyBuilt(){ } void AFGStorySubsystem::ForwardMessagesToGameUI(const TArray& messages){ } diff --git a/Source/FactoryGame/Private/FGWorldScannableData.cpp b/Source/FactoryGame/Private/FGWorldScannableData.cpp index 2de4920e6a..8abb6da62e 100644 --- a/Source/FactoryGame/Private/FGWorldScannableData.cpp +++ b/Source/FactoryGame/Private/FGWorldScannableData.cpp @@ -6,6 +6,7 @@ #include "FGScannableSubsystem.h" #include "FGItemPickup.h" #include "FGDropPod.h" +#include "Creature/FGCreatureSpawner.h" #include "WorldPartition/WorldPartition.h" #if WITH_EDITOR #include "WorldPartition/WorldPartitionActorDesc.h" @@ -49,6 +50,20 @@ FWorldScannableData::FWorldScannableData(const FWorldPartitionActorDesc* ActorDe } } +FCreatureSpawnerWorldScannableData::FCreatureSpawnerWorldScannableData(const AFGCreatureSpawner* actor) : FWorldScannableData(actor) +{ + if (actor) { + CreatureClass = actor->GetCreatureToSpawn(); + } +} + +FCreatureSpawnerWorldScannableData::FCreatureSpawnerWorldScannableData(const FWorldPartitionActorDesc* ActorDesc, int32 PIEInstanceIndex) : FWorldScannableData(ActorDesc, PIEInstanceIndex) +{ + if (AFGCreatureSpawner* actor = Cast(Actor.Get())) { + CreatureClass = actor->GetCreatureToSpawn(); + } +} + #endif AFGWorldScannableDataGenerator::AFGWorldScannableDataGenerator() @@ -72,7 +87,7 @@ void AFGWorldScannableDataGenerator::BeginPlay() #endif if (AFGScannableSubsystem* scannableSubsystem = AFGScannableSubsystem::Get(GetWorld())) { - scannableSubsystem->AssignScannableData(mItemPickups, mDropPods); + scannableSubsystem->AssignScannableData(this); } } diff --git a/Source/FactoryGame/Private/Hologram/FGBuildableSnowCannonHologram.cpp b/Source/FactoryGame/Private/Hologram/FGBuildableSnowCannonHologram.cpp new file mode 100644 index 0000000000..67d239c0b7 --- /dev/null +++ b/Source/FactoryGame/Private/Hologram/FGBuildableSnowCannonHologram.cpp @@ -0,0 +1,11 @@ +#include "Hologram/FGBuildableSnowCannonHologram.h" + +AFGBuildableSnowCannonHologram::AFGBuildableSnowCannonHologram(){ } +void AFGBuildableSnowCannonHologram::BeginPlay(){ Super::BeginPlay(); } +int32 AFGBuildableSnowCannonHologram::GetRotationStep() const{ return int32(); } +void AFGBuildableSnowCannonHologram::ScrollRotate(int32 delta, int32 step){ } +bool AFGBuildableSnowCannonHologram::DoMultiStepPlacement(bool isInputFromARelease){ return bool(); } +bool AFGBuildableSnowCannonHologram::IsValidHitResult(const FHitResult& hitResult) const{ return bool(); } +void AFGBuildableSnowCannonHologram::ConfigureActor(AFGBuildable* inBuildable) const{ } +bool AFGBuildableSnowCannonHologram::TrySnapToActor(const FHitResult& hitResult){ return bool(); } +void AFGBuildableSnowCannonHologram::SetHologramLocationAndRotation(const FHitResult& hitResult){ } diff --git a/Source/FactoryGame/Private/Hologram/FGPowerPoleHologram.cpp b/Source/FactoryGame/Private/Hologram/FGPowerPoleHologram.cpp index 44fcbd423e..d2db7d8b79 100644 --- a/Source/FactoryGame/Private/Hologram/FGPowerPoleHologram.cpp +++ b/Source/FactoryGame/Private/Hologram/FGPowerPoleHologram.cpp @@ -14,7 +14,6 @@ void AFGPowerPoleHologram::GetLifetimeReplicatedProps(TArray< FLifetimeProperty void AFGPowerPoleHologram::SetHologramLocationAndRotation(const FHitResult& hitResult){ } bool AFGPowerPoleHologram::TrySnapToActor(const FHitResult& hitResult){ return bool(); } void AFGPowerPoleHologram::PostHologramPlacement(const FHitResult& hitResult){ } -void AFGPowerPoleHologram::SpawnChildren(AActor* hologramOwner, FVector spawnLocation, APawn* hologramInstigator){ } USceneComponent* AFGPowerPoleHologram::SetupComponent(USceneComponent* attachParent, UActorComponent* componentTemplate, const FName& componentName, const FName& attachSocketName){ return nullptr; } bool AFGPowerPoleHologram::IsValidHitResult(const FHitResult& hitResult) const{ return bool(); } AActor* AFGPowerPoleHologram::GetUpgradedActor() const{ return nullptr; } @@ -26,4 +25,5 @@ void AFGPowerPoleHologram::CheckValidPlacement(){ } float AFGPowerPoleHologram::GetBuildGunRangeOverride_Implementation() const{ return float(); } bool AFGPowerPoleHologram::ShouldBuildGunHitWireMeshes() const{ return bool(); } bool AFGPowerPoleHologram::AlignWithWire(const AFGBuildableWire* wire, FVector& locationToAlign, FRotator& out_rotation) const{ return bool(); } +void AFGPowerPoleHologram::SpawnWireChildHolograms(TSubclassOf wireRecipe){ } void AFGPowerPoleHologram::ResetByproductHolograms(){ } diff --git a/Source/FactoryGame/Private/Hologram/FGPowerPoleWallHologram.cpp b/Source/FactoryGame/Private/Hologram/FGPowerPoleWallHologram.cpp index a2de0b6ae5..a599f19aa0 100644 --- a/Source/FactoryGame/Private/Hologram/FGPowerPoleWallHologram.cpp +++ b/Source/FactoryGame/Private/Hologram/FGPowerPoleWallHologram.cpp @@ -24,7 +24,6 @@ void AFGPowerPoleWallHologram::GetLifetimeReplicatedProps(TArray< FLifetimePrope void AFGPowerPoleWallHologram::Destroyed(){ Super::Destroyed(); } USceneComponent* AFGPowerPoleWallHologram::SetupComponent(USceneComponent* attachParent, UActorComponent* componentTemplate, const FName& componentName, const FName& attachSocketName){ return nullptr; } AActor* AFGPowerPoleWallHologram::Construct(TArray< AActor* >& out_children, FNetConstructionID constructionID){ return nullptr; } -void AFGPowerPoleWallHologram::SpawnChildren(AActor* hologramOwner, FVector spawnLocation, APawn* hologramInstigator){ } void AFGPowerPoleWallHologram::PostHologramPlacement(const FHitResult& hitResult){ } bool AFGPowerPoleWallHologram::IsValidHitResult(const FHitResult& hitResult) const{ return bool(); } bool AFGPowerPoleWallHologram::TryUpgrade(const FHitResult& hitResult){ return bool(); } @@ -36,4 +35,5 @@ void AFGPowerPoleWallHologram::OnInvalidHitResult(){ } bool AFGPowerPoleWallHologram::DoMultiStepPlacement(bool isInputFromARelease){ return bool(); } bool AFGPowerPoleWallHologram::ShouldBuildGunHitWireMeshes() const{ return bool(); } bool AFGPowerPoleWallHologram::AlignWithWire(const AFGBuildableWire* wire, FVector& locationToAlign, FRotator& out_rotation) const{ return bool(); } +void AFGPowerPoleWallHologram::SpawnWireChildHolograms(TSubclassOf wireRecipe){ } void AFGPowerPoleWallHologram::ResetByproductHolograms(){ } diff --git a/Source/FactoryGame/Private/Hologram/FGWireHologram.cpp b/Source/FactoryGame/Private/Hologram/FGWireHologram.cpp index dcdb0ef930..7552334146 100644 --- a/Source/FactoryGame/Private/Hologram/FGWireHologram.cpp +++ b/Source/FactoryGame/Private/Hologram/FGWireHologram.cpp @@ -36,6 +36,7 @@ void AFGWireHologram::OnInvalidHitResult(){ } void AFGWireHologram::ScrollRotate(int32 delta, int32 step){ } AActor* AFGWireHologram::GetUpgradedActor() const{ return nullptr; } bool AFGWireHologram::TryUpgrade(const FHitResult& hitResult){ return bool(); } +bool AFGWireHologram::ShouldBuildGunHitWireMeshes() const { return bool(); } void AFGWireHologram::CheckBlueprintCommingling(){ } float AFGWireHologram::GetBuildGunRangeOverride_Implementation() const{ return float(); } void AFGWireHologram::PostHologramPlacement(const FHitResult& hitResult){ } diff --git a/Source/FactoryGame/Private/SCompassWidget.cpp b/Source/FactoryGame/Private/SCompassWidget.cpp index 6bf55161e5..77fb52c1f6 100644 --- a/Source/FactoryGame/Private/SCompassWidget.cpp +++ b/Source/FactoryGame/Private/SCompassWidget.cpp @@ -30,4 +30,4 @@ FChildren* SCompassWidget::GetChildren(){ return nullptr; } void SCompassWidget::OnArrangeChildren(const FGeometry& AllottedGeometry, FArrangedChildren& ArrangedChildren) const{ } void SCompassWidget::DrawEntry(const FVector2f& RootLocation, const FCompassEntry& Entry, const FGeometry& AllottedGeometry, FSlateWindowElementList& OutDrawElements, int32& LayerId){ } void SCompassWidget::DrawEntrySpecialEffect(const FVector2f& RootLocation, const FCompassEntry& Entry, const FGeometry& AllottedGeometry, FSlateWindowElementList& OutDrawElements, int32& LayerId){ } -void SCompassWidget::UpdateEntryTextMetrics(FCompassEntry& Entry, const FSlateFontInfo& FontInfo){ } +void SCompassWidget::UpdateEntryTextRenderData(FCompassEntry& Entry, const FSlateFontInfo& FontInfo){ } diff --git a/Source/FactoryGame/Public/Audio/FGVoiceChatAudioMeterSubsystem.h b/Source/FactoryGame/Public/Audio/FGVoiceChatAudioMeterSubsystem.h new file mode 100644 index 0000000000..0dd017ca3b --- /dev/null +++ b/Source/FactoryGame/Public/Audio/FGVoiceChatAudioMeterSubsystem.h @@ -0,0 +1,55 @@ +// Copyright Coffee Stain Studios. All Rights Reserved. +#pragma once + +#include "CoreMinimal.h" +#include "FGSubsystem.h" + +#include "Audio/AudioMeter/IAudioMeterImpl.h" + +#include "FGVoiceChatAudioMeterSubsystem.generated.h" + + +/* + * This code defines a subsystem `AFGVoiceChatAudioMeterSubsystem`, which is responsible for monitoring and metering voice chat audio levels in our WWise project + * + * - The system interfaces with platform-specific audio metering implementations (e.g., Windows) to capture real-time audio peaks from active voice chat sessions. + * - The `ConvertPeakToRTPC` method maps the audio peak value (ranging from 0 to 1) to the Wwise RTPC (Real-Time Parameter Control) range of [-100, 0], representing voice activity intensity. + * - This subsystem updates two RTPCs: `mAudioMeterPeakRtpc` (for the current audio peak) and `mAudioMeterRtpc` (interpolated value). These RTPC values allow Wwise to control audio behavior dynamically, depending on the voice chat volume. + * + * The audio metering runs asynchronously, offloading calculations to a background thread, and debug information can be rendered in-game to visualize the metering values. + * The class also handles initialization and cleanup of the audio meter during the subsystem’s lifecycle. + */ + +UCLASS( config = Game, Blueprintable, defaultconfig, meta = ( DisplayName = "Voice Chat Audio Meter Subsystem" ) ) +class FACTORYGAME_API AFGVoiceChatAudioMeterSubsystem : public AFGSubsystem +{ + GENERATED_BODY() + +public: + AFGVoiceChatAudioMeterSubsystem(); + +protected: + virtual void BeginPlay() override; + virtual void EndPlay( const EEndPlayReason::Type EndPlayReason ) override; + +public: + virtual void Tick( float DeltaTime ) override; + + //RPTC for voice chat metering which ranges from -100 to 0 with default being to -100 (when no once is talking). The data is coming from the audio metering system (windows audio peaks) + UPROPERTY( EditDefaultsOnly, Category = Audio ) + class UAkRtpc* mAudioMeterPeakRtpc = nullptr; + //RPTC for voice chat metering which ranges from -100 to 0 with default being to -100 (when no once is talking). This is either -100 to 0, and is interpolating inside wwise + UPROPERTY( EditDefaultsOnly, Category = Audio ) + class UAkRtpc* mAudioMeterRtpc = nullptr; + +private: + void ConvertPeakToRTPC( float peak, float DeltaTime ); + void SetRTPC( float AudioMeterValue ); + + float mPreviousRTPCValue{ -100.0f }; + float mPreviousAudioPeak{ 0.0f }; + + bool mReadyToMonitor{ true }; + + TUniquePtr< IAudioMeterImpl > mAudioMeterImpl; +}; \ No newline at end of file diff --git a/Source/FactoryGame/Public/AvailabilityDependencies/FGCalendarOpenedDependency.h b/Source/FactoryGame/Public/AvailabilityDependencies/FGCalendarOpenedDependency.h new file mode 100644 index 0000000000..9ed6661134 --- /dev/null +++ b/Source/FactoryGame/Public/AvailabilityDependencies/FGCalendarOpenedDependency.h @@ -0,0 +1,32 @@ +// Copyright Coffee Stain Studios. All Rights Reserved. + +#pragma once + +#include "FactoryGame.h" +#include "CoreMinimal.h" +#include "AvailabilityDependencies/FGAvailabilityDependency.h" +#include "FGCalendarOpenedDependency.generated.h" + +/** + * + */ +UCLASS() +class FACTORYGAME_API UFGCalendarOpenedDependency : public UFGAvailabilityDependency +{ + GENERATED_BODY() + +public: + virtual bool AreDependenciesMet( UObject* worldContext ) const override; + + bool IsFirstTimeOnly() const { return mFirstTimeOnly; } + +#if WITH_EDITOR + virtual FString ToString() const override; + virtual void FromString( const FString& inString ) override; +#endif + +protected: + /** Whether or not this dependency should trigger only the first time a player opens the calendar. */ + UPROPERTY( EditDefaultsOnly, Category = "Dependency" ) + bool mFirstTimeOnly; +}; diff --git a/Source/FactoryGame/Public/AvailabilityDependencies/FGCalendarSlotUnlockedDependency.h b/Source/FactoryGame/Public/AvailabilityDependencies/FGCalendarSlotUnlockedDependency.h new file mode 100644 index 0000000000..df993eeef3 --- /dev/null +++ b/Source/FactoryGame/Public/AvailabilityDependencies/FGCalendarSlotUnlockedDependency.h @@ -0,0 +1,70 @@ +// Copyright Coffee Stain Studios. All Rights Reserved. + +#pragma once + +#include "FactoryGame.h" +#include "CoreMinimal.h" +#include "AvailabilityDependencies/FGAvailabilityDependency.h" +#include "Templates/SubclassOf.h" +#include "FGCalendarSlotUnlockedDependency.generated.h" + +UENUM() +enum class EUnlockDependencyType : uint8 +{ + // Any Unlock + Any UMETA( DisplayName = "Any" ), + + // Random unlocks only + Random UMETA( DisplayName = "Random" ) +}; + +UENUM() +enum class EItemUnlockRequirement : uint8 +{ + // Any item in the list needs to be unlocked. + Any UMETA( DisplayName = "Any" ), + + // All items in the list need to be unlocked. + All UMETA( DisplayName = "All" ) +}; + +/** + * Dependency that's met if a calendar slot is unlocked. + */ +UCLASS() +class FACTORYGAME_API UFGCalendarSlotUnlockedDependency : public UFGAvailabilityDependency +{ + GENERATED_BODY() + +public: + UFGCalendarSlotUnlockedDependency(); + + virtual bool AreDependenciesMet( UObject* worldContext ) const override; + + int32 GetSlot() const { return mSlot; } + EUnlockDependencyType GetUnlockType() const { return mUnlockType; } + EItemUnlockRequirement GetUnlockedItemClassesRequirement() const { return mUnlockedItemClassesRequirement; } + const TArray< TSubclassOf< class UFGItemDescriptor > >& GetUnlockedItemClasses() const { return mUnlockedItemClasses; } + +#if WITH_EDITOR + virtual FString ToString() const override; + virtual void FromString( const FString& inString ) override; +#endif + +protected: + /** If >= 0, requires the specified slot to be unlocked. */ + UPROPERTY( EditDefaultsOnly, Category = "Dependency" ) + int32 mSlot; + + /** What kind of unlock this dependency requires. */ + UPROPERTY( EditDefaultsOnly, Category = "Dependency" ) + EUnlockDependencyType mUnlockType; + + /** How to treat the "Unlocked Item Classes" array. */ + UPROPERTY( EditDefaultsOnly, Category = "Dependency" ) + EItemUnlockRequirement mUnlockedItemClassesRequirement; + + /** What item classes must be part of the unlock for this dependency. */ + UPROPERTY( EditDefaultsOnly, Category = "Dependency" ) + TArray< TSubclassOf< class UFGItemDescriptor > > mUnlockedItemClasses; +}; diff --git a/Source/FactoryGame/Public/AvailabilityDependencies/FGEventDisabledDependency.h b/Source/FactoryGame/Public/AvailabilityDependencies/FGEventDisabledDependency.h new file mode 100644 index 0000000000..4f4ed4668d --- /dev/null +++ b/Source/FactoryGame/Public/AvailabilityDependencies/FGEventDisabledDependency.h @@ -0,0 +1,30 @@ +// Copyright Coffee Stain Studios. All Rights Reserved. + +#pragma once + +#include "FactoryGame.h" +#include "CoreMinimal.h" +#include "FGEventSubsystem.h" +#include "AvailabilityDependencies/FGAvailabilityDependency.h" +#include "FGEventDisabledDependency.generated.h" +/** + * + */ +UCLASS() +class FACTORYGAME_API UFGEventDisabledDependency : public UFGAvailabilityDependency +{ + GENERATED_BODY() +public: + virtual bool AreDependenciesMet( UObject* worldContext ) const override; + + const TArray< EEvents >& GetEvents() const { return mEvents; } + +#if WITH_EDITOR + virtual FString ToString() const override; + virtual void FromString( const FString& inString ) override; +#endif + +protected: + UPROPERTY( EditDefaultsOnly, Category = "Dependency" ) + TArray< EEvents > mEvents; +}; diff --git a/Source/FactoryGame/Public/Buildables/FGBuildable.h b/Source/FactoryGame/Public/Buildables/FGBuildable.h index 64d5ae4085..e8da11af31 100644 --- a/Source/FactoryGame/Public/Buildables/FGBuildable.h +++ b/Source/FactoryGame/Public/Buildables/FGBuildable.h @@ -279,6 +279,8 @@ class FACTORYGAME_API AFGBuildable : public AActor, public IFGDismantleInterface /** Root of factory ticking hierarchy */ void TickFactory( float dt, ELevelTick TickType ); + virtual bool ShouldRegisterToFactoryTickGroup() const { return mFactoryTickFunction.bCanEverTick; } + /** Always ticking tick, this is where factory logic resides, other tick will be disabled pretty frequent */ virtual void Factory_Tick( float dt ); diff --git a/Source/FactoryGame/Public/Buildables/FGBuildableCalendar.h b/Source/FactoryGame/Public/Buildables/FGBuildableCalendar.h index 7ba8545d14..c311d6900f 100644 --- a/Source/FactoryGame/Public/Buildables/FGBuildableCalendar.h +++ b/Source/FactoryGame/Public/Buildables/FGBuildableCalendar.h @@ -51,7 +51,11 @@ class FACTORYGAME_API AFGBuildableCalendar : public AFGBuildable // Begin IFGSaveInterface virtual bool ShouldSave_Implementation() const override { return false; } // End IFGSaveInterface - + + // Begin IFGUseableInterface + virtual void OnUse_Implementation( class AFGCharacterPlayer* byCharacter, const FUseState& state ) override; + // End IFGUseableInterface + /** Get the inventory for the christmas calendar. Each inventory slot represents one slot in the calendar */ UFUNCTION( BlueprintPure, Category = "Calendar" ) FORCEINLINE class UFGInventoryComponent* GetInventory() const { return mInventory; } @@ -93,10 +97,6 @@ class FACTORYGAME_API AFGBuildableCalendar : public AFGBuildable UPROPERTY( EditDefaultsOnly, Category = "Calendar" ) int32 mNumberOfSlotsInCalendar; - /** The calendar rewards class we use to get rewards for slots in this calendar */ - UPROPERTY( EditDefaultsOnly, Category = "Calendar" ) - TSubclassOf< UFGCalendarRewards > mCalendarRewardsClass; - /** This maps an inventory index to a random reward index in the calendar reward class */ UPROPERTY() TMap< int32, int32 > mInventoryIndexToRandomRewardIndexMapping; diff --git a/Source/FactoryGame/Public/Buildables/FGBuildableConveyorBelt.h b/Source/FactoryGame/Public/Buildables/FGBuildableConveyorBelt.h index 9812260d80..767e5ea1df 100644 --- a/Source/FactoryGame/Public/Buildables/FGBuildableConveyorBelt.h +++ b/Source/FactoryGame/Public/Buildables/FGBuildableConveyorBelt.h @@ -48,6 +48,7 @@ class FACTORYGAME_API AFGBuildableConveyorBelt : public AFGBuildableConveyorBase // Begin Buildable interface virtual int32 GetDismantleRefundReturnsMultiplier() const override; virtual void OnBuildEffectFinished() override; + virtual void OnSkinCustomizationApplied_Implementation( TSubclassOf< class UFGFactoryCustomizationDescriptor_Skin > skin ) override; // End Buildable interface // Begin AFGBuildableConveyorBase interface @@ -58,6 +59,9 @@ class FACTORYGAME_API AFGBuildableConveyorBelt : public AFGBuildableConveyorBase /** Get the velocity of the conveyor where the based actor is. */ FVector GetVelocityForBase( class AActor* basedActor, class UPrimitiveComponent* baseComponent ) const; + virtual TArray SetupAbstractInstances(const FFactoryCustomizationData& CustomizationData); + virtual void ApplyCustomizationData_Native( const FFactoryCustomizationData& customizationData ) override; + //~ Begin IFGDismantleInterface virtual FVector GetRefundSpawnLocationAndArea_Implementation( const FVector& aimHitLocation, float& out_radius ) const override; virtual void Upgrade_Implementation( AActor* newActor ) override; diff --git a/Source/FactoryGame/Public/Buildables/FGBuildableGenerator.h b/Source/FactoryGame/Public/Buildables/FGBuildableGenerator.h index ba864bf6f6..d0f111b804 100644 --- a/Source/FactoryGame/Public/Buildables/FGBuildableGenerator.h +++ b/Source/FactoryGame/Public/Buildables/FGBuildableGenerator.h @@ -6,6 +6,53 @@ #include "FGBuildableFactory.h" #include "FGBuildableGenerator.generated.h" +UCLASS() +class FACTORYGAME_API UFGGeneratorClipboardSettings : public UFGFactoryClipboardSettings +{ + GENERATED_BODY() +public: + + /** The potential we would like to apply */ + UPROPERTY( BlueprintReadWrite ) + float mTargetPotential; + + /** The production boost we would like to apply */ + UPROPERTY( BlueprintReadWrite ) + float mTargetProductionBoost; + + /** The calculated potential we can apply with the shards/crystals we have. Used to simulate UI changes */ + UPROPERTY( BlueprintReadWrite ) + float mReachablePotential; + + /** The calculated production we can apply with the shards we have */ + UPROPERTY( BlueprintReadWrite ) + float mReachableProductionBoost; + + /** Descriptor for the overclocking shard item */ + UPROPERTY( BlueprintReadWrite ) + TSubclassOf mOverclockingShardDescriptor; + + /** Descriptor for the production boost shard item */ + UPROPERTY( BlueprintReadWrite ) + TSubclassOf mProductionBoostShardDescriptor; +}; + +UCLASS() +class FACTORYGAME_API UFGGeneratorClipboardRCO : public UFGRemoteCallObject +{ + GENERATED_BODY() +public: + virtual void GetLifetimeReplicatedProps( TArray< FLifetimeProperty >& OutLifetimeProps ) const override; + + UFUNCTION( Server, Reliable ) + void Server_PasteSettings( class AFGBuildableGenerator* generator, AFGCharacterPlayer* player, float overclock, float productionBoost, TSubclassOf overclockingShard, TSubclassOf productionBoostShard ); + +private: + UPROPERTY( Replicated, Meta = ( NoAutoJson ) ) + bool mForceNetField_UFGGeneratorClipboardRCO = false; + +}; + /** * Base for all generators, i.e. coal, fuel, nuclear etc. */ @@ -25,6 +72,12 @@ class FACTORYGAME_API AFGBuildableGenerator : public AFGBuildableFactory virtual EProductionStatus GetProductionIndicatorStatus() const override; // End AFGBuildableFactory interface + //~ Begin IFGFactoryClipboardInterface + virtual bool CanUseFactoryClipboard_Implementation() override; + virtual UFGFactoryClipboardSettings* CopySettings_Implementation() override; + virtual bool PasteSettings_Implementation( UFGFactoryClipboardSettings* settings ) override; + //~ End IFGFactoryClipboardInterface + /** Get the current load of this generator in the range [0,1]. */ UFUNCTION( BlueprintPure, Category = "Power" ) float GetLoadPercentage() const { return mLoadPercentage; } diff --git a/Source/FactoryGame/Public/Buildables/FGBuildableManufacturer.h b/Source/FactoryGame/Public/Buildables/FGBuildableManufacturer.h index a457c8e0ee..d79a8e20aa 100644 --- a/Source/FactoryGame/Public/Buildables/FGBuildableManufacturer.h +++ b/Source/FactoryGame/Public/Buildables/FGBuildableManufacturer.h @@ -10,6 +10,24 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam( FOnNewRecipeDelegate, TSubclassOf< class UFGRecipe >, newRecipe ); +struct FSimpleIngredientData +{ + int32 StackSize = INDEX_NONE; + EResourceForm Form = EResourceForm::RF_INVALID; + + FSimpleIngredientData(int32 InStackSize, EResourceForm InForm) + { + StackSize = InStackSize; + Form = InForm; + } + + FSimpleIngredientData() + { + StackSize = INDEX_NONE; + Form = EResourceForm::RF_INVALID; + } +}; + UCLASS() class FACTORYGAME_API UFGManufacturerClipboardSettings : public UFGFactoryClipboardSettings { @@ -271,6 +289,9 @@ class FACTORYGAME_API AFGBuildableManufacturer : public AFGBuildableFactory, pub UPROPERTY() const UFGRecipe* mCachedRecipe; + /** Cached resource recipe ingredient data */ + TArray mCachedIngredientData; + /* Updated once an item is removed from the input inventory.*/ bool mCachedCanProduce; diff --git a/Source/FactoryGame/Public/Buildables/FGBuildablePipeBase.h b/Source/FactoryGame/Public/Buildables/FGBuildablePipeBase.h index 68ed3a3f35..c3b431683a 100644 --- a/Source/FactoryGame/Public/Buildables/FGBuildablePipeBase.h +++ b/Source/FactoryGame/Public/Buildables/FGBuildablePipeBase.h @@ -33,6 +33,8 @@ class FACTORYGAME_API AFGBuildablePipeBase : public AFGBuildable, public IFGSign virtual bool ShouldBeConsideredForBase_Implementation() override; virtual void GetClearanceData_Implementation( TArray< FFGClearanceData >& out_data ) const override; virtual bool ShouldBlockGuidelinePathForHologram( const class AFGHologram* hologram ) const override; + virtual void OnSkinCustomizationApplied_Implementation( TSubclassOf skin ) override; + virtual void ApplyCustomizationData_Native( const FFactoryCustomizationData& customizationData ) override; // End Buildable interface // Begin IFGDismantleInterface @@ -69,6 +71,8 @@ class FACTORYGAME_API AFGBuildablePipeBase : public AFGBuildable, public IFGSign virtual float FindOffsetClosestToLocation( const FVector& location ) const; virtual void GetLocationAndDirectionAtOffset( float offset, FVector& out_location, FVector& out_direction ) const; + virtual TArray SetupAbstractInstances(const FFactoryCustomizationData& CustomizationData); + // Begin IFGSplineBuildableInterface virtual UFGConnectionComponent* GetSplineConnection0() const override; virtual UFGConnectionComponent* GetSplineConnection1() const override; @@ -182,5 +186,3 @@ class FACTORYGAME_API AFGBuildablePipeBase : public AFGBuildable, public IFGSign static inline const float COLLISION_SPACING = 80.f; static inline const FVector COLLISION_OFFSET = FVector( 0.f, 0.f, 0.f ); }; - - diff --git a/Source/FactoryGame/Public/Buildables/FGBuildablePipeline.h b/Source/FactoryGame/Public/Buildables/FGBuildablePipeline.h index 3a5c44ae4a..9c7135fe07 100644 --- a/Source/FactoryGame/Public/Buildables/FGBuildablePipeline.h +++ b/Source/FactoryGame/Public/Buildables/FGBuildablePipeline.h @@ -65,6 +65,7 @@ class FACTORYGAME_API AFGBuildablePipeline : public AFGBuildablePipeBase, public // Begin AFGBuildable interface virtual void Factory_Tick( float dt ) override; + virtual bool ShouldRegisterToFactoryTickGroup() const override; // End AFGBuildable interface // Begin IFGDismantleInterface diff --git a/Source/FactoryGame/Public/Buildables/FGBuildableResourceExtractorBase.h b/Source/FactoryGame/Public/Buildables/FGBuildableResourceExtractorBase.h index b0418ad1ad..80f9b348e5 100644 --- a/Source/FactoryGame/Public/Buildables/FGBuildableResourceExtractorBase.h +++ b/Source/FactoryGame/Public/Buildables/FGBuildableResourceExtractorBase.h @@ -12,6 +12,52 @@ #define DEBUG_RESOURCE_EXTRACTORS #endif +UCLASS() +class FACTORYGAME_API UFGResourceExtractorClipboardRCO : public UFGRemoteCallObject +{ + GENERATED_BODY() +public: + virtual void GetLifetimeReplicatedProps( TArray< FLifetimeProperty >& OutLifetimeProps ) const override; + + UFUNCTION( Server, Reliable ) + void Server_PasteSettings( class AFGBuildableResourceExtractorBase* extractor, AFGCharacterPlayer* player, float overclock, float productionBoost, TSubclassOf overclockingShard, TSubclassOf productionBoostShard ); + +private: + UPROPERTY( Replicated, Meta = ( NoAutoJson ) ) + bool mForceNetField_UFGResourceExtractorClipboardRCO = false; + +}; + +UCLASS() +class FACTORYGAME_API UFGResourceExtractorClipboardSettings : public UFGFactoryClipboardSettings +{ + GENERATED_BODY() +public: + /** The potential we would like to apply */ + UPROPERTY( BlueprintReadWrite ) + float mTargetPotential; + + /** The production boost we would like to apply */ + UPROPERTY( BlueprintReadWrite ) + float mTargetProductionBoost; + + /** The calculated potential we can apply with the shards/crystals we have. Used to simulate UI changes */ + UPROPERTY( BlueprintReadWrite ) + float mReachablePotential; + + /** The calculated production we can apply with the shards we have */ + UPROPERTY( BlueprintReadWrite ) + float mReachableProductionBoost; + + /** Descriptor for the overclocking shard item */ + UPROPERTY( BlueprintReadWrite ) + TSubclassOf mOverclockingShardDescriptor; + + /** Descriptor for the production boost shard item */ + UPROPERTY( BlueprintReadWrite ) + TSubclassOf mProductionBoostShardDescriptor; +}; + /** * The base class for all resource extractors, i.e. miners and pumps. */ @@ -42,6 +88,12 @@ class FACTORYGAME_API AFGBuildableResourceExtractorBase : public AFGBuildableFac virtual void PostLoadGame_Implementation( int32 saveVersion, int32 gameVersion ) override; // End Save Interface + //~ Begin IFGFactoryClipboardInterface + virtual bool CanUseFactoryClipboard_Implementation() override { return true; } + virtual UFGFactoryClipboardSettings* CopySettings_Implementation() override; + virtual bool PasteSettings_Implementation( UFGFactoryClipboardSettings* settings ) override; + //~ End IFGFactoryClipboardInterface + /** [DEPRECATED] - Use GetExtractableResource() instead. * Get the resource node this miner is mining from. */ FORCEINLINE class AFGResourceNode* GetResourceNode() const{ return mExtractResourceNode; } diff --git a/Source/FactoryGame/Public/Buildables/FGBuildableSnowCannon.h b/Source/FactoryGame/Public/Buildables/FGBuildableSnowCannon.h new file mode 100644 index 0000000000..1b69e7f1f1 --- /dev/null +++ b/Source/FactoryGame/Public/Buildables/FGBuildableSnowCannon.h @@ -0,0 +1,68 @@ +// Copyright Coffee Stain Studios. All Rights Reserved. + +#pragma once + +#include "FactoryGame.h" +#include "CoreMinimal.h" +#include "FGSignificanceInterface.h" +#include "Buildables/FGBuildable.h" +#include "FGBuildableSnowCannon.generated.h" + +/** + * + */ +UCLASS() +class FACTORYGAME_API AFGBuildableSnowCannon : public AFGBuildable, public IFGSignificanceInterface +{ + GENERATED_BODY() + +public: + AFGBuildableSnowCannon(); + + virtual void BeginPlay() override; + virtual void EndPlay( const EEndPlayReason::Type EndPlayReason ) override; + + //Begin IFGSignificanceInterface + virtual void GainedSignificance_Implementation() override; + virtual void LostSignificance_Implementation() override; + virtual float GetSignificanceRange() override { return mSignificanceRange; } + virtual void SetInitialState(bool bState) override { mIsSignificant = bState; } + //End IFGSignificanceInterface + + UFUNCTION( BlueprintPure, Category = "Significance" ) + FORCEINLINE bool GetIsSignificant() const { return mIsSignificant; } + + const FInt32Interval& GetAngleLimit() const { return mAngleLimit; } + int32 GetAngleOffset() const { return mAngleOffset; } + + class UFGColoredInstanceMeshProxy* GetBaseMeshComponent() const { return mBaseMeshComponent; } + class UFGColoredInstanceMeshProxy* GetHeadMeshComponent() const { return mHeadMeshComponent; } + + void SetCannonAngle( int32 angle ); + +private: + void UpdateCannonMesh(); + +protected: + UPROPERTY( EditDefaultsOnly, BlueprintReadWrite, Category = "Snow Cannon" ) + class UFGColoredInstanceMeshProxy* mBaseMeshComponent; + + UPROPERTY( EditDefaultsOnly, BlueprintReadWrite, Category = "Snow Cannon" ) + class UFGColoredInstanceMeshProxy* mHeadMeshComponent; + +private: + /** The range to keep the snow cannon in significance */ + UPROPERTY( EditDefaultsOnly, Category = "Significance" ) + float mSignificanceRange; + + UPROPERTY( EditDefaultsOnly, Category = "Snow Cannon" ) + FInt32Interval mAngleLimit; + + UPROPERTY( EditDefaultsOnly, Category = "Snow Cannon" ) + int32 mAngleOffset; + + UPROPERTY( SaveGame ) + int32 mCannonAngle; + + bool mIsSignificant; +}; diff --git a/Source/FactoryGame/Public/Creature/FGCreatureSpawner.h b/Source/FactoryGame/Public/Creature/FGCreatureSpawner.h index e06788a744..a278556879 100644 --- a/Source/FactoryGame/Public/Creature/FGCreatureSpawner.h +++ b/Source/FactoryGame/Public/Creature/FGCreatureSpawner.h @@ -53,17 +53,20 @@ UCLASS() class FACTORYGAME_API AFGCreatureSpawner : public AActor, public IFGSaveInterface { GENERATED_BODY() -public: +public: + static const FName CreatureClassPropertyName; + AFGCreatureSpawner(); // BEGIN AActor interface virtual void BeginPlay() override; virtual void EndPlay( const EEndPlayReason::Type endPlayReason ) override; virtual void Tick(float DeltaSeconds) override; - #if WITH_EDITOR +#if WITH_EDITOR + virtual void GetActorDescProperties(FPropertyPairsMap& PropertyPairsMap) const override; /** Moved in the editor, on done, calculate spawn locations */ virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override; - #endif +#endif // END AActor interface // Begin IFGSaveInterface @@ -168,9 +171,6 @@ class FACTORYGAME_API AFGCreatureSpawner : public AActor, public IFGSaveInterfac UFUNCTION() FORCEINLINE bool VisualizeSpawnDistance() const { return mVisualizeSpawnDistance; } - /** Update if this spawner is scannable. Checks if near base and if it has any alive untamed creatures */ - void UpdateScannableState(); - /** Try and recouple creatures that are in this instances mSpawnData but has no spawner set */ void TryRecoupleCreatureAndSpawner(); diff --git a/Source/FactoryGame/Public/Equipment/FGAmmoType.h b/Source/FactoryGame/Public/Equipment/FGAmmoType.h index e2fa28c5d4..2a993f80af 100644 --- a/Source/FactoryGame/Public/Equipment/FGAmmoType.h +++ b/Source/FactoryGame/Public/Equipment/FGAmmoType.h @@ -165,7 +165,11 @@ class FACTORYGAME_API UFGAmmoType : public UFGItemDescriptor, public IFGSaveInte FORCEINLINE USkeletalMesh* GetMagazineMesh() const { return mMagazineMesh; } UFUNCTION( BlueprintPure, Category="Ammunition" ) - FORCEINLINE TSubclassOf GetMagazineAnimClass() const { return mMagazineMeshAnimClass; } + FORCEINLINE TSubclassOf< class UAnimInstance > GetMagazineAnimClass() const { return mMagazineMeshAnimClass; } + + /** Tobias 2024-11-04: Hacky solution for overriding the idle animation for the snowball ammo. */ + UFUNCTION( BlueprintPure, Category="Ammunition" ) + FORCEINLINE class UAnimSequence* GetNobeliskWeaponIdleAnimationOverride() const { return mNobeliskWeaponIdleAnimationOverride; } UFUNCTION( BlueprintPure, Category="Ammunition") USkeletalMesh* GetMagazineMeshWithCustomMaterials(); @@ -174,7 +178,7 @@ class FACTORYGAME_API UFGAmmoType : public UFGItemDescriptor, public IFGSaveInte FORCEINLINE TArray GetMagazineMaterials() const { return mMagazineMeshMaterials; } UFUNCTION( BlueprintPure, Category="Ammunition") - TArray< UMaterialInstance* > GetMagazineMaterials1p() const { return mMagazineMeshMaterials1p; } + TArray< class UMaterialInstance* > GetMagazineMaterials1p() const { return mMagazineMeshMaterials1p; } UFUNCTION( BlueprintPure, Category="Ammunition" ) FORCEINLINE float GetMaxAmmoEffectiveRange() const { return mMaxAmmoEffectiveRange; } @@ -299,7 +303,11 @@ class FACTORYGAME_API UFGAmmoType : public UFGItemDescriptor, public IFGSaveInte USkeletalMesh* mMagazineMesh = nullptr; UPROPERTY( EditDefaultsOnly, Category = "Item" ) - TSubclassOf mMagazineMeshAnimClass = nullptr; + TSubclassOf< class UAnimInstance > mMagazineMeshAnimClass = nullptr; + + /** Tobias 2024-11-04: Hacky solution for overriding the idle animation for the snowball ammo. */ + UPROPERTY( EditDefaultsOnly, Category = "Item" ) + TObjectPtr< class UAnimSequence > mNobeliskWeaponIdleAnimationOverride; UPROPERTY( EditDefaultsOnly, EditFixedSize, Category = "Item" ) TArray mMagazineMeshMaterials; @@ -308,7 +316,7 @@ class FACTORYGAME_API UFGAmmoType : public UFGItemDescriptor, public IFGSaveInte TArray mMagazineMeshMaterials1p; UPROPERTY( EditDefaultsOnly, Instanced, Category = "Ammunition|Damage" ) - TArray< UFGDamageType* > mDamageTypesOnImpact; + TArray< UFGDamageType* > mDamageTypesOnImpact; /** The noise to make when we fire the weapon. */ UPROPERTY( EditDefaultsOnly, Category = "Ammunition|Noise" ) diff --git a/Source/FactoryGame/Public/Equipment/FGBuildGunPaint.h b/Source/FactoryGame/Public/Equipment/FGBuildGunPaint.h index e1b9343a04..1f2fd459a2 100644 --- a/Source/FactoryGame/Public/Equipment/FGBuildGunPaint.h +++ b/Source/FactoryGame/Public/Equipment/FGBuildGunPaint.h @@ -59,6 +59,12 @@ class FACTORYGAME_API UFGBuildGunStatePaint : public UFGBuildGunState UFUNCTION( Server, Reliable ) void Server_ExecutePaint( uint8 mode, FFactoryCustomizationData customizationData, AActor* hitActor ); + UFUNCTION( Server, Reliable ) + void Server_SetCustomizeClassFilter( TSubclassOf actorToFilter ); + + UFUNCTION( Server, Reliable ) + void Server_SetActiveRecipe( TSubclassOf< UFGCustomizationRecipe > customizationRecipe ); + /** Start - Remove all these */ UFUNCTION( BlueprintCallable, Category = "FactoryGame|BuildGunPaint" ) void SetActiveCustomization( TSubclassOf< UFGFactoryCustomizationDescriptor > customizationDesc ); @@ -88,6 +94,8 @@ class FACTORYGAME_API UFGBuildGunStatePaint : public UFGBuildGunState /** Sets the current class filters for customizing. */ UFUNCTION( BlueprintCallable, Category = "FactoryGame|BuildGunPaint" ) void SetCustomizeClassFilter( AActor* actorToFilter ); + void SetCustomizeClassFilter_Internal( TSubclassOf< AActor > actorClass, TSubclassOf< UFGItemDescriptor > itemDesc ); + /** Return the currently active Color Descriptor */ UFUNCTION( BlueprintPure, Category = "FactoryGame|BuildGunPaint" ) @@ -273,5 +281,3 @@ class FACTORYGAME_API UFGBuildGunStatePaint : public UFGBuildGunState AActor* mInstanceConverterInstigator; }; - - diff --git a/Source/FactoryGame/Public/Equipment/FGWeapon.h b/Source/FactoryGame/Public/Equipment/FGWeapon.h index 1eeb7ebf4f..760522fdf2 100644 --- a/Source/FactoryGame/Public/Equipment/FGWeapon.h +++ b/Source/FactoryGame/Public/Equipment/FGWeapon.h @@ -97,6 +97,10 @@ class FACTORYGAME_API AFGWeapon : public AFGEquipment UFUNCTION( BlueprintPure, BlueprintNativeEvent, Category = "Weapon" ) FVector GetWeaponMeshSocketLocation( FName socketName ) const; + /** Tobias 2024-11-04: Hacky solution for overriding the idle animation for the snowball ammo. */ + UFUNCTION( BlueprintPure, Category="Weapon" ) + class UAnimSequence* GetNobeliskWeaponIdleAnimationOverride() const; + UFUNCTION( Server, Reliable ) void Server_CycleDesiredAmmunitionType(); diff --git a/Source/FactoryGame/Public/FGAnimPlayer.h b/Source/FactoryGame/Public/FGAnimPlayer.h index 5fd3090028..a88795288c 100644 --- a/Source/FactoryGame/Public/FGAnimPlayer.h +++ b/Source/FactoryGame/Public/FGAnimPlayer.h @@ -53,6 +53,10 @@ class FACTORYGAME_API UFGAnimPlayer : public UFGCharacterAnimInstance /** is this character not controlled by anyone */ UPROPERTY( BlueprintReadOnly, Category = "Anim Player" ) bool mIsIdling; + + /** Tobias 2024-11-04: Hacky solution for overriding the idle animation for the snowball ammo. */ + UPROPERTY( BlueprintReadOnly, Category = "Anim Player" ) + UAnimSequence* mNobeliskWeaponIdlePoseOverride; }; diff --git a/Source/FactoryGame/Public/FGBuildableSubsystem.h b/Source/FactoryGame/Public/FGBuildableSubsystem.h index f7d7565144..6ce76374bc 100644 --- a/Source/FactoryGame/Public/FGBuildableSubsystem.h +++ b/Source/FactoryGame/Public/FGBuildableSubsystem.h @@ -21,6 +21,9 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam( FOnColorChanged, int32, Index ); DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam( FOnOccluderBuildingConstructed, AFGBuildable*, buildable ); DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam( FOnOccluderBuildingRemoved, AFGBuildable*, buildable ); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam( FOnBuildableAdded, AFGBuildable*, buildable ); +DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam( FOnBuildableRemoved, AFGBuildable*, buildable ); + /** Used to track constructed (spawned) buildables matched with their holograms between client and server */ USTRUCT() struct FNetConstructionID @@ -288,6 +291,9 @@ class FACTORYGAME_API AFGBuildableSubsystem : public AFGSubsystem, public IFGSav /** @return a const reference to all buildables in the world. Avoids copying, but can be invalidated by buildables being added/removed */ FORCEINLINE const TArray& GetAllBuildablesRef() const { return mBuildables; } + UFUNCTION( BlueprintPure, Category = "FactoryGame|Factory" ) + int32 GetBuildableCount( TSubclassOf< AFGBuildable > buildableClass ) const; + /** Get all buildables of the supplied type. */ UFUNCTION( BlueprintCallable, Category = "FactoryGame|Factory" ) void GetTypedBuildable( TSubclassOf< class AFGBuildable > inClass, TArray< class AFGBuildable* >& out_buildables ) const; @@ -470,6 +476,14 @@ class FACTORYGAME_API AFGBuildableSubsystem : public AFGSubsystem, public IFGSav UPROPERTY( BlueprintAssignable, Category = "Build", DisplayName = "OnBuildableConstructedGlobal" ) FOnBuildableConstructedGlobal BuildableConstructedGlobalDelegate; + /** Broadcast when a buildable is added to the buildable subsystem. */ + UPROPERTY( BlueprintAssignable, Category = "Build", DisplayName = "OnBuildableAdded" ) + FOnBuildableAdded mBuildableAddedDelegate; + + /** Broadcast when a buildable is removed from the buildable subsystem. */ + UPROPERTY( BlueprintAssignable, Category = "Build", DisplayName = "OnBuildableRemoved" ) + FOnBuildableRemoved mBuildableRemovedDelegate; + /** Broadcast when buildable light color slots have been updated. Used to update UI */ UPROPERTY( BlueprintAssignable, Category = "Light Color" ) FOnBuildableLightColorSlotsUpdated mOnBuildableLightColorSlotsUpdated; @@ -528,6 +542,9 @@ class FACTORYGAME_API AFGBuildableSubsystem : public AFGSubsystem, public IFGSav UPROPERTY() TArray< class AFGBuildable* > mBuildables; + /** Count of all buildables. */ + TMap< TSubclassOf< AFGBuildable >, int32 > mBuildableCount; + /************************************************************************/ /* Begin variables for parallelization */ /************************************************************************/ diff --git a/Source/FactoryGame/Public/FGCharacterPlayer.h b/Source/FactoryGame/Public/FGCharacterPlayer.h index 251aa4fcb7..05899c3cc1 100644 --- a/Source/FactoryGame/Public/FGCharacterPlayer.h +++ b/Source/FactoryGame/Public/FGCharacterPlayer.h @@ -284,6 +284,8 @@ enum class EPlayerMappingContextCategory : uint8 Cheats = 0x20, + Camera = 0x40, + // [KajtaziT] GamepadDefault = 0x80, // essential gamepad controls @@ -1742,6 +1744,9 @@ class FACTORYGAME_API AFGCharacterPlayer final : public AFGCharacterBase, public void RadiationIntensityUpdated(); bool IsPlayerInOrAboveWater( const FVector& hitPosition ) const; + + void ActivateCameraComponents(); + void DeactivateCameraComponents(); protected: /** Player camera */ diff --git a/Source/FactoryGame/Public/FGCheatManager.h b/Source/FactoryGame/Public/FGCheatManager.h index 15622cb3da..46a6bd6fc8 100644 --- a/Source/FactoryGame/Public/FGCheatManager.h +++ b/Source/FactoryGame/Public/FGCheatManager.h @@ -272,6 +272,10 @@ class FACTORYGAME_API UFGCheatManager : public UCheatManager, public IFGCheatBoa void Server_SetSAMIntensity( int32 newSAMIntensity ); UFUNCTION( exec, CheatBoard, category = "World|Alien" ) void SetSAMIntensity( int32 newSAMIntensity ); + UFUNCTION( Server, Reliable ) + void Server_SpawnFallingGiftBundle(); + UFUNCTION( exec, CheatBoard, category = "Creature" ) + void SpawnFallingGiftBundle(); /**************************************************************** * Creatures diff --git a/Source/FactoryGame/Public/FGConveyorChainSubsystem.h b/Source/FactoryGame/Public/FGConveyorChainSubsystem.h index d1501a9b2a..760cb1fefb 100644 --- a/Source/FactoryGame/Public/FGConveyorChainSubsystem.h +++ b/Source/FactoryGame/Public/FGConveyorChainSubsystem.h @@ -223,6 +223,7 @@ class FACTORYGAME_API UFGConveyorChainRemoteCallObject : public UFGRemoteCallObj bool HasPendingSegmentClientRequest = false; }; +DECLARE_MULTICAST_DELEGATE_TwoParams(FGetAdditionalConveyorItemDescriptors, class AFGConveyorChainSubsystem* /* chainSubsystem */, TSet>& /* out_itemDescriptors */); UCLASS() class FACTORYGAME_API AFGConveyorChainSubsystem : public AFGSubsystem @@ -312,6 +313,8 @@ class FACTORYGAME_API AFGConveyorChainSubsystem : public AFGSubsystem return mReparamStepsPerSegment; } + /** Delegate that can be bound to register additional item descriptors that are not known to the Asset Registry as being able to be on conveyor belts */ + static FGetAdditionalConveyorItemDescriptors GetAdditionalItemDescriptors; private: FORCEINLINE int32 GetReparamStepForQualitySetting( int32 qualitySetting ) { @@ -382,4 +385,3 @@ class FACTORYGAME_API AFGConveyorChainSubsystem : public AFGSubsystem TArray< TSubclassOf< UFGItemDescriptor > > mAllItemDescriptors; }; - diff --git a/Source/FactoryGame/Public/FGCreatureSubsystem.h b/Source/FactoryGame/Public/FGCreatureSubsystem.h index 5d9e0bef70..6bda7319c4 100644 --- a/Source/FactoryGame/Public/FGCreatureSubsystem.h +++ b/Source/FactoryGame/Public/FGCreatureSubsystem.h @@ -161,7 +161,7 @@ class FACTORYGAME_API AFGCreatureSubsystem : public AFGSubsystem /** Used to remove any potential active creature class overrides. */ UFUNCTION( BlueprintCallable, Category = "Creatures" ) - void RemoveCreatureClassOverride( TSubclassOf< AFGCreature > creatureClass, bool updateScannableState = true ); + void RemoveCreatureClassOverride( TSubclassOf< AFGCreature > creatureClass ); AFGCreature* BeginSpawningCreature( TSubclassOf< AFGCreature > creatureClass, const FTransform& spawnTransform ); diff --git a/Source/FactoryGame/Public/FGDismantleInterface.h b/Source/FactoryGame/Public/FGDismantleInterface.h index 2a3dfca1c2..2b55da0cf6 100644 --- a/Source/FactoryGame/Public/FGDismantleInterface.h +++ b/Source/FactoryGame/Public/FGDismantleInterface.h @@ -24,16 +24,16 @@ class FACTORYGAME_API IFGDismantleInterface /** * Can this be dismantled. */ - UFUNCTION( BlueprintNativeEvent, Category = "Dismantle" ) + UFUNCTION( BlueprintCallable, BlueprintNativeEvent, Category = "Dismantle" ) bool CanDismantle() const; - + /** * How much do we get back when dismantling this. * @param noBuildCostEnabled If the player unique game rules NoBuildCost is enabled. This is needed here because we can't check this * in a global scope since it's per player. If noBuildCostEnabled is true we only want to return content of buildings (inventory, potential inventory etc.) */ - UFUNCTION( BlueprintNativeEvent, Category = "Dismantle" ) - void GetDismantleRefund( UPARAM( ref ) TArray< FInventoryStack >& out_refund, bool noBuildCostEnabled ) const; + UFUNCTION( BlueprintCallable, BlueprintNativeEvent, Category = "Dismantle" ) + void GetDismantleRefund( TArray< FInventoryStack >& out_refund, bool noBuildCostEnabled ) const; /** * Returns the location where the refund should be spawned and the area @@ -42,13 +42,13 @@ class FACTORYGAME_API IFGDismantleInterface * @param aimHitLocation - the location we aimed at when dismantling happened * @param out_radius - radius we want to spawn stuff within */ - UFUNCTION( BlueprintNativeEvent, Category = "Dismantle" ) + UFUNCTION( BlueprintCallable, BlueprintNativeEvent, Category = "Dismantle" ) FVector GetRefundSpawnLocationAndArea( const FVector& aimHitLocation, float& out_radius ) const; /** * If we want to dismantle something else along with this, then add it through this */ - UFUNCTION( BlueprintNativeEvent, Category = "Dismantle" ) + UFUNCTION( BlueprintCallable, BlueprintNativeEvent, Category = "Dismantle" ) void GetChildDismantleActors( TArray< AActor* >& out_ChildDismantleActors ) const; /** diff --git a/Source/FactoryGame/Public/FGDynamicStruct.h b/Source/FactoryGame/Public/FGDynamicStruct.h index 7837ec31b5..a9c35f7cc1 100644 --- a/Source/FactoryGame/Public/FGDynamicStruct.h +++ b/Source/FactoryGame/Public/FGDynamicStruct.h @@ -127,6 +127,7 @@ struct FACTORYGAME_API FFGDynamicStruct void AddStructReferencedObjects(class FReferenceCollector& Collector); bool Serialize(FArchive& Ar); + bool NetSerialize(FArchive& Ar, class UPackageMap* Map, bool& bOutSuccess); friend FArchive& operator<<( FArchive& Ar, FFGDynamicStruct& DynamicStruct ) { @@ -143,5 +144,6 @@ struct TStructOpsTypeTraits : TStructOpsTypeTraitsBase2 PlayerStates; +}; + /** * @todo Please comment me + * No */ UCLASS( Blueprintable ) class FACTORYGAME_API AFGEventSubsystem : public AFGSubsystem, public IFGSaveInterface @@ -99,6 +112,7 @@ class FACTORYGAME_API AFGEventSubsystem : public AFGSubsystem, public IFGSaveInt AFGEventSubsystem(); //~ Begin AActor interface + virtual void BeginPlay() override; virtual void GetLifetimeReplicatedProps( TArray& OutLifetimeProps ) const override; //~ End AActor interface @@ -112,42 +126,98 @@ class FACTORYGAME_API AFGEventSubsystem : public AFGSubsystem, public IFGSaveInt static AFGEventSubsystem* GetEventSubsystem( UObject* worldContext ); UFUNCTION( BlueprintPure, Category = "FactoryGame|Events" ) - TArray< EEvents > GetCurrentEvents(); - + const TArray< EEvents >& GetCurrentEvents() const; + + UFUNCTION( BlueprintPure, Category = "FactoryGame|Events" ) + bool IsEventActive( EEvents event ) const { return GetCurrentEvents().Contains( event ); } + + const FFGEventData* GetEventData( EEvents event ) const { return mEvents.Find( event ); } + + void StoreCurrentCalendarData( const FCalendarData& calendarData ); void StoreCalendarData( TSubclassOf calendarRewardClass, const FCalendarData& calendarData ); - bool GetStoredCalendarData( TSubclassOf calendarRewardClass, FCalendarData& out_calendarData ) const; + const FCalendarData* GetStoredCalendarData( TSubclassOf calendarRewardClass ) const; + const FCalendarData* GetStoredCurrentCalendarData() const; + + FCalendarData* GetStoredCalendarData( TSubclassOf calendarRewardClass ); + FCalendarData* GetStoredCurrentCalendarData(); + UFUNCTION( BlueprintPure, Category = "FactoryGame|Events|Calendar" ) bool CanOpenCalendarSlot( EEvents event, int32 dayNumber ); + void OnPlayerOpenedCalendar( class AFGCharacterPlayer* player, class AFGBuildableCalendar* calendar ); + + const TSet< class AFGPlayerState* >& GetPlayersThatHaveSeenCalendar( TSubclassOf< UFGCalendarRewards > calendar ); + const TSet< class AFGPlayerState* >& GetPlayersThatHaveSeenCurrentCalendar(); + + UFUNCTION( BlueprintPure, Category = "FactoryGame|Events|Calendar" ) + TSubclassOf< UFGCalendarRewards > GetCalendarRewardsClass() const { return mCalendarRewardsClass; } + + /** Returns the gift rain spawner for the specified event. Will be NULL on clients or if event isn't active. */ + UFUNCTION( BlueprintPure, Category = "FactoryGame|Events" ) + class AFGGiftRainSpawner* GetGiftRainSpawnerForEvent( EEvents event ) const; + + /** Returns a random active gift rain spawner. */ + UFUNCTION( BlueprintPure, Category = "FactoryGame|Events" ) + class AFGGiftRainSpawner* GetRandomActiveGiftRainSpawner() const; + static bool GetOverridenEventDateTime( EEvents event, FDateTime& out_OverriddenDateTime ); bool ShouldRunEvent( const FSimpleDate& Begin, const FSimpleDate& End, const FDateTime& now ); TSubclassOf GetCalendarClassForCurrentEvent(); TSubclassOf GetHubMiniGameClassForCurrentEvent(); + +protected: + /** Called from beginplay for each active event. */ + virtual void OnBeginEvent_Native( EEvents event); + + /** Called from beginplay for each active event. */ + UFUNCTION( BlueprintImplementableEvent, Category = "FactoryGame|Events" ) + void OnBeginEvent( EEvents event ); + +private: + void CacheActiveEvents(); public: UPROPERTY( Replicated ) TArray< EEvents > mCurrentEvents; + + UPROPERTY( BlueprintAssignable, Category = "FactoryGame|Events|Calendar" ) + FCalendarSlotUnlocked mOnCalendarSlotUnlocked; + + UPROPERTY( BlueprintAssignable, Category = "FactoryGame|Events|Calendar" ) + FCalendarOpenEvent mOnCalendarOpenedByPlayer; private: /* Map with dates per event. */ UPROPERTY( EditDefaultsOnly ) TMap< EEvents, FFGEventData > mEvents; + /** The calendar rewards class we use to get rewards for slots in the calendar. // TODO: This should be mapped per event */ + UPROPERTY( EditDefaultsOnly ) + TSubclassOf< UFGCalendarRewards > mCalendarRewardsClass; + + /** What gift spawner class to use for an event, if any. */ + UPROPERTY( EditDefaultsOnly ) + TMap< EEvents, TSubclassOf< class AFGGiftRainSpawner > > mEventGiftSpawnerClasses; + UPROPERTY( EditDefaultsOnly, meta=(AllowedClasses=FGBuildableCalendar) ) TMap< EEvents, TSubclassOf > mBuildableCalendarClass; UPROPERTY( EditDefaultsOnly ) TMap< EEvents, TSubclassOf > mHubMiniGameClass; - - UPROPERTY() - bool bIsReplicated; UPROPERTY( SaveGame ) TMap< EEvents, FCalendarData > mStoredCalendarData; // 2020 Stored just in case we need it -K2 UPROPERTY( SaveGame ) - TMap< TSubclassOf, FCalendarData > mCalendarData; // 2021 and forward. Should handle as many calendars as we can think of. + TMap< TSubclassOf, FCalendarData > mCalendarData; // 2021 and forward. Should handle as many calendars as we can think of. + + UPROPERTY( SaveGame ) + TMap< TSubclassOf, FPlayerStateSetWrapper > mCalendarsOpenedByPlayers; + + /** Map of active gift rain spawners. */ + UPROPERTY() + TMap< EEvents, class AFGGiftRainSpawner* > mActiveGiftRainSpawners; }; UCLASS( config = EditorPerProjectUserSettings, meta = ( DisplayName = "Satisfactory Local Event settings" ) ) diff --git a/Source/FactoryGame/Public/FGFactoryColoringTypes.h b/Source/FactoryGame/Public/FGFactoryColoringTypes.h index e1ba4416da..fcd6570cbb 100644 --- a/Source/FactoryGame/Public/FGFactoryColoringTypes.h +++ b/Source/FactoryGame/Public/FGFactoryColoringTypes.h @@ -107,17 +107,6 @@ UCLASS( Blueprintable, BlueprintType ) class FACTORYGAME_API UFGFactoryCustomizationDescriptor_Pattern : public UFGFactoryCustomizationDescriptor { GENERATED_BODY() - -public: - FItemAmount GetRefundCostOnApplication() const { return mRefundCostOnApplication; } - -protected: - /** - * This is a very specific property for only the Pattern Removal so that we can refund a cost when used. This was preferable to having to store the - * recipes used for every pattern since that's a lot of extra data and all patterns should TM cost the same to apply. - */ - UPROPERTY( EditDefaultsOnly, Category="Pattern Removal" ) - FItemAmount mRefundCostOnApplication; }; // Material Class @@ -394,8 +383,13 @@ struct FACTORYGAME_API FFactoryCustomizationData FFactoryCustomizationData() : SwatchDesc( nullptr ), + PatternDesc( nullptr ), + MaterialDesc( nullptr ), + + SkinDesc( nullptr ), + PatternRotation( 0.f ), ColorSlot( INDEX_NONE ), NeedsSkinUpdate( false ), @@ -424,9 +418,14 @@ struct FACTORYGAME_API FFactoryCustomizationData void UpdateHasPowerData(); /** - * Fills an array with all valid customizations ( useful when sampling buildings tex. ) + * Returns all the recipes applied to this customization data. + */ + void GetAppliedRecipes( class UWorld* worldContext, TArray< TSubclassOf< class UFGRecipe > >& out_recipes ) const; + + /** + * Returns the refunds for the specified customization data. If newCustomizationData isn't supplied, then all refunds will be returned. Otherwise only the refunds for the customization that has changed will be returned. */ - void GetCustomizationArray( TArray< TSubclassOf < class UFGFactoryCustomizationDescriptor > >& out_customizations ); + static TArray< struct FInventoryStack > GetCustomizationRefunds( class UWorld* worldContext, const FFactoryCustomizationData& baseCustomizationData, const FFactoryCustomizationData* newCustomizationData = nullptr ); FORCEINLINE bool operator==( const FFactoryCustomizationData& other ) const { diff --git a/Source/FactoryGame/Public/FGFactoryConnectionComponent.h b/Source/FactoryGame/Public/FGFactoryConnectionComponent.h index df886aa0f2..e3454dd536 100644 --- a/Source/FactoryGame/Public/FGFactoryConnectionComponent.h +++ b/Source/FactoryGame/Public/FGFactoryConnectionComponent.h @@ -5,6 +5,7 @@ #include "FactoryGame.h" #include "FGConnectionComponent.h" #include "FGInventoryComponent.h" +#include "GameFramework/Actor.h" #include "FGFactoryConnectionComponent.generated.h" // For lazy people. This is used in nearly every BeginPlay of Proxies. @@ -78,16 +79,19 @@ class FACTORYGAME_API UFGFactoryConnectionComponent : public UFGConnectionCompon /** * Set the inventory associated with this connection */ + UFUNCTION( BlueprintCallable, Category = "FactoryGame|Factory|FactoryConnection" ) void SetInventory( class UFGInventoryComponent* inventory ); /** * Sets a specified index for the component to access on its assigned inventory */ + UFUNCTION( BlueprintCallable, Category = "FactoryGame|Factory|FactoryConnection" ) void SetInventoryAccessIndex( int32 index ); /** * Gets the inventory access index specified for this factory connection */ + UFUNCTION( BlueprintPure, Category = "FactoryGame|Factory|FactoryConnection" ) int32 GetInventoryAccessIndex() const { return mInventoryAccessIndex; } /** diff --git a/Source/FactoryGame/Public/FGFallingGiftBundle.h b/Source/FactoryGame/Public/FGFallingGiftBundle.h new file mode 100644 index 0000000000..fff17cbce2 --- /dev/null +++ b/Source/FactoryGame/Public/FGFallingGiftBundle.h @@ -0,0 +1,194 @@ +// Copyright Coffee Stain Studios. All Rights Reserved. + +#pragma once + +#include "FactoryGame.h" +#include "CoreMinimal.h" +#include "FGInventoryComponent.h" +#include "FGSaveInterface.h" +#include "FGSignificanceInterface.h" +#include "FGUseableInterface.h" +#include "GameFramework/Actor.h" +#include "FGFallingGiftBundle.generated.h" + +/** Data for a randomly selected gift reward. */ +USTRUCT( BlueprintType ) +struct FFGRandomGiftReward +{ + GENERATED_BODY() + + /** The type of items to give to the player when picked up. */ + UPROPERTY( EditDefaultsOnly ) + TArray< FInventoryStack > mItemsToGive; + + /** The type of unlocks to give to the player when picked up. */ + UPROPERTY( EditDefaultsOnly, Instanced ) + TArray< class UFGUnlock* > mUnlocks; + + /** The chance of this reward being chosen. All weights are added up and the percentage chance of being selected is Weight / TotalWeight. Weight of <= 0 will never be selected.*/ + UPROPERTY( EditDefaultsOnly ) + int32 SelectionChanceWeight = 1; +}; + +/** + * + */ +UCLASS( Abstract ) +class FACTORYGAME_API AFGFallingGiftBundle : public AActor, public IFGUseableInterface, public IFGSaveInterface, public IFGSignificanceInterface +{ + GENERATED_BODY() + + friend class AFGGiftRainSpawner; +public: + AFGFallingGiftBundle(); + + // Begin AActor Interface + virtual void BeginPlay() override; + virtual void Tick( float DeltaSeconds ) override; + virtual void GetLifetimeReplicatedProps( TArray< FLifetimeProperty >& OutLifetimeProps ) const override; + virtual void PostNetReceiveLocationAndRotation() override; + // End AActor Interface + + // Begin IFGSaveInterface + virtual void PreSaveGame_Implementation( int32 saveVersion, int32 gameVersion ) override; + virtual void PostSaveGame_Implementation( int32 saveVersion, int32 gameVersion ) override; + virtual void PreLoadGame_Implementation( int32 saveVersion, int32 gameVersion ) override; + virtual void PostLoadGame_Implementation( int32 saveVersion, int32 gameVersion ) override; + virtual void GatherDependencies_Implementation( TArray< UObject* >& out_dependentObjects ) override; + virtual bool NeedTransform_Implementation() override; + virtual bool ShouldSave_Implementation() const override; + // End IFSaveInterface + + // Begin IFGSaveInterface + virtual void GainedSignificance_Implementation() override; + virtual void LostSignificance_Implementation() override; + virtual float GetSignificanceRange() override { return mSignificanceRange; } + // End IFGSaveInterface + + // Begin IFGUseableInterface + virtual void UpdateUseState_Implementation( class AFGCharacterPlayer* byCharacter, const FVector& atLocation, class UPrimitiveComponent* componentHit, FUseState& out_useState ) override; + virtual void OnUse_Implementation( class AFGCharacterPlayer* byCharacter, const FUseState& state ) override; + virtual void OnUseStop_Implementation( class AFGCharacterPlayer* byCharacter, const FUseState& state ) override; + virtual bool IsUseable_Implementation() const override; + virtual void StartIsLookedAt_Implementation( class AFGCharacterPlayer* byCharacter, const FUseState& state ) override; + virtual FText GetLookAtDecription_Implementation( class AFGCharacterPlayer* byCharacter, const FUseState& state ) const override; + virtual void StopIsLookedAt_Implementation( class AFGCharacterPlayer* byCharacter, const FUseState& state ) override; + virtual void RegisterInteractingPlayer_Implementation( class AFGCharacterPlayer* player ) override {}; + virtual void UnregisterInteractingPlayer_Implementation( class AFGCharacterPlayer* player ) override {}; + // End IFGUseableInterface + + UFUNCTION( BlueprintPure, Category = "Falling Gift Bundle|Movement" ) + virtual float GetFallingSpeed() const; + + UFUNCTION( BlueprintCallable, Category = "Falling Gift Bundle|Movement" ) + + void SetIsFalling( bool isFalling ); + UFUNCTION( BlueprintPure, Category = "Falling Gift Bundle" ) + virtual bool CanBePickedUp( class AFGCharacterPlayer* byCharacter ) const; + + UFUNCTION( BlueprintCallable, Category = "Falling Gift Bundle" ) + void SelectNewRandomReward(); + +protected: + virtual void HandleLanding( const FHitResult& sweepResult ); + + UFUNCTION( BlueprintNativeEvent, Category = "Falling Gift Bundle|Movement" ) + void OnBeginFalling(); + + UFUNCTION( BlueprintNativeEvent, Category = "Falling Gift Bundle|Movement" ) + void OnStopFalling(); + + UFUNCTION( BlueprintNativeEvent, Category = "Falling Gift Bundle|Movement" ) + void OnLanded(); + + UFUNCTION( BlueprintNativeEvent, Category = "Falling Gift Bundle" ) + void OnPickup( AFGCharacterPlayer* player ); + + UFUNCTION( BlueprintNativeEvent, Category = "Significance" ) + void OnGainedSignificance(); + + UFUNCTION( BlueprintNativeEvent, Category = "Significance" ) + void OnLostSignificance(); + + UFUNCTION( BlueprintImplementableEvent, Category = "Significance" ) + void RemoveParachute(); + +private: + UFUNCTION() + void OnRep_IsFalling(); + + UFUNCTION() + void OnRep_SelectedRandomRewardIndex(); + + UFUNCTION() + void OnRep_WasPickedUp(); + + UFUNCTION() + void OnRep_HasLanded(); + + UFUNCTION( NetMulticast, Reliable ) + void Multicast_PickedUpByPlayer( class AFGCharacterPlayer* player ); + void PickupByPlayer( class AFGCharacterPlayer* player ); + + void CacheExpectedLandingZ(); + +protected: + UPROPERTY( EditAnywhere, BlueprintReadOnly ) + class UStaticMeshComponent* mMeshComponent; + +private: + /** Localized name of this gift bundle. */ + UPROPERTY( EditDefaultsOnly, Category = "Falling Gift Bundle" ) + FText mGiftBundleName; + + /** The audio event to fire when picking up this bundle */ + UPROPERTY( EditDefaultsOnly, Category = "Falling Gift Bundle" ) + class UAkAudioEvent* mPickupAudioEvent; + + /** A list of random rewards of which one will be selected for this gift. */ + UPROPERTY( EditDefaultsOnly, Category = "Falling Gift Bundle" ) + TArray< FFGRandomGiftReward > mRandomRewardPool; + + /** How fast the item pickup should fall. */ + UPROPERTY( EditDefaultsOnly, Category = "Falling Gift Bundle|Movement") + float mFallingSpeed; + + /** How fast the item pickup should rotate when falling. */ + UPROPERTY( EditDefaultsOnly, Category = "Falling Gift Bundle|Movement") + float mFallingRotationSpeed; + + /** Whether or not the item pickup is currently falling. */ + UPROPERTY( SaveGame, ReplicatedUsing = OnRep_IsFalling ) + bool mIsFalling; + + /** Cached value representing the height we expect to land at. Used to force the present to land in case the player moves out of valid collision range. */ + UPROPERTY( SaveGame, Replicated ) + float mCachedExpectedLandingZ; + + UPROPERTY( EditDefaultsOnly, Category = "Significance") + float mSignificanceRange; + + /** The gift spawner that spawned us. */ + UPROPERTY() + class AFGGiftRainSpawner* mGiftSpawner; + + /** The currently selected random reward. */ + const FFGRandomGiftReward* mSelectedRandomReward; + + UPROPERTY( ReplicatedUsing = OnRep_SelectedRandomRewardIndex ) + int32 mSelectedRandomRewardIndex; + + FVector mServerLocation; + FRotator mServerRotation; + + UPROPERTY( ReplicatedUsing = OnRep_WasPickedUp ) + bool mWasPickedUp; + + /** Bool used to flip the rotation direction when falling. */ + UPROPERTY( Replicated ) + bool mFlipRotationDirection; + + UPROPERTY( SaveGame, ReplicatedUsing = OnRep_HasLanded ) + bool mHasLanded; + +}; diff --git a/Source/FactoryGame/Public/FGGiftRainSpawner.h b/Source/FactoryGame/Public/FGGiftRainSpawner.h new file mode 100644 index 0000000000..ac29835d0a --- /dev/null +++ b/Source/FactoryGame/Public/FGGiftRainSpawner.h @@ -0,0 +1,153 @@ +// Copyright Coffee Stain Studios. All Rights Reserved. + +#pragma once + +#include "FactoryGame.h" +#include "CoreMinimal.h" +#include "GameFramework/Actor.h" +#include "FGGiftRainSpawner.generated.h" + +/** Spawn data for random gift bundle class selection. */ +USTRUCT( BlueprintType ) +struct FFGRandomGiftBundleSpawnData +{ + GENERATED_BODY() + + /** The type of gift bundle actor to spawn. */ + UPROPERTY( EditDefaultsOnly ) + TSubclassOf< class AFGFallingGiftBundle > Class = nullptr; + + /** The chance of this gift spawning. All weights are added up and the percentage chance of being selected is Weight / TotalWeight. Weight of <= 0 will never spawn.*/ + UPROPERTY( EditDefaultsOnly ) + int32 SpawnChanceWeight = 1; +}; + +/** + * Actor responsible for spawning Falling Gift Bundles + */ +UCLASS( Abstract ) +class FACTORYGAME_API AFGGiftRainSpawner : public AActor +{ + GENERATED_BODY() + +public: + AFGGiftRainSpawner(); + + //~ Begin AActor interface + virtual void BeginPlay() override; + //~ End AActor interface + + /** Spawns a gift bundle with a randomly picked class (out of the GiftClasses list) at the specified location. */ + UFUNCTION( BlueprintCallable, Category = "Gift Rain Spawner" ) + class AFGFallingGiftBundle* SpawnRandomGiftAtLocation( const FVector& location ); + + /** Spawns a gift bundle with a randomly picked class (out of the GiftClasses list) around the specified player. */ + UFUNCTION( BlueprintCallable, Category = "Gift Rain Spawner" ) + class AFGFallingGiftBundle* SpawnRandomGiftAroundPlayer( class AFGCharacterPlayer* player, float spawnDistance ); + + /** Spawns a gift bundle with a randomly picked class (out of the GiftClasses list) around a player in the world. */ + UFUNCTION( BlueprintCallable, Category = "Gift Rain Spawner" ) + class AFGFallingGiftBundle* SpawnRandomGiftAroundAnyPlayer( float spawnDistance ); + + /** Gets a list of gift bundle actors that this spawner has spawned. */ + UFUNCTION( BlueprintPure, Category = "Gift Rain Spawner" ) + const TArray< class AFGFallingGiftBundle* >& GetSpawnedGiftBundles() const { return mSpawnedGiftBundles; } + + /** Whether or not automatic gift spawning is enabled. */ + UFUNCTION( BlueprintPure, Category = "Gift Rain Spawner" ) + bool ShouldAutomaticallySpawnGifts() const; + + /** Enables / Disables the automatic gift spawning. */ + UFUNCTION( BlueprintCallable, Category = "Gift Rain Spawner" ) + void SetAutomaticGiftSpawningEnabled( bool enabled ); + + /** Function returning the spawn interval for gifts in seconds. If <= 0 then no gift will spawn. */ + UFUNCTION( BlueprintPure, Category = "Gift Rain Spawner" ) + const FFloatInterval& GetGiftSpawnInterval() const { return mGiftSpawnInterval; } + + /** Sets the frequency of automatic gift spawns. */ + UFUNCTION( BlueprintCallable, Category = "Gift Rain Spawner" ) + void SetGiftSpawnIntervalMinMax( float intervalSecondsMin, float intervalSecondsMax ); + + /** Sets the frequency of automatic gift spawns. */ + UFUNCTION( BlueprintCallable, Category = "Gift Rain Spawner" ) + void SetGiftSpawnInterval( const FFloatInterval& intervalSeconds ); + + /** Returns the current automatic gift spawn limit. No automatic gifts will spawn if the number of spawned gifts exceed this value. */ + UFUNCTION( BlueprintPure, Category = "Gift Rain Spawner" ) + int32 GetAutomaticGiftSpawnLimit() const { return mAutomaticGiftSpawnLimit; } + + /** Sets the automatic gift spawn limit. No automatic gifts will spawn if the number of spawned gifts exceed this value. Set to <= 0 for unlimited spawns. */ + UFUNCTION( BlueprintCallable, Category = "Gift Rain Spawner" ) + void SetAutomaticGiftSpawnLimit( int32 newLimit ); + + /** Function used to block a certain gift bundle class from spawning. It will still be part of the weighted selection process, it just wont spawn if it gets randomly selected. */ + UFUNCTION( BlueprintCallable, Category = "Gift Rain Spawner" ) + void SetGiftBundleClassBlockedFromSpawning( TSubclassOf< class AFGFallingGiftBundle > giftBundleClass, bool blocked ); + +protected: + /** Returns a gift bundle class to spawn when spawning a random gift bundle. Can be overridden to determine class manually. Otherwise it will grab a random class from the GiftClasses array. */ + UFUNCTION( BlueprintNativeEvent, Category = "Gift Rain Spawner" ) + TSubclassOf< class AFGFallingGiftBundle > GetGiftBundleClassToSpawn(); + + /** Called whenever a new gift bundle actor is spawned. */ + virtual void OnGiftBundleSpawned_Native( class AFGFallingGiftBundle* giftBundle ); + + /** Called whenever a new gift bundle actor is spawned. */ + UFUNCTION( BlueprintImplementableEvent, Category = "Gift Rain Spawner" ) + void OnGiftBundleSpawned( class AFGFallingGiftBundle* giftBundle ); + + /** Called whenever a spawned gift bundle actor is destroyed. */ + UFUNCTION( BlueprintImplementableEvent, Category = "Gift Rain Spawner" ) + void OnGiftBundleDestroyed( class AFGFallingGiftBundle* giftBundle ); + + void GetRelevantPlayerCharacters( TArray< class AFGCharacterPlayer* >& out_playerCharacters ) const; + +private: + UFUNCTION() + void OnGiftBundleActorDestroyed( AActor* giftBundleActor ); + + UFUNCTION() + void OnGiftSpawnerTimerFinished(); + + /** Function for controlling the automatic gift spawning timer. */ + void UpdateGiftSpawnerTimer(); + + /** Attempts to destroy the oldest gift bundle which isn't near a player. Returns the amount of gifts that were destroyed. */ + int32 TryDestroyOldestGiftBundles( int32 numToDestroy ) const; + +private: + /** The different kind of gift bundle classes we want to spawn. Will be picked at random depending on their weights. */ + UPROPERTY( EditDefaultsOnly, Category = "Gift Rain Spawner" ) + TArray< FFGRandomGiftBundleSpawnData > mGiftClasses; + + /** How much additional height to add for the gift rain spawns. */ + UPROPERTY( EditDefaultsOnly, Category = "Gift Rain Spawner" ) + FFloatInterval mGiftRainSpawnHeightIncrease; + + /** List of spawned gift bundles. */ + UPROPERTY( Transient ) + TArray< class AFGFallingGiftBundle* > mSpawnedGiftBundles; + + /** List of gift bundle classes that are not allowed to spawn. Their weight will still be part of the random gift selection, they just won't spawn if they get selected. */ + UPROPERTY( Transient ) + TSet< TSubclassOf< class AFGFallingGiftBundle > > mBlockedGiftBundleSpawnClasses; + + /** Whether or not to enable automatic gift spawning. */ + UPROPERTY( EditDefaultsOnly, Category = "Gift Rain Spawner|Automatic Gift Spawning" ) + bool mEnableAutomaticGiftSpawning; + + /** How often to automatically spawn gifts around players (seconds). <= 0 to disable*/ + UPROPERTY( EditDefaultsOnly, Category = "Gift Rain Spawner|Automatic Gift Spawning" ) + FFloatInterval mGiftSpawnInterval; + + /** The spawn radius of automatic gift spawns around players. Min and Max distance. */ + UPROPERTY( EditDefaultsOnly, Category = "Gift Rain Spawner|Automatic Gift Spawning" ) + FFloatInterval mGiftSpawnRadius; + + /** If the amount of spawned gift bundles exceeds this value, then automatic gift spawning will stop. <= 0 means no limit. */ + UPROPERTY( EditDefaultsOnly, Category = "Gift Rain Spawner|Automatic Gift Spawning" ) + int32 mAutomaticGiftSpawnLimit; + + FTimerHandle mGiftSpawnTimerHandle; +}; diff --git a/Source/FactoryGame/Public/FGHUD.h b/Source/FactoryGame/Public/FGHUD.h index 6283df153b..6dd4304fc3 100644 --- a/Source/FactoryGame/Public/FGHUD.h +++ b/Source/FactoryGame/Public/FGHUD.h @@ -65,8 +65,12 @@ struct FCompassEntry /** True if special effect is visible, special effect will be set to false if time left expires */ bool bSpecialEffectVisible{true}; float SpecialEffectTime{0.0f}; + /** This is actually not just text dimensions, but also the glyph sequence for this text */ bool bHasCachedTextDimensions{false}; FVector2f CachedTextDimensions{ForceInit}; + /** Current font scaling this glyph sequence has been initialized with. Used to invalidate text dimensions if scaling changes */ + float CachedRenderedTextScaling{0.0f}; + TSharedPtr CachedShapedGlyphSequence; float CachedDistanceToCamera{0.0f}; float MaxDrawRange{-1.0f}; @@ -257,6 +261,11 @@ class FACTORYGAME_API AFGHUD : public AFGHUDBase UFUNCTION() void OnActorRepresentationFiltered( ERepresentationType type, bool visible ); + void OnCultureChanged(); + + /** Invalidates text dimensions and glyph sequences that have been cached by the compass widget */ + void InvalidateCachedTextDimensionsAndGlyphs(); + void SetCompassEntryVisibility(UFGActorRepresentation* actorRepresentation, bool visible); void RegisterCardinalCompassDirections(); diff --git a/Source/FactoryGame/Public/FGInventoryComponent.h b/Source/FactoryGame/Public/FGInventoryComponent.h index c442710021..33c96fac3c 100644 --- a/Source/FactoryGame/Public/FGInventoryComponent.h +++ b/Source/FactoryGame/Public/FGInventoryComponent.h @@ -296,6 +296,7 @@ class FACTORYGAME_API UFGInventoryComponent : public UActorComponent, public IFG */ UFUNCTION( BlueprintCallable, Category = "Inventory" ) virtual int32 AddStackToIndex( const int32 idx, const FInventoryStack& stack, const bool allowPartialAdd = false, UFGInventoryComponent* sourceInventory = nullptr ); + virtual int32 AddStackToIndex_Unsafe( const int32 idx, const FInventoryStack& stack, const bool allowPartialAdd = false, UFGInventoryComponent* sourceInventory = nullptr ); FORCEINLINE int32 AddSingleItemToEmptyIndex_Unsafe( const int32 idx, const FInventoryItem& item ) { @@ -545,7 +546,8 @@ class FACTORYGAME_API UFGInventoryComponent : public UActorComponent, public IFG /** Returns the player state from the outer player character */ class AFGPlayerState* GetOwningPlayerState() const; - // Returns true if either the session wide cheat NoCost is enabled or if the individual game mode NoBuildCost is enabled + // Returns true if either the session wide cheat NoCost is enabled or if the individual game mode NoBuildCost is enabled + UFUNCTION( BlueprintPure, Category = "Inventory" ) bool GetNoBuildCost() const; /** Updates the relevancy owner for this item. This component will only replicate it's data when the relevancy owner allows it to */ diff --git a/Source/FactoryGame/Public/FGItemPickup.h b/Source/FactoryGame/Public/FGItemPickup.h index 3b6a223885..82a865b2d2 100644 --- a/Source/FactoryGame/Public/FGItemPickup.h +++ b/Source/FactoryGame/Public/FGItemPickup.h @@ -96,6 +96,10 @@ class FACTORYGAME_API AFGItemPickup : public AFGStaticReplicatedActor, public IF /** Removes one item from stack and returns the player who dropped the item */ UFUNCTION( BlueprintCallable ) const class AFGPlayerController* EatenByCreature( const int32 amount ); + + virtual bool CanEverRespawn() const; + + virtual bool CanBePickedUp( class AFGCharacterPlayer* byCharacter ) const; /** Multicast to everyone so picking up clients can see effects */ UFUNCTION( BlueprintImplementableEvent,BlueprintCosmetic ) diff --git a/Source/FactoryGame/Public/FGItemPickup_Spawnable.h b/Source/FactoryGame/Public/FGItemPickup_Spawnable.h index 93923f4fda..6ec627b6aa 100644 --- a/Source/FactoryGame/Public/FGItemPickup_Spawnable.h +++ b/Source/FactoryGame/Public/FGItemPickup_Spawnable.h @@ -32,6 +32,7 @@ class FACTORYGAME_API AFGItemPickup_Spawnable : public AFGItemPickup //~ Begin AFGItemPickup interface virtual bool ShouldBeRegisteredForPickup() const override; + virtual bool CanEverRespawn() const override; //~ End AFGItemPickup interface /** @@ -46,23 +47,28 @@ class FACTORYGAME_API AFGItemPickup_Spawnable : public AFGItemPickup * * @return a valid item drop if everything went well */ - static AFGItemPickup_Spawnable* CreateItemDrop( UWorld* world, const FInventoryStack& item, FVector spawnLocation, FRotator spawnRotation, TSubclassOf< AFGItemPickup_Spawnable> itemDropClass = nullptr, ULevel* spawnLevelOverride = nullptr, FName spawnNameOverride = NAME_None ) + static AFGItemPickup_Spawnable* CreateItemDrop( UWorld* world, const FInventoryStack& item, const FVector& spawnLocation, const FRotator& spawnRotation, TSubclassOf< AFGItemPickup_Spawnable> itemDropClass = nullptr, ULevel* spawnLevelOverride = nullptr, FName spawnNameOverride = NAME_None ) { return CreateItemDrop( nullptr, world, item, spawnLocation, spawnRotation, itemDropClass, spawnLevelOverride, spawnNameOverride ); } UFUNCTION( BlueprintCallable, Category = "ItemDrop", meta = ( DefaultToSelf = "worldContext" ) ) - static AFGItemPickup_Spawnable* CreateItemDrop( UFGInventoryComponent* inventoryComponent, const FInventoryStack& item, FVector spawnLocation, FRotator spawnRotation, TSubclassOf< AFGItemPickup_Spawnable> itemDropClass = nullptr, ULevel* spawnLevelOverride = nullptr, FName spawnNameOverride = NAME_None ) + static AFGItemPickup_Spawnable* CreateItemDrop( UFGInventoryComponent* inventoryComponent, const FInventoryStack& item, const FVector& spawnLocation, const FRotator& spawnRotation, TSubclassOf< AFGItemPickup_Spawnable> itemDropClass = nullptr, ULevel* spawnLevelOverride = nullptr, FName spawnNameOverride = NAME_None ) { return CreateItemDrop( inventoryComponent, inventoryComponent->GetWorld(), item, spawnLocation, spawnRotation, itemDropClass, spawnLevelOverride, spawnNameOverride ); } /** * @copydoc AFGItemPickup_Spawnable::CreateItemDrop */ - static AFGItemPickup_Spawnable* CreateItemDrop( UFGInventoryComponent* inventoryComponent, UWorld* world, const FInventoryStack& item, FVector spawnLocation, FRotator spawnRotation, TSubclassOf< AFGItemPickup_Spawnable> itemDropClass = nullptr, ULevel* spawnLevelOverride = nullptr, FName spawnNameOverride = NAME_None ); + static AFGItemPickup_Spawnable* CreateItemDrop( UFGInventoryComponent* inventoryComponent, UWorld* world, const FInventoryStack& item, const FVector& spawnLocation, const FRotator& spawnRotation, TSubclassOf< AFGItemPickup_Spawnable> itemDropClass = nullptr, ULevel* spawnLevelOverride = nullptr, FName spawnNameOverride = NAME_None ); UFUNCTION() void OnColorUpdated( int32 index ); + virtual void ConfigureMeshComponent( const FInventoryStack& item ); + + virtual bool CanMove() const { return mCanMove; } + virtual void SetCanMove( bool canMove ); + /** * Will drop item at location if there are no stack found on location that have enough space available. */ @@ -163,4 +169,6 @@ class FACTORYGAME_API AFGItemPickup_Spawnable : public AFGItemPickup /** Should we play a spawn effect? */ UPROPERTY( SaveGame ) bool mPlaySpawnEffect; -}; \ No newline at end of file + + bool mCanMove; +}; diff --git a/Source/FactoryGame/Public/FGMapManager.h b/Source/FactoryGame/Public/FGMapManager.h index 43d75edbc8..c7e879e8c8 100644 --- a/Source/FactoryGame/Public/FGMapManager.h +++ b/Source/FactoryGame/Public/FGMapManager.h @@ -335,7 +335,9 @@ class FACTORYGAME_API AFGMapManager : public AFGSubsystem, public IFGSaveInterfa FAsyncTask* mFOWAsyncTask; TArray mFOWDrawQueue; - + + UPROPERTY() + TMap mActorMapToLocation; }; struct FFogOfWarWorker diff --git a/Source/FactoryGame/Public/FGObjectReference.h b/Source/FactoryGame/Public/FGObjectReference.h index 91fd99b933..83367c3507 100644 --- a/Source/FactoryGame/Public/FGObjectReference.h +++ b/Source/FactoryGame/Public/FGObjectReference.h @@ -88,6 +88,9 @@ struct FACTORYGAME_API FObjectReferenceDisc /** Returns the sub-object path within (eg if PathName==Persistent_Level:PersistentLevel.Actor1 then it returns PersistentLevel.Actor1 */ FString GetSubPathString() const; + /** Returns the name of the top level actor that this object reference maps to. e.g. if PathName is Persistent_Level:PersistentLevel.Actor1.SubObject1, it will return Actor1 */ + FString GetTopLevelActorName() const; + /** Get the relative path between the level the object resides in */ static void GetRelativePath( const UObject* obj, FString& out_pathName ); diff --git a/Source/FactoryGame/Public/FGRecipeManager.h b/Source/FactoryGame/Public/FGRecipeManager.h index b1dae75115..d691b28add 100644 --- a/Source/FactoryGame/Public/FGRecipeManager.h +++ b/Source/FactoryGame/Public/FGRecipeManager.h @@ -89,6 +89,10 @@ class FACTORYGAME_API AFGRecipeManager : public AFGSubsystem, public IFGSaveInte UFUNCTION( BlueprintCallable, Category = "FactoryGame|Recipe" ) void GetAllAvailableCustomizationRecipes( TArray< TSubclassOf< UFGCustomizationRecipe > >& out_recipes ); + /** Returns the customization recipe the specified customization desc belongs to, if any. */ + UFUNCTION( BlueprintCallable, Category = "FactoryGame|Recipe" ) + TSubclassOf< class UFGCustomizationRecipe > GetCustomizationRecipeFromDesc( TSubclassOf< class UFGFactoryCustomizationDescriptor > desc ); + /** Gets the available recipes for the given class, may not be null. */ UFUNCTION( BlueprintCallable, Category = "FactoryGame|Recipe" ) void GetAvailableRecipesForProducer( TSubclassOf< UObject > forProducer, TArray< TSubclassOf< UFGRecipe > >& out_recipes ); diff --git a/Source/FactoryGame/Public/FGResearchTree.h b/Source/FactoryGame/Public/FGResearchTree.h index 05d3e79656..185baa5a7b 100644 --- a/Source/FactoryGame/Public/FGResearchTree.h +++ b/Source/FactoryGame/Public/FGResearchTree.h @@ -81,6 +81,8 @@ class FACTORYGAME_API UFGResearchTree : public UObject static EResearchTreeStatus GetResearchTreeStatus( TSubclassOf< UFGResearchTree > inClass, UObject* worldContext ); + bool GetIsEventTree() const { return mIsEventTree; } + protected: /** The name to be displayed to the player before the tree is unlocked */ UPROPERTY( EditDefaultsOnly, Category = "Research Tree" ) @@ -118,6 +120,10 @@ class FACTORYGAME_API UFGResearchTree : public UObject UPROPERTY( EditDefaultsOnly, Instanced, Category = "Research Tree" ) TArray< class UFGResearchTreeNode* > mNodes; + /** True if tree is related to event. Will not give achievement if researched. */ + UPROPERTY( EditDefaultsOnly, Category = "Research Tree" ) + bool mIsEventTree = false; + private: /** Asset Bundle data computed at save time. In cooked builds this is accessible from AssetRegistry */ UPROPERTY() diff --git a/Source/FactoryGame/Public/FGScannableSubsystem.h b/Source/FactoryGame/Public/FGScannableSubsystem.h index 5209b67e1a..82dc50287b 100644 --- a/Source/FactoryGame/Public/FGScannableSubsystem.h +++ b/Source/FactoryGame/Public/FGScannableSubsystem.h @@ -52,14 +52,10 @@ class FACTORYGAME_API AFGScannableSubsystem : public AFGSubsystem, public IFGSav void OnLevelPlacedActorDestroyed(AActor* destroyedActor); void OnDropPodLooted( class AFGDropPod* dropPod ); - - void OnCreatureSpawnerUpdated( class AFGCreatureSpawner* creatureSpawner, bool scannable ); - void OnCreatureSpawnerAdded( class AFGCreatureSpawner* creatureSpawner ); - void OnCreatureSpawnerRemoved( class AFGCreatureSpawner* creatureSpawner ); FORCEINLINE const TArray& GetAvailableItemPickups() const { return mAvailableItemPickups; } FORCEINLINE const TArray& GetAvailableDropPods() const { return mAvailableDropPods; } - FORCEINLINE const TArray& GetScannableCreatureSpawners() const { return mScannableCreatureSpawners; } + FORCEINLINE const TArray& GetAvailableCreatureSpawners() const { return mAvailableCreatureSpawners; } /** Whether or not the specified item pickup exists. */ bool DoesPickupExist( const FGuid& PickupGuid ) const; @@ -67,7 +63,7 @@ class FACTORYGAME_API AFGScannableSubsystem : public AFGSubsystem, public IFGSav bool HasDropPodBeenLooted( const FGuid& dropPodGuid ) const; private: // Called by AFGWorldScannableDataGenerator to populate the subsystem with the data cached during cooking - void AssignScannableData( const TArray& itemPickups, const TArray& dropPods ); + void AssignScannableData( const class AFGWorldScannableDataGenerator* sourceGenerator ); UPROPERTY( Transient ) TArray< class AFGBuildableRadarTower* > mRadarTowers; @@ -75,10 +71,14 @@ class FACTORYGAME_API AFGScannableSubsystem : public AFGSubsystem, public IFGSav UPROPERTY( Transient ) TArray mAvailableItemPickups; - /** All crash site actors available for this level, cached in the editor time */ + /** All crash site actors available for this level, cached in the editor during cooking */ UPROPERTY( Transient ) TArray mAvailableDropPods; + /** All creature spawners for this level, cached in the editor during cooking */ + UPROPERTY( Transient ) + TArray mAvailableCreatureSpawners; + /** List of destroyed pickups. */ UPROPERTY( SaveGame ) TSet mDestroyedPickups; @@ -86,8 +86,4 @@ class FACTORYGAME_API AFGScannableSubsystem : public AFGSubsystem, public IFGSav /** List of looted crash sites */ UPROPERTY( SaveGame ) TSet mLootedDropPods; - - UPROPERTY( Transient ) - TArray< class AFGCreatureSpawner* > mScannableCreatureSpawners; - }; diff --git a/Source/FactoryGame/Public/FGStorySubsystem.h b/Source/FactoryGame/Public/FGStorySubsystem.h index e1bba8f513..2ae0e6ee4f 100644 --- a/Source/FactoryGame/Public/FGStorySubsystem.h +++ b/Source/FactoryGame/Public/FGStorySubsystem.h @@ -14,6 +14,7 @@ #include "FGRemoteCallObject.h" #include "FGStorySubsystem.generated.h" +class UFGGamePhase; DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams( FOnMessageFinishedForPlayer, class AFGPlayerController*, player, class UFGMessage*, message ); UCLASS() @@ -129,6 +130,13 @@ class FACTORYGAME_API AFGStorySubsystem : public AFGSubsystem, public IFGSaveInt void OnBuildingBuilt( AFGPlayerState* playerState, TSubclassOf< class AActor > builtActor, int64 totalBuildCount ); void OnBuildingDismantled( AFGPlayerState* playerState, TSubclassOf< class AActor > builtActor, int64 totalDismantledCount ); void OnFirstItemSinkFailure( TSubclassOf itemFailedToSink ); + UFUNCTION() + void OnCalendarSlotUnlocked( int32 slot, bool isRandomUnlock, class UFGUnlock* unlock ); + UFUNCTION() + void OnCalendarOpenedByPlayer( class AFGCharacterPlayer* byCharacter, class AFGBuildableCalendar* calendar, bool firstTime ); + + void OnPlayerFinishedSpawning( class AFGCharacterPlayer* player ); + // Not bound to the space elevator delegate since we don't always have a space elevator built. So the space elevator calls this instead void OnSpaceElevatorShipmentLockedIn( AFGPlayerState* playerState, class UFGGamePhase* gamePhase ); // Not bound to any delegate since we don't always have a space elevator built. The Build_SpaceElevator calls this @@ -190,4 +198,3 @@ class FACTORYGAME_API AFGStorySubsystem : public AFGSubsystem, public IFGSaveInt TMap > mSchematicTypePurchaseHistory; }; - diff --git a/Source/FactoryGame/Public/FGSubsystemClasses.h b/Source/FactoryGame/Public/FGSubsystemClasses.h index f74cdc3b76..1a25d70681 100644 --- a/Source/FactoryGame/Public/FGSubsystemClasses.h +++ b/Source/FactoryGame/Public/FGSubsystemClasses.h @@ -56,6 +56,9 @@ class FACTORYGAME_API UFGSubsystemClasses : public UDeveloperSettings /** Subsystem to manage all the buildables in the game. */ UPROPERTY( config, EditDefaultsOnly, Category = "Subsystem" ) TSubclassOf< class AFGBuildableSubsystem > mBuildableSubsystemClass; + /** Subsystem to audio volume according to external voice chat apps */ + UPROPERTY( config, EditDefaultsOnly, Category = "Subsystem" ) + TSubclassOf< class AFGVoiceChatAudioMeterSubsystem > mVoiceChatAudioMeterSubsystemClass; /** Subsystem to manage all the lightweight buildables in the game (Foundations, Walls). */ UPROPERTY( config, EditDefaultsOnly, Category = "Subsystem" ) TSubclassOf< class AFGLightweightBuildableSubsystem > mLightweightBuildableSubsystemClass; @@ -114,4 +117,3 @@ class FACTORYGAME_API UFGSubsystemClasses : public UDeveloperSettings UPROPERTY( Config, EditDefaultsOnly, Category = "Subsystem" ) TSoftClassPtr< class AFGWorldEventSubsystem > mWorldEventSubsystem; }; - diff --git a/Source/FactoryGame/Public/FGVertexAnimatedMeshComponent.h b/Source/FactoryGame/Public/FGVertexAnimatedMeshComponent.h index f4d76c31ae..420e3f4ba7 100644 --- a/Source/FactoryGame/Public/FGVertexAnimatedMeshComponent.h +++ b/Source/FactoryGame/Public/FGVertexAnimatedMeshComponent.h @@ -236,6 +236,10 @@ class FACTORYGAME_API UFGVertexAnimatedMeshComponent : public UFGColoredInstance UPROPERTY(EditDefaultsOnly, Category = "Animation") float mUnderClockedAnimationSpeed = 0.5f; + + UPROPERTY(EditDefaultsOnly,Category="Animation|Wire") + uint8 bNeedsSimulationForWires:1 = false; + // Begin pre-cached states. /* Cached on property changed for runtime speed.*/ UPROPERTY() @@ -261,7 +265,7 @@ class FACTORYGAME_API UFGVertexAnimatedMeshComponent : public UFGColoredInstance int8 mCurrentSequence = 0; private: - UPROPERTY(Transient) + UPROPERTY(VisibleInstanceOnly,Transient) USkeletalMeshComponent* mSpawnedWireMeshComponent; /* Current animation state. */ diff --git a/Source/FactoryGame/Public/FGWorldScannableData.h b/Source/FactoryGame/Public/FGWorldScannableData.h index 549cd63c4c..2f3eff8f09 100644 --- a/Source/FactoryGame/Public/FGWorldScannableData.h +++ b/Source/FactoryGame/Public/FGWorldScannableData.h @@ -7,6 +7,9 @@ #include "GameFramework/Actor.h" #include "FGWorldScannableData.generated.h" +class AFGCreature; +class AFGCreatureSpawner; + USTRUCT() struct FWorldScannableData { @@ -15,21 +18,36 @@ struct FWorldScannableData FWorldScannableData() = default; #if WITH_EDITOR explicit FWorldScannableData( const AActor* actor ); - FWorldScannableData( const class FWorldPartitionActorDesc* ActorDesc, int32 PIEInstanceIndex = INDEX_NONE ); + explicit FWorldScannableData( const class FWorldPartitionActorDesc* ActorDesc, int32 PIEInstanceIndex = INDEX_NONE ); #endif - UPROPERTY( VisibleAnywhere ) + UPROPERTY( VisibleAnywhere, Category = "Scannable Data" ) TSoftObjectPtr Actor; - UPROPERTY( VisibleAnywhere ) + UPROPERTY( VisibleAnywhere, Category = "Scannable Data" ) FGuid ActorGuid{}; - UPROPERTY( VisibleAnywhere ) + UPROPERTY( VisibleAnywhere, Category = "Scannable Data" ) TSubclassOf ActorClass; - UPROPERTY( VisibleAnywhere ) + UPROPERTY( VisibleAnywhere, Category = "Scannable Data" ) FVector ActorLocation{ForceInit}; - +}; + +USTRUCT() +struct FCreatureSpawnerWorldScannableData : public FWorldScannableData +{ + GENERATED_BODY() + + FCreatureSpawnerWorldScannableData() = default; +#if WITH_EDITOR + explicit FCreatureSpawnerWorldScannableData( const AFGCreatureSpawner* actor ); + explicit FCreatureSpawnerWorldScannableData( const class FWorldPartitionActorDesc* ActorDesc, int32 PIEInstanceIndex = INDEX_NONE ); +#endif + + /** Class of the creature that is spawned by this spawner */ + UPROPERTY( VisibleAnywhere, Category = "Scannable Data" ) + TSoftClassPtr CreatureClass; }; UCLASS() @@ -48,7 +66,7 @@ class FACTORYGAME_API AFGWorldScannableDataGenerator : public AActor #if WITH_EDITOR void CacheWorldScannableData(); #endif - +public: /** Item pickups that were found in the world */ UPROPERTY() TArray mItemPickups; @@ -56,4 +74,8 @@ class FACTORYGAME_API AFGWorldScannableDataGenerator : public AActor /** Drop pods that were found in the world */ UPROPERTY() TArray mDropPods; + + /** Creature spawners that were found in the world */ + UPROPERTY() + TArray mCreatureSpawners; }; diff --git a/Source/FactoryGame/Public/FGWorldSettings.h b/Source/FactoryGame/Public/FGWorldSettings.h index 308d1ba93f..9d2dca2215 100644 --- a/Source/FactoryGame/Public/FGWorldSettings.h +++ b/Source/FactoryGame/Public/FGWorldSettings.h @@ -210,6 +210,10 @@ class FACTORYGAME_API AFGWorldSettings : public AWorldSettings, public IFGSaveIn UPROPERTY() class AFGAudioVolumeSubsystem* mAudioVolumeSubsystem; + + UPROPERTY() + class AFGVoiceChatAudioMeterSubsystem* mVoiceChatAudioMeterSubsystem; + UPROPERTY() class AFGFoliageRemovalSubsystem* mFoliageRemovalSubsystem; diff --git a/Source/FactoryGame/Public/Hologram/FGBuildableSnowCannonHologram.h b/Source/FactoryGame/Public/Hologram/FGBuildableSnowCannonHologram.h new file mode 100644 index 0000000000..eaab5979db --- /dev/null +++ b/Source/FactoryGame/Public/Hologram/FGBuildableSnowCannonHologram.h @@ -0,0 +1,50 @@ +// Copyright Coffee Stain Studios. All Rights Reserved. + +#pragma once + +#include "FactoryGame.h" +#include "CoreMinimal.h" +#include "Hologram/FGGenericBuildableHologram.h" +#include "FGBuildableSnowCannonHologram.generated.h" + +UENUM() +enum class ESnowCannonHologramBuildStep : uint8 +{ + PlacementAndRotation, + AdjustAngle +}; + +/** + * + */ +UCLASS() +class FACTORYGAME_API AFGBuildableSnowCannonHologram : public AFGGenericBuildableHologram +{ + GENERATED_BODY() + +public: + AFGBuildableSnowCannonHologram(); + + virtual void BeginPlay() override; + + virtual int32 GetRotationStep() const override; + virtual void ScrollRotate( int32 delta, int32 step ) override; + virtual bool DoMultiStepPlacement( bool isInputFromARelease ) override; + virtual bool IsValidHitResult( const FHitResult& hitResult ) const override; + virtual void ConfigureActor( AFGBuildable* inBuildable ) const override; + virtual bool TrySnapToActor( const FHitResult& hitResult ) override; + virtual void SetHologramLocationAndRotation( const FHitResult& hitResult ) override; + +protected: + UFUNCTION( BlueprintImplementableEvent, Category = "JumpPad" ) + void OnCannonAngleAdjusted(); + +private: + UPROPERTY() + class UStaticMeshComponent* mCannonHeadMeshComponent; + + FInt32Interval mAngleLimit; + float mAngleOffset; + + ESnowCannonHologramBuildStep mBuildStep; +}; diff --git a/Source/FactoryGame/Public/Hologram/FGPowerPoleHologram.h b/Source/FactoryGame/Public/Hologram/FGPowerPoleHologram.h index 313c201323..ad372398d1 100644 --- a/Source/FactoryGame/Public/Hologram/FGPowerPoleHologram.h +++ b/Source/FactoryGame/Public/Hologram/FGPowerPoleHologram.h @@ -32,7 +32,6 @@ class FACTORYGAME_API AFGPowerPoleHologram : public AFGBuildableHologram virtual void SetHologramLocationAndRotation( const FHitResult& hitResult ) override; virtual bool TrySnapToActor( const FHitResult& hitResult ) override; virtual void PostHologramPlacement( const FHitResult& hitResult ) override; - virtual void SpawnChildren( AActor* hologramOwner, FVector spawnLocation, APawn* hologramInstigator ) override; virtual USceneComponent* SetupComponent( USceneComponent* attachParent, UActorComponent* componentTemplate, const FName& componentName, const FName& attachSocketName ) override; virtual bool IsValidHitResult( const FHitResult& hitResult ) const override; virtual AActor* GetUpgradedActor() const override; @@ -57,6 +56,7 @@ class FACTORYGAME_API AFGPowerPoleHologram : public AFGBuildableHologram EBreakWireState mBreakingWireState = EBreakWireState::Initial; private: + void SpawnWireChildHolograms( TSubclassOf< class UFGRecipe > wireRecipe ); void ResetByproductHolograms(); /** The connection wires snap to, used when placing a pole automatically. */ diff --git a/Source/FactoryGame/Public/Hologram/FGPowerPoleWallHologram.h b/Source/FactoryGame/Public/Hologram/FGPowerPoleWallHologram.h index 9f6639fbf7..f3c1a3b996 100644 --- a/Source/FactoryGame/Public/Hologram/FGPowerPoleWallHologram.h +++ b/Source/FactoryGame/Public/Hologram/FGPowerPoleWallHologram.h @@ -28,7 +28,6 @@ class FACTORYGAME_API AFGPowerPoleWallHologram : public AFGWallAttachmentHologra // Begin AFGHologram interface virtual USceneComponent* SetupComponent( USceneComponent* attachParent, UActorComponent* componentTemplate, const FName& componentName, const FName& attachSocketName ) override; virtual AActor* Construct( TArray< AActor* >& out_children, FNetConstructionID constructionID ) override; - virtual void SpawnChildren( AActor* hologramOwner, FVector spawnLocation, APawn* hologramInstigator ) override; virtual void PostHologramPlacement( const FHitResult& hitResult ) override; virtual bool IsValidHitResult(const FHitResult& hitResult) const override; virtual bool TryUpgrade(const FHitResult& hitResult) override; @@ -48,6 +47,7 @@ class FACTORYGAME_API AFGPowerPoleWallHologram : public AFGWallAttachmentHologra bool AlignWithWire( const class AFGBuildableWire* wire, FVector& locationToAlign, FRotator& out_rotation ) const; private: + void SpawnWireChildHolograms( TSubclassOf< class UFGRecipe > wireRecipe ); void ResetByproductHolograms(); protected: diff --git a/Source/FactoryGame/Public/Hologram/FGWireHologram.h b/Source/FactoryGame/Public/Hologram/FGWireHologram.h index 19c1e1d223..9c48faa7c8 100644 --- a/Source/FactoryGame/Public/Hologram/FGWireHologram.h +++ b/Source/FactoryGame/Public/Hologram/FGWireHologram.h @@ -34,6 +34,7 @@ class FACTORYGAME_API AFGWireHologram : public AFGBuildableHologram virtual void ScrollRotate( int32 delta, int32 step ) override; virtual AActor* GetUpgradedActor() const override; virtual bool TryUpgrade( const FHitResult& hitResult ) override; + virtual bool ShouldBuildGunHitWireMeshes() const override; virtual void CheckBlueprintCommingling() override; virtual float GetBuildGunRangeOverride_Implementation() const override; virtual void PostHologramPlacement( const FHitResult& hitResult ) override; diff --git a/Source/FactoryGame/Public/SCompassWidget.h b/Source/FactoryGame/Public/SCompassWidget.h index 4278f94855..68fff6c177 100644 --- a/Source/FactoryGame/Public/SCompassWidget.h +++ b/Source/FactoryGame/Public/SCompassWidget.h @@ -73,7 +73,7 @@ class FACTORYGAME_API SCompassWidget : public SWidget static void DrawEntry(const FVector2f& RootLocation, const FCompassEntry& Entry, const FGeometry& AllottedGeometry, FSlateWindowElementList& OutDrawElements, int32& LayerId); static void DrawEntrySpecialEffect(const FVector2f& RootLocation, const FCompassEntry& Entry, const FGeometry& AllottedGeometry, FSlateWindowElementList& OutDrawElements, int32& LayerId); - static void UpdateEntryTextMetrics( FCompassEntry& Entry, const FSlateFontInfo& FontInfo ); + static void UpdateEntryTextRenderData( FCompassEntry& Entry, const FSlateFontInfo& FontInfo ); protected: TWeakObjectPtr mOwnerCompassWidget; diff --git a/Source/FactoryGame/Public/UI/FGErrorDescriptor.h b/Source/FactoryGame/Public/UI/FGErrorDescriptor.h index 7c5a48f1ee..e98ec5bba9 100644 --- a/Source/FactoryGame/Public/UI/FGErrorDescriptor.h +++ b/Source/FactoryGame/Public/UI/FGErrorDescriptor.h @@ -28,11 +28,17 @@ struct FErrorDescriptor: public FTableRowBase TSoftClassPtr< UFGPopupWidgetContent > PopupClass; /** - * An error code that will be presented to the user for this error. + * An error code (not localized) that will be presented to the user for this error. */ UPROPERTY( EditAnywhere, BlueprintReadOnly ) FName ErrorCode; + /** + * A human readable and localized error code that will be presented to the user for this error. + */ + UPROPERTY( EditAnywhere, BlueprintReadOnly ) + FText ErrorCodeName; + UPROPERTY( EditAnywhere, BlueprintReadOnly ) FText ErrorDescription; @@ -41,6 +47,9 @@ struct FErrorDescriptor: public FTableRowBase */ UPROPERTY( EditAnywhere, BlueprintReadOnly ) bool bShowPopup = true; + + UPROPERTY( EditAnywhere, BlueprintReadOnly ) + bool bShowPopupInShippingBuild = true; }; UCLASS() @@ -52,9 +61,12 @@ class UFGErrorDescriptor : public UMVVMViewModelBase UPROPERTY(FieldNotify, BlueprintReadOnly) FName ErrorCode; + UPROPERTY( FieldNotify, BlueprintReadOnly ) + FText ErrorCodeName; + UPROPERTY(FieldNotify, BlueprintReadOnly) FText ErrorDescription; UPROPERTY(FieldNotify, BlueprintReadOnly) FString ErrorDetails; -}; \ No newline at end of file +}; diff --git a/Source/FactoryGame/Public/UI/Message/FGMessageSender.h b/Source/FactoryGame/Public/UI/Message/FGMessageSender.h index f4e6bb9060..6823a4fb83 100644 --- a/Source/FactoryGame/Public/UI/Message/FGMessageSender.h +++ b/Source/FactoryGame/Public/UI/Message/FGMessageSender.h @@ -25,17 +25,17 @@ class FACTORYGAME_API UFGMessageSender : public UObject UPROPERTY( BlueprintReadOnly, EditDefaultsOnly, Category = "Sender" ) FText mSenderName; - /** Mail adress of the sender */ + /** Jingle to play when receiving a message from this sender. */ UPROPERTY( BlueprintReadOnly, EditDefaultsOnly, Category = "Sender" ) - FText mSenderMail; + class UAkAudioEvent* mMessageJingle; - /** Image of the sender */ + /** Music to play when displaying a presentation from this sender. */ UPROPERTY( BlueprintReadOnly, EditDefaultsOnly, Category = "Sender" ) - class UTexture2D* mTexture; + class UAkAudioEvent* mPresentationMusic; - /** Color of the sender */ + /** Logo material for this sender. */ UPROPERTY( BlueprintReadOnly, EditDefaultsOnly, Category = "Sender" ) - FLinearColor mSenderColor = FLinearColor::White; + class UMaterialInterface* mLogoMaterial; /** The tag used when importing messages. Case-insensitive. */ UPROPERTY( BlueprintReadOnly, EditDefaultsOnly, Category = "Import" ) diff --git a/Source/FactoryGame/currentVersion.txt b/Source/FactoryGame/currentVersion.txt index 1d9b199e54..6980d60667 100644 --- a/Source/FactoryGame/currentVersion.txt +++ b/Source/FactoryGame/currentVersion.txt @@ -1 +1 @@ -377620 +382498