Total Mining Points on ID/Ore Redemption Machine (#22143)

* it begins

* Revert "it begins"

This reverts commit 02f90f4ce9.

* oopsies, restart

* here we go again

* oopsie again

* god i finally figured out TGUI

* henri review

* tgui update

* Update tgui.bundle.js

* tgui

* Update tgui.bundle.js
This commit is contained in:
matttheficus
2023-09-10 19:07:30 -05:00
committed by GitHub
parent a2922ad5fd
commit 072a958398
4 changed files with 18 additions and 7 deletions
+7 -2
View File
@@ -109,7 +109,10 @@
desc = "A card used to provide ID and determine access across the station."
icon_state = "id"
item_state = "card-id"
var/mining_points = 0 //For redeeming at mining equipment lockers
/// For redeeming at mining equipment lockers
var/mining_points = 0
/// Total mining points for the Shift.
var/total_mining_points = 0
var/list/access = list()
var/registered_name = "Unknown" // The name registered_name on the card
slot_flags = SLOT_ID
@@ -174,7 +177,7 @@
user.visible_message("[user] shows you: [bicon(src)] [src.name]. The assignment on the card: [src.assignment]",\
"You flash your ID card: [bicon(src)] [src.name]. The assignment on the card: [src.assignment]")
if(mining_points)
to_chat(user, "There's [mining_points] mining equipment redemption points loaded onto this card.")
to_chat(user, "There's <b>[mining_points] Mining Points</b> loaded onto this card. This card has earned <b>[total_mining_points] Mining Points</b> this Shift!")
src.add_fingerprint(user)
return
@@ -330,6 +333,7 @@
data["account"] = associated_account_number
data["owner"] = registered_name
data["mining"] = mining_points
data["total_mining"] = total_mining_points
return data
/obj/item/card/id/deserialize(list/data)
@@ -343,6 +347,7 @@
associated_account_number = data["account"]
registered_name = data["owner"]
mining_points = data["mining"]
total_mining_points = data["total_mining"]
// We'd need to use icon serialization(b64) to save the photo, and I don't feel like i
UpdateName()
RebuildHTML()