mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
[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)   ## 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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user