AutoDeath based on player power status and player credits - #2276
AutoDeath based on player power status and player credits#2276Flactine wants to merge 14 commits into
Conversation
|
To Chinese users:
|
|
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
|
Note: You can use AI skill for generating Chinese docs. |
Coronia
left a comment
There was a problem hiding this comment.
would be better to rename the tag to none/low/full since it's been widely used in many places already
Coronia
left a comment
There was a problem hiding this comment.
for code style and reusablity, some tag/variable names should be changed, especially PowerStatus which already has common terminologies and is likely to be reused in the future
| None = 0, | ||
| Normal = 1, // not low power | ||
| Low = 2, // low power | ||
| }; |
There was a problem hiding this comment.
PlayerPowerStatus -> PowerStatus
Normal -> Full
| {"none", PlayerPowerStatus::None}, | ||
| {"consumer", PlayerPowerStatus::Low}, | ||
| {"low", PlayerPowerStatus::Low}, | ||
| {"normal", PlayerPowerStatus::Normal}, |
There was a problem hiding this comment.
remove consumer since it's not a clear term here
change normal to full
| this->AutoDeath_TechnosExist_Houses.Read(exINI, pSection, "AutoDeath.TechnosExist.Houses"); | ||
| this->AutoDeath_PlayerPowerStatus.Read(exINI, pSection, "AutoDeath.PlayerPowerStatus"); | ||
| this->AutoDeath_PlayerMoney_Max.Read(exINI, pSection, "AutoDeath.PlayerMoney.Max"); | ||
| this->AutoDeath_PlayerMoney_Min.Read(exINI, pSection, "AutoDeath.PlayerMoney.Min"); |
There was a problem hiding this comment.
rename variables names to be identical with tag names
Add new auto-death conditions based on the owner's power status and credits.
PlayerPowerStatus: The object will die if its owner's power status matches the configured state.low/consumer: Trigger when the owner is in low power.normal: Trigger when the owner is not in low power.PlayerMoney.Max/PlayerMoney.Min: The object will die based on the owner's available credits.PlayerMoney.Maxis set, triggers when money is not above this value.PlayerMoney.Minis set, triggers when money is not below this value.PlayerPowerStatus:当对象所属方的电力状态符合设定条件时,则对象死亡。low/consumer:当对象所属方处于电力不足状态时触发。normal:当对象所属方未处于电力不足状态时触发。PlayerMoney.Max/PlayerMoney.Min:根据对象所属方的资金决定对象是否死亡。PlayerMoney.Max时,当资金不高于该值时触发。PlayerMoney.Min时,当资金不低于该值时触发。In
rulesmd.ini: