Merge pull request #15860 from shellspeed1/public-bounties
Port of public bounties and the sales tagger from tg.
This commit is contained in:
@@ -102,26 +102,29 @@
|
||||
wanted_types = list(/obj/item/shard)
|
||||
|
||||
/datum/bounty/item/assistant/comfy_chair
|
||||
name = "Comfy Chairs"
|
||||
name = "Comfortable Chairs"
|
||||
description = "Commander Pat is unhappy with his chair. He claims it hurts his back. Ship some alternatives out to humor him."
|
||||
reward = 900
|
||||
required_count = 5
|
||||
wanted_types = list(/obj/structure/chair/comfy)
|
||||
|
||||
// /datum/bounty/item/assistant/geranium
|
||||
// name = "Geraniums"
|
||||
// description = "Commander Zot has the hots for Commander Zena. Send a shipment of geraniums - her favorite flower - and he'll happily reward you."
|
||||
// reward = 1000
|
||||
// required_count = 3
|
||||
// wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/poppy/geranium)
|
||||
/*
|
||||
/datum/bounty/item/assistant/geranium
|
||||
name = "Geraniums"
|
||||
description = "Commander Zot has the hots for Commander Zena. Send a shipment of geraniums - her favorite flower - and he'll happily reward you."
|
||||
reward = 1000
|
||||
required_count = 3
|
||||
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/poppy/geranium)
|
||||
include_subtypes = FALSE
|
||||
*/
|
||||
|
||||
// /datum/bounty/item/assistant/poppy
|
||||
// name = "Poppies"
|
||||
// description = "Commander Zot really wants to sweep Security Officer Olivia off her feet. Send a shipment of Poppies - her favorite flower - and he'll happily reward you."
|
||||
// reward = 1000
|
||||
// required_count = 3
|
||||
// wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/poppy)
|
||||
// include_subtypes = FALSE
|
||||
/datum/bounty/item/assistant/poppy
|
||||
name = "Poppies"
|
||||
description = "Commander Zot really wants to sweep Security Officer Olivia off her feet. Send a shipment of Poppies - her favorite flower - and he'll happily reward you."
|
||||
reward = 1000
|
||||
required_count = 3
|
||||
wanted_types = list(/obj/item/reagent_containers/food/snacks/grown/poppy)
|
||||
include_subtypes = FALSE
|
||||
|
||||
/datum/bounty/item/assistant/shadyjims
|
||||
name = "Shady Jim's"
|
||||
@@ -156,11 +159,6 @@
|
||||
required_count = 3
|
||||
wanted_types = list(/obj/item/reagent_containers/food/snacks/monkeycube)
|
||||
*/
|
||||
/datum/bounty/item/assistant/chainsaw
|
||||
name = "Chainsaw"
|
||||
description = "The chef at CentCom is having trouble butchering her animals. She requests one chainsaw, please."
|
||||
reward = 2500
|
||||
wanted_types = list(/obj/item/chainsaw)
|
||||
|
||||
/datum/bounty/item/assistant/ied
|
||||
name = "IED"
|
||||
@@ -169,30 +167,12 @@
|
||||
required_count = 3
|
||||
wanted_types = list(/obj/item/grenade/iedcasing)
|
||||
|
||||
/datum/bounty/item/assistant/bonfire
|
||||
name = "Lit Bonfire"
|
||||
description = "Space heaters are malfunctioning and the cargo crew of Central Command is starting to feel cold. Ship a lit bonfire to warm them up."
|
||||
reward = 5000
|
||||
wanted_types = list(/obj/structure/bonfire)
|
||||
|
||||
/datum/bounty/item/assistant/bonfire/applies_to(obj/O)
|
||||
if(!..())
|
||||
return FALSE
|
||||
var/obj/structure/bonfire/B = O
|
||||
return !!B.burning
|
||||
|
||||
/datum/bounty/item/assistant/corgimeat
|
||||
name = "Raw Corgi Meat"
|
||||
description = "The Syndicate recently stole all of CentCom's corgi meat. Ship out a replacement immediately."
|
||||
reward = 3000
|
||||
wanted_types = list(/obj/item/reagent_containers/food/snacks/meat/slab/corgi)
|
||||
|
||||
/datum/bounty/item/assistant/tail_whip
|
||||
name = "Nine Tails whip"
|
||||
description = "Commander Jackson is looking for a fine addition to her exotic weapons collection. She will reward you handsomely for either a Cat or Liz o' Nine Tails."
|
||||
reward = 4000
|
||||
wanted_types = list(/obj/item/melee/chainofcommand/tailwhip)
|
||||
|
||||
/datum/bounty/item/assistant/bolas
|
||||
name = "Bolas"
|
||||
description = "Centcom's chef has lost their mind. They're streaking naked though the halls, greased up with butter and cooking oil. Send some bola's so we can capture them."
|
||||
@@ -215,7 +195,7 @@
|
||||
wanted_types = list(/obj/item/storage/belt/utility)
|
||||
|
||||
/datum/bounty/item/assistant/gasmasks
|
||||
name = "Gas Masks"
|
||||
name = "Gas Masks"
|
||||
description = "The good news is that we have more miasma than we'll ever need. The bad news is, somone opened the release valve on the canisters. Ship us some gas masks!"
|
||||
reward = 1250
|
||||
required_count = 4
|
||||
|
||||
@@ -228,3 +228,14 @@
|
||||
multiplier = 6
|
||||
bonus_desc = "Under no circumstances mention this shipment to security."
|
||||
foodtype = "\"meal\""
|
||||
|
||||
/datum/bounty/item/botany/bonfire
|
||||
name = "Lit Bonfire"
|
||||
description = "Space heaters are malfunctioning and the cargo crew of Central Command is starting to feel cold. Grow some logs and Ship a lit bonfire to warm them up."
|
||||
wanted_types = list(/obj/structure/bonfire)
|
||||
|
||||
/datum/bounty/item/botany/bonfire/applies_to(obj/O)
|
||||
if(!..())
|
||||
return FALSE
|
||||
var/obj/structure/bonfire/B = O
|
||||
return !!B.burning
|
||||
|
||||
@@ -137,3 +137,10 @@
|
||||
reward = 2250
|
||||
required_count = 3
|
||||
wanted_types = list(/obj/item/reagent_containers/food/snacks/bbqribs)
|
||||
|
||||
/datum/bounty/item/chef/corgifarming //Butchering is a chef's job.
|
||||
name = "Corgi Hides"
|
||||
description = "Admiral Weinstein's space yacht needs new upholstery. A dozen Corgi furs should do just fine."
|
||||
reward = 30000 //that's a lot of dead dogs
|
||||
required_count = 12
|
||||
wanted_types = list(/obj/item/stack/sheet/animalhide/corgi)
|
||||
|
||||
@@ -89,3 +89,15 @@
|
||||
description = "Station 24 is being overrun by hordes of angry Mothpeople. They are requesting the ultimate bug zapper."
|
||||
reward = 50000 //requires 14k credits of purchases, not to mention cooperation with engineering/heads of staff to set up inside the cramped shuttle
|
||||
wanted_types = list(/obj/singularity/energy_ball)
|
||||
|
||||
/datum/bounty/item/engineering/emitter
|
||||
name = "Emitter"
|
||||
description = "We think there may be a defect in your station's emitter designs, based on the sheer number of delaminations your sector seems to see. Ship us one of yours."
|
||||
reward = 2500
|
||||
wanted_types = list(/obj/machinery/power/emitter)
|
||||
|
||||
/datum/bounty/item/engineering/hydro_tray
|
||||
name = "Hydroponics Tray"
|
||||
description = "The lab technicians are trying to figure out how to lower the power drain of hydroponics trays, but we fried our last one. Mind building one for us?"
|
||||
reward = 2000
|
||||
wanted_types = list(/obj/machinery/hydroponics/constructable)
|
||||
|
||||
@@ -125,3 +125,15 @@
|
||||
reward = 2250
|
||||
required_count = 5
|
||||
wanted_types = list(/obj/item/defibrillator)
|
||||
|
||||
/datum/bounty/item/medical/chainsaw
|
||||
name = "Chainsaw"
|
||||
description = "A CMO at CentCom is having trouble operating on golems. She requests one chainsaw, please."
|
||||
reward = 2500
|
||||
wanted_types = list(/obj/item/chainsaw)
|
||||
|
||||
/datum/bounty/item/medical/tail_whip //Like the cat tail bounties, with more processing.
|
||||
name = "Nine Tails whip"
|
||||
description = "Commander Jackson is looking for a fine addition to her exotic weapons collection. She will reward you handsomely for either a Cat or Liz o' Nine Tails."
|
||||
reward = 4000
|
||||
wanted_types = list(/obj/item/melee/chainofcommand/tailwhip)
|
||||
|
||||
@@ -52,3 +52,37 @@
|
||||
reward = 2750
|
||||
required_count = 3
|
||||
wanted_types = list(/obj/item/firing_pin/test_range)
|
||||
|
||||
/datum/bounty/item/security/pepperspray
|
||||
name = "Pepperspray"
|
||||
description = "We've been having a bad run of riots on Space Station 76. We could use some new pepperspray cans."
|
||||
reward = 3000
|
||||
required_count = 4
|
||||
wanted_types = list(/obj/item/reagent_containers/spray/pepper)
|
||||
|
||||
/datum/bounty/item/security/prison_clothes
|
||||
name = "Prison Uniforms"
|
||||
description = "Terragov has been unable to source any new prisoner uniforms, so if you have any spares, we'll take them off your hands."
|
||||
reward = 2000
|
||||
required_count = 4
|
||||
wanted_types = list(/obj/item/clothing/under/rank/prisoner)
|
||||
|
||||
/datum/bounty/item/security/plates
|
||||
name = "License Plates"
|
||||
description = "As a result of a bad clown car crash, we could use an advance on some of your prisoner's license plates."
|
||||
reward = 1000
|
||||
required_count = 10
|
||||
wanted_types = list(/obj/item/stack/license_plates/filled)
|
||||
|
||||
/datum/bounty/item/security/earmuffs
|
||||
name = "Earmuffs"
|
||||
description = "Central Command is getting tired of your station's messages. They've ordered that you ship some earmuffs to lessen the annoyance."
|
||||
reward = 1000
|
||||
wanted_types = list(/obj/item/clothing/ears/earmuffs)
|
||||
|
||||
/datum/bounty/item/security/handcuffs
|
||||
name = "Handcuffs"
|
||||
description = "A large influx of escaped convicts have arrived at Central Command. Now is the perfect time to ship out spare handcuffs (or restraints)."
|
||||
reward = 1000
|
||||
required_count = 5
|
||||
wanted_types = list(/obj/item/restraints/handcuffs)
|
||||
|
||||
@@ -76,8 +76,13 @@ GLOBAL_LIST_EMPTY(bounties_list)
|
||||
return TRUE
|
||||
|
||||
// Returns a new bounty of random type, but does not add it to GLOB.bounties_list.
|
||||
/proc/random_bounty()
|
||||
switch(rand(1, 15))
|
||||
/proc/random_bounty(var/guided = 0)
|
||||
var/bounty_num
|
||||
if(guided && (guided != CIV_JOB_RANDOM))
|
||||
bounty_num = guided
|
||||
else
|
||||
bounty_num = rand(1,13)
|
||||
switch(bounty_num)
|
||||
if(1)
|
||||
var/subtype = pick(subtypesof(/datum/bounty/item/assistant))
|
||||
return new subtype
|
||||
@@ -100,27 +105,27 @@ GLOBAL_LIST_EMPTY(bounties_list)
|
||||
var/subtype = pick(subtypesof(/datum/bounty/virus))
|
||||
return new subtype
|
||||
if(8)
|
||||
var/subtype = pick(subtypesof(/datum/bounty/item/science))
|
||||
return new subtype
|
||||
if(9)
|
||||
if(rand(2) == 1)
|
||||
var/subtype = pick(subtypesof(/datum/bounty/item/science))
|
||||
return new subtype
|
||||
var/subtype = pick(subtypesof(/datum/bounty/item/slime))
|
||||
return new subtype
|
||||
if(10)
|
||||
if(9)
|
||||
var/subtype = pick(subtypesof(/datum/bounty/item/engineering))
|
||||
return new subtype
|
||||
if(11)
|
||||
if(10)
|
||||
var/subtype = pick(subtypesof(/datum/bounty/item/mining))
|
||||
return new subtype
|
||||
if(12)
|
||||
if(11)
|
||||
var/subtype = pick(subtypesof(/datum/bounty/item/medical))
|
||||
return new subtype
|
||||
if(13)
|
||||
if(12)
|
||||
var/subtype = pick(subtypesof(/datum/bounty/item/botany))
|
||||
return new subtype
|
||||
if(14)
|
||||
if(13)
|
||||
var/subtype = pick(subtypesof(/datum/bounty/item/silly))
|
||||
return new subtype
|
||||
if(15)
|
||||
if(14)
|
||||
var/subtype = pick(subtypesof(/datum/bounty/item/gardencook))
|
||||
return new subtype
|
||||
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
#define PRINTER_TIMEOUT 10
|
||||
|
||||
/obj/machinery/computer/bounty
|
||||
name = "\improper Nanotrasen bounty console"
|
||||
desc = "Used to check and claim bounties offered by Nanotrasen"
|
||||
icon_screen = "bounty"
|
||||
circuit = /obj/item/circuitboard/computer/bounty
|
||||
light_color = "#E2853D"//orange
|
||||
var/printer_ready = 0 //cooldown var
|
||||
var/static/datum/bank_account/cargocash
|
||||
|
||||
/obj/machinery/computer/bounty/Initialize(mapload)
|
||||
. = ..()
|
||||
printer_ready = world.time + PRINTER_TIMEOUT
|
||||
cargocash = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
|
||||
/obj/machinery/computer/bounty/proc/print_paper()
|
||||
new /obj/item/paper/bounty_printout(loc)
|
||||
|
||||
/obj/item/paper/bounty_printout
|
||||
name = "paper - Bounties"
|
||||
|
||||
/obj/item/paper/bounty_printout/Initialize(mapload)
|
||||
. = ..()
|
||||
info = "<h2>Nanotrasen Cargo Bounties</h2></br>"
|
||||
update_icon()
|
||||
|
||||
for(var/datum/bounty/B in GLOB.bounties_list)
|
||||
if(B.claimed)
|
||||
continue
|
||||
info += {"<h3>[B.name]</h3>
|
||||
<ul><li>Reward: [B.reward_string()]</li>
|
||||
<li>Completed: [B.completion_string()]</li></ul>"}
|
||||
|
||||
/obj/machinery/computer/bounty/ui_interact(mob/user, datum/tgui/ui)
|
||||
if(!GLOB.bounties_list.len)
|
||||
setup_bounties()
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "CargoBountyConsole", name)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/bounty/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
var/list/bountyinfo = list()
|
||||
for(var/datum/bounty/B in GLOB.bounties_list)
|
||||
bountyinfo += list(list("name" = B.name, "description" = B.description, "reward_string" = B.reward_string(), "completion_string" = B.completion_string() , "claimed" = B.claimed, "can_claim" = B.can_claim(), "priority" = B.high_priority, "bounty_ref" = REF(B)))
|
||||
data["stored_cash"] = cargocash.account_balance
|
||||
data["bountydata"] = bountyinfo
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/bounty/ui_act(action,params)
|
||||
if(..())
|
||||
return
|
||||
switch(action)
|
||||
if("ClaimBounty")
|
||||
var/datum/bounty/cashmoney = locate(params["bounty"]) in GLOB.bounties_list
|
||||
if(cashmoney)
|
||||
cashmoney.claim()
|
||||
return TRUE
|
||||
if("Print")
|
||||
if(printer_ready < world.time)
|
||||
printer_ready = world.time + PRINTER_TIMEOUT
|
||||
print_paper()
|
||||
return
|
||||
@@ -43,5 +43,24 @@
|
||||
to_chat(user, "<span class='notice'>Scanned [O], value: <b>[price]</b> credits[O.contents.len ? " (contents included)" : ""].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Scanned [O], no export value.</span>")
|
||||
if(bounty_ship_item_and_contents(O, dry_run=TRUE))
|
||||
to_chat(user, "<span class='notice'>Scanned item is eligible for one or more bounties.</span>")
|
||||
|
||||
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/scan_human = user
|
||||
if(istype(O, /obj/item/bounty_cube))
|
||||
var/obj/item/bounty_cube/cube = O
|
||||
|
||||
if(!istype(get_area(cube), /area/shuttle/supply))
|
||||
to_chat(user, "<span class='warning'>Shuttle placement not detected. Handling tip not registered.</span>")
|
||||
|
||||
else if(cube.bounty_handler_account)
|
||||
to_chat(user, "<span class='warning'>Bank account for handling tip already registered!</span>")
|
||||
|
||||
else if(scan_human.get_bank_account() && cube.GetComponent(/datum/component/pricetag))
|
||||
var/datum/component/pricetag/pricetag = cube.GetComponent(/datum/component/pricetag)
|
||||
cube.bounty_handler_account = scan_human.get_bank_account()
|
||||
pricetag.payees[cube.bounty_handler_account] += cube.handler_tip
|
||||
cube.bounty_handler_account.bank_card_talk("Bank account for [price ? "<b>[price * cube.handler_tip]</b> credit " : ""]handling tip successfully registered.")
|
||||
cube.bounty_holder_account.bank_card_talk("<b>[cube]</b> was scanned in \the <b>[get_area(cube)]</b> by <b>[scan_human] ([scan_human.job])</b>.")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Bank account not detected. Handling tip not registered.</span>")
|
||||
|
||||
@@ -33,6 +33,8 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
|
||||
if(!GLOB.exports_list.len)
|
||||
setupExports()
|
||||
|
||||
var/profit_ratio = 1 //Percentage that gets sent to the seller, rest goes to cargo.
|
||||
|
||||
var/list/contents = AM.GetAllContents()
|
||||
|
||||
var/datum/export_report/report = external_report
|
||||
@@ -47,7 +49,7 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
|
||||
if(!E)
|
||||
continue
|
||||
if(E.applies_to(thing, allowed_categories, apply_elastic))
|
||||
sold = E.sell_object(thing, report, dry_run, allowed_categories , apply_elastic)
|
||||
sold = E.sell_object(thing, report, dry_run, allowed_categories , apply_elastic, profit_ratio)
|
||||
report.exported_atoms += " [thing.name]"
|
||||
break
|
||||
if(thing.reagents?.value_multiplier)
|
||||
@@ -138,9 +140,19 @@ Credit dupes that require a lot of manual work shouldn't be removed, unless they
|
||||
var/the_cost = get_cost(O, allowed_categories , apply_elastic)
|
||||
var/amount = get_amount(O)
|
||||
|
||||
var/profit_ratio = 0
|
||||
|
||||
if(amount <=0 || the_cost <=0)
|
||||
return FALSE
|
||||
|
||||
if(dry_run == FALSE)
|
||||
if(SEND_SIGNAL(O, COMSIG_ITEM_SOLD, item_value = get_cost(O, allowed_categories , apply_elastic)) & COMSIG_ITEM_SPLIT_VALUE)
|
||||
profit_ratio = SEND_SIGNAL(O, COMSIG_ITEM_SPLIT_PROFIT)
|
||||
the_cost = the_cost*((100-profit_ratio)/100)
|
||||
else
|
||||
profit_ratio = SEND_SIGNAL(O, COMSIG_ITEM_SPLIT_PROFIT)
|
||||
the_cost = the_cost*((100-profit_ratio)/100)
|
||||
|
||||
report.total_value[src] += the_cost
|
||||
|
||||
if(istype(O, /datum/export/material))
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/datum/export/bounty_box
|
||||
cost = 1
|
||||
k_elasticity = 0 //Bounties are non-elastic funds.
|
||||
unit_name = "completed bounty cube"
|
||||
export_types = list(/obj/item/bounty_cube)
|
||||
|
||||
/datum/export/bounty_box/get_cost(obj/item/bounty_cube/cube, allowed_categories, apply_elastic)
|
||||
return cube.bounty_value + (cube.bounty_value * (cube.speed_bonus / 100))
|
||||
Reference in New Issue
Block a user