mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Merge pull request #6756 from Neerti/lightning_fixes
Fixes various lightning strike bugs
This commit is contained in:
@@ -638,13 +638,14 @@
|
||||
return
|
||||
|
||||
var/datum/planet/planet = input(usr, "Which planet do you want to modify the weather on?", "Change Weather") in SSplanets.planets
|
||||
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)
|
||||
planet.weather_holder.rebuild_forecast()
|
||||
var/log = "[key_name(src)] changed [planet.name]'s weather to [new_weather]."
|
||||
message_admins(log)
|
||||
log_admin(log)
|
||||
if(istype(planet))
|
||||
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)
|
||||
planet.weather_holder.rebuild_forecast()
|
||||
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"
|
||||
@@ -655,20 +656,20 @@
|
||||
return
|
||||
|
||||
var/datum/planet/planet = input(usr, "Which planet do you want to modify time on?", "Change Time") in SSplanets.planets
|
||||
if(istype(planet))
|
||||
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
|
||||
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/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
|
||||
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)
|
||||
var/log = "[key_name(src)] changed [planet.name]'s time to [planet.current_time.show_time("hh:mm")]."
|
||||
message_admins(log)
|
||||
log_admin(log)
|
||||
Reference in New Issue
Block a user