module Base
{
	vehicle SemiTruck
    {
        template! = Rotators.SemiTruckTemplate,
        offRoadEfficiency = 1,

        model
        {
            file = Rotators.SemiTruckBase,
            scale = 1.1400,
            offset = 0.0000 0.6579 0.0000,
        }

        skin
        {
            texture = Vehicles/vehicles_rSemiTruck_white,
        }

        skin
        {
            texture = Vehicles/vehicles_rSemiTruck_Black,
        }

        skin
        {
            texture = Vehicles/vehicles_rSemiTruck_red,
        }

        skin
        {
            texture = Vehicles/vehicles_rSemiTruck_blue,
        }

        skin
        {
            texture = Vehicles/vehicles_rSemiTruck_CaspianBlue,
        }

        skin
        {
            texture = Vehicles/vehicles_rSemiTruck_yellow,
        }

        skin
        {
            texture = Vehicles/Vehicles_rSemiTruck_Green,
        }

        skin
        {
            texture = Vehicles/Vehicles_rSemiTruck_USMCgreen,
        }

        skin
        {
            texture = Vehicles/vehicles_rSemiTruck_blue_purple,
        }

        skin
        {
            texture = Vehicles/vehicles_rSemiTruck_bronze,
        }

        skin
        {
            texture = Vehicles/vehicles_rSemiTruck_blue_amber,
        }

        skin
        {
            texture = Vehicles/vehicles_rSemiTruck_blue_crimson,
        }

        skin
        {
            texture = Vehicles/vehicles_rSemiTruck_blue_lime,
        }

        skin
        {
            texture = Vehicles/vehicles_rSemiTruck_skyblue,
        }

        skin
        {
            texture = Vehicles/vehicles_rSemiTruck_blue_neon_pink,
        }

        extents = 1.9123 1.8070 5.9298,
        physicsChassisShape = 1.6667 1.8596 5.9825,
        centerOfMassOffset = 0.0000 0.8246 0.0000,
        shadowExtents = 2.1924 6.0386,
        shadowOffset = 0.0000 0.0000,
        mass = 821,
        engineForce = 4500,
        maxSpeed = 60,
        engineLoudness = 100,
        engineQuality = 75,
        brakingForce = 5,
        stoppingMovementForce = 2.0,
        rollInfluence = 0.34,
        steeringIncrement = 0.04,
        steeringClamp = 0.3,
        suspensionStiffness = 75,
        suspensionCompression = 4.83,
        suspensionDamping = 3.88,
        maxSuspensionTravelCm = 20,
        suspensionRestLength = 0.35,
        wheelFriction = 0.85f,
        seats = 4,
        template = PassengerSeat4,

        passenger FrontLeft
        {
            position inside
            {
                offset = 0.3158 -0.0439 1.1053,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
                offset = 1.1491 -0.5526 0.9561,
                rotate = 0.0000 0.0000 0.0000,
                area = SeatFrontLeft,
            }
        }

        passenger FrontRight
        {
            position inside
            {
                offset = -0.3158 -0.0175 1.1316,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
                offset = -1.1228 -0.5526 0.9649,
                rotate = 0.0000 0.0000 0.0000,
                area = SeatFrontRight,
            }
        }

        passenger RearLeft
        {
            position inside
            {
                offset = 0.3772 0.0000 -0.2193,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
            }
        }

        passenger RearRight
        {
            position inside
            {
                offset = -0.3421 0.0000 -0.2193,
                rotate = 0.0000 0.0000 0.0000,
            }

            position outside
            {
            }
        }

        area SeatRearLeft
        {
            xywh = 1.2982 1.1930 0.8246 0.8421,
        }

        area SeatRearRight
        {
            xywh = -1.3158 1.1930 0.8246 0.8421,
        }

        area TruckBed
        {
            xywh = -1.3070 0.2281 0.8421 1.1930,
        }

        area TrunkLeft
        {
            xywh = 1.3070 0.2281 0.8421 1.1930,
        }

        template = Rotators.SemiTruckTrunk/part/TrunkLeft,
        template = Rotators.SemiTruckTrunk/part/TrunkDoorLeft,

        part TrunkDoorLeft
        {
            model TrunkDoorLeft
            {
                file = Rotators.SemiTruckTrunkLeft,
                rotate = 0.0000 0.0000 0.0000,
                scale = 1,
                offset = 0.0000 0.0000 0.0000,
            }

            anim Open
            {
                sound = VehicleTrunkOpenVan,
            }

            anim Close
            {
                sound = VehicleTrunkCloseVan,
                rate = 1.8,
            }
        }

        template = Trunk/part/TruckBed,

        part TruckBed
        {
            itemType = Base.BigTrunk,
            durability = 10,

            container
            {
                conditionAffectsCapacity = false,
                capacity = 20,
            }
        }

        template = TrunkDoor,

        part TrunkDoor
        {
            durability = 10,
            model TrunkDoor
            {
                file = Rotators.SemiTruckTrunkRight,
                rotate = 0.0000 0.0000 0.0000,
                scale = 1,
                offset = 0.0000 0.0000 0.0000,
            }

            table install
            {
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                recipes = Intermediate Mechanics,
            }

            anim Close
            {
                sound = VehicleTrunkCloseVan,
                anim = TrunkRight_closing,
                rate = 1.8,
            }

            anim Open
            {
                sound = VehicleTrunkOpenVan,
                anim = TrunkRight_closing,
                reverse = TRUE,
                rate = 2.0,
            }

            anim Closed
            {
                anim = TrunkRight_closing,
                reverse = TRUE,
                animate = FALSE,
            }

            anim Opened
            {
                anim = TrunkRight_closing,
                animate = FALSE,
            }

            mechanicRequireKey = false,

            anim ActorOpen
            {
                anim = WindowOpenSuccess,
                rate = 0.15,
                angle = 0.0 90.0 0.0,
            }

            anim ActorClose
            {
                anim = Attack_Shove,
                rate = 0.3,
                angle = 0.0 90.0 0.0,
            }
        }

        template = Seat/part/SeatRearLeft,
        template = Seat/part/SeatRearRight,

        part Seat*
        {
            table install
            {
                skills = Mechanics:2,
                recipes = Intermediate Mechanics,
            }

            table uninstall
            {
                skills = Mechanics:2,
                recipes = Intermediate Mechanics,
            }
        }

        template = Mattresses/part/MattressRearLeft,
        template = Mattresses/part/MattressRearRight,
        template = Microwaves/part/MicrowaveRearRight,
        template = Fridges/part/FridgeRearLeft,
        template = Counters/part/CounterRearRight,
        template = GloveBox,
        useChassisPhysicsCollision = false,

        physics box
        {
            offset = 0.0000 0.6053 2.4002,
            extents = 1.2632 0.8772 1.4386,
            rotate = 0.0000 0.0000 0.0000,
        }

        physics box
        {
            offset = 0.0000 0.6856 -0.1579,
            extents = 1.7895 1.4211 1.8596,
            rotate = 0.0000 0.0000 0.0000,
        }

        physics box
        {
            offset = 0.0000 0.0439 -1.1466,
            extents = 1.7895 0.1930 3.9474,
            rotate = 0.0000 0.0000 0.0000,
        }

        attachment trailerfront
        {
            offset = 0.0000 -0.9211 3.2456,
            rotate = 0.0000 0.0000 0.0000,
            zoffset = 1.0000,
        }

        attachment trailerTruck
        {
            offset = 0.0000 -0.3066 -1.9649,
            rotate = 0.0000 0.0000 0.0000,
            canAttach = trailerTruck,
        }

        attachment trailer
        {
            offset = 0.0000 -0.9208 -3.1386,
            rotate = 0.0000 0.0000 0.0000,
            zoffset = -1.0000,
        }
        
    }
}
