[MIRROR] Fixing Cargo (Take 2) (#26941)

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
🆑
fix: Selling stuff in cargo gives us money again.
/🆑

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
This commit is contained in:
SkyratBot
2024-04-03 04:12:20 +02:00
committed by GitHub
co-authored by SyncIt21
parent 37bc259bb0
commit 669d009684
+2 -2
View File
@@ -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)
@@ -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)