mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-05 23:12:26 +00:00
cost() and can_buy() don't always get minds
This commit is contained in:
@@ -22,18 +22,18 @@
|
||||
desc = "Buys you one random item."
|
||||
|
||||
/datum/uplink_item/item/badassery/random_one/buy(var/obj/item/device/uplink/U, var/mob/user)
|
||||
var/datum/uplink_item/item = default_uplink_selection.get_random_item(user.mind)
|
||||
var/datum/uplink_item/item = default_uplink_selection.get_random_item((user ? user.mind.tcrystals : DEFAULT_TELECRYSTAL_AMOUNT), U)
|
||||
return item.buy(U, user)
|
||||
|
||||
/datum/uplink_item/item/badassery/random_one/can_buy(var/obj/item/device/uplink/U, var/datum/mind/M)
|
||||
return default_uplink_selection.get_random_item(M.tcrystals, U) != null
|
||||
/datum/uplink_item/item/badassery/random_one/can_buy(var/obj/item/device/uplink/U, var/telecrystals)
|
||||
return default_uplink_selection.get_random_item(telecrystals, U) != null
|
||||
|
||||
/datum/uplink_item/item/badassery/random_many
|
||||
name = "Random Items"
|
||||
desc = "Buys you as many random items you can afford. Convenient packaging NOT included."
|
||||
|
||||
/datum/uplink_item/item/badassery/random_many/cost(obj/item/device/uplink/U, mob/M)
|
||||
return max(1, M.mind.tcrystals)
|
||||
/datum/uplink_item/item/badassery/random_many/cost(obj/item/device/uplink/U, var/telecrystals)
|
||||
return max(1, telecrystals)
|
||||
|
||||
/datum/uplink_item/item/badassery/random_many/get_goods(var/obj/item/device/uplink/U, var/loc, var/mob/M)
|
||||
var/list/bought_items = list()
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
/datum/uplink_item/item/badassery/random_many/purchase_log(obj/item/device/uplink/U)
|
||||
feedback_add_details("traitor_uplink_items_bought", "[src]")
|
||||
log_and_message_admins("used \the [U.loc] to buy \a [src]")
|
||||
log_and_message_admins("used \the [U.loc] to buy \a [src] at random")
|
||||
|
||||
/****************
|
||||
* Surplus Crate *
|
||||
|
||||
Reference in New Issue
Block a user