Example #1
0
        public void Execute()
        {
            FactionModel       model = AmbitionApp.GetModel <FactionModel>();
            FactionStandingsVO standings;

            model.LastUpdated = AmbitionApp.Calendar.Day;
            model.Standings.Clear();
            foreach (FactionVO faction in model.Factions.Values)
            {
                standings            = new FactionStandingsVO();
                standings.Faction    = faction.Type;
                standings.Allegiance = faction.Allegiance;
                standings.Power      = faction.Power;
                model.Standings.Add(standings);
            }
        }
Example #2
0
        public void Register(Core.ModelSvc modelSvc)
        {
            FactionModel       model = modelSvc.Register <FactionModel>();
            FactionStandingsVO standings;

            model.Factions.Clear();
            model.ResetValues.Clear();
            foreach (FactionVO faction in Factions)
            {
                model.Factions[faction.Type] = new FactionVO(faction);
                standings = new FactionStandingsVO()
                {
                    Faction    = faction.Type,
                    Power      = faction.Power,
                    Allegiance = faction.Allegiance
                };
                model.ResetValues.Add(standings);
            }
        }