indexing description: "[ Settings can represent simple registry entries, but settings can also represent a game condition. See also super class for more information. This class is part of the XAE Extended Adventure Engine Project. ]" author: "Adrian Rabenseifner, radrian@student.ethz.ch" date: "$Date$" revision: "$Revision$" class SETTING inherit CONDITION rename satisfied as in_registry end create make feature {NONE} -- Initialization make(pkey: STRING; pvalue: BOOLEAN) is -- Initialize `Current'. do key := pkey; value := pvalue; end feature -- Access set_value(pvalue: BOOLEAN) is -- change value do value := pvalue end switch is -- switch value (true -> false, false -> true) do value := not value end in_registry(context: CONTEXT): BOOLEAN is -- checks if setting is in registry do Result := context.registry.contains(Current) end key: STRING value: BOOLEAN to_string: STRING is -- print key: value do create Result.make_empty if value then Result := key + ": true" else Result := key + ": false" end end feature {NONE} -- Implementation end -- class SETTING