Merge pull request #16629 from Kashargul/planet-time

Planet time debug uncapping and broken weapon chat output
This commit is contained in:
Heroman3003
2024-11-28 14:40:05 +10:00
committed by GitHub
2 changed files with 31 additions and 26 deletions
+4 -2
View File
@@ -678,9 +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/new_hour = tgui_input_number(usr, "What hour do you want to change to?", "Change Time", text2num(current_time_datum.show_time("hh")), 23)
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/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) - 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()