public Vehicle_Cart() { // current spin degree wheelRotation = 0; //Inventory Initialize. It should be moved in constructor storage = new ThingContainer(this); allowances = new ThingFilter(); allowances.SetFromPreset(StorageSettingsPreset.DefaultStockpile); allowances.SetFromPreset(StorageSettingsPreset.DumpingStockpile); }
public override void SpawnSetup() { base.SpawnSetup(); ToolsForHaulUtility.Cart.Add(this); if (mountableComp.Driver != null && IsCurrentlyMotorized()) { LongEventHandler.ExecuteWhenFinished(delegate { SoundInfo info = SoundInfo.InWorld(this); mountableComp.sustainerAmbient = vehicleComp.compProps.soundAmbient.TrySpawnSustainer(info); }); } if (mountableComp.Driver != null) { if (mountableComp.Driver.RaceProps.Humanlike) { mountableComp.Driver.RaceProps.makesFootprints = false; mountableComp.driverComp = new CompDriver { vehicle = this }; mountableComp.Driver.AllComps?.Add(mountableComp.driverComp); mountableComp.driverComp.parent = mountableComp.Driver; } } if (allowances == null) { allowances = new ThingFilter(); allowances.SetFromPreset(StorageSettingsPreset.DefaultStockpile); allowances.SetFromPreset(StorageSettingsPreset.DumpingStockpile); } LongEventHandler.ExecuteWhenFinished(UpdateGraphics); }
public void SetFromPreset(StorageSettingsPreset preset) { filter.SetFromPreset(preset); TryNotifyChanged(); }