ServerSetting requirement type.
commitb914d977af0b2c2685071b8fa56e10e51d9ae05f
authorsveinung <sveinung@a0f10bec-cc02-0410-94fc-a9cfff90b4cd>
Wed, 24 May 2017 09:55:46 +0000 (24 09:55 +0000)
committersveinung <sveinung@a0f10bec-cc02-0410-94fc-a9cfff90b4cd>
Wed, 24 May 2017 09:55:46 +0000 (24 09:55 +0000)
treee1cedc3a2356cf733f86e21eb35cab94ffeb803d
parent4cb16e4e257a5292315bb44368ef7f2913e72386
ServerSetting requirement type.

Some server settings, like killstack and unreachableprotects, are rules. A
ruleset author may wish to adapt his ruleset to work better with the server
setting rules currently in use.

Other server settings, like autosaves, are purely about the administration
of the Freeciv server. Those are administrative details. Rules shouldn't be
based on them.

Rules should also not be based on settings not visible to all players.

A Boolean server setting is enabled or disabled. It is therefore enough to
specify its name in the requirement syntax. The value is covered by the
requirement's present property.

Introduce the ServerSetting requirement type. It gives access to rule server
settings that has a binary value.

Non binary server settings aren't supported. Support for enum, bitwise and
small int valued settings may be introduced later. That would require
multiplexing the setting value with the setting id and the introduction of
a syntax like "settingname=valuename".

See hrm Feature #648804

git-svn-id: svn://svn.gna.org/svn/freeciv/trunk@35703 a0f10bec-cc02-0410-94fc-a9cfff90b4cd
13 files changed:
ai/default/daieffects.c
common/fc_types.h
common/metaknowledge.c
common/reqtext.c
common/requirements.c
common/server_settings.c
common/server_settings.h
doc/README.effects
fc_version
server/cityturn.c
server/rssanity.c
server/rssanity.h
tools/ruledit/univ_value.c