Re-Adding Bounty Consoles
Civilian bounties are great, don't get me wrong. But they're civilian bounties and it feels like cargo lost their thing to do, namely putting annoying sheets of paper everywhere. Plus checklists make the brain go ding when you work through them arooga.
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
#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
|
||||
@@ -17,7 +17,15 @@
|
||||
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."
|
||||
|
||||
Reference in New Issue
Block a user