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/System.c4g/Compatibility.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'TemplePushing.c4s/System.c4g') diff --git a/TemplePushing.c4s/System.c4g/Compatibility.c b/TemplePushing.c4s/System.c4g/Compatibility.c index 5d3865e..d4e9b09 100644 --- a/TemplePushing.c4s/System.c4g/Compatibility.c +++ b/TemplePushing.c4s/System.c4g/Compatibility.c @@ -2,4 +2,20 @@ #strict 2 +static hostFeatures; + global func SetGameComment() { return _inherited(...); } +global func IsHost() { return _inherited(...); } +global func RequestHostFeature(string feature) { if(!HaveHostFeature(feature)) return _inherited(feature, ...); } + +global func AnnounceHostFeature(string feature) +{ + hostFeatures || (hostFeatures = []); + hostFeatures[GetLength(hostFeatures)] = feature; +} + +global func HaveHostFeature(string feature) +{ + hostFeatures || (hostFeatures = []); + return GetIndexOf(feature, hostFeatures) != -1; +} -- cgit v1.2.3-54-g00ecf