Exemplo n.º 1
0
        public override void Register(HistoryParameter Param)
        {
            parameter = Param as ArmyChangeHistoryParameter;
            Army      = parameter.CurrentArmy;

            ArmyName = Army.Name;
            NoRushX  = Army.NoRush.X;
            NoRushY  = Army.NoRush.Y;

            Mass   = Army.Data.Economy.mass;
            Energy = Army.Data.Economy.energy;

            personality          = Army.Data.personality;
            plans                = Army.Data.plans;
            color                = Army.Data.color;
            faction              = Army.Data.faction;
            nextPlatoonBuilderId = Army.Data.nextPlatoonBuilderId;

            Alliances = new SaveLua.Army.Aliance[Army.Data.Alliances.Count];
            for (int i = 0; i < Alliances.Length; i++)
            {
                Alliances[i] = new SaveLua.Army.Aliance();
                Alliances[i].AllianceType  = Army.Data.Alliances[i].AllianceType;
                Alliances[i].ConnectedArmy = Army.Data.Alliances[i].ConnectedArmy;
            }
        }
Exemplo n.º 2
0
 public override void Register(HistoryParameter Param)
 {
     parameter       = (Param as UnitGroupRemoveHistoryParameter);
     RegisteredGroup = parameter.RegisterGroup;
     AllGroups       = new MapLua.SaveLua.Army.UnitsGroup[RegisteredGroup.UnitGroups.Count];
     RegisteredGroup.UnitGroups.CopyTo(AllGroups);
 }
 public override void Register(HistoryParameter Param)
 {
     HasWater       = ScmapEditor.Current.map.Water.HasWater;
     Elevation      = ScmapEditor.Current.map.Water.Elevation;
     ElevationDeep  = ScmapEditor.Current.map.Water.ElevationDeep;
     ElevationAbyss = ScmapEditor.Current.map.Water.ElevationAbyss;
 }
        public override void Register(HistoryParameter Param)
        {
            UndoCommandName = "Stratum paint";
            parameter       = (Param as StratumPaintHistoryParameter);

            Colors = new Color[parameter.Stratum.Length];
            parameter.Stratum.CopyTo(Colors, 0);
            Id = parameter.StratumId;
        }
Exemplo n.º 5
0
 public override void Register(HistoryParameter Param)
 {
     parameter       = (Param as UnitGroupChangeParam);
     RegisteredGroup = parameter.RegisterGroup;
     Name            = RegisteredGroup.NoPrefixName;
     Prefix          = RegisteredGroup.PrefixName;
     Orders          = RegisteredGroup.orders;
     Platoons        = RegisteredGroup.platoon;
 }
Exemplo n.º 6
0
        public override void Register(HistoryParameter Param)
        {
            parameter = (Param as ChainMarkersHistoryParameter);
            ChainId   = parameter.LastChainId;

            ConnectedMarkers = new MapLua.SaveLua.Marker[MapLuaParser.Current.SaveLuaFile.Data.Chains[ChainId].ConnectedMarkers.Count];
            MapLuaParser.Current.SaveLuaFile.Data.Chains[ChainId].ConnectedMarkers.CopyTo(ConnectedMarkers, 0);
            Name = MapLuaParser.Current.SaveLuaFile.Data.Chains[ChainId].Name;
        }
 public override void Register(HistoryParameter Param)
 {
     parameter = Param as AreaChangeParam;
     Area      = parameter.Area;
     Name      = Area.Name;
     X         = Area.rectangle.x;
     Y         = Area.rectangle.y;
     Width     = Area.rectangle.width;
     Height    = Area.rectangle.height;
 }
        public override void Register(HistoryParameter Param)
        {
            Groups = new Dictionary <PropsInfo.PropTypeGroup, HashSet <Prop> >();

            foreach (PropsInfo.PropTypeGroup Grp in PropsInfo.AllPropsTypes)
            {
                HashSet <Prop> OldProps = new HashSet <Prop>(Grp.PropsInstances);

                Groups.Add(Grp, OldProps);
            }
        }
Exemplo n.º 9
0
        public override void Register(HistoryParameter Param)
        {
            UndoCommandName = "Markers change";
            parameter       = Param as MarkersChangeHistoryParameter;

            Markers = new MarkerChange[parameter.RegisterMarkers.Length];
            for (int i = 0; i < parameter.RegisterMarkers.Length; i++)
            {
                Markers[i] = new MarkerChange();
                Markers[i].Load(parameter.RegisterMarkers[i]);
            }
        }
Exemplo n.º 10
0
        public override void Register(HistoryParameter Param)
        {
            UndoToDecalsMenu = UndoMenu;

            CutOffLOD     = new float[DecalsControler.Current.AllDecals.Count];
            NearCutOffLOD = new float[CutOffLOD.Length];

            for (int i = 0; i < CutOffLOD.Length; i++)
            {
                CutOffLOD[i]     = DecalsControler.Current.AllDecals[i].Obj.CutOffLOD;
                NearCutOffLOD[i] = DecalsControler.Current.AllDecals[i].Obj.NearCutOffLOD;
            }
        }
Exemplo n.º 11
0
 public override void Register(HistoryParameter Param)
 {
     parameter   = (Param as UnitsRemoveParam);
     GroupsUnits = new GroupUnits[parameter.RegisterGroups.Length];
     for (int i = 0; i < GroupsUnits.Length; i++)
     {
         GroupsUnits[i]        = new GroupUnits();
         GroupsUnits[i].Parent = parameter.RegisterGroups[i];
         GroupsUnits[i].Units  = new HashSet <SaveLua.Army.Unit>();
         foreach (SaveLua.Army.Unit u in GroupsUnits[i].Parent.Units)
         {
             GroupsUnits[i].Units.Add(u);
         }
     }
 }
Exemplo n.º 12
0
        public override void Register(HistoryParameter Param)
        {
            ColorLerp    = ScmapEditor.Current.map.Water.ColorLerp;
            SurfaceColor = ScmapEditor.Current.map.Water.SurfaceColor;
            SunColor     = ScmapEditor.Current.map.Water.SunColor;

            SunStrength   = ScmapEditor.Current.map.Water.SunStrength;
            SunShininess  = ScmapEditor.Current.map.Water.SunShininess;
            SunReflection = ScmapEditor.Current.map.Water.SunReflection;

            FresnelPower = ScmapEditor.Current.map.Water.FresnelPower;
            FresnelBias  = ScmapEditor.Current.map.Water.FresnelBias;

            UnitReflection  = ScmapEditor.Current.map.Water.UnitReflection;
            SkyReflection   = ScmapEditor.Current.map.Water.SkyReflection;
            RefractionScale = ScmapEditor.Current.map.Water.RefractionScale;
        }
Exemplo n.º 13
0
        public override void Register(HistoryParameter Param)
        {
            int c = 0;

            Teams = new ScenarioLua.Team[MapLuaParser.Current.ScenarioLuaFile.Data.Configurations[c].Teams.Length];
            MapLuaParser.Current.ScenarioLuaFile.Data.Configurations[c].Teams.CopyTo(Teams, 0);
            TeamNames  = new string[Teams.Length];
            TeamArmies = new ScenarioLua.Army[Teams.Length][];
            for (int t = 0; t < Teams.Length; t++)
            {
                TeamArmies[t] = new ScenarioLua.Army[Teams[t].Armys.Count];
                Teams[t].Armys.CopyTo(TeamArmies[t]);
                TeamNames[t] = Teams[t].name;
            }

            ExtraArmies = new ScenarioLua.Army[MapLuaParser.Current.ScenarioLuaFile.Data.Configurations[c].ExtraArmys.Count];
            MapLuaParser.Current.ScenarioLuaFile.Data.Configurations[c].ExtraArmys.CopyTo(ExtraArmies, 0);
        }
Exemplo n.º 14
0
        public override void Register(HistoryParameter Param)
        {
            parameter        = (Param as PropsMoveHistoryParameter);
            UndoToMarkerMenu = parameter.UndoMenu;

            Objs         = SelectionManager.Current.GetAllSelectedObjects();
            PosSelection = new Vector3[Objs.Length];
            RotSelection = new Quaternion[Objs.Length];


            for (int i = 0; i < Objs.Length; i++)
            {
                if (Objs[i])
                {
                    PosSelection[i] = Objs[i].transform.localPosition;
                    RotSelection[i] = Objs[i].transform.localRotation;
                }
            }
        }
 public override void Register(HistoryParameter Param)
 {
     Areas = new SaveLua.Areas[MapLuaParser.Current.SaveLuaFile.Data.areas.Length];
     MapLuaParser.Current.SaveLuaFile.Data.areas.CopyTo(Areas, 0);
 }
 public override void Register(HistoryParameter Param)
 {
     Waves = ScmapEditor.Current.map.WaveGenerators.ToArray();
 }