From 669d009684bb7146fe2211058e2ef044ec89b855 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 3 Apr 2024 04:12:20 +0200 Subject: [PATCH] [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 :cl: fix: Selling stuff in cargo gives us money again. /:cl: Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com> --- code/modules/cargo/exports.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/cargo/exports.dm b/code/modules/cargo/exports.dm index 224a27062f5..f62576e1051 100644 --- a/code/modules/cargo/exports.dm +++ b/code/modules/cargo/exports.dm @@ -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)