Пример #1
0
 public void LoadFrom(IniFileSection section)
 {
     PosX      = section.GetInt("POSX", 0);
     PosY      = section.GetInt("POSY", 0);
     IsVisible = section.GetBool("VISIBLE", false);
     IsBlocked = section.GetBool("BLOCKED", false);
     Scale     = section.GetDouble("SCALE", 1d).ToIntPercentage();
 }
Пример #2
0
 private SurfaceDescription(IniFileSection section)
 {
     Key          = section.GetNonEmpty("KEY") ?? "";
     IsValidTrack = section.GetBool("IS_VALID_TRACK", false);
     IsPitlane    = section.GetBool("IS_PITLANE", false);
     DirtAdditive = section.GetDouble("DIRT_ADDITIVE", 0.0);
     Friction     = section.GetDouble("FRICTION", 0.8);
     AudioEffect  = section.GetNonEmpty("WAV");
 }
Пример #3
0
 internal ColliderDescription(string name, IniFileSection fileSection)
 {
     Name         = name;
     Center       = fileSection.GetSlimVector3("CENTRE");
     Size         = fileSection.GetSlimVector3("SIZE");
     GroundEnable = fileSection.GetBool("GROUND_ENABLE", true);
 }
Пример #4
0
        public ServerPresetDriverEntry(IniFileSection section)
        {
            CarId = section.GetNonEmpty("MODEL") ?? DefaultCarId;

            CarSkinId     = section.GetNonEmpty("SKIN");
            SpectatorMode = section.GetBool("SPECTATOR_MODE", false);
            DriverName    = section.GetNonEmpty("DRIVERNAME");
            TeamName      = section.GetNonEmpty("TEAM");
            Guid          = section.GetNonEmpty("GUID");
            Ballast       = section.GetDouble("BALLAST", 0d);
        }
Пример #5
0
        public ServerPresetDriverEntry(IniFileSection section)
        {
            CarId = section.GetNonEmpty("MODEL") ?? DefaultCarId;

            var carSkinId = section.GetNonEmpty("SKIN")?.Split('/');

            CarSkinId = carSkinId?[0];
            CspOptions.LoadPacked(carSkinId?.ElementAtOrDefault(1));

            SpectatorMode = section.GetBool("SPECTATOR_MODE", false);
            DriverName    = section.GetNonEmpty("DRIVERNAME");
            TeamName      = section.GetNonEmpty("TEAM");
            Guid          = section.GetNonEmpty("GUID");
            Ballast       = section.GetDouble("BALLAST", 0d);
            Restrictor    = section.GetDouble("RESTRICTOR", 0d);
            CspOptions.PropertyChanged += (sender, args) => {
                Logging.Write($"ARG: {args.PropertyName}");

                // ReSharper disable once NotResolvedInText
                OnPropertyChanged(@"CspOptions.Inner");
            };
        }
Пример #6
0
 protected virtual void Load(IniFileSection session, IniFileSection main)
 {
     ConfigName = session.GetNonEmpty("NAME") ?? DisplayName;
     Time       = TimeSpan.FromMinutes(session.GetDouble("TIME", 10d));
     IsOpen     = session.GetBool("IS_OPEN", true);
 }
Пример #7
0
 internal ColliderDescription(IniFileSection fileSection, Vector3 offset)
 {
     Center       = fileSection.GetSlimVector3("CENTRE") + offset;
     Size         = fileSection.GetSlimVector3("SIZE");
     GroundEnable = fileSection.GetBool("GROUND_ENABLE", true);
 }