#define PRINTER_TIMEOUT 10 /obj/machinery/computer/bounty name = "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 /obj/machinery/computer/bounty/Initialize() . = ..() printer_ready = world.time + PRINTER_TIMEOUT /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() . = ..() info = "

Nanotrasen Cargo Bounties


" for(var/datum/bounty/B in GLOB.bounties_list) if(B.claimed) continue info += "

[B.name]

" info += "" /obj/machinery/computer/bounty/ui_interact(mob/user) . = ..() if(!GLOB.bounties_list.len) setup_bounties() var/dat = "" dat += "Refresh" dat += "Print Paper" dat += "

Credits: [SSshuttle.points]

" dat += {""} dat += "" for(var/datum/bounty/B in GLOB.bounties_list) var/background if(B.can_claim()) background = "'background-color:#4F7529;'" else if(B.claimed) background = "'background-color:#294675;'" else background = "'background-color:#990000;'" dat += "" if(B.high_priority) dat += text("", B.name) dat += text("", B.description) dat += text("", B.reward_string()) else dat += text("", B.name) dat += text("", B.description) dat += text("", B.reward_string()) dat += text("", B.completion_string()) if(B.can_claim()) dat += text("") else if(B.claimed) dat += text("") else dat += text("") dat += "" dat += "
NameDescriptionRewardCompletionStatus
[]High Priority: [][][][][][]ClaimClaimedUnclaimed
" var/datum/browser/popup = new(user, "bounties", "Nanotrasen Bounties", 700, 600) popup.set_content(dat) popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state)) popup.open() /obj/machinery/computer/bounty/Topic(href, href_list) if(..()) return switch(href_list["choice"]) if("Print") if(printer_ready < world.time) printer_ready = world.time + PRINTER_TIMEOUT print_paper() if("Claim") var/datum/bounty/B = locate(href_list["d_rec"]) if(B in GLOB.bounties_list) B.claim() if(href_list["refresh"]) playsound(src, "terminal_type", 25, 0) updateUsrDialog()