mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-26 18:21:56 +00:00
Nightshifts & Randomized Station Time
This commit adds the Nightshift lighting mode from /tg/. From 19:00 to 07:00 in station time, the station will go into a reduced-lighting mode, with dimmed lights across the station. In conjunction with this, there is a new configuration option to start the shift time at a random time other than 12:00, so that players are more likely to experience a night shift (as opposed to having to have a 7 hour round).
This commit is contained in:
@@ -70,6 +70,7 @@
|
||||
#define INIT_ORDER_STICKY_BAN -10
|
||||
#define INIT_ORDER_LIGHTING -20
|
||||
#define INIT_ORDER_SHUTTLE -21
|
||||
#define INIT_ORDER_NIGHTSHIFT -22
|
||||
#define INIT_ORDER_SQUEAK -40
|
||||
#define INIT_ORDER_PATH -50
|
||||
#define INIT_ORDER_PERSISTENCE -100
|
||||
@@ -77,6 +78,7 @@
|
||||
// Subsystem fire priority, from lowest to highest priority
|
||||
// If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child)
|
||||
|
||||
#define FIRE_PRIORITY_NIGHTSHIFT 10
|
||||
#define FIRE_PRIORITY_IDLE_NPC 10
|
||||
#define FIRE_PRIORITY_SERVER_MAINT 10
|
||||
#define FIRE_PRIORITY_RESEARCH 10
|
||||
|
||||
@@ -505,7 +505,7 @@ proc/checkhtml(var/t)
|
||||
text = replacetext(text, "\[row\]", "</td><tr>")
|
||||
text = replacetext(text, "\[cell\]", "<td>")
|
||||
text = replacetext(text, "\[logo\]", "<img src = ntlogo.png>")
|
||||
text = replacetext(text, "\[time\]", "[gameTimestamp()]") // TO DO
|
||||
text = replacetext(text, "\[time\]", "[station_time_timestamp()]") // TO DO
|
||||
if(P)
|
||||
text = "<font face=\"[deffont]\" color=[P ? P.colour : "black"]>[text]</font>"
|
||||
else
|
||||
|
||||
@@ -23,15 +23,27 @@
|
||||
return wtime + (time_offset + wusage) * world.tick_lag
|
||||
|
||||
//Returns the world time in english
|
||||
/proc/worldtime2text(time = world.time)
|
||||
time = (round_start_time ? (time - round_start_time) : (time - world.time))
|
||||
return "[round(time / 36000)+12]:[(time / 600 % 60) < 10 ? add_zero(time / 600 % 60, 1) : time / 600 % 60]"
|
||||
/proc/worldtime2text()
|
||||
return gameTimestamp("hh:mm:ss", world.time)
|
||||
|
||||
/proc/time_stamp()
|
||||
return time2text(world.timeofday, "hh:mm:ss")
|
||||
/proc/time_stamp(format = "hh:mm:ss", show_ds)
|
||||
var/time_string = time2text(world.timeofday, format)
|
||||
return show_ds ? "[time_string]:[world.timeofday % 10]" : time_string
|
||||
|
||||
/proc/gameTimestamp(format = "hh:mm:ss") // Get the game time in text
|
||||
return time2text(world.time - timezoneOffset + 432000, format)
|
||||
/proc/gameTimestamp(format = "hh:mm:ss", wtime=null)
|
||||
if(!wtime)
|
||||
wtime = world.time
|
||||
return time2text(wtime - timezoneOffset, format)
|
||||
|
||||
/* This is used for displaying the "station time" equivelent of a world.time value
|
||||
Calling it with no args will give you the current time, but you can specify a world.time-based value as an argument
|
||||
- You can use this, for example, to do "This will expire at [station_time_at(world.time + 500)]" to display a "station time" expiration date
|
||||
which is much more useful for a player)*/
|
||||
/proc/station_time(time=world.time)
|
||||
return ((((time - round_start_time)) + GLOB.gametime_offset) % 864000) - timezoneOffset
|
||||
|
||||
/proc/station_time_timestamp(format = "hh:mm:ss", time=world.time)
|
||||
return time2text(station_time(time), format)
|
||||
|
||||
/* Returns 1 if it is the selected month and day */
|
||||
proc/isDay(var/month, var/day)
|
||||
|
||||
@@ -78,4 +78,6 @@ var/timezoneOffset = 0 // The difference betwen midnight (of the host computer)
|
||||
|
||||
// For FTP requests. (i.e. downloading runtime logs.)
|
||||
// However it'd be ok to use for accessing attack logs and such too, which are even laggier.
|
||||
var/fileaccess_timer = 0
|
||||
var/fileaccess_timer = 0
|
||||
|
||||
GLOBAL_VAR_INIT(gametime_offset, 432000) // 12:00 in seconds
|
||||
@@ -199,6 +199,10 @@
|
||||
var/high_pop_mc_mode_amount = 65
|
||||
var/disable_high_pop_mc_mode_amount = 60
|
||||
|
||||
// Nightshift
|
||||
var/randomize_shift_time = FALSE
|
||||
var/enable_night_shifts = FALSE
|
||||
|
||||
/datum/configuration/New()
|
||||
var/list/L = subtypesof(/datum/game_mode)
|
||||
for(var/T in L)
|
||||
@@ -605,19 +609,18 @@
|
||||
shutdown_shell_command = value
|
||||
|
||||
if("disable_karma")
|
||||
disable_karma = 1
|
||||
config.disable_karma = 1
|
||||
|
||||
if("tick_limit_mc_init")
|
||||
tick_limit_mc_init = text2num(value)
|
||||
config.tick_limit_mc_init = text2num(value)
|
||||
if("base_mc_tick_rate")
|
||||
base_mc_tick_rate = text2num(value)
|
||||
config.base_mc_tick_rate = text2num(value)
|
||||
if("high_pop_mc_tick_rate")
|
||||
high_pop_mc_tick_rate = text2num(value)
|
||||
config.high_pop_mc_tick_rate = text2num(value)
|
||||
if("high_pop_mc_mode_amount")
|
||||
high_pop_mc_mode_amount = text2num(value)
|
||||
config.high_pop_mc_mode_amount = text2num(value)
|
||||
if("disable_high_pop_mc_mode_amount")
|
||||
disable_high_pop_mc_mode_amount = text2num(value)
|
||||
|
||||
config.disable_high_pop_mc_mode_amount = text2num(value)
|
||||
else
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
@@ -680,6 +683,10 @@
|
||||
MAX_EX_FLAME_RANGE = BombCap
|
||||
if("default_laws")
|
||||
config.default_laws = text2num(value)
|
||||
if("randomize_shift_time")
|
||||
config.randomize_shift_time = TRUE
|
||||
if("enable_night_shifts")
|
||||
config.enable_night_shifts = TRUE
|
||||
else
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
|
||||
59
code/controllers/subsystem/nightshift.dm
Normal file
59
code/controllers/subsystem/nightshift.dm
Normal file
@@ -0,0 +1,59 @@
|
||||
SUBSYSTEM_DEF(nightshift)
|
||||
name = "Night Shift"
|
||||
init_order = INIT_ORDER_NIGHTSHIFT
|
||||
priority = FIRE_PRIORITY_NIGHTSHIFT
|
||||
wait = 600
|
||||
flags = SS_NO_TICK_CHECK
|
||||
|
||||
var/nightshift_active = FALSE
|
||||
var/nightshift_start_time = 702000 //7:30 PM, station time
|
||||
var/nightshift_end_time = 270000 //7:30 AM, station time
|
||||
var/nightshift_first_check = 30 SECONDS
|
||||
|
||||
var/high_security_mode = FALSE
|
||||
|
||||
/datum/controller/subsystem/nightshift/Initialize()
|
||||
if(!config.enable_night_shifts)
|
||||
can_fire = FALSE
|
||||
if(config.randomize_shift_time)
|
||||
GLOB.gametime_offset = rand(0, 23) HOURS
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/nightshift/fire(resumed = FALSE)
|
||||
if(world.time - round_start_time < nightshift_first_check)
|
||||
return
|
||||
check_nightshift()
|
||||
|
||||
/datum/controller/subsystem/nightshift/proc/announce(message)
|
||||
priority_announcement.Announce(message, new_sound = 'sound/misc/notice2.ogg', new_title = "Automated Lighting System Announcement")
|
||||
|
||||
/datum/controller/subsystem/nightshift/proc/check_nightshift()
|
||||
var/emergency = security_level >= SEC_LEVEL_RED
|
||||
var/announcing = TRUE
|
||||
var/time = station_time()
|
||||
var/night_time = (time < nightshift_end_time) || (time > nightshift_start_time)
|
||||
if(high_security_mode != emergency)
|
||||
high_security_mode = emergency
|
||||
if(night_time)
|
||||
announcing = FALSE
|
||||
if(!emergency)
|
||||
announce("Restoring night lighting configuration to normal operation.")
|
||||
else
|
||||
announce("Disabling night lighting: Station is in a state of emergency.")
|
||||
if(emergency)
|
||||
night_time = FALSE
|
||||
if(nightshift_active != night_time)
|
||||
update_nightshift(night_time, announcing)
|
||||
|
||||
/datum/controller/subsystem/nightshift/proc/update_nightshift(active, announce = TRUE)
|
||||
nightshift_active = active
|
||||
if(announce)
|
||||
if (active)
|
||||
announce("Good evening, crew. To reduce power consumption and stimulate the circadian rhythms of some species, all of the lights aboard the station have been dimmed for the night.")
|
||||
else
|
||||
announce("Good morning, crew. As it is now day time, all of the lights aboard the station have been restored to their former brightness.")
|
||||
for(var/A in apcs)
|
||||
var/obj/machinery/power/apc/APC = A
|
||||
if(is_station_level(APC.z))
|
||||
APC.set_nightshift(active)
|
||||
CHECK_TICK
|
||||
@@ -164,7 +164,7 @@
|
||||
T.purpose = "Payment"
|
||||
T.amount = pay
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
T.source_terminal = "\[CLASSIFIED\] Terminal #[rand(111,333)]"
|
||||
M.mind.initial_account.transaction_log.Add(T)
|
||||
msg += "You have been sent the $[pay], as agreed."
|
||||
|
||||
@@ -35,7 +35,8 @@ var/round_start_time = 0
|
||||
|
||||
var/obj/screen/cinematic = null //used for station explosion cinematic
|
||||
|
||||
var/round_end_announced = 0 // Spam Prevention. Announce round end only once.
|
||||
var/round_end_announced = 0 // Spam Prevention. Announce round end only once.\
|
||||
|
||||
|
||||
/datum/controller/gameticker/proc/pregame()
|
||||
login_music = pick(\
|
||||
|
||||
@@ -474,7 +474,7 @@
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(loc)
|
||||
playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1)
|
||||
P.info = "<CENTER><B>Body Scan - [href_list["name"]]</B></CENTER><BR>"
|
||||
P.info += "<b>Time of scan:</b> [worldtime2text(world.time)]<br><br>"
|
||||
P.info += "<b>Time of scan:</b> [station_time_timestamp()]<br><br>"
|
||||
P.info += "[printing_text]"
|
||||
P.info += "<br><br><b>Notes:</b><br>"
|
||||
P.name = "Body Scan - [href_list["name"]]"
|
||||
|
||||
@@ -429,7 +429,7 @@ var/time_last_changed_position = 0
|
||||
|
||||
var/obj/item/weapon/paper/P = new(loc)
|
||||
if(mode == 2)
|
||||
P.name = text("crew manifest ([])", worldtime2text())
|
||||
P.name = "crew manifest ([station_time_timestamp()])"
|
||||
P.info = {"<h4>Crew Manifest</h4>
|
||||
<br>
|
||||
[data_core ? data_core.get_manifest(0) : ""]
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
nanomanager.update_uis(src)
|
||||
return
|
||||
Centcomm_announce(input, usr)
|
||||
print_centcom_report(input, worldtime2text() +" Captain's Message")
|
||||
print_centcom_report(input, station_time_timestamp() + " Captain's Message")
|
||||
to_chat(usr, "Message transmitted.")
|
||||
log_say("[key_name(usr)] has made a Centcomm announcement: [input]")
|
||||
centcomm_message_cooldown = 1
|
||||
|
||||
@@ -453,7 +453,7 @@
|
||||
var/t1 = copytext(trim(sanitize(input("Add Comment:", "Med. records", null, null) as message)), 1, MAX_MESSAGE_LEN)
|
||||
if(!t1 || ..() || active2 != a2)
|
||||
return 1
|
||||
active2.fields["comments"] += "Made by [authenticated] ([rank]) on [current_date_string] [worldtime2text()]<BR>[t1]"
|
||||
active2.fields["comments"] += "Made by [authenticated] ([rank]) on [current_date_string] [station_time_timestamp()]<BR>[t1]"
|
||||
|
||||
if(href_list["del_c"])
|
||||
var/index = min(max(text2num(href_list["del_c"]) + 1, 1), length(active2.fields["comments"]))
|
||||
|
||||
@@ -198,7 +198,7 @@
|
||||
active2.fields["criminal"] = "Released"
|
||||
var/newstatus = active2.fields["criminal"]
|
||||
log_admin("[key_name_admin(usr)] set secstatus of [their_rank] [their_name] to [newstatus], comment: [t1]")
|
||||
active2.fields["comments"] += "Set to [newstatus] by [usr.name] ([rank]) on [current_date_string] [worldtime2text()], comment: [t1]"
|
||||
active2.fields["comments"] += "Set to [newstatus] by [usr.name] ([rank]) on [current_date_string] [station_time_timestamp()], comment: [t1]"
|
||||
update_all_mob_security_hud()
|
||||
if("rank")
|
||||
if(active1)
|
||||
@@ -404,7 +404,7 @@
|
||||
var/t1 = copytext(trim(sanitize(input("Add Comment:", "Secure. records", null, null) as message)), 1, MAX_MESSAGE_LEN)
|
||||
if(!t1 || ..() || active2 != a2)
|
||||
return 1
|
||||
active2.fields["comments"] += "Made by [authenticated] ([rank]) on [current_date_string] [worldtime2text()]<BR>[t1]"
|
||||
active2.fields["comments"] += "Made by [authenticated] ([rank]) on [current_date_string] [station_time_timestamp()]<BR>[t1]"
|
||||
|
||||
else if(href_list["del_c"])
|
||||
var/index = min(max(text2num(href_list["del_c"]) + 1, 1), length(active2.fields["comments"]))
|
||||
|
||||
@@ -137,7 +137,7 @@ var/list/possible_uplinker_IDs = list("Alfa","Bravo","Charlie","Delta","Echo","F
|
||||
var/list/transferlog = list()
|
||||
|
||||
/obj/machinery/computer/telecrystals/boss/proc/logTransfer(var/logmessage)
|
||||
transferlog += ("<b>[worldtime2text()]</b> [logmessage]")
|
||||
transferlog += ("<b>[station_time_timestamp()]</b> [logmessage]")
|
||||
|
||||
/obj/machinery/computer/telecrystals/boss/proc/scanUplinkers()
|
||||
for(var/obj/machinery/computer/telecrystals/uplinker/A in range(scanrange, src.loc))
|
||||
|
||||
@@ -40,11 +40,11 @@
|
||||
|
||||
for(var/obj/machinery/computer/prisoner/C in prisoncomputer_list)
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(C.loc)
|
||||
P.name = "[id] log - [logname] [worldtime2text()]"
|
||||
P.name = "[id] log - [logname] [station_time_timestamp()]"
|
||||
P.info = "<center><b>[id] - Brig record</b></center><br><hr><br>"
|
||||
P.info += {"<center>[station_name()] - Security Department</center><br>
|
||||
<center><small><b>Admission data:</b></small></center><br>
|
||||
<small><b>Log generated at:</b> [worldtime2text()]<br>
|
||||
<small><b>Log generated at:</b> [station_time_timestamp()]<br>
|
||||
<b>Detainee:</b> [logname]<br>
|
||||
<b>Duration:</b> [seconds_to_time(timetoset / 10)]<br>
|
||||
<b>Charge(s):</b> [logcharges]<br>
|
||||
@@ -68,7 +68,7 @@
|
||||
rank = I.assignment
|
||||
if(!R.fields["comments"] || !islist(R.fields["comments"])) //copied from security computer code because apparently these need to be initialized
|
||||
R.fields["comments"] = list()
|
||||
R.fields["comments"] += "Autogenerated by [name] on [current_date_string] [worldtime2text()]<BR>Sentenced to [timetoset/10] seconds for the charges of \"[logcharges]\" by [rank] [usr.name]."
|
||||
R.fields["comments"] += "Autogenerated by [name] on [current_date_string] [station_time_timestamp()]<BR>Sentenced to [timetoset/10] seconds for the charges of \"[logcharges]\" by [rank] [usr.name]."
|
||||
update_all_mob_security_hud()
|
||||
|
||||
return 1
|
||||
|
||||
@@ -19,9 +19,9 @@
|
||||
/obj/item/weapon/card/id/guest/examine(mob/user)
|
||||
..(user)
|
||||
if(world.time < expiration_time)
|
||||
to_chat(user, "<span class='notice'>This pass expires at [worldtime2text(expiration_time)].</span>")
|
||||
to_chat(user, "<span class='notice'>This pass expires at [station_time_timestamp("hh:mm:ss", expiration_time)].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>It expired at [worldtime2text(expiration_time)].</span>")
|
||||
to_chat(user, "<span class='warning'>It expired at [station_time_timestamp("hh:mm:ss", expiration_time)].</span>")
|
||||
to_chat(user, "<span class='notice'>It grants access to following areas:</span>")
|
||||
for(var/A in temp_access)
|
||||
to_chat(user, "<span class='notice'>[get_access_desc(A)].</span>")
|
||||
@@ -166,13 +166,13 @@
|
||||
if("issue")
|
||||
if(giver)
|
||||
var/number = add_zero("[rand(0,9999)]", 4)
|
||||
var/entry = "\[[worldtime2text()]\] Pass #[number] issued by [giver.registered_name] ([giver.assignment]) to [giv_name]. Reason: [reason]. Grants access to following areas: "
|
||||
var/entry = "\[[station_time()]\] Pass #[number] issued by [giver.registered_name] ([giver.assignment]) to [giv_name]. Reason: [reason]. Grants access to following areas: "
|
||||
for(var/i=1 to accesses.len)
|
||||
var/A = accesses[i]
|
||||
if(A)
|
||||
var/area = get_access_desc(A)
|
||||
entry += "[i > 1 ? ", [area]" : "[area]"]"
|
||||
entry += ". Expires at [worldtime2text(world.time + duration*10*60)]."
|
||||
entry += ". Expires at [station_time(world.time + duration*10*60)]."
|
||||
internal_log.Add(entry)
|
||||
|
||||
var/obj/item/weapon/card/id/guest/pass = new(src.loc)
|
||||
|
||||
@@ -221,7 +221,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
radiochannel = "AI Private"
|
||||
if(recipient == "Cargo Bay")
|
||||
radiochannel = "Supply"
|
||||
message_log += "<B>Message sent to [recipient] at [worldtime2text()]</B><BR>[message]"
|
||||
message_log += "<B>Message sent to [recipient] at [station_time_timestamp()]</B><BR>[message]"
|
||||
Radio.autosay("Alert; a new requests console message received for [recipient] from [department]", null, "[radiochannel]")
|
||||
else
|
||||
audible_message(text("[bicon(src)] *The Requests Console beeps: '<b>NOTICE:</b> No server detected!'"),,4)
|
||||
|
||||
@@ -113,5 +113,5 @@
|
||||
T.purpose = "Slot Winnings"
|
||||
T.amount = "[amt]"
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
account.transaction_log.Add(T)
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
message2 = "Error!"
|
||||
else
|
||||
message1 = "TIME"
|
||||
message2 = worldtime2text()
|
||||
message2 = station_time_timestamp("hh:mm")
|
||||
update_display(message1, message2, use_warn)
|
||||
return 1
|
||||
if(STATUS_DISPLAY_MESSAGE) //custom messages
|
||||
@@ -126,7 +126,7 @@
|
||||
return 1
|
||||
if(STATUS_DISPLAY_TIME)
|
||||
message1 = "TIME"
|
||||
message2 = worldtime2text()
|
||||
message2 = station_time_timestamp("hh:mm")
|
||||
update_display(message1, message2)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
message2 = "Docked"
|
||||
else
|
||||
message1 = "TIME"
|
||||
message2 = worldtime2text()
|
||||
message2 = station_time_timestamp("hh:mm")
|
||||
else
|
||||
message1 = "CARGO"
|
||||
message2 = shuttle_master.supply.getTimerStr()
|
||||
|
||||
@@ -430,7 +430,7 @@
|
||||
T.amount = "[currently_vending.price]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
vendor_account.transaction_log.Add(T)
|
||||
|
||||
/obj/machinery/vending/attack_ai(mob/user)
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
var/scan_data = ""
|
||||
|
||||
if(timeofdeath)
|
||||
scan_data += "<b>Time of death:</b> [worldtime2text(timeofdeath)]<br><br>"
|
||||
scan_data += "<b>Time of death:</b> [station_time_timestamp("hh:mm:ss", timeofdeath)]<br><br>"
|
||||
|
||||
var/n = 1
|
||||
for(var/wdata_idx in wdata)
|
||||
@@ -146,7 +146,7 @@
|
||||
if(damaging_weapon)
|
||||
scan_data += "Severity: [damage_desc]<br>"
|
||||
scan_data += "Hits by weapon: [total_hits]<br>"
|
||||
scan_data += "Approximate time of wound infliction: [worldtime2text(age)]<br>"
|
||||
scan_data += "Approximate time of wound infliction: [station_time(age)]<br>"
|
||||
scan_data += "Affected limbs: [D.organ_names]<br>"
|
||||
scan_data += "Possible weapons:<br>"
|
||||
for(var/weapon_name in weapon_chances)
|
||||
|
||||
@@ -160,7 +160,7 @@ REAGENT SCANNER
|
||||
user.show_message("\t Damage Specifics: <font color='blue'>[OX]</font> - <font color='green'>[TX]</font> - <font color='#FFA500'>[BU]</font> - <font color='red'>[BR]</font>")
|
||||
user.show_message("<span class='notice'>Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)</span>", 1)
|
||||
if(M.timeofdeath && (M.stat == DEAD || (M.status_flags & FAKEDEATH)))
|
||||
user.show_message("<span class='notice'>Time of Death: [worldtime2text(M.timeofdeath)]</span>")
|
||||
user.show_message("<span class='notice'>Time of Death: [station_time_timestamp("hh:mm:ss", M.timeofdeath)]</span>")
|
||||
if(istype(M, /mob/living/carbon/human) && mode == 1)
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/list/damaged = H.get_damaged_organs(1,1)
|
||||
@@ -432,7 +432,7 @@ REAGENT SCANNER
|
||||
sleep(50)
|
||||
|
||||
var/obj/item/weapon/paper/P = new(get_turf(src))
|
||||
P.name = "Mass Spectrometer Scanner Report: [worldtime2text()]"
|
||||
P.name = "Mass Spectrometer Scanner Report: [station_time_timestamp()]"
|
||||
P.info = "<center><b>Mass Spectrometer</b></center><br><center>Data Analysis:</center><br><hr><br><b>Trace chemicals detected:</b><br>[datatoprint]<br><hr>"
|
||||
|
||||
if(ismob(loc))
|
||||
@@ -502,7 +502,7 @@ REAGENT SCANNER
|
||||
sleep(50)
|
||||
|
||||
var/obj/item/weapon/paper/P = new(get_turf(src))
|
||||
P.name = "Reagent Scanner Report: [worldtime2text()]"
|
||||
P.name = "Reagent Scanner Report: [station_time_timestamp()]"
|
||||
P.info = "<center><b>Reagent Scanner</b></center><br><center>Data Analysis:</center><br><hr><br><b>Chemical agents detected:</b><br> [datatoprint]<br><hr>"
|
||||
|
||||
if(ismob(loc))
|
||||
|
||||
@@ -123,9 +123,9 @@
|
||||
if(guest_pass)
|
||||
to_chat(user, "<span class='notice'>There is a guest pass attached to this ID card</span>")
|
||||
if(world.time < guest_pass.expiration_time)
|
||||
to_chat(user, "<span class='notice'>It expires at [worldtime2text(guest_pass.expiration_time)].</span>")
|
||||
to_chat(user, "<span class='notice'>It expires at [station_time_timestamp("hh:mm:ss", guest_pass.expiration_time)].</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>It expired at [worldtime2text(guest_pass.expiration_time)].</span>")
|
||||
to_chat(user, "<span class='warning'>It expired at [station_time_timestamp("hh:mm:ss", guest_pass.expiration_time)].</span>")
|
||||
to_chat(user, "<span class='notice'>It grants access to following areas:</span>")
|
||||
for(var/A in guest_pass.temp_access)
|
||||
to_chat(user, "<span class='notice'>[get_access_desc(A)].</span>")
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
T.amount = "[token_price]"
|
||||
T.source_terminal = src.name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
customer_account.transaction_log.Add(T)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
spawn(0)
|
||||
|
||||
var/found_something = 0
|
||||
add_log("<B>[worldtime2text()][get_timestamp()] - [target_name]</B>", 0)
|
||||
add_log("<B>[station_time_timestamp()][get_timestamp()] - [target_name]</B>", 0)
|
||||
|
||||
// Fingerprints
|
||||
if(fingerprints && fingerprints.len)
|
||||
|
||||
@@ -107,7 +107,7 @@ log transactions
|
||||
T.amount = C.amount
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
authenticated_account.transaction_log.Add(T)
|
||||
|
||||
to_chat(user, "<span class='info'>You insert [C] into [src].</span>")
|
||||
@@ -183,7 +183,7 @@ log transactions
|
||||
T.purpose = transfer_purpose
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
T.amount = "([transfer_amount])"
|
||||
authenticated_account.transaction_log.Add(T)
|
||||
else
|
||||
@@ -225,7 +225,7 @@ log transactions
|
||||
T.purpose = "Unauthorised login attempt"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
failed_account.transaction_log.Add(T)
|
||||
else
|
||||
to_chat(usr, "[bicon(src)]<span class='warning'>Incorrect pin/account combination entered, [max_pin_attempts - number_incorrect_tries] attempts remaining.</span>")
|
||||
@@ -245,7 +245,7 @@ log transactions
|
||||
T.purpose = "Remote terminal access"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
authenticated_account.transaction_log.Add(T)
|
||||
to_chat(usr, "[bicon(src)]<span class='notice'>Access granted. Welcome user '[authenticated_account.owner_name].'</span>")
|
||||
previous_account_number = tried_account_num
|
||||
@@ -271,7 +271,7 @@ log transactions
|
||||
T.amount = "([amount])"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
authenticated_account.transaction_log.Add(T)
|
||||
else
|
||||
to_chat(usr, "[bicon(src)]<span class='warning'>You don't have enough funds to do that!</span>")
|
||||
@@ -288,7 +288,7 @@ log transactions
|
||||
<i>Account holder:</i> [authenticated_account.owner_name]<br>
|
||||
<i>Account number:</i> [authenticated_account.account_number]<br>
|
||||
<i>Balance:</i> $[authenticated_account.money]<br>
|
||||
<i>Date and time:</i> [worldtime2text()], [current_date_string]<br><br>
|
||||
<i>Date and time:</i> [station_time_timestamp()], [current_date_string]<br><br>
|
||||
<i>Service terminal ID:</i> [machine_id]<br>"}
|
||||
|
||||
//stamp the paper
|
||||
@@ -345,7 +345,7 @@ log transactions
|
||||
T.purpose = "Remote terminal access"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
authenticated_account.transaction_log.Add(T)
|
||||
|
||||
view_screen = NO_SCREEN
|
||||
|
||||
@@ -54,8 +54,8 @@ var/global/list/all_money_accounts = list()
|
||||
|
||||
department_accounts[department] = department_account
|
||||
|
||||
//the current ingame time (hh:mm) can be obtained by calling:
|
||||
//worldtime2text()
|
||||
//the current ingame time (hh:mm:ss) can be obtained by calling:
|
||||
//station_time_timestamp("hh:mm:ss")
|
||||
|
||||
/proc/create_account(var/new_owner_name = "Default user", var/starting_funds = 0, var/obj/machinery/computer/account_database/source_db)
|
||||
|
||||
@@ -79,7 +79,7 @@ var/global/list/all_money_accounts = list()
|
||||
M.account_number = rand(111111, 999999)
|
||||
else
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
T.source_terminal = source_db.machine_id
|
||||
|
||||
M.account_number = next_account_number
|
||||
@@ -101,7 +101,7 @@ var/global/list/all_money_accounts = list()
|
||||
<i>Account number:</i> [M.account_number]<br>
|
||||
<i>Account pin:</i> [M.remote_access_pin]<br>
|
||||
<i>Starting balance:</i> $[M.money]<br>
|
||||
<i>Date and time:</i> [worldtime2text()], [current_date_string]<br><br>
|
||||
<i>Date and time:</i> [station_time_timestamp()], [current_date_string]<br><br>
|
||||
<i>Creation terminal ID:</i> [source_db.machine_id]<br>
|
||||
<i>Authorised NT officer overseeing creation:</i> [overseer]<br>"}
|
||||
// END AUTOFIX
|
||||
@@ -302,7 +302,7 @@ var/global/list/all_money_accounts = list()
|
||||
T.purpose = "New account funds initialisation"
|
||||
T.amount = "([starting_funds])"
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
T.source_terminal = machine_id
|
||||
station_account.transaction_log.Add(T)
|
||||
|
||||
@@ -354,7 +354,7 @@ var/global/list/all_money_accounts = list()
|
||||
else
|
||||
T.amount = "[amount]"
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
T.source_terminal = terminal_id
|
||||
D.transaction_log.Add(T)
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
T.purpose = reason
|
||||
T.amount = amount
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
T.source_terminal = machine_id
|
||||
return T
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
D.transaction_log.Add(T)
|
||||
//
|
||||
T = new()
|
||||
@@ -212,7 +212,7 @@
|
||||
T.amount = "[transaction_amount]"
|
||||
T.source_terminal = machine_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
linked_account.transaction_log.Add(T)
|
||||
else
|
||||
to_chat(user, "[bicon(src)]<span class='warning'>You don't have that much money!</span>")
|
||||
|
||||
@@ -173,7 +173,7 @@ var/const/POS_HEADER = {"<html>
|
||||
receipt += myArea.name
|
||||
receipt += "</div>"
|
||||
receipt += {"<br />
|
||||
<div>[worldtime2text()], [current_date_string]</div>
|
||||
<div>[station_time_timestamp()], [current_date_string]</div>
|
||||
<table>
|
||||
<tr class=\"first\">
|
||||
<th class=\"first\">Item</th>
|
||||
@@ -369,7 +369,7 @@ var/const/POS_HEADER = {"<html>
|
||||
logindata={"<a href="?src=[UID()];logout=1">[logged_in.name]</a>"}
|
||||
var/dat = POS_HEADER + {"
|
||||
<div class="navbar">
|
||||
[worldtime2text()], [current_date_string]<br />
|
||||
[station_time_timestamp()], [current_date_string]<br />
|
||||
[logindata]
|
||||
<a href="?src=[UID()];screen=[POS_SCREEN_ORDER]">Order</a> |
|
||||
<a href="?src=[UID()];screen=[POS_SCREEN_PRODUCTS]">Products</a> |
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
if(terminal_id)
|
||||
T.source_terminal = terminal_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
dest.transaction_log.Add(T)
|
||||
//
|
||||
T = new()
|
||||
@@ -84,7 +84,7 @@
|
||||
if(terminal_id)
|
||||
T.source_terminal = terminal_id
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
transaction_log.Add(T)
|
||||
return 1
|
||||
else
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
var/datum/event_meta/EM = E.event_meta
|
||||
EC.available_events += EM
|
||||
|
||||
log_debug("Event '[EM.name]' has completed at [worldtime2text()].")
|
||||
log_debug("Event '[EM.name]' has completed at [station_time_timestamp()].")
|
||||
|
||||
/datum/event_manager/proc/delay_events(var/severity, var/delay)
|
||||
var/list/datum/event_container/EC = event_containers[severity]
|
||||
@@ -78,12 +78,12 @@
|
||||
var/datum/event_meta/EM = E.event_meta
|
||||
if(EM.name == "Nothing")
|
||||
continue
|
||||
var/message = "'[EM.name]' began at [worldtime2text(E.startedAt)] "
|
||||
var/message = "'[EM.name]' began at [station_time_timestamp("hh:mm:ss", E.startedAt)] "
|
||||
if(E.isRunning)
|
||||
message += "and is still running."
|
||||
else
|
||||
if(E.endedAt - E.startedAt > MinutesToTicks(5)) // Only mention end time if the entire duration was more than 5 minutes
|
||||
message += "and ended at [worldtime2text(E.endedAt)]."
|
||||
message += "and ended at [station_time_timestamp("hh:mm:ss", E.endedAt)]."
|
||||
else
|
||||
message += "and ran to completion."
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
var/next_event_at = max(0, EC.next_event_time - world.time)
|
||||
html += "<tr>"
|
||||
html += "<td>[severity_to_string[severity]]</td>"
|
||||
html += "<td>[worldtime2text(max(EC.next_event_time, world.time))]</td>"
|
||||
html += "<td>[station_time_timestamp("hh:mm:ss", max(EC.next_event_time, world.time))]</td>"
|
||||
html += "<td>[round(next_event_at / 600, 0.1)]</td>"
|
||||
html += "<td>"
|
||||
html += "<A align='right' href='?src=[UID()];dec_timer=2;event=\ref[EC]'>--</A>"
|
||||
@@ -188,7 +188,7 @@
|
||||
html += "<tr>"
|
||||
html += "<td>[severity_to_string[EM.severity]]</td>"
|
||||
html += "<td>[EM.name]</td>"
|
||||
html += "<td>[no_end ? "N/A" : worldtime2text(ends_at)]</td>"
|
||||
html += "<td>[no_end ? "N/A" : station_time_timestamp("hh:mm:ss", ends_at)]</td>"
|
||||
html += "<td>[no_end ? "N/A" : ends_in]</td>"
|
||||
html += "<td><A align='right' href='?src=[UID()];stop=\ref[E]'>Stop</A></td>"
|
||||
html += "</tr>"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
kill()
|
||||
|
||||
/datum/event/money_hacker/announce()
|
||||
var/message = "A brute force hack has been detected (in progress since [worldtime2text()]). The target of the attack is: Financial account #[affected_account.account_number], \
|
||||
var/message = "A brute force hack has been detected (in progress since [station_time_timestamp()]). The target of the attack is: Financial account #[affected_account.account_number], \
|
||||
without intervention this attack will succeed in approximately 10 minutes. Required intervention: temporary suspension of affected accounts until the attack has ceased. \
|
||||
Notifications will be sent as updates occur.<br>"
|
||||
var/my_department = "[station_name()] firewall subroutines"
|
||||
@@ -50,7 +50,7 @@
|
||||
T.date = pick("", current_date_string, date1, date2)
|
||||
var/time1 = rand(0, 99999999)
|
||||
var/time2 = "[round(time1 / 36000)+12]:[(time1 / 600 % 60) < 10 ? add_zero(time1 / 600 % 60, 1) : time1 / 600 % 60]"
|
||||
T.time = pick("", worldtime2text(), time2)
|
||||
T.time = pick("", station_time_timestamp(), time2)
|
||||
T.source_terminal = pick("","[pick("Biesel","New Gibson")] GalaxyNet Terminal #[rand(111,999)]","your mums place","nantrasen high CommanD")
|
||||
|
||||
affected_account.transaction_log.Add(T)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
if(areas && areas.len > 0)
|
||||
var/my_department = "[station_name()] firewall subroutines"
|
||||
var/rc_message = "An unknown malicious program has been detected in the [english_list(areaName)] lighting and airlock control systems at [worldtime2text()]. Systems will be fully compromised within approximately three minutes. Direct intervention is required immediately.<br>"
|
||||
var/rc_message = "An unknown malicious program has been detected in the [english_list(areaName)] lighting and airlock control systems at [station_time_timestamp()]. Systems will be fully compromised within approximately three minutes. Direct intervention is required immediately.<br>"
|
||||
for(var/obj/machinery/message_server/MS in world)
|
||||
MS.send_rc_message("Engineering", my_department, rc_message, "", "", 2)
|
||||
for(var/mob/living/silicon/ai/A in player_list)
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
stack_list[processed_sheet] = s
|
||||
// Not including tg's ignoring of metal, glass being stocked because if cargo's not telling science when ores are there, they probably won't
|
||||
// help with restocking metal/glass either
|
||||
var/msg = "\[[worldtime2text()]\]: [capitalize(s.name)] sheets have been stocked in the ore reclaimer."
|
||||
var/msg = "\[[station_time_timestamp()]\]: [capitalize(s.name)] sheets have been stocked in the ore reclaimer."
|
||||
for(var/obj/machinery/requests_console/D in allConsoles)
|
||||
if(D.department in src.supply_consoles)
|
||||
if(supply_consoles[D.department] == null || (s.name in supply_consoles[D.department]))
|
||||
|
||||
@@ -55,6 +55,6 @@
|
||||
update_icons()
|
||||
|
||||
timeofdeath = world.time
|
||||
if(mind) mind.store_memory("Time of death: [worldtime2text(timeofdeath)]", 0)
|
||||
if(mind) mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0)
|
||||
|
||||
return ..(gibbed)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
update_canmove()
|
||||
|
||||
timeofdeath = world.time
|
||||
if(mind) mind.store_memory("Time of death: [worldtime2text(timeofdeath)]", 0)
|
||||
if(mind) mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0)
|
||||
living_mob_list -= src
|
||||
|
||||
return ..(gibbed)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
|
||||
timeofdeath = world.time
|
||||
if(mind) mind.store_memory("Time of death: [worldtime2text(timeofdeath)]", 0) //mind. ?
|
||||
if(mind) mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0) //mind. ?
|
||||
|
||||
return ..(gibbed)
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
timeofdeath = world.time
|
||||
med_hud_set_health()
|
||||
med_hud_set_status()
|
||||
if(mind) mind.store_memory("Time of death: [worldtime2text(timeofdeath)]", 0)
|
||||
if(mind) mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0)
|
||||
if(ticker && ticker.mode)
|
||||
// log_to_dd("k")
|
||||
sql_report_death(src)
|
||||
|
||||
@@ -835,13 +835,13 @@
|
||||
else
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/U = usr
|
||||
R.fields["comments"] += "Set to [setcriminal] by [U.get_authentification_name()] ([U.get_assignment()]) on [current_date_string] [worldtime2text()] with comment: [t1]<BR>"
|
||||
R.fields["comments"] += "Set to [setcriminal] by [U.get_authentification_name()] ([U.get_assignment()]) on [current_date_string] [station_time_timestamp()] with comment: [t1]<BR>"
|
||||
if(isrobot(usr))
|
||||
var/mob/living/silicon/robot/U = usr
|
||||
R.fields["comments"] += "Set to [setcriminal] by [U.name] ([U.modtype] [U.braintype]) on [current_date_string] [worldtime2text()] with comment: [t1]<BR>"
|
||||
R.fields["comments"] += "Set to [setcriminal] by [U.name] ([U.modtype] [U.braintype]) on [current_date_string] [station_time_timestamp()] with comment: [t1]<BR>"
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/U = usr
|
||||
R.fields["comments"] += "Set to [setcriminal] by [U.name] (artificial intelligence) on [current_date_string] [worldtime2text()] with comment: [t1]<BR>"
|
||||
R.fields["comments"] += "Set to [setcriminal] by [U.name] (artificial intelligence) on [current_date_string] [station_time_timestamp()] with comment: [t1]<BR>"
|
||||
|
||||
R.fields["criminal"] = setcriminal
|
||||
log_admin("[key_name_admin(usr)] set secstatus of [their_rank] [their_name] to [setcriminal], comment: [t1]")
|
||||
@@ -931,13 +931,13 @@
|
||||
return
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/U = usr
|
||||
R.fields["comments"] += "Made by [U.get_authentification_name()] ([U.get_assignment()]) on [current_date_string] [worldtime2text()]<BR>[t1]"
|
||||
R.fields["comments"] += "Made by [U.get_authentification_name()] ([U.get_assignment()]) on [current_date_string] [station_time_timestamp()]<BR>[t1]"
|
||||
if(isrobot(usr))
|
||||
var/mob/living/silicon/robot/U = usr
|
||||
R.fields["comments"] += "Made by [U.name] ([U.modtype] [U.braintype]) on [current_date_string] [worldtime2text()]<BR>[t1]"
|
||||
R.fields["comments"] += "Made by [U.name] ([U.modtype] [U.braintype]) on [current_date_string] [station_time_timestamp()]<BR>[t1]"
|
||||
if(isAI(usr))
|
||||
var/mob/living/silicon/ai/U = usr
|
||||
R.fields["comments"] += "Made by [U.name] (artificial intelligence) on [current_date_string] [worldtime2text()]<BR>[t1]"
|
||||
R.fields["comments"] += "Made by [U.name] (artificial intelligence) on [current_date_string] [station_time_timestamp()]<BR>[t1]"
|
||||
|
||||
if(href_list["medical"])
|
||||
if(hasHUD(usr,"medical"))
|
||||
@@ -1053,10 +1053,10 @@
|
||||
return
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/U = usr
|
||||
R.fields["comments"] += "Made by [U.get_authentification_name()] ([U.get_assignment()]) on [current_date_string] [worldtime2text()]<BR>[t1]"
|
||||
R.fields["comments"] += "Made by [U.get_authentification_name()] ([U.get_assignment()]) on [current_date_string] [station_time_timestamp()]<BR>[t1]"
|
||||
if(isrobot(usr))
|
||||
var/mob/living/silicon/robot/U = usr
|
||||
R.fields["comments"] += "Made by [U.name] ([U.modtype] [U.braintype]) on [current_date_string] [worldtime2text()]<BR>[t1]"
|
||||
R.fields["comments"] += "Made by [U.name] ([U.modtype] [U.braintype]) on [current_date_string] [station_time_timestamp()]<BR>[t1]"
|
||||
|
||||
if(href_list["lookitem"])
|
||||
var/obj/item/I = locate(href_list["lookitem"])
|
||||
|
||||
@@ -44,6 +44,6 @@
|
||||
loc.icon_state = "aicard-404"
|
||||
|
||||
timeofdeath = world.time
|
||||
if(mind) mind.store_memory("Time of death: [worldtime2text(timeofdeath)]", 0)
|
||||
if(mind) mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0)
|
||||
|
||||
return ..(gibbed)
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
to_chat(user, "\t Key: <font color='#FFA500'>Electronics</font>/<font color='red'>Brute</font>")
|
||||
to_chat(user, "\t Damage Specifics: <font color='#FFA500'>[BU]</font> - <font color='red'>[BR]</font>")
|
||||
if(M.timeofdeath && M.stat == DEAD)
|
||||
to_chat(user, "<span class='notice'>Time of Disable: [worldtime2text(M.timeofdeath)]</span>")
|
||||
to_chat(user, "<span class='notice'>Time of Disable: [station_time_timestamp("hh:mm:ss", M.timeofdeath)]</span>")
|
||||
var/mob/living/silicon/robot/H = M
|
||||
var/list/damaged = H.get_damaged_components(1,1,1)
|
||||
to_chat(user, "<span class='notice'>Localized Damage:</span>")
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
update_icons()
|
||||
timeofdeath = world.time
|
||||
if(mind) mind.store_memory("Time of death: [worldtime2text(timeofdeath)]", 0)
|
||||
if(mind) mind.store_memory("Time of death: [station_time_timestamp("hh:mm:ss", timeofdeath)]", 0)
|
||||
|
||||
sql_report_cyborg_death(src)
|
||||
|
||||
|
||||
@@ -970,7 +970,8 @@ var/list/slot_equipment_priority = list( \
|
||||
|
||||
// this function displays the station time in the status panel
|
||||
/mob/proc/show_stat_station_time()
|
||||
stat(null, "Station Time: [worldtime2text()]")
|
||||
stat(null, "Round Time: [worldtime2text()]")
|
||||
stat(null, "Station Time: [station_time_timestamp()]")
|
||||
|
||||
// this function displays the shuttles ETA in the status panel if the shuttle has been called
|
||||
/mob/proc/show_stat_emergency_shuttle_eta()
|
||||
|
||||
@@ -97,8 +97,7 @@
|
||||
|
||||
statpanel("Status")
|
||||
if(client.statpanel == "Status" && ticker)
|
||||
if(ticker.current_state != GAME_STATE_PREGAME)
|
||||
stat(null, "Station Time: [worldtime2text()]")
|
||||
show_stat_station_time()
|
||||
|
||||
|
||||
/mob/new_player/Topic(href, href_list[])
|
||||
|
||||
@@ -21,12 +21,12 @@ var/global/static/ntnrc_uid = 0
|
||||
return ..()
|
||||
|
||||
/datum/ntnet_conversation/proc/add_message(message, username)
|
||||
message = "[worldtime2text()] [username]: [message]"
|
||||
message = "[station_time_timestamp()] [username]: [message]"
|
||||
messages.Add(message)
|
||||
trim_message_list()
|
||||
|
||||
/datum/ntnet_conversation/proc/add_status_message(message)
|
||||
messages.Add("[worldtime2text()] -!- [message]")
|
||||
messages.Add("[station_time_timestamp()] -!- [message]")
|
||||
trim_message_list()
|
||||
|
||||
/datum/ntnet_conversation/proc/trim_message_list()
|
||||
|
||||
@@ -36,7 +36,7 @@ var/global/datum/ntnet/ntnet_global = new()
|
||||
|
||||
// Simplified logging: Adds a log. log_string is mandatory parameter, source is optional.
|
||||
/datum/ntnet/proc/add_log(log_string, obj/item/weapon/computer_hardware/network_card/source = null)
|
||||
var/log_text = "[worldtime2text()] - "
|
||||
var/log_text = "[station_time_timestamp()] - "
|
||||
if(source)
|
||||
log_text += "[source.get_network_tag()] - "
|
||||
else
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
|
||||
data["PC_programheaders"] = program_headers
|
||||
|
||||
data["PC_stationtime"] = worldtime2text()
|
||||
data["PC_stationtime"] = station_time_timestamp()
|
||||
data["PC_showexitprogram"] = active_program ? 1 : 0 // Hides "Exit Program" button on mainscreen
|
||||
return data
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
var/title
|
||||
var/content
|
||||
if(mode == 2)
|
||||
title = "crew manifest ([worldtime2text()])"
|
||||
title = "crew manifest ([station_time_timestamp()])"
|
||||
content = "<h4>Crew Manifest</h4><br>[data_core ? data_core.get_manifest(0) : ""]"
|
||||
else if(modify && !mode)
|
||||
title = "access report"
|
||||
|
||||
@@ -296,7 +296,7 @@ obj/machinery/lapvend/attackby(obj/item/I, mob/user)
|
||||
T.amount = "[total_price]"
|
||||
T.source_terminal = name
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
vendor_account.transaction_log.Add(T)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
dat += "<h2 ALIGN=CENTER>SpiderOS v.1.337</h2>"
|
||||
dat += "Welcome, <b>[U.real_name]</b>.<br>"
|
||||
dat += "<br>"
|
||||
dat += "<img src=sos_10.png> Current Time: [worldtime2text()]<br>"
|
||||
dat += "<img src=sos_10.png> Current Time: [station_time_timestamp()]<br>"
|
||||
dat += "<img src=sos_9.png> Battery Life: [round(cell.charge/100)]%<br>"
|
||||
dat += "<img src=sos_11.png> Smoke Bombs: \Roman [s_bombs]<br>"
|
||||
dat += "<br><br>"
|
||||
|
||||
@@ -42,7 +42,7 @@ var/list/adminfaxes = list()
|
||||
html += "<td>[A.name]</td>"
|
||||
html += "<td>[A.from_department]</td>"
|
||||
html += "<td>[A.to_department]</td>"
|
||||
html += "<td>[worldtime2text(A.sent_at)]</td>"
|
||||
html += "<td>[station_time_timestamp("hh:mm:ss", A.sent_at)]</td>"
|
||||
if(A.sent_by)
|
||||
var/mob/living/S = A.sent_by
|
||||
html += "<td><A HREF='?_src_=holder;adminplayeropts=\ref[A.sent_by]'>[S.name]</A></td>"
|
||||
@@ -71,7 +71,7 @@ var/list/adminfaxes = list()
|
||||
html += "<td>[F.name]</td>"
|
||||
html += "<td>[F.from_department]</td>"
|
||||
html += "<td>[F.to_department]</td>"
|
||||
html += "<td>[worldtime2text(F.sent_at)]</td>"
|
||||
html += "<td>[station_time_timestamp("hh:mm:ss", F.sent_at)]</td>"
|
||||
if(F.sent_by)
|
||||
var/mob/living/S = F.sent_by
|
||||
html += "<td><A HREF='?_src_=holder;adminplayeropts=\ref[F.sent_by]'>[S.name]</A></td>"
|
||||
|
||||
@@ -169,7 +169,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
data["useRetro"] = retro_mode
|
||||
|
||||
data["cartridge_name"] = cartridge ? cartridge.name : ""
|
||||
data["stationTime"] = worldtime2text()
|
||||
data["stationTime"] = station_time_timestamp()
|
||||
|
||||
data["app"] = list()
|
||||
current_app.update_ui(user, data)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
user.show_message("<span class=notice>\t Key: Suffocation/Toxin/Burns/Brute</span>", 1)
|
||||
user.show_message("<span class=notice>\t Body Temperature: [C.bodytemperature-T0C]°C ([C.bodytemperature*1.8-459.67]°F)</span>", 1)
|
||||
if(C.timeofdeath && (C.stat == DEAD || (C.status_flags & FAKEDEATH)))
|
||||
user.show_message("<span class=notice>\t Time of Death: [worldtime2text(C.timeofdeath)]</span>")
|
||||
user.show_message("<span class=notice>\t Time of Death: [station_time_timestamp("hh:mm:ss", C.timeofdeath)]</span>")
|
||||
if(istype(C, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = C
|
||||
var/list/damaged = H.get_damaged_organs(1,1)
|
||||
|
||||
@@ -104,6 +104,10 @@
|
||||
|
||||
var/shock_proof = 0 //if set to 1, this APC will not arc bolts of electricity if it's overloaded.
|
||||
|
||||
// Nightshift
|
||||
var/nightshift_lights = FALSE
|
||||
var/last_nightshift_switch = 0
|
||||
|
||||
/obj/machinery/power/apc/worn_out
|
||||
name = "\improper Worn out APC"
|
||||
keep_preset_name = 1
|
||||
@@ -773,6 +777,7 @@
|
||||
data["siliconUser"] = istype(user, /mob/living/silicon)
|
||||
data["siliconLock"] = locked
|
||||
data["malfStatus"] = get_malf_status(user)
|
||||
data["nightshiftLights"] = nightshift_lights
|
||||
|
||||
var/powerChannels[0]
|
||||
powerChannels[++powerChannels.len] = list(
|
||||
@@ -904,6 +909,16 @@
|
||||
|
||||
toggle_breaker()
|
||||
|
||||
else if(href_list["toggle_nightshift"])
|
||||
if(!is_authenticated(usr))
|
||||
return
|
||||
|
||||
if(last_nightshift_switch < world.time + 100) // don't spam...
|
||||
to_chat(usr, "<span class='warning'>[src]'s night lighting circuit breaker is still cycling!</span>")
|
||||
return
|
||||
last_nightshift_switch = world.time
|
||||
set_nightshift(!nightshift_lights)
|
||||
|
||||
else if(href_list["cmode"])
|
||||
if(!is_authenticated(usr))
|
||||
return
|
||||
@@ -1353,4 +1368,13 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
/obj/machinery/power/apc/proc/set_nightshift(on)
|
||||
set waitfor = FALSE
|
||||
nightshift_lights = on
|
||||
for(var/obj/machinery/light/L in area)
|
||||
if(L.nightshift_allowed)
|
||||
L.nightshift_enabled = nightshift_lights
|
||||
L.update(FALSE)
|
||||
CHECK_TICK
|
||||
|
||||
#undef APC_UPDATE_ICON_COOLDOWN
|
||||
|
||||
@@ -153,6 +153,13 @@
|
||||
var/rigged = 0 // true if rigged to explode
|
||||
var/lightmaterials = list(MAT_GLASS=100) //stores the materials the light is made of to stop infinite glass exploit
|
||||
|
||||
var/nightshift_enabled = FALSE //Currently in night shift mode?
|
||||
var/nightshift_allowed = TRUE //Set to FALSE to never let this light get switched to night mode.
|
||||
var/nightshift_light_range = 8
|
||||
var/nightshift_light_power = 0.45
|
||||
var/nightshift_light_color = "#FFDDCC"
|
||||
|
||||
|
||||
// the smaller bulb light fixture
|
||||
|
||||
/obj/machinery/light/small
|
||||
@@ -161,6 +168,7 @@
|
||||
fitting = "bulb"
|
||||
brightness_range = 4
|
||||
brightness_color = "#a0a080"
|
||||
nightshift_light_range = 4
|
||||
desc = "A small lighting fixture."
|
||||
light_type = /obj/item/weapon/light/bulb
|
||||
|
||||
@@ -226,18 +234,24 @@
|
||||
return
|
||||
|
||||
// update the icon_state and luminosity of the light depending on its state
|
||||
/obj/machinery/light/proc/update(var/trigger = 1)
|
||||
|
||||
/obj/machinery/light/proc/update(var/trigger = TRUE)
|
||||
switch(status)
|
||||
if(LIGHT_BROKEN, LIGHT_BURNED, LIGHT_EMPTY)
|
||||
on = FALSE
|
||||
update_icon()
|
||||
if(on)
|
||||
if(light_range != brightness_range || light_power != brightness_power || light_color != brightness_color)
|
||||
var/BR = nightshift_enabled ? nightshift_light_range : brightness_range
|
||||
var/PO = nightshift_enabled ? nightshift_light_power : brightness_power
|
||||
var/CO = nightshift_enabled ? nightshift_light_color : brightness_color
|
||||
var/matching = light_range == BR && light_power == PO && light_color == CO
|
||||
if(!matching)
|
||||
switchcount++
|
||||
if(rigged)
|
||||
if(status == LIGHT_OK && trigger)
|
||||
log_admin("LOG: Rigged light explosion, last touched by [fingerprintslast]")
|
||||
message_admins("LOG: Rigged light explosion, last touched by [fingerprintslast]")
|
||||
explode()
|
||||
else if( prob( min(60, switchcount*switchcount*0.01) ) )
|
||||
else if(prob(min(60, switchcount * switchcount * 0.01)))
|
||||
if(status == LIGHT_OK && trigger)
|
||||
status = LIGHT_BURNED
|
||||
icon_state = "[base_state]-burned"
|
||||
@@ -245,7 +259,7 @@
|
||||
set_light(0)
|
||||
else
|
||||
use_power = 2
|
||||
set_light(brightness_range, brightness_power, brightness_color)
|
||||
set_light(BR, PO, CO)
|
||||
else
|
||||
use_power = 1
|
||||
set_light(0)
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
playsound(loc, 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1)
|
||||
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(loc)
|
||||
P.info = "<CENTER><B>Chemical Analysis</B></CENTER><BR>"
|
||||
P.info += "<b>Time of analysis:</b> [worldtime2text(world.time)]<br><br>"
|
||||
P.info += "<b>Time of analysis:</b> [station_time_timestamp()]<br><br>"
|
||||
P.info += "<b>Chemical name:</b> [href_list["name"]]<br>"
|
||||
if(href_list["name"] == "Blood")
|
||||
var/datum/reagents/R = beaker.reagents
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
|
||||
// Time
|
||||
interpreter.SetProc("time", /proc/time)
|
||||
interpreter.SetProc("timestamp", /proc/timestamp)
|
||||
interpreter.SetProc("timestamp", /proc/gameTimestamp)
|
||||
|
||||
// Run the compiled code
|
||||
interpreter.Run()
|
||||
|
||||
@@ -155,10 +155,6 @@
|
||||
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/time() called tick#: [world.time]")
|
||||
return world.time + (12 HOURS)
|
||||
|
||||
/proc/timestamp(var/format = "hh:mm:ss") // Get the game time in text
|
||||
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/timestamp() called tick#: [world.time]")
|
||||
return time2text(world.time + (10 HOURS), format) // Yes, 10, not 12 hours, for some reason time2text() is being moronic (T-thanks BYOND), and it's adding 2 hours to this, I don't even know either.
|
||||
|
||||
proc/string_explode(var/string, var/separator = "")
|
||||
//writepanic("[__FILE__].[__LINE__] \\/proc/string_explode() called tick#: [world.time]")
|
||||
if(istext(string) && (istext(separator) || isnull(separator)))
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
to_chat(usr, "<span class='warning'>All Emergency Response Teams are dispatched and can not be called at this time.</span>")
|
||||
return
|
||||
to_chat(usr, "<span class = 'notice'>ERT request transmitted.</span>")
|
||||
print_centcom_report(ert_reason, worldtime2text() +" ERT Request")
|
||||
print_centcom_report(ert_reason, station_time_timestamp() + " ERT Request")
|
||||
|
||||
var/fullmin_count = 0
|
||||
for(var/client/C in admins)
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
atc.reroute_traffic(yes = TRUE) // Tell them fuck off we're busy.
|
||||
else
|
||||
atc.reroute_traffic(yes = FALSE)
|
||||
SSnightshift.check_nightshift()
|
||||
|
||||
else
|
||||
return
|
||||
|
||||
@@ -41,7 +41,7 @@ var/global/datum/store/centcomm_store=new
|
||||
T.purpose = "Purchase of [item.name]"
|
||||
T.amount = -amount
|
||||
T.date = current_date_string
|
||||
T.time = worldtime2text()
|
||||
T.time = station_time_timestamp()
|
||||
T.source_terminal = "\[CLASSIFIED\] Terminal #[rand(111,333)]"
|
||||
mind.initial_account.transaction_log.Add(T)
|
||||
return 1
|
||||
|
||||
@@ -116,7 +116,8 @@ var/world_topic_spam_protect_time = world.timeofday
|
||||
s["ai"] = config.allow_ai
|
||||
s["host"] = host ? host : null
|
||||
s["players"] = list()
|
||||
s["stationtime"] = worldtime2text()
|
||||
s["roundtime"] = worldtime2text()
|
||||
s["stationtime"] = station_time_timestamp()
|
||||
var/player_count = 0
|
||||
var/admin_count = 0
|
||||
|
||||
|
||||
@@ -370,4 +370,4 @@ HIGH_POP_MC_TICK_RATE 1.1
|
||||
HIGH_POP_MC_MODE_AMOUNT 65
|
||||
|
||||
##Disengage high pop mode if player count drops below this
|
||||
DISABLE_HIGH_POP_MC_MODE_AMOUNT 60
|
||||
DISABLE_HIGH_POP_MC_MODE_AMOUNT 60
|
||||
|
||||
@@ -65,4 +65,10 @@ BOMBCAP 20
|
||||
## Set to 0/commented for "off", silicons will just start with Crewsimov.
|
||||
## Set to 1 for "random", silicons will start with a random lawset picked from (at the time of writing): Nanotrasen Default, P.A.L.A.D.I.N., Corporate, Robop and Crewsimov. More can be added by changing the law datum "default" variable in ai_laws.dm.
|
||||
|
||||
DEFAULT_LAWS 1
|
||||
DEFAULT_LAWS 1
|
||||
|
||||
## Randomize roundstart time (anywhere from 00:00 to 23:00 instead of always starting at 12:00)
|
||||
RANDOMIZE_SHIFT_TIME
|
||||
|
||||
## Enable Nightshift - Causes the station to go into "night mode" from 19:30 to 07:30. Best used with RANDOMIZED_SHIFT_TIME.
|
||||
ENABLE_NIGHT_SHIFTS
|
||||
@@ -177,4 +177,21 @@
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="item">
|
||||
<div class="itemLabel">
|
||||
Night Shift Lighting:
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
{{if data.locked}}
|
||||
{{if data.nightshiftLights}}
|
||||
<span class='good'>On</span>
|
||||
{{else}}
|
||||
<span class='bad'>Off</span>
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{:helper.link('Enabled', 'lightbulb-o', {'toggle_nightshift' : 1}, data.nightshiftLights ? 'selected' : null)}}{{:helper.link('Disabled', 'lightbulb-o', {'toggle_nightshift' : 1}, data.nightshiftLights ? null : 'selected')}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -209,6 +209,7 @@
|
||||
#include "code\controllers\ProcessScheduler\core\processScheduler.dm"
|
||||
#include "code\controllers\subsystem\air.dm"
|
||||
#include "code\controllers\subsystem\fires.dm"
|
||||
#include "code\controllers\subsystem\nightshift.dm"
|
||||
#include "code\controllers\subsystem\spacedrift.dm"
|
||||
#include "code\controllers\subsystem\throwing.dm"
|
||||
#include "code\datums\action.dm"
|
||||
|
||||
Reference in New Issue
Block a user