[MIRROR] new keywords for paperwork (#28136)

* new keywords for paperwork (#83737)

## About The Pull Request

Adds new keywords for fields on paper:
%d or %date to set the current in-game date
%t or %time to set the current server time (because no one uses station
time)

![изображение_2024-06-05_193346902](https://github.com/tgstation/tgstation/assets/112967882/f7e12e6a-f4ac-4f14-a018-c966195ab3bf)

![изображение_2024-06-05_193428394](https://github.com/tgstation/tgstation/assets/112967882/9ccb6e4f-d130-434e-b02a-03cc3221a825)

## Why It's Good For The Game

Entering dates and times into documents is very frustrating. This makes
it faster and easier

## Changelog
🆑
add: Added new keywords (%d, %date, %t, %time) for fields
/🆑

* new keywords for paperwork

---------

Co-authored-by: Kocma-san <112967882+Kocma-san@users.noreply.github.com>
This commit is contained in:
SkyratBot
2024-06-14 10:28:06 -04:00
committed by GitHub
co-authored by Kocma-san
parent 2f6a8f2652
commit b78728e4de
+10 -1
View File
@@ -205,8 +205,17 @@
var/datum/paper_field/field_data_datum = null
var/is_signature = ((text == "%sign") || (text == "%s"))
var/is_date = ((text == "%date") || (text == "%d"))
var/is_time = ((text == "%time") || (text == "%t"))
var/field_text = text
if(is_signature)
field_text = signature_name
else if(is_date)
field_text = "[time2text(world.timeofday, "DD/MM")]/[CURRENT_STATION_YEAR]"
else if(is_time)
field_text = time2text(world.timeofday, "hh:mm")
var/field_text = is_signature ? signature_name : text
var/field_font = is_signature ? SIGNATURE_FONT : font
for(var/datum/paper_field/field_input in raw_field_input_data)