mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 17:14:47 +01:00
d25c6201f4
## About The Pull Request Converts almost all non-constant, non-tgui usages of all variantions of "credit" and "cr" Everything seems in order, tested most the currencies. <img width="905" height="119" alt="image" src="https://github.com/user-attachments/assets/3fa005a7-a114-426c-9646-b81f68bc2dec" /> <img width="255" height="128" alt="image" src="https://github.com/user-attachments/assets/14c83b54-4fd9-4bee-838f-5b1c03939d9a" /> ## Why It's Good For The Game Same justification as https://github.com/tgstation/tgstation/pull/94128 Just easier to mantain/adjust the grammer/names of our money ## Changelog 🆑 spellcheck: minor cleanup on some usecases of "credits" /🆑
32 lines
1.5 KiB
Plaintext
32 lines
1.5 KiB
Plaintext
/// Docks the target's pay
|
|
/datum/smite/dock_pay
|
|
name = "Dock Pay"
|
|
|
|
/datum/smite/dock_pay/effect(client/user, mob/living/target)
|
|
. = ..()
|
|
if (!iscarbon(target))
|
|
to_chat(user, span_warning("This must be used on a carbon mob."), confidential = TRUE)
|
|
return
|
|
var/mob/living/carbon/dude = target
|
|
var/obj/item/card/id/card = dude.get_idcard(TRUE)
|
|
if (!card)
|
|
to_chat(user, span_warning("[dude] does not have an ID card on!"), confidential = TRUE)
|
|
return
|
|
if (!card.registered_account)
|
|
to_chat(user, span_warning("[dude] does not have an ID card with an account!"), confidential = TRUE)
|
|
return
|
|
if (card.registered_account.account_balance == 0)
|
|
to_chat(user, span_warning("ID Card lacks any funds. No pay to dock."))
|
|
return
|
|
var/new_cost = input("How much pay are we docking? Current balance: [card.registered_account.account_balance] [MONEY_NAME].", "BUDGET CUTS") as num|null
|
|
if (!new_cost)
|
|
return
|
|
if (!(card.registered_account.has_money(new_cost)))
|
|
to_chat(user, span_warning("ID Card lacked funds. Emptying account."))
|
|
card.registered_account.bank_card_talk("[new_cost] [MONEY_NAME] deducted from your account based on performance review.")
|
|
card.registered_account.account_balance = 0
|
|
else
|
|
card.registered_account.account_balance = card.registered_account.account_balance - new_cost
|
|
card.registered_account.bank_card_talk("[new_cost] [MONEY_NAME] deducted from your account based on performance review.")
|
|
SEND_SOUND(target, 'sound/machines/buzz/buzz-sigh.ogg')
|