mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-16 09:34:21 +01:00
Replaces the seconds and minute procs with the defines
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1219,7 +1219,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)
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user