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

The Galactic Materials Market no longer runtimes on opening or ordering. #78729

Merged
merged 4 commits into from
Oct 4, 2023

Conversation

lizardqueenlexi
Copy link
Contributor

@lizardqueenlexi lizardqueenlexi commented Oct 2, 2023

About The Pull Request

The Galactic Materials Market, currently, runtimes while attempting to open the UI. This is due to attempting to load various fields from un-initialized material datums. Through liberal application of initial(), these runtimes have been removed, and it is now possible to use the market at all (though it has some other issues that I'll make bug reports for...).

Also gives priority to greyscale_colors over color when choosing colors for the UI, to make the correct colors appear.

Why It's Good For The Game

The Materials Market is rather important as the only source of minerals on rounds without any miners. So... it's good if it actually loads.

Changelog

🆑
fix: The Galactic Materials Market now offers things for sale as it should.
/:cl:

@tgstation-server tgstation-server added the Fix Rewrites a bug so it appears in different circumstances label Oct 2, 2023
@lizardqueenlexi
Copy link
Contributor Author

I've been informed that this feature is apparently already working fine? Even though it's been runtiming on my master branch as well as downstream. Very strange...

@Profakos
Copy link
Contributor

Profakos commented Oct 2, 2023

Maybe the dictionary's keys are sometimes typepaths, and sometimes actual material datums? E: scratch that, not the case

@Profakos
Copy link
Contributor

Profakos commented Oct 2, 2023

Bug successfully reproduced on latest, its real.

Copy link
Member

@Ghommie Ghommie left a comment

Choose a reason for hiding this comment

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

There's another loop where the contents of materials_prices are mistakingly treated as datums rather than paths:

for(var/datum/material/mat in SSstock_market.materials_prices)

@SyncIt21
Copy link
Contributor

SyncIt21 commented Oct 4, 2023

@ArcaneMusic #78500 Approve?

@ArcaneMusic ArcaneMusic merged commit 0378b25 into tgstation:master Oct 4, 2023
22 checks passed
comfyorange added a commit that referenced this pull request Oct 4, 2023
github-actions bot added a commit that referenced this pull request Oct 4, 2023
@ArcaneMusic
Copy link
Contributor

There's another loop where the contents of materials_prices are mistakingly treated as datums rather than paths:

for(var/datum/material/mat in SSstock_market.materials_prices)

I'll try and hit this when I hit the other open GMM issues, read my notifications too quickly

@lizardqueenlexi lizardqueenlexi deleted the market-runtime-squash branch October 5, 2023 08:15
Jolly-66 pushed a commit to TaleStation/TaleStation that referenced this pull request Oct 7, 2023
…s on opening or ordering. (#8024)

Original PR: tgstation/tgstation#78729
-----

## About The Pull Request

The Galactic Materials Market, currently, runtimes while attempting to
open the UI. This is due to attempting to load various fields from
un-initialized material datums. Through liberal application of
`initial()`, these runtimes have been removed, and it is now possible to
use the market at all (though it has some other issues that I'll make
bug reports for...).

Also gives priority to `greyscale_colors` over `color` when choosing
colors for the UI, to make the correct colors appear.
## Why It's Good For The Game

The Materials Market is rather important as the only source of minerals
on rounds without any miners. So... it's good if it actually loads.
## Changelog
:cl:
fix: The Galactic Materials Market now offers things for sale as it
should.
/:cl:

---------

Co-authored-by: lizardqueenlexi <105025397+lizardqueenlexi@users.noreply.github.com>
ArcaneMusic pushed a commit that referenced this pull request Oct 11, 2023
## About The Pull Request
1. Fixes #78732
The "Order Via Cargo Budget" button no longer appears in the UI if you
don't have cargo access in your ID

2. Fixes #78730
Orders made privately & orders made via cargo budget now come in
different crates
![Screenshot
(315)](https://github.com/tgstation/tgstation/assets/110812394/8dfead42-02ed-46f6-b795-d1ce5a139bfd)
So cargo ordered crates no longer require QM cargo budget card and can
be opened by anyone as intended wheras privatly ordered crates come with
your regular secure access facility. This occurred when assigning the
bank account to the order

https://github.com/tgstation/tgstation/blob/e41730f6e455c3ece1cd52e3b67aa6c1d11cd953/code/modules/cargo/materials_market.dm#L201
This param is only meant to check if you want an access secured
crate(which you should get for private orders) or an normal crate for
cargo orders. If null it will send you the regular cargo crate

3. Fixes #78731
Orders made privately vs orders made with cargo budget are now separate
and not bundled together
![Screenshot
(314)](https://github.com/tgstation/tgstation/assets/110812394/151dfc37-8765-4aa9-88a9-7a41e4f6069d)
So if you first make an order privately & them switch to cargo budget or
vice versa it will still separate your orders. This way you get what you
ordered privately in a separate crate and cargo gets their crate
separately for it's purposes

4. New Qol now money will be deducted from cargo budget/your account
only after the order is confirmed in the cargo request console & after
shuttle is called and arrives with your packages This way you drain the
budget only after your orders were successfully delivered and not before
hand itself. We don't have to worry about making orders that exceed our
budget cause cargo already has bound checking code for that so let it do
its thing. Here for example cargo only had 500 credits but i ordered way
too much so it gracefully rejected it
![Screenshot
(316)](https://github.com/tgstation/tgstation/assets/110812394/0b13946e-13f5-4dbc-aebc-a54ba10df043)


6. This also addresses
#78729 (review)
by making the for loop treat the items in the list as paths by using the
`as anything in` clause in the for loop.

## Changelog
:cl:
fix: You cannot order with cargo budget if you don't have cargo access
in the Galactic Market
fix: Private & Cargo orders no longer get mixed together in the same
crate if you order them interchangeably so no more embezzlement in the
Galactic Market
fix: Orders made with cargo budget come in a regular cargo crate thus
allowing you to open them without QM cargo budget card in the Galactic
Market
qol: Orders made in the Galactic Market will deduct money from your
account/cargo budget only after the order has been confirmed in the
cargo request console & after the shuttle arrives with your order. This
way you drain the budget only after your orders were successfully
delivered and not before hand itself
/:cl:
SkyratBot pushed a commit to Skyrat-SS13/Skyrat-tg that referenced this pull request Oct 11, 2023
## About The Pull Request
1. Fixes #78732
The "Order Via Cargo Budget" button no longer appears in the UI if you
don't have cargo access in your ID

2. Fixes #78730
Orders made privately & orders made via cargo budget now come in
different crates
![Screenshot
(315)](https://github.com/tgstation/tgstation/assets/110812394/8dfead42-02ed-46f6-b795-d1ce5a139bfd)
So cargo ordered crates no longer require QM cargo budget card and can
be opened by anyone as intended wheras privatly ordered crates come with
your regular secure access facility. This occurred when assigning the
bank account to the order

https://github.com/tgstation/tgstation/blob/e41730f6e455c3ece1cd52e3b67aa6c1d11cd953/code/modules/cargo/materials_market.dm#L201
This param is only meant to check if you want an access secured
crate(which you should get for private orders) or an normal crate for
cargo orders. If null it will send you the regular cargo crate

3. Fixes #78731
Orders made privately vs orders made with cargo budget are now separate
and not bundled together
![Screenshot
(314)](https://github.com/tgstation/tgstation/assets/110812394/151dfc37-8765-4aa9-88a9-7a41e4f6069d)
So if you first make an order privately & them switch to cargo budget or
vice versa it will still separate your orders. This way you get what you
ordered privately in a separate crate and cargo gets their crate
separately for it's purposes

4. New Qol now money will be deducted from cargo budget/your account
only after the order is confirmed in the cargo request console & after
shuttle is called and arrives with your packages This way you drain the
budget only after your orders were successfully delivered and not before
hand itself. We don't have to worry about making orders that exceed our
budget cause cargo already has bound checking code for that so let it do
its thing. Here for example cargo only had 500 credits but i ordered way
too much so it gracefully rejected it
![Screenshot
(316)](https://github.com/tgstation/tgstation/assets/110812394/0b13946e-13f5-4dbc-aebc-a54ba10df043)

6. This also addresses
tgstation/tgstation#78729 (review)
by making the for loop treat the items in the list as paths by using the
`as anything in` clause in the for loop.

## Changelog
:cl:
fix: You cannot order with cargo budget if you don't have cargo access
in the Galactic Market
fix: Private & Cargo orders no longer get mixed together in the same
crate if you order them interchangeably so no more embezzlement in the
Galactic Market
fix: Orders made with cargo budget come in a regular cargo crate thus
allowing you to open them without QM cargo budget card in the Galactic
Market
qol: Orders made in the Galactic Market will deduct money from your
account/cargo budget only after the order has been confirmed in the
cargo request console & after the shuttle arrives with your order. This
way you drain the budget only after your orders were successfully
delivered and not before hand itself
/:cl:
NaakaKo pushed a commit to Bird-Lounge/Skyraptor-SS13 that referenced this pull request Oct 11, 2023
## About The Pull Request
1. Fixes #78732
The "Order Via Cargo Budget" button no longer appears in the UI if you
don't have cargo access in your ID

2. Fixes #78730
Orders made privately & orders made via cargo budget now come in
different crates
![Screenshot
(315)](https://github.com/tgstation/tgstation/assets/110812394/8dfead42-02ed-46f6-b795-d1ce5a139bfd)
So cargo ordered crates no longer require QM cargo budget card and can
be opened by anyone as intended wheras privatly ordered crates come with
your regular secure access facility. This occurred when assigning the
bank account to the order

https://github.com/tgstation/tgstation/blob/e41730f6e455c3ece1cd52e3b67aa6c1d11cd953/code/modules/cargo/materials_market.dm#L201
This param is only meant to check if you want an access secured
crate(which you should get for private orders) or an normal crate for
cargo orders. If null it will send you the regular cargo crate

3. Fixes #78731
Orders made privately vs orders made with cargo budget are now separate
and not bundled together
![Screenshot
(314)](https://github.com/tgstation/tgstation/assets/110812394/151dfc37-8765-4aa9-88a9-7a41e4f6069d)
So if you first make an order privately & them switch to cargo budget or
vice versa it will still separate your orders. This way you get what you
ordered privately in a separate crate and cargo gets their crate
separately for it's purposes

4. New Qol now money will be deducted from cargo budget/your account
only after the order is confirmed in the cargo request console & after
shuttle is called and arrives with your packages This way you drain the
budget only after your orders were successfully delivered and not before
hand itself. We don't have to worry about making orders that exceed our
budget cause cargo already has bound checking code for that so let it do
its thing. Here for example cargo only had 500 credits but i ordered way
too much so it gracefully rejected it
![Screenshot
(316)](https://github.com/tgstation/tgstation/assets/110812394/0b13946e-13f5-4dbc-aebc-a54ba10df043)


6. This also addresses
tgstation/tgstation#78729 (review)
by making the for loop treat the items in the list as paths by using the
`as anything in` clause in the for loop.

## Changelog
:cl:
fix: You cannot order with cargo budget if you don't have cargo access
in the Galactic Market
fix: Private & Cargo orders no longer get mixed together in the same
crate if you order them interchangeably so no more embezzlement in the
Galactic Market
fix: Orders made with cargo budget come in a regular cargo crate thus
allowing you to open them without QM cargo budget card in the Galactic
Market
qol: Orders made in the Galactic Market will deduct money from your
account/cargo budget only after the order has been confirmed in the
cargo request console & after the shuttle arrives with your order. This
way you drain the budget only after your orders were successfully
delivered and not before hand itself
/:cl:
TaleStationBot pushed a commit to TaleStation/TaleStation that referenced this pull request Oct 11, 2023
## About The Pull Request
1. Fixes #78732
The "Order Via Cargo Budget" button no longer appears in the UI if you
don't have cargo access in your ID

2. Fixes #78730
Orders made privately & orders made via cargo budget now come in
different crates
![Screenshot
(315)](https://github.com/tgstation/tgstation/assets/110812394/8dfead42-02ed-46f6-b795-d1ce5a139bfd)
So cargo ordered crates no longer require QM cargo budget card and can
be opened by anyone as intended wheras privatly ordered crates come with
your regular secure access facility. This occurred when assigning the
bank account to the order

https://github.com/tgstation/tgstation/blob/e41730f6e455c3ece1cd52e3b67aa6c1d11cd953/code/modules/cargo/materials_market.dm#L201
This param is only meant to check if you want an access secured
crate(which you should get for private orders) or an normal crate for
cargo orders. If null it will send you the regular cargo crate

3. Fixes #78731
Orders made privately vs orders made with cargo budget are now separate
and not bundled together
![Screenshot
(314)](https://github.com/tgstation/tgstation/assets/110812394/151dfc37-8765-4aa9-88a9-7a41e4f6069d)
So if you first make an order privately & them switch to cargo budget or
vice versa it will still separate your orders. This way you get what you
ordered privately in a separate crate and cargo gets their crate
separately for it's purposes

4. New Qol now money will be deducted from cargo budget/your account
only after the order is confirmed in the cargo request console & after
shuttle is called and arrives with your packages This way you drain the
budget only after your orders were successfully delivered and not before
hand itself. We don't have to worry about making orders that exceed our
budget cause cargo already has bound checking code for that so let it do
its thing. Here for example cargo only had 500 credits but i ordered way
too much so it gracefully rejected it
![Screenshot
(316)](https://github.com/tgstation/tgstation/assets/110812394/0b13946e-13f5-4dbc-aebc-a54ba10df043)


6. This also addresses
tgstation/tgstation#78729 (review)
by making the for loop treat the items in the list as paths by using the
`as anything in` clause in the for loop.

## Changelog
:cl:
fix: You cannot order with cargo budget if you don't have cargo access
in the Galactic Market
fix: Private & Cargo orders no longer get mixed together in the same
crate if you order them interchangeably so no more embezzlement in the
Galactic Market
fix: Orders made with cargo budget come in a regular cargo crate thus
allowing you to open them without QM cargo budget card in the Galactic
Market
qol: Orders made in the Galactic Market will deduct money from your
account/cargo budget only after the order has been confirmed in the
cargo request console & after the shuttle arrives with your order. This
way you drain the budget only after your orders were successfully
delivered and not before hand itself
/:cl:
vinylspiders pushed a commit to Skyrat-SS13/Skyrat-tg that referenced this pull request Oct 11, 2023
* Galactic Market Hot Fixes (#78836)

## About The Pull Request
1. Fixes #78732
The "Order Via Cargo Budget" button no longer appears in the UI if you
don't have cargo access in your ID

2. Fixes #78730
Orders made privately & orders made via cargo budget now come in
different crates
![Screenshot
(315)](https://github.com/tgstation/tgstation/assets/110812394/8dfead42-02ed-46f6-b795-d1ce5a139bfd)
So cargo ordered crates no longer require QM cargo budget card and can
be opened by anyone as intended wheras privatly ordered crates come with
your regular secure access facility. This occurred when assigning the
bank account to the order

https://github.com/tgstation/tgstation/blob/e41730f6e455c3ece1cd52e3b67aa6c1d11cd953/code/modules/cargo/materials_market.dm#L201
This param is only meant to check if you want an access secured
crate(which you should get for private orders) or an normal crate for
cargo orders. If null it will send you the regular cargo crate

3. Fixes #78731
Orders made privately vs orders made with cargo budget are now separate
and not bundled together
![Screenshot
(314)](https://github.com/tgstation/tgstation/assets/110812394/151dfc37-8765-4aa9-88a9-7a41e4f6069d)
So if you first make an order privately & them switch to cargo budget or
vice versa it will still separate your orders. This way you get what you
ordered privately in a separate crate and cargo gets their crate
separately for it's purposes

4. New Qol now money will be deducted from cargo budget/your account
only after the order is confirmed in the cargo request console & after
shuttle is called and arrives with your packages This way you drain the
budget only after your orders were successfully delivered and not before
hand itself. We don't have to worry about making orders that exceed our
budget cause cargo already has bound checking code for that so let it do
its thing. Here for example cargo only had 500 credits but i ordered way
too much so it gracefully rejected it
![Screenshot
(316)](https://github.com/tgstation/tgstation/assets/110812394/0b13946e-13f5-4dbc-aebc-a54ba10df043)

6. This also addresses
tgstation/tgstation#78729 (review)
by making the for loop treat the items in the list as paths by using the
`as anything in` clause in the for loop.

## Changelog
:cl:
fix: You cannot order with cargo budget if you don't have cargo access
in the Galactic Market
fix: Private & Cargo orders no longer get mixed together in the same
crate if you order them interchangeably so no more embezzlement in the
Galactic Market
fix: Orders made with cargo budget come in a regular cargo crate thus
allowing you to open them without QM cargo budget card in the Galactic
Market
qol: Orders made in the Galactic Market will deduct money from your
account/cargo budget only after the order has been confirmed in the
cargo request console & after the shuttle arrives with your order. This
way you drain the budget only after your orders were successfully
delivered and not before hand itself
/:cl:

* Galactic Market Hot Fixes

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Jolly-66 pushed a commit to TaleStation/TaleStation that referenced this pull request Oct 11, 2023
Original PR: tgstation/tgstation#78836
-----
## About The Pull Request
1. Fixes #78732
The "Order Via Cargo Budget" button no longer appears in the UI if you
don't have cargo access in your ID

2. Fixes #78730
Orders made privately & orders made via cargo budget now come in
different crates
![Screenshot
(315)](https://github.com/tgstation/tgstation/assets/110812394/8dfead42-02ed-46f6-b795-d1ce5a139bfd)
So cargo ordered crates no longer require QM cargo budget card and can
be opened by anyone as intended wheras privatly ordered crates come with
your regular secure access facility. This occurred when assigning the
bank account to the order

https://github.com/tgstation/tgstation/blob/e41730f6e455c3ece1cd52e3b67aa6c1d11cd953/code/modules/cargo/materials_market.dm#L201
This param is only meant to check if you want an access secured
crate(which you should get for private orders) or an normal crate for
cargo orders. If null it will send you the regular cargo crate

3. Fixes #78731
Orders made privately vs orders made with cargo budget are now separate
and not bundled together
![Screenshot
(314)](https://github.com/tgstation/tgstation/assets/110812394/151dfc37-8765-4aa9-88a9-7a41e4f6069d)
So if you first make an order privately & them switch to cargo budget or
vice versa it will still separate your orders. This way you get what you
ordered privately in a separate crate and cargo gets their crate
separately for it's purposes

4. New Qol now money will be deducted from cargo budget/your account
only after the order is confirmed in the cargo request console & after
shuttle is called and arrives with your packages This way you drain the
budget only after your orders were successfully delivered and not before
hand itself. We don't have to worry about making orders that exceed our
budget cause cargo already has bound checking code for that so let it do
its thing. Here for example cargo only had 500 credits but i ordered way
too much so it gracefully rejected it
![Screenshot
(316)](https://github.com/tgstation/tgstation/assets/110812394/0b13946e-13f5-4dbc-aebc-a54ba10df043)


6. This also addresses
tgstation/tgstation#78729 (review)
by making the for loop treat the items in the list as paths by using the
`as anything in` clause in the for loop.

## Changelog
:cl:
fix: You cannot order with cargo budget if you don't have cargo access
in the Galactic Market
fix: Private & Cargo orders no longer get mixed together in the same
crate if you order them interchangeably so no more embezzlement in the
Galactic Market
fix: Orders made with cargo budget come in a regular cargo crate thus
allowing you to open them without QM cargo budget card in the Galactic
Market
qol: Orders made in the Galactic Market will deduct money from your
account/cargo budget only after the order has been confirmed in the
cargo request console & after the shuttle arrives with your order. This
way you drain the budget only after your orders were successfully
delivered and not before hand itself
/:cl:

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Iajret pushed a commit to Iajret/FluffySTG that referenced this pull request Oct 12, 2023
* Galactic Market Hot Fixes (#78836)

## About The Pull Request
1. Fixes #78732
The "Order Via Cargo Budget" button no longer appears in the UI if you
don't have cargo access in your ID

2. Fixes #78730
Orders made privately & orders made via cargo budget now come in
different crates
![Screenshot
(315)](https://github.com/tgstation/tgstation/assets/110812394/8dfead42-02ed-46f6-b795-d1ce5a139bfd)
So cargo ordered crates no longer require QM cargo budget card and can
be opened by anyone as intended wheras privatly ordered crates come with
your regular secure access facility. This occurred when assigning the
bank account to the order

https://github.com/tgstation/tgstation/blob/e41730f6e455c3ece1cd52e3b67aa6c1d11cd953/code/modules/cargo/materials_market.dm#L201
This param is only meant to check if you want an access secured
crate(which you should get for private orders) or an normal crate for
cargo orders. If null it will send you the regular cargo crate

3. Fixes #78731
Orders made privately vs orders made with cargo budget are now separate
and not bundled together
![Screenshot
(314)](https://github.com/tgstation/tgstation/assets/110812394/151dfc37-8765-4aa9-88a9-7a41e4f6069d)
So if you first make an order privately & them switch to cargo budget or
vice versa it will still separate your orders. This way you get what you
ordered privately in a separate crate and cargo gets their crate
separately for it's purposes

4. New Qol now money will be deducted from cargo budget/your account
only after the order is confirmed in the cargo request console & after
shuttle is called and arrives with your packages This way you drain the
budget only after your orders were successfully delivered and not before
hand itself. We don't have to worry about making orders that exceed our
budget cause cargo already has bound checking code for that so let it do
its thing. Here for example cargo only had 500 credits but i ordered way
too much so it gracefully rejected it
![Screenshot
(316)](https://github.com/tgstation/tgstation/assets/110812394/0b13946e-13f5-4dbc-aebc-a54ba10df043)

6. This also addresses
tgstation/tgstation#78729 (review)
by making the for loop treat the items in the list as paths by using the
`as anything in` clause in the for loop.

## Changelog
:cl:
fix: You cannot order with cargo budget if you don't have cargo access
in the Galactic Market
fix: Private & Cargo orders no longer get mixed together in the same
crate if you order them interchangeably so no more embezzlement in the
Galactic Market
fix: Orders made with cargo budget come in a regular cargo crate thus
allowing you to open them without QM cargo budget card in the Galactic
Market
qol: Orders made in the Galactic Market will deduct money from your
account/cargo budget only after the order has been confirmed in the
cargo request console & after the shuttle arrives with your order. This
way you drain the budget only after your orders were successfully
delivered and not before hand itself
/:cl:

* Galactic Market Hot Fixes

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Iajret pushed a commit to Iajret/FluffySTG that referenced this pull request Oct 13, 2023
* Galactic Market Hot Fixes (#78836)

## About The Pull Request
1. Fixes #78732
The "Order Via Cargo Budget" button no longer appears in the UI if you
don't have cargo access in your ID

2. Fixes #78730
Orders made privately & orders made via cargo budget now come in
different crates
![Screenshot
(315)](https://github.com/tgstation/tgstation/assets/110812394/8dfead42-02ed-46f6-b795-d1ce5a139bfd)
So cargo ordered crates no longer require QM cargo budget card and can
be opened by anyone as intended wheras privatly ordered crates come with
your regular secure access facility. This occurred when assigning the
bank account to the order

https://github.com/tgstation/tgstation/blob/e41730f6e455c3ece1cd52e3b67aa6c1d11cd953/code/modules/cargo/materials_market.dm#L201
This param is only meant to check if you want an access secured
crate(which you should get for private orders) or an normal crate for
cargo orders. If null it will send you the regular cargo crate

3. Fixes #78731
Orders made privately vs orders made with cargo budget are now separate
and not bundled together
![Screenshot
(314)](https://github.com/tgstation/tgstation/assets/110812394/151dfc37-8765-4aa9-88a9-7a41e4f6069d)
So if you first make an order privately & them switch to cargo budget or
vice versa it will still separate your orders. This way you get what you
ordered privately in a separate crate and cargo gets their crate
separately for it's purposes

4. New Qol now money will be deducted from cargo budget/your account
only after the order is confirmed in the cargo request console & after
shuttle is called and arrives with your packages This way you drain the
budget only after your orders were successfully delivered and not before
hand itself. We don't have to worry about making orders that exceed our
budget cause cargo already has bound checking code for that so let it do
its thing. Here for example cargo only had 500 credits but i ordered way
too much so it gracefully rejected it
![Screenshot
(316)](https://github.com/tgstation/tgstation/assets/110812394/0b13946e-13f5-4dbc-aebc-a54ba10df043)

6. This also addresses
tgstation/tgstation#78729 (review)
by making the for loop treat the items in the list as paths by using the
`as anything in` clause in the for loop.

## Changelog
:cl:
fix: You cannot order with cargo budget if you don't have cargo access
in the Galactic Market
fix: Private & Cargo orders no longer get mixed together in the same
crate if you order them interchangeably so no more embezzlement in the
Galactic Market
fix: Orders made with cargo budget come in a regular cargo crate thus
allowing you to open them without QM cargo budget card in the Galactic
Market
qol: Orders made in the Galactic Market will deduct money from your
account/cargo budget only after the order has been confirmed in the
cargo request console & after the shuttle arrives with your order. This
way you drain the budget only after your orders were successfully
delivered and not before hand itself
/:cl:

* Galactic Market Hot Fixes

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
lessthnthree pushed a commit to effigy-se/effigy-se that referenced this pull request Oct 15, 2023
## About The Pull Request
1. Fixes #78732
The "Order Via Cargo Budget" button no longer appears in the UI if you
don't have cargo access in your ID

2. Fixes #78730
Orders made privately & orders made via cargo budget now come in
different crates
![Screenshot
(315)](https://github.com/tgstation/tgstation/assets/110812394/8dfead42-02ed-46f6-b795-d1ce5a139bfd)
So cargo ordered crates no longer require QM cargo budget card and can
be opened by anyone as intended wheras privatly ordered crates come with
your regular secure access facility. This occurred when assigning the
bank account to the order

https://github.com/tgstation/tgstation/blob/e41730f6e455c3ece1cd52e3b67aa6c1d11cd953/code/modules/cargo/materials_market.dm#L201
This param is only meant to check if you want an access secured
crate(which you should get for private orders) or an normal crate for
cargo orders. If null it will send you the regular cargo crate

3. Fixes #78731
Orders made privately vs orders made with cargo budget are now separate
and not bundled together
![Screenshot
(314)](https://github.com/tgstation/tgstation/assets/110812394/151dfc37-8765-4aa9-88a9-7a41e4f6069d)
So if you first make an order privately & them switch to cargo budget or
vice versa it will still separate your orders. This way you get what you
ordered privately in a separate crate and cargo gets their crate
separately for it's purposes

4. New Qol now money will be deducted from cargo budget/your account
only after the order is confirmed in the cargo request console & after
shuttle is called and arrives with your packages This way you drain the
budget only after your orders were successfully delivered and not before
hand itself. We don't have to worry about making orders that exceed our
budget cause cargo already has bound checking code for that so let it do
its thing. Here for example cargo only had 500 credits but i ordered way
too much so it gracefully rejected it
![Screenshot
(316)](https://github.com/tgstation/tgstation/assets/110812394/0b13946e-13f5-4dbc-aebc-a54ba10df043)


6. This also addresses
tgstation/tgstation#78729 (review)
by making the for loop treat the items in the list as paths by using the
`as anything in` clause in the for loop.

## Changelog
:cl:
fix: You cannot order with cargo budget if you don't have cargo access
in the Galactic Market
fix: Private & Cargo orders no longer get mixed together in the same
crate if you order them interchangeably so no more embezzlement in the
Galactic Market
fix: Orders made with cargo budget come in a regular cargo crate thus
allowing you to open them without QM cargo budget card in the Galactic
Market
qol: Orders made in the Galactic Market will deduct money from your
account/cargo budget only after the order has been confirmed in the
cargo request console & after the shuttle arrives with your order. This
way you drain the budget only after your orders were successfully
delivered and not before hand itself
/:cl:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Rewrites a bug so it appears in different circumstances
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants