Skip to content

Enable paying up front in Production queue#21295

Merged
PunkPun merged 1 commit into
OpenRA:bleedfrom
Porenutak:Starport-Prerequsites
Jun 17, 2024
Merged

Enable paying up front in Production queue#21295
PunkPun merged 1 commit into
OpenRA:bleedfrom
Porenutak:Starport-Prerequsites

Conversation

@Porenutak

Copy link
Copy Markdown
Contributor

This PR implements some features thats D2k Starport will need.
In OG D2k Starport tab behaves like this;

  • you must pay full Unit Price up front.
  • Unit Icon is enabled only if you have enough money at the moment. If you dont unit icon is disabled.
  • When you reach max capacity all unit icons become disabled and you can click only on Purchase Icon.

This PR implements first two steps. It adds MoneyUpFront options into the ProductionQueue.

Example how its work on ClassicProductionQueues:

2024-01-10.16-54-16.mp4

Example how its work with my LUA Starport implementation:

2024-01-10.16-53-15.mp4

Im not sure if this is the right way to code this, so feal free for suggestions.

@Porenutak Porenutak force-pushed the Starport-Prerequsites branch from ae60f50 to 2cbafc4 Compare January 10, 2024 16:20
@PunkPun

PunkPun commented Jan 11, 2024

Copy link
Copy Markdown
Member

related #7055

@MustaphaTR

Copy link
Copy Markdown
Member

Generals Alpha already has a similar logic to make the actor paid fully when queued, as that's how it worked in Generals (the boolean is called InstantCashDrain there). Tho, it does not disable the icons, which was also not the case in original D2k for Starport. Icons only blacked out if you didn't have any of the units in stock or you've passed the total/per unit queue already. So i don't think that's something we want here, and even if we would want to keep the logic, it should be tried to a seperate value imo, so it can be enabled/disabled independent from MoneyUpFront.

@abcdefg30 abcdefg30 requested a review from penev92 January 12, 2024 19:07
@Porenutak Porenutak force-pushed the Starport-Prerequsites branch from 2cbafc4 to 5aa05fd Compare January 18, 2024 14:08
@Porenutak Porenutak changed the title Starport Prerequsites Enable paying up front in Production queue Jan 18, 2024
@Porenutak Porenutak force-pushed the Starport-Prerequsites branch from 5aa05fd to 6e93a94 Compare January 18, 2024 14:15
@Porenutak

Porenutak commented Jan 18, 2024

Copy link
Copy Markdown
Contributor Author
  • fixed Resources to Cash exploit
  • Renamed variables according to @penev92 suggestion
  • add option to not disable icons when players have not enough money

@Porenutak Porenutak force-pushed the Starport-Prerequsites branch from 6e93a94 to 9de4885 Compare January 18, 2024 14:34
@Porenutak

Copy link
Copy Markdown
Contributor Author

There was concerts about how this PR lead forward to d2k starport, so lets me adress it here:

  • Creating new BulkProductionQueue looks pretty strait forward, with new Order type "purchase"
  • But te widget part is total unknow to me and I dont know how to move forward here. Starpot definitly need working purchase button.

But I still think this PR hold by its own, because:

  • its allow to LUA starport implementation to work same as OG
  • its could be interesting for modder to make ORA production similar to games like Starcrat or Warcraft

This was referenced May 12, 2024
Comment thread OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs Outdated
Comment thread OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs Outdated
@Porenutak Porenutak force-pushed the Starport-Prerequsites branch from 9de4885 to f2e9513 Compare May 27, 2024 10:39
Comment thread OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs Outdated
Comment thread OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs Outdated
@Porenutak

Porenutak commented Jun 11, 2024

Copy link
Copy Markdown
Contributor Author

Removed BlockIconsIfInsolvent key. All unaffordable icons are blocked by default. Except for Icons that are already queued.

@PunkPun PunkPun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It is weird that you can't even go to a tab if you don't have enough money.

Comment thread OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs Outdated
@Porenutak Porenutak force-pushed the Starport-Prerequsites branch 2 times, most recently from 820fdb3 to 7734d98 Compare June 11, 2024 13:09
@Porenutak

Copy link
Copy Markdown
Contributor Author

It is weird that you can't even go to a tab if you don't have enough money.

Fixed, but not sure if this is the best solution.

@PunkPun PunkPun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yeah, that looks about correct, left some comments.

Comment thread OpenRA.Mods.Common/Traits/Player/ProductionQueue.cs Outdated
@Porenutak Porenutak force-pushed the Starport-Prerequsites branch from e935701 to 31f6058 Compare June 17, 2024 07:40
Fix tab availability on low money

Co-Authored-By: Gustas <37534529+PunkPun@users.noreply.github.com>
@PunkPun PunkPun force-pushed the Starport-Prerequsites branch from 31f6058 to a711bd6 Compare June 17, 2024 10:14
@PunkPun PunkPun merged commit ccb1bd7 into OpenRA:bleed Jun 17, 2024
@PunkPun

PunkPun commented Jun 17, 2024

Copy link
Copy Markdown
Member

changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants