Skip to content

Commit

Permalink
Better restock support in ModularRCS (#214)
Browse files Browse the repository at this point in the history
- fix the -mini thruster scaling; modelScale isn't a thing.
  2x is a bit small, but good enough; they _are_ called "mini"
- add 45-degree variants
  • Loading branch information
lpgagnon committed Sep 8, 2023
1 parent 6b14a05 commit f77799b
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 17 deletions.
132 changes: 115 additions & 17 deletions GameData/ROEngines/Data/Models/ModelData-RCS-ReStock.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ ROL_MODEL:NEEDS[ReStock]
{
thrustTransformName = RCSjet
nozzles = 4
modelScale = 0.533333
thrustTransformPositionOffset = 0, 0.025, 0
thrustTransformScaleOffset = 0.77
}
Expand Down Expand Up @@ -49,7 +48,6 @@ ROL_MODEL:NEEDS[ReStock]
{
thrustTransformName = RCSjet
nozzles = 5
modelScale = 0.533333
thrustTransformPositionOffset = 0, 0.025, 0
thrustTransformScaleOffset = 0.77
}
Expand Down Expand Up @@ -77,7 +75,6 @@ ROL_MODEL:NEEDS[ReStock]
{
thrustTransformName = RCSjet
nozzles = 4
modelScale = 0.533333
thrustTransformPositionOffset = 0, 0.025, 0
thrustTransformScaleOffset = 0.77
}
Expand Down Expand Up @@ -105,7 +102,6 @@ ROL_MODEL:NEEDS[ReStock]
{
thrustTransformName = RCSjet
nozzles = 3
modelScale = 0.533333
thrustTransformPositionOffset = 0, 0.025, 0
thrustTransformScaleOffset = 0.77
}
Expand Down Expand Up @@ -133,7 +129,6 @@ ROL_MODEL:NEEDS[ReStock]
{
thrustTransformName = RCSjet
nozzles = 2
modelScale = 0.533333
thrustTransformPositionOffset = 0, 0.025, 0
thrustTransformScaleOffset = 0.77
}
Expand All @@ -149,6 +144,7 @@ ROL_MODEL:NEEDS[ReStock]
orientation = TOP
positionOffset = 0,0,0
rotationOffset = 0,0,0
scaleOffset = 2,2,2
surface = -0.05,0,0,-1,0,0
diameter = 0.234
height = 0
Expand All @@ -163,7 +159,6 @@ ROL_MODEL:NEEDS[ReStock]
{
thrustTransformName = RCSjet
nozzles = 4
modelScale = 0.207
thrustTransformScaleOffset = 0.25
}
}
Expand All @@ -176,6 +171,7 @@ ROL_MODEL:NEEDS[ReStock]
orientation = TOP
positionOffset = 0,0,0
rotationOffset = 0,0,0
scaleOffset = 2,2,2
surface = -0.05,0,0,-1,0,0
diameter = 0.234
height = 0
Expand All @@ -190,7 +186,6 @@ ROL_MODEL:NEEDS[ReStock]
{
thrustTransformName = RCSjet
nozzles = 5
modelScale = 0.207
thrustTransformScaleOffset = 0.25
}
}
Expand All @@ -203,6 +198,7 @@ ROL_MODEL:NEEDS[ReStock]
orientation = TOP
positionOffset = 0,0,0
rotationOffset = 0,0,0
scaleOffset = 2,2,2
surface = -0.05,0,0,-1,0,0
diameter = 0.234
height = 0
Expand All @@ -217,7 +213,6 @@ ROL_MODEL:NEEDS[ReStock]
{
thrustTransformName = RCSjet
nozzles = 4
modelScale = 0.207
thrustTransformScaleOffset = 0.25
}
}
Expand All @@ -230,6 +225,7 @@ ROL_MODEL:NEEDS[ReStock]
orientation = TOP
positionOffset = 0,0,0
rotationOffset = 0,0,0
scaleOffset = 2,2,2
surface = -0.05,0,0,-1,0,0
diameter = 0.234
height = 0
Expand All @@ -244,7 +240,6 @@ ROL_MODEL:NEEDS[ReStock]
{
thrustTransformName = RCSjet
nozzles = 3
modelScale = 0.207
thrustTransformScaleOffset = 0.25
}
}
Expand All @@ -257,6 +252,7 @@ ROL_MODEL:NEEDS[ReStock]
orientation = TOP
positionOffset = 0,0,0
rotationOffset = 0,0,0
scaleOffset = 2,2,2
surface = -0.05,0,0,-1,0,0
diameter = 0.234
height = 0
Expand All @@ -271,7 +267,6 @@ ROL_MODEL:NEEDS[ReStock]
{
thrustTransformName = RCSjet
nozzles = 2
modelScale = 0.207
thrustTransformScaleOffset = 0.25
}
}
Expand All @@ -298,7 +293,6 @@ ROL_MODEL:NEEDS[ReStock]
{
thrustTransformName = RCSthruster
nozzles = 1
modelScale = 0.533333
thrustTransformScaleOffset = 0.82
}
}
Expand All @@ -322,7 +316,6 @@ ROL_MODEL:NEEDS[ReStock]
RCSDATA {
thrustTransformName = RCSthruster
nozzles = 1
modelScale = 0.533333
thrustTransformScaleOffset = 0.82
}
}
Expand All @@ -335,6 +328,7 @@ ROL_MODEL:NEEDS[ReStock]
orientation = TOP
positionOffset = 0,0,0
rotationOffset = 0,0,0
scaleOffset = 2,2,2
surface = -0,0,0,-1,0,0
diameter = 0.234
height = 0
Expand All @@ -346,9 +340,8 @@ ROL_MODEL:NEEDS[ReStock]
{
thrustTransformName = RCSthruster
nozzles = 1
modelScale = 0.256
thrustTransformScaleOffset = 0.3
thrustTransformPositionOffset = 0, 0.07, 0
thrustTransformPositionOffset = 0, 0.15, 0
}
}
ROL_MODEL:NEEDS[ReStock]
Expand All @@ -360,6 +353,7 @@ ROL_MODEL:NEEDS[ReStock]
orientation = TOP
positionOffset = 0,0,0
rotationOffset = 0,0,0
scaleOffset = 2,2,2
surface = -0,0,0,-1,0,0
diameter = 0.234
height = 0
Expand All @@ -371,9 +365,8 @@ ROL_MODEL:NEEDS[ReStock]
{
thrustTransformName = RCSthruster
nozzles = 1
modelScale = 0.256
thrustTransformScaleOffset = 0.3
thrustTransformPositionOffset = 0, 0.07, 0
thrustTransformPositionOffset = 0, 0.15, 0
}
}

Expand All @@ -396,6 +389,111 @@ ROL_MODEL:NEEDS[ReStock]
{
thrustTransformName = RCSthruster
nozzles = 1
modelScale = 0.3
}
}


//// 45-degree-angles, stock-style

ROL_MODEL:NEEDS[ReStock]
{
// 4-Way
name = RCS-ReStock-45-4x
title = ReStock 45
modelName = ReStock/Assets/Control/restock-rcs-block-multi-2
orientation = TOP
positionOffset = 0,0,0
rotationOffset = 0,0,0
surface = -0.05,0,0,-1,0,0
diameter = 0.234
height = 0
volume = 0
disableTransform = B_RCS2x
disableTransform = B_RCS3x
//disableTransform = B_RCS4x
disableTransform = B_RCS5x
depthMask = RCSMask
RCSDATA
{
thrustTransformName = RCSthruster
nozzles = 4
thrustTransformScaleOffset = 0.77
thrustTransformPositionOffset = 0, 0.1, 0
}
}
+ROL_MODEL[RCS-ReStock-45-4x]
{
@name = RCS-ReStock-45-5x
@disableTransform,* ^= :RCS5x:RCS4x:
@RCSDATA
{
@nozzles = 5
}
}
+ROL_MODEL[RCS-ReStock-45-4x]
{
@name = RCS-ReStock-45-3x
@disableTransform,* ^= :RCS3x:RCS4x:
@RCSDATA
{
@nozzles = 3
}
}
+ROL_MODEL[RCS-ReStock-45-4x]
{
@name = RCS-ReStock-45-2x
@disableTransform,* ^= :RCS2x:RCS4x:
@RCSDATA
{
@nozzles = 2
}
}

//// 45-degree-angles, Mini-style

ROL_MODEL:NEEDS[ReStock]
{
// 4-Way
name = RCS-ReStock-45-4x-Mini
title = ReStock 45 Mini
modelName = ReStock/Assets/Control/restock-rcs-block-multi-mini-2
orientation = TOP
positionOffset = 0,0,0
rotationOffset = 0,0,0
scaleOffset = 2,2,2
surface = -0.05,0,0,-1,0,0
diameter = 0.234
height = 0
volume = 0
disableTransform = B_RCS2x
disableTransform = B_RCS3x
//disableTransform = B_RCS4x
disableTransform = B_RCS5x
depthMask = RCSMask
RCSDATA
{
thrustTransformName = RCSthruster
nozzles = 4
thrustTransformScaleOffset = 0.25
thrustTransformPositionOffset = 0, 0.085, 0
}
}
+ROL_MODEL[RCS-ReStock-45-4x-Mini]
{
@name = RCS-ReStock-45-3x-Mini
@disableTransform,* ^= :RCS3x:RCS4x:
@RCSDATA
{
@nozzles = 3
}
}
+ROL_MODEL[RCS-ReStock-45-4x-Mini]
{
@name = RCS-ReStock-45-2x-Mini
@disableTransform,* ^= :RCS2x:RCS4x:
@RCSDATA
{
@nozzles = 2
}
}

7 changes: 7 additions & 0 deletions GameData/ROEngines/PartConfigs/RCS/ReStock-Parts.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,30 @@
{
model = RCS-ReStock-2
model = RCS-ReStock-2-Mini
model = RCS-ReStock-45-2x
model = RCS-ReStock-45-2x-Mini
}
@RCSMODEL:HAS[#variant[3*]]
{
model = RCS-ReStock-3
model = RCS-ReStock-3-Mini
model = RCS-ReStock-45-3x
model = RCS-ReStock-45-3x-Mini
}
@RCSMODEL:HAS[#variant[4*]]
{
model = RCS-ReStock-4
model = RCS-ReStock-4-Mini
model = RCS-ReStock-4A
model = RCS-ReStock-4A-Mini
model = RCS-ReStock-45-4x
model = RCS-ReStock-45-4x-Mini
}
@RCSMODEL:HAS[#variant[5*]]
{
model = RCS-ReStock-5
model = RCS-ReStock-5-Mini
model = RCS-ReStock-45-5x
}
}
}
Expand Down

0 comments on commit f77799b

Please sign in to comment.