This commit is contained in:
Kashargul
2024-11-21 18:59:01 +01:00
committed by GitHub
parent 4c5cba6cc8
commit 1726dc847a
+4 -4
View File
@@ -678,11 +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), 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)
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)
if(!isnull(new_hour))
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)
var/planet_minutes = max(round(current_time_datum.seconds_in_hour / 600) - 1, 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)
if(!isnull(new_minute))
var/type_needed = current_time_datum.type
var/datum/time/new_time = new type_needed()