public static void UpdateInstancePosition(BoatSystemController attemptedConstruct)
 {
     if (attemptedConstruct == null) return;
     if (m_Instance == null) // should never happen, but if it does, make this the instance
     {
         m_Instance = attemptedConstruct;
     }
     else if (attemptedConstruct.Location != new Point3D(0, 0, 0)) // move the instance to it's location and delete it
     {
         m_Instance.Location = attemptedConstruct.Location;
         attemptedConstruct.Delete();
     }
 }
Пример #2
0
 public static void UpdateInstancePosition(BoatSystemController attemptedConstruct)
 {
     if (attemptedConstruct == null)
     {
         return;
     }
     if (m_Instance == null) // should never happen, but if it does, make this the instance
     {
         m_Instance = attemptedConstruct;
     }
     else if (attemptedConstruct.Location != new Point3D(0, 0, 0)) // move the instance to it's location and delete it
     {
         m_Instance.Location = attemptedConstruct.Location;
         attemptedConstruct.Delete();
     }
 }
        public BoatSystemController()
            : base(0xEDC)
        {
            this.Name = "Boat System Controller";
            this.Movable = false;
            this.Visible = false;

            if (m_Instance != null)
            {
                // there can only be one BoatSytemController game stone in the world
                m_Instance.Location = this.Location;
                Server.Commands.CommandHandlers.BroadcastMessage(AccessLevel.Administrator, 0x489,
                    "Existing BoatSytemController has been moved to this location (DON'T DELETE IT!).");
                Timer.DelayCall(TimeSpan.FromSeconds(1), new TimerStateCallback<BoatSystemController>(UpdateInstancePosition), this);
            }
            else
                m_Instance = this;
        }
Пример #4
0
        public BoatSystemController()
            : base(0xEDC)
        {
            this.Name    = "Boat System Controller";
            this.Movable = false;
            this.Visible = false;

            if (m_Instance != null)
            {
                // there can only be one BoatSytemController game stone in the world
                m_Instance.Location = this.Location;
                Server.Commands.CommandHandlers.BroadcastMessage(AccessLevel.Administrator, 0x489,
                                                                 "Existing BoatSytemController has been moved to this location (DON'T DELETE IT!).");
                Timer.DelayCall(TimeSpan.FromSeconds(1), new TimerStateCallback <BoatSystemController>(UpdateInstancePosition), this);
            }
            else
            {
                m_Instance = this;
            }
        }
Пример #5
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
            case 0:
                _SmallBoatCost              = reader.ReadInt();
                _MediumBoatCost             = reader.ReadInt();
                _LargeBoatCost              = reader.ReadInt();
                _GargoyleBoatCost           = reader.ReadInt();
                _TokunoBoatCost             = reader.ReadInt();
                _OrcBoatCost                = reader.ReadInt();
                _ShipRepairToolsCost        = reader.ReadInt();
                _ShipCannonCost             = reader.ReadInt();
                _BoatRansomCostFraction     = reader.ReadDouble();
                _BoatRansomGoldSinkFraction = reader.ReadDouble();
                break;
            }
            m_Instance = this;
            //SBShipwright.UpdateSBInfos();
        }
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();
            switch (version)
            {
                case 0:
                    _SmallBoatCost = reader.ReadInt();
                    _MediumBoatCost = reader.ReadInt();
                    _LargeBoatCost = reader.ReadInt();
                    _GargoyleBoatCost = reader.ReadInt();
                    _TokunoBoatCost = reader.ReadInt();
                    _OrcBoatCost = reader.ReadInt();
                    _ShipRepairToolsCost = reader.ReadInt();
                    _ShipCannonCost = reader.ReadInt();
                    _BoatRansomCostFraction = reader.ReadDouble();
                    _BoatRansomGoldSinkFraction = reader.ReadDouble();
                    break;
            }
            m_Instance = this;
            //SBShipwright.UpdateSBInfos();
        }