예제 #1
0
        public ConsciousnessDto(Consciousness consciousness)
        {
            CurrentActionIndex = consciousness.CurrentActionIndex;

            Actions = new List <int>(Consciousness.Size);

            for (int i = 0; i < Consciousness.Size; i++)
            {
                Actions.Add((int)consciousness.Get(i).Action);
            }
        }
예제 #2
0
        public PdxSublist GetHistoryCountryFile(Vic2World world)
        {
            var data = new PdxSublist(null);

            data.AddValue("capital", Capital.ToString());
            data.AddValue("primary_culture", PrimaryCulture);
            AcceptedCultures.ForEach(c => data.AddValue("culture", c));
            data.AddValue("religion", Religion);
            data.AddValue("government", Government);
            data.AddValue("plurality", Plurality.ToString());
            if (NationalValues != null)
            {
                data.AddValue("nationalvalue", NationalValues.Value);
            }
            data.AddValue("literacy", Literacy.ToString());
            data.AddValue("civilized", IsCivilised ? "yes" : "no");

            data.AddValue("prestige", Prestige.ToString());
            if (Reforms != null)
            {
                Reforms.AddData(data);
            }
            if (Technologies != null)
            {
                Technologies.ForEach(t => data.AddValue(t, "1"));
            }
            data.AddValue("consciousness", Consciousness.ToString());
            // todo
            data.AddValue("nonstate_consciousness", (Consciousness / 3).ToString());
            if (RulingParty != null)
            {
                data.AddValue("ruling_party", RulingParty.Name);
            }
            data.AddDate("last_election", LastElection);
            if (UpperHouse != null)
            {
                data.AddSublist("upper_house", UpperHouse.GetData(data));
            }
            if (TechSchools != null)
            {
                data.AddValue("schools", Enum.GetName(typeof(TechSchool), TechSchools.TechSchool));
            }

            if (FemaleLeaders && (Reforms.vote_franschise == vote_franschise.universal_voting || Reforms.vote_franschise == vote_franschise.universal_weighted_voting))
            {
                var entry = new PdxSublist();
                entry.AddValue("decision", "enact_female_suffrage");

                data.AddSublist(world.StartDate, entry);
            }
            return(data);
        }
예제 #3
0
 /// <summary>Sets the default properties of this behavior instance.</summary>
 protected override void SetDefaultProperties()
 {
     Consciousness = Consciousness.Awake;
 }
예제 #4
0
 public LivingBehavior()
 {
     Consciousness = Consciousness.Awake;
 }
예제 #5
0
 /// <summary>
 /// Sets the default properties of this behavior instance.
 /// </summary>
 protected override void SetDefaultProperties()
 {
     this.Consciousness = Consciousness.Awake;
 }
예제 #6
0
 public Mental(Consciousness consciousness, MentalState mentalState, PainSeverity overallPain)
 {
     Consciousness = consciousness;
     MentalState   = mentalState;
     OverallPain   = overallPain;
 }