private void UpdateControlTextRecurse(Type ty, Control ctl) { if (ctl.Controls.Count > 0) { foreach (Control c in ctl.Controls) { CompMachine.SetLangString(ty, c); UpdateControlTextRecurse(ty, c); } } }
public static bool Prefix(PawnRenderer __instance) { if (CompMachine.cachedMachines.TryGetValue(__instance, out CompMachine compMachine)) { if (compMachine != null) { machine = compMachine; pawn = CompMachine.cachedPawns[compMachine]; if (compMachine.turretAttached != null) { replaced = true; } else { replaced = false; } return(!replaced); } } replaced = false; return(true); }