diff --git a/code/__HELPERS/files.dm b/code/__HELPERS/files.dm index 5001a3541e..f515668dfb 100644 --- a/code/__HELPERS/files.dm +++ b/code/__HELPERS/files.dm @@ -43,7 +43,7 @@ /client/proc/file_spam_check() var/time_to_wait = GLOB.fileaccess_timer - world.time if(time_to_wait > 0) - to_chat(src, "Error: file_spam_check(): Spam. Please wait [round(time_to_wait/10)] seconds.") + to_chat(src, "Error: file_spam_check(): Spam. Please wait [DisplayTimeText(time_to_wait)].") return 1 GLOB.fileaccess_timer = world.time + FTPDELAY return 0 diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index 5bcc66eeda..c040e264e6 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -421,7 +421,7 @@ SEND_SOUND(M, 'sound/misc/notice2.ogg') //Alerting them to their consideration if(flashwindow) window_flash(M.client) - switch(ignore_category ? askuser(M,Question,"Please answer in [poll_time/10] seconds!","Yes","No","Never for this round", StealFocus=0, Timeout=poll_time) : askuser(M,Question,"Please answer in [poll_time/10] seconds!","Yes","No", StealFocus=0, Timeout=poll_time)) + switch(ignore_category ? askuser(M,Question,"Please answer in [DisplayTimeText(poll_time)]!","Yes","No","Never for this round", StealFocus=0, Timeout=poll_time) : askuser(M,Question,"Please answer in [DisplayTimeText(poll_time)]!","Yes","No", StealFocus=0, Timeout=poll_time)) if(1) to_chat(M, "Choice registered: Yes.") if(time_passed + poll_time <= world.time) diff --git a/code/__HELPERS/maths.dm b/code/__HELPERS/maths.dm index 8374b305ad..61a6866fe2 100644 --- a/code/__HELPERS/maths.dm +++ b/code/__HELPERS/maths.dm @@ -219,3 +219,8 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, new_x = Clamp(new_x, 0, world.maxx) new_y = Clamp(new_y, 0, world.maxy) return locate(new_x, new_y, starting.z) + +/proc/round_down(num) + if(round(num) != num) + return round(num--) + else return num diff --git a/code/__HELPERS/time.dm b/code/__HELPERS/time.dm index 546935e697..630d87a82a 100644 --- a/code/__HELPERS/time.dm +++ b/code/__HELPERS/time.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD //Returns the world time in english /proc/worldtime2text() return gameTimestamp("hh:mm:ss", world.time) @@ -50,3 +51,153 @@ GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0) return 5 else return 1 +======= +//Returns the world time in english +/proc/worldtime2text() + return gameTimestamp("hh:mm:ss", world.time) + +/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", wtime=null) + if(!wtime) + wtime = world.time + return time2text(wtime - GLOB.timezoneOffset + SSticker.gametime_offset - SSticker.round_start_time, format) + +/* Returns 1 if it is the selected month and day */ +/proc/isDay(month, day) + if(isnum(month) && isnum(day)) + var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month + var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day + if(month == MM && day == DD) + return 1 + + // Uncomment this out when debugging! + //else + //return 1 + +//returns timestamp in a sql and ISO 8601 friendly format +/proc/SQLtime(timevar) + if(!timevar) + timevar = world.realtime + return time2text(timevar, "YYYY-MM-DD hh:mm:ss") + + +GLOBAL_VAR_INIT(midnight_rollovers, 0) +GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0) +/proc/update_midnight_rollover() + if (world.timeofday < GLOB.rollovercheck_last_timeofday) //TIME IS GOING BACKWARDS! + return GLOB.midnight_rollovers++ + return GLOB.midnight_rollovers + +/proc/weekdayofthemonth() + var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day + switch(DD) + if(8 to 13) + return 2 + if(14 to 20) + return 3 + if(21 to 27) + return 4 + if(28 to INFINITY) + return 5 + else + return 1 + +//Takes a value of time in deciseconds. +//Returns a text value of that number in hours, minutes, or seconds. +/proc/DisplayTimeText(time_value) + var/second = time_value*0.1 + var/second_adjusted = null + var/second_rounded = FALSE + var/minute = null + var/hour = null + var/day = null + + if(!second) + return "0 seconds" + if(second >= 60) + minute = round_down(second/60) + second = round(second - (minute*60), 0.1) + second_rounded = TRUE + if(second) //check if we still have seconds remaining to format, or if everything went into minute. + second_adjusted = round(second) //used to prevent '1 seconds' being shown + if(day || hour || minute) + if(second_adjusted == 1 && second >= 1) + second = " and 1 second" + else if(second > 1) + second = " and [second_adjusted] seconds" + else //shows a fraction if seconds is < 1 + if(second_rounded) //no sense rounding again if it's already done + second = " and [second] seconds" + else + second = " and [round(second, 0.1)] seconds" + else + if(second_adjusted == 1 && second >= 1) + second = "1 second" + else if(second > 1) + second = "[second_adjusted] seconds" + else + if(second_rounded) + second = "[second] seconds" + else + second = "[round(second, 0.1)] seconds" + else + second = null + + if(!minute) + return "[second]" + if(minute >= 60) + hour = round_down(minute/60,1) + minute = (minute - (hour*60)) + if(minute) //alot simpler from here since you don't have to worry about fractions + if(minute != 1) + if((day || hour) && second) + minute = ", [minute] minutes" + else if((day || hour) && !second) + minute = " and [minute] minutes" + else + minute = "[minute] minutes" + else + if((day || hour) && second) + minute = ", 1 minute" + else if((day || hour) && !second) + minute = " and 1 minute" + else + minute = "1 minute" + else + minute = null + + if(!hour) + return "[minute][second]" + if(hour >= 24) + day = round_down(hour/24,1) + hour = (hour - (day*24)) + if(hour) + if(hour != 1) + if(day && (minute || second)) + hour = ", [hour] hours" + else if(day && (!minute || !second)) + hour = " and [hour] hours" + else + hour = "[hour] hours" + else + if(day && (minute || second)) + hour = ", 1 hour" + else if(day && (!minute || !second)) + hour = " and 1 hour" + else + hour = "1 hour" + else + hour = null + + if(!day) + return "[hour][minute][second]" + if(day > 1) + day = "[day] days" + else + day = "1 day" + + return "[day][hour][minute][second]" +>>>>>>> 74f5a8c... DisplayTimeText mk2 (#30969) diff --git a/code/controllers/subsystem/air.dm b/code/controllers/subsystem/air.dm index e018ccad91..b5dbabb934 100644 --- a/code/controllers/subsystem/air.dm +++ b/code/controllers/subsystem/air.dm @@ -322,7 +322,7 @@ SUBSYSTEM_DEF(air) EG.dismantle() CHECK_TICK - var/msg = "HEY! LISTEN! [(world.timeofday - timer)/10] Seconds were wasted processing [starting_ats] turf(s) (connected to [ending_ats] other turfs) with atmos differences at round start." + var/msg = "HEY! LISTEN! [DisplayTimeText(world.timeofday - timer)] were wasted processing [starting_ats] turf(s) (connected to [ending_ats] other turfs) with atmos differences at round start." to_chat(world, "[msg]") warning(msg) diff --git a/code/controllers/subsystem/server_maint.dm b/code/controllers/subsystem/server_maint.dm index ec34cfb8ed..87b06cd587 100644 --- a/code/controllers/subsystem/server_maint.dm +++ b/code/controllers/subsystem/server_maint.dm @@ -29,7 +29,7 @@ SUBSYSTEM_DEF(server_maint) var/cmob = C.mob if(!(isobserver(cmob) || (isdead(cmob) && C.holder))) log_access("AFK: [key_name(C)]") - to_chat(C, "You have been inactive for more than [config.afk_period / 600] minutes and have been disconnected.") + to_chat(C, "You have been inactive for more than [DisplayTimeText(config.afk_period)] and have been disconnected.") qdel(C) if (!(!C || world.time - C.connection_time < PING_BUFFER_TIME || C.inactivity >= (wait-1))) diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index 4770689778..da003145c5 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -178,7 +178,7 @@ SUBSYSTEM_DEF(shuttle) emergency = backup_shuttle if(world.time - SSticker.round_start_time < config.shuttle_refuel_delay) - to_chat(user, "The emergency shuttle is refueling. Please wait another [abs(round(((world.time - SSticker.round_start_time) - config.shuttle_refuel_delay)/600))] minutes before trying again.") + to_chat(user, "The emergency shuttle is refueling. Please wait [DisplayTimeText((world.time - SSticker.round_start_time) - config.shuttle_refuel_delay)] before trying again.") return switch(emergency.mode) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 220c0e355a..7c10883c1d 100755 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -505,7 +505,7 @@ SUBSYSTEM_DEF(ticker) end_state.count() var/station_integrity = min(PERCENT(GLOB.start_state.score(end_state)), 100) - to_chat(world, "
[GLOB.TAB]Shift Duration: [round(world.time / 36000)]:[add_zero("[world.time / 600 % 60]", 2)]:[world.time / 100 % 6][world.time / 100 % 10]") + to_chat(world, "
[GLOB.TAB]Shift Duration: [DisplayTimeText(world.time - SSticker.round_start_time)]") to_chat(world, "
[GLOB.TAB]Station Integrity: [mode.station_was_nuked ? "Destroyed" : "[station_integrity]%"]") if(mode.station_was_nuked) SSticker.news_report = STATION_DESTROYED_NUKE diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 0dbc7c5d3a..0ea16b32d8 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -169,7 +169,7 @@ SUBSYSTEM_DEF(vote) admin = TRUE if(next_allowed_time > world.time && !admin) - to_chat(usr, "A vote was initiated recently, you must wait roughly [(next_allowed_time-world.time)/10] seconds before a new vote can be started!") + to_chat(usr, "A vote was initiated recently, you must wait [DisplayTimeText(next_allowed_time-world.time)] before a new vote can be started!") return 0 reset() @@ -198,7 +198,7 @@ SUBSYSTEM_DEF(vote) if(mode == "custom") text += "\n[question]" log_vote(text) - to_chat(world, "\n[text]\nType vote or click here to place your votes.\nYou have [config.vote_period/10] seconds to vote.") + to_chat(world, "\n[text]\nType vote or click here to place your votes.\nYou have [DisplayTimeText(config.vote_period)] to vote.") time_remaining = round(config.vote_period/10) for(var/c in GLOB.clients) var/client/C = c diff --git a/code/game/gamemodes/blob/overmind.dm b/code/game/gamemodes/blob/overmind.dm index e22b2747e0..9f8a44bed2 100644 --- a/code/game/gamemodes/blob/overmind.dm +++ b/code/game/gamemodes/blob/overmind.dm @@ -57,7 +57,7 @@ if(!placed) if(manualplace_min_time && world.time >= manualplace_min_time) to_chat(src, "You may now place your blob core.") - to_chat(src, "You will automatically place your blob core in [round((autoplace_max_time - world.time)/600, 0.5)] minutes.") + to_chat(src, "You will automatically place your blob core in [DisplayTimeText(autoplace_max_time - world.time)].") manualplace_min_time = 0 if(autoplace_max_time && world.time >= autoplace_max_time) place_blob_core(base_point_rate, 1) diff --git a/code/game/gamemodes/blob/powers.dm b/code/game/gamemodes/blob/powers.dm index 6baf8b4dbe..026183d951 100644 --- a/code/game/gamemodes/blob/powers.dm +++ b/code/game/gamemodes/blob/powers.dm @@ -365,5 +365,5 @@ to_chat(src, "Shortcuts: Click = Expand Blob | Middle Mouse Click = Rally Spores | Ctrl Click = Create Shield Blob | Alt Click = Remove Blob") to_chat(src, "Attempting to talk will send a message to all other overminds, allowing you to coordinate with them.") if(!placed && autoplace_max_time <= world.time) - to_chat(src, "You will automatically place your blob core in [round((autoplace_max_time - world.time)/600, 0.5)] minutes.") + to_chat(src, "You will automatically place your blob core in [DisplayTimeText(autoplace_max_time - world.time)].") to_chat(src, "You [manualplace_min_time ? "will be able to":"can"] manually place your blob core by pressing the Place Blob Core button in the bottom right corner of the screen.") diff --git a/code/game/gamemodes/clock_cult/clock_effects/spatial_gateway.dm b/code/game/gamemodes/clock_cult/clock_effects/spatial_gateway.dm index a6eb5fb4e7..9b1ef66c9e 100644 --- a/code/game/gamemodes/clock_cult/clock_effects/spatial_gateway.dm +++ b/code/game/gamemodes/clock_cult/clock_effects/spatial_gateway.dm @@ -207,7 +207,7 @@ time_duration = round(time_duration * (2 * efficiency), 1) CO.active = TRUE //you'd be active in a second but you should update immediately invoker.visible_message("The air in front of [invoker] ripples before suddenly tearing open!", \ - "With a word, you rip open a [two_way ? "two-way":"one-way"] rift to [input_target_key]. It will last for [time_duration / 10] seconds and has [gateway_uses] use[gateway_uses > 1 ? "s" : ""].") + "With a word, you rip open a [two_way ? "two-way":"one-way"] rift to [input_target_key]. It will last for [DisplayTimeText(time_duration)] and has [gateway_uses] use[gateway_uses > 1 ? "s" : ""].") var/obj/effect/clockwork/spatial_gateway/S1 = new(issrcobelisk ? get_turf(src) : get_step(get_turf(invoker), invoker.dir)) var/obj/effect/clockwork/spatial_gateway/S2 = new(istargetobelisk ? get_turf(target) : get_step(get_turf(target), target.dir)) diff --git a/code/game/gamemodes/clock_cult/clock_items/clockwork_slab.dm b/code/game/gamemodes/clock_cult/clock_items/clockwork_slab.dm index eecfec7780..bf76cdb2f7 100644 --- a/code/game/gamemodes/clock_cult/clock_items/clockwork_slab.dm +++ b/code/game/gamemodes/clock_cult/clock_items/clockwork_slab.dm @@ -318,23 +318,10 @@ if(servants > SCRIPT_SERVANT_REQ) servants -= SCRIPT_SERVANT_REQ production_time += min(SLAB_SERVANT_SLOWDOWN * servants, SLAB_SLOWDOWN_MAXIMUM) - var/production_text_addon = "" if(production_time != SLAB_PRODUCTION_TIME+SLAB_SLOWDOWN_MAXIMUM) - production_text_addon = ", which increases for each human or silicon Servant above [SCRIPT_SERVANT_REQ]" - production_time = production_time/600 - var/list/production_text - if(round(production_time)) - production_text = list("[round(production_time)] minute\s") - if(production_time != round(production_time)) - production_time -= round(production_time) - production_time *= 60 - if(!LAZYLEN(production_text)) - production_text = list("[round(production_time, 1)] second\s") - else - production_text += " and [round(production_time, 1)] second\s" - production_text += "" - production_text += production_text_addon - production_text = production_text.Join() + production_time = "[DisplayTimeText(production_time)], which increases for each human or silicon Servant above [SCRIPT_SERVANT_REQ]" + else + production_time = "[DisplayTimeText(production_time)]" textlist = list("
[text2ratvar("Purge all untruths and honor Engine.")]

\ \ @@ -439,23 +426,10 @@ if(servants > SCRIPT_SERVANT_REQ) servants -= SCRIPT_SERVANT_REQ production_time += min(SLAB_SERVANT_SLOWDOWN * servants, SLAB_SLOWDOWN_MAXIMUM) - var/production_text_addon = "" if(production_time != SLAB_PRODUCTION_TIME+SLAB_SLOWDOWN_MAXIMUM) - production_text_addon = ", which increases for each human or silicon Servant above [SCRIPT_SERVANT_REQ]" - production_time = production_time/600 - var/list/production_text - if(round(production_time)) - production_text = list("[round(production_time)] minute\s") - if(production_time != round(production_time)) - production_time -= round(production_time) - production_time *= 60 - if(!LAZYLEN(production_text)) - production_text = list("[round(production_time, 1)] second\s") - else - production_text += " and [round(production_time, 1)] second\s" - production_text += "" - production_text += production_text_addon - production_text = production_text.Join() + production_time = "[DisplayTimeText(production_time)], which increases for each human or silicon Servant above [SCRIPT_SERVANT_REQ]" + else + production_time = "[DisplayTimeText(production_time)]" dat += "Components & Their Uses

" dat += "Components are your primary resource as a Servant. There are five types of component, with each one being used in different roles:

" dat += "[get_component_icon(BELLIGERENT_EYE)]BE Belligerent Eyes are aggressive and judgemental, and are used in offensive scripture;
" @@ -466,7 +440,7 @@ dat += "Although this is a good rule of thumb, their effects become much more nuanced when used together. For instance, a turret might have both belligerent eyes and \ vanguard cogwheels as construction requirements, because it defends its allies by harming its enemies.

" dat += "Components' primary use is fueling scripture (covered in its own section), and they can be created through various ways. This clockwork slab, for instance, \ - will make a random component of every type - or a specific one, if you choose a target component from the interface - every [production_text]. This number will increase \ + will make a random component of every type - or a specific one, if you choose a target component from the interface - every [production_time]. This number will increase \ as the amount of Servants in the covenant increase; additionally, slabs can only produce components when held by a Servant, and holding more than one slab will cause both \ of them to halt progress until one of them is removed from their person.

" dat += "Your slab has an internal storage of components, but it isn't meant to be the main one. Instead, there's a global storage of components that can be \ diff --git a/code/game/gamemodes/clock_cult/clock_structures/tinkerers_cache.dm b/code/game/gamemodes/clock_cult/clock_structures/tinkerers_cache.dm index 326aa46c06..cd33cf7adc 100644 --- a/code/game/gamemodes/clock_cult/clock_structures/tinkerers_cache.dm +++ b/code/game/gamemodes/clock_cult/clock_structures/tinkerers_cache.dm @@ -105,7 +105,7 @@ ..() if(is_servant_of_ratvar(user) || isobserver(user)) if(linkedwall) - to_chat(user, "It is linked to a Clockwork Wall and will generate a component every [round(get_production_time() * 0.1, 0.1)] seconds!") + to_chat(user, "It is linked to a Clockwork Wall and will generate a component every [DisplayTimeText(get_production_time())]!") else to_chat(user, "It is unlinked! Construct a Clockwork Wall nearby to generate components!") to_chat(user, "Stored components:") diff --git a/code/game/gamemodes/cult/cult_comms.dm b/code/game/gamemodes/cult/cult_comms.dm index 283376b055..b8cbed5051 100644 --- a/code/game/gamemodes/cult/cult_comms.dm +++ b/code/game/gamemodes/cult/cult_comms.dm @@ -96,7 +96,7 @@ /proc/pollCultists(var/mob/living/Nominee) //Cult Master Poll if(world.time < CULT_POLL_WAIT) - to_chat(Nominee, "It would be premature to select a leader while everyone is still settling in, try again in [round((CULT_POLL_WAIT-world.time)/10)] seconds.") + to_chat(Nominee, "It would be premature to select a leader while everyone is still settling in, try again in [DisplayTimeText(CULT_POLL_WAIT-world.time)].") return GLOB.cult_vote_called = TRUE //somebody's trying to be a master, make sure we don't let anyone else try for(var/datum/mind/B in SSticker.mode.cult) @@ -232,7 +232,7 @@ return FALSE if(cooldown > world.time) if(!CM.active) - to_chat(owner, "You need to wait [round((cooldown - world.time) * 0.1)] seconds before you can mark another target!") + to_chat(owner, "You need to wait [DisplayTimeText(cooldown - world.time)] before you can mark another target!") return FALSE return ..() @@ -324,7 +324,7 @@ return FALSE if(cooldown > world.time) if(!PM.active) - to_chat(owner, "You need to wait [round((cooldown - world.time) * 0.1)] seconds before you can pulse again!") + to_chat(owner, "You need to wait [DisplayTimeText(cooldown - world.time)] before you can pulse again!") return FALSE return ..() diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index 0cba943287..c1ccf9a368 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -10,7 +10,7 @@ ..() to_chat(user, "\The [src] is [anchored ? "":"not "]secured to the floor.") if((iscultist(user) || isobserver(user)) && cooldowntime > world.time) - to_chat(user, "The magic in [src] is too weak, [p_they()] will be ready to use again in [getETA()].") + to_chat(user, "The magic in [src] is too weak, [p_they()] will be ready to use again in [DisplayTimeText(cooldowntime - world.time)].") /obj/structure/destructible/cult/examine_status(mob/user) if(iscultist(user) || isobserver(user)) @@ -50,13 +50,6 @@ animate(src, color = previouscolor, time = 8) addtimer(CALLBACK(src, /atom/proc/update_atom_colour), 8) -/obj/structure/destructible/cult/proc/getETA() - var/time = (cooldowntime - world.time)/600 - var/eta = "[round(time, 1)] minutes" - if(time <= 1) - time = (cooldowntime - world.time)*0.1 - eta = "[round(time, 1)] seconds" - return eta /obj/structure/destructible/cult/talisman name = "altar" @@ -72,7 +65,7 @@ to_chat(user, "You need to anchor [src] to the floor with a tome first.") return if(cooldowntime > world.time) - to_chat(user, "The magic in [src] is weak, it will be ready to use again in [getETA()].") + to_chat(user, "The magic in [src] is weak, it will be ready to use again in [DisplayTimeText(cooldowntime - world.time)].") return var/choice = alert(user,"You study the schematics etched into the forge...",,"Eldritch Whetstone","Zealot's Blindfold","Flask of Unholy Water") var/pickedtype @@ -105,7 +98,7 @@ to_chat(user, "You need to anchor [src] to the floor with a tome first.") return if(cooldowntime > world.time) - to_chat(user, "The magic in [src] is weak, it will be ready to use again in [getETA()].") + to_chat(user, "The magic in [src] is weak, it will be ready to use again in [DisplayTimeText(cooldowntime - world.time)].") return var/choice = alert(user,"You study the schematics etched into the forge...",,"Shielded Robe","Flagellant's Robe","Nar-Sien Hardsuit") var/pickedtype @@ -212,7 +205,7 @@ to_chat(user, "You need to anchor [src] to the floor with a tome first.") return if(cooldowntime > world.time) - to_chat(user, "The magic in [src] is weak, it will be ready to use again in [getETA()].") + to_chat(user, "The magic in [src] is weak, it will be ready to use again in [DisplayTimeText(cooldowntime - world.time)].") return var/choice = alert(user,"You flip through the black pages of the archives...",,"Supply Talisman","Shuttle Curse","Veil Walker Set") var/list/pickedtype = list() diff --git a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm index 182b7e2756..0a7427b610 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm @@ -13,7 +13,7 @@ var/flash = " - || - " var/obj/machinery/abductor/console/console var/message_cooldown = 0 - var/breakout_time = 0.75 + var/breakout_time = 450 /obj/machinery/abductor/experiment/MouseDrop_T(mob/target, mob/user) if(user.stat || user.lying || !Adjacent(user) || !target.Adjacent(user) || !ishuman(target)) @@ -50,9 +50,9 @@ user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT user.visible_message("You see [user] kicking against the door of [src]!", \ - "You lean on the back of [src] and start pushing the door open... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)", \ + "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a metallic creaking from [src].") - if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds + if(do_after(user,(breakout_time), target = src)) if(!user || user.stat != CONSCIOUS || user.loc != src || state_open) return user.visible_message("[user] successfully broke out of [src]!", \ diff --git a/code/game/gamemodes/nuclear/nuclear_challenge.dm b/code/game/gamemodes/nuclear/nuclear_challenge.dm index 7b2a20a297..f51b9ac914 100644 --- a/code/game/gamemodes/nuclear/nuclear_challenge.dm +++ b/code/game/gamemodes/nuclear/nuclear_challenge.dm @@ -19,7 +19,7 @@ return declaring_war = TRUE - var/are_you_sure = alert(user, "Consult your team carefully before you declare war on [station_name()]]. Are you sure you want to alert the enemy crew? You have [-round((world.time-SSticker.round_start_time - CHALLENGE_TIME_LIMIT)/10)] seconds to decide", "Declare war?", "Yes", "No") + var/are_you_sure = alert(user, "Consult your team carefully before you declare war on [station_name()]]. Are you sure you want to alert the enemy crew? You have [DisplayTimeText(world.time-SSticker.round_start_time - CHALLENGE_TIME_LIMIT)] to decide", "Declare war?", "Yes", "No") declaring_war = FALSE if(!check_allowed(user)) diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm index 4f691e053f..8a4c854d76 100644 --- a/code/game/machinery/ai_slipper.dm +++ b/code/game/machinery/ai_slipper.dm @@ -43,7 +43,7 @@ to_chat(user, "[src] is out of foam and cannot be activated.") return if(cooldown_time > world.time) - to_chat(user, "[src] cannot be activated for another [round((world.time - cooldown_time) * 0.1)] second\s.") + to_chat(user, "[src] cannot be activated for [DisplayTimeText(world.time - cooldown_time)].") return new /obj/effect/particle_effect/foam(loc) uses-- diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm index aafe74f2b3..105fb64042 100644 --- a/code/game/machinery/computer/dna_console.dm +++ b/code/game/machinery/computer/dna_console.dm @@ -169,7 +169,7 @@ if("working") temp_html += status temp_html += "

System Busy

" - temp_html += "Working ... Please wait ([radduration] Seconds)" + temp_html += "Working ... Please wait ([DisplayTimeText(radduration)])" if("buffer") temp_html += status temp_html += buttons diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index 943419c548..48103a455f 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /obj/machinery/computer/pod name = "mass driver launch control" desc = "A combined blastdoor and mass driver control unit." @@ -142,4 +143,149 @@ /obj/machinery/computer/pod/old/swf name = "\improper Magix System IV" - desc = "An arcane artifact that holds much magic. Running E-Knock 2.2: Sorceror's Edition" \ No newline at end of file + desc = "An arcane artifact that holds much magic. Running E-Knock 2.2: Sorceror's Edition" +======= +/obj/machinery/computer/pod + name = "mass driver launch control" + desc = "A combined blastdoor and mass driver control unit." + var/obj/machinery/mass_driver/connected = null + var/title = "Mass Driver Controls" + var/id = 1 + var/timing = 0 + var/time = 30 + var/range = 4 + + +/obj/machinery/computer/pod/Initialize() + . = ..() + for(var/obj/machinery/mass_driver/M in range(range, src)) + if(M.id == id) + connected = M + + +/obj/machinery/computer/pod/proc/alarm() + if(stat & (NOPOWER|BROKEN)) + return + + if(!connected) + say("Cannot locate mass driver connector. Cancelling firing sequence!") + return + + for(var/obj/machinery/door/poddoor/M in range(range, src)) + if(M.id == id) + M.open() + + sleep(20) + for(var/obj/machinery/mass_driver/M in range(range, src)) + if(M.id == id) + M.power = connected.power + M.drive() + + sleep(50) + for(var/obj/machinery/door/poddoor/M in range(range, src)) + if(M.id == id) + M.close() + +/obj/machinery/computer/pod/attack_hand(mob/user) + if(..()) + return + + var/dat = "" + user.set_machine(src) + if(connected) + var/d2 + if(timing) //door controls do not need timers. + d2 = "Stop Time Launch" + else + d2 = "Initiate Time Launch" + dat += "
\nTimer System: [d2]\nTime Left: [DisplayTimeText(time)] - - + +" + var/temp = "" + var/list/L = list( 0.25, 0.5, 1, 2, 4, 8, 16 ) + for(var/t in L) + if(t == connected.power) + temp += "[t] " + else + temp += "[t] " + dat += "
\nPower Level: [temp]
\nFiring Sequence
\nTest Fire Driver
\nToggle Outer Door
" + else + dat += "
\nToggle Outer Door
" + dat += "

Close" + add_fingerprint(usr) + var/datum/browser/popup = new(user, "computer", title, 400, 500) + popup.set_content(dat) + popup.set_title_image(user.browse_rsc_icon(icon, icon_state)) + popup.open() + + +/obj/machinery/computer/pod/process() + if(!..()) + return + if(timing) + if(time > 0) + time = round(time) - 1 + else + alarm() + time = 0 + timing = 0 + updateDialog() + + +/obj/machinery/computer/pod/Topic(href, href_list) + if(..()) + return + if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || issilicon(usr)) + usr.set_machine(src) + if(href_list["power"]) + var/t = text2num(href_list["power"]) + t = min(max(0.25, t), 16) + if(connected) + connected.power = t + if(href_list["alarm"]) + alarm() + if(href_list["time"]) + timing = text2num(href_list["time"]) + if(href_list["tp"]) + var/tp = text2num(href_list["tp"]) + time += tp + time = min(max(round(time), 0), 120) + if(href_list["door"]) + for(var/obj/machinery/door/poddoor/M in range(range, src)) + if(M.id == id) + if(M.density) + M.open() + else + M.close() + if(href_list["drive"]) + for(var/obj/machinery/mass_driver/M in range(range, src)) + if(M.id == id) + M.power = connected.power + M.drive() + updateUsrDialog() + + +/obj/machinery/computer/pod/old + name = "\improper DoorMex control console" + title = "Door Controls" + icon_state = "oldcomp" + icon_screen = "library" + icon_keyboard = null + + +/obj/machinery/computer/pod/old/syndicate + name = "\improper ProComp Executive IIc" + desc = "The Syndicate operate on a tight budget. Operates external airlocks." + title = "External Airlock Controls" + req_access = list(ACCESS_SYNDICATE) + +/obj/machinery/computer/pod/old/syndicate/attack_hand(mob/user) + if(!allowed(user)) + to_chat(user, "Access denied.") + return + else + ..() + + +/obj/machinery/computer/pod/old/swf + name = "\improper Magix System IV" + desc = "An arcane artifact that holds much magic. Running E-Knock 2.2: Sorceror's Edition" +>>>>>>> 74f5a8c... DisplayTimeText mk2 (#30969) diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm index 9ba8e1d34d..f919bdbab8 100644 --- a/code/game/machinery/dance_machine.dm +++ b/code/game/machinery/dance_machine.dm @@ -96,7 +96,7 @@ dat += "
" dat += " Select Track
" dat += "Track Selected: [selection.song_name]
" - dat += "Track Length: [selection.song_length/10] seconds

" + dat += "Track Length: [DisplayTimeText(selection.song_length)]

" dat += "
DJ's Soundboard:
" dat +="
" dat += "Air Horn " @@ -122,7 +122,7 @@ return if(!active) if(stop > world.time) - to_chat(usr, "Error: The device is still resetting from the last activation, it will be ready again in [round((stop-world.time)/10)] seconds.") + to_chat(usr, "Error: The device is still resetting from the last activation, it will be ready again in [DisplayTimeText(stop-world.time)].") playsound(src, 'sound/misc/compiler-failure.ogg', 50, 1) return active = TRUE diff --git a/code/game/machinery/dna_scanner.dm b/code/game/machinery/dna_scanner.dm index 4085b4edb4..034a260925 100644 --- a/code/game/machinery/dna_scanner.dm +++ b/code/game/machinery/dna_scanner.dm @@ -15,7 +15,7 @@ var/scan_level var/precision_coeff var/message_cooldown - var/breakout_time = 2 + var/breakout_time = 1200 /obj/machinery/dna_scannernew/RefreshParts() scan_level = 0 @@ -73,9 +73,9 @@ user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT user.visible_message("You see [user] kicking against the door of [src]!", \ - "You lean on the back of [src] and start pushing the door open... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)", \ + "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a metallic creaking from [src].") - if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds + if(do_after(user,(breakout_time), target = src)) if(!user || user.stat != CONSCIOUS || user.loc != src || state_open || !locked) return locked = FALSE diff --git a/code/game/machinery/gulag_teleporter.dm b/code/game/machinery/gulag_teleporter.dm index d77e91af90..2d7c7708b3 100644 --- a/code/game/machinery/gulag_teleporter.dm +++ b/code/game/machinery/gulag_teleporter.dm @@ -20,7 +20,7 @@ The console is located at computer/gulag_teleporter.dm circuit = /obj/item/circuitboard/machine/gulag_teleporter var/locked = FALSE var/message_cooldown - var/breakout_time = 1 + var/breakout_time = 600 var/jumpsuit_type = /obj/item/clothing/under/rank/prisoner var/shoes_type = /obj/item/clothing/shoes/sneakers/orange var/obj/machinery/gulag_item_reclaimer/linked_reclaimer @@ -104,9 +104,9 @@ The console is located at computer/gulag_teleporter.dm user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT user.visible_message("You see [user] kicking against the door of [src]!", \ - "You lean on the back of [src] and start pushing the door open... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)", \ + "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a metallic creaking from [src].") - if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds + if(do_after(user,(breakout_time), target = src)) if(!user || user.stat != CONSCIOUS || user.loc != src || state_open || !locked) return locked = FALSE diff --git a/code/game/machinery/quantum_pad.dm b/code/game/machinery/quantum_pad.dm index e86f78722b..6af0240214 100644 --- a/code/game/machinery/quantum_pad.dm +++ b/code/game/machinery/quantum_pad.dm @@ -79,7 +79,7 @@ return if(world.time < last_teleport + teleport_cooldown) - to_chat(user, "[src] is recharging power. Please wait [round((last_teleport + teleport_cooldown - world.time) / 10)] seconds.") + to_chat(user, "[src] is recharging power. Please wait [DisplayTimeText(last_teleport + teleport_cooldown - world.time)].") return if(teleporting) diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index a78fa50a6a..7c51c383fa 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -27,7 +27,7 @@ var/uv_super = FALSE var/uv_cycles = 6 var/message_cooldown - var/breakout_time = 0.5 + var/breakout_time = 300 /obj/machinery/suit_storage_unit/standard_unit suit_type = /obj/item/clothing/suit/space/eva @@ -267,9 +267,9 @@ user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT user.visible_message("You see [user] kicking against the doors of [src]!", \ - "You start kicking against the doors... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)", \ + "You start kicking against the doors... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a thump from [src].") - if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds + if(do_after(user,(breakout_time), target = src)) if(!user || user.stat != CONSCIOUS || user.loc != src ) return user.visible_message("[user] successfully broke out of [src]!", \ diff --git a/code/game/objects/effects/spiders.dm b/code/game/objects/effects/spiders.dm index 400cd0478e..f143636512 100644 --- a/code/game/objects/effects/spiders.dm +++ b/code/game/objects/effects/spiders.dm @@ -206,12 +206,12 @@ . = ..() /obj/structure/spider/cocoon/container_resist(mob/living/user) - var/breakout_time = 1 + var/breakout_time = 600 user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT - to_chat(user, "You struggle against the tight bonds... (This will take about [breakout_time] minutes.)") + to_chat(user, "You struggle against the tight bonds... (This will take about [DisplayTimeText(breakout_time)].)") visible_message("You see something struggling and writhing in \the [src]!") - if(do_after(user,(breakout_time*60*10), target = src)) + if(do_after(user,(breakout_time), target = src)) if(!user || user.stat != CONSCIOUS || user.loc != src) return qdel(src) diff --git a/code/game/objects/items/charter.dm b/code/game/objects/items/charter.dm index 3edb5be090..ee7a91140c 100644 --- a/code/game/objects/items/charter.dm +++ b/code/game/objects/items/charter.dm @@ -59,7 +59,7 @@ to_chat(user, "Your name has been sent to your employers for approval.") // Autoapproves after a certain time response_timer_id = addtimer(CALLBACK(src, .proc/rename_station, new_name, user.name, user.real_name, key_name(user)), approval_time, TIMER_STOPPABLE) - to_chat(GLOB.admins, "CUSTOM STATION RENAME:[ADMIN_LOOKUPFLW(user)] proposes to rename the [name_type] to [new_name] (will autoapprove in [approval_time / 10] seconds). [ADMIN_SMITE(user)] (REJECT) [ADMIN_CENTCOM_REPLY(user)]") + to_chat(GLOB.admins, "CUSTOM STATION RENAME:[ADMIN_LOOKUPFLW(user)] proposes to rename the [name_type] to [new_name] (will autoapprove in [DisplayTimeText(approval_time)]). [ADMIN_SMITE(user)] (REJECT) [ADMIN_CENTCOM_REPLY(user)]") /obj/item/station_charter/proc/reject_proposed(user) if(!user) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 31e5b70732..7d3eabfdc6 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -181,7 +181,7 @@ MASS SPECTROMETER to_chat(user, "Time of Death: [M.tod]") var/tdelta = round(world.time - M.timeofdeath) if(tdelta < (DEFIB_TIME_LIMIT * 10)) - to_chat(user, "Subject died [tdelta / 10] seconds ago, defibrillation may be possible!") + to_chat(user, "Subject died [DisplayTimeText(tdelta)] ago, defibrillation may be possible!") for(var/thing in M.viruses) var/datum/disease/D = thing diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index 2cc0ab0417..663eed0a8d 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -111,7 +111,6 @@ effective or pretty fucking useless. /obj/item/device/healthanalyzer/rad_laser/interact(mob/user) user.set_machine(src) - var/cooldown = GetCooldown() var/dat = "Irradiation: [irradiate ? "On" : "Off"]
" dat += "Stealth Mode (NOTE: Deactivates automatically while Irradiation is off): [stealth ? "On" : "Off"]
" dat += "Scan Mode: " @@ -133,7 +132,7 @@ effective or pretty fucking useless. -- [(wavelength+(intensity*4))] ++
- Laser Cooldown: [cooldown] Seconds
+ Laser Cooldown: [DisplayTimeText(GetCooldown())]
"} var/datum/browser/popup = new(user, "radlaser", "Radioactive Microlaser Interface", 400, 240) diff --git a/code/game/objects/items/implants/implantchair.dm b/code/game/objects/items/implants/implantchair.dm index 76c61ade81..8d252cb5af 100644 --- a/code/game/objects/items/implants/implantchair.dm +++ b/code/game/objects/items/implants/implantchair.dm @@ -20,7 +20,7 @@ var/special = FALSE var/special_name = "special function" var/message_cooldown - var/breakout_time = 1 + var/breakout_time = 600 /obj/machinery/implantchair/Initialize() . = ..() @@ -124,9 +124,9 @@ user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT user.visible_message("You see [user] kicking against the door of [src]!", \ - "You lean on the back of [src] and start pushing the door open... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)", \ + "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a metallic creaking from [src].") - if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds + if(do_after(user,(breakout_time), target = src)) if(!user || user.stat != CONSCIOUS || user.loc != src || state_open) return user.visible_message("[user] successfully broke out of [src]!", \ diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index e15f0446a5..c7b63be32b 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -15,7 +15,7 @@ max_integrity = 200 integrity_failure = 50 armor = list(melee = 20, bullet = 10, laser = 10, energy = 0, bomb = 10, bio = 0, rad = 0, fire = 70, acid = 60) - var/breakout_time = 2 + var/breakout_time = 1200 var/message_cooldown var/can_weld_shut = TRUE var/horizontal = FALSE @@ -366,9 +366,9 @@ user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT user.visible_message("[src] begins to shake violently!", \ - "You lean on the back of [src] and start pushing the door open... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)", \ + "You lean on the back of [src] and start pushing the door open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear banging from [src].") - if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds + if(do_after(user,(breakout_time), target = src)) if(!user || user.stat != CONSCIOUS || user.loc != src || opened || (!locked && !welded) ) return //we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting diff --git a/code/game/objects/structures/crates_lockers/crates/critter.dm b/code/game/objects/structures/crates_lockers/crates/critter.dm index 3f631883c1..579ebd45c7 100644 --- a/code/game/objects/structures/crates_lockers/crates/critter.dm +++ b/code/game/objects/structures/crates_lockers/crates/critter.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /obj/structure/closet/crate/critter name = "critter crate" desc = "A crate designed for safe transport of animals. It has an oxygen tank for safe transport in space." @@ -35,4 +36,43 @@ if(tank) return tank.air_contents else +======= +/obj/structure/closet/crate/critter + name = "critter crate" + desc = "A crate designed for safe transport of animals. It has an oxygen tank for safe transport in space." + icon_state = "crittercrate" + horizontal = FALSE + allow_objects = FALSE + breakout_time = 600 + material_drop = /obj/item/stack/sheet/mineral/wood + material_drop_amount = 4 + delivery_icon = "deliverybox" + var/obj/item/tank/internals/emergency_oxygen/tank + +/obj/structure/closet/crate/critter/New() + ..() + tank = new + +/obj/structure/closet/crate/critter/Destroy() + var/turf/T = get_turf(src) + if(tank) + tank.forceMove(T) + tank = null + + return ..() + +/obj/structure/closet/crate/critter/update_icon() + cut_overlays() + if(opened) + add_overlay("crittercrate_door_open") + else + add_overlay("crittercrate_door") + if(manifest) + add_overlay("manifest") + +/obj/structure/closet/crate/critter/return_air() + if(tank) + return tank.air_contents + else +>>>>>>> 74f5a8c... DisplayTimeText mk2 (#30969) return loc.return_air() \ No newline at end of file diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index f4a98811c0..a5def04e0b 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -24,7 +24,7 @@ var/locked = FALSE var/opendir = SOUTH var/message_cooldown - var/breakout_time = 1 + var/breakout_time = 600 /obj/structure/bodycontainer/Destroy() open() @@ -97,9 +97,9 @@ user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT user.visible_message(null, \ - "You lean on the back of [src] and start pushing the tray open... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)", \ + "You lean on the back of [src] and start pushing the tray open... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a metallic creaking from [src].") - if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds + if(do_after(user,(breakout_time), target = src)) if(!user || user.stat != CONSCIOUS || user.loc != src ) return user.visible_message("[user] successfully broke out of [src]!", \ diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index 467f846b3a..39e07e0a9f 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -317,7 +317,7 @@ dat += "Replacement Game Mode: [SSticker.mode.replacementmode.name]
" else dat += "Current Game Mode: [SSticker.mode.name]
" - dat += "Round Duration: [round(world.time / 36000)]:[add_zero("[world.time / 600 % 60]", 2)]:[world.time / 100 % 6][world.time / 100 % 10]
" + dat += "Round Duration: [DisplayTimeText(world.time - SSticker.round_start_time)]
" dat += "Emergency shuttle
" if(EMERGENCY_IDLE_OR_RECALLED) dat += "Call Shuttle
" diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm index 4cbac86270..0842d82553 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm @@ -114,7 +114,7 @@ end_time -= start_time to_chat(usr, "SDQL query results: [query_text]") to_chat(usr, "SDQL query completed: [objs_all] objects selected by path, and [objs_eligible] objects executed on after WHERE filtering if applicable.") - to_chat(usr, "SDQL query took [end_time/10] seconds to complete.") + to_chat(usr, "SDQL query took [DisplayTimeText(end_time)] to complete.") /proc/SDQL_qdel_datum(datum/d) qdel(d) diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm index 16f654bb80..47f240424f 100644 --- a/code/modules/admin/verbs/adminhelp.dm +++ b/code/modules/admin/verbs/adminhelp.dm @@ -399,9 +399,9 @@ GLOBAL_DATUM_INIT(ahelp_tickets, /datum/admin_help_tickets, new) dat += "
[GLOB.TAB][TicketHref("Refresh", ref_src)][GLOB.TAB][TicketHref("Re-Title", ref_src, "retitle")]" if(state != AHELP_ACTIVE) dat += "[GLOB.TAB][TicketHref("Reopen", ref_src, "reopen")]" - dat += "

Opened at: [gameTimestamp(wtime = opened_at)] (Approx [(world.time - opened_at) / 600] minutes ago)" + dat += "

Opened at: [gameTimestamp(wtime = opened_at)] (Approx [DisplayTimeText(world.time - opened_at)] ago)" if(closed_at) - dat += "
Closed at: [gameTimestamp(wtime = closed_at)] (Approx [(world.time - closed_at) / 600] minutes ago)" + dat += "
Closed at: [gameTimestamp(wtime = closed_at)] (Approx [DisplayTimeText(world.time - closed_at)] ago)" dat += "

" if(initiator) dat += "Actions: [FullMonty(ref_src)]
" diff --git a/code/modules/admin/verbs/diagnostics.dm b/code/modules/admin/verbs/diagnostics.dm index a4482154d8..68df8a6666 100644 --- a/code/modules/admin/verbs/diagnostics.dm +++ b/code/modules/admin/verbs/diagnostics.dm @@ -43,8 +43,8 @@ log_admin("DEBUG: [key_name(M)] next_move = [M.next_move] lastDblClick = [M.next_click] world.time = [world.time]") M.next_move = 1 M.next_click = 0 - message_admins("[key_name_admin(largest_move_mob)] had the largest move delay with [largest_move_time] frames / [largest_move_time/10] seconds!") - message_admins("[key_name_admin(largest_click_mob)] had the largest click delay with [largest_click_time] frames / [largest_click_time/10] seconds!") + message_admins("[key_name_admin(largest_move_mob)] had the largest move delay with [largest_move_time] frames / [DisplayTimeText(largest_move_time)]!") + message_admins("[key_name_admin(largest_click_mob)] had the largest click delay with [largest_click_time] frames / [DisplayTimeText(largest_click_time)]!") message_admins("world.time = [world.time]") SSblackbox.add_details("admin_verb","Unfreeze Everyone") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 2e0d1f3805..e368fdde92 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -33,7 +33,7 @@ var/escape_in_progress = FALSE var/message_cooldown - var/breakout_time = 0.5 + var/breakout_time = 300 /obj/machinery/atmospherics/components/unary/cryo_cell/Initialize() . = ..() @@ -246,9 +246,9 @@ user.changeNext_move(CLICK_CD_BREAKOUT) user.last_special = world.time + CLICK_CD_BREAKOUT user.visible_message("You see [user] kicking against the glass of [src]!", \ - "You struggle inside [src], kicking the release with your foot... (this will take about [(breakout_time<1) ? "[breakout_time*60] seconds" : "[breakout_time] minute\s"].)", \ + "You struggle inside [src], kicking the release with your foot... (this will take about [DisplayTimeText(breakout_time)].)", \ "You hear a thump from [src].") - if(do_after(user,(breakout_time*60*10), target = src)) //minutes * 60seconds * 10deciseconds + if(do_after(user,(breakout_time), target = src)) if(!user || user.stat != CONSCIOUS || user.loc != src ) return user.visible_message("[user] successfully broke out of [src]!", \ diff --git a/code/modules/awaymissions/capture_the_flag.dm b/code/modules/awaymissions/capture_the_flag.dm index 0bed5b94c7..2dc38a48f2 100644 --- a/code/modules/awaymissions/capture_the_flag.dm +++ b/code/modules/awaymissions/capture_the_flag.dm @@ -210,7 +210,7 @@ return if(user.ckey in team_members) if(user.ckey in recently_dead_ckeys) - to_chat(user, "It must be more than [respawn_cooldown/10] seconds from your last death to respawn!") + to_chat(user, "It must be more than [DisplayTimeText(respawn_cooldown)] from your last death to respawn!") return var/client/new_team_member = user.client if(user.mind && user.mind.current) diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index ed7fb77bac..9a721bee62 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -123,7 +123,7 @@ GLOBAL_DATUM(the_gateway, /obj/machinery/gateway/centerstation) to_chat(user, "Error: No destination found.") return if(world.time < wait) - to_chat(user, "Error: Warpspace triangulation in progress. Estimated time to completion: [round(((wait - world.time) / 10) / 60)] minutes.") + to_chat(user, "Error: Warpspace triangulation in progress. Estimated time to completion: [DisplayTimeText(wait - world.time)].") return for(var/obj/machinery/gateway/G in linked) diff --git a/code/modules/error_handler/error_handler.dm b/code/modules/error_handler/error_handler.dm index b777ce3f1c..c0c8cf5b74 100644 --- a/code/modules/error_handler/error_handler.dm +++ b/code/modules/error_handler/error_handler.dm @@ -88,7 +88,7 @@ GLOBAL_VAR_INIT(total_runtimes_skipped, 0) if(usrinfo) //If this info isn't null, it hasn't been added yet desclines.Add(usrinfo) if(silencing) - desclines += " (This error will now be silenced for [configured_error_silence_time / 600] minutes)" + desclines += " (This error will now be silenced for [DisplayTimeText(configured_error_silence_time)])" if(GLOB.error_cache) GLOB.error_cache.log_error(E, desclines) diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index c1dd6a662e..4ecf2845db 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -392,12 +392,7 @@ /mob/dead/new_player/proc/LateChoices() - var/mills = world.time - SSticker.round_start_time // 1/10 of a second, not real milliseconds but whatever - //var/secs = ((mills % 36000) % 600) / 10 //Not really needed, but I'll leave it here for refrence.. or something - var/mins = (mills % 36000) / 600 - var/hours = mills / 36000 - - var/dat = "
Round Duration: [round(hours)]h [round(mins)]m
" + var/dat = "
Round Duration: [DisplayTimeText(world.time - SSticker.round_start_time)]
" if(SSshuttle.emergency) switch(SSshuttle.emergency.mode) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 4109166ebd..aa72ebfa9f 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -302,10 +302,9 @@ return I.being_removed = TRUE breakouttime = I.breakouttime - var/displaytime = breakouttime / 600 if(!cuff_break) visible_message("[src] attempts to remove [I]!") - to_chat(src, "You attempt to remove [I]... (This will take around [displaytime] minutes and you need to stand still.)") + to_chat(src, "You attempt to remove [I]... (This will take around [DisplayTimeText(breakouttime)] and you need to stand still.)") if(do_after(src, breakouttime, 0, target = src)) clear_cuffs(I, cuff_break) else diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 58b0c673a7..917242609e 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -235,7 +235,7 @@ if(!I || I.loc != src) //no item, no limb, or item is not in limb or in the person anymore return var/time_taken = I.embedded_unsafe_removal_time*I.w_class - usr.visible_message("[usr] attempts to remove [I] from their [L.name].","You attempt to remove [I] from your [L.name]... (It will take [time_taken/10] seconds.)") + usr.visible_message("[usr] attempts to remove [I] from their [L.name].","You attempt to remove [I] from your [L.name]... (It will take [DisplayTimeText(time_taken)].)") if(do_after(usr, time_taken, needhand = 1, target = src)) if(!I || !L || I.loc != src || !(I in L.embedded_objects)) return diff --git a/code/modules/mob/living/silicon/ai/say.dm b/code/modules/mob/living/silicon/ai/say.dm index 4d0453a17c..e148bd2763 100644 --- a/code/modules/mob/living/silicon/ai/say.dm +++ b/code/modules/mob/living/silicon/ai/say.dm @@ -97,7 +97,7 @@ /mob/living/silicon/ai/proc/announcement() var/static/announcing_vox = 0 // Stores the time of the last announcement if(announcing_vox > world.time) - to_chat(src, "Please wait [round((announcing_vox - world.time) / 10)] seconds.") + to_chat(src, "Please wait [DisplayTimeText(announcing_vox - world.time)].") return var/message = input(src, "WARNING: Misuse of this verb can result in you being job banned. More help is available in 'Announcement Help'", "Announcement", src.last_announcement) as text diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index d8a2985594..144f7081e0 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -159,7 +159,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians resulthealth = round((summoner.health / summoner.maxHealth) * 100, 0.5) stat(null, "Summoner Health: [resulthealth]%") if(cooldown >= world.time) - stat(null, "Manifest/Recall Cooldown Remaining: [max(round((cooldown - world.time)*0.1, 0.1), 0)] seconds") + stat(null, "Manifest/Recall Cooldown Remaining: [DisplayTimeText(cooldown - world.time)]") /mob/living/simple_animal/hostile/guardian/Move() //Returns to summoner if they move out of range . = ..() diff --git a/code/modules/mob/living/simple_animal/guardian/types/assassin.dm b/code/modules/mob/living/simple_animal/guardian/types/assassin.dm index 9632ce3ff9..45d8c17d0c 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/assassin.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/assassin.dm @@ -30,7 +30,7 @@ ..() if(statpanel("Status")) if(stealthcooldown >= world.time) - stat(null, "Stealth Cooldown Remaining: [max(round((stealthcooldown - world.time)*0.1, 0.1), 0)] seconds") + stat(null, "Stealth Cooldown Remaining: [DisplayTimeText(stealthcooldown - world.time)]") /mob/living/simple_animal/hostile/guardian/assassin/AttackingTarget() . = ..() @@ -79,7 +79,7 @@ updatestealthalert() toggle = TRUE else if(!forced) - to_chat(src, "You cannot yet enter stealth, wait another [max(round((stealthcooldown - world.time)*0.1, 0.1), 0)] seconds!") + to_chat(src, "You cannot yet enter stealth, wait another [DisplayTimeText(stealthcooldown - world.time)]!") /mob/living/simple_animal/hostile/guardian/assassin/proc/updatestealthalert() if(stealthcooldown <= world.time) diff --git a/code/modules/mob/living/simple_animal/guardian/types/explosive.dm b/code/modules/mob/living/simple_animal/guardian/types/explosive.dm index 45c093bbf2..c21b1474d8 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/explosive.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/explosive.dm @@ -14,7 +14,7 @@ ..() if(statpanel("Status")) if(bomb_cooldown >= world.time) - stat(null, "Bomb Cooldown Remaining: [max(round((bomb_cooldown - world.time)*0.1, 0.1), 0)] seconds") + stat(null, "Bomb Cooldown Remaining: [DisplayTimeText(bomb_cooldown - world.time)]") /mob/living/simple_animal/hostile/guardian/bomb/AttackingTarget() . = ..() diff --git a/code/modules/mob/living/simple_animal/guardian/types/support.dm b/code/modules/mob/living/simple_animal/guardian/types/support.dm index 33ad25291c..db1581d8cb 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/support.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/support.dm @@ -24,7 +24,7 @@ ..() if(statpanel("Status")) if(beacon_cooldown >= world.time) - stat(null, "Beacon Cooldown Remaining: [max(round((beacon_cooldown - world.time)*0.1, 0.1), 0)] seconds") + stat(null, "Beacon Cooldown Remaining: [DisplayTimeText(beacon_cooldown - world.time)]") /mob/living/simple_animal/hostile/guardian/healer/AttackingTarget() . = ..() diff --git a/code/modules/shuttle/syndicate.dm b/code/modules/shuttle/syndicate.dm index b21df4000c..1c3d416fd0 100644 --- a/code/modules/shuttle/syndicate.dm +++ b/code/modules/shuttle/syndicate.dm @@ -20,7 +20,7 @@ if(href_list["move"]) var/obj/item/circuitboard/computer/syndicate_shuttle/board = circuit if(board.challenge && world.time < SYNDICATE_CHALLENGE_TIMER) - to_chat(usr, "You've issued a combat challenge to the station! You've got to give them at least [round(((SYNDICATE_CHALLENGE_TIMER - world.time) / 10) / 60)] more minutes to allow them to prepare.") + to_chat(usr, "You've issued a combat challenge to the station! You've got to give them at least [DisplayTimeText(SYNDICATE_CHALLENGE_TIMER - world.time)] more to allow them to prepare.") return 0 board.moved = TRUE ..() diff --git a/code/modules/stock_market/computer.dm b/code/modules/stock_market/computer.dm index d693b86527..90ad08c4bb 100644 --- a/code/modules/stock_market/computer.dm +++ b/code/modules/stock_market/computer.dm @@ -82,7 +82,7 @@ a.updated { mystocks = S.shareholders[logged_in] dat += "
[S.name] ([S.short_name])[S.bankrupt ? " BANKRUPT" : null]
" if (S.last_unification) - dat += "Unified shares [(world.time - S.last_unification) / 600] minutes ago.
" + dat += "Unified shares [DisplayTimeText(world.time - S.last_unification)] ago.
" dat += "Current value per share: [S.current_value] | View history

" dat += "You currently own [mystocks] shares in this company. There are [S.available_shares] purchasable shares on the market currently.
" if (S.bankrupt) diff --git a/code/modules/surgery/organs/augments_chest.dm b/code/modules/surgery/organs/augments_chest.dm index bdd385bcac..7fd09d69c2 100644 --- a/code/modules/surgery/organs/augments_chest.dm +++ b/code/modules/surgery/organs/augments_chest.dm @@ -61,7 +61,7 @@ else cooldown = revive_cost + world.time reviving = FALSE - to_chat(owner, "Your reviver implant shuts down and starts recharging. It will be ready again in [revive_cost/10] seconds.") + to_chat(owner, "Your reviver implant shuts down and starts recharging. It will be ready again in [DisplayTimeText(revive_cost)].") return if(cooldown > world.time) diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm index 8f32aa89eb..eed05c6161 100644 --- a/code/modules/surgery/organs/vocal_cords.dm +++ b/code/modules/surgery/organs/vocal_cords.dm @@ -91,7 +91,7 @@ . = ..() if(!IsAvailable()) if(world.time < cords.next_command) - to_chat(owner, "You must wait [(cords.next_command - world.time)/10] seconds before Speaking again.") + to_chat(owner, "You must wait [DisplayTimeText(cords.next_command - world.time)] before Speaking again.") return var/command = input(owner, "Speak with the Voice of God", "Command") if(QDELETED(src) || QDELETED(owner)) @@ -102,7 +102,7 @@ /obj/item/organ/vocal_cords/colossus/can_speak_with() if(world.time < next_command) - to_chat(owner, "You must wait [(next_command - world.time)/10] seconds before Speaking again.") + to_chat(owner, "You must wait [DisplayTimeText(next_command - world.time)] before Speaking again.") return FALSE if(!owner) return FALSE