From 13ff994f64c0aead52fa1689d2608534f729b904 Mon Sep 17 00:00:00 2001 From: "VivianFoxfoot@gmail.com" Date: Sun, 22 Apr 2012 01:19:10 +0000 Subject: [PATCH] Adds ticklag to be a config setting. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3491 316c924e-a436-60f5-8080-3fe189b3f50e --- code/datums/configuration.dm | 4 ++++ code/game/master_controller.dm | 2 +- code/modules/admin/verbs/ticklag.dm | 2 +- config/config.txt | 7 ++++++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/code/datums/configuration.dm b/code/datums/configuration.dm index d764d6a66e4..c50afadb600 100644 --- a/code/datums/configuration.dm +++ b/code/datums/configuration.dm @@ -32,6 +32,7 @@ var/Tensioner_Active = 0 // If the tensioner is running. var/allow_Metadata = 0 // Metadata is supported. var/popup_admin_pm = 0 //adminPMs to non-admins show in a pop-up 'reply' window when set to 1. + var/Ticklag = 0.9 var/list/mode_names = list() var/list/modes = list() // allowed modes @@ -289,6 +290,9 @@ if("useircbot") useircbot = 1 + if("ticklag") + Ticklag = text2num(value) + else diary << "Unknown setting in configuration: '[name]'" diff --git a/code/game/master_controller.dm b/code/game/master_controller.dm index 091545d8b10..69dc2cb8910 100644 --- a/code/game/master_controller.dm +++ b/code/game/master_controller.dm @@ -45,7 +45,7 @@ datum/controller/game_controller if(!tension_master) tension_master = new /datum/tension() - world.tick_lag = 0.9 + world.tick_lag = config.Ticklag setup_objects() diff --git a/code/modules/admin/verbs/ticklag.dm b/code/modules/admin/verbs/ticklag.dm index 3b9930b5f3f..22b7e998ccf 100644 --- a/code/modules/admin/verbs/ticklag.dm +++ b/code/modules/admin/verbs/ticklag.dm @@ -9,7 +9,7 @@ if(!src.mob) return if(src.holder.rank in list("Game Admin", "Game Master")) - var/newtick = input("Sets a new tick lag. Please don't mess with this too much! The stable, time-tested ticklag value is 0.9",, 0.9) as num|null + var/newtick = input("Sets a new tick lag. Please don't mess with this too much! The stable, time-tested ticklag value is 0.9","Lag of Tick", world.tick_lag) as num|null //I've used ticks of 2 before to help with serious singulo lags if(newtick && newtick <= 2 && newtick > 0) log_admin("[key_name(src)] has modified world.tick_lag to [newtick]", 0) diff --git a/config/config.txt b/config/config.txt index 6305566f0b1..8b584de9944 100644 --- a/config/config.txt +++ b/config/config.txt @@ -143,4 +143,9 @@ FEATURE_OBJECT_SPELL_SYSTEM #ALLOW_HOLIDAYS ##Remove the # mark if you are going to use the SVN irc bot to relay adminhelps -#USEIRCBOT \ No newline at end of file +#USEIRCBOT + +##Defines the ticklag for the world. 0.9 is the normal one, 0.6 is smoother. +TICKLAG 0.9 + +