mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
[MIRROR] Adds logging to uplinks, spellbooks, and the codex ciatrix (#2937)
* Adds logging to uplinks, spellbooks, and the codex ciatrix (#56450) * Initial logging * Bugfix and adds uplink logging to config file * Another bugfix * Adds logging to uplinks, spellbooks, and the codex ciatrix Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
This commit is contained in:
co-authored by
TemporalOroboros
parent
a73598c6ad
commit
7f7252d855
@@ -111,6 +111,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
|
||||
/datum/uplink_item/proc/purchase(mob/user, datum/component/uplink/U)
|
||||
var/atom/A = spawn_item(item, user, U)
|
||||
log_uplink("[key_name(user)] purchased [src] for [cost] telecrystals from [U.parent]'s uplink")
|
||||
if(purchase_log_vis && U.purchase_log)
|
||||
U.purchase_log.LogPurchase(A, src, cost)
|
||||
|
||||
@@ -247,6 +248,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
|
||||
var/crate_value = starting_crate_value
|
||||
var/obj/structure/closet/crate/C = spawn_item(/obj/structure/closet/crate, user, U)
|
||||
log_uplink("[key_name(user)] puchased [src] worth [crate_value] telecrystals for [cost] telecrystals using [U.parent]'s uplink")
|
||||
if(U.purchase_log)
|
||||
U.purchase_log.LogPurchase(C, src, cost)
|
||||
while(crate_value)
|
||||
@@ -260,6 +262,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
continue
|
||||
crate_value -= I.cost
|
||||
var/obj/goods = new I.item(C)
|
||||
log_uplink("- [key_name(user)] received [goods] from [src]")
|
||||
if(U.purchase_log)
|
||||
U.purchase_log.LogPurchase(goods, I, 0)
|
||||
return C
|
||||
@@ -286,6 +289,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
|
||||
if(possible_items.len)
|
||||
var/datum/uplink_item/I = pick(possible_items)
|
||||
log_uplink("[key_name(user)] purchased a random uplink item from [U.parent]'s uplink with [U.telecrystals] telecrystals remaining")
|
||||
SSblackbox.record_feedback("tally", "traitor_random_uplink_items_gotten", 1, initial(I.name))
|
||||
U.MakePurchase(user, I)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user