art of the deal

This commit is contained in:
TrilbySpaceClone
2019-11-11 07:26:12 -05:00
parent 0662245d80
commit 6e328ea1b1
15 changed files with 172 additions and 65 deletions
+3 -3
View File
@@ -29,11 +29,11 @@
obj_flags &= ~EMAGGED
/obj/machinery/computer/cargo/proc/get_export_categories()
var/cat = EXPORT_CARGO
. = EXPORT_CARGO
if(contraband)
cat |= EXPORT_CONTRABAND
. |= EXPORT_CONTRABAND
if(obj_flags & EMAGGED)
cat |= EXPORT_EMAG
. |= EXPORT_EMAG
/obj/machinery/computer/cargo/emag_act(mob/user)
. = ..()
+2 -2
View File
@@ -1,6 +1,6 @@
/obj/item/export_scanner
name = "export scanner"
desc = "A device used to check objects against Nanotrasen exports and bounty database."
desc = "A device used to check objects against Nanotrasen exports and bounty database. Sadly can not scan reagents vaule."
icon = 'icons/obj/device.dmi'
icon_state = "export_scanner"
item_state = "radio"
@@ -31,7 +31,7 @@
else
// Before you fix it:
// yes, checking manifests is a part of intended functionality.
var/datum/export_report/ex = export_item_and_contents(O, cargo_console.get_export_categories(), dry_run=TRUE)
var/price = 0
for(var/x in ex.total_amount)
+7 -3
View File
@@ -21,9 +21,10 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
// Simple holder datum to pass export results around
/datum/export_report
var/list/exported_atoms = list() //names of atoms sold/deleted by export
var/list/total_amount = list() //export instance => total count of sold objects of its type, only exists if any were sold
var/list/total_value = list() //export instance => total value of sold objects
var/list/exported_atoms = list()//names of atoms sold/deleted by export
var/list/total_amount = list() //export instance => total count of sold objects of its type, only exists if any were sold
var/list/total_value = list() //export instance => total value of sold objects
var/list/total_reagents = list()//export reagents => into the total vaule of the object sold
// external_report works as "transaction" object, pass same one in if you're doing more than one export in single go
/proc/export_item_and_contents(atom/movable/AM, allowed_categories = EXPORT_CARGO, apply_elastic = TRUE, delete_unsold = TRUE, dry_run=FALSE, datum/export_report/external_report)
@@ -47,6 +48,9 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
sold = E.sell_object(thing, report, dry_run, allowed_categories , apply_elastic)
report.exported_atoms += " [thing.name]"
break
if(thing.reagents)
for(var/datum/reagent/R in thing.reagents.reagent_list)
report.total_reagents[R] += R.volume
if(!dry_run && (sold || delete_unsold))
if(ismob(thing))
thing.investigate_log("deleted through cargo export",INVESTIGATE_CARGO)
+3 -35
View File
@@ -73,31 +73,6 @@
unit_name = "egg"
export_types = list(/obj/item/reagent_containers/food/snacks/egg)
/datum/export/food/milk
cost = 0.1 //10u for 1 credit
unit_name = "unit of milk"
export_types = list(/datum/reagent/consumable/milk)
/datum/export/food/wheat
cost = 0.1
unit_name = "unit of flour"
export_types = list(/datum/reagent/consumable/flour)
/datum/export/food/rice
cost = 0.1
unit_name = "unit of rice"
export_types = list(/datum/reagent/consumable/rice)
/datum/export/food/sugar
cost = 0.1
unit_name = "unit of sugar"
export_types = list(/datum/reagent/consumable/sugar)
/datum/export/food/enzyme
cost = 1
unit_name = "unit of enzyme"
export_types = list(/datum/reagent/consumable/enzyme)
/datum/export/food/soup
cost = 30
unit_name = "bowl of soup"
@@ -176,14 +151,7 @@
cost = 1.5 //PER unit
unit_name = "station brew"
export_types = list(/datum/reagent/consumable/ethanol/fruit_wine)
/datum/export/booze/loose/brands
cost = 0.1 //Most bottes are worth like 15 credits
unit_name = "brand booze"
export_types = list(/datum/reagent/consumable/ethanol/beer, /datum/reagent/consumable/ethanol/kahlua, /datum/reagent/consumable/ethanol/whiskey, /datum/reagent/consumable/ethanol/thirteenloko, /datum/reagent/consumable/ethanol/vodka, /datum/reagent/consumable/ethanol/gin, \
/datum/reagent/consumable/ethanol/rum, /datum/reagent/consumable/ethanol/tequila, /datum/reagent/consumable/ethanol/vermouth, /datum/reagent/consumable/ethanol/wine, /datum/reagent/consumable/ethanol/grappa, /datum/reagent/consumable/ethanol/cognac, \
/datum/reagent/consumable/ethanol/absinthe, /datum/reagent/consumable/ethanol/goldschlager, /datum/reagent/consumable/ethanol/patron, /datum/reagent/consumable/ethanol/sake, /datum/reagent/consumable/ethanol/hcider, /datum/reagent/consumable/ethanol/champagne, \
/datum/reagent/consumable/ethanol/applejack, /datum/reagent/consumable/ethanol/trappist, /datum/reagent/consumable/ethanol/blazaam)
include_subtypes = TRUE //Just in case
/datum/export/booze/brands
cost = 100
@@ -191,7 +159,7 @@
export_types = list(/obj/item/export/bottle/kahlua, /obj/item/export/bottle/whiskey, /obj/item/export/bottle/vodka, /obj/item/export/bottle/gin, \
/obj/item/export/bottle/rum, /obj/item/export/bottle/tequila, /obj/item/export/bottle/vermouth, /obj/item/export/bottle/wine, /obj/item/export/bottle/grappa, /obj/item/export/bottle/cognac, \
/obj/item/export/bottle/absinthe, /obj/item/export/bottle/goldschlager, /obj/item/export/bottle/patron, /obj/item/export/bottle/sake, /obj/item/export/bottle/hcider, /obj/item/export/bottle/champagne, \
/obj/item/export/bottle/applejack, /obj/item/export/bottle/trappist, /obj/item/export/bottle/blazaam)
/obj/item/export/bottle/applejack, /obj/item/export/bottle/trappist, /obj/item/export/bottle/blazaam, /obj/item/export/bottle/grenadine, /obj/item/export/bottle/fernet)
/datum/export/booze/bottled
cost = 400
@@ -199,6 +167,6 @@
export_types = list(/obj/item/export/bottle/blooddrop, /obj/item/export/bottle/slim_gold, /obj/item/export/bottle/white_bloodmoon, /obj/item/export/bottle/greenroad)
/datum/export/booze/bottledkeg
cost = 120
cost = 250
unit_name = "exotic brews"
export_types = list(/obj/item/export/bottle/minikeg) //Its just beer
+1 -3
View File
@@ -114,9 +114,7 @@
cost = 200 //The new plasma
unit_name = "sheets"
message = "of silk"
export_types = list(/obj/item/stack/sheet/cloth/silk)
exclude_types = list(/obj/item/stack/sheet/cloth) //Reduntent but just in case
include_subtypes = FALSE
export_types = list(/obj/item/stack/sheet/silk)
/datum/export/stack/duracloth
cost = 40