From aba072f6403cbc9acd818da36e7baeec1a43fd06 Mon Sep 17 00:00:00 2001 From: Mittendrein Markus Date: Wed, 2 Sep 2015 18:20:13 +0200 Subject: Show a option to disable GameComments if the host has the GameComment-feature --- TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c | 17 ++++++++++++++++- .../Misc.c4d/SetupMenu.c4d/StringTblDE.txt | 3 ++- .../Misc.c4d/SetupMenu.c4d/StringTblUS.txt | 3 ++- 3 files changed, 20 insertions(+), 3 deletions(-) (limited to 'TemplePushing.c4s/Misc.c4d') diff --git a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c index 11c2587..a3ec201 100644 --- a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c +++ b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/Script.c @@ -6,7 +6,7 @@ static const SETTING_Deathmatch = 0, SETTING_SuddenDeath = 1, SETTING_RotateInJump = 2, SETTING_RelaunchesInc = 3, SETTING_RelaunchesDec = 4, SETTING_DeathmatchScoreInc = 5, SETTING_DeathmatchScoreDec = 6, - SETTING_Ambience = 7; + SETTING_Ambience = 7, SETTING_GameComment = 8; local Sections, Modes; local clonk, setupPlayer; @@ -18,6 +18,8 @@ local ambienceEnabled; local numRelaunches; local deathmatchEnabled, deathmatchWinScore; +local useGameComment; + public func GetModes() { return @@ -38,6 +40,8 @@ protected func Initialize() section = Sections[0]; Modes = GetModes(); + + useGameComment = true; } private func ShowSetup() @@ -127,6 +131,13 @@ private func ShowSettingsMenu(bool preselect, int selectedSetting) CheckPreselect(preselect && selectedSetting == SETTING_DeathmatchScoreDec, menuItemIndex++); } + if (HaveHostFeature("GameComment")) + { + // GameComment entry + AddOptionMenuItem("$GameComment$", useGameComment, "SelectSetting(SETTING_GameComment)", ROCK); + CheckPreselect(preselect && selectedSetting == SETTING_GameComment, menuItemIndex++); + } + clonk->AddMenuItem("$Done$", "SetupDone()", SDNE); CheckPreselect(!preselect, menuItemIndex++); clonk->AddMenuItem("$Back$", "ShowModeMenu()", SBCK); @@ -166,6 +177,10 @@ private func SelectSetting(int selectedSetting) { deathmatchWinScore = Max(deathmatchWinScore - 1, 1); } + else if (selectedSetting == SETTING_GameComment) + { + useGameComment = !useGameComment; + } ShowMessage(); diff --git a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblDE.txt b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblDE.txt index ffe51b6..1b418d1 100644 --- a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblDE.txt +++ b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblDE.txt @@ -12,4 +12,5 @@ Mode=Modus Enabled=Aktiviert Disabled=Deaktiviert Ambience=Ambiente -Random=Zufällig \ No newline at end of file +Random=Zufällig +GameComment=Info im Netzwerkkommentar diff --git a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblUS.txt b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblUS.txt index 07240dd..f53c996 100644 --- a/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblUS.txt +++ b/TemplePushing.c4s/Misc.c4d/SetupMenu.c4d/StringTblUS.txt @@ -12,4 +12,5 @@ Mode=Mode Enabled=Enabled Disabled=Disabled Ambience=Ambience -Random=Random \ No newline at end of file +Random=Random +GameComment=Info in network comment -- cgit v1.2.3-54-g00ecf