Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -643,3 +643,5 @@ This page lists all the individual contributions to the project by their author.
- **Damfoos** - extensive and thorough testing
- **Dmitry Volkov** - extensive and thorough testing
- **Rise of the East community** - extensive playtesting of in-dev features
- **ahasasjeb**:
- Fixed AI continuing to produce units and construct buildings from buildings affected by EMP
1 change: 1 addition & 0 deletions docs/Fixed-or-Improved-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ This page describes all ingame logics that are fixed or improved in Phobos witho
- `DeployingAnim` now supports both `Normalized=true` and `Reverse=true`. Keep in mind `Reverse` uses `LoopEnd` for frame amount instead of `End` even without `LoopCount` > 1.
- `DeployingAnim` using unit drawer now also tint accordingly with the unit.
- Fixed the bug that armor multiplier of new attacheffect will have extra take effect once if restricted warheads.
- Fixed AI continuing to produce units and construct buildings from buildings affected by EMP.

## Fixes / interactions with other extensions

Expand Down
1 change: 1 addition & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ New:
- [Customize hardcoded projectile initial facing behavior](Fixed-or-Improved-Logics.md#customizing-initial-facing-behavior) (by Starkku)
- Health bar permanently displayed (by FlyStar)
- [`IsSimpleDeployer` facing customization & directional deploy animations](Fixed-or-Improved-Logics.md#issimpleDeployer-facing-and-animation-customization) (by Starkku)
- Fixed AI continuing to produce units and construct buildings from buildings affected by EMP. (by ahasasjeb)

Vanilla fixes:
- Fixed sidebar not updating queued unit numbers when adding or removing units when the production is on hold (by CrimRecya)
Expand Down
22 changes: 20 additions & 2 deletions src/Ext/Techno/Body.Update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@
#include <Kamikaze.h>
#include <JumpjetLocomotionClass.h>
#include <FlyLocomotionClass.h>
#include <BuildingClass.h>
#include <FactoryClass.h>

#include <Utilities/EnumFunctions.h>
#include <Utilities/AresFunctions.h>

#include <Ext/Anim/Body.h>
#include <Ext/Bullet/Body.h>
#include <Ext/House/Body.h>
#include <Ext/WeaponType/Body.h>
#include <Ext/Scenario/Body.h>
#include <Utilities/EnumFunctions.h>
#include <Utilities/AresFunctions.h>


// TechnoClass_AI_0x6F9E50
Expand Down Expand Up @@ -1638,6 +1641,21 @@ void TechnoExt::ExtData::UpdateRearmInEMPState()

if (pThis->ReloadTimer.InProgress() && pTypeExt->NoReload_UnderEMP.Get(RulesExt::Global()->NoReload_UnderEMP))
pThis->ReloadTimer.StartTime++;

// Pause building factory production under EMP / Deactivated (AI only)
if (auto const pBuilding = abstract_cast<BuildingClass*>(pThis))
{
if (pBuilding->Owner && !pBuilding->Owner->IsControlledByHuman())
{
if (auto const pFactory = pBuilding->Factory)
{
if (pFactory->Production.Timer.InProgress())
{
pFactory->Production.Timer.StartTime++;
}
}
}
}
}

void TechnoExt::ExtData::UpdateRearmInTemporal()
Expand Down