public void UnregisterJumpDrive(MyJumpDrive jumpDrive) { m_jumpDrives.Remove(jumpDrive); //GR: Add this in case fov is distrorted due to deleteting ship when playing fov animation MySector.MainCamera.FieldOfView = MySandboxGame.Config.FieldOfView; }
private MyTuple <string, Color> GetTooltip(MyJumpDrive jd) { bool enabled = jd.Enabled; string text = "[On] "; Color item = Color.Green; if (!jd.IsFull) { float num = jd.CurrentStoredPower / jd.BlockDefinition.PowerNeededForJump * 100f; text = string.Format("[Charging {0:N1}%] ", num); item = Color.Yellow; } if (!enabled) { text = "[Off] "; item = Color.Red; } if (jd.SlimBlock.IsDestroyed) { text = "[Busted] "; item = Color.Gray; } text += jd.CustomName.ToString(); return(new MyTuple <string, Color>(text, item)); }
public static void ShowJumpSelector(MyJumpDrive block) { MyRelationsBetweenPlayerAndBlock userRelationToOwner = block.GetUserRelationToOwner(MySession.Static.LocalPlayerId); if (userRelationToOwner == MyRelationsBetweenPlayerAndBlock.FactionShare || userRelationToOwner == MyRelationsBetweenPlayerAndBlock.Owner) { MyGuiSandbox.AddScreen(new JumpSelectorGui()); } }
public JumpDriveWrapper(MySlimBlock block) : base(block) { Block = (MyJumpDrive)block.FatBlock; }
public void RegisterJumpDrive(MyJumpDrive jumpDrive) { m_jumpDrives.Add(jumpDrive); }
public void UnregisterJumpDrive(MyJumpDrive jumpDrive) { m_jumpDrives.Remove(jumpDrive); }
// ReSharper disable once InconsistentNaming private static void InitPatch(MyJumpDrive __instance) { _jumpDistanceRatio.GetSync <float>(__instance).ValueChangedInRange(0, 1); }