From 4c5cba6cc8353ca304dd5511ed1fe74d3b889a47 Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Thu, 21 Nov 2024 18:58:05 +0100 Subject: [PATCH] minutes too --- code/modules/admin/verbs/debug.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 03de0eb101b..7de8a8cebb8 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -678,10 +678,11 @@ var/datum/planet/planet = tgui_input_list(usr, "Which planet do you want to modify time on?", "Change Time", SSplanets.planets) if(istype(planet)) var/datum/time/current_time_datum = planet.current_time - var/planet_hours = max(round(current_time_datum.seconds_in_day / 36000) - 1, 0) - var/new_hour = tgui_input_number(usr, "What hour do you want to change to?", "Change Time", text2num(current_time_datum.show_time("hh")), planet_hours) + var/planet_hours = max(round(current_time_datum.seconds_in_day / 36000), 0) + var/new_hour = tgui_input_number(usr, "What hour do you want to change to?", "Change Time", text2num(current_time_datum.show_time("hh")), planet_hours - 1) if(!isnull(new_hour)) - var/new_minute = tgui_input_number(usr, "What minute do you want to change to?", "Change Time", text2num(current_time_datum.show_time("mm")), 59) + var/planet_minutes = max(round(current_time_datum.seconds_in_hour / 600), 0) + var/new_minute = tgui_input_number(usr, "What minute do you want to change to?", "Change Time", text2num(current_time_datum.show_time("mm")), planet_minutes - 1) if(!isnull(new_minute)) var/type_needed = current_time_datum.type var/datum/time/new_time = new type_needed()