Coonflict fiiixeeess
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
|
||||
/datum/bounty/item/science/advanced_mop
|
||||
name = "Advanced Mop"
|
||||
description = "Excuse me. I'd like to request 17 credits for a push broom rebristling. Either that, or an advanced mop."
|
||||
description = "Excuse me. I'd like to request 17 cr for a push broom rebristling. Either that, or an advanced mop."
|
||||
reward = 3000
|
||||
wanted_types = list(/obj/item/mop/advanced)
|
||||
|
||||
|
||||
@@ -21,7 +21,9 @@ GLOBAL_LIST_EMPTY(bounties_list)
|
||||
// Called when the claim button is clicked. Override to provide fancy rewards.
|
||||
/datum/bounty/proc/claim()
|
||||
if(can_claim())
|
||||
SSshuttle.points += reward
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if(D)
|
||||
D.adjust_money(reward)
|
||||
claimed = TRUE
|
||||
|
||||
// If an item sent in the cargo shuttle can satisfy the bounty.
|
||||
@@ -126,11 +128,11 @@ GLOBAL_LIST_EMPTY(bounties_list)
|
||||
/proc/setup_bounties()
|
||||
|
||||
var/pick // instead of creating it a bunch let's go ahead and toss it here, we know we're going to use it for dynamics and subtypes!
|
||||
|
||||
|
||||
/********************************Subtype Gens********************************/
|
||||
var/list/easy_add_list_subtypes = list(/datum/bounty/item/assistant = 2,
|
||||
/datum/bounty/item/mech = 1,
|
||||
/datum/bounty/item/chef = 2,
|
||||
/datum/bounty/item/mech = 1,
|
||||
/datum/bounty/item/chef = 2,
|
||||
/datum/bounty/item/security = 1,
|
||||
/datum/bounty/virus = 1,
|
||||
/datum/bounty/item/engineering = 1,
|
||||
@@ -139,30 +141,30 @@ GLOBAL_LIST_EMPTY(bounties_list)
|
||||
/datum/bounty/item/botany = 2,
|
||||
/datum/bounty/item/silly = 1,
|
||||
/datum/bounty/item/gardencook = 1)
|
||||
|
||||
|
||||
for(var/the_type in easy_add_list_subtypes)
|
||||
for(var/i in 1 to easy_add_list_subtypes[the_type])
|
||||
pick = pick(subtypesof(the_type))
|
||||
try_add_bounty(new pick)
|
||||
|
||||
|
||||
/********************************Strict Type Gens********************************/
|
||||
var/list/easy_add_list_strict_types = list(/datum/bounty/reagent/simple_drink = 1,
|
||||
/datum/bounty/reagent/complex_drink = 1,
|
||||
/datum/bounty/reagent/chemical = 1)
|
||||
|
||||
|
||||
for(var/the_strict_type in easy_add_list_strict_types)
|
||||
for(var/i in 1 to easy_add_list_strict_types[the_strict_type])
|
||||
try_add_bounty(new the_strict_type)
|
||||
|
||||
|
||||
/********************************Dynamic Gens********************************/
|
||||
|
||||
|
||||
for(var/i in 0 to 1)
|
||||
if(prob(50))
|
||||
pick = pick(subtypesof(/datum/bounty/item/slime))
|
||||
else
|
||||
pick = pick(subtypesof(/datum/bounty/item/science))
|
||||
try_add_bounty(new pick)
|
||||
|
||||
|
||||
/********************************Cutoff for Non-Low Priority Bounties********************************/
|
||||
var/datum/bounty/B = pick(GLOB.bounties_list)
|
||||
B.mark_high_priority()
|
||||
@@ -172,7 +174,7 @@ GLOBAL_LIST_EMPTY(bounties_list)
|
||||
/datum/bounty/item/syndicate_documents,
|
||||
/datum/bounty/item/adamantine,
|
||||
/datum/bounty/more_bounties)
|
||||
|
||||
|
||||
for(var/low_priority_bounty in low_priority_strict_type_list)
|
||||
try_add_bounty(new low_priority_bounty)
|
||||
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
|
||||
if(!GLOB.bounties_list.len)
|
||||
setup_bounties()
|
||||
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
var/list/dat = list({"<a href='?src=[REF(src)];refresh=1'>Refresh</a>
|
||||
<a href='?src=[REF(src)];refresh=1;choice=Print'>Print Paper</a>
|
||||
<p>Credits: <b>[SSshuttle.points]</b></p>
|
||||
<p>Credits: <b>[D.account_balance]</b></p>
|
||||
<table style="text-align:center;" border="1" cellspacing="0" width="100%">
|
||||
<tr><th>Name</th><th>Description</th><th>Reward</th><th>Completion</th><th>Status</th></tr>"})
|
||||
for(var/datum/bounty/B in GLOB.bounties_list)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
desc = "Used to order supplies, approve requests, and control the shuttle."
|
||||
icon_screen = "supply"
|
||||
circuit = /obj/item/circuitboard/computer/cargo
|
||||
req_access = list(ACCESS_CARGO)
|
||||
ui_x = 780
|
||||
ui_y = 750
|
||||
|
||||
@@ -25,6 +26,7 @@
|
||||
desc = "Used to request supplies from cargo."
|
||||
icon_screen = "request"
|
||||
circuit = /obj/item/circuitboard/computer/cargo/request
|
||||
req_access = list()
|
||||
requestonly = TRUE
|
||||
|
||||
/obj/machinery/computer/cargo/Initialize()
|
||||
@@ -49,6 +51,7 @@
|
||||
. |= EXPORT_EMAG
|
||||
|
||||
/obj/machinery/computer/cargo/emag_act(mob/user)
|
||||
. = ..()
|
||||
if(obj_flags & EMAGGED)
|
||||
return
|
||||
if(user)
|
||||
@@ -62,7 +65,9 @@
|
||||
var/obj/item/circuitboard/computer/cargo/board = circuit
|
||||
board.contraband = TRUE
|
||||
board.obj_flags |= EMAGGED
|
||||
req_access = list()
|
||||
update_static_data(user)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/cargo/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, \
|
||||
datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
@@ -74,9 +79,12 @@
|
||||
/obj/machinery/computer/cargo/ui_data()
|
||||
var/list/data = list()
|
||||
data["location"] = SSshuttle.supply.getStatusText()
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if(D)
|
||||
data["points"] = D.account_balance
|
||||
data["away"] = SSshuttle.supply.getDockedId() == "supply_away"
|
||||
data["self_paid"] = self_paid
|
||||
data["docked"] = SSshuttle.supply.mode == SHUTTLE_IDLE
|
||||
data["points"] = SSshuttle.points
|
||||
data["loan"] = !!SSshuttle.shuttle_loan
|
||||
data["loan_dispatched"] = SSshuttle.shuttle_loan && SSshuttle.shuttle_loan.dispatched
|
||||
var/message = "Remember to stamp and send back the supply manifests."
|
||||
@@ -92,6 +100,7 @@
|
||||
"cost" = SO.pack.cost,
|
||||
"id" = SO.id,
|
||||
"orderer" = SO.orderer,
|
||||
"paid" = !isnull(SO.paying_account) //paid by requester
|
||||
))
|
||||
|
||||
data["requests"] = list()
|
||||
@@ -131,6 +140,9 @@
|
||||
/obj/machinery/computer/cargo/ui_act(action, params, datum/tgui/ui)
|
||||
if(..())
|
||||
return
|
||||
if(!allowed(usr))
|
||||
to_chat(usr, "<span class='notice'>Access denied.</span>")
|
||||
return
|
||||
switch(action)
|
||||
if("send")
|
||||
if(!SSshuttle.supply.canMove())
|
||||
@@ -182,19 +194,33 @@
|
||||
name = usr.real_name
|
||||
rank = "Silicon"
|
||||
|
||||
var/datum/bank_account/account
|
||||
if(self_paid && ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
var/obj/item/card/id/id_card = H.get_idcard(TRUE)
|
||||
if(!istype(id_card))
|
||||
say("No ID card detected.")
|
||||
return
|
||||
account = id_card.registered_account
|
||||
if(!istype(account))
|
||||
say("Invalid bank account.")
|
||||
return
|
||||
|
||||
var/reason = ""
|
||||
if(requestonly)
|
||||
if(requestonly && !self_paid)
|
||||
reason = stripped_input("Reason:", name, "")
|
||||
if(isnull(reason) || ..())
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
var/datum/supply_order/SO = new(pack, name, rank, ckey, reason)
|
||||
var/datum/supply_order/SO = new(pack, name, rank, ckey, reason, account)
|
||||
SO.generateRequisition(T)
|
||||
if(requestonly)
|
||||
if(requestonly && !self_paid)
|
||||
SSshuttle.requestlist += SO
|
||||
else
|
||||
SSshuttle.shoppinglist += SO
|
||||
if(self_paid)
|
||||
say("Order processed. The price will be charged to [account.account_holder]'s bank account on delivery.")
|
||||
. = TRUE
|
||||
if("remove")
|
||||
var/id = text2num(params["id"])
|
||||
@@ -224,6 +250,9 @@
|
||||
if("denyall")
|
||||
SSshuttle.requestlist.Cut()
|
||||
. = TRUE
|
||||
if("toggleprivate")
|
||||
self_paid = !self_paid
|
||||
. = TRUE
|
||||
if(.)
|
||||
post_signal("supply")
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
|
||||
var/list/total_value = list() //export instance => total value of sold objects
|
||||
var/list/reagents_volume = list()//export reagents => into the total volume of the object sold
|
||||
var/list/reagents_value = list()//export reagents => into the reagent type total value.
|
||||
var/list/exported_atoms_ref = list() //if they're not deleted they go in here for use.
|
||||
|
||||
// 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)
|
||||
|
||||
@@ -98,17 +98,19 @@
|
||||
/obj/machinery/computer/cargo/express/ui_data(mob/user)
|
||||
var/canBeacon = beacon && (isturf(beacon.loc) || ismob(beacon.loc))//is the beacon in a valid location?
|
||||
var/list/data = list()
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if(D)
|
||||
data["points"] = D.account_balance
|
||||
data["locked"] = locked//swipe an ID to unlock
|
||||
data["siliconUser"] = hasSiliconAccessInArea(user)
|
||||
data["beaconzone"] = beacon ? get_area(beacon) : ""//where is the beacon located? outputs in the tgui
|
||||
data["usingBeacon"] = usingBeacon //is the mode set to deliver to the beacon or the cargobay?
|
||||
data["canBeacon"] = !usingBeacon || canBeacon //is the mode set to beacon delivery, and is the beacon in a valid location?
|
||||
data["canBuyBeacon"] = cooldown <= 0 && SSshuttle.points >= BEACON_COST
|
||||
data["canBuyBeacon"] = cooldown <= 0 && D.account_balance >= BEACON_COST
|
||||
data["beaconError"] = usingBeacon && !canBeacon ? "(BEACON ERROR)" : ""//changes button text to include an error alert if necessary
|
||||
data["hasBeacon"] = beacon != null//is there a linked beacon?
|
||||
data["beaconName"] = beacon ? beacon.name : "No Beacon Found"
|
||||
data["printMsg"] = cooldown > 0 ? "Print Beacon for [BEACON_COST] credits ([cooldown])" : "Print Beacon for [BEACON_COST] credits"//buttontext for printing beacons
|
||||
data["points"] = SSshuttle.points
|
||||
data["supplies"] = list()
|
||||
message = "Sales are near-instantaneous - please choose carefully."
|
||||
if(SSshuttle.supplyBlocked)
|
||||
@@ -129,6 +131,9 @@
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/cargo/express/ui_act(action, params, datum/tgui/ui)
|
||||
if(!allowed(usr))
|
||||
to_chat(usr, "<span class='notice'>Access denied.</span>")
|
||||
return
|
||||
switch(action)
|
||||
if("LZCargo")
|
||||
usingBeacon = FALSE
|
||||
@@ -139,13 +144,14 @@
|
||||
if (beacon)
|
||||
beacon.update_status(SP_READY) //turns on the beacon's ready light
|
||||
if("printBeacon")
|
||||
if (SSshuttle.points >= BEACON_COST)
|
||||
cooldown = 10//a ~ten second cooldown for printing beacons to prevent spam
|
||||
var/obj/item/supplypod_beacon/C = new /obj/item/supplypod_beacon(drop_location())
|
||||
C.link_console(src, usr)//rather than in beacon's Initialize(), we can assign the computer to the beacon by reusing this proc)
|
||||
printed_beacons++//printed_beacons starts at 0, so the first one out will be called beacon # 1
|
||||
beacon.name = "Supply Pod Beacon #[printed_beacons]"
|
||||
SSshuttle.points -= BEACON_COST
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if(D)
|
||||
if(D.adjust_money(-BEACON_COST))
|
||||
cooldown = 10//a ~ten second cooldown for printing beacons to prevent spam
|
||||
var/obj/item/supplypod_beacon/C = new /obj/item/supplypod_beacon(drop_location())
|
||||
C.link_console(src, usr)//rather than in beacon's Initialize(), we can assign the computer to the beacon by reusing this proc)
|
||||
printed_beacons++//printed_beacons starts at 0, so the first one out will be called beacon # 1
|
||||
beacon.name = "Supply Pod Beacon #[printed_beacons]"
|
||||
|
||||
if("add")//Generate Supply Order first
|
||||
var/id = text2path(params["id"])
|
||||
@@ -165,8 +171,12 @@
|
||||
var/reason = ""
|
||||
var/list/empty_turfs
|
||||
var/datum/supply_order/SO = new(pack, name, rank, ckey, reason)
|
||||
var/points_to_check
|
||||
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
if(D)
|
||||
points_to_check = D.account_balance
|
||||
if(!(obj_flags & EMAGGED))
|
||||
if(SO.pack.cost <= SSshuttle.points)
|
||||
if(SO.pack.cost <= points_to_check)
|
||||
var/LZ
|
||||
if (istype(beacon) && usingBeacon)//prioritize beacons over landing in cargobay
|
||||
LZ = get_turf(beacon)
|
||||
@@ -183,14 +193,14 @@
|
||||
CHECK_TICK
|
||||
if(empty_turfs && empty_turfs.len)
|
||||
LZ = pick(empty_turfs)
|
||||
if (SO.pack.cost <= SSshuttle.points && LZ)//we need to call the cost check again because of the CHECK_TICK call
|
||||
SSshuttle.points -= SO.pack.cost
|
||||
if (SO.pack.cost <= points_to_check && LZ)//we need to call the cost check again because of the CHECK_TICK call
|
||||
D.adjust_money(-SO.pack.cost)
|
||||
SSblackbox.record_feedback("nested tally", "cargo_imports", 1, list("[SO.pack.cost]", "[SO.pack.name]"))
|
||||
new /obj/effect/abstract/DPtarget(LZ, podType, SO)
|
||||
. = TRUE
|
||||
update_icon()
|
||||
else
|
||||
if(SO.pack.cost * (0.72*MAX_EMAG_ROCKETS) <= SSshuttle.points) // bulk discount :^)
|
||||
if(SO.pack.cost * (0.72*MAX_EMAG_ROCKETS) <= points_to_check) // bulk discount :^)
|
||||
landingzone = GLOB.areas_by_type[pick(GLOB.the_station_areas)] //override default landing zone
|
||||
for(var/turf/open/floor/T in landingzone.contents)
|
||||
if(is_blocked_turf(T))
|
||||
@@ -198,7 +208,7 @@
|
||||
LAZYADD(empty_turfs, T)
|
||||
CHECK_TICK
|
||||
if(empty_turfs && empty_turfs.len)
|
||||
SSshuttle.points -= SO.pack.cost * (0.72*MAX_EMAG_ROCKETS)
|
||||
D.adjust_money(-(SO.pack.cost * (0.72*MAX_EMAG_ROCKETS)))
|
||||
SSblackbox.record_feedback("nested tally", "cargo_imports", MAX_EMAG_ROCKETS, list("[SO.pack.cost * 0.72]", "[SO.pack.name]"))
|
||||
SO.generateRequisition(get_turf(src))
|
||||
for(var/i in 1 to MAX_EMAG_ROCKETS)
|
||||
|
||||
@@ -28,14 +28,16 @@
|
||||
var/orderer_ckey
|
||||
var/reason
|
||||
var/datum/supply_pack/pack
|
||||
var/datum/bank_account/paying_account
|
||||
|
||||
/datum/supply_order/New(datum/supply_pack/pack, orderer, orderer_rank, orderer_ckey, reason)
|
||||
/datum/supply_order/New(datum/supply_pack/pack, orderer, orderer_rank, orderer_ckey, reason, paying_account)
|
||||
id = SSshuttle.ordernum++
|
||||
src.pack = pack
|
||||
src.orderer = orderer
|
||||
src.orderer_rank = orderer_rank
|
||||
src.orderer_ckey = orderer_ckey
|
||||
src.reason = reason
|
||||
src.paying_account = paying_account
|
||||
|
||||
/datum/supply_order/proc/generateRequisition(turf/T)
|
||||
var/obj/item/paper/P = new(T)
|
||||
@@ -47,6 +49,8 @@
|
||||
P.info += "Item: [pack.name]<br/>"
|
||||
P.info += "Access Restrictions: [get_access_desc(pack.access)]<br/>"
|
||||
P.info += "Requested by: [orderer]<br/>"
|
||||
if(paying_account)
|
||||
P.info += "Paid by: [paying_account.account_holder]<br/>"
|
||||
P.info += "Rank: [orderer_rank]<br/>"
|
||||
P.info += "Comment: [reason]<br/>"
|
||||
|
||||
@@ -61,6 +65,9 @@
|
||||
P.name = "shipping manifest - #[id] ([pack.name])"
|
||||
P.info += "<h2>[command_name()] Shipping Manifest</h2>"
|
||||
P.info += "<hr/>"
|
||||
if(paying_account)
|
||||
P.info += "Direct purchase from [paying_account.account_holder]<br/>"
|
||||
P.name += " - Purchased by [paying_account.account_holder]"
|
||||
P.info += "Order #[id]<br/>"
|
||||
P.info += "Destination: [station_name]<br/>"
|
||||
P.info += "Item: [pack.name]<br/>"
|
||||
@@ -81,7 +88,7 @@
|
||||
return P
|
||||
|
||||
/datum/supply_order/proc/generate(atom/A)
|
||||
var/obj/structure/closet/crate/C = pack.generate(A)
|
||||
var/obj/structure/closet/crate/C = pack.generate(A, paying_account)
|
||||
var/obj/item/paper/fluff/jobs/cargo/manifest/M = generateManifest(C)
|
||||
|
||||
if(M.errors & MANIFEST_ERROR_ITEM)
|
||||
|
||||
@@ -16,16 +16,20 @@
|
||||
var/DropPodOnly = FALSE //only usable by the Bluespace Drop Pod via the express cargo console
|
||||
var/admin_spawned = FALSE //Can only an admin spawn this crate?
|
||||
|
||||
/datum/supply_pack/proc/generate(atom/A)
|
||||
var/obj/structure/closet/crate/C = new crate_type(A)
|
||||
C.name = crate_name
|
||||
/datum/supply_pack/proc/generate(atom/A, datum/bank_account/paying_account)
|
||||
var/obj/structure/closet/crate/C
|
||||
if(paying_account)
|
||||
C = new /obj/structure/closet/crate/secure/owned(A, paying_account)
|
||||
C.name = "[crate_name] - Purchased by [paying_account.account_holder]"
|
||||
else
|
||||
C = new crate_type(A)
|
||||
C.name = crate_name
|
||||
if(access)
|
||||
C.req_access = list(access)
|
||||
if(access_any)
|
||||
C.req_one_access = access_any
|
||||
|
||||
fill(C)
|
||||
|
||||
return C
|
||||
|
||||
/datum/supply_pack/proc/fill(obj/structure/closet/crate/C)
|
||||
|
||||
@@ -170,8 +170,7 @@
|
||||
cost = 7500
|
||||
contraband = TRUE
|
||||
contains = list(/obj/item/reagent_containers/food/snacks/rationpack,
|
||||
/obj/item/ammo_box/a762,
|
||||
/obj/item/storage/toolbox/ammo,
|
||||
/obj/item/ammo_box/magazine/m10mm/rifle,
|
||||
/obj/item/clothing/suit/armor/vest/russian,
|
||||
/obj/item/clothing/head/helmet/rus_helmet,
|
||||
/obj/item/clothing/shoes/russian,
|
||||
@@ -181,7 +180,7 @@
|
||||
/obj/item/clothing/mask/russian_balaclava,
|
||||
/obj/item/clothing/head/helmet/rus_ushanka,
|
||||
/obj/item/clothing/suit/armor/vest/russian_coat,
|
||||
/obj/item/gun/ballistic/shotgun/boltaction)
|
||||
/obj/item/gun/ballistic/automatic/surplus)
|
||||
crate_name = "surplus military crate"
|
||||
|
||||
/datum/supply_pack/security/armory/russian/fill(obj/structure/closet/crate/C)
|
||||
|
||||
@@ -99,11 +99,11 @@
|
||||
crate_type = /obj/structure/closet/crate/internals
|
||||
|
||||
/datum/supply_pack/security/russianmosin
|
||||
name = "Russian Minutemen Gear"
|
||||
desc = "An old russian Minutemen crate, comes with a full russian outfit, a mosin and a stripper clip."
|
||||
name = "Russian Partisan Gear"
|
||||
desc = "An old russian partisan equipment crate, comes with a full russian outfit, a loaded surplus rifle and a second magazine."
|
||||
contraband = TRUE
|
||||
access = FALSE
|
||||
cost = 6500 //
|
||||
cost = 6500
|
||||
contains = list(/obj/item/clothing/suit/armor/navyblue/russian,
|
||||
/obj/item/clothing/shoes/combat,
|
||||
/obj/item/clothing/head/ushanka,
|
||||
@@ -111,8 +111,8 @@
|
||||
/obj/item/clothing/head/helmet/alt,
|
||||
/obj/item/clothing/gloves/tackler/combat/insulated,
|
||||
/obj/item/clothing/mask/gas,
|
||||
/obj/item/gun/ballistic/shotgun/boltaction,
|
||||
/obj/item/ammo_box/a762)
|
||||
/obj/item/ammo_box/magazine/m10mm/rifle,
|
||||
/obj/item/gun/ballistic/automatic/surplus)
|
||||
crate_name = "surplus russian gear"
|
||||
crate_type = /obj/structure/closet/crate/internals
|
||||
|
||||
|
||||
Reference in New Issue
Block a user