This commit is contained in:
shellspeed1
2022-09-20 20:05:59 -07:00
parent 44536ad7ab
commit a55b2c4ff3
5 changed files with 132 additions and 20 deletions
+21 -2
View File
@@ -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>")
@@ -5,4 +5,4 @@
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
return cube.bounty_value + (cube.bounty_value * (cube.speed_bonus / 100))