Beispiel #1
0
        public void DecomposePoliciesIntoCiv(SerializableSocialPolicyData policyData, ICivilization civ)
        {
            var unlockedTrees    = AvailableTrees.Where(tree => policyData.UnlockedTrees.Contains(tree.name));
            var unlockedPolicies = AvailablePolicies.Where(policy => policyData.UnlockedPolicies.Contains(policy.name));

            PolicyCanon.OverrideUnlockedTreesForCiv(unlockedTrees, civ);
            PolicyCanon.OverrideUnlockedPoliciesForCiv(unlockedPolicies, civ);
        }
Beispiel #2
0
        public SerializableSocialPolicyData ComposePoliciesFromCiv(ICivilization civ)
        {
            var retval = new SerializableSocialPolicyData()
            {
                UnlockedTrees    = PolicyCanon.GetTreesUnlockedFor(civ).Select(tree => tree.name).ToList(),
                UnlockedPolicies = PolicyCanon.GetPoliciesUnlockedFor(civ).Select(policy => policy.name).ToList()
            };

            return(retval);
        }