Merge branch 'master' of https://github.com/PolarisSS13/Polaris into 2/1/2018_make_the_sun_not_lag_again

This commit is contained in:
Neerti
2018-04-13 11:26:12 -04:00
1226 changed files with 41962 additions and 28853 deletions

View File

@@ -1,9 +0,0 @@
/datum/controller/process/Shuttle/setup()
name = "shuttle controller"
schedule_interval = 20 // every 2 seconds
if(!shuttle_controller)
shuttle_controller = new
/datum/controller/process/Shuttle/doWork()
shuttle_controller.process()

View File

@@ -7,8 +7,30 @@
for(last_object in clients)
var/client/C = last_object
if(C.is_afk(config.kick_inactive MINUTES))
if(!istype(C.mob, /mob/observer/dead))
log_access("AFK: [key_name(C)]")
C << "<SPAN CLASS='warning'>You have been inactive for more than [config.kick_inactive] minute\s and have been disconnected.</SPAN>"
del(C) // Don't qdel, cannot override finalize_qdel behaviour for clients.
to_chat(C,"<span class='warning'>You have been inactive for more than [config.kick_inactive] minute\s and have been disconnected.</span>")
var/information
if(C.mob)
if(ishuman(C.mob))
var/job
var/mob/living/carbon/human/H = C.mob
var/datum/data/record/R = find_general_record("name", H.real_name)
if(R)
job = R.fields["real_rank"]
if(!job && H.mind)
job = H.mind.assigned_role
if(!job && H.job)
job = H.job
if(job)
information = " while [job]."
else if(issilicon(C.mob))
information = " while a silicon."
var/adminlinks
adminlinks = " (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[C.mob.x];Y=[C.mob.y];Z=[C.mob.z]'>JMP</a>|<A HREF='?_src_=holder;cryoplayer=\ref[C.mob]'>CRYO</a>)"
log_and_message_admins("being kicked for AFK[information][adminlinks]", C.mob)
qdel(C)
SCHECK

View File

@@ -47,7 +47,8 @@ var/datum/controller/process/planet/planet_controller = null
//Weather style needs redrawing
if(P.needs_work & PLANET_PROCESS_WEATHER)
P.needs_work &= ~PLANET_PROCESS_WEATHER
var/image/new_overlay = image(icon = P.weather_holder.current_weather.icon, icon_state = P.weather_holder.current_weather.icon_state, layer = LIGHTING_LAYER - 1)
var/image/new_overlay = image(icon = P.weather_holder.current_weather.icon, icon_state = P.weather_holder.current_weather.icon_state)
new_overlay.plane = PLANE_PLANETLIGHTING
//Redraw weather icons
for(var/T in P.planet_floors)
var/turf/simulated/turf = T

View File

@@ -8,19 +8,21 @@
/datum/controller/process/scheduler/setup()
name = "scheduler"
schedule_interval = 3 SECONDS
schedule_interval = 1 SECOND
scheduled_tasks = list()
scheduler = src
/datum/controller/process/scheduler/doWork()
var/world_time = world.time
for(last_object in scheduled_tasks)
var/datum/scheduled_task/scheduled_task = last_object
if(world_time < scheduled_task.trigger_time)
break // Too early for this one, and therefore too early for all remaining.
try
if(world.time > scheduled_task.trigger_time)
unschedule(scheduled_task)
scheduled_task.pre_process()
scheduled_task.process()
scheduled_task.post_process()
unschedule(scheduled_task)
scheduled_task.pre_process()
scheduled_task.process()
scheduled_task.post_process()
catch(var/exception/e)
catchException(e, last_object)
SCHECK
@@ -45,7 +47,7 @@
stat(null, "[scheduled_tasks.len] task\s")
/datum/controller/process/scheduler/proc/schedule(var/datum/scheduled_task/st)
scheduled_tasks += st
dd_insertObjectList(scheduled_tasks, st)
/datum/controller/process/scheduler/proc/unschedule(var/datum/scheduled_task/st)
scheduled_tasks -= st
@@ -106,6 +108,9 @@
task_after_process_args.Cut()
return ..()
/datum/scheduled_task/dd_SortValue()
return trigger_time
/datum/scheduled_task/proc/pre_process()
task_triggered_event.raise_event(list(src))