Skip to content

[New feature]Tiberium eater logic #1619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from

Conversation

NetsuNegi
Copy link
Contributor

@NetsuNegi NetsuNegi commented Apr 9, 2025

  • Re-impl from PR Mobile Refinery Logic #1111
  • Units can convert the ore underneath them into cash in real time, like GDI's EPIC unit MARV in Command & Conquer 3 Kane's Wrath, when TiberiumEater.TransDelay is 0 or larger.
  • TiberiumEater.TransDelay 大于等于0时,单位将可以实时将矿石转换为资金,就像《命令与征服3:凯恩之怒》中GDI史诗载具MARV那样。
  • TiberiumEater.TransDelay specifies the interval in game frames between two mining "processes".
  • TiberiumEater.TransDelay 指定两次转换之间的间隔帧数。
  • TiberiumEater.AmountPerCell controls how many "bails" of ore can be mined at each cell at once.
  • TiberiumEater.AmountPerCell 控制每次在每格内转换多少数量的矿石。
  • By default, ore mined this way is worth the same as if it was harvested and refined the normal way. This can be adjusted with TiberiumEater.CashMultiplier.
  • 默认情况下,以这种方式转换矿石获得的资金量与正常的矿车采收倒入矿石精炼厂获得的资金相同。这可以通过 TiberiumEater.CashMultiplier 来进行调整。
  • TiberiumEater.Display=true will create a flying text displaying the total cash amount received each mining process. TiberiumEater.Display.Houses controlls who can see this text.
  • TiberiumEater.Display=true 将会显示转换后获得的金额。 TiberiumEater.Display.Houses 控制谁可以看见显示的金额。
  • An animation will be played at each interval at each mined cell. If TiberiumEater.Anims contains 8 entries, then an entry will be picked according to unit facing. Otherwise, an entry will be chosen at random.
  • 转换时可以播放动画。如果 TiberiumEater.Anims 包含8个动画,那么将会根据单位的朝向进行选择;其他情况下,将会随机选择动画。
  • If TiberiumEater.AnimMove=true, the animations will move with the unit.
  • 如果 TiberiumEater.AnimMove=true ,动画将会跟随单位移动。

In rulesmd.ini:

[SOMETECHNO]                       ; InfantryType, UnitType or AircraftType
TiberiumEater.TransDelay=-1       ; integer
TiberiumEater.CashMultiplier=1.0  ; float
TiberiumEater.AmountPerCell=0     ; integer
TiberiumEater.CellN=              ; x, y , use cell as unit, multiple values mean that they are effective in multiple cells at the same time
TiberiumEater.Display=true        ; boolean
TiberiumEater.Display.Houses=all  ; AffectedHouse enumeration
TiberiumEater.Anims=              ; list of animations
TiberiumEater.Anims.Tiberium0=    ; List of AnimationTypes
TiberiumEater.Anims.Tiberium1=    ; List of AnimationTypes
TiberiumEater.Anims.Tiberium2=    ; List of AnimationTypes
TiberiumEater.Anims.Tiberium3=    ; List of AnimationTypes
TiberiumEater.AnimMove=true       ; boolean

@NetsuNegi NetsuNegi added ⚙️T2 T2 maintainer review is sufficient Needs testing ❓New feature labels Apr 9, 2025
Copy link

github-actions bot commented Apr 9, 2025

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.

from previous PR#1111 mobile-refinery
@mevitar
Copy link

mevitar commented Apr 9, 2025

I don't see an equivalent of MobileRefinery.DisplayColor=, so color not being customizable anymore is intended?

@NetsuNegi
Copy link
Contributor Author

I don't see an equivalent of MobileRefinery.DisplayColor=, so color not being customizable anymore is intended?

I think maybe it's better to use same color as other give money logic.

Copy link
Contributor

@Coronia Coronia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since it's a per frame logic on techno, we should be more careful about its cost

@mevitar
Copy link

mevitar commented Apr 11, 2025

Seems to work fine, found no issues ingame.

@NetsuNegi NetsuNegi added ⚙️T1 T1 maintainer review is sufficient and removed ⚙️T2 T2 maintainer review is sufficient labels Apr 17, 2025
Copy link
Contributor

@CrimRecya CrimRecya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only find some minor things.

@NetsuNegi NetsuNegi requested a review from CrimRecya April 23, 2025 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓New feature ⚙️T1 T1 maintainer review is sufficient Tested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants