diff --git a/Assets/CineboxAndrew b/Assets/CineboxAndrew index 4ed21b89..c262ab1a 160000 --- a/Assets/CineboxAndrew +++ b/Assets/CineboxAndrew @@ -1 +1 @@ -Subproject commit 4ed21b89e8ab44cda6efbc7aae9634aa6b82af3a +Subproject commit c262ab1a8477caec6a2ef1961157aed5e2dbd3c5 diff --git a/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-leg-1-rigid.mu b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-leg-1-rigid.mu new file mode 100644 index 00000000..1d01111a Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-leg-1-rigid.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-leg-1.mu b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-leg-1.mu new file mode 100644 index 00000000..15a90cff Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-leg-1.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-leg-2-rigid.mu b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-leg-2-rigid.mu new file mode 100644 index 00000000..72754e90 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-leg-2-rigid.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-leg-2.mu b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-leg-2.mu new file mode 100644 index 00000000..c32576c0 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-leg-2.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-leg-3-rigid.mu b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-leg-3-rigid.mu new file mode 100644 index 00000000..c9c7448c Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-leg-3-rigid.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-leg-3.mu b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-leg-3.mu new file mode 100644 index 00000000..47439d4a Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-leg-3.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-legs-1-foil-n.dds b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-legs-1-foil-n.dds new file mode 100644 index 00000000..8deb7aa1 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-legs-1-foil-n.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-legs-1-foil-s.dds b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-legs-1-foil-s.dds new file mode 100644 index 00000000..c590b4fc Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-legs-1-foil-s.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-legs-1-foil.dds b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-legs-1-foil.dds new file mode 100644 index 00000000..1c6a9f72 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-legs-1-foil.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-legs-1-n.dds b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-legs-1-n.dds new file mode 100644 index 00000000..5211be96 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-legs-1-n.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-legs-1.dds b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-legs-1.dds new file mode 100644 index 00000000..6b816d10 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Ground/restock-legs-1.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Structural/restock-launchclamp-1-n.dds b/Distribution/Restock/GameData/ReStock/Assets/Structural/restock-launchclamp-1-n.dds new file mode 100644 index 00000000..892a6c0d Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Structural/restock-launchclamp-1-n.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Structural/restock-launchclamp-1.dds b/Distribution/Restock/GameData/ReStock/Assets/Structural/restock-launchclamp-1.dds new file mode 100644 index 00000000..89898bb9 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Structural/restock-launchclamp-1.dds differ diff --git a/Distribution/Restock/GameData/ReStock/Assets/Structural/restock-launchclamp-1.mu b/Distribution/Restock/GameData/ReStock/Assets/Structural/restock-launchclamp-1.mu new file mode 100644 index 00000000..ffa1b965 Binary files /dev/null and b/Distribution/Restock/GameData/ReStock/Assets/Structural/restock-launchclamp-1.mu differ diff --git a/Distribution/Restock/GameData/ReStock/Patches/Ground/restock-legs.cfg b/Distribution/Restock/GameData/ReStock/Patches/Ground/restock-legs.cfg new file mode 100644 index 00000000..e631a563 --- /dev/null +++ b/Distribution/Restock/GameData/ReStock/Patches/Ground/restock-legs.cfg @@ -0,0 +1,166 @@ +// Patches applying art changes to Landing Legs +// Contents: +// - LT-05 Micro Landing Strut (miniLandingLeg) +// - LT-1 Landing Strut (landingLeg1) +// - LT-2 Landing Strut (landingLeg1-2) + +// LT-05 Micro Landing Strut +@PART[miniLandingLeg] +{ + @author = Andrew Cassidy + + !mesh = DELETE + MODEL + { + model = ReStock/Assets/Ground/restock-leg-1 + } + + @MODULE[ModuleWheelBase] { + @clipObject = leg1_piston_CAPSULECOLLIDER + } + + @MODULE[ModuleWheelSuspension] { + @suspensionTransformName = leg1_piston + @suspensionColliderName = leg1_piston_CAPSULECOLLIDER + } + + @MODULE[ModuleWheelDeployment] { + @animationTrfName = leg1 + @animationStateName = restock-leg-1-deploy + @retractTransformName = leg1_piston + } + + MODULE + { + name = ModulePartVariants + useMultipleDragCubes = false + baseVariant = Bare + VARIANT + { + name = Bare + displayName = #LOC_Restock_variant-probe-bare + primaryColor = #999999 + secondaryColor = #999999 + + GAMEOBJECTS + { + leg1_body_gold = false + leg1_foot_gold = false + leg1_hydraulic_upper_1_gold = false + leg1_cylinder_gold = false + leg1_upper_arm_gold = false + leg1_body_silver = false + leg1_foot_silver = false + leg1_hydraulic_upper_1_silver = false + leg1_cylinder_silver = false + leg1_upper_arm_silver = false + } + } + VARIANT + { + name = Gold + displayName = #LOC_Restock_variant-probe-gold + themeName = Gold + primaryColor = #fccb0a + secondaryColor = #999999 + + GAMEOBJECTS + { + leg1_body_gold = true + leg1_foot_gold = true + leg1_hydraulic_upper_1_gold = true + leg1_cylinder_gold = true + leg1_upper_arm_gold = true + leg1_body_silver = false + leg1_foot_silver = false + leg1_hydraulic_upper_1_silver = false + leg1_cylinder_silver = false + leg1_upper_arm_silver = false + } + } + VARIANT + { + name = Silver + displayName = #LOC_Restock_variant-probe-silver + themeName = Silver + primaryColor = #cecece + secondaryColor = #999999 + + GAMEOBJECTS + { + leg1_body_gold = false + leg1_foot_gold = false + leg1_hydraulic_upper_1_gold = false + leg1_cylinder_gold = false + leg1_upper_arm_gold = false + leg1_body_silver = true + leg1_foot_silver = true + leg1_hydraulic_upper_1_silver = true + leg1_cylinder_silver = true + leg1_upper_arm_silver = true + } + } + } +} + +// LT-1 Landing Strut +@PART[landingLeg1] +{ + @author = Andrew Cassidy + + !mesh = DELETE + MODEL + { + model = ReStock/Assets/Ground/restock-leg-2 + } + + @MODULE[ModuleWheelBase] { + @clipObject = leg2_piston_CAPSULECOLLIDER + } + + @MODULE[ModuleWheelSuspension] { + @suspensionTransformName = leg2_piston + @suspensionColliderName = leg2_piston_CAPSULECOLLIDER + } + + @MODULE[ModuleWheelDeployment] { + @animationTrfName = leg2 + @animationStateName = restock-leg-2-deploy + @retractTransformName = leg2_piston + } + + @MODULE[ModuleWheelBogey] { + @bogeyTransformName = leg2_foot + } +} + +// LT-2 Landing Strut +@PART[landingLeg1-2] +{ + @author = Andrew Cassidy + + !mesh = DELETE + MODEL + { + model = ReStock/Assets/Ground/restock-leg-3 + } + + @MODULE[ModuleWheelBase] { + @clipObject = leg3_piston_CAPSULECOLLIDER + } + + @MODULE[ModuleWheelSuspension] { + @suspensionTransformName = leg3_piston + @suspensionColliderName = leg3_piston_CAPSULECOLLIDER + } + + @MODULE[ModuleWheelDeployment] { + @animationTrfName = leg3 + @animationStateName = restock-leg-3-deploy + @retractTransformName = leg3_piston + } + + @MODULE[ModuleWheelBogey] { + @bogeyTransformName = leg3_foot + } +} diff --git a/Distribution/Restock/GameData/ReStock/Patches/Structural/restock-structural-launchclamp.cfg b/Distribution/Restock/GameData/ReStock/Patches/Structural/restock-structural-launchclamp.cfg new file mode 100644 index 00000000..350f8adc --- /dev/null +++ b/Distribution/Restock/GameData/ReStock/Patches/Structural/restock-structural-launchclamp.cfg @@ -0,0 +1,28 @@ +// Patches applying art changes to +// Contents: +// TT18-A Launch Stability Enhancer (launchClamp1) + + +// TT18-A Launch Stability Enhancer +@PART[launchClamp1] +{ + @author = Andrew Cassidy + !mesh = DELETE + MODEL + { + model = ReStock/Assets/Structural/restock-launchclamp-1 + } + + !MODULE[LaunchClamp] {} + + MODULE { + name = ModuleRestockLaunchClamp + trf_towerPivot_name = obj_girdercap + trf_towerStretch_name = obj_stretch + trf_towerGirder_name = obj_girder + trf_towerYoke_name = obj_yoke + trf_anchor_name = obj_ground + trf_animationRoot_name = restock-clamp-1 + anim_decouple_name = RestockLaunchClamp_Deploy + } +} \ No newline at end of file diff --git a/Distribution/Restock/GameData/ReStock/Plugins/Restock.dll b/Distribution/Restock/GameData/ReStock/Plugins/Restock.dll index 752515e0..e4b62441 100644 Binary files a/Distribution/Restock/GameData/ReStock/Plugins/Restock.dll and b/Distribution/Restock/GameData/ReStock/Plugins/Restock.dll differ diff --git a/Distribution/Restock/GameData/ReStock/Restock.restockblacklist b/Distribution/Restock/GameData/ReStock/Restock.restockblacklist index 1e0faae8..bf1c998e 100644 --- a/Distribution/Restock/GameData/ReStock/Restock.restockblacklist +++ b/Distribution/Restock/GameData/ReStock/Restock.restockblacklist @@ -111,6 +111,10 @@ Squad/Parts/Utility/ServiceBay/ Squad/Parts/Utility/spotLightMk1/ Squad/Parts/Utility/spotLightMk2/ Squad/Parts/Utility/launchEscapeSystem/ +Squad/Parts/Utility/launchClamp1/ +Squad/Parts/Utility/landingLegLT-1/ +Squad/Parts/Utility/landingLegLT-2/ +Squad/Parts/Utility/landingLegLT-5/ Squad/Parts/Resources/RadialTank/ Squad/Parts/Resources/SmallTank/ Squad/Parts/Resources/LargeTank/ diff --git a/Distribution/Restock/changelog.txt b/Distribution/Restock/changelog.txt index 0d865e1b..b3ce10be 100644 --- a/Distribution/Restock/changelog.txt +++ b/Distribution/Restock/changelog.txt @@ -29,6 +29,10 @@ - Kelus Mobility Enhancer (Nertea) - Kelus-LV Bay Mobility Enhancer (Nertea) - Launch Escape System (Andrew) + - Ground + - LT-05 Landing Strut (Andrew) + - LT-1 Landing Strut (Andrew) + - LT-2 Landing Strut (Andrew) - Compound Parts - FTX-2 External Fuel Duct (Andrew) - EAS-4 Strut Connector (Andrew) diff --git a/Distribution/RestockExtras/RestockRigidLegs/Localization/en-us.cfg b/Distribution/RestockExtras/RestockRigidLegs/Localization/en-us.cfg new file mode 100644 index 00000000..ec3fd073 --- /dev/null +++ b/Distribution/RestockExtras/RestockRigidLegs/Localization/en-us.cfg @@ -0,0 +1,42 @@ +// Proposed format: +// #LOC_RestockPlus_partconfigname_fieldname +// eg. +// #LOC_RestockPlus_restock-engine-375-3_title = ... +// #LOC_RestockPlus_restock-engine-375-3_description = ... + +Localization +{ + en-us + { + // ACTIONS AND BUTTONS + // =================== + + #LOC_RestockRigidLegs_extend = Extend + #LOC_RestockRigidLegs_retract = Retract + #LOC_RestockRigidLegs_toggle = Toggle Leg + + + // PHYSICS MATERIALS + // =================== + + #LOC_RestockRigidLegs_restock-low-grip = Low Grip + #LOC_RestockRigidLegs_restock-medium-grip = Medium Grip + #LOC_RestockRigidLegs_restock-high-grip = High Grip + #LOC_RestockRigidLegs_restock-extreme-grip = Extreme Grip + + + // LANDING LEGS + // =================== + + #LOC_RestockRigidLegs_restock-leg-1-rigid_title = LTR-05 Micro Landing Strut + #LOC_RestockRigidLegs_restock-leg-1-rigid_description = After frustration with the recycled pogo sticks, erm, space-grade suspensions on the standard LT-05 landing struts, we developed this alternate version with the leg firmly superglued into place + + #LOC_RestockRigidLegs_restock-leg-2-rigid_title = LTR-1 Landing Strut + #LOC_RestockRigidLegs_restock-leg-2-rigid_description = A larger rigid landing leg for medium sized craft, this landing leg is perfect for bounce-free landers or even small surface bases. + + #LOC_RestockRigidLegs_restock-leg-3-rigid_title = LTR-2 Landing Strut + #LOC_RestockRigidLegs_restock-leg-3-rigid_description = While it appears similar to the LT-2 landing strut, this is actually a re-purposed outrigger from a mobile crane our engineers found next door. It was probably not needed. + + #autoLOC_6011081 = Traction + } +} \ No newline at end of file diff --git a/Distribution/RestockExtras/RestockRigidLegs/Parts/restock-leg-1-rigid.cfg b/Distribution/RestockExtras/RestockRigidLegs/Parts/restock-leg-1-rigid.cfg new file mode 100644 index 00000000..a31aad64 --- /dev/null +++ b/Distribution/RestockExtras/RestockRigidLegs/Parts/restock-leg-1-rigid.cfg @@ -0,0 +1,145 @@ +// ReStock+ 0.2.0 +// Small Rigid Legs +PART +{ + name = restock-leg-1-rigid + module = Part + author = Andrew Cassidy + + MODEL + { + model = ReStock/Assets/Ground/restock-leg-1-rigid + } + rescaleFactor = 1.0 + + // attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision + attachRules = 1,1,0,0,0 + node_attach = 0.0256775, 0.05144107, 0.0, 1.0, 0.0, 0.0 + node_stack_bottom = 0.0945, 0.114, 0.0, 1.0, 0.0, 0.0, 0 + + TechRequired = survivability + entryCost = 820 + cost = 200 + mass = 0.015 + category = Ground + subcategory = 0 + + title = #LOC_RestockRigidLegs_restock-leg-1-rigid_title // LTR-05 Micro Landing Strut + manufacturer = #autoLOC_501651 //#autoLOC_501651 = Moving Parts Experts Group + description = #LOC_RestockRigidLegs_restock-leg-1-rigid_description + // After frustration with the recycled pogo sticks, erm, space-grade suspensions on the standard LT-05 landing struts, we developed this alternate version with the leg firmly superglued into place + + dragModelType = default + maximum_drag = 0.2 + minimum_drag = 0.2 + angularDrag = 2 + crashTolerance = 20 + maxTemp = 2000 + bulkheadProfiles = srf + tags = #autoLOC_500875 //#autoLOC_500875 = ground land leg support + + MODULE + { + name = ModuleAnimateGeneric + animationName = restock-leg-1-deploy-rigid + actionGUIName = #LOC_RestockRigidLegs_toggle // Toggle Leg + startEventGUIName = #LOC_RestockRigidLegs_extend // Extend + endEventGUIName = #LOC_RestockRigidLegs_retract // Retract + allowAnimationWhileShielded = False + allowDeployLimit = true + defaultActionGroup = Gear + } + + MODULE + { + name = ModulePhysicMaterial + activePhysicMaterialName = restock-medium-grip + PhysicMaterialName = restock-low-grip + PhysicMaterialName = restock-medium-grip + PHYSICMATERIALCOLORS + { + MATERIALCOLOR + { + name = restock-low-grip + color = 1,1,1 + } + MATERIALCOLOR + { + name = restock-medium-grip + color = 1,1,1 + } + } + } + + MODULE + { + name = ModulePartVariants + useMultipleDragCubes = false + baseVariant = Bare + VARIANT + { + name = Bare + displayName = #LOC_Restock_variant-probe-bare + primaryColor = #999999 + secondaryColor = #999999 + + GAMEOBJECTS + { + leg1_body_gold = false + leg1_foot_gold = false + leg1_hydraulic_upper_1_gold = false + leg1_cylinder_gold = false + leg1_upper_arm_gold = false + leg1_body_silver = false + leg1_foot_silver = false + leg1_hydraulic_upper_1_silver = false + leg1_cylinder_silver = false + leg1_upper_arm_silver = false + } + } + VARIANT + { + name = Gold + displayName = #LOC_Restock_variant-probe-gold + themeName = Gold + primaryColor = #fccb0a + secondaryColor = #999999 + + GAMEOBJECTS + { + leg1_body_gold = true + leg1_foot_gold = true + leg1_hydraulic_upper_1_gold = true + leg1_cylinder_gold = true + leg1_upper_arm_gold = true + leg1_body_silver = false + leg1_foot_silver = false + leg1_hydraulic_upper_1_silver = false + leg1_cylinder_silver = false + leg1_upper_arm_silver = false + } + } + VARIANT + { + name = Silver + displayName = #LOC_Restock_variant-probe-silver + themeName = Silver + primaryColor = #cecece + secondaryColor = #999999 + + GAMEOBJECTS + { + leg1_body_gold = false + leg1_foot_gold = false + leg1_hydraulic_upper_1_gold = false + leg1_cylinder_gold = false + leg1_upper_arm_gold = false + leg1_body_silver = true + leg1_foot_silver = true + leg1_hydraulic_upper_1_silver = true + leg1_cylinder_silver = true + leg1_upper_arm_silver = true + } + } + } +} diff --git a/Distribution/RestockExtras/RestockRigidLegs/Parts/restock-leg-2-rigid.cfg b/Distribution/RestockExtras/RestockRigidLegs/Parts/restock-leg-2-rigid.cfg new file mode 100644 index 00000000..3a942565 --- /dev/null +++ b/Distribution/RestockExtras/RestockRigidLegs/Parts/restock-leg-2-rigid.cfg @@ -0,0 +1,79 @@ +// ReStock+ 0.2.0 +// Medium Rigid Legs +PART +{ + name = restock-leg-2-rigid + module = Part + author = Andrew Cassidy + + MODEL + { + model = ReStock/Assets/Ground/restock-leg-2-rigid + } + rescaleFactor = 1.0 + + // attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision + attachRules = 1,1,0,0,0 + node_attach = 0.0, 0.0, 0.0, 0.0, 0.0, 1.0 + node_stack_bottom = 0.0, 0.0, -0.036, 0.0, 0.0, -1.0, 1 + + TechRequired = landing + entryCost = 2900 + cost = 440 + mass = 0.05 + category = Ground + subcategory = 0 + + title = #LOC_RestockRigidLegs_restock-leg-2-rigid_title // LTR-1 Landing Strut + manufacturer = #autoLOC_501651 //#autoLOC_501651 = Moving Parts Experts Group + description = #LOC_RestockRigidLegs_restock-leg-2-rigid_description + // A larger rigid landing leg for medium sized craft, this landing leg is perfect for bounce-free landers or even small surface bases. + + dragModelType = default + maximum_drag = 0.2 + minimum_drag = 0.2 + angularDrag = 2 + crashTolerance = 25 + maxTemp = 2000 + bulkheadProfiles = srf + tags = #autoLOC_500875 //#autoLOC_500875 = ground land leg support + + MODULE + { + name = ModuleAnimateGeneric + animationName = restock-leg-2-deploy-rigid + actionGUIName = #LOC_RestockRigidLegs_toggle // Toggle Leg + startEventGUIName = #LOC_RestockRigidLegs_extend // Extend + endEventGUIName = #LOC_RestockRigidLegs_retract // Retract + allowAnimationWhileShielded = False + allowDeployLimit = true + defaultActionGroup = Gear + } + + MODULE + { + name = ModulePhysicMaterial + activePhysicMaterialName = restock-high-grip + PhysicMaterialName = restock-low-grip + PhysicMaterialName = restock-medium-grip + PhysicMaterialName = restock-high-grip + PHYSICMATERIALCOLORS + { + MATERIALCOLOR + { + name = restock-low-grip + color = 1,1,1 + } + MATERIALCOLOR + { + name = restock-medium-grip + color = 1,1,1 + } + MATERIALCOLOR + { + name = restock-high-grip + color = 1,1,1 + } + } + } +} diff --git a/Distribution/RestockExtras/RestockRigidLegs/Parts/restock-leg-3-rigid.cfg b/Distribution/RestockExtras/RestockRigidLegs/Parts/restock-leg-3-rigid.cfg new file mode 100644 index 00000000..591a39ae --- /dev/null +++ b/Distribution/RestockExtras/RestockRigidLegs/Parts/restock-leg-3-rigid.cfg @@ -0,0 +1,86 @@ +// ReStock+ 0.2.0 +// Large Rigid Legs +PART +{ + name = restock-leg-3-rigid + module = Part + author = Andrew Cassidy + + MODEL + { + model = ReStock/Assets/Ground/restock-leg-3-rigid + } + rescaleFactor = 1.0 + + // attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision + attachRules = 1,1,0,0,0 + node_attach = 0.0, 0.38619, -0.193188, 0.0, 0.0, 1.0 + node_stack_bottom = 0.0, 0.38619, -0.2486, 0.0, 0.0, -1.0, 1 + + TechRequired = advLanding + entryCost = 4100 + cost = 340 + mass = 0.1 + category = Ground + subcategory = 0 + + title = #LOC_RestockRigidLegs_restock-leg-3-rigid_title // LTR-2 Landing Strut + manufacturer = #autoLOC_501651 //#autoLOC_501651 = Moving Parts Experts Group + description = #LOC_RestockRigidLegs_restock-leg-3-rigid_description + // While it appears similar to the LT-2 landing strut, this is actually a re-purposed outrigger from a mobile crane our engineers found next door. It was probably not needed. + + + dragModelType = default + maximum_drag = 0.2 + minimum_drag = 0.2 + angularDrag = 2 + crashTolerance = 30 + maxTemp = 2000 + bulkheadProfiles = srf + tags = #autoLOC_500875 //#autoLOC_500875 = ground land leg support + + MODULE + { + name = ModuleAnimateGeneric + animationName = restock-leg-3-deploy-rigid + actionGUIName = #LOC_RestockRigidLegs_toggle // Toggle Leg + startEventGUIName = #LOC_RestockRigidLegs_extend // Extend + endEventGUIName = #LOC_RestockRigidLegs_retract // Retract + allowAnimationWhileShielded = False + allowDeployLimit = true + defaultActionGroup = Gear + } + + MODULE + { + name = ModulePhysicMaterial + activePhysicMaterialName = restock-extreme-grip + PhysicMaterialName = restock-low-grip + PhysicMaterialName = restock-medium-grip + PhysicMaterialName = restock-high-grip + PhysicMaterialName = restock-extreme-grip + PHYSICMATERIALCOLORS + { + MATERIALCOLOR + { + name = restock-low-grip + color = 1,1,1 + } + MATERIALCOLOR + { + name = restock-medium-grip + color = 1,1,1 + } + MATERIALCOLOR + { + name = restock-high-grip + color = 1,1,1 + } + MATERIALCOLOR + { + name = restock-extreme-grip + color = 1,1,1 + } + } + } +} diff --git a/Distribution/RestockExtras/RestockRigidLegs/Resources/PhysicsMaterials.cfg b/Distribution/RestockExtras/RestockRigidLegs/Resources/PhysicsMaterials.cfg new file mode 100644 index 00000000..ea4d1ca5 --- /dev/null +++ b/Distribution/RestockExtras/RestockRigidLegs/Resources/PhysicsMaterials.cfg @@ -0,0 +1,43 @@ +PHYSICMATERIAL_DEFINITION +{ + name = restock-low-grip + displayName = #LOC_RestockRigidLegs_restock-low-grip // Low Grip + dynamicFriction = 0.4 + staticFriction = 0.5 + bounciness = 0 + frictionCombine = Maximum + bounceCombine = Average +} + +PHYSICMATERIAL_DEFINITION +{ + name = restock-medium-grip + displayName = #LOC_RestockRigidLegs_restock-medium-grip // Medium Grip + dynamicFriction = 0.5 + staticFriction = 0.6 + bounciness = 0 + frictionCombine = Maximum + bounceCombine = Average +} + +PHYSICMATERIAL_DEFINITION +{ + name = restock-high-grip + displayName = #LOC_RestockRigidLegs_restock-high-grip // High Grip + dynamicFriction = 0.7 + staticFriction = 0.8 + bounciness = 0 + frictionCombine = Maximum + bounceCombine = Average +} + +PHYSICMATERIAL_DEFINITION +{ + name = restock-extreme-grip + displayName = #LOC_RestockRigidLegs_restock-extreme-grip // Extreme Grip + dynamicFriction = 0.9 + staticFriction = 1.1 + bounciness = 0 + frictionCombine = Maximum + bounceCombine = Average +} \ No newline at end of file diff --git a/Distribution/RestockExtras/RestockRigidLegs/license.txt b/Distribution/RestockExtras/RestockRigidLegs/license.txt new file mode 100644 index 00000000..40498ef5 --- /dev/null +++ b/Distribution/RestockExtras/RestockRigidLegs/license.txt @@ -0,0 +1,9 @@ +CONFIGURATION +------------- + +Configs are distributed under the MIT license + +Copyright (c) 2019 the ReStock team +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/Distribution/RestockExtras/RestockRigidLegs/readme.txt b/Distribution/RestockExtras/RestockRigidLegs/readme.txt new file mode 100644 index 00000000..7e703f01 --- /dev/null +++ b/Distribution/RestockExtras/RestockRigidLegs/readme.txt @@ -0,0 +1,47 @@ +======================== +RESTOCK RIGID LEGS 0.3.0 +======================== + +Restock Rigid Legs adds alternate versions of the stock legs without the suspension module. These legs are functionally just animated parts the are by default tied to the landing gear action group. The legs are added as their own parts and do not replace the existing legs, making them compatible with saves just like any other mod. They also take advantage of the physics material switcher module added in 1.7.3, allowing for an adjustable level of friction to prevent your landers from sliding down slopes. + +============ +DEPENDENCIES +============ + +Required: +- Restock (0.3.0) +- ModuleManager (4.0.2) + +============ +INSTALLATION +============ + +To install, drag the RestockRigidLegs folder and ModuleManager DLL from the GameData folder you downloaded into your Kerbal Space Program Gamedata folder. If installed correctly, you should see: +- Kerbal Space Program + - GameData + - Squad + - ReStock + - Assets + - Patches + - etc. + - ReStockRigidLegs + - Parts + - Resources + - etc. + - ModuleManager.4.0.2.dll + +============ +LOCALIZATION +============ + +This mod primarily uses vanilla-provided localization, but for additional strings, it provides localization support for the following languages: +- English + +========= +LICENSING +========= + +See the license.txt file for more information. + +Any bundled mods are distributed under their own license: +- ModuleManager by blowfish and sarbian is distributed under a Creative Commons Sharealike license. More details, including source code, can be found here: http://forum.kerbalspaceprogram.com/threads/31342-0-20-ModuleManager-1-3-for-all-your-stock-modding-needs?p=528607&viewfull=1#post528607 diff --git a/Distribution/RestockPlus/GameData/ReStockPlus/Localization/en-us.cfg b/Distribution/RestockPlus/GameData/ReStockPlus/Localization/en-us.cfg index 10876c51..3e70bdfc 100644 --- a/Distribution/RestockPlus/GameData/ReStockPlus/Localization/en-us.cfg +++ b/Distribution/RestockPlus/GameData/ReStockPlus/Localization/en-us.cfg @@ -15,6 +15,10 @@ Localization #LOC_RestockPlus_light_rotate_off = Base Rotation #LOC_RestockPlus_light_rotate_toggle = Rotate Light + #LOC_RestockPlus_launch_clamp_extended_on = Extended + #LOC_RestockPlus_launch_clamp_extended_off = Clamp Extension + #LOC_RestockPlus_launch_clamp_extended_toggle = Extend Clamp + // ENGINES // ======= // 3.75m diff --git a/Distribution/RestockPlus/GameData/ReStockPlus/Patches/Structural/restock-launch-clamp-extensions.cfg b/Distribution/RestockPlus/GameData/ReStockPlus/Patches/Structural/restock-launch-clamp-extensions.cfg new file mode 100644 index 00000000..2199bcaf --- /dev/null +++ b/Distribution/RestockPlus/GameData/ReStockPlus/Patches/Structural/restock-launch-clamp-extensions.cfg @@ -0,0 +1,20 @@ +//allows extending and retracting of launch clamps + +// TT18-A Launch Stability Enhancer +@PART[launchClamp1] +{ + MODULE + { + name = ModuleAnimateGeneric + animationName = RestockLaunchClamp_Extend + startEventGUIName = #LOC_RestockPlus_launch_clamp_extended_on + endEventGUIName = #LOC_RestockPlus_launch_clamp_extended_off + actionGUIName = #LOC_RestockPlus_launch_clamp_extended__toggle + allowDeployLimit = true + revClampDirection = false + revClampSpeed = true + revClampPercent = true + eventAvailableFlight = false + eventAvailableEVA = false + } +} \ No newline at end of file diff --git a/Source/Restock/ModuleRestockLaunchClamp.cs b/Source/Restock/ModuleRestockLaunchClamp.cs new file mode 100644 index 00000000..cc0b0cef --- /dev/null +++ b/Source/Restock/ModuleRestockLaunchClamp.cs @@ -0,0 +1,164 @@ +using System; +using System.Collections.Generic; +using System.Reflection; +using UnityEngine; + +namespace Restock +{ + public class ModuleRestockLaunchClamp : LaunchClamp + { + [KSPField] public string trf_towerGirder_name = ""; + [KSPField] public string trf_towerYoke_name = ""; + + [KSPField] public Transform towerPivot; + [KSPField] public Transform towerYoke; + [KSPField] public Transform towerAnchor; + [KSPField] public Transform towerGirder; + [KSPField] public Transform towerStretch; + + [KSPField] public Mesh girderSegmentMesh; + [KSPField] public Mesh girderMesh; + + private List _girderVerts; + private List _girderUVs; + private List _girderNormals; + private List _girderTangents; + private List _girderColors; + private List _girderTris; + private int _girderSegments; + + private bool _girderHasTangents = false; + private bool _girderHasColors = false; + private int _girderVertCount; + private int _girderTriCount; + + private bool _flightUpdate = false; + + public override void OnLoad(ConfigNode node) + { + Debug.Log("OnLoad Called"); + + towerPivot = base.part.FindModelTransform(trf_towerPivot_name); + towerYoke = base.part.FindModelTransform(trf_towerYoke_name); + towerAnchor = base.part.FindModelTransform(trf_anchor_name); + towerGirder = base.part.FindModelTransform(trf_towerGirder_name); + towerStretch = base.part.FindModelTransform(trf_towerStretch_name); + + girderMesh = towerGirder.GetComponent().mesh; + girderSegmentMesh = Instantiate(girderMesh); + + base.OnLoad(node); + } + + public override void OnStart(StartState state) + { + + Debug.Log("OnStart Called"); + Debug.Log(girderSegmentMesh == null); + girderMesh = towerGirder.GetComponent().mesh; + + _girderVertCount = girderSegmentMesh.vertexCount; + _girderTriCount = girderSegmentMesh.triangles.Length; + + _girderVerts = new List(girderSegmentMesh.vertices); + _girderUVs = new List(girderSegmentMesh.uv); + _girderNormals = new List(girderSegmentMesh.normals); + if (girderSegmentMesh.tangents.Length > 0) + { + _girderHasTangents = true; + _girderTangents = new List(girderSegmentMesh.tangents); + } + if (girderSegmentMesh.colors32.Length > 0) + { + _girderHasColors = true; + _girderColors = new List(girderSegmentMesh.colors32); + } + _girderTris = new List(girderSegmentMesh.triangles); + _girderSegments = 1; + + base.OnStart(state); + + UpdateClamp(); + } + + public void LateUpdate() + { + if (!HighLogic.LoadedSceneIsEditor) + { + if (_flightUpdate) return; + else _flightUpdate = true; + } + + UpdateClamp(); + } + + public void UpdateClamp() + { + var height = base.height; + var initialHeight = base.initialHeight; + + towerAnchor.position = towerStretch.position - (towerStretch.up * height); + + var vec1 = Vector3.down; + var vec2 = towerAnchor.localPosition - towerYoke.localPosition ; + towerYoke.localRotation = Quaternion.FromToRotation(vec1, vec2); + + var segments = Mathf.CeilToInt(height / initialHeight); + if (segments != _girderSegments) + { + UpdateGirder(segments); + } + } + + private void UpdateGirder(int length) + { + if (length > _girderSegments) + { + for (int i = _girderSegments; i < length; i++) + { + var offset = Vector3.down * base.initialHeight * i; + var indexOffset = _girderVertCount * i; + for (int v = 0; v < _girderVertCount; v++) + { + _girderVerts.Add(girderSegmentMesh.vertices[v] + offset); + } + _girderNormals.AddRange(girderSegmentMesh.normals); + _girderUVs.AddRange(girderSegmentMesh.uv); + + if (_girderHasTangents) _girderTangents.AddRange(girderSegmentMesh.tangents); + if (_girderHasColors) _girderColors.AddRange(girderSegmentMesh.colors32); + + for (int t = 0; t < _girderTriCount; t++) + { + _girderTris.Add(girderSegmentMesh.triangles[t] + indexOffset); + } + } + + } + else + { + var startIndex = length * _girderVertCount; + var count = (_girderSegments - length) * _girderVertCount; + _girderVerts.RemoveRange(startIndex, count); + _girderNormals.RemoveRange(startIndex, count); + _girderUVs.RemoveRange(startIndex, count); + if (_girderHasTangents) _girderTangents.RemoveRange(startIndex, count); + if (_girderHasColors) _girderColors.RemoveRange(startIndex, count); + + _girderTris.RemoveRange(length * _girderTriCount, (_girderSegments - length) * _girderTriCount); + } + + girderMesh.Clear(); + + girderMesh.SetVertices(_girderVerts); + girderMesh.SetNormals(_girderNormals); + girderMesh.SetUVs(0, _girderUVs); + if (_girderHasTangents) girderMesh.SetTangents(_girderTangents); + if (_girderHasColors) girderMesh.SetColors(_girderColors); + girderMesh.SetTriangles(_girderTris, 0); + + girderMesh.RecalculateBounds(); + _girderSegments = length; + } + } +} \ No newline at end of file diff --git a/Source/Restock/Restock.csproj b/Source/Restock/Restock.csproj index 658d5fa5..6f709bf6 100644 --- a/Source/Restock/Restock.csproj +++ b/Source/Restock/Restock.csproj @@ -47,6 +47,7 @@ +