public void Initialize (string name = "NO_NAME_BARREL", InfusionType iType = InfusionType.Electric, BarrelType bType = BarrelType.Carbine, float bLength = 1.0f, float bScale = 0.0f) { moduleType = ModuleType.Barrel; moduleName = name; infusionType = iType; barrelType = bType; barrelLength = bLength; barrelScale = bScale; }
public void InitializeInfusion(InfusionType type, InfusionTier tier, out Def infusion) { if (! (from t in DefDatabase <Def> .AllDefs where t.tier == tier && t.type == type && t.MatchItemType(parent.def) select t ).TryRandomElement(out infusion)) { //No infusion available from defs Log.Warning("Infused :: Couldn't find any " + type + "InfusionDef! Tier: " + tier); } isNew = true; }