Revert "Add stamped requisition forms now give bonus credits (#66230)" (#66851)

This reverts commit f021767645.

This reverts commit f021767 from:

    Add stamped requisition forms now give bonus credits #66230

This bug was encountered when we were testing this PR but I thought it got fixed.
Why It's Good For The Game

Cargo crates will now reappear.
This commit is contained in:
Tim
2022-05-09 22:28:10 -05:00
committed by GitHub
parent e63d556d83
commit aaef545968
11 changed files with 58 additions and 161 deletions
+4 -2
View File
@@ -1,7 +1,7 @@
// Approved manifest.
// +70 credits flat.
// +80 credits flat.
/datum/export/manifest_correct
cost = CARGO_CRATE_VALUE * 0.35
cost = CARGO_CRATE_VALUE * 0.4
k_elasticity = 0
unit_name = "approved manifest"
export_types = list(/obj/item/paper/fluff/jobs/cargo/manifest)
@@ -36,6 +36,7 @@
var/obj/item/paper/fluff/jobs/cargo/manifest/M = O
return ..() + M.order_cost
// Erroneously approved manifest.
// Substracts the package cost.
/datum/export/manifest_error
@@ -56,6 +57,7 @@
var/obj/item/paper/fluff/jobs/cargo/manifest/M = O
return -M.order_cost
// Erroneously denied manifest.
// Substracts the package cost minus the cost of crate.
/datum/export/manifest_correct_denied
-21
View File
@@ -1,21 +0,0 @@
// Approved requisition.
// +30 credits flat
/datum/export/requisition
cost = CARGO_CRATE_VALUE * 0.15
k_elasticity = 0
unit_name = "approved requisition"
export_types = list(/obj/item/paper/fluff/jobs/cargo/requisition)
/datum/export/requisition/applies_to(obj/item/paper/fluff/jobs/cargo/requisition/paperwork)
if(!..() || !istype(paperwork))
return FALSE
var/crate_not_ordered = !SSshuttle.order_history_by_id[paperwork.order_id]
// we don't want to give points unless the crate order was approved
if(crate_not_ordered)
return FALSE
for(var/stamp_icon in paperwork.authorization_stamps)
if(paperwork.is_approved(stamp_icon))
return TRUE
return FALSE
+47 -58
View File
@@ -1,4 +1,4 @@
/// The chance for a manifest or crate to be created with errors
/// The chance for a manifest or crate to be created with errors
#define MANIFEST_ERROR_CHANCE 5
// MANIFEST BITFLAGS
@@ -6,7 +6,7 @@
#define MANIFEST_ERROR_NAME (1 << 0)
/// Determines if contents will be deleted from the manifest but still be present in the crate
#define MANIFEST_ERROR_CONTENTS (1 << 1)
/// Determines if contents will be deleted from the crate but still be present in the manifest
/// Determines if contents will be deleted from the crate but still be present in the manifest
#define MANIFEST_ERROR_ITEM (1 << 2)
/obj/item/paper/fluff/jobs/cargo/manifest
@@ -29,14 +29,11 @@
errors |= MANIFEST_ERROR_ITEM
investigate_log("Supply order #[order_id] generated with incorrect contents shipped.", INVESTIGATE_CARGO)
/obj/item/paper/fluff/jobs/cargo/requisition
var/authorization_stamps
var/order_id = 0
/obj/item/paper/fluff/jobs/cargo/manifest/proc/is_approved()
return stamped?.len && !is_denied()
/obj/item/paper/fluff/jobs/cargo/requisition/Initialize(mapload, id, authorization_stamps)
. = ..()
src.authorization_stamps = authorization_stamps
order_id = id
/obj/item/paper/fluff/jobs/cargo/manifest/proc/is_denied()
return stamped && ("stamp-deny" in stamped)
/datum/supply_order
var/id
@@ -50,8 +47,6 @@
var/datum/supply_pack/pack
var/datum/bank_account/paying_account
var/obj/item/coupon/applied_coupon
/// list of stamps that can approve this requisition for bonus credits
var/authorization_stamps
/datum/supply_order/New(datum/supply_pack/pack, orderer, orderer_rank, orderer_ckey, reason, paying_account, department_destination, coupon)
id = SSshuttle.order_number++
@@ -65,76 +60,70 @@
src.applied_coupon = coupon
/datum/supply_order/proc/generateRequisition(turf/T)
var/obj/item/paper/fluff/jobs/cargo/requisition/requisition = new(T, id, pack.authorization_stamps)
var/obj/item/paper/P = new(T)
var/jobs_that_can_approve = list()
for(var/stamp in pack.authorization_stamps)
jobs_that_can_approve += pack.authorization_stamps[stamp]
jobs_that_can_approve = english_list(jobs_that_can_approve, and_text = " or ")
requisition.name = "requisition form - #[id] ([pack.name])"
requisition.info += "<h2>[station_name()] Supply Requisition</h2>"
requisition.info += "<hr/>"
requisition.info += "Order #[id]<br/>"
requisition.info += "Time of Order: [station_time_timestamp()]<br/>"
requisition.info += "Item: [pack.name]<br/>"
requisition.info += "Access Restrictions: [SSid_access.get_access_desc(pack.access)]<br/>"
requisition.info += "Authorization Required: [jobs_that_can_approve]<br/>"
requisition.info += "Requested by: [orderer]<br/>"
P.name = "requisition form - #[id] ([pack.name])"
P.info += "<h2>[station_name()] Supply Requisition</h2>"
P.info += "<hr/>"
P.info += "Order #[id]<br/>"
P.info += "Time of Order: [station_time_timestamp()]<br/>"
P.info += "Item: [pack.name]<br/>"
P.info += "Access Restrictions: [SSid_access.get_access_desc(pack.access)]<br/>"
P.info += "Requested by: [orderer]<br/>"
if(paying_account)
requisition.info += "Paid by: [paying_account.account_holder]<br/>"
requisition.info += "Rank: [orderer_rank]<br/>"
requisition.info += "Comment: [reason]<br/>"
P.info += "Paid by: [paying_account.account_holder]<br/>"
P.info += "Rank: [orderer_rank]<br/>"
P.info += "Comment: [reason]<br/>"
requisition.update_appearance()
return requisition
P.update_appearance()
return P
/datum/supply_order/proc/generateManifest(obj/container, owner, packname, cost) //generates-the-manifests.
var/obj/item/paper/fluff/jobs/cargo/manifest/manifest = new(null, id, cost)
var/obj/item/paper/fluff/jobs/cargo/manifest/P = new(null, id, cost)
var/station_name = (manifest.errors & MANIFEST_ERROR_NAME) ? new_station_name() : station_name()
var/station_name = (P.errors & MANIFEST_ERROR_NAME) ? new_station_name() : station_name()
manifest.name = "shipping manifest - [packname?"#[id] ([pack.name])":"(Grouped Item Crate)"]"
manifest.info += "<h2>[command_name()] Shipping Manifest</h2>"
manifest.info += "<hr/>"
P.name = "shipping manifest - [packname?"#[id] ([pack.name])":"(Grouped Item Crate)"]"
P.info += "<h2>[command_name()] Shipping Manifest</h2>"
P.info += "<hr/>"
if(owner && !(owner == "Cargo"))
manifest.info += "Direct purchase from [owner]<br/>"
manifest.name += " - Purchased by [owner]"
manifest.info += "Order[packname?"":"s"]: [id]<br/>"
manifest.info += "Destination: [station_name]<br/>"
P.info += "Direct purchase from [owner]<br/>"
P.name += " - Purchased by [owner]"
P.info += "Order[packname?"":"s"]: [id]<br/>"
P.info += "Destination: [station_name]<br/>"
if(packname)
manifest.info += "Item: [packname]<br/>"
manifest.info += "Contents: <br/>"
manifest.info += "<ul>"
for(var/atom/movable/AM in container.contents - manifest)
if((manifest.errors & MANIFEST_ERROR_CONTENTS))
P.info += "Item: [packname]<br/>"
P.info += "Contents: <br/>"
P.info += "<ul>"
for(var/atom/movable/AM in container.contents - P)
if((P.errors & MANIFEST_ERROR_CONTENTS))
if(prob(50))
manifest.info += "<li>[AM.name]</li>"
P.info += "<li>[AM.name]</li>"
else
continue
manifest.info += "<li>[AM.name]</li>"
manifest.info += "</ul>"
manifest.info += "<h4>Stamp below to confirm receipt of goods:</h4>"
P.info += "<li>[AM.name]</li>"
P.info += "</ul>"
P.info += "<h4>Stamp below to confirm receipt of goods:</h4>"
if(manifest.errors & MANIFEST_ERROR_ITEM)
if(P.errors & MANIFEST_ERROR_ITEM)
if(istype(container, /obj/structure/closet/crate/secure) || istype(container, /obj/structure/closet/crate/large))
manifest.errors &= ~MANIFEST_ERROR_ITEM
P.errors &= ~MANIFEST_ERROR_ITEM
else
var/lost = max(round(container.contents.len / 10), 1)
while(--lost >= 0)
qdel(pick(container.contents))
manifest.update_appearance()
manifest.forceMove(container)
P.update_appearance()
P.forceMove(container)
if(istype(container, /obj/structure/closet/crate))
var/obj/structure/closet/crate/crate = container
crate.manifest = manifest
crate.update_appearance()
var/obj/structure/closet/crate/C = container
C.manifest = P
C.update_appearance()
else
container.contents += manifest
container.contents += P
return manifest
return P
/datum/supply_order/proc/generate(atom/A)
var/account_holder
+1 -34
View File
@@ -20,8 +20,6 @@
var/special_pod //If this pack comes shipped in a specific pod when launched from the express console
var/admin_spawned = FALSE
var/goody = FALSE //Goodies can only be purchased by private accounts and can have coupons apply to them. They also come in a lockbox instead of a full crate, so the 700 min doesn't apply
/// If the requisition paper is stamped by a stamp in the list it gives bonus points for crate returns
var/list/authorization_stamps = QM_STAMP_SET
/datum/supply_pack/New()
id = type
@@ -67,7 +65,6 @@
/datum/supply_pack/emergency
group = "Emergency"
authorization_stamps = QM_STAMP_SET
/datum/supply_pack/emergency/vehicle
name = "Biker Gang Kit" //TUNNEL SNAKES OWN THIS TOWN
@@ -251,7 +248,6 @@
/obj/item/grenade/chem_grenade/incendiary)
crate_name = "emergency crate"
crate_type = /obj/structure/closet/crate/internals
authorization_stamps = ILLEGAL_STAMP_SET
/datum/supply_pack/emergency/weedcontrol
name = "Weed Control Crate"
@@ -283,7 +279,6 @@
group = "Security"
access = ACCESS_SECURITY
crate_type = /obj/structure/closet/crate/secure/gear
authorization_stamps = HOS_STAMP_SET
/datum/supply_pack/security/ammo
name = "Ammo Crate"
@@ -469,7 +464,6 @@
access = ACCESS_ARMORY
access_view = ACCESS_ARMORY
crate_type = /obj/structure/closet/crate/secure/weapon
authorization_stamps = HOS_STAMP_SET
/datum/supply_pack/security/armory/bulletarmor
name = "Bulletproof Armor Crate"
@@ -660,7 +654,6 @@
/datum/supply_pack/engineering
group = "Engineering"
crate_type = /obj/structure/closet/crate/engineering
authorization_stamps = CE_STAMP_SET
/datum/supply_pack/engineering/shieldgen
name = "Anti-breach Shield Projector Crate"
@@ -893,7 +886,6 @@
group = "Engine Construction"
access_view = ACCESS_ENGINE
crate_type = /obj/structure/closet/crate/engineering
authorization_stamps = CE_STAMP_SET
/datum/supply_pack/engine/emitter
name = "Emitter Crate"
@@ -1001,7 +993,6 @@
/datum/supply_pack/materials
group = "Canisters & Materials"
authorization_stamps = QM_STAMP_SET
/datum/supply_pack/materials/cardboard50
name = "50 Cardboard Sheets"
@@ -1154,7 +1145,6 @@
group = "Medical"
access_view = ACCESS_MEDICAL
crate_type = /obj/structure/closet/crate/medical
authorization_stamps = CMO_STAMP_SET
/datum/supply_pack/medical/bloodpacks
name = "Blood Pack Variety Crate"
@@ -1317,7 +1307,6 @@
group = "Science"
access_view = ACCESS_RESEARCH
crate_type = /obj/structure/closet/crate/science
authorization_stamps = RD_STAMP_SET
/datum/supply_pack/science/plasma
name = "Plasma Assembly Crate"
@@ -1505,7 +1494,6 @@
/datum/supply_pack/service
group = "Service"
authorization_stamps = QM_STAMP_SET
/datum/supply_pack/service/cargo_supples
name = "Cargo Supplies Crate"
@@ -1526,7 +1514,6 @@
access_view = ACCESS_JANITOR
contains = list(/obj/item/stack/tile/noslip/thirty)
crate_name = "high-traction floor tiles crate"
authorization_stamps = HONK_STAMP_SET
/datum/supply_pack/service/janitor
name = "Janitorial Supplies Crate"
@@ -1703,7 +1690,6 @@
/obj/item/bouquet/poppy,
/obj/item/reagent_containers/food/drinks/bottle/champagne)
crate_name = "wedding crate"
authorization_stamps = NOTARY_STAMP_SET
/// Box of 7 grey IDs.
/datum/supply_pack/service/greyidbox
@@ -1712,7 +1698,6 @@
cost = CARGO_CRATE_VALUE * 3
contains = list(/obj/item/storage/box/ids)
crate_name = "basic id card crate"
authorization_stamps = HOP_STAMP_SET
/// Single silver ID.
/datum/supply_pack/service/silverid
@@ -1721,7 +1706,6 @@
cost = CARGO_CRATE_VALUE * 7
contains = list(/obj/item/card/id/advanced/silver)
crate_name = "silver id card crate"
authorization_stamps = HOP_STAMP_SET
/datum/supply_pack/service/emptycrate
name = "Empty Crate"
@@ -1767,7 +1751,6 @@
/datum/supply_pack/organic
group = "Food & Hydroponics"
crate_type = /obj/structure/closet/crate/freezer
authorization_stamps = QM_STAMP_SET
/datum/supply_pack/organic/hydroponics
access_view = ACCESS_HYDROPONICS
@@ -1880,7 +1863,6 @@
access = ACCESS_THEATRE
access_view = ACCESS_THEATRE
crate_type = /obj/structure/closet/crate/secure
authorization_stamps = HONK_STAMP_SET
/datum/supply_pack/organic/hydroponics
name = "Hydroponics Crate"
@@ -2067,7 +2049,6 @@
/datum/supply_pack/critter
group = "Livestock"
crate_type = /obj/structure/closet/crate/critter
authorization_stamps = NOTARY_STAMP_SET
/datum/supply_pack/critter/parrot
name = "Bird Crate"
@@ -2225,7 +2206,6 @@
/datum/supply_pack/costumes_toys
group = "Costumes & Toys"
authorization_stamps = HONK_STAMP_SET
/datum/supply_pack/costumes_toys/randomised
name = "Collectable Hats Crate"
@@ -2282,7 +2262,6 @@
/obj/item/clothing/neck/necklace/dope,
/obj/item/vending_refill/donksoft)
crate_name = "crate"
authorization_stamps = ILLEGAL_STAMP_SET
/datum/supply_pack/costumes_toys/foamforce
name = "Foam Force Crate"
@@ -2341,7 +2320,6 @@
/obj/item/lipstick/random)
crate_name = "formalwear crate"
crate_type = /obj/structure/closet/crate/wooden
authorization_stamps = NOTARY_STAMP_SET
/datum/supply_pack/costumes_toys/clownpin
name = "Hilarious Firing Pin Crate"
@@ -2506,7 +2484,6 @@
/datum/supply_pack/misc
group = "Miscellaneous Supplies"
authorization_stamps = QM_STAMP_SET
/datum/supply_pack/misc/artsupply
name = "Art Supplies"
@@ -2522,7 +2499,6 @@
/obj/item/toy/crayon/rainbow)
crate_name = "art supply crate"
crate_type = /obj/structure/closet/crate/wooden
authorization_stamps = HONK_STAMP_SET
/datum/supply_pack/misc
group = "Miscellaneous Supplies"
@@ -2593,7 +2569,6 @@
contains = list(/obj/vehicle/ridden/bicycle)
crate_name = "bicycle crate"
crate_type = /obj/structure/closet/crate/large
authorization_stamps = ILLEGAL_STAMP_SET
/datum/supply_pack/misc/bigband
name = "Big Band Instrument Collection"
@@ -2610,7 +2585,6 @@
/obj/item/instrument/harmonica,
/obj/structure/musician/piano/unanchored)
crate_type = /obj/structure/closet/crate/wooden
authorization_stamps = HONK_STAMP_SET
/datum/supply_pack/misc/book_crate
name = "Book Crate"
@@ -2625,7 +2599,6 @@
/obj/item/book/random,
/obj/item/book/random)
crate_type = /obj/structure/closet/crate/wooden
authorization_stamps = NOTARY_STAMP_SET
/datum/supply_pack/misc/commandkeys
name = "Command Encryption Key Crate"
@@ -2687,7 +2660,6 @@
contains = list(/obj/item/storage/box/fountainpens)
crate_type = /obj/structure/closet/crate/wooden
crate_name = "calligraphy crate"
authorization_stamps = CAP_STAMP_SET
/datum/supply_pack/misc/wrapping_paper
name = "Festive Wrapping Paper Crate"
@@ -2697,6 +2669,7 @@
crate_type = /obj/structure/closet/crate/wooden
crate_name = "festive wrapping paper crate"
/datum/supply_pack/misc/funeral
name = "Funeral Supply crate"
desc = "At the end of the day, someone's gonna want someone dead. Give them a proper send-off with these funeral supplies! Contains a coffin with burial garmets and flowers."
@@ -2707,7 +2680,6 @@
/obj/item/food/grown/poppy/geranium)
crate_name = "coffin"
crate_type = /obj/structure/closet/crate/coffin
authorization_stamps = NOTARY_STAMP_SET
/datum/supply_pack/misc/empty
name = "Empty Supplypod"
@@ -2733,7 +2705,6 @@
/obj/item/clothing/under/misc/burial,
)
crate_name = "religious supplies crate"
authorization_stamps = NOTARY_STAMP_SET
/datum/supply_pack/misc/toner
name = "Toner Crate"
@@ -2780,7 +2751,6 @@
/obj/item/stock_parts/subspace/ansible
)
crate_name = "crate"
authorization_stamps = ILLEGAL_STAMP_SET
///Special supply crate that generates random syndicate gear up to a determined TC value
/datum/supply_pack/misc/syndicate
@@ -2790,7 +2760,6 @@
contains = list()
crate_name = "syndicate gear crate"
crate_type = /obj/structure/closet/crate
authorization_stamps = ILLEGAL_STAMP_SET
var/crate_value = 30 ///Total TC worth of contained uplink items
var/uplink_flag = UPLINK_TRAITORS
@@ -2817,7 +2786,6 @@
/datum/supply_pack/vending
group = "Vending Restocks"
authorization_stamps = QM_STAMP_SET
/datum/supply_pack/vending/bartending
name = "Booze-o-mat and Coffee Supply Crate"
@@ -3013,7 +2981,6 @@
/datum/supply_pack/exploration
special = TRUE
group = "Outsourced"
authorization_stamps = QM_STAMP_SET
/datum/supply_pack/exploration/scrapyard
name = "Scrapyard Crate"