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))
|
||||
@@ -10,6 +10,9 @@
|
||||
var/account_id
|
||||
var/being_dumped = FALSE //pink levels are rising
|
||||
var/withdrawDelay = 0
|
||||
var/datum/bounty/civilian_bounty
|
||||
var/list/datum/bounty/bounties
|
||||
COOLDOWN_DECLARE(bounty_timer)
|
||||
|
||||
/datum/bank_account/New(newname, job)
|
||||
if(add_to_accounts)
|
||||
@@ -100,6 +103,47 @@
|
||||
if(M.can_hear())
|
||||
to_chat(M, "[icon2html(icon_source, M)] <span class='notice'>[message]</span>")
|
||||
|
||||
/**
|
||||
* Returns a string with the civilian bounty's description on it.
|
||||
*/
|
||||
/datum/bank_account/proc/bounty_text()
|
||||
if(!civilian_bounty)
|
||||
return FALSE
|
||||
if(istype(civilian_bounty, /datum/bounty/item))
|
||||
var/datum/bounty/item/item = civilian_bounty
|
||||
return item.description
|
||||
if(istype(civilian_bounty, /datum/bounty/reagent))
|
||||
var/datum/bounty/reagent/chemical = civilian_bounty
|
||||
return chemical.description
|
||||
|
||||
/**
|
||||
* Returns the required item count, or required chemical units required to submit a bounty.
|
||||
*/
|
||||
/datum/bank_account/proc/bounty_num()
|
||||
if(!civilian_bounty)
|
||||
return FALSE
|
||||
if(istype(civilian_bounty, /datum/bounty/item))
|
||||
var/datum/bounty/item/item = civilian_bounty
|
||||
return "[item.shipped_count]/[item.required_count]"
|
||||
if(istype(civilian_bounty, /datum/bounty/reagent))
|
||||
var/datum/bounty/reagent/chemical = civilian_bounty
|
||||
return "[chemical.shipped_volume]/[chemical.required_volume] u"
|
||||
|
||||
/**
|
||||
* Produces the value of the account's civilian bounty reward, if able.
|
||||
*/
|
||||
/datum/bank_account/proc/bounty_value()
|
||||
if(!civilian_bounty)
|
||||
return FALSE
|
||||
return civilian_bounty.reward
|
||||
|
||||
/**
|
||||
* Performs house-cleaning on variables when a civilian bounty is replaced, or, when a bounty is claimed.
|
||||
*/
|
||||
/datum/bank_account/proc/reset_bounty()
|
||||
civilian_bounty = null
|
||||
COOLDOWN_RESET(src, bounty_timer)
|
||||
|
||||
/datum/bank_account/department
|
||||
account_holder = "Guild Credit Agency"
|
||||
var/department_id = "REPLACE_ME"
|
||||
|
||||
@@ -251,8 +251,8 @@
|
||||
/obj/machinery/piratepad
|
||||
name = "cargo hold pad"
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
icon_state = "lpad-idle-o"
|
||||
var/idle_state = "lpad-idle-o"
|
||||
icon_state = "lpad-idle-off"
|
||||
var/idle_state = "lpad-idle"
|
||||
var/warmup_state = "lpad-idle"
|
||||
var/sending_state = "lpad-beam"
|
||||
var/cargo_hold_id
|
||||
@@ -264,6 +264,17 @@
|
||||
I.buffer = src
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/piratepad/screwdriver_act(mob/living/user, obj/item/screwdriver/screw)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return default_deconstruction_screwdriver(user, "lpad-idle-open", "lpad-idle-off", screw)
|
||||
|
||||
/obj/machinery/piratepad/crowbar_act(mob/living/user, obj/item/tool)
|
||||
. = ..()
|
||||
default_deconstruction_crowbar(tool)
|
||||
return TRUE
|
||||
|
||||
|
||||
/obj/machinery/computer/piratepad_control
|
||||
name = "cargo hold control terminal"
|
||||
var/status_report = "Ready for delivery."
|
||||
@@ -274,6 +285,8 @@
|
||||
var/datum/export_report/total_report
|
||||
var/sending_timer
|
||||
var/cargo_hold_id
|
||||
///Reference to the specific pad that the control computer is linked up to.
|
||||
var/datum/weakref/pad_ref
|
||||
|
||||
/obj/machinery/computer/piratepad_control/Initialize(mapload)
|
||||
..()
|
||||
@@ -283,7 +296,7 @@
|
||||
. = ..()
|
||||
if (istype(I) && istype(I.buffer,/obj/machinery/piratepad))
|
||||
to_chat(user, "<span class='notice'>You link [src] with [I.buffer] in [I] buffer.</span>")
|
||||
pad = I.buffer
|
||||
pad_ref = WEAKREF(I.buffer)
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/piratepad_control/LateInitialize()
|
||||
@@ -291,10 +304,11 @@
|
||||
if(cargo_hold_id)
|
||||
for(var/obj/machinery/piratepad/P in GLOB.machines)
|
||||
if(P.cargo_hold_id == cargo_hold_id)
|
||||
pad = P
|
||||
pad_ref = WEAKREF(P)
|
||||
return
|
||||
else
|
||||
pad = locate() in range(4,src)
|
||||
pad_ref = WEAKREF(pad)
|
||||
|
||||
/obj/machinery/computer/piratepad_control/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
@@ -305,7 +319,7 @@
|
||||
/obj/machinery/computer/piratepad_control/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
data["points"] = points
|
||||
data["pad"] = pad ? TRUE : FALSE
|
||||
data["pad"] = pad_ref?.resolve() ? TRUE : FALSE
|
||||
data["sending"] = sending
|
||||
data["status_report"] = status_report
|
||||
return data
|
||||
@@ -314,7 +328,7 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(!pad)
|
||||
if(!pad_ref?.resolve())
|
||||
return
|
||||
|
||||
switch(action)
|
||||
@@ -335,6 +349,7 @@
|
||||
status_report = "Predicted value: "
|
||||
var/value = 0
|
||||
var/datum/export_report/ex = new
|
||||
var/obj/machinery/piratepad/pad = pad_ref?.resolve()
|
||||
for(var/atom/movable/AM in get_turf(pad))
|
||||
if(AM == pad)
|
||||
continue
|
||||
@@ -353,6 +368,7 @@
|
||||
return
|
||||
|
||||
var/datum/export_report/ex = new
|
||||
var/obj/machinery/piratepad/pad = pad_ref?.resolve()
|
||||
|
||||
for(var/atom/movable/AM in get_turf(pad))
|
||||
if(AM == pad)
|
||||
@@ -390,6 +406,15 @@
|
||||
sending = FALSE
|
||||
|
||||
/obj/machinery/computer/piratepad_control/proc/start_sending()
|
||||
var/obj/machinery/piratepad/pad = pad_ref?.resolve()
|
||||
if(!pad)
|
||||
status_report = "No pad detected. Build or link a pad."
|
||||
pad.audible_message(span_notice("[pad] beeps."))
|
||||
return
|
||||
if(pad?.panel_open)
|
||||
status_report = "Please screwdrive pad closed to send. "
|
||||
pad.audible_message(span_notice("[pad] beeps."))
|
||||
return
|
||||
if(sending)
|
||||
return
|
||||
sending = TRUE
|
||||
|
||||
@@ -71,6 +71,8 @@
|
||||
|
||||
var/display_order = JOB_DISPLAY_ORDER_DEFAULT
|
||||
|
||||
var/bounty_types = CIV_JOB_BASIC
|
||||
|
||||
//If a job complies with dresscodes, loadout items will not be equipped instead of the job's outfit, instead placing the items into the player's backpack.
|
||||
var/dresscodecompliant = TRUE
|
||||
// How much threat this job is worth in dynamic. Is subtracted if the player's not an antag, added if they are.
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
ACCESS_ENGINE_EQUIP, ACCESS_EMERGENCY_STORAGE, ACCESS_CONSTRUCTION, ACCESS_MINERAL_STOREROOM)
|
||||
paycheck = PAYCHECK_MEDIUM
|
||||
paycheck_department = ACCOUNT_ENG
|
||||
bounty_types = CIV_JOB_ENG
|
||||
|
||||
starting_modifiers = list(/datum/skill_modifier/job/level/wiring, /datum/skill_modifier/job/affinity/wiring)
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
minimal_access = list(ACCESS_BAR, ACCESS_MINERAL_STOREROOM)
|
||||
paycheck = PAYCHECK_EASY
|
||||
paycheck_department = ACCOUNT_SRV
|
||||
bounty_types = CIV_JOB_DRINK
|
||||
display_order = JOB_DISPLAY_ORDER_BARTENDER
|
||||
threat = 0.5
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
minimal_access = list(ACCESS_HYDROPONICS, ACCESS_MORGUE, ACCESS_MINERAL_STOREROOM)
|
||||
paycheck = PAYCHECK_EASY
|
||||
paycheck_department = ACCOUNT_SRV
|
||||
bounty_types = CIV_JOB_GROW
|
||||
display_order = JOB_DISPLAY_ORDER_BOTANIST
|
||||
threat = 1.5 // lol powergame
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
paycheck_department = ACCOUNT_CAR
|
||||
|
||||
display_order = JOB_DISPLAY_ORDER_CARGO_TECHNICIAN
|
||||
bounty_types = CIV_JOB_RANDOM
|
||||
threat = 0.2
|
||||
|
||||
/datum/outfit/job/cargo_tech
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
minimal_access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_CHEMISTRY, ACCESS_MINERAL_STOREROOM)
|
||||
paycheck = PAYCHECK_MEDIUM
|
||||
paycheck_department = ACCOUNT_MED
|
||||
bounty_types = CIV_JOB_CHEM
|
||||
|
||||
display_order = JOB_DISPLAY_ORDER_CHEMIST
|
||||
threat = 1.5
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
ACCESS_CE, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_TCOMSAT, ACCESS_MINERAL_STOREROOM)
|
||||
paycheck = PAYCHECK_COMMAND
|
||||
paycheck_department = ACCOUNT_ENG
|
||||
bounty_types = CIV_JOB_ENG
|
||||
|
||||
starting_modifiers = list(/datum/skill_modifier/job/level/wiring/expert, /datum/skill_modifier/job/affinity/wiring)
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
ACCESS_KEYCARD_AUTH, ACCESS_SEC_DOORS, ACCESS_MAINT_TUNNELS)
|
||||
paycheck = PAYCHECK_COMMAND
|
||||
paycheck_department = ACCOUNT_MED
|
||||
bounty_types = CIV_JOB_MED
|
||||
|
||||
display_order = JOB_DISPLAY_ORDER_CHIEF_MEDICAL_OFFICER
|
||||
blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity)
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
minimal_access = list(ACCESS_KITCHEN, ACCESS_MORGUE, ACCESS_MINERAL_STOREROOM)
|
||||
paycheck = PAYCHECK_EASY
|
||||
paycheck_department = ACCOUNT_SRV
|
||||
bounty_types = CIV_JOB_CHEF
|
||||
|
||||
display_order = JOB_DISPLAY_ORDER_COOK
|
||||
threat = 0.2
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
minimal_access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_GENETICS, ACCESS_CLONING, ACCESS_RESEARCH, ACCESS_MINERAL_STOREROOM)
|
||||
paycheck = PAYCHECK_MEDIUM
|
||||
paycheck_department = ACCOUNT_MED
|
||||
bounty_types = CIV_JOB_SCI
|
||||
|
||||
display_order = JOB_DISPLAY_ORDER_GENETICIST
|
||||
threat = 1.5
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
ACCESS_HOP, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY)
|
||||
paycheck = PAYCHECK_COMMAND
|
||||
paycheck_department = ACCOUNT_SRV
|
||||
bounty_types = CIV_JOB_RANDOM
|
||||
|
||||
display_order = JOB_DISPLAY_ORDER_HEAD_OF_PERSONNEL
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
ACCESS_HEADS, ACCESS_HOS, ACCESS_RC_ANNOUNCE, ACCESS_KEYCARD_AUTH, ACCESS_GATEWAY, ACCESS_MAINT_TUNNELS, ACCESS_MINERAL_STOREROOM)
|
||||
paycheck = PAYCHECK_COMMAND
|
||||
paycheck_department = ACCOUNT_SEC
|
||||
bounty_types = CIV_JOB_SEC
|
||||
|
||||
|
||||
display_order = JOB_DISPLAY_ORDER_HEAD_OF_SECURITY
|
||||
blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/nonviolent, /datum/quirk/paraplegic, /datum/quirk/blindness, /datum/quirk/monophobia, /datum/quirk/insanity)
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
minimal_access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_SURGERY, ACCESS_CLONING, ACCESS_MINERAL_STOREROOM)
|
||||
paycheck = PAYCHECK_MEDIUM
|
||||
paycheck_department = ACCOUNT_MED
|
||||
bounty_types = CIV_JOB_MED
|
||||
|
||||
display_order = JOB_DISPLAY_ORDER_MEDICAL_DOCTOR
|
||||
threat = 0.5
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
minimal_access = list(ACCESS_MEDICAL, ACCESS_MORGUE, ACCESS_CLONING, ACCESS_MINERAL_STOREROOM, ACCESS_MAINT_TUNNELS)
|
||||
paycheck = PAYCHECK_MEDIUM
|
||||
paycheck_department = ACCOUNT_MED
|
||||
bounty_types = CIV_JOB_MED
|
||||
|
||||
display_order = JOB_DISPLAY_ORDER_PARAMEDIC
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
ACCESS_SEC_DOORS, ACCESS_HEADS)
|
||||
paycheck = PAYCHECK_HARD //They can already buy stuff using cargo budget, don't give em a command-level paycheck. //alright i'll agree to that -qweq
|
||||
paycheck_department = ACCOUNT_CAR
|
||||
bounty_types = CIV_JOB_RANDOM
|
||||
|
||||
display_order = JOB_DISPLAY_ORDER_QUARTERMASTER
|
||||
blacklisted_quirks = list(/datum/quirk/mute, /datum/quirk/brainproblems, /datum/quirk/insanity)
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
ACCESS_TECH_STORAGE, ACCESS_MINISAT, ACCESS_MAINT_TUNNELS, ACCESS_NETWORK)
|
||||
paycheck = PAYCHECK_COMMAND
|
||||
paycheck_department = ACCOUNT_SCI
|
||||
bounty_types = CIV_JOB_SCI
|
||||
|
||||
display_order = JOB_DISPLAY_ORDER_RESEARCH_DIRECTOR
|
||||
starting_modifiers = list(/datum/skill_modifier/job/level/wiring)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
minimal_access = list(ACCESS_ROBOTICS, ACCESS_TECH_STORAGE, ACCESS_MORGUE, ACCESS_RESEARCH, ACCESS_MINERAL_STOREROOM)
|
||||
paycheck = PAYCHECK_MEDIUM
|
||||
paycheck_department = ACCOUNT_SCI
|
||||
bounty_types = CIV_JOB_ROBO
|
||||
|
||||
starting_modifiers = list(/datum/skill_modifier/job/level/wiring, /datum/skill_modifier/job/affinity/wiring)
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
minimal_access = list(ACCESS_TOX, ACCESS_TOX_STORAGE, ACCESS_RESEARCH, ACCESS_XENOBIOLOGY, ACCESS_MINERAL_STOREROOM)
|
||||
paycheck = PAYCHECK_MEDIUM
|
||||
paycheck_department = ACCOUNT_SCI
|
||||
bounty_types = CIV_JOB_SCI
|
||||
starting_modifiers = list(/datum/skill_modifier/job/level/wiring/basic)
|
||||
display_order = JOB_DISPLAY_ORDER_SCIENTIST
|
||||
threat = 1.2
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
minimal_access = list(ACCESS_SECURITY, ACCESS_SEC_DOORS, ACCESS_BRIG, ACCESS_COURT, ACCESS_WEAPONS, ACCESS_ENTER_GENPOP, ACCESS_LEAVE_GENPOP, ACCESS_MINERAL_STOREROOM) // See /datum/job/officer/get_access()
|
||||
paycheck = PAYCHECK_HARD
|
||||
paycheck_department = ACCOUNT_SEC
|
||||
bounty_types = CIV_JOB_SEC
|
||||
|
||||
mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM)
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
minimal_access = list(ACCESS_MINING, ACCESS_MINING_STATION, ACCESS_MAILSORTING, ACCESS_MINERAL_STOREROOM)
|
||||
paycheck = PAYCHECK_EASY ///Not necessarily easy itself, but it can be trivial to make lot of cash on this job.
|
||||
paycheck_department = ACCOUNT_CAR
|
||||
bounty_types = CIV_JOB_MINE
|
||||
|
||||
display_order = JOB_DISPLAY_ORDER_SHAFT_MINER
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
ACCESS_EXTERNAL_AIRLOCKS, ACCESS_CONSTRUCTION, ACCESS_TCOMSAT, ACCESS_MINERAL_STOREROOM)
|
||||
paycheck = PAYCHECK_MEDIUM
|
||||
paycheck_department = ACCOUNT_ENG
|
||||
bounty_types = CIV_JOB_ENG
|
||||
|
||||
starting_modifiers = list(/datum/skill_modifier/job/level/wiring, /datum/skill_modifier/job/affinity/wiring)
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
minimal_access = list(ACCESS_MEDICAL, ACCESS_VIROLOGY, ACCESS_MINERAL_STOREROOM)
|
||||
paycheck = PAYCHECK_MEDIUM
|
||||
paycheck_department = ACCOUNT_MED
|
||||
bounty_types = CIV_JOB_VIRO
|
||||
|
||||
display_order = JOB_DISPLAY_ORDER_VIROLOGIST
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
paycheck = PAYCHECK_HARD
|
||||
paycheck_department = ACCOUNT_SEC
|
||||
bounty_types = CIV_JOB_SEC
|
||||
|
||||
mind_traits = list(TRAIT_LAW_ENFORCEMENT_METABOLISM)
|
||||
|
||||
|
||||
@@ -1,146 +0,0 @@
|
||||
/**********************Mint**************************/
|
||||
|
||||
|
||||
/obj/machinery/mineral/mint
|
||||
name = "coin press"
|
||||
icon = 'icons/obj/economy.dmi'
|
||||
icon_state = "coinpress0"
|
||||
density = TRUE
|
||||
input_dir = EAST
|
||||
ui_x = 300
|
||||
ui_y = 250
|
||||
needs_item_input = TRUE
|
||||
var/obj/item/storage/bag/money/bag_to_use
|
||||
var/produced_coins = 0 // how many coins the machine has made in it's last cycle
|
||||
var/processing = FALSE
|
||||
var/chosen = /datum/material/iron //which material will be used to make coins
|
||||
|
||||
|
||||
/obj/machinery/mineral/mint/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/material_container, list(
|
||||
/datum/material/iron,
|
||||
/datum/material/plasma,
|
||||
/datum/material/silver,
|
||||
/datum/material/gold,
|
||||
/datum/material/uranium,
|
||||
/datum/material/titanium,
|
||||
/datum/material/diamond,
|
||||
/datum/material/bananium,
|
||||
/datum/material/adamantine,
|
||||
/datum/material/mythril,
|
||||
/datum/material/plastic,
|
||||
/datum/material/runite
|
||||
), MINERAL_MATERIAL_AMOUNT * 75, FALSE, /obj/item/stack)
|
||||
chosen = SSmaterials.GetMaterialRef(chosen)
|
||||
|
||||
|
||||
/obj/machinery/mineral/mint/pickup_item(datum/source, atom/movable/target, atom/oldLoc)
|
||||
if(QDELETED(target))
|
||||
return
|
||||
if(!istype(target, /obj/item/stack))
|
||||
return
|
||||
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
var/obj/item/stack/S = target
|
||||
|
||||
if(materials.insert_item(S))
|
||||
qdel(S)
|
||||
|
||||
/obj/machinery/mineral/mint/process()
|
||||
if(processing)
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
var/datum/material/M = chosen
|
||||
|
||||
if(!M)
|
||||
processing = FALSE
|
||||
icon_state = "coinpress0"
|
||||
return
|
||||
|
||||
icon_state = "coinpress1"
|
||||
var/coin_mat = MINERAL_MATERIAL_AMOUNT
|
||||
|
||||
for(var/sheets in 1 to 2)
|
||||
if(materials.use_amount_mat(coin_mat, chosen))
|
||||
for(var/coin_to_make in 1 to 5)
|
||||
create_coins()
|
||||
else
|
||||
var/found_new = FALSE
|
||||
for(var/datum/material/inserted_material in materials.materials)
|
||||
var/amount = materials.get_material_amount(inserted_material)
|
||||
|
||||
if(amount)
|
||||
chosen = inserted_material
|
||||
found_new = TRUE
|
||||
|
||||
if(!found_new)
|
||||
processing = FALSE
|
||||
else
|
||||
STOP_PROCESSING(SSmachines, src)
|
||||
icon_state = "coinpress0"
|
||||
|
||||
/obj/machinery/mineral/mint/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "Mint", name)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/mineral/mint/ui_data()
|
||||
var/list/data = list()
|
||||
data["inserted_materials"] = list()
|
||||
data["chosen_material"] = null
|
||||
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
for(var/datum/material/inserted_material in materials.materials)
|
||||
var/amount = materials.get_material_amount(inserted_material)
|
||||
if(!amount)
|
||||
continue
|
||||
data["inserted_materials"] += list(list(
|
||||
"material" = inserted_material.name,
|
||||
"amount" = amount,
|
||||
))
|
||||
if(chosen == inserted_material)
|
||||
data["chosen_material"] = inserted_material.name
|
||||
|
||||
data["produced_coins"] = produced_coins
|
||||
data["processing"] = processing
|
||||
|
||||
return data;
|
||||
|
||||
/obj/machinery/mineral/mint/ui_act(action, params, datum/tgui/ui)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(action == "startpress")
|
||||
if (!processing)
|
||||
produced_coins = 0
|
||||
processing = TRUE
|
||||
START_PROCESSING(SSmachines, src)
|
||||
return TRUE
|
||||
if (action == "stoppress")
|
||||
processing = FALSE
|
||||
STOP_PROCESSING(SSmachines, src)
|
||||
return TRUE
|
||||
if (action == "changematerial")
|
||||
var/datum/component/material_container/materials = GetComponent(/datum/component/material_container)
|
||||
for(var/datum/material/mat in materials.materials)
|
||||
if (params["material_name"] == mat.name)
|
||||
chosen = mat
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/mineral/mint/proc/create_coins()
|
||||
set waitfor = FALSE
|
||||
var/turf/T = get_step(src,output_dir)
|
||||
var/temp_list = list()
|
||||
temp_list[chosen] = 400
|
||||
if(T)
|
||||
var/obj/item/O = new /obj/item/coin(src)
|
||||
O.set_custom_materials(temp_list)
|
||||
if(QDELETED(bag_to_use) || (bag_to_use.loc != T) || !SEND_SIGNAL(bag_to_use, COMSIG_TRY_STORAGE_INSERT, O, null, TRUE)) //important to send the signal so we don't overfill the bag.
|
||||
bag_to_use = new(src) //make a new bag if we can't find or use the old one.
|
||||
unload_mineral(bag_to_use) //just forcemove memes.
|
||||
O.forceMove(bag_to_use) //don't bother sending the signal, the new bag is empty and all that.
|
||||
|
||||
SSblackbox.record_feedback("amount", "coins_minted", 1)
|
||||
produced_coins++
|
||||
CHECK_TICK
|
||||
@@ -123,17 +123,16 @@
|
||||
to_chat(src, span_warning("You can't bring yourself to use a ranged weapon!"))
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/proc/get_bank_account()
|
||||
//Returns the bank account of an ID the user may be holding.
|
||||
/mob/living/proc/get_bank_account()
|
||||
RETURN_TYPE(/datum/bank_account)
|
||||
var/datum/bank_account/account
|
||||
var/obj/item/card/id/I = get_idcard()
|
||||
|
||||
if(I && I.registered_account)
|
||||
if(I?.registered_account)
|
||||
account = I.registered_account
|
||||
return account
|
||||
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/can_see_reagents()
|
||||
. = ..()
|
||||
if(.) //No need to run through all of this if it's already true.
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/datum/computer_file/program/bounty
|
||||
filename = "bounty"
|
||||
filedesc = "Nanotrasen Bounty Hunter"
|
||||
program_icon_state = "bounty"
|
||||
extended_desc = "A basic interface for supply personnel to check and claim bounties."
|
||||
requires_ntnet = TRUE
|
||||
transfer_access = ACCESS_CARGO
|
||||
size = 10
|
||||
tgui_id = "NtosBountyConsole"
|
||||
///cooldown var for printing paper sheets.
|
||||
var/printer_ready = 0
|
||||
///The cargo account for grabbing the cargo account's credits.
|
||||
var/static/datum/bank_account/cargocash
|
||||
|
||||
/datum/computer_file/program/bounty/proc/print_paper()
|
||||
new /obj/item/paper/bounty_printout(get_turf(computer))
|
||||
|
||||
/datum/computer_file/program/bounty/ui_interact(mob/user, datum/tgui/ui)
|
||||
if(!GLOB.bounties_list.len)
|
||||
setup_bounties()
|
||||
printer_ready = world.time + PRINTER_TIMEOUT
|
||||
cargocash = SSeconomy.get_dep_account(ACCOUNT_CAR)
|
||||
. = ..()
|
||||
|
||||
/datum/computer_file/program/bounty/ui_data(mob/user)
|
||||
var/list/data = get_header_data()
|
||||
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
|
||||
|
||||
/datum/computer_file/program/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
|
||||
@@ -7,9 +7,15 @@
|
||||
mouse_drag_pointer = MOUSE_ACTIVE_POINTER
|
||||
var/giftwrapped = FALSE
|
||||
var/sortTag = 0
|
||||
var/obj/item/barcode/sticker
|
||||
|
||||
/obj/structure/bigDelivery/interact(mob/user)
|
||||
to_chat(user, "<span class='notice'>You start to unwrap the package...</span>")
|
||||
if(!do_after(user, 15, target = user))
|
||||
return
|
||||
playsound(src.loc, 'sound/items/poster_ripped.ogg', 50, 1)
|
||||
new /obj/effect/decal/cleanable/wrapping(get_turf(user))
|
||||
unwrap_contents()
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/bigDelivery/Destroy()
|
||||
@@ -18,6 +24,11 @@
|
||||
AM.forceMove(T)
|
||||
return ..()
|
||||
|
||||
/obj/structure/bigDelivery/examine(mob/user)
|
||||
. = ..()
|
||||
if(sticker)
|
||||
. += "There's a barcode attached to the side."
|
||||
|
||||
/obj/structure/bigDelivery/contents_explosion(severity, target, origin)
|
||||
for(var/atom/movable/AM in contents)
|
||||
AM.ex_act(severity, target, origin)
|
||||
@@ -53,6 +64,47 @@
|
||||
icon_state = "gift[icon_state]"
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need more paper!</span>")
|
||||
else if(istype(W, /obj/item/sales_tagger))
|
||||
var/obj/item/sales_tagger/tagger = W
|
||||
if(sticker)
|
||||
to_chat(user, "<span class='warning'>This package already has a barcode attached!</span>")
|
||||
return
|
||||
if(!(tagger.payments_acc))
|
||||
to_chat(user, "<span class='warning'>Swipe an ID on [tagger] first!</span>")
|
||||
return
|
||||
if(tagger.paper_count <= 0)
|
||||
to_chat(user, "<span class='warning'>[tagger] is out of paper!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] attaches a barcode to [src].</span>", "<span class='notice'>You attach a barcode to [src].</span>")
|
||||
tagger.paper_count -= 1
|
||||
sticker = new /obj/item/barcode(src)
|
||||
sticker.payments_acc = tagger.payments_acc //new tag gets the tagger's current account.
|
||||
sticker.cut_multiplier = tagger.cut_multiplier //same, but for the percentage taken.
|
||||
|
||||
var/list/wrap_contents = src.GetAllContents()
|
||||
for(var/obj/I in wrap_contents)
|
||||
I.AddComponent(/datum/component/pricetag, sticker.payments_acc, tagger.cut_multiplier)
|
||||
var/overlaystring = "[icon_state]_tag"
|
||||
if(giftwrapped)
|
||||
overlaystring = copytext(overlaystring, 5)
|
||||
add_overlay(overlaystring)
|
||||
else if(istype(W, /obj/item/barcode))
|
||||
var/obj/item/barcode/stickerA = W
|
||||
if(sticker)
|
||||
to_chat(user, "<span class='warning'>This package already has a barcode attached!</span>")
|
||||
return
|
||||
if(!(stickerA.payments_acc))
|
||||
to_chat(user, "<span class='warning'>This barcode seems to be invalid. Guess it's trash now.</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
to_chat(user, "<span class='warning'>For some reason, you can't attach [W]!</span>")
|
||||
return
|
||||
sticker = stickerA
|
||||
var/overlaystring = "[icon_state]_tag"
|
||||
if(giftwrapped)
|
||||
overlaystring = copytext_char(overlaystring, 5) //5 == length("gift") + 1
|
||||
add_overlay(overlaystring)
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -68,11 +120,18 @@
|
||||
to_chat(user, "<span class='notice'>You successfully removed [O]'s wrapping !</span>")
|
||||
O.forceMove(loc)
|
||||
playsound(src.loc, 'sound/items/poster_ripped.ogg', 50, 1)
|
||||
new /obj/effect/decal/cleanable/wrapping(get_turf(user))
|
||||
unwrap_contents()
|
||||
qdel(src)
|
||||
else
|
||||
if(user.loc == src) //so we don't get the message if we resisted multiple times and succeeded.
|
||||
to_chat(user, "<span class='warning'>You fail to remove [O]'s wrapping!</span>")
|
||||
|
||||
/obj/structure/bigDelivery/proc/unwrap_contents()
|
||||
if(!sticker)
|
||||
return
|
||||
for(var/obj/I in src.GetAllContents())
|
||||
SEND_SIGNAL(I, COMSIG_STRUCTURE_UNWRAPPED)
|
||||
|
||||
/obj/item/smallDelivery
|
||||
name = "parcel"
|
||||
@@ -81,17 +140,23 @@
|
||||
icon_state = "deliverypackage3"
|
||||
var/giftwrapped = 0
|
||||
var/sortTag = 0
|
||||
var/obj/item/barcode/sticker
|
||||
|
||||
/obj/item/smallDelivery/contents_explosion(severity, target, origin)
|
||||
for(var/atom/movable/AM in contents)
|
||||
AM.ex_act(severity, target, origin)
|
||||
|
||||
/obj/item/smallDelivery/attack_self(mob/user)
|
||||
to_chat(user, "<span class='notice'>You start to unwrap the package...</span>")
|
||||
if(!do_after(user, 15, target = user))
|
||||
return
|
||||
user.temporarilyRemoveItemFromInventory(src, TRUE)
|
||||
unwrap_contents()
|
||||
for(var/X in contents)
|
||||
var/atom/movable/AM = X
|
||||
user.put_in_hands(AM)
|
||||
playsound(src.loc, 'sound/items/poster_ripped.ogg', 50, 1)
|
||||
new /obj/effect/decal/cleanable/wrapping(get_turf(user))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/smallDelivery/attack_self_tk(mob/user)
|
||||
@@ -106,6 +171,8 @@
|
||||
var/atom/movable/AM = X
|
||||
AM.forceMove(src.loc)
|
||||
playsound(src.loc, 'sound/items/poster_ripped.ogg', 50, 1)
|
||||
new /obj/effect/decal/cleanable/wrapping(get_turf(user))
|
||||
unwrap_contents()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/smallDelivery/attackby(obj/item/W, mob/user, params)
|
||||
@@ -140,6 +207,59 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need more paper!</span>")
|
||||
|
||||
else if(istype(W, /obj/item/sales_tagger))
|
||||
var/obj/item/sales_tagger/tagger = W
|
||||
if(sticker)
|
||||
to_chat(user, "<span class='warning'>This package already has a barcode attached!</span>")
|
||||
return
|
||||
if(!(tagger.payments_acc))
|
||||
to_chat(user, "<span class='warning'>Swipe an ID on [tagger] first!</span>")
|
||||
return
|
||||
if(tagger.paper_count <= 0)
|
||||
to_chat(user, "<span class='warning'>[tagger] is out of paper!</span>")
|
||||
return
|
||||
user.visible_message("<span class='notice'>[user] attaches a barcode to [src].</span>", "<span class='notice'>You attach a barcode to [src].</span>")
|
||||
tagger.paper_count -= 1
|
||||
sticker = new /obj/item/barcode(src)
|
||||
sticker.payments_acc = tagger.payments_acc //new tag gets the tagger's current account.
|
||||
sticker.cut_multiplier = tagger.cut_multiplier //as above, as before.
|
||||
|
||||
var/list/wrap_contents = src.GetAllContents()
|
||||
for(var/obj/I in wrap_contents)
|
||||
I.AddComponent(/datum/component/pricetag, sticker.payments_acc, tagger.cut_multiplier)
|
||||
var/overlaystring = "[icon_state]_tag"
|
||||
if(giftwrapped)
|
||||
overlaystring = copytext(overlaystring, 5)
|
||||
add_overlay(overlaystring)
|
||||
|
||||
else if(istype(W, /obj/item/barcode))
|
||||
var/obj/item/barcode/stickerA = W
|
||||
if(sticker)
|
||||
to_chat(user, "<span class='warning'>This package already has a barcode attached!</span>")
|
||||
return
|
||||
if(!(stickerA.payments_acc))
|
||||
to_chat(user, "<span class='warning'>This barcode seems to be invalid. Guess it's trash now.</span>")
|
||||
return
|
||||
if(!user.transferItemToLoc(W, src))
|
||||
to_chat(user, "<span class='warning'>For some reason, you can't attach [W]!</span>")
|
||||
return
|
||||
sticker = stickerA
|
||||
var/overlaystring = "[icon_state]_tag"
|
||||
if(giftwrapped)
|
||||
overlaystring = copytext_char(overlaystring, 5) //5 == length("gift") + 1
|
||||
add_overlay(overlaystring)
|
||||
|
||||
/obj/item/smallDelivery/proc/unwrap_contents()
|
||||
if(!sticker)
|
||||
return
|
||||
for(var/obj/I in src.GetAllContents())
|
||||
SEND_SIGNAL(I, COMSIG_ITEM_UNWRAPPED)
|
||||
|
||||
/obj/item/smallDelivery/examine(mob/user)
|
||||
. = ..()
|
||||
if(sticker)
|
||||
. += "There's a barcode attached to the side."
|
||||
|
||||
|
||||
/obj/item/destTagger
|
||||
name = "destination tagger"
|
||||
@@ -194,3 +314,98 @@
|
||||
var/n = text2num(href_list["nextTag"])
|
||||
currTag = n
|
||||
openwindow(usr)
|
||||
|
||||
/obj/item/sales_tagger
|
||||
name = "sales tagger"
|
||||
desc = "A scanner that lets you tag wrapped items for sale, splitting the profit between you and cargo."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "salestagger"
|
||||
item_state = "electronic"
|
||||
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
///The account which is recieving the split profits.
|
||||
var/datum/bank_account/payments_acc = null
|
||||
var/paper_count = 10
|
||||
var/max_paper_count = 20
|
||||
///Details the percentage the scanned account recieves off the final sale.
|
||||
///The person who tagged this will receive the sale value multiplied by this number.
|
||||
var/cut_multiplier = 0.5
|
||||
///Maximum value for cut_multiplier.
|
||||
var/cut_max = 0.5
|
||||
///Minimum value for cut_multiplier.
|
||||
var/cut_min = 0.01
|
||||
|
||||
/obj/item/sales_tagger/examine(mob/user)
|
||||
. = ..()
|
||||
. += "<span class='notice'>[src] has [paper_count]/[max_paper_count] available barcodes. Refill with paper.</span>"
|
||||
. += "<span class='notice'>Profit split on sale is currently set to [round(cut_multiplier*100)]%. <b>Alt-click</b> to change.</span>"
|
||||
if(payments_acc)
|
||||
. += "<span class='notice'><b>Ctrl-click</b> to clear the registered account.</span>"
|
||||
|
||||
/obj/item/sales_tagger/attackby(obj/item/I, mob/living/user, params)
|
||||
. = ..()
|
||||
if(istype(I, /obj/item/card/id))
|
||||
var/obj/item/card/id/potential_acc = I
|
||||
if(potential_acc.registered_account)
|
||||
payments_acc = potential_acc.registered_account
|
||||
playsound(src, 'sound/machines/ping.ogg', 40, TRUE)
|
||||
to_chat(user, "<span class='notice'>[src] registers the ID card. Tag a wrapped item to create a barcode.</span>")
|
||||
else if(!potential_acc.registered_account)
|
||||
to_chat(user, "<span class='warning'>This ID card has no account registered!</span>")
|
||||
return
|
||||
else if(payments_acc != potential_acc.registered_account)
|
||||
to_chat(user, "<span class='notice'>ID card already registered.</span>")
|
||||
if(istype(I, /obj/item/paper))
|
||||
if (!(paper_count >= max_paper_count))
|
||||
paper_count += 10
|
||||
qdel(I)
|
||||
if (paper_count >= max_paper_count)
|
||||
paper_count = max_paper_count
|
||||
to_chat(user, "<span class='notice'>[src]'s paper supply is now full.</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You refill [src]'s paper supply, you have [paper_count] left.</span>")
|
||||
return
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src]'s paper supply is full.</span>")
|
||||
return
|
||||
|
||||
/obj/item/sales_tagger/attack_self(mob/user)
|
||||
. = ..()
|
||||
if(paper_count <= 0)
|
||||
to_chat(user, "<span class='warning'>You're out of paper!'.</span>")
|
||||
return
|
||||
if(!payments_acc)
|
||||
to_chat(user, "<span class='warning'>You need to swipe [src] with an ID card first.</span>")
|
||||
return
|
||||
paper_count -= 1
|
||||
playsound(src, 'sound/machines/click.ogg', 40, TRUE)
|
||||
to_chat(user, "<span class='notice'>You print a new barcode.</span>")
|
||||
var/obj/item/barcode/new_barcode = new /obj/item/barcode(src)
|
||||
new_barcode.payments_acc = payments_acc // The sticker gets the scanner's registered account.
|
||||
new_barcode.cut_multiplier = cut_multiplier // Also the registered percent cut.
|
||||
user.put_in_hands(new_barcode)
|
||||
|
||||
/obj/item/sales_tagger/CtrlClick(mob/user)
|
||||
. = ..()
|
||||
payments_acc = null
|
||||
to_chat(user, "<span class='notice'>You clear the registered account.</span>")
|
||||
|
||||
/obj/item/sales_tagger/AltClick(mob/user)
|
||||
. = ..()
|
||||
var/potential_cut = input("How much would you like to pay out to the registered card?","Percentage Profit ([round(cut_min*100)]% - [round(cut_max*100)]%)") as num|null
|
||||
if(!potential_cut)
|
||||
cut_multiplier = initial(cut_multiplier)
|
||||
cut_multiplier = clamp(round(potential_cut/100, cut_min), cut_min, cut_max)
|
||||
to_chat(user, "<span class='notice'>[round(cut_multiplier*100)]% profit will be received if a package with a barcode is sold.</span>")
|
||||
|
||||
/obj/item/barcode
|
||||
name = "Barcode tag"
|
||||
desc = "A tiny tag, associated with a crewmember's account. Attach to a wrapped item to give that account a portion of the wrapped item's profit."
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
icon_state = "barcode"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
///All values inheirited from the sales tagger it came from.
|
||||
var/datum/bank_account/payments_acc = null
|
||||
var/cut_multiplier = 0.5
|
||||
|
||||
@@ -90,3 +90,12 @@
|
||||
materials = list(/datum/material/iron = 2010, /datum/material/glass = 5)
|
||||
build_path = /obj/item/electronics/electrochromatic_kit
|
||||
category = list("initial", "Electronics")
|
||||
|
||||
/datum/design/salestagger
|
||||
name = "Sales Tagger"
|
||||
id = "salestagger"
|
||||
build_type = AUTOLATHE | PROTOLATHE
|
||||
materials = list(/datum/material/iron = 700, /datum/material/glass = 200)
|
||||
build_path = /obj/item/sales_tagger
|
||||
category = list("initial", "Electronics")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_SERVICE
|
||||
|
||||
@@ -17,15 +17,7 @@
|
||||
build_path = /obj/item/circuitboard/computer/cargo/request
|
||||
category = list("Computer Boards")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_CARGO
|
||||
|
||||
/datum/design/board/bounty
|
||||
name = "Computer Design (Bounty Console)"
|
||||
desc = "Allows for the construction of circuit boards used to build a Bounty Console."
|
||||
id = "bounty"
|
||||
build_path = /obj/item/circuitboard/computer/bounty
|
||||
category = list("Computer Boards")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_CARGO
|
||||
|
||||
|
||||
/datum/design/board/mining
|
||||
name = "Computer Design (Outpost Status Display)"
|
||||
desc = "Allows for the construction of circuit boards used to build an outpost status display console."
|
||||
@@ -41,3 +33,10 @@
|
||||
build_path = /obj/item/circuitboard/computer/mining_shuttle
|
||||
category = list("Computer Boards")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_CARGO
|
||||
|
||||
/datum/design/board/bountypad_control
|
||||
name = "Computer Design (Civilian Bounty Pad Control)"
|
||||
desc = "Allows for the construction of circuit boards used to build a new civilian bounty pad console."
|
||||
id = "bounty_pad_control"
|
||||
build_path = /obj/item/circuitboard/computer/bountypad
|
||||
category = list("Computer Boards")
|
||||
|
||||
@@ -40,3 +40,10 @@
|
||||
build_path = /obj/item/circuitboard/machine/ore_redemption
|
||||
category = list ("Misc. Machinery")
|
||||
departmental_flags = DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_ENGINEERING
|
||||
|
||||
/datum/design/board/bountypad
|
||||
name = "Machine Design (Civilian Bounty Pad)"
|
||||
desc = "The circuit board for a Civilian Bounty Pad."
|
||||
id = "bounty_pad"
|
||||
build_path = /obj/item/circuitboard/machine/bountypad
|
||||
category = list ("Misc. Machinery")
|
||||
|
||||
@@ -106,4 +106,4 @@
|
||||
"destructive_analyzer", "circuit_imprinter", "experimentor", "rdconsole", "bepis", "design_disk", "tech_disk", "rdserver", "rdservercontrol", "mechfab", "paystand",
|
||||
"space_heater", "beaker", "large_beaker", "xlarge_beaker", "bucket", "hypovial", "large_hypovial", "syringe", "pillbottle",
|
||||
"sec_shellclip", "sec_beanbag", "sec_rshot", "sec_bshot", "sec_slug", "sec_islug", "sec_dart", "sec_38", "sec_38lethal",
|
||||
"rglass","plasteel","plastitanium","plasmaglass","plasmareinforcedglass","titaniumglass","plastitaniumglass")
|
||||
"rglass","plasteel","plastitanium","plasmaglass","plasmareinforcedglass","titaniumglass","plastitaniumglass", "salestagger")
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
display_name = "Advanced Data Theory"
|
||||
description = "Better insight into programming and data."
|
||||
prereq_ids = list("datatheory")
|
||||
design_ids = list("icprinter", "icupgadv", "icupgclo")
|
||||
design_ids = list("icprinter", "icupgadv", "icupgclo","bounty_pad","bounty_pad_control")
|
||||
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 3000)
|
||||
|
||||
/////////////////////////plasma tech/////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user