public VehicleWheelMap(DocumentParser doc) { this.name = doc.ReadNextLine(); this.wheels = new VehicleAttachmentComplicatedWheels(); while (!doc.NextLineIsASection() && !doc.EOF()) { var wm = doc.ReadStringArray(2); switch (wm[0]) { case "localise": this.localName = wm[1]; break; case "fl_wheel_folder_name": this.wheels.FLWheel = wm[1]; break; case "fr_wheel_folder_name": this.wheels.FRWheel = wm[1]; break; case "rl_wheel_folder_name": this.wheels.RLWheel = wm[1]; break; case "rr_wheel_folder_name": this.wheels.RRWheel = wm[1]; break; case "wheel_folder_name": this.wheels.FLWheel = wm[1]; this.wheels.FRWheel = wm[1]; this.wheels.RLWheel = wm[1]; this.wheels.RRWheel = wm[1]; break; default: throw new NotImplementedException("Unknown WheelMap parameter: " + wm[0]); } } }
public VehicleSuspensionFactors(DocumentParser doc) { while (!doc.NextLineIsASection()) { var sf = doc.ReadStringArray(2); switch (sf[0]) { case "max_compression": this.maxCompression = sf[1].ToSingle(); break; case "ride_height": this.rideHeight = sf[1].ToSingle(); break; case "max_steering_lock": this.maxSteeringLock = sf[1].ToInt(); break; case "max_extension": this.maxExtension = sf[1].ToSingle(); break; default: throw new NotImplementedException("Unknown SuspensionFactor parameter: " + sf[0]); } } }
public VehicleAttachment(DocumentParser doc) { string s = doc.ReadNextLine(); switch (s) { case "DynamicsWheels": this.attachmentType = AttachmentType.DynamicsWheels; break; case "ComplicatedWheels": this.attachmentType = AttachmentType.ComplicatedWheels; this.wheels = new VehicleAttachmentComplicatedWheels(); while (!doc.NextLineIsASection()) { var cw = doc.ReadStringArray(2); switch (cw[0]) { case "fl_wheel_folder_name": this.wheels.FLWheel = cw[1]; break; case "fr_wheel_folder_name": this.wheels.FRWheel = cw[1]; break; case "rl_wheel_folder_name": this.wheels.RLWheel = cw[1]; break; case "rr_wheel_folder_name": this.wheels.RRWheel = cw[1]; break; case "wheel_folder_name": this.wheels.FLWheel = cw[1]; this.wheels.FRWheel = cw[1]; this.wheels.RLWheel = cw[1]; this.wheels.RRWheel = cw[1]; break; default: throw new NotImplementedException("Unknown ComplicatedWheels parameter: " + cw[0]); } } break; case "DynamicsFmodEngine": this.attachmentType = AttachmentType.DynamicsFmodEngine; this.engine = new VehicleAttachmentFModEngine(); while (!doc.NextLineIsASection()) { var dfe = doc.ReadStringArray(2); switch (dfe[0]) { case "engine": this.engine.Engine = dfe[1]; break; case "rpmsmooth": this.engine.RPMSmooth = Single.Parse(dfe[1], ToxicRagers.Culture); break; case "onloadsmooth": this.engine.OnLoadSmooth = Single.Parse(dfe[1], ToxicRagers.Culture); break; case "offloadsmooth": this.engine.OffLoadSmooth = Single.Parse(dfe[1], ToxicRagers.Culture); break; case "max_revs": this.engine.MaxRevs = int.Parse(dfe[1]); break; case "min_revs": this.engine.MinRevs = int.Parse(dfe[1]); break; default: throw new NotImplementedException("Unknown DynamicsFmodEngine parameter: " + dfe[0]); } } break; case "Horn": this.attachmentType = AttachmentType.Horn; var h = doc.ReadStringArray(2); this.horn = h[1]; break; case "ExhaustParticles": this.attachmentType = AttachmentType.ExhaustParticles; this.exhaust = new VehicleAttachmentExhaust(); while (!doc.NextLineIsASection()) { var ep = doc.ReadStringArray(2); switch (ep[0]) { case "vfx": this.exhaust.VFX = ep[1]; break; case "underwater_vfx": this.exhaust.UnderwaterVFX = ep[1]; break; case "anchor": this.exhaust.Anchor = ep[1]; break; default: throw new NotImplementedException("Unknown ExhaustParticle parameter: " + ep[0]); } } break; case "ReverseLightSound": this.attachmentType = AttachmentType.ReverseLightSound; var rl = doc.ReadStringArray(2); this.reverseLightSound = rl[1]; break; case "ContinuousSound": this.attachmentType = AttachmentType.ContinuousSound; while (!doc.NextLineIsASection()) { var cs = doc.ReadStringArray(2); switch (cs[0]) { case "sound": this.continuousSound = cs[1]; break; case "lump": this.continuousSoundLump = cs[1]; break; default: throw new NotImplementedException("Unknown ContinuousSound parameter: " + cs[0]); } } break; default: throw new NotImplementedException("Unknown AttachmentType: " + s); } }
public VehicleMaterialMap(DocumentParser doc) { this.name = doc.ReadNextLine(); while (!doc.NextLineIsASection()) { var mm = doc.ReadStringArray(); switch (mm[0].ToLower()) { case "shrapnel": this.shrapnel = Vector3.Parse(mm[1]); break; case "localise": this.localName = mm[1]; break; case "paint": this.paint = mm[2]; break; case "material_map_product_id": this.appID = mm[1].ToInt(); break; default: throw new NotImplementedException("Unknown MaterialMap parameter: " + mm[0]); } } }
public VehicleWheelModule(DocumentParser doc) { string s = doc.ReadNextLine(); switch (s) { case "SkidMarks": this.wheelModuleType = WheelModuleType.SkidMarks; this.skidMarkImage = doc.ReadStringArray(2)[1]; break; case "TyreParticles": case "TyreSmokeVFX": this.wheelModuleType = WheelModuleType.TyreParticles; this.tyreParticleVFX = doc.ReadStringArray(2)[1]; break; case "SkidNoise": this.wheelModuleType = WheelModuleType.SkidNoise; this.skidNoiseSound = doc.ReadStringArray(2)[1]; break; default: throw new NotImplementedException("Unknown WheelModuleType: " + s); } }