Files
Casper3667 d0da59a72e Fixes journals, quik-pay and credit symbol use (#21844)
Three for one.

- The ability to write in journals held in ones hand was restored.
- The quik-pay quick-input now works properly.
- The credit symbol use was standardised to use 5电 and inserted into a
few places where it used credit instead.
2026-02-11 23:58:45 +00:00

36 lines
1.4 KiB
Plaintext

/datum/event/money_lotto
var/winner_name = "John Smith"
var/winner_sum = 0
var/deposit_success = 0
/datum/event/money_lotto/start()
..()
winner_sum = pick(1, 50, 100, 500, 1000, 2000, 5000)
if(SSeconomy.all_money_accounts.len)
var/datum/money_account/D = SSeconomy.get_account(pick(SSeconomy.all_money_accounts))
winner_name = D.owner_name
if(!D.suspended)
D.money += winner_sum
var/datum/transaction/T = new()
T.target_name = "Tau Ceti Daily Grand Slam -Stellar- Lottery"
T.purpose = "Winner!"
T.amount = winner_sum
T.date = worlddate2text()
T.time = worldtime2text()
T.source_terminal = "Biesel TCD Terminal #[rand(111,333)]"
SSeconomy.add_transaction_log(D,T)
deposit_success = 1
/datum/event/money_lotto/announce()
var/author = "[SSatlas.current_map.company_name] Editor"
var/channel = "Tau Ceti Daily"
var/body = "Tau Ceti Daily wishes to congratulate <b>[winner_name]</b> for recieving the Tau Ceti Stellar Slam Lottery, and receiving the out of this world sum of [winner_sum]电!"
if(!deposit_success)
body += "<br>Unfortunately, we were unable to verify the account details provided, so we were unable to transfer the money. Send a cheque containing the sum of 5000电 to ND 'Stellar Slam' office on the Tau Ceti gateway containing updated details, and your winnings'll be re-sent within the month."
var/datum/feed_channel/ch = SSnews.GetFeedChannel(channel)
SSnews.SubmitArticle(body, author, ch, null, 1)