Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
        public static void ShowJumpSelector(MyJumpDrive block)
        {
            MyRelationsBetweenPlayerAndBlock userRelationToOwner = block.GetUserRelationToOwner(MySession.Static.LocalPlayerId);

            if (userRelationToOwner == MyRelationsBetweenPlayerAndBlock.FactionShare || userRelationToOwner == MyRelationsBetweenPlayerAndBlock.Owner)
            {
                MyGuiSandbox.AddScreen(new JumpSelectorGui());
            }
        }
Ejemplo n.º 4
0
 public JumpDriveWrapper(MySlimBlock block) : base(block)
 {
     Block = (MyJumpDrive)block.FatBlock;
 }
Ejemplo n.º 5
0
 public void RegisterJumpDrive(MyJumpDrive jumpDrive)
 {
     m_jumpDrives.Add(jumpDrive);
 }
Ejemplo n.º 6
0
 public void UnregisterJumpDrive(MyJumpDrive jumpDrive)
 {
     m_jumpDrives.Remove(jumpDrive);
 }
Ejemplo n.º 7
0
 // ReSharper disable once InconsistentNaming
 private static void InitPatch(MyJumpDrive __instance)
 {
     _jumpDistanceRatio.GetSync <float>(__instance).ValueChangedInRange(0, 1);
 }