Skip to content

Commit

Permalink
[MIRROR] Fixing Cargo (Take 2) (#2468)
Browse files Browse the repository at this point in the history
* Fixing Cargo (Take 2) (#82079)

## About The Pull Request
- Fixes #82070

All exports are broken because we created a new report for every time
sold & didn't reuse the one given to us.

It works now

![Screenshot
(405)](https://github.com/tgstation/tgstation/assets/110812394/26aa9276-c5d6-40f7-ade3-d62d07486cdd)

## Changelog
:cl:
fix: Selling stuff in cargo gives us money again.
/:cl:

* Fixing Cargo (Take 2)

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: SyncIt21 <[email protected]>
  • Loading branch information
3 people authored Mar 19, 2024
1 parent 4c8f902 commit 5e61eb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code/modules/cargo/exports.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Then the player gets the profit from selling his own wasted time.
** ignore_typecache: typecache containing types that should be completely ignored
*/
/proc/export_item_and_contents(atom/movable/exported_atom, apply_elastic = TRUE, delete_unsold = TRUE, dry_run = FALSE, datum/export_report/external_report, list/ignore_typecache)
external_report = init_export()
external_report = init_export(external_report)

var/list/contents = exported_atom.get_all_contents_ignoring(ignore_typecache)

Expand All @@ -69,7 +69,7 @@ Then the player gets the profit from selling his own wasted time.

/// It works like export_item_and_contents(), however it ignores the contents. Meaning only `exported_atom` will be valued.
/proc/export_single_item(atom/movable/exported_atom, apply_elastic = TRUE, delete_unsold = TRUE, dry_run = FALSE, datum/export_report/external_report)
external_report = init_export()
external_report = init_export(external_report)

var/sold = _export_loop(exported_atom, apply_elastic, dry_run, external_report)
if(!dry_run && (sold || delete_unsold) && sold != EXPORT_SOLD_DONT_DELETE)
Expand Down

0 comments on commit 5e61eb1

Please sign in to comment.