More stuff, finalizes it I hope.

This commit is contained in:
Neerti
2017-02-20 17:09:52 -05:00
parent 1d9e7c8c08
commit 836d8dfa3f
27 changed files with 633 additions and 397 deletions

View File

@@ -968,3 +968,47 @@
return
error_cache.showTo(usr)
/datum/admins/proc/change_weather()
set category = "Debug"
set name = "Change Weather"
set desc = "Changes the current weather."
if(!check_rights(R_DEBUG))
return
var/datum/planet/planet = input(usr, "Which planet do you want to modify the weather on?", "Change Weather") in list(planet_sif)
var/datum/weather/new_weather = input(usr, "What weather do you want to change to?", "Change Weather") as null|anything in planet.weather_holder.allowed_weather_types
if(new_weather)
planet.weather_holder.change_weather(new_weather)
var/log = "[key_name(src)] changed [planet.name]'s weather to [new_weather]."
message_admins(log)
log_admin(log)
/datum/admins/proc/change_time()
set category = "Debug"
set name = "Change Planet Time"
set desc = "Changes the time of a planet."
if(!check_rights(R_DEBUG))
return
var/datum/planet/planet = input(usr, "Which planet do you want to modify time on?", "Change Time") in list(planet_sif)
var/datum/time/current_time_datum = planet.current_time
var/new_hour = input(usr, "What hour do you want to change to?", "Change Time", text2num(current_time_datum.show_time("hh"))) as null|num
if(!isnull(new_hour))
var/new_minute = input(usr, "What minute do you want to change to?", "Change Time", text2num(current_time_datum.show_time("mm")) ) as null|num
if(!isnull(new_minute))
var/type_needed = current_time_datum.type
world << "Type is [type_needed]."
var/datum/time/new_time = new type_needed()
new_time = new_time.add_hours(new_hour)
new_time = new_time.add_minutes(new_minute)
planet.current_time = new_time
spawn(1)
planet.update_sun()
var/log = "[key_name(src)] changed [planet.name]'s time to [planet.current_time.show_time("hh:mm")]."
message_admins(log)
log_admin(log)