initial commit - cross reference with 5th port - obviously has compile errors
This commit is contained in:
@@ -0,0 +1,200 @@
|
||||
/obj/machinery/computer/cargo
|
||||
name = "supply console"
|
||||
desc = "Used to order supplies, approve requests, and control the shuttle."
|
||||
icon_screen = "supply"
|
||||
circuit = /obj/item/weapon/circuitboard/computer/cargo
|
||||
var/requestonly = FALSE
|
||||
var/contraband = FALSE
|
||||
var/safety_warning = "For safety reasons the automated supply shuttle \
|
||||
cannot transport live organisms, classified nuclear weaponry or \
|
||||
homing beacons."
|
||||
|
||||
/obj/machinery/computer/cargo/request
|
||||
name = "supply request console"
|
||||
desc = "Used to request supplies from cargo."
|
||||
icon_screen = "request"
|
||||
circuit = /obj/item/weapon/circuitboard/computer/cargo/request
|
||||
requestonly = TRUE
|
||||
|
||||
/obj/machinery/computer/cargo/New()
|
||||
..()
|
||||
var/obj/item/weapon/circuitboard/computer/cargo/board = circuit
|
||||
contraband = board.contraband
|
||||
emagged = board.emagged
|
||||
|
||||
/obj/machinery/computer/cargo/emag_act(mob/living/user)
|
||||
if(!emagged)
|
||||
user.visible_message("<span class='warning'>[user] swipes a suspicious card through [src]!",
|
||||
"<span class='notice'>You adjust [src]'s routing and receiver spectrum, unlocking special supplies and contraband.</span>")
|
||||
|
||||
emagged = TRUE
|
||||
contraband = TRUE
|
||||
|
||||
// This also permamently sets this on the circuit board
|
||||
var/obj/item/weapon/circuitboard/computer/cargo/board = circuit
|
||||
board.contraband = TRUE
|
||||
board.emagged = TRUE
|
||||
|
||||
/obj/machinery/computer/cargo/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = default_state)
|
||||
ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "cargo", name, 1000, 800, master_ui, state)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/cargo/ui_data()
|
||||
var/list/data = list()
|
||||
data["requestonly"] = requestonly
|
||||
data["location"] = SSshuttle.supply.getStatusText()
|
||||
data["points"] = SSshuttle.points
|
||||
data["away"] = SSshuttle.supply.getDockedId() == "supply_away"
|
||||
data["docked"] = SSshuttle.supply.mode == SHUTTLE_IDLE
|
||||
data["loan"] = !!SSshuttle.shuttle_loan
|
||||
data["loan_dispatched"] = SSshuttle.shuttle_loan && SSshuttle.shuttle_loan.dispatched
|
||||
data["message"] = SSshuttle.centcom_message || "Remember to stamp and send back the supply manifests."
|
||||
|
||||
data["supplies"] = list()
|
||||
for(var/pack in SSshuttle.supply_packs)
|
||||
var/datum/supply_pack/P = SSshuttle.supply_packs[pack]
|
||||
if(!data["supplies"][P.group])
|
||||
data["supplies"][P.group] = list(
|
||||
"name" = P.group,
|
||||
"packs" = list()
|
||||
)
|
||||
if((P.hidden && !emagged) || (P.contraband && !contraband))
|
||||
continue
|
||||
data["supplies"][P.group]["packs"] += list(list(
|
||||
"name" = P.name,
|
||||
"cost" = P.cost,
|
||||
"id" = pack
|
||||
))
|
||||
|
||||
data["cart"] = list()
|
||||
for(var/datum/supply_order/SO in SSshuttle.shoppinglist)
|
||||
data["cart"] += list(list(
|
||||
"object" = SO.pack.name,
|
||||
"cost" = SO.pack.cost,
|
||||
"id" = SO.id
|
||||
))
|
||||
|
||||
data["requests"] = list()
|
||||
for(var/datum/supply_order/SO in SSshuttle.requestlist)
|
||||
data["requests"] += list(list(
|
||||
"object" = SO.pack.name,
|
||||
"cost" = SO.pack.cost,
|
||||
"orderer" = SO.orderer,
|
||||
"reason" = SO.reason,
|
||||
"id" = SO.id
|
||||
))
|
||||
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/cargo/ui_act(action, params, datum/tgui/ui)
|
||||
if(..())
|
||||
return
|
||||
if(action != "add" && requestonly)
|
||||
return
|
||||
switch(action)
|
||||
if("send")
|
||||
if(SSshuttle.supply.canMove())
|
||||
say(safety_warning)
|
||||
return
|
||||
if(SSshuttle.supply.getDockedId() == "supply_home")
|
||||
SSshuttle.supply.emagged = emagged
|
||||
SSshuttle.supply.contraband = contraband
|
||||
SSshuttle.moveShuttle("supply", "supply_away", TRUE)
|
||||
say("The supply shuttle has departed.")
|
||||
investigate_log("[key_name(usr)] sent the supply shuttle away.", "cargo")
|
||||
else
|
||||
investigate_log("[key_name(usr)] called the supply shuttle.", "cargo")
|
||||
say("The supply shuttle has been called and will arrive in [SSshuttle.supply.timeLeft(600)] minutes.")
|
||||
SSshuttle.moveShuttle("supply", "supply_home", TRUE)
|
||||
. = TRUE
|
||||
if("loan")
|
||||
if(!SSshuttle.shuttle_loan)
|
||||
return
|
||||
if(SSshuttle.supply.canMove())
|
||||
say(safety_warning)
|
||||
return
|
||||
else if(SSshuttle.supply.mode == SHUTTLE_IDLE)
|
||||
SSshuttle.shuttle_loan.loan_shuttle()
|
||||
say("The supply shuttle has been loaned to Centcom.")
|
||||
. = TRUE
|
||||
if("add")
|
||||
var/id = text2path(params["id"])
|
||||
var/datum/supply_pack/pack = SSshuttle.supply_packs[id]
|
||||
if(!istype(pack))
|
||||
return
|
||||
if((pack.hidden && !emagged) || (pack.contraband && !contraband))
|
||||
return
|
||||
|
||||
var/name = "*None Provided*"
|
||||
var/rank = "*None Provided*"
|
||||
var/ckey = usr.ckey
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
name = H.get_authentification_name()
|
||||
rank = H.get_assignment()
|
||||
else if(issilicon(usr))
|
||||
name = usr.real_name
|
||||
rank = "Silicon"
|
||||
|
||||
var/reason = ""
|
||||
if(requestonly)
|
||||
reason = input("Reason:", name, "") as text|null
|
||||
if(isnull(reason) || ..())
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
var/datum/supply_order/SO = new(pack, name, rank, ckey, reason)
|
||||
SO.generateRequisition(T)
|
||||
if(requestonly)
|
||||
SSshuttle.requestlist += SO
|
||||
else
|
||||
SSshuttle.shoppinglist += SO
|
||||
. = TRUE
|
||||
if("remove")
|
||||
var/id = text2num(params["id"])
|
||||
for(var/datum/supply_order/SO in SSshuttle.shoppinglist)
|
||||
if(SO.id == id)
|
||||
SSshuttle.shoppinglist -= SO
|
||||
. = TRUE
|
||||
break
|
||||
if("clear")
|
||||
SSshuttle.shoppinglist.Cut()
|
||||
. = TRUE
|
||||
if("approve")
|
||||
var/id = text2num(params["id"])
|
||||
for(var/datum/supply_order/SO in SSshuttle.requestlist)
|
||||
if(SO.id == id)
|
||||
SSshuttle.requestlist -= SO
|
||||
SSshuttle.shoppinglist += SO
|
||||
. = TRUE
|
||||
break
|
||||
if("deny")
|
||||
var/id = text2num(params["id"])
|
||||
for(var/datum/supply_order/SO in SSshuttle.requestlist)
|
||||
if(SO.id == id)
|
||||
SSshuttle.requestlist -= SO
|
||||
. = TRUE
|
||||
break
|
||||
if("denyall")
|
||||
SSshuttle.requestlist.Cut()
|
||||
. = TRUE
|
||||
if(.)
|
||||
post_signal("supply")
|
||||
|
||||
/obj/machinery/computer/cargo/proc/post_signal(command)
|
||||
|
||||
var/datum/radio_frequency/frequency = SSradio.return_frequency(1435)
|
||||
|
||||
if(!frequency)
|
||||
return
|
||||
|
||||
var/datum/signal/status_signal = new
|
||||
status_signal.source = src
|
||||
status_signal.transmission_method = 1
|
||||
status_signal.data["command"] = command
|
||||
|
||||
frequency.post_signal(src, status_signal)
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/obj/item/device/export_scanner
|
||||
name = "export scanner"
|
||||
desc = "A device used to check objects against Nanotrasen exports database."
|
||||
icon_state = "export_scanner"
|
||||
item_state = "radio"
|
||||
flags = NOBLUDGEON
|
||||
w_class = 2
|
||||
siemens_coefficient = 1
|
||||
var/obj/machinery/computer/cargo/cargo_console = null
|
||||
|
||||
/obj/item/device/export_scanner/examine(user)
|
||||
..()
|
||||
if(!cargo_console)
|
||||
user << "<span class='notice'>The [src] is currently not linked to a cargo console.</span>"
|
||||
|
||||
/obj/item/device/export_scanner/afterattack(obj/O, mob/user, proximity)
|
||||
if(!istype(O) || !proximity)
|
||||
return
|
||||
|
||||
if(istype(O, /obj/machinery/computer/cargo))
|
||||
var/obj/machinery/computer/cargo/C = O
|
||||
if(!C.requestonly)
|
||||
cargo_console = C
|
||||
user << "<span class='notice'>Scanner linked to [C].</span>"
|
||||
else if(!istype(cargo_console))
|
||||
user << "<span class='warning'>You must link [src] to a cargo console first!</span>"
|
||||
else
|
||||
// Before you fix it:
|
||||
// yes, checking manifests is a part of intended functionality.
|
||||
var/price = export_item_and_contents(O, cargo_console.contraband, cargo_console.emagged, dry_run=TRUE)
|
||||
|
||||
if(price)
|
||||
user << "<span class='notice'>Scanned [O], value: <b>[price]</b> \
|
||||
credits[O.contents.len ? " (contents included)" : ""].</span>"
|
||||
else
|
||||
user << "<span class='warning'>Scanned [O], no export value. \
|
||||
</span>"
|
||||
@@ -0,0 +1,141 @@
|
||||
/* How it works:
|
||||
The shuttle arrives at Centcom dock and calls sell(), which recursively loops through all the shuttle contents that are unanchored.
|
||||
The loop only checks contents of storage types, see supply.dm shuttle code.
|
||||
|
||||
Each object in the loop is checked for applies_to() of various export datums, except the invalid ones.
|
||||
Objects on shutlle floor are checked only against shuttle_floor = TRUE exports.
|
||||
|
||||
If applies_to() returns TRUE, sell_object() is called on object and checks against exports are stopped for this object.
|
||||
sell_object() must add object amount and cost to export's total_cost and total_amount.
|
||||
|
||||
When all the shuttle objects are looped, export cycle is over. The shuttle calls total_printout() for each valid export.
|
||||
If total_printout() returns something, the export datum's total_cost is added to cargo credits, then export_end() is called to reset total_cost and total_amount.
|
||||
*/
|
||||
|
||||
/* The rule in figuring out item export cost:
|
||||
Export cost of goods in the shipping crate must be always equal or lower than:
|
||||
packcage cost - crate cost - manifest cost
|
||||
Crate cost is 500cr for a regular plasteel crate and 100cr for a large wooden one. Manifest cost is always 200cr.
|
||||
This is to avoid easy cargo points dupes.
|
||||
|
||||
Credit dupes that require a lot of manual work shouldn't be removed, unless they yield too much profit for too little work.
|
||||
For example, if some player buys metal and glass sheets and uses them to make and sell reinforced glass:
|
||||
|
||||
100 glass + 50 metal -> 100 reinforced glass
|
||||
(1500cr -> 1600cr)
|
||||
|
||||
then the player gets the profit from selling his own wasted time.
|
||||
*/
|
||||
/proc/export_item_and_contents(atom/movable/AM, contraband, emagged, dry_run=FALSE)
|
||||
if(!exports_list.len)
|
||||
setupExports()
|
||||
|
||||
var/sold_str = ""
|
||||
var/cost = 0
|
||||
|
||||
var/list/contents = AM.GetAllContents()
|
||||
|
||||
// We go backwards, so it'll be innermost objects sold first
|
||||
for(var/i in reverseRange(contents))
|
||||
var/atom/movable/thing = i
|
||||
for(var/datum/export/E in exports_list)
|
||||
if(!E)
|
||||
continue
|
||||
if(E.applies_to(thing, contraband, emagged))
|
||||
if(dry_run)
|
||||
cost += E.get_cost(thing, contraband, emagged)
|
||||
else
|
||||
E.sell_object(thing, contraband, emagged)
|
||||
sold_str += " [thing.name]"
|
||||
break
|
||||
if(!dry_run)
|
||||
qdel(thing)
|
||||
|
||||
if(dry_run)
|
||||
return cost
|
||||
else
|
||||
return sold_str
|
||||
|
||||
/datum/export
|
||||
var/unit_name = "" // Unit name. Only used in "Received [total_amount] [name]s [message]." message
|
||||
var/message = ""
|
||||
var/cost = 100 // Cost of item, in cargo credits. Must not alow for infinite price dupes, see above.
|
||||
var/contraband = FALSE // Export must be unlocked with multitool.
|
||||
var/emagged = FALSE // Export must be unlocked with emag.
|
||||
var/list/export_types = list() // Type of the exported object. If none, the export datum is considered base type.
|
||||
var/include_subtypes = TRUE // Set to FALSE to make the datum apply only to a strict type.
|
||||
var/list/exclude_types = list() // Types excluded from export
|
||||
|
||||
// Used by print-out
|
||||
var/total_cost = 0
|
||||
var/total_amount = 0
|
||||
|
||||
// Checks the cost. 0 cost items are skipped in export.
|
||||
/datum/export/proc/get_cost(obj/O, contr = 0, emag = 0)
|
||||
return cost * get_amount(O, contr, emag)
|
||||
|
||||
// Checks the amount of exportable in object. Credits in the bill, sheets in the stack, etc.
|
||||
// Usually acts as a multiplier for a cost, so item that has 0 amount will be skipped in export.
|
||||
/datum/export/proc/get_amount(obj/O, contr = 0, emag = 0)
|
||||
return 1
|
||||
|
||||
// Checks if the item is fit for export datum.
|
||||
/datum/export/proc/applies_to(obj/O, contr = 0, emag = 0)
|
||||
if(contraband && !contr)
|
||||
return FALSE
|
||||
if(emagged && !emag)
|
||||
return FALSE
|
||||
if(!include_subtypes && !(O.type in export_types))
|
||||
return FALSE
|
||||
if(include_subtypes && (!is_type_in_list(O, export_types) || is_type_in_list(O, exclude_types)))
|
||||
return FALSE
|
||||
if(!get_cost(O, contr, emag))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
// Called only once, when the object is actually sold by the datum.
|
||||
// Adds item's cost and amount to the current export cycle.
|
||||
// get_cost, get_amount and applies_to do not neccesary mean a successful sale.
|
||||
/datum/export/proc/sell_object(obj/O, contr = 0, emag = 0)
|
||||
var/cost = get_cost(O)
|
||||
var/amount = get_amount(O)
|
||||
total_cost += cost
|
||||
total_amount += amount
|
||||
feedback_add_details("export_sold_amount","[O.type]|[amount]")
|
||||
feedback_add_details("export_sold_cost","[O.type]|[cost]")
|
||||
|
||||
// Total printout for the cargo console.
|
||||
// Called before the end of current export cycle.
|
||||
// It must always return something if the datum adds or removes any credts.
|
||||
/datum/export/proc/total_printout(contr = 0, emag = 0)
|
||||
if(!total_cost && !total_amount)
|
||||
return ""
|
||||
var/msg = "[total_cost] credits: Received [total_amount] "
|
||||
if(total_cost > 0)
|
||||
msg = "+" + msg
|
||||
|
||||
if(unit_name)
|
||||
msg += unit_name
|
||||
if(total_amount > 1)
|
||||
msg += "s"
|
||||
if(message)
|
||||
msg += " "
|
||||
|
||||
if(message)
|
||||
msg += message
|
||||
|
||||
msg += "."
|
||||
return msg
|
||||
|
||||
// The current export cycle is over now. Reset all the export temporary vars.
|
||||
/datum/export/proc/export_end()
|
||||
total_cost = 0
|
||||
total_amount = 0
|
||||
|
||||
var/list/exports_list = list()
|
||||
|
||||
/proc/setupExports()
|
||||
for(var/subtype in subtypesof(/datum/export))
|
||||
var/datum/export/E = new subtype
|
||||
if(E.export_types && E.export_types.len) // Exports without a type are invalid/base types
|
||||
exports_list += E
|
||||
@@ -0,0 +1,129 @@
|
||||
// Armor, gloves, space suits - it all goes here
|
||||
|
||||
/datum/export/gear
|
||||
|
||||
// Security gear
|
||||
/datum/export/gear/sec_helmet
|
||||
cost = 100
|
||||
unit_name = "helmet"
|
||||
export_types = list(/obj/item/clothing/head/helmet/sec)
|
||||
|
||||
/datum/export/gear/sec_armor
|
||||
cost = 100
|
||||
unit_name = "armor vest"
|
||||
export_types = list(/obj/item/clothing/suit/armor/vest)
|
||||
include_subtypes = FALSE
|
||||
|
||||
|
||||
/datum/export/gear/riot_helmet
|
||||
cost = 250
|
||||
unit_name = "riot helmet"
|
||||
export_types = list(/obj/item/clothing/head/helmet/riot)
|
||||
|
||||
/datum/export/gear/riot_armor
|
||||
cost = 250
|
||||
unit_name = "riot armor suit"
|
||||
export_types = list(/obj/item/clothing/suit/armor/riot)
|
||||
|
||||
/datum/export/gear/bulletproof_armor
|
||||
cost = 250
|
||||
unit_name = "bulletproof armor vest"
|
||||
export_types = list(/obj/item/clothing/suit/armor/bulletproof)
|
||||
|
||||
/datum/export/gear/reflector_armor
|
||||
cost = 650
|
||||
unit_name = "reflector armor vest"
|
||||
export_types = list(/obj/item/clothing/suit/armor/laserproof)
|
||||
|
||||
|
||||
/datum/export/gear/riot_shield
|
||||
cost = 400
|
||||
unit_name = "riot shield"
|
||||
export_types = list(/obj/item/weapon/shield/riot)
|
||||
|
||||
|
||||
// Masks
|
||||
/datum/export/gear/mask/breath
|
||||
cost = 2
|
||||
unit_name = "breath mask"
|
||||
export_types = list(/obj/item/clothing/mask/breath)
|
||||
|
||||
/datum/export/gear/mask/gas
|
||||
cost = 10
|
||||
unit_name = "gas mask"
|
||||
export_types = list(/obj/item/clothing/mask/gas)
|
||||
include_subtypes = FALSE
|
||||
|
||||
|
||||
|
||||
// EVA gear
|
||||
/datum/export/gear/space
|
||||
include_subtypes = FALSE
|
||||
|
||||
/datum/export/gear/space/helmet
|
||||
cost = 500
|
||||
unit_name = "space helmet"
|
||||
export_types = list(/obj/item/clothing/head/helmet/space, /obj/item/clothing/head/helmet/space/eva)
|
||||
|
||||
/datum/export/gear/space/suit
|
||||
cost = 600
|
||||
unit_name = "space suit"
|
||||
export_types = list(/obj/item/clothing/suit/space, /obj/item/clothing/suit/space/eva)
|
||||
|
||||
|
||||
/datum/export/gear/space/voidhelmet
|
||||
cost = 550
|
||||
unit_name = "void helmet"
|
||||
export_types = list(/obj/item/clothing/head/helmet/space/nasavoid)
|
||||
|
||||
/datum/export/gear/space/voidsuit
|
||||
cost = 650
|
||||
unit_name = "void suit"
|
||||
export_types = list(/obj/item/clothing/suit/space/nasavoid)
|
||||
|
||||
|
||||
/datum/export/gear/space/syndiehelmet
|
||||
cost = 1000
|
||||
unit_name = "Syndicate space helmet"
|
||||
export_types = list(/obj/item/clothing/head/helmet/space/syndicate)
|
||||
include_subtypes = TRUE
|
||||
|
||||
/datum/export/gear/space/syndiesuit
|
||||
cost = 1500
|
||||
unit_name = "Syndicate space suit"
|
||||
export_types = list(/obj/item/clothing/suit/space/syndicate)
|
||||
include_subtypes = TRUE
|
||||
|
||||
|
||||
// Radsuits
|
||||
/datum/export/gear/radhelmet
|
||||
cost = 50
|
||||
unit_name = "radsuit hood"
|
||||
export_types = list(/obj/item/clothing/head/radiation)
|
||||
|
||||
/datum/export/gear/radsuit
|
||||
cost = 100
|
||||
unit_name = "radsuit"
|
||||
export_types = list(/obj/item/clothing/suit/radiation)
|
||||
|
||||
// Biosuits
|
||||
/datum/export/gear/biohood
|
||||
cost = 50
|
||||
unit_name = "biosuit hood"
|
||||
export_types = list(/obj/item/clothing/head/bio_hood)
|
||||
|
||||
/datum/export/gear/biosuit
|
||||
cost = 100
|
||||
unit_name = "biosuit"
|
||||
export_types = list(/obj/item/clothing/suit/bio_suit)
|
||||
|
||||
// Bombsuits
|
||||
/datum/export/gear/bombhelmet
|
||||
cost = 100
|
||||
unit_name = "bomb suit hood"
|
||||
export_types = list(/obj/item/clothing/head/bomb_hood)
|
||||
|
||||
/datum/export/gear/bombsuit
|
||||
cost = 300
|
||||
unit_name = "bomb suit"
|
||||
export_types = list(/obj/item/clothing/suit/bomb_suit)
|
||||
@@ -0,0 +1,74 @@
|
||||
// Drop the dox!
|
||||
|
||||
// Selling Syndicate docs to NT
|
||||
/datum/export/intel
|
||||
cost = 25000
|
||||
unit_name = "original article"
|
||||
message = "of enemy intelligence"
|
||||
var/global/originals_recieved = list()
|
||||
var/global/copies_recieved = list()
|
||||
var/copy_path = null
|
||||
export_types = list(/obj/item/documents/syndicate)
|
||||
|
||||
/datum/export/intel/applies_to(obj/O, contr = 0, emag = 0)
|
||||
if(!..())
|
||||
return FALSE
|
||||
|
||||
if(emagged != emag) // Emagging the console will stop you from selling Syndicate docs to NT.
|
||||
return FALSE
|
||||
|
||||
// No docs double-selling!
|
||||
if(istype(O, /obj/item/documents/photocopy))
|
||||
var/obj/item/documents/photocopy/C = O
|
||||
if(!C.copy_type)
|
||||
return FALSE
|
||||
if((C.copy_type in originals_recieved) || (C.copy_type in copies_recieved))
|
||||
return FALSE
|
||||
if(copy_path && !ispath(C.copy_type, copy_path))
|
||||
return FALSE
|
||||
|
||||
else if(O.type in originals_recieved)
|
||||
return FALSE
|
||||
|
||||
return TRUE
|
||||
|
||||
/datum/export/intel/get_cost(obj/O)
|
||||
if(O.type in copies_recieved)
|
||||
return ..() - 15000 // Already have a copy of it, deduce the cost.
|
||||
return ..()
|
||||
|
||||
/datum/export/intel/sell_object(obj/O)
|
||||
..()
|
||||
if(istype(O, /obj/item/documents/photocopy))
|
||||
var/obj/item/documents/photocopy/C = O
|
||||
copies_recieved += C.copy_type
|
||||
else
|
||||
originals_recieved += O.type
|
||||
|
||||
/datum/export/intel/photocopy
|
||||
cost = 15000 // Allows double agents to earn some cargo points without failing their objectives.
|
||||
unit_name = "photocopied article"
|
||||
export_types = list(/obj/item/documents/photocopy)
|
||||
copy_path = /obj/item/documents/syndicate
|
||||
|
||||
|
||||
|
||||
// Selling NT docs to Syndicate
|
||||
/datum/export/intel/syndie
|
||||
message = "of Nanotrasen intelligence"
|
||||
export_types = list(/obj/item/documents/nanotrasen)
|
||||
emagged = TRUE
|
||||
|
||||
/datum/export/intel/syndie/photocopy
|
||||
cost = 15000
|
||||
unit_name = "photocopied article"
|
||||
export_types = list(/obj/item/documents/photocopy)
|
||||
copy_path = /obj/item/documents/nanotrasen
|
||||
|
||||
// Selling Syndicate docs to Syndicate, why not?
|
||||
/datum/export/intel/syndie/recovered
|
||||
cost = 15000
|
||||
unit_name = "recovered article"
|
||||
message = "of Syndicate intelligence"
|
||||
export_types = list(/obj/item/documents/syndicate)
|
||||
// Syndicate only wants originals of their docs recovered.
|
||||
@@ -0,0 +1,110 @@
|
||||
// Large objects that don't fit in crates, but must be sellable anyway.
|
||||
|
||||
// Crates, boxes, lockers.
|
||||
/datum/export/large/crate
|
||||
cost = 500
|
||||
unit_name = "crate"
|
||||
export_types = list(/obj/structure/closet/crate)
|
||||
exclude_types = list(/obj/structure/closet/crate/large)
|
||||
|
||||
/datum/export/large/crate/total_printout() // That's why a goddamn metal crate costs that much.
|
||||
. = ..()
|
||||
if(.)
|
||||
. += " Thanks for participating in Nanotrasen Crates Recycling Program."
|
||||
|
||||
/datum/export/large/crate/wooden
|
||||
cost = 100
|
||||
unit_name = "wooden crate"
|
||||
export_types = list(/obj/structure/closet/crate/large)
|
||||
exclude_types = list()
|
||||
|
||||
/datum/export/large/crate/wooden/ore
|
||||
unit_name = "ore box"
|
||||
export_types = list(/obj/structure/ore_box)
|
||||
|
||||
|
||||
// Reagent dispensers.
|
||||
/datum/export/large/reagent_dispenser
|
||||
cost = 100 // +0-400 depending on amount of reagents left
|
||||
var/contents_cost = 400
|
||||
|
||||
/datum/export/large/reagent_dispenser/get_cost(obj/O)
|
||||
var/obj/structure/reagent_dispensers/D = O
|
||||
var/ratio = D.reagents.total_volume / D.reagents.maximum_volume
|
||||
|
||||
return ..() + round(contents_cost * ratio)
|
||||
|
||||
/datum/export/large/reagent_dispenser/water
|
||||
unit_name = "watertank"
|
||||
export_types = list(/obj/structure/reagent_dispensers/watertank)
|
||||
contents_cost = 200
|
||||
|
||||
/datum/export/large/reagent_dispenser/fuel
|
||||
unit_name = "fueltank"
|
||||
export_types = list(/obj/structure/reagent_dispensers/fueltank)
|
||||
|
||||
/datum/export/large/reagent_dispenser/beer
|
||||
unit_name = "beer keg"
|
||||
contents_cost = 700
|
||||
export_types = list(/obj/structure/reagent_dispensers/beerkeg)
|
||||
|
||||
|
||||
|
||||
// Heavy engineering equipment. Singulo/Tesla parts mostly.
|
||||
/datum/export/large/emitter
|
||||
cost = 400
|
||||
unit_name = "emitter"
|
||||
export_types = list(/obj/machinery/power/emitter)
|
||||
|
||||
/datum/export/large/field_generator
|
||||
cost = 400
|
||||
unit_name = "field generator"
|
||||
export_types = list(/obj/machinery/field/generator)
|
||||
|
||||
/datum/export/large/collector
|
||||
cost = 600
|
||||
unit_name = "collector"
|
||||
export_types = list(/obj/machinery/power/rad_collector)
|
||||
|
||||
/datum/export/large/collector/pa
|
||||
cost = 300
|
||||
unit_name = "particle accelerator part"
|
||||
export_types = list(/obj/structure/particle_accelerator)
|
||||
|
||||
/datum/export/large/collector/pa/controls
|
||||
cost = 500
|
||||
unit_name = "particle accelerator control console"
|
||||
export_types = list(/obj/machinery/particle_accelerator/control_box)
|
||||
|
||||
/datum/export/large/pipedispenser
|
||||
cost = 500
|
||||
unit_name = "pipe dispenser"
|
||||
export_types = list(/obj/machinery/pipedispenser)
|
||||
|
||||
|
||||
/datum/export/large/singularitygen
|
||||
cost = 4000 // If you have one left after engine setup, sell it.
|
||||
unit_name = "unused gravitational singularity generator"
|
||||
export_types = list(/obj/machinery/the_singularitygen)
|
||||
include_subtypes = FALSE
|
||||
|
||||
/datum/export/large/singularitygen/tesla
|
||||
unit_name = "unused energy ball generator"
|
||||
export_types = list(/obj/machinery/the_singularitygen/tesla)
|
||||
|
||||
/datum/export/large/supermatter
|
||||
cost = 9000
|
||||
unit_name = "supermatter shard"
|
||||
export_types = list(/obj/machinery/power/supermatter_shard)
|
||||
|
||||
|
||||
// Misc
|
||||
/datum/export/large/iv
|
||||
cost = 300
|
||||
unit_name = "iv drip"
|
||||
export_types = list(/obj/machinery/iv_drip)
|
||||
|
||||
/datum/export/large/barrier
|
||||
cost = 325
|
||||
unit_name = "security barrier"
|
||||
export_types = list(/obj/item/weapon/grenade/barrier, /obj/structure/barricade/security)
|
||||
@@ -0,0 +1,76 @@
|
||||
// Approved manifest.
|
||||
// +200 credits flat.
|
||||
/datum/export/manifest_correct
|
||||
cost = 200
|
||||
unit_name = "approved manifest"
|
||||
export_types = list(/obj/item/weapon/paper/manifest)
|
||||
|
||||
/datum/export/manifest_correct/applies_to(obj/O)
|
||||
if(!..())
|
||||
return FALSE
|
||||
|
||||
var/obj/item/weapon/paper/manifest/M = O
|
||||
if(M.is_approved() && !M.errors)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
// Correctly denied manifest.
|
||||
// Refunds the package cost minus the cost of crate.
|
||||
/datum/export/manifest_error_denied
|
||||
cost = -500
|
||||
unit_name = "correctly denied manifest"
|
||||
export_types = list(/obj/item/weapon/paper/manifest)
|
||||
|
||||
/datum/export/manifest_error_denied/applies_to(obj/O)
|
||||
if(!..())
|
||||
return FALSE
|
||||
|
||||
var/obj/item/weapon/paper/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/weapon/paper/manifest/M = O
|
||||
return ..() + M.order_cost
|
||||
|
||||
|
||||
// Erroneously approved manifest.
|
||||
// Substracts the package cost.
|
||||
/datum/export/manifest_error
|
||||
unit_name = "erroneously approved manifest"
|
||||
export_types = list(/obj/item/weapon/paper/manifest)
|
||||
|
||||
/datum/export/manifest_error/applies_to(obj/O)
|
||||
if(!..())
|
||||
return FALSE
|
||||
|
||||
var/obj/item/weapon/paper/manifest/M = O
|
||||
if(M.is_approved() && M.errors)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/datum/export/manifest_error/get_cost(obj/O)
|
||||
var/obj/item/weapon/paper/manifest/M = O
|
||||
return -M.order_cost
|
||||
|
||||
|
||||
// Erroneously denied manifest.
|
||||
// Substracts the package cost minus the cost of crate.
|
||||
/datum/export/manifest_correct_denied
|
||||
cost = 500
|
||||
unit_name = "erroneously denied manifest"
|
||||
export_types = list(/obj/item/weapon/paper/manifest)
|
||||
|
||||
/datum/export/manifest_correct_denied/applies_to(obj/O)
|
||||
if(!..())
|
||||
return FALSE
|
||||
|
||||
var/obj/item/weapon/paper/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/weapon/paper/manifest/M = O
|
||||
return ..() - M.order_cost
|
||||
@@ -0,0 +1,89 @@
|
||||
/datum/export/material
|
||||
cost = 5 // Cost per MINERAL_MATERIAL_AMOUNT, which is 2000cm3 as of April 2016.
|
||||
message = "cm3 of developer's tears. Please, report this on github"
|
||||
var/material_id = null
|
||||
export_types = list(
|
||||
/obj/item/stack/sheet/mineral, /obj/item/stack/tile/mineral,
|
||||
/obj/item/weapon/ore, /obj/item/weapon/coin)
|
||||
// Yes, it's a base type containing export_types.
|
||||
// But it has no material_id, so any applies_to check will return false, and these types reduce amount of copypasta a lot
|
||||
|
||||
/datum/export/material/get_amount(obj/O)
|
||||
if(!material_id)
|
||||
return 0
|
||||
if(!istype(O, /obj/item))
|
||||
return 0
|
||||
var/obj/item/I = O
|
||||
if(!(material_id in I.materials))
|
||||
return 0
|
||||
|
||||
var/amount = I.materials[material_id]
|
||||
|
||||
if(istype(I, /obj/item/stack))
|
||||
var/obj/item/stack/S = I
|
||||
amount *= S.amount
|
||||
else if(istype(I, /obj/item/weapon/ore))
|
||||
amount *= 0.8 // Station's ore redemption equipment is really goddamn good.
|
||||
|
||||
return round(amount)
|
||||
|
||||
/datum/export/material/get_cost(obj/O)
|
||||
return round(..() / MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
// Materials. Nothing but plasma is really worth selling. Better leave it all to RnD and sell some plasma instead.
|
||||
|
||||
// Bananium. Exporting it makes the clown cry. Priceless.
|
||||
/datum/export/material/bananium
|
||||
cost = 5000
|
||||
material_id = MAT_BANANIUM
|
||||
message = "cm3 of bananium"
|
||||
|
||||
// Diamonds. Rare and expensive.
|
||||
/datum/export/material/diamond
|
||||
cost = 2500
|
||||
material_id = MAT_DIAMOND
|
||||
message = "cm3 of diamonds"
|
||||
|
||||
// Plasma. The oil of 26 century. The reason why you are here.
|
||||
/datum/export/material/plasma
|
||||
cost = 500
|
||||
material_id = MAT_PLASMA
|
||||
message = "cm3 of plasma"
|
||||
|
||||
/datum/export/material/plasma/get_cost(obj/O, contr = 0, emag = 0)
|
||||
. = ..()
|
||||
if(emag) // Syndicate pays you more for the plasma.
|
||||
. = round(. * 1.5)
|
||||
|
||||
// Uranium. Still useful for both power generation and nuclear annihilation.
|
||||
/datum/export/material/uranium
|
||||
cost = 400
|
||||
material_id = MAT_URANIUM
|
||||
message = "cm3 of uranium"
|
||||
|
||||
// Gold. Used in electronics and corrosion-resistant plating.
|
||||
/datum/export/material/gold
|
||||
cost = 250
|
||||
material_id = MAT_GOLD
|
||||
message = "cm3 of gold"
|
||||
|
||||
// Silver.
|
||||
/datum/export/material/silver
|
||||
cost = 100
|
||||
material_id = MAT_SILVER
|
||||
message = "cm3 of silver"
|
||||
|
||||
// Metal. Common building material.
|
||||
/datum/export/material/metal
|
||||
message = "cm3 of metal"
|
||||
material_id = MAT_METAL
|
||||
export_types = list(
|
||||
/obj/item/stack/sheet/metal, /obj/item/stack/tile/plasteel,
|
||||
/obj/item/stack/rods, /obj/item/weapon/ore, /obj/item/weapon/coin)
|
||||
|
||||
// Glass. Common building material.
|
||||
/datum/export/material/glass
|
||||
message = "cm3 of glass"
|
||||
material_id = MAT_GLASS
|
||||
export_types = list(/obj/item/stack/sheet/glass, /obj/item/weapon/ore,
|
||||
/obj/item/weapon/shard)
|
||||
@@ -0,0 +1,24 @@
|
||||
// Space Cash. Now it isn't that useless.
|
||||
/datum/export/stack/cash
|
||||
cost = 1 // Multiplied both by value of each bill and by amount of bills in stack.
|
||||
unit_name = "credit"
|
||||
export_types = list(/obj/item/stack/spacecash)
|
||||
|
||||
/datum/export/stack/cash/get_amount(obj/O)
|
||||
var/obj/item/stack/spacecash/C = O
|
||||
return ..() * C.value
|
||||
|
||||
|
||||
// Coins. At least the coins that do not contain any materials.
|
||||
// Material-containing coins cost just as much as their materials do, see materials.dm for exact rates.
|
||||
/datum/export/coin
|
||||
cost = 1 // Multiplied by coin's value
|
||||
unit_name = "credit"
|
||||
message = "worth of rare coins"
|
||||
export_types = list(/obj/item/weapon/coin)
|
||||
|
||||
/datum/export/coin/get_amount(obj/O)
|
||||
var/obj/item/weapon/coin/C = O
|
||||
if(C.materials && C.materials.len)
|
||||
return 0 // Sold as raw material instead.
|
||||
return ..() * C.value
|
||||
@@ -0,0 +1,108 @@
|
||||
// Organs.
|
||||
|
||||
|
||||
// Alien organs
|
||||
/datum/export/organ/alien/get_cost(O, contr = 0, emag = 0)
|
||||
. = ..()
|
||||
if(emag) // Syndicate really wants some new bio-weapons.
|
||||
. *= 2
|
||||
|
||||
/datum/export/organ/alien/brain
|
||||
cost = 2000
|
||||
unit_name = "alien brain"
|
||||
export_types = list(/obj/item/organ/brain/alien)
|
||||
|
||||
/datum/export/organ/alien/acid
|
||||
cost = 1500
|
||||
unit_name = "alien acid gland"
|
||||
export_types = list(/obj/item/organ/alien/acid)
|
||||
|
||||
/datum/export/organ/alien/hivenode
|
||||
cost = 2000
|
||||
unit_name = "alien hive node"
|
||||
export_types = list(/obj/item/organ/alien/hivenode)
|
||||
|
||||
/datum/export/organ/alien/neurotoxin
|
||||
cost = 2000
|
||||
unit_name = "alien neurotoxin gland"
|
||||
export_types = list(/obj/item/organ/alien/neurotoxin)
|
||||
|
||||
/datum/export/organ/alien/resinspinner
|
||||
cost = 1000
|
||||
unit_name = "alien resin spinner"
|
||||
|
||||
/datum/export/organ/alien/plasmavessel
|
||||
cost = 1000
|
||||
unit_name = "alien plasma vessel"
|
||||
export_types = list(/obj/item/organ/alien/plasmavessel)
|
||||
|
||||
/datum/export/organ/alien/plasmavessel/get_cost(obj/item/organ/alien/plasmavessel/P)
|
||||
return ..() + (P.max_plasma * 2) + (P.plasma_rate * 20)
|
||||
|
||||
|
||||
|
||||
/datum/export/organ/alien/embryo
|
||||
cost = 5000 // Allows buyer to set up his own alien farm.
|
||||
unit_name = "alien embryo"
|
||||
export_types = list(/obj/item/organ/body_egg/alien_embryo)
|
||||
|
||||
/datum/export/organ/alien/eggsac
|
||||
cost = 10000 // Even better than a single embryo.
|
||||
unit_name = "alien egg sac"
|
||||
export_types = list(/obj/item/organ/alien/eggsac)
|
||||
|
||||
|
||||
// Other alien organs.
|
||||
/datum/export/organ/alien/abductor
|
||||
cost = 2500
|
||||
unit_name = "abductor gland"
|
||||
export_types = list(/obj/item/organ/gland)
|
||||
|
||||
/datum/export/organ/alien/changeling_egg
|
||||
cost = 50000 // Holy. Fuck.
|
||||
unit_name = "changeling egg"
|
||||
export_types = list(/obj/item/organ/body_egg/changeling_egg)
|
||||
|
||||
|
||||
/datum/export/organ/hivelord
|
||||
cost = 1500
|
||||
unit_name = "active hivelord core"
|
||||
export_types = list(/obj/item/organ/hivelord_core)
|
||||
|
||||
/datum/export/organ/alien/plasmavessel/get_cost(obj/item/organ/hivelord_core/C)
|
||||
if(C.inert)
|
||||
return ..() / 3
|
||||
if(C.preserved)
|
||||
return ..() * 2
|
||||
return ..()
|
||||
|
||||
|
||||
// Human organs.
|
||||
|
||||
// Do not put human brains here, they are not sellable for a purpose.
|
||||
// If they would be sellable, X-Porter cannon's finishing move (selling victim's organs) will be instakill with no revive.
|
||||
|
||||
/datum/export/organ/human
|
||||
contraband = TRUE
|
||||
include_subtypes = FALSE
|
||||
|
||||
/datum/export/organ/human/heart
|
||||
cost = 500
|
||||
unit_name = "heart"
|
||||
export_types = list(/obj/item/organ/heart)
|
||||
|
||||
/datum/export/organ/human/lungs
|
||||
cost = 400
|
||||
unit_name = "pair"
|
||||
message = "of lungs"
|
||||
export_types = list(/obj/item/organ/lungs)
|
||||
|
||||
/datum/export/organ/human/appendix
|
||||
cost = 50
|
||||
unit_name = "appendix"
|
||||
export_types = list(/obj/item/organ/appendix)
|
||||
|
||||
/datum/export/organ/human/appendix/get_cost(obj/item/organ/appendix/O)
|
||||
if(O.inflamed)
|
||||
return 0
|
||||
return ..()
|
||||
@@ -0,0 +1,32 @@
|
||||
// Circuit boards, spare parts, etc.
|
||||
|
||||
/datum/export/solar/assembly
|
||||
cost = 50
|
||||
unit_name = "solar panel assembly"
|
||||
export_types = list(/obj/item/solar_assembly)
|
||||
|
||||
/datum/export/solar/tracker_board
|
||||
cost = 100
|
||||
unit_name = "solar tracker board"
|
||||
export_types = list(/obj/item/weapon/electronics/tracker)
|
||||
|
||||
/datum/export/solar/control_board
|
||||
cost = 150
|
||||
unit_name = "solar panel control board"
|
||||
export_types = list(/obj/item/weapon/circuitboard/computer/solar_control)
|
||||
|
||||
|
||||
|
||||
/datum/export/swarmer
|
||||
cost = 2000
|
||||
unit_name = "deactivated alien deconstruction drone"
|
||||
export_types = list(/obj/item/device/unactivated_swarmer)
|
||||
|
||||
/datum/export/swarmer/applies_to(obj/O, contr = 0, emag = 0)
|
||||
if(!..())
|
||||
return FALSE
|
||||
|
||||
var/obj/item/device/unactivated_swarmer/S = O
|
||||
if(!S.crit_fail)
|
||||
return FALSE
|
||||
return TRUE
|
||||
@@ -0,0 +1,19 @@
|
||||
// Sell tech levels
|
||||
/datum/export/tech
|
||||
cost = 500
|
||||
unit_name = "technology data disk"
|
||||
export_types = list(/obj/item/weapon/disk/tech_disk)
|
||||
var/list/techLevels = list()
|
||||
|
||||
/datum/export/tech/get_cost(obj/O)
|
||||
var/obj/item/weapon/disk/tech_disk/D = O
|
||||
if(!D.stored)
|
||||
return 0
|
||||
var/datum/tech/tech = D.stored
|
||||
return ..() * tech.getCost(techLevels[tech.id])
|
||||
|
||||
/datum/export/tech/sell_object(obj/O)
|
||||
..()
|
||||
var/obj/item/weapon/disk/tech_disk/D = O
|
||||
var/datum/tech/tech = D.stored
|
||||
techLevels[tech.id] = tech.level
|
||||
@@ -0,0 +1,36 @@
|
||||
/datum/export/seed
|
||||
cost = 100 // Gets multiplied by potency
|
||||
unit_name = "new plant species sample"
|
||||
export_types = list(/obj/item/seeds)
|
||||
var/needs_discovery = FALSE // Only for undiscovered species
|
||||
var/global/list/discoveredPlants = list()
|
||||
|
||||
/datum/export/seed/get_cost(obj/O)
|
||||
var/obj/item/seeds/S = O
|
||||
if(!needs_discovery && (S.type in discoveredPlants))
|
||||
return 0
|
||||
if(needs_discovery && !(S.type in discoveredPlants))
|
||||
return 0
|
||||
return ..() * S.rarity // That's right, no bonus for potency. Send a crappy sample first to "show improvement" later.
|
||||
|
||||
/datum/export/seed/sell_object(obj/O)
|
||||
..()
|
||||
var/obj/item/seeds/S = O
|
||||
discoveredPlants[S.type] = S.potency
|
||||
|
||||
|
||||
/datum/export/seed/potency
|
||||
cost = 2.5 // Gets multiplied by potency and rarity.
|
||||
unit_name = "improved plant sample"
|
||||
export_types = list(/obj/item/seeds)
|
||||
needs_discovery = TRUE // Only for already discovered species
|
||||
|
||||
/datum/export/seed/potency.get_cost(obj/O)
|
||||
var/obj/item/seeds/S = O
|
||||
var/cost = ..()
|
||||
if(!cost)
|
||||
return 0
|
||||
|
||||
var/potDiff = max(S.potency - discoveredPlants[S.type], 0)
|
||||
|
||||
return round(..() * potDiff)
|
||||
@@ -0,0 +1,132 @@
|
||||
//
|
||||
// Sheet Exports
|
||||
//
|
||||
|
||||
/datum/export/stack
|
||||
unit_name = "sheet"
|
||||
|
||||
/datum/export/stack/get_amount(obj/O)
|
||||
var/obj/item/stack/S = O
|
||||
if(istype(S))
|
||||
return S.amount
|
||||
return 0
|
||||
|
||||
|
||||
// Leather, skin and other farming by-products.
|
||||
|
||||
/datum/export/stack/skin
|
||||
unit_name = ""
|
||||
|
||||
// Monkey hide. Cheap.
|
||||
/datum/export/stack/skin/monkey
|
||||
cost = 150
|
||||
unit_name = "monkey hide"
|
||||
export_types = list(/obj/item/stack/sheet/animalhide/monkey)
|
||||
|
||||
// Human skin. Illegal
|
||||
/datum/export/stack/skin/human
|
||||
cost = 2000
|
||||
contraband = 1
|
||||
unit_name = "piece"
|
||||
message = "of human skin"
|
||||
export_types = list(/obj/item/stack/sheet/animalhide/human)
|
||||
|
||||
// Goliath hide. Expensive.
|
||||
/datum/export/stack/skin/goliath_hide
|
||||
cost = 2500
|
||||
unit_name = "goliath hide"
|
||||
export_types = list(/obj/item/stack/sheet/animalhide/goliath_hide)
|
||||
|
||||
// Cat hide. Just in case Runtime is catsploding again.
|
||||
/datum/export/stack/skin/cat
|
||||
cost = 2000
|
||||
contraband = 1
|
||||
unit_name = "cat hide"
|
||||
export_types = list(/obj/item/stack/sheet/animalhide/cat)
|
||||
|
||||
// Corgi hide. You monster.
|
||||
/datum/export/stack/skin/corgi
|
||||
cost = 2500
|
||||
contraband = 1
|
||||
unit_name = "corgi hide"
|
||||
export_types = list(/obj/item/stack/sheet/animalhide/corgi)
|
||||
|
||||
// Lizard hide. Very expensive.
|
||||
/datum/export/stack/skin/lizard
|
||||
cost = 5000
|
||||
unit_name = "lizard hide"
|
||||
export_types = list(/obj/item/stack/sheet/animalhide/lizard)
|
||||
|
||||
// Alien hide. Extremely expensive.
|
||||
/datum/export/stack/skin/xeno
|
||||
cost = 15000
|
||||
unit_name = "alien hide"
|
||||
export_types = list(/obj/item/stack/sheet/animalhide/xeno)
|
||||
|
||||
|
||||
// Common materials.
|
||||
// For base materials, see materials.dm
|
||||
|
||||
// Plasteel. Lightweight, strong and contains some plasma too.
|
||||
/datum/export/stack/plasteel
|
||||
cost = 85
|
||||
message = "of plasteel"
|
||||
export_types = list(/obj/item/stack/sheet/plasteel)
|
||||
|
||||
// Reinforced Glass. Common building material. 1 glass + 0.5 metal, cost is rounded up.
|
||||
/datum/export/stack/rglass
|
||||
cost = 8
|
||||
message = "of reinforced glass"
|
||||
export_types = list(/obj/item/stack/sheet/rglass)
|
||||
|
||||
// Wood. Quite expensive in the grim and dark 26 century.
|
||||
/datum/export/stack/wood
|
||||
cost = 25
|
||||
unit_name = "wood plank"
|
||||
export_types = list(/obj/item/stack/sheet/mineral/wood)
|
||||
|
||||
// Cardboard. Cheap.
|
||||
/datum/export/stack/cardboard
|
||||
cost = 2
|
||||
message = "of cardboard"
|
||||
export_types = list(/obj/item/stack/sheet/cardboard)
|
||||
|
||||
// Sandstone. Literally dirt cheap.
|
||||
/datum/export/stack/sandstone
|
||||
cost = 1
|
||||
unit_name = "block"
|
||||
message = "of sandstone"
|
||||
export_types = list(/obj/item/stack/sheet/mineral/sandstone)
|
||||
|
||||
// Cable.
|
||||
/datum/export/stack/cable
|
||||
cost = 0.2
|
||||
unit_name = "cable piece"
|
||||
export_types = list(/obj/item/stack/cable_coil)
|
||||
|
||||
/datum/export/stack/cable/get_cost(O)
|
||||
return round(..())
|
||||
|
||||
|
||||
// Weird Stuff
|
||||
|
||||
// Alien Alloy. Like plasteel, but better.
|
||||
// Major players would pay a lot to get some, so you can get a lot of money from producing and selling those.
|
||||
// Just don't forget to fire all your production staff before the end of month.
|
||||
/datum/export/stack/abductor
|
||||
cost = 10000
|
||||
message = "of alien alloy"
|
||||
export_types = list(/obj/item/stack/sheet/mineral/abductor)
|
||||
|
||||
// Adamantine. Does not occur naurally.
|
||||
/datum/export/stack/adamantine
|
||||
unit_name = "bar"
|
||||
cost = 7500
|
||||
message = "of adamantine"
|
||||
export_types = list(/obj/item/stack/sheet/mineral/adamantine)
|
||||
|
||||
// Mythril. Does not occur naurally.
|
||||
/datum/export/stack/mythril
|
||||
cost = 15000
|
||||
message = "of mythril"
|
||||
export_types = list(/obj/item/stack/sheet/mineral/mythril)
|
||||
@@ -0,0 +1,118 @@
|
||||
// Various tools and handheld engineering devices.
|
||||
|
||||
/datum/export/toolbox
|
||||
cost = 4
|
||||
unit_name = "toolbox"
|
||||
export_types = list(/obj/item/weapon/storage/toolbox)
|
||||
|
||||
// mechanical toolbox: 22cr
|
||||
// emergency toolbox: 17-20cr
|
||||
// electrical toolbox: 36cr
|
||||
// robust: priceless
|
||||
|
||||
// Basic tools
|
||||
/datum/export/screwdriver
|
||||
cost = 2
|
||||
unit_name = "screwdriver"
|
||||
export_types = list(/obj/item/weapon/screwdriver)
|
||||
include_subtypes = FALSE
|
||||
|
||||
/datum/export/wrench
|
||||
cost = 2
|
||||
unit_name = "wrench"
|
||||
export_types = list(/obj/item/weapon/wrench)
|
||||
|
||||
/datum/export/crowbar
|
||||
cost = 2
|
||||
unit_name = "crowbar"
|
||||
export_types = list(/obj/item/weapon/crowbar)
|
||||
|
||||
/datum/export/wirecutters
|
||||
cost = 2
|
||||
unit_name = "pair"
|
||||
message = "of wirecutters"
|
||||
export_types = list(/obj/item/weapon/wirecutters)
|
||||
|
||||
|
||||
// Welding tools
|
||||
/datum/export/weldingtool
|
||||
cost = 5
|
||||
unit_name = "welding tool"
|
||||
export_types = list(/obj/item/weapon/weldingtool)
|
||||
include_subtypes = FALSE
|
||||
|
||||
/datum/export/weldingtool/emergency
|
||||
cost = 2
|
||||
unit_name = "emergency welding tool"
|
||||
export_types = list(/obj/item/weapon/weldingtool/mini)
|
||||
|
||||
/datum/export/weldingtool/industrial
|
||||
cost = 10
|
||||
unit_name = "industrial welding tool"
|
||||
export_types = list(/obj/item/weapon/weldingtool/largetank, /obj/item/weapon/weldingtool/hugetank)
|
||||
|
||||
|
||||
// Fire extinguishers
|
||||
/datum/export/extinguisher
|
||||
cost = 15
|
||||
unit_name = "fire extinguisher"
|
||||
export_types = list(/obj/item/weapon/extinguisher)
|
||||
include_subtypes = FALSE
|
||||
|
||||
/datum/export/extinguisher/mini
|
||||
cost = 2
|
||||
unit_name = "pocket fire extinguisher"
|
||||
export_types = list(/obj/item/weapon/extinguisher/mini)
|
||||
|
||||
|
||||
// Flashlights
|
||||
/datum/export/flashlight
|
||||
cost = 5
|
||||
unit_name = "flashlight"
|
||||
export_types = list(/obj/item/device/flashlight)
|
||||
include_subtypes = FALSE
|
||||
|
||||
/datum/export/flashlight/flare
|
||||
cost = 2
|
||||
unit_name = "flare"
|
||||
export_types = list(/obj/item/device/flashlight/flare)
|
||||
|
||||
/datum/export/flashlight/seclite
|
||||
cost = 10
|
||||
unit_name = "seclite"
|
||||
export_types = list(/obj/item/device/flashlight/seclite)
|
||||
|
||||
|
||||
// Analyzers and Scanners
|
||||
/datum/export/analyzer
|
||||
cost = 5
|
||||
unit_name = "analyzer"
|
||||
export_types = list(/obj/item/device/analyzer)
|
||||
|
||||
/datum/export/analyzer/t_scanner
|
||||
cost = 10
|
||||
unit_name = "t-ray scanner"
|
||||
export_types = list(/obj/item/device/t_scanner)
|
||||
|
||||
|
||||
/datum/export/radio
|
||||
cost = 5
|
||||
unit_name = "radio"
|
||||
export_types = list(/obj/item/device/radio)
|
||||
|
||||
|
||||
// High-tech tools.
|
||||
/datum/export/rcd
|
||||
cost = 100 // 15 metal -> 75 credits, +25 credits for production
|
||||
unit_name = "rapid construction device"
|
||||
export_types = list(/obj/item/weapon/rcd)
|
||||
|
||||
/datum/export/rcd_ammo
|
||||
cost = 15 // 1.5 metal, 1 glass -> 12.5 credits, +2.5 credits
|
||||
unit_name = "compressed matter cardridge"
|
||||
export_types = list(/datum/design/rcd_ammo)
|
||||
|
||||
/datum/export/rpd
|
||||
cost = 350 // 37.5 metal, 18.75 glass -> 281.25 credits, + some
|
||||
unit_name = "rapid piping device"
|
||||
export_types = list(/obj/item/weapon/pipe_dispenser)
|
||||
@@ -0,0 +1,72 @@
|
||||
// Weapon exports. Stun batons, disablers, etc.
|
||||
|
||||
/datum/export/weapon
|
||||
include_subtypes = FALSE
|
||||
|
||||
/datum/export/weapon/baton
|
||||
cost = 100
|
||||
unit_name = "stun baton"
|
||||
export_types = list(/obj/item/weapon/melee/baton)
|
||||
exclude_types = list(/obj/item/weapon/melee/baton/cattleprod)
|
||||
include_subtypes = TRUE
|
||||
|
||||
/datum/export/weapon/knife
|
||||
cost = 750
|
||||
unit_name = "combat knife"
|
||||
export_types = list(/obj/item/weapon/kitchen/knife/combat)
|
||||
|
||||
|
||||
/datum/export/weapon/taser
|
||||
cost = 250
|
||||
unit_name = "advanced taser"
|
||||
export_types = list(/obj/item/weapon/gun/energy/gun/advtaser)
|
||||
|
||||
/datum/export/weapon/laser
|
||||
cost = 250
|
||||
unit_name = "laser gun"
|
||||
export_types = list(/obj/item/weapon/gun/energy/laser)
|
||||
|
||||
/datum/export/weapon/disabler
|
||||
cost = 100
|
||||
unit_name = "disabler"
|
||||
export_types = list(/obj/item/weapon/gun/energy/disabler)
|
||||
|
||||
/datum/export/weapon/energy_gun
|
||||
cost = 900
|
||||
unit_name = "energy gun"
|
||||
export_types = list(/obj/item/weapon/gun/energy/gun)
|
||||
|
||||
|
||||
/datum/export/weapon/wt550
|
||||
cost = 1400
|
||||
unit_name = "WT-550 automatic rifle"
|
||||
export_types = list(/obj/item/weapon/gun/projectile/automatic/wt550)
|
||||
|
||||
/datum/export/weapon/shotgun
|
||||
cost = 350
|
||||
unit_name = "combat shotgun"
|
||||
export_types = list(/obj/item/weapon/gun/projectile/shotgun/automatic/combat)
|
||||
|
||||
|
||||
/datum/export/weapon/flashbang
|
||||
cost = 15
|
||||
unit_name = "flashbang grenade"
|
||||
export_types = list(/obj/item/weapon/grenade/flashbang)
|
||||
|
||||
/datum/export/weapon/teargas
|
||||
cost = 15
|
||||
unit_name = "tear gas grenade"
|
||||
export_types = list(/obj/item/weapon/grenade/chem_grenade/teargas)
|
||||
|
||||
|
||||
/datum/export/weapon/flash
|
||||
cost = 10
|
||||
unit_name = "handheld flash"
|
||||
export_types = list(/obj/item/device/assembly/flash)
|
||||
include_subtypes = TRUE
|
||||
|
||||
/datum/export/weapon/handcuffs
|
||||
cost = 3
|
||||
unit_name = "pair"
|
||||
message = "of handcuffs"
|
||||
export_types = list(/obj/item/weapon/restraints/handcuffs)
|
||||
@@ -0,0 +1,97 @@
|
||||
/obj/item/weapon/paper/manifest
|
||||
var/order_cost = 0
|
||||
var/order_id = 0
|
||||
var/errors = 0
|
||||
|
||||
/obj/item/weapon/paper/manifest/New(atom/A, id, cost)
|
||||
..()
|
||||
order_id = id
|
||||
order_cost = cost
|
||||
|
||||
if(prob(MANIFEST_ERROR_CHANCE))
|
||||
errors |= MANIFEST_ERROR_NAME
|
||||
if(prob(MANIFEST_ERROR_CHANCE))
|
||||
errors |= MANIFEST_ERROR_CONTENTS
|
||||
if(prob(MANIFEST_ERROR_CHANCE))
|
||||
errors |= MANIFEST_ERROR_ITEM
|
||||
|
||||
/obj/item/weapon/paper/manifest/proc/is_approved()
|
||||
return stamped && stamped.len && !is_denied()
|
||||
|
||||
/obj/item/weapon/paper/manifest/proc/is_denied()
|
||||
return stamped && (/obj/item/weapon/stamp/denied in stamped)
|
||||
|
||||
/datum/supply_order
|
||||
var/id
|
||||
var/orderer
|
||||
var/orderer_rank
|
||||
var/orderer_ckey
|
||||
var/reason
|
||||
var/datum/supply_pack/pack
|
||||
|
||||
/datum/supply_order/New(datum/supply_pack/pack, orderer, orderer_rank, orderer_ckey, reason)
|
||||
id = SSshuttle.ordernum++
|
||||
src.pack = pack
|
||||
src.orderer = orderer
|
||||
src.orderer_rank = orderer_rank
|
||||
src.orderer_ckey = orderer_ckey
|
||||
src.reason = reason
|
||||
|
||||
/datum/supply_order/proc/generateRequisition(turf/T)
|
||||
var/obj/item/weapon/paper/P = new(T)
|
||||
|
||||
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 += "Item: [pack.name]<br/>"
|
||||
P.info += "Access Restrictions: [get_access_desc(pack.access)]<br/>"
|
||||
P.info += "Requested by: [orderer]<br/>"
|
||||
P.info += "Rank: [orderer_rank]<br/>"
|
||||
P.info += "Comment: [reason]<br/>"
|
||||
|
||||
P.update_icon()
|
||||
return P
|
||||
|
||||
/datum/supply_order/proc/generateManifest(obj/structure/closet/crate/C)
|
||||
var/obj/item/weapon/paper/manifest/P = new(C, id, pack.cost)
|
||||
|
||||
var/station_name = (P.errors & MANIFEST_ERROR_NAME) ? new_station_name() : station_name()
|
||||
|
||||
P.name = "shipping manifest - #[id] ([pack.name])"
|
||||
P.info += "<h2>[command_name()] Shipping Manifest</h2>"
|
||||
P.info += "<hr/>"
|
||||
P.info += "Order #[id]<br/>"
|
||||
P.info += "Destination: [station_name]<br/>"
|
||||
P.info += "Item: [pack.name]<br/>"
|
||||
P.info += "Contents: <br/>"
|
||||
P.info += "<ul>"
|
||||
for(var/atom/movable/AM in C.contents - P)
|
||||
if((P.errors & MANIFEST_ERROR_CONTENTS))
|
||||
if(prob(50))
|
||||
P.info += "<li>[AM.name]</li>"
|
||||
else
|
||||
continue
|
||||
P.info += "<li>[AM.name]</li>"
|
||||
P.info += "</ul>"
|
||||
P.info += "<h4>Stamp below to confirm receipt of goods:</h4>"
|
||||
|
||||
P.update_icon()
|
||||
P.loc = C
|
||||
C.manifest = P
|
||||
C.update_icon()
|
||||
|
||||
return P
|
||||
|
||||
/datum/supply_order/proc/generate(turf/T)
|
||||
var/obj/structure/closet/crate/C = pack.generate(T)
|
||||
var/obj/item/weapon/paper/manifest/M = generateManifest(C)
|
||||
|
||||
if(M.errors & MANIFEST_ERROR_ITEM)
|
||||
if(istype(C, /obj/structure/closet/crate/secure) || istype(C, /obj/structure/closet/crate/large))
|
||||
M.errors &= ~MANIFEST_ERROR_ITEM
|
||||
else
|
||||
var/lost = max(round(C.contents.len / 10), 1)
|
||||
while(--lost >= 0)
|
||||
qdel(pick(C.contents))
|
||||
return C
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user