public SeamothModel(NitroxTechType techType, NitroxId id, NitroxVector3 position, NitroxQuaternion rotation, List <InteractiveChildObjectIdentifier> interactiveChildIdentifiers, Optional <NitroxId> dockingBayId, string name, NitroxVector3[] hsb, float health)
     : base(techType, id, position, rotation, interactiveChildIdentifiers, dockingBayId, name, hsb, health)
 {
     LightOn = true;
 }
Exemple #2
0
 public ExosuitModel(NitroxTechType techType, NitroxId id, NitroxVector3 position, NitroxQuaternion rotation, List <InteractiveChildObjectIdentifier> interactiveChildIdentifiers, Optional <NitroxId> dockingBayId, string name, NitroxVector3[] hsb, float health)
     : base(techType, id, position, rotation, interactiveChildIdentifiers, dockingBayId, name, hsb, health)
 {
     LeftArmId  = new NitroxId();
     RightArmId = new NitroxId();
 }
Exemple #3
0
 public NeptuneRocketModel(NitroxTechType techType, NitroxId id, NitroxVector3 position, NitroxQuaternion rotation, List <InteractiveChildObjectIdentifier> interactiveChildIdentifiers, Optional <NitroxId> dockingBayId, string name, NitroxVector3[] hsb, float health)
     : base(techType, id, position, rotation, interactiveChildIdentifiers, dockingBayId, name, hsb, health)
 {
     CurrentStage    = 0;
     ElevatorUp      = false;
     PreflightChecks = new ThreadSafeList <PreflightCheck>();
 }
 public static Quaternion ToUnity(this NitroxQuaternion v)
 {
     return(new Quaternion(v.X, v.Y, v.Z, v.W));
 }
Exemple #5
0
 public ExosuitMovementData(NitroxModel.DataStructures.GameLogic.NitroxTechType techType, NitroxId id, NitroxVector3 position, NitroxQuaternion rotation, NitroxVector3 velocity, NitroxVector3 angularVelocity, float steeringWheelYaw, float steeringWheelPitch, bool appliedThrottle,
                            NitroxVector3 leftAimTarget, NitroxVector3 rightAimTarget, float health) : base(techType, id, position, rotation, velocity, angularVelocity, steeringWheelYaw, steeringWheelPitch, appliedThrottle, health)
 {
     LeftAimTarget  = leftAimTarget;
     RightAimTarget = rightAimTarget;
 }
 public SeamothModulesAction(NitroxTechType techType, int slotID, NitroxId id, NitroxVector3 forward, NitroxQuaternion rotation)
 {
     TechType = techType;
     SlotID   = slotID;
     Id       = id;
     Forward  = forward;
     Rotation = rotation;
 }
Exemple #7
0
        public static VehicleModel BuildFrom(NitroxTechType techType, NitroxId constructedItemId, NitroxVector3 position, NitroxQuaternion rotation, List <InteractiveChildObjectIdentifier> interactiveChildIdentifiers, Optional <NitroxId> dockingBayId, string name, NitroxVector3[] hsb, float health)
        {
            switch (techType.ToUnity())
            {
            case TechType.Seamoth:
                return(new SeamothModel(techType, constructedItemId, position, rotation, interactiveChildIdentifiers, Optional.Empty, name, hsb, health));

            case TechType.Exosuit:
                return(new ExosuitModel(techType, constructedItemId, position, rotation, interactiveChildIdentifiers, Optional.Empty, name, hsb, health));

            case TechType.Cyclops:
                return(new CyclopsModel(techType, constructedItemId, position, rotation, interactiveChildIdentifiers, Optional.Empty, name, hsb, health));

            case TechType.RocketBase:
                return(null);

            default:
                throw new Exception($"Could not build from: {techType}");
            }
        }
Exemple #8
0
 public ConstructorBeginCrafting(NitroxId constructorId, NitroxId constructeditemId, NitroxTechType techType, float duration, List <InteractiveChildObjectIdentifier> interactiveChildIdentifiers, NitroxVector3 position, NitroxQuaternion rotation,
                                 string name, NitroxVector3[] hsb, float health)
 {
     ConstructorId               = constructorId;
     ConstructedItemId           = constructeditemId;
     TechType                    = techType;
     Duration                    = duration;
     InteractiveChildIdentifiers = interactiveChildIdentifiers;
     Position                    = position;
     Rotation                    = rotation;
     Name   = name;
     HSB    = hsb;
     Health = health;
 }
Exemple #9
0
 public void AddUpdate(NitroxId id, NitroxVector3 position, NitroxQuaternion rotation)
 {
     Updates.Add(new EntityTransformUpdate(id, position, rotation));
 }
Exemple #10
0
 public DroppedItem(NitroxId id, Optional <NitroxId> waterParkId, NitroxTechType techType, NitroxVector3 itemPosition, NitroxQuaternion itemRotation, byte[] bytes)
 {
     Id           = id;
     WaterParkId  = waterParkId;
     ItemPosition = itemPosition;
     ItemRotation = itemRotation;
     TechType     = techType;
     Bytes        = bytes;
 }
Exemple #11
0
        public Optional <AbsoluteEntityCell> UpdateEntityPosition(NitroxId id, NitroxVector3 position, NitroxQuaternion rotation)
        {
            Optional <Entity> opEntity = GetEntityById(id);

            if (!opEntity.HasValue)
            {
                Log.Debug("Could not update entity position because it was not found (maybe it was recently picked up)");
                return(Optional.Empty);
            }

            Entity             entity  = opEntity.Value;
            AbsoluteEntityCell oldCell = entity.AbsoluteEntityCell;

            entity.Transform.Position = position;
            entity.Transform.Rotation = rotation;

            AbsoluteEntityCell newCell = entity.AbsoluteEntityCell;

            if (oldCell != newCell)
            {
                EntitySwitchedCells(entity, oldCell, newCell);
            }

            return(Optional.Of(newCell));
        }
Exemple #12
0
 public Movement(ushort playerId, NitroxVector3 position, NitroxVector3 velocity, NitroxQuaternion bodyRotation, NitroxQuaternion aimingRotation)
 {
     PlayerId       = playerId;
     Position       = position;
     Velocity       = velocity;
     BodyRotation   = bodyRotation;
     AimingRotation = aimingRotation;
     DeliveryMethod = NitroxDeliveryMethod.DeliveryMethod.UNRELIABLE_SEQUENCED;
     UdpChannel     = UdpChannelId.PLAYER_MOVEMENT;
 }
Exemple #13
0
 public ItemPosition(NitroxId id, NitroxVector3 position, NitroxQuaternion rotation)
 {
     Id       = id;
     Position = position;
     Rotation = rotation;
 }
Exemple #14
0
 public CyclopsModel(NitroxModel.DataStructures.GameLogic.NitroxTechType techType, NitroxId id, NitroxVector3 position, NitroxQuaternion rotation, List <InteractiveChildObjectIdentifier> interactiveChildIdentifiers, Optional <NitroxId> dockingBayId, string name, NitroxVector3[] hsb, float health) : base(techType, id, position, rotation, interactiveChildIdentifiers, dockingBayId, name, hsb, health)
 {
     FloodLightsOn    = true;
     InternalLightsOn = true;
     SilentRunningOn  = false;
     ShieldOn         = false;
     SonarOn          = false;
     EngineState      = false;
     EngineMode       = CyclopsMotorMode.CyclopsMotorModes.Standard;
 }
Exemple #15
0
 public EntitySpawnPoint(AbsoluteEntityCell absoluteEntityCell, NitroxVector3 localPosition, NitroxQuaternion localRotation, List <string> allowedTypes, float density, string biomeType)
 {
     AbsoluteEntityCell = absoluteEntityCell;
     LocalPosition      = localPosition;
     LocalRotation      = localRotation;
     BiomeType          = biomeType;
     Density            = density;
     AllowedTypes       = allowedTypes;
 }
Exemple #16
0
 public EntityTransformUpdate(NitroxId id, NitroxVector3 position, NitroxQuaternion rotation)
 {
     Id       = id;
     Position = position;
     Rotation = rotation;
 }
Exemple #17
0
 public EntitySpawnPoint(AbsoluteEntityCell absoluteEntityCell, NitroxVector3 localPosition, NitroxQuaternion localRotation, NitroxVector3 scale, string classId)
 {
     AbsoluteEntityCell = absoluteEntityCell;
     ClassId            = classId;
     Density            = 1;
     LocalPosition      = localPosition;
     Scale         = scale;
     LocalRotation = localRotation;
 }
Exemple #18
0
 public NeptuneRocketModel(NitroxTechType techType, NitroxId id, NitroxVector3 position, NitroxQuaternion rotation, List <InteractiveChildObjectIdentifier> interactiveChildIdentifiers, Optional <NitroxId> dockingBayId, string name, NitroxVector3[] hsb, float health)
     : base(techType, id, position, rotation, interactiveChildIdentifiers, dockingBayId, name, hsb, health)
 {
     CurrentStage  = 0;
     ElevatorUp    = false;
     ConstructorId = new NitroxId(); //The ID will be set forever and will be fetched once a rocket base platform starts (see Rocket_Start_Patch)
 }