void SaveTWMapSettings() { if (twCurCfg == null) { return; } twCurCfg.ScoreRequired = (int)tw_numScoreLimit.Value; twCurCfg.ScorePerKill = (int)tw_numScorePerKill.Value; twCurCfg.AssistScore = (int)tw_numScoreAssists.Value; twCurCfg.MultiKillBonus = (int)tw_numMultiKills.Value; twCurCfg.Streaks = tw_cbStreaks.Checked; twCurCfg.GracePeriod = tw_cbGrace.Checked; twCurCfg.GracePeriodTime = tw_numGrace.Value; twCurCfg.BalanceTeams = tw_cbBalance.Checked; twCurCfg.TeamKills = tw_cbKills.Checked; twCurCfg.Save(twCurMap); TWGame game = TWGame.Instance; if (game.Running && game.Map.name == twCurMap) { game.UpdateMapConfig(); } }
static void UpdateConfig(Player p, TWMapConfig cfg) { cfg.Save(p.level.name); if (p.level == TWGame.Instance.Map) { TWGame.Instance.UpdateMapConfig(); } }
void SaveTWMapSettings() { if (twCurCfg == null) { return; } twCurCfg.ScoreRequired = (int)tw_numScoreLimit.Value; twCurCfg.ScorePerKill = (int)tw_numScorePerKill.Value; twCurCfg.AssistScore = (int)tw_numScoreAssists.Value; twCurCfg.MultiKillBonus = (int)tw_numMultiKills.Value; twCurCfg.Streaks = tw_cbStreaks.Checked; twCurCfg.GracePeriod = tw_cbGrace.Checked; twCurCfg.GracePeriodTime = tw_numGrace.Value; twCurCfg.BalanceTeams = tw_cbBalance.Checked; twCurCfg.TeamKills = tw_cbKills.Checked; twCurCfg.Save(twCurMap); twHelper.UpdateMapConfig(twCurMap); }