public bool TryGetLight(string name, out VehicleLight result) { if (!PartNameMap.TryGetValue(name, out var lightId)) { result = null; return(false); } result = Get(lightId); return(true); }
public bool TryGetDoor(string name, out VehicleDoor result) { if (!PartNameMap.TryGetValue(name, out var doorId)) { result = null; return(false); } result = Get(doorId); return(true); }
public bool TryGetWindow(string name, out VehicleWindow result) { if (!PartNameMap.TryGetValue(name, out var windowId)) { result = null; return(false); } result = Get(windowId); return(true); }