Skip to content
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

Illegal commodities nominal price x4 #5277

Merged
merged 1 commit into from
Sep 27, 2021

Conversation

jimishol
Copy link
Contributor

When illegal commodities get in SoldOut module, double their nominal
price makes no difference as black markets sells already at double
that price.
We double the doubled price when commodity is illegal.

When illegal commodities get in SoldOut module, double their nominal
price makes no difference as black markets sells already at double
that price.
We double the doubled price when commodity is illegal.
@impaktor
Copy link
Member

impaktor commented Sep 25, 2021

Looks fine to me.
I assume you've play tested it.

One possibly could have introduced a local isIllegal = not Game.system:IsCommodityLegal(commodity:GetName()) boolean variable a few lines up, to make code more readable, as negation plus double ternary operations wrapped in multiple parenthesis, but meh. I'm just nitpicking.

@jimishol
Copy link
Contributor Author

It worked once at 4x price. Did not wait for a second illegal soldout. I assumed if it worked once, will repeat be OK on next ones.

@impaktor impaktor merged commit d4a42a8 into pioneerspacesim:master Sep 27, 2021
@jimishol jimishol deleted the SoldOutNoIllegals branch September 27, 2021 17:34
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.

2 participants