Fixes a runtime which bricked the pad plus fixing sprites. Also ports https://github.com/tgstation/tgstation/pull/55533 credit to cacogen.

This commit is contained in:
shellspeed1
2022-09-20 16:57:49 -07:00
parent e3a3462b85
commit 44536ad7ab
3 changed files with 24 additions and 11 deletions
+15 -5
View File
@@ -1,3 +1,5 @@
#define CIV_BOUNTY_SPLIT 30
///Pad for the Civilian Bounty Control.
/obj/machinery/piratepad/civilian
name = "civilian bounty pad"
@@ -97,7 +99,11 @@
SSeconomy.civ_bounty_tracker++
var/obj/item/bounty_cube/reward = new /obj/item/bounty_cube(drop_location())
reward.bounty_value = curr_bounty.reward
reward.AddComponent(/datum/component/pricetag, inserted_scan_id.registered_account, 10)
reward.bounty_name = curr_bounty.name
reward.bounty_holder = inserted_scan_id.registered_name
reward.name = "\improper [reward.bounty_value] cr [reward.name]"
reward.desc += " The tag indicates it was [reward.bounty_holder]'s reward for completing the <i>[reward.bounty_name]</i> bounty and that it was created at [station_time_timestamp(format = "hh:mm")]."
reward.AddComponent(/datum/component/pricetag, inserted_scan_id.registered_account, CIV_BOUNTY_SPLIT)
pad.visible_message("<span class='notice'>[pad] activates!</span>")
flick(pad.sending_state,pad)
pad.icon_state = pad.idle_state
@@ -151,15 +157,15 @@
if(inserted_scan_id.registered_account.civilian_bounty)
data["id_bounty_info"] = inserted_scan_id.registered_account.civilian_bounty.description
data["id_bounty_num"] = inserted_scan_id.registered_account.bounty_num()
data["id_bounty_value"] = inserted_scan_id.registered_account.civilian_bounty.reward
data["id_bounty_value"] = (inserted_scan_id.registered_account.civilian_bounty.reward) * (CIV_BOUNTY_SPLIT/100)
if(inserted_scan_id.registered_account.bounties)
data["picking"] = TRUE
data["id_bounty_names"] = list(inserted_scan_id.registered_account.bounties[1].name,
inserted_scan_id.registered_account.bounties[2].name,
inserted_scan_id.registered_account.bounties[3].name)
data["id_bounty_values"] = list(inserted_scan_id.registered_account.bounties[1].reward,
inserted_scan_id.registered_account.bounties[2].reward,
inserted_scan_id.registered_account.bounties[3].reward)
data["id_bounty_values"] = list(inserted_scan_id.registered_account.bounties[1].reward * (CIV_BOUNTY_SPLIT/100),
inserted_scan_id.registered_account.bounties[2].reward * (CIV_BOUNTY_SPLIT/100),
inserted_scan_id.registered_account.bounties[3].reward * (CIV_BOUNTY_SPLIT/100))
else
data["picking"] = FALSE
return data
@@ -235,6 +241,10 @@
icon_state = "bounty_cube"
///Value of the bounty that this bounty cube sells for.
var/bounty_value = 0
///Who completed the bounty.
var/bounty_holder
///What the bounty was for.
var/bounty_name
///Beacon to launch a new bounty setup when activated.