@@ -45,7 +45,74 @@ static const auto ABILITY_DEFS = datastructure::create_const_map<ability_t, nyan
4545 nyan::ValueHolder (std::make_shared<nyan::ObjectValue>(" engine.ability.type.Turn" ))));
4646
4747/* *
48- * Maps internal property types to nyan API values.
48+ * Maps internal effect types to nyan API values.
49+ */
50+ static const auto EFFECT_DEFS = datastructure::create_const_map<effect_t , nyan::ValueHolder>(
51+ std::pair (effect_t ::CONTINUOUS_FLAC_DECREASE,
52+ nyan::ValueHolder (std::make_shared<nyan::ObjectValue>(
53+ " engine.effect.continuous.flat_attribute_change.type.FlatAttributeChangeDecrease" ))),
54+ std::pair(effect_t ::CONTINUOUS_FLAC_INCREASE,
55+ nyan::ValueHolder (std::make_shared<nyan::ObjectValue>(
56+ " engine.effect.continuous.flat_attribute_change.type.FlatAttributeChangeIncrease" ))),
57+ std::pair(effect_t ::CONTINUOUS_LURE,
58+ nyan::ValueHolder (std::make_shared<nyan::ObjectValue>(" engine.effect.continuous.type.Lure" ))),
59+ std::pair(effect_t ::CONTINUOUS_TRAC_DECREASE,
60+ nyan::ValueHolder (std::make_shared<nyan::ObjectValue>(
61+ " engine.effect.continuous.time_relative_attribute_change.type.TimeRelativeAttributeChangeDecrease" ))),
62+ std::pair(effect_t ::CONTINUOUS_TRAC_INCREASE,
63+ nyan::ValueHolder (std::make_shared<nyan::ObjectValue>(
64+ " engine.effect.continuous.time_relative_attribute_change.type.TimeRelativeAttributeChangeIncrease" ))),
65+ std::pair(effect_t ::CONTINUOUS_TRPC_DECREASE,
66+ nyan::ValueHolder (std::make_shared<nyan::ObjectValue>(
67+ " engine.effect.continuous.time_relative_progress_change.type.TimeRelativeProgressChangeDecrease" ))),
68+ std::pair(effect_t ::CONTINUOUS_TRPC_INCREASE,
69+ nyan::ValueHolder (std::make_shared<nyan::ObjectValue>(
70+ " engine.effect.continuous.time_relative_progress_change.type.TimeRelativeProgressChangeIncrease" ))),
71+ std::pair(effect_t ::DISCRETE_CONVERT,
72+ nyan::ValueHolder (std::make_shared<nyan::ObjectValue>(" engine.effect.discrete.Convert" ))),
73+ std::pair(effect_t ::DISCRETE_FLAC_DECREASE,
74+ nyan::ValueHolder (std::make_shared<nyan::ObjectValue>(
75+ " engine.effect.discrete.flat_attribute_change.type.FlatAttributeChangeDecrease" ))),
76+ std::pair(effect_t ::DISCRETE_FLAC_INCREASE,
77+ nyan::ValueHolder (std::make_shared<nyan::ObjectValue>(
78+ " engine.effect.discrete.flat_attribute_change.type.FlatAttributeChangeIncrease" ))),
79+ std::pair(effect_t ::DISCRETE_MAKE_HARVESTABLE,
80+ nyan::ValueHolder (std::make_shared<nyan::ObjectValue>(" engine.effect.discrete.type.MakeHarvestable" ))),
81+ std::pair(effect_t ::DISCRETE_SEND_TO_CONTAINER,
82+ nyan::ValueHolder (std::make_shared<nyan::ObjectValue>(" engine.effect.discrete.type.SendToContainer" ))));
83+
84+ /* *
85+ * Maps API effect types to internal effect types.
86+ */
87+ static const auto EFFECT_TYPE_LOOKUP = datastructure::create_const_map<nyan::fqon_t , effect_t >(
88+ std::pair (" engine.effect.continuous.flat_attribute_change.type.FlatAttributeChangeDecrease" ,
89+ effect_t ::CONTINUOUS_FLAC_DECREASE),
90+ std::pair(" engine.effect.continuous.flat_attribute_change.type.FlatAttributeChangeIncrease" ,
91+ effect_t ::CONTINUOUS_FLAC_INCREASE),
92+ std::pair(" engine.effect.continuous.type.Lure" ,
93+ effect_t ::CONTINUOUS_LURE),
94+ std::pair(" engine.effect.continuous.time_relative_attribute_change.type.TimeRelativeAttributeChangeDecrease" ,
95+ effect_t ::CONTINUOUS_TRAC_DECREASE),
96+ std::pair(" engine.effect.continuous.time_relative_attribute_change.type.TimeRelativeAttributeChangeIncrease" ,
97+ effect_t ::CONTINUOUS_TRAC_INCREASE),
98+ std::pair(" engine.effect.continuous.time_relative_progress_change.type.TimeRelativeProgressChangeDecrease" ,
99+ effect_t ::CONTINUOUS_TRPC_DECREASE),
100+ std::pair(" engine.effect.continuous.time_relative_progress_change.type.TimeRelativeProgressChangeIncrease" ,
101+ effect_t ::CONTINUOUS_TRPC_INCREASE),
102+ std::pair(" engine.effect.discrete.Convert" ,
103+ effect_t ::DISCRETE_CONVERT),
104+ std::pair(" engine.effect.discrete.flat_attribute_change.type.FlatAttributeChangeDecrease" ,
105+ effect_t ::DISCRETE_FLAC_DECREASE),
106+ std::pair(" engine.effect.discrete.flat_attribute_change.type.FlatAttributeChangeIncrease" ,
107+ effect_t ::DISCRETE_FLAC_INCREASE),
108+ std::pair(" engine.effect.discrete.type.MakeHarvestable" ,
109+ effect_t ::DISCRETE_MAKE_HARVESTABLE),
110+ std::pair(" engine.effect.discrete.type.SendToContainer" ,
111+ effect_t ::DISCRETE_SEND_TO_CONTAINER));
112+
113+
114+ /* *
115+ * Maps internal ability property types to nyan API values.
49116 */
50117static const auto ABILITY_PROPERTY_DEFS = datastructure::create_const_map<ability_property_t , nyan::ValueHolder>(
51118 std::pair (ability_property_t ::ANIMATED,
@@ -61,6 +128,19 @@ static const auto ABILITY_PROPERTY_DEFS = datastructure::create_const_map<abilit
61128 std::pair(ability_property_t ::LOCK,
62129 nyan::ValueHolder (std::make_shared<nyan::ObjectValue>(" engine.ability.property.type.Lock" ))));
63130
131+ /* *
132+ * Maps internal effect property types to nyan API values.
133+ */
134+ static const auto EFFECT_PROPERTY_DEFS = datastructure::create_const_map<effect_property_t , nyan::ValueHolder>(
135+ std::pair (effect_property_t ::AREA,
136+ nyan::ValueHolder (std::make_shared<nyan::ObjectValue>(" engine.effect.property.type.Area" ))),
137+ std::pair(effect_property_t ::COST,
138+ nyan::ValueHolder (std::make_shared<nyan::ObjectValue>(" engine.effect.property.type.Cost" ))),
139+ std::pair(effect_property_t ::DIPLOMATIC,
140+ nyan::ValueHolder (std::make_shared<nyan::ObjectValue>(" engine.effect.property.type.Diplomatic" ))),
141+ std::pair(effect_property_t ::PRIORITY,
142+ nyan::ValueHolder (std::make_shared<nyan::ObjectValue>(" engine.effect.property.type.Priority" ))));
143+
64144/* *
65145 * Maps API activity node types to engine node types.
66146 */
0 commit comments