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
1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,7 @@ This page lists all the individual contributions to the project by their author.
- Bunkerable checks dehardcode
- Prevent the units with locomotors that cause problems from entering the tank bunker
- No turret unit turn to the target
- Allow beacon placement hotkey in single player
- Units are now unable to kick out from a factory that is in construction process
- Fix issues caused by incorrect reference removal (f.ex. If the unit cloaks/enters transport, it cannot gain experience from previously launched spawners/C4/projectiles)
- Recycle spawner in long-range
Expand Down
2 changes: 2 additions & 0 deletions Phobos.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
<ClCompile Include="src\Ext\Anim\Hooks.cpp" />
<!-- src\Ext\AnimType -->
<ClCompile Include="src\Ext\AnimType\Body.cpp" />
<!-- src\Ext\Beacon -->
<ClCompile Include="src\Ext\Beacon\Hooks.cpp" />
<!-- src\Ext\Building -->
<ClCompile Include="src\Ext\Building\Body.cpp" />
<ClCompile Include="src\Ext\Building\Hooks.cpp" />
Expand Down
10 changes: 10 additions & 0 deletions docs/New-or-Enhanced-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -1096,6 +1096,16 @@ ReturnWeapon.ApplyFirepowerMult=false ; boolean

## Super Weapons

### Allow beacon placement hotkey in single player

- In vanilla, the beacon placement hotkey is restricted to multiplayer games only. Now you can allow using the beacon placement hotkey in single player and skirmish modes by setting `AllowBeaconHotKeyInSinglePlayer` to true.

In `rulesmd.ini`:
```ini
[General]
AllowBeaconHotKeyInSinglePlayer=false ; boolean
```

### AI Superweapon delay timer

- By default AI houses only process superweapon logic e.g checks if it can fire any superweapons firing them at randomized intervals of 106 to 112 game frames. This behaviour can now be customized by setting explicit delay, or disabling it entirely. Values of 0 and below disable the delay and cause AI houses to check superweapons on every game frame.
Expand Down
1 change: 1 addition & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@ HideShakeEffects=false ; boolean
- [No rearm and reload in EMP or temporal](New-or-Enhanced-Logics.md#no-rearm-and-reload-in-emp-or-temporal) (by CrimRecya)
- [Technos recount current burst index when change the firing weapon](New-or-Enhanced-Logics.md#recount-burst-index) (by CrimRecya)
- Shield armor inheritance customization (by Ollerus)
- [Allow beacon placement hotkey in single player](New-or-Enhanced-Logics.md#allow-beacon-placement-hotkey-in-single-player) (by TaranDahl)
- [Damaged unit image changes](New-or-Enhanced-Logics.md#damaged-unit-image-changes) (by Fryone)
- [Customizable spawns queue](New-or-Enhanced-Logics.md#customizable-spawns-queue) (by TwinkleStar)
- [Initial spawns number](New-or-Enhanced-Logics.md#initial-spawns-number) (by TwinkleStar)
Expand Down
3 changes: 3 additions & 0 deletions docs/locale/zh_CN/LC_MESSAGES/CREDITS.po
Original file line number Diff line number Diff line change
Expand Up @@ -2445,6 +2445,9 @@ msgid ""
"tank bunker"
msgstr "防止使用了可能导致问题的运动模式的单位进入坦克碉堡"

msgid "Allow beacon placement hotkey in single player"
msgstr "允许在单人模式下使用信标放置快捷键"

msgid ""
"Units are now unable to kick out from a factory that is in construction "
"process"
Expand Down
11 changes: 11 additions & 0 deletions docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po
Original file line number Diff line number Diff line change
Expand Up @@ -2800,6 +2800,17 @@ msgstr "`ReturnWeapon.ApplyFirepowerMult` 决定归返武器的伤害是否受
msgid "Super Weapons"
msgstr "超级武器"

msgid "Allow beacon placement hotkey in single player"
msgstr "允许在单人模式下使用信标放置快捷键"

msgid ""
"In vanilla, the beacon placement hotkey is restricted to multiplayer games "
"only. Now you can allow using the beacon placement hotkey in single player "
"and skirmish modes by setting `AllowBeaconHotKeyInSinglePlayer` to true."
msgstr ""
"在原版中,信标放置快捷键仅限于多人游戏使用。现在你可以通过将 "
"`AllowBeaconHotKeyInSinglePlayer` 设置为 true 来允许在单人模式和遭遇战中使用信标放置快捷键。"

msgid "AI Superweapon delay timer"
msgstr "AI 超级武器发射延迟"

Expand Down
7 changes: 7 additions & 0 deletions docs/locale/zh_CN/LC_MESSAGES/Whats-New.po
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,13 @@ msgstr ""
msgid "Shield armor inheritance customization (by Ollerus)"
msgstr "自定义护盾继承单位护甲(by Ollerus)"

msgid ""
"[Allow beacon placement hotkey in single player](New-or-Enhanced-"
"Logics.md#allow-beacon-placement-hotkey-in-single-player) (by TaranDahl)"
msgstr ""
"[允许在单人模式下使用信标放置快捷键](New-or-Enhanced-Logics.md#allow-"
"beacon-placement-hotkey-in-single-player)(by TaranDahl)"

msgid ""
"[Damaged unit image changes](New-or-Enhanced-Logics.md#damaged-unit-"
"image-changes) (by Fryone)"
Expand Down
11 changes: 11 additions & 0 deletions src/Ext/Beacon/Hooks.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#include <Ext/Rules/Body.h>

DEFINE_HOOK(0x5370A0, BeaconPlacementCommandClass_ExecuteSub_Start, 0x5)
{
if (RulesExt::Global()->AllowBeaconHotKeyInSinglePlayer)
return 0x5370AE;

return 0;
}

DEFINE_JUMP(LJMP, 0x430CD4, 0x430CEA);
2 changes: 2 additions & 0 deletions src/Ext/Rules/Body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ void RulesExt::ExtData::LoadBeforeTypeData(RulesClass* pThis, CCINIClass* pINI)
this->EnablePowerSurplus.Read(exINI, GameStrings::AI, "EnablePowerSurplus");
this->PowerSurplus_ScaleToDrainAmount.Read(exINI, GameStrings::AI, "PowerSurplus.ScaleToDrainAmount");

this->AllowBeaconHotKeyInSinglePlayer.Read(exINI, GameStrings::General, "AllowBeaconHotKeyInSinglePlayer");
this->AllowDeployControlledMCV.Read(exINI, GameStrings::General, "AllowDeployControlledMCV");

this->TypeSelectUseIFVMode.Read(exINI, GameStrings::General, "TypeSelectUseIFVMode");
Expand Down Expand Up @@ -592,6 +593,7 @@ void RulesExt::ExtData::Serialize(T& Stm)
.Process(this->ForbidParallelAIQueues_Vehicle)
.Process(this->EnablePowerSurplus)
.Process(this->PowerSurplus_ScaleToDrainAmount)
.Process(this->AllowBeaconHotKeyInSinglePlayer)
.Process(this->AllowDeployControlledMCV)
.Process(this->TypeSelectUseIFVMode)
.Process(this->IronCurtain_KeptOnDeploy)
Expand Down
2 changes: 2 additions & 0 deletions src/Ext/Rules/Body.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ class RulesExt
Valueable<bool> DrainMoneyDisplay_OnTarget;
Valueable<bool> DrainMoneyDisplay_OnTarget_UseDisplayIncome;

Valueable<bool> AllowBeaconHotKeyInSinglePlayer;
Valueable<bool> AllowDeployControlledMCV;

Valueable<bool> TypeSelectUseIFVMode;
Expand Down Expand Up @@ -459,6 +460,7 @@ class RulesExt
, EnablePowerSurplus { false }
, PowerSurplus_ScaleToDrainAmount { 0 }

, AllowBeaconHotKeyInSinglePlayer { false }
, AllowDeployControlledMCV { false }

, TypeSelectUseIFVMode { false }
Expand Down
Loading