diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index ffb636b42ed..b519130bb4f 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -425,12 +425,6 @@ if(pressure <= LAVALAND_EQUIPMENT_EFFECT_PRESSURE) . = TRUE -/proc/MinutesToTicks(var/minutes as num) - return minutes * 60 * 10 - -/proc/SecondsToTicks(var/seconds) - return seconds * 10 - proc/pollCandidates(Question, be_special_type, antag_age_check = FALSE, poll_time = 300, ignore_respawnability = FALSE, min_hours = 0, flashwindow = TRUE, check_antaghud = TRUE) var/roletext = be_special_type ? get_roletext(be_special_type) : null var/list/mob/dead/observer/candidates = list() diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 2f4811de380..ba43e1a0b60 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -641,31 +641,31 @@ config.max_maint_drones = text2num(value) if("expected_round_length") - config.expected_round_length = MinutesToTicks(text2num(value)) + config.expected_round_length = text2num(value) MINUTES if("event_custom_start_mundane") var/values = text2numlist(value, ";") - config.event_first_run[EVENT_LEVEL_MUNDANE] = list("lower" = MinutesToTicks(values[1]), "upper" = MinutesToTicks(values[2])) + config.event_first_run[EVENT_LEVEL_MUNDANE] = list("lower" = values[1] MINUTES, "upper" = values[2] MINUTES) if("event_custom_start_moderate") var/values = text2numlist(value, ";") - config.event_first_run[EVENT_LEVEL_MODERATE] = list("lower" = MinutesToTicks(values[1]), "upper" = MinutesToTicks(values[2])) + config.event_first_run[EVENT_LEVEL_MODERATE] = list("lower" = values[1] MINUTES, "upper" = values[2] MINUTES) if("event_custom_start_major") var/values = text2numlist(value, ";") - config.event_first_run[EVENT_LEVEL_MAJOR] = list("lower" = MinutesToTicks(values[1]), "upper" = MinutesToTicks(values[2])) + config.event_first_run[EVENT_LEVEL_MAJOR] = list("lower" = values[1] MINUTES, "upper" = values[2] MINUTES) if("event_delay_lower") var/values = text2numlist(value, ";") - config.event_delay_lower[EVENT_LEVEL_MUNDANE] = MinutesToTicks(values[1]) - config.event_delay_lower[EVENT_LEVEL_MODERATE] = MinutesToTicks(values[2]) - config.event_delay_lower[EVENT_LEVEL_MAJOR] = MinutesToTicks(values[3]) + config.event_delay_lower[EVENT_LEVEL_MUNDANE] = values[1] MINUTES + config.event_delay_lower[EVENT_LEVEL_MODERATE] = values[2] MINUTES + config.event_delay_lower[EVENT_LEVEL_MAJOR] = values[3] MINUTES if("event_delay_upper") var/values = text2numlist(value, ";") - config.event_delay_upper[EVENT_LEVEL_MUNDANE] = MinutesToTicks(values[1]) - config.event_delay_upper[EVENT_LEVEL_MODERATE] = MinutesToTicks(values[2]) - config.event_delay_upper[EVENT_LEVEL_MAJOR] = MinutesToTicks(values[3]) + config.event_delay_upper[EVENT_LEVEL_MUNDANE] = values[1] MINUTES + config.event_delay_upper[EVENT_LEVEL_MODERATE] = values[2] MINUTES + config.event_delay_upper[EVENT_LEVEL_MAJOR] = values[3] MINUTES if("starlight") config.starlight = 1 @@ -701,7 +701,7 @@ config.max_loadout_points = text2num(value) if("round_abandon_penalty_period") - config.round_abandon_penalty_period = MinutesToTicks(text2num(value)) + config.round_abandon_penalty_period = text2num(value) MINUTES if("medal_hub_address") config.medal_hub_address = value diff --git a/code/controllers/subsystem/events.dm b/code/controllers/subsystem/events.dm index ad77904bac7..1a6e073c808 100644 --- a/code/controllers/subsystem/events.dm +++ b/code/controllers/subsystem/events.dm @@ -90,7 +90,7 @@ SUBSYSTEM_DEF(events) 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 + if(E.endedAt - E.startedAt > 5 MINUTES) // Only mention end time if the entire duration was more than 5 minutes message += "and ended at [station_time_timestamp("hh:mm:ss", E.endedAt)]." else message += "and ran to completion." diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 6f93afb7c6d..1450278e736 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -219,21 +219,21 @@ About the new airlock wires panel: return isWireCut(AIRLOCK_WIRE_BACKUP_POWER1) /obj/machinery/door/airlock/proc/loseMainPower() - main_power_lost_until = mainPowerCablesCut() ? -1 : world.time + SecondsToTicks(60) + main_power_lost_until = mainPowerCablesCut() ? -1 : world.time + 60 SECONDS if(main_power_lost_until > 0) - main_power_timer = addtimer(CALLBACK(src, .proc/regainMainPower), SecondsToTicks(60), TIMER_UNIQUE | TIMER_STOPPABLE) + main_power_timer = addtimer(CALLBACK(src, .proc/regainMainPower), 60 SECONDS, TIMER_UNIQUE | TIMER_STOPPABLE) // If backup power is permanently disabled then activate in 10 seconds if possible, otherwise it's already enabled or a timer is already running if(backup_power_lost_until == -1 && !backupPowerCablesCut()) - backup_power_lost_until = world.time + SecondsToTicks(10) - backup_power_timer = addtimer(CALLBACK(src, .proc/regainBackupPower), SecondsToTicks(10), TIMER_UNIQUE | TIMER_STOPPABLE) + backup_power_lost_until = world.time + 10 SECONDS + backup_power_timer = addtimer(CALLBACK(src, .proc/regainBackupPower), 10 SECONDS, TIMER_UNIQUE | TIMER_STOPPABLE) // Disable electricity if required if(electrified_until && isAllPowerLoss()) electrify(0) /obj/machinery/door/airlock/proc/loseBackupPower() - backup_power_lost_until = backupPowerCablesCut() ? -1 : world.time + SecondsToTicks(60) + backup_power_lost_until = backupPowerCablesCut() ? -1 : world.time + 60 SECONDS if(backup_power_lost_until > 0) - backup_power_timer = addtimer(CALLBACK(src, .proc/regainBackupPower), SecondsToTicks(60), TIMER_UNIQUE | TIMER_STOPPABLE) + backup_power_timer = addtimer(CALLBACK(src, .proc/regainBackupPower), 60 SECONDS, TIMER_UNIQUE | TIMER_STOPPABLE) // Disable electricity if required if(electrified_until && isAllPowerLoss()) @@ -280,9 +280,9 @@ About the new airlock wires panel: else shockedby += text("\[[time_stamp()]\] - EMP)") message = "The door is now electrified [duration == -1 ? "permanently" : "for [duration] second\s"]." - electrified_until = duration == -1 ? -1 : world.time + SecondsToTicks(duration) + electrified_until = duration == -1 ? -1 : world.time + duration SECONDS if(duration != -1) - electrified_timer = addtimer(CALLBACK(src, .proc/electrify, 0), SecondsToTicks(duration), TIMER_UNIQUE | TIMER_STOPPABLE) + electrified_timer = addtimer(CALLBACK(src, .proc/electrify, 0), duration SECONDS, TIMER_UNIQUE | TIMER_STOPPABLE) if(feedback && message) to_chat(usr, message) @@ -1214,7 +1214,7 @@ About the new airlock wires panel: /obj/machinery/door/airlock/emp_act(severity) ..() if(prob(40/severity)) - var/duration = world.time + SecondsToTicks(30 / severity) + var/duration = world.time + (30 / severity) SECONDS if(duration > electrified_until) electrify(duration) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 4c2aaa82c1e..97aa706060a 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -295,7 +295,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( universal_speak = 1 /mob/living/automatedannouncer/New() - lifetime_timer = addtimer(CALLBACK(src, .proc/autocleanup), SecondsToTicks(10), TIMER_STOPPABLE) + lifetime_timer = addtimer(CALLBACK(src, .proc/autocleanup), 10 SECONDS, TIMER_STOPPABLE) ..() /mob/living/automatedannouncer/Destroy() diff --git a/code/modules/alarm/alarm.dm b/code/modules/alarm/alarm.dm index 798c5176770..752d3232d23 100644 --- a/code/modules/alarm/alarm.dm +++ b/code/modules/alarm/alarm.dm @@ -50,7 +50,7 @@ sources_assoc[source] = AS // Currently only non-0 durations can be altered (normal alarms VS EMP blasts) if(AS.duration) - duration = SecondsToTicks(duration) + duration = duration SECONDS AS.duration = duration AS.severity = severity diff --git a/code/modules/events/ion_storm.dm b/code/modules/events/ion_storm.dm index 90718ef2928..2c718580d2c 100644 --- a/code/modules/events/ion_storm.dm +++ b/code/modules/events/ion_storm.dm @@ -493,7 +493,7 @@ /proc/generate_static_ion_law() var/list/players = list() for(var/mob/living/carbon/human/player in GLOB.player_list) - if( !player.mind || player.mind.assigned_role == player.mind.special_role || player.client.inactivity > MinutesToTicks(10)) + if( !player.mind || player.mind.assigned_role == player.mind.special_role || player.client.inactivity > 10 MINUTES) continue players += player.real_name var/random_player = "The Captain" diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 6457afc87d4..50af43f454d 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -283,7 +283,7 @@ /mob/living/silicon/proc/receive_alarm(var/datum/alarm_handler/alarm_handler, var/datum/alarm/alarm, was_raised) if(!next_alarm_notice) - next_alarm_notice = world.time + SecondsToTicks(10) + next_alarm_notice = world.time + 10 SECONDS var/list/alarms = queued_alarms[alarm_handler] if(was_raised)