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))
@@ -123,16 +123,21 @@
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/proc/toggle_resting()
set name = "Rest"
set category = "IC"
set_resting(!resting, FALSE)
/mob/living/carbon/human/can_see_reagents()
. = ..()