mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-29 11:02:05 +00:00
* Export scanner no longer shows shipping manifest value + manifest error changes (#78923) ## About The Pull Request Adds a variable to exports called `scannable`. If you are trying to scan it and its set to false, then it won't show the value. When the actual sale is done, the value will still be added/subtracted. I also reorganized the message the scanner sends because I didn't want to put multiple inline if statements. Lastly, made it so that locked crates and private order lockboxes can't get the shipping manifest contents error by adding a new trait `TRAIT_NO_MANIFEST_CONTENTS_ERROR`. For departmental orders, I just entirely disabled the manifests having errors by setting it to `MANIFEST_CAN_FAIL` to false. This PR conflicts with #78911, sorry but that PR was what reminded me to fix this bug. ## Why It's Good For The Game Some may call it tedium but having to read paperwork is part of the cargo experience. Since it is harder to determine the crates value, there has been a few balance changes. The penalty for incorrect manifest is half the crates price or 500 credits, whichever is less.  Let me know if you have any suggestions for how the message is worded, it might be too long. Locked crates and private orders can no longer get the shipping manifest contents error because it is basically impossible to get someone to tell you all the contents of their purchase. It's only a 5% chance of being wrong and if they're not in cargo they probably don't care about the cargo budget. ## Changelog 🆑 balance: Export scanner no longer shows value of shipping manifests, now you actually have to read them. balance: Shipping manifest penalty is now only half crate cost as well as capped to 500 credits. balance: Shipping manifests for private orders or locked crates can no longer have the incorrect contents error. Shipping manifests for departmental orders can n longer have any error. /🆑 --------- Co-authored-by: Jacquerel <hnevard@ gmail.com> Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com> * Export scanner no longer shows shipping manifest value + manifest error changes --------- Co-authored-by: BlueMemesauce <47338680+BlueMemesauce@users.noreply.github.com> Co-authored-by: Jacquerel <hnevard@ gmail.com> Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>
90 lines
2.4 KiB
Plaintext
90 lines
2.4 KiB
Plaintext
#define MAX_MANIFEST_PENALTY CARGO_CRATE_VALUE * 2.5
|
|
|
|
// Approved manifest.
|
|
// +80 credits flat.
|
|
/datum/export/manifest_correct
|
|
cost = CARGO_CRATE_VALUE * 0.4
|
|
k_elasticity = 0
|
|
unit_name = "approved manifest"
|
|
export_types = list(/obj/item/paper/fluff/jobs/cargo/manifest)
|
|
scannable = FALSE
|
|
|
|
/datum/export/manifest_correct/applies_to(obj/O)
|
|
if(!..())
|
|
return FALSE
|
|
|
|
var/obj/item/paper/fluff/jobs/cargo/manifest/M = O
|
|
if(M.is_approved() && !M.errors)
|
|
return TRUE
|
|
return FALSE
|
|
|
|
// Correctly denied manifest.
|
|
// Refunds package cost minus the value of the crate.
|
|
/datum/export/manifest_error_denied
|
|
cost = -CARGO_CRATE_VALUE
|
|
k_elasticity = 0
|
|
unit_name = "correctly denied manifest"
|
|
export_types = list(/obj/item/paper/fluff/jobs/cargo/manifest)
|
|
scannable = FALSE
|
|
|
|
/datum/export/manifest_error_denied/applies_to(obj/O)
|
|
if(!..())
|
|
return FALSE
|
|
|
|
var/obj/item/paper/fluff/jobs/cargo/manifest/M = O
|
|
if(M.is_denied() && M.errors)
|
|
return TRUE
|
|
return FALSE
|
|
|
|
/datum/export/manifest_error_denied/get_cost(obj/O)
|
|
var/obj/item/paper/fluff/jobs/cargo/manifest/M = O
|
|
return ..() + M.order_cost
|
|
|
|
|
|
// Erroneously approved manifest.
|
|
// Subtracts half the package cost. (max -500 credits)
|
|
/datum/export/manifest_error
|
|
unit_name = "erroneously approved manifest"
|
|
k_elasticity = 0
|
|
export_types = list(/obj/item/paper/fluff/jobs/cargo/manifest)
|
|
allow_negative_cost = TRUE
|
|
scannable = FALSE
|
|
|
|
/datum/export/manifest_error/applies_to(obj/O)
|
|
if(!..())
|
|
return FALSE
|
|
|
|
var/obj/item/paper/fluff/jobs/cargo/manifest/M = O
|
|
if(M.is_approved() && M.errors)
|
|
return TRUE
|
|
return FALSE
|
|
|
|
/datum/export/manifest_error/get_cost(obj/O)
|
|
var/obj/item/paper/fluff/jobs/cargo/manifest/M = O
|
|
return -min(M.order_cost * 0.5, MAX_MANIFEST_PENALTY)
|
|
|
|
|
|
// Erroneously denied manifest.
|
|
// Subtracts half the package cost. (max -500 credits)
|
|
/datum/export/manifest_correct_denied
|
|
k_elasticity = 0
|
|
unit_name = "erroneously denied manifest"
|
|
export_types = list(/obj/item/paper/fluff/jobs/cargo/manifest)
|
|
allow_negative_cost = TRUE
|
|
scannable = FALSE
|
|
|
|
/datum/export/manifest_correct_denied/applies_to(obj/O)
|
|
if(!..())
|
|
return FALSE
|
|
|
|
var/obj/item/paper/fluff/jobs/cargo/manifest/M = O
|
|
if(M.is_denied() && !M.errors)
|
|
return TRUE
|
|
return FALSE
|
|
|
|
/datum/export/manifest_correct_denied/get_cost(obj/O)
|
|
var/obj/item/paper/fluff/jobs/cargo/manifest/M = O
|
|
return -min(M.order_cost * 0.5, MAX_MANIFEST_PENALTY)
|
|
|
|
#undef MAX_MANIFEST_PENALTY
|