-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from lpgagnon/rot-misctank
ROT-Misc-Tank: an ROTank for stock, restock, etc models
- Loading branch information
Showing
9 changed files
with
2,001 additions
and
348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
Squad/Parts/FuelTank/FoilTanks/ | ||
Squad/Parts/FuelTank/ | ||
Squad/Parts/Resources/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,316 @@ | ||
// ROT-MiscTank: a single part for all the ROL_MODEL cores from Misc/*.cfg | ||
// Because it's more manageable than 1 part per source mod, especially when | ||
// RO turns each part into 4 parts (sep, int, balloon, shielded) | ||
PART | ||
{ | ||
name = ROT-MiscTank | ||
title = Another Modular Tank | ||
rotanksApplyDefaults = true | ||
wantROTankTypes = fuel balloon sm shielded | ||
} | ||
// ROT-MiscTank-Radial: same, but for models that only make sense to | ||
// surface-attach | ||
PART | ||
{ | ||
name = ROT-MiscTank-Radial | ||
title = Another Modular Radial Tank | ||
rotanksApplyDefaults = true | ||
wantROTankTypes = fuel | ||
} | ||
// TODO: consider moving each mod's CORE{} to each mod's own file, with | ||
// something like a addBlahCores = true mechanism? | ||
// Make it easier to later include them in dedicated parts without copy-paste | ||
@PART[ROT-MiscTank]:AFTER[a_ROTanks] | ||
{ | ||
@description = A basic ROTanks tank exposing a bunch of models from other mods currently installed. Stock, ReStock, Vens, etc. | ||
@MODULE[ModuleROTank] | ||
{ | ||
@currentDiameter = 3 | ||
@currentVariant = Squad | ||
@currentCore = rotanks-squad-tank-flt800 | ||
CORE:NEEDS[Squad] | ||
{ | ||
variant = Squad | ||
model = rotanks-squad-tank-flt800 | ||
model = rotanks-squad-tank-flt400 | ||
model = rotanks-squad-tank-flt200 | ||
model = rotanks-squad-tank-flt100 | ||
model = rotanks-squad-tank-size1-size2 | ||
model = rotanks-squad-tank-size1-size2-slant | ||
model = rotanks-squad-tank-rocko-1 | ||
model = rotanks-squad-tank-rocko-1b | ||
model = rotanks-squad-tank-rocko-2 | ||
model = rotanks-squad-tank-rocko-3 | ||
model = rotanks-squad-tank-rocko-3b | ||
model = rotanks-squad-tank-rocko-3c | ||
model = rotanks-squad-tank-rocko-4 | ||
model = rotanks-squad-tank-rocko-4b | ||
model = rotanks-squad-tank-kerbo-1 | ||
model = rotanks-squad-tank-kerbo-2 | ||
model = rotanks-squad-tank-kerbo-3 | ||
model = rotanks-squad-tank-rcs-1 | ||
model = rotanks-squad-tank-rcs-2 | ||
model = rotanks-squad-tank-rcs-3 | ||
model = rotanks-squad-tank-oscar-b | ||
model = rotanks-squad-tank-xenon-small | ||
model = rotanks-squad-tank-xenon-large | ||
} | ||
CORE:NEEDS[Squad] | ||
{ | ||
variant = Squad Mk2 | ||
model = rotanks-squad-tank-mk2-short-1 | ||
model = rotanks-squad-tank-mk2-short-2 | ||
model = rotanks-squad-tank-mk2-short-3 | ||
model = rotanks-squad-tank-mk2-long-1 | ||
model = rotanks-squad-tank-mk2-long-2 | ||
model = rotanks-squad-tank-mk2-adapter-1 | ||
model = rotanks-squad-tank-mk2-adapter-2 | ||
model = rotanks-squad-tank-mk2-adapter-3 | ||
model = rotanks-squad-tank-mk2-adapter-4 | ||
} | ||
CORE:NEEDS[Squad] | ||
{ | ||
variant = Squad Mk3 | ||
model = rotanks-squad-tank-mk3-mono | ||
model = rotanks-squad-tank-mk3-short-1 | ||
model = rotanks-squad-tank-mk3-short-2 | ||
model = rotanks-squad-tank-mk3-medium-1 | ||
model = rotanks-squad-tank-mk3-medium-2 | ||
model = rotanks-squad-tank-mk3-long-1 | ||
model = rotanks-squad-tank-mk3-long-2 | ||
model = rotanks-squad-tank-mk3-adapter-mk2 | ||
model = rotanks-squad-tank-mk3-adapter-size2 | ||
model = rotanks-squad-tank-mk3-adapter-size2-slant | ||
model = rotanks-squad-tank-mk3-adapter-size3 | ||
model = rotanks-squad-tank-mk3-adapter-shuttle | ||
} | ||
CORE:NEEDS[ReStock] | ||
{ | ||
variant = ReStock | ||
model = rotanks-restock-tank-oscar-a | ||
model = rotanks-restock-tank-oscar-a-2 | ||
model = rotanks-restock-tank-oscar-b | ||
model = rotanks-restock-tank-oscar-b-2 | ||
model = rotanks-restock-tank-oscar-c | ||
model = rotanks-restock-tank-oscar-c-2 | ||
model = rotanks-restock-tank-oscar-d | ||
model = rotanks-restock-tank-oscar-d-2 | ||
model = rotanks-restock-tank-oscar-e | ||
model = rotanks-restock-tank-oscar-e-2 | ||
model = rotanks-restock-tank-flt100 | ||
model = rotanks-restock-tank-flt200 | ||
model = rotanks-restock-tank-flt400 | ||
model = rotanks-restock-tank-flt800 | ||
model = rotanks-restock-tank-1875-1-1 | ||
model = rotanks-restock-tank-1875-1-2 | ||
model = rotanks-restock-tank-1875-1-3 | ||
model = rotanks-restock-tank-1875-2-1 | ||
model = rotanks-restock-tank-1875-2-2 | ||
model = rotanks-restock-tank-1875-2-3 | ||
model = rotanks-restock-tank-1875-3-1 | ||
model = rotanks-restock-tank-1875-3-2 | ||
model = rotanks-restock-tank-1875-3-3 | ||
model = rotanks-restock-tank-1875-4-1 | ||
model = rotanks-restock-tank-1875-4-2 | ||
model = rotanks-restock-tank-1875-4-3 | ||
model = rotanks-restock-tank-375-1 | ||
model = rotanks-restock-tank-375-1-2 | ||
model = rotanks-restock-tank-375-2 | ||
model = rotanks-restock-tank-375-2-2 | ||
model = rotanks-restock-tank-375-3 | ||
model = rotanks-restock-tank-375-3-2 | ||
model = rotanks-restock-tank-375-4 | ||
model = rotanks-restock-tank-375-4-2 | ||
model = rotanks-restock-tank-siv-64k | ||
model = rotanks-restock-tank-siv-64k-2 | ||
model = rotanks-restock-tank-siv-128k | ||
model = rotanks-restock-tank-siv-128k-2 | ||
model = rotanks-restock-tank-siv-256k | ||
model = rotanks-restock-tank-siv-256k-2 | ||
model = rotanks-restock-tank-siv-512k | ||
model = rotanks-restock-tank-siv-512k-2 | ||
} | ||
CORE:NEEDS[ReStockPlus] | ||
{ | ||
variant = ReStockPlus | ||
model = rotanks-restockplus-tank-probe-1 | ||
model = rotanks-restockplus-tank-probe-2 | ||
} | ||
CORE:NEEDS[VenStockRevamp] | ||
{ | ||
variant = Ven's | ||
model = rotanks-vens-tank-octo | ||
model = rotanks-vens-tank-oscar-a | ||
model = rotanks-vens-tank-oscar-c | ||
model = rotanks-vens-tank-oscar-d | ||
model = rotanks-vens-tank-soft-1 | ||
model = rotanks-vens-tank-soft-2 | ||
model = rotanks-vens-tank-soft-3 | ||
model = rotanks-vens-tank-soft-4 | ||
model = rotanks-vens-tank-soft-5 | ||
model = rotanks-vens-tank-rockomax-48 | ||
} | ||
|
||
CORE:NEEDS[NearFutureExploration] | ||
{ | ||
variant = NFEx Multi Large | ||
_addNfexMaterials = withVariants | ||
_nfexPrefix = rotanks-nfex-tank-multi-2 | ||
} | ||
CORE:NEEDS[NearFutureExploration] | ||
{ | ||
variant = NFEx Multi Med | ||
_addNfexMaterials = withVariants | ||
_nfexPrefix = rotanks-nfex-tank-multi-3 | ||
} | ||
CORE:NEEDS[NearFutureExploration] | ||
{ | ||
variant = NFEx Multi Short | ||
_addNfexMaterials = withVariants | ||
_nfexPrefix = rotanks-nfex-tank-multi-4 | ||
} | ||
CORE:NEEDS[NearFutureExploration] | ||
{ | ||
variant = NFEx Multi Tiny | ||
_addNfexMaterials = true | ||
_nfexPrefix = rotanks-nfex-tank-multi-1 | ||
} | ||
} | ||
} | ||
|
||
@PART[ROT-MiscTank-Radial]:AFTER[a_ROTanks] | ||
{ | ||
@description = Like Another Modular Tanks, but for radial models | ||
!node_stack_top = delete | ||
!node_stack_bottom = delete | ||
!node_stack_noseinterstage = delete | ||
!node_stack_mountinterstage = delete | ||
@attachRules = 0,1,0,1,1 | ||
|
||
@tags ^= :$:, radial: | ||
|
||
@MODULE[ModuleROTank] | ||
{ | ||
@currentDiameter = 1 | ||
@currentVariant = Squad | ||
@currentCore = rotanks-squad-tank-rcs-radial | ||
// TODO: figure out which of these lines were needed to unbreak things | ||
%validateNose = false | ||
%validateMount = false | ||
!hasNoseToRotate = delete | ||
!hasMountToRotate = delete | ||
|
||
CORE:NEEDS[Squad] | ||
{ | ||
variant = Squad | ||
model = rotanks-squad-tank-rcs-radial | ||
model = rotanks-squad-tank-xenon-radial | ||
model = rotanks-squad-tank-radial-round | ||
model = rotanks-squad-tank-radial-capsule | ||
model = rotanks-squad-tank-radial-ore | ||
} | ||
CORE:NEEDS[ReStock] | ||
{ | ||
variant = ReStock | ||
model = rotanks-restock-tank-radial-round | ||
model = rotanks-restock-tank-radial-capsule | ||
model = rotanks-restock-tank-rcs-radial-1 | ||
model = rotanks-restock-tank-rcs-radial-2 | ||
model = rotanks-restock-tank-rcs-radial-3 | ||
model = rotanks-restock-tank-xenon-radial | ||
model = rotanks-restock-tank-goo-radial | ||
model = rotanks-restock-tank-goo-radial-compact | ||
} | ||
CORE:NEEDS[NearFutureExploration] | ||
{ | ||
variant = NFEx Large | ||
_addNfexMaterials = true | ||
_nfexPrefix = rotanks-nfex-tank-multi-5 | ||
} | ||
CORE:NEEDS[NearFutureExploration] | ||
{ | ||
variant = NFEx Med | ||
_addNfexMaterials = true | ||
_nfexPrefix = rotanks-nfex-tank-multi-6 | ||
} | ||
CORE:NEEDS[NearFutureExploration] | ||
{ | ||
variant = NFEx Short | ||
_addNfexMaterials = true | ||
_nfexPrefix = rotanks-nfex-tank-multi-7 | ||
} | ||
CORE:NEEDS[NearFutureExploration] | ||
{ | ||
variant = NFEx Tiny | ||
_addNfexMaterials = true | ||
_nfexPrefix = rotanks-nfex-tank-multi-8 | ||
} | ||
!NOSE {} | ||
!MOUNT {} | ||
NOSE { | ||
model = Model-None | ||
} | ||
MOUNT { | ||
model = Model-None | ||
} | ||
} | ||
} | ||
|
||
@PART[ROT-MiscTank*]:AFTER[a_ROTanks] | ||
{ | ||
@MODULE[ModuleROTank] | ||
{ | ||
@CORE:HAS[#_addNfexMaterials] | ||
{ | ||
_nfexMaterial = gold | ||
_nfexMaterial = silver | ||
_nfexMaterial = metal | ||
_nfexMaterial = rcs | ||
_nfexMaterial = xe | ||
_nfexMaterial = ar | ||
_nfexMaterial = li | ||
} | ||
} | ||
} | ||
|
||
@PART[ROT-MiscTank*]:HAS[@MODULE[ModuleROTank]:HAS[@CORE:HAS[#_nfexMaterial]]]:AFTER[a_ROTanks] | ||
{ | ||
@MODULE[ModuleROTank] | ||
{ | ||
@CORE:HAS[#_nfexMaterial,#_addNfexMaterials[withVariants]] | ||
{ | ||
model = #$_nfexPrefix$-$_nfexMaterial$-bare | ||
model = #$_nfexPrefix$-$_nfexMaterial$-struct | ||
model = #$_nfexPrefix$-$_nfexMaterial$-stack | ||
model = #$_nfexPrefix$-$_nfexMaterial$-compact | ||
!_nfexMaterial,0 = delete | ||
} | ||
@CORE:HAS[#_nfexMaterial,#_addNfexMaterials[true]] | ||
{ | ||
model = #$_nfexPrefix$-$_nfexMaterial$ | ||
!_nfexMaterial,0 = delete | ||
} | ||
} | ||
MM_PATCH_LOOP {} | ||
} | ||
@PART[ROT-MiscTank*]:AFTER[a_ROTanks] | ||
{ | ||
@MODULE[ModuleROTank] | ||
{ | ||
@CORE:HAS[#_addNfexMaterials] | ||
{ | ||
!_addNfexMaterials = delete | ||
!_nfexPrefix = delete | ||
} | ||
} | ||
} | ||
|
||
// temporary | ||
@PART[ROT-MiscTank*] | ||
{ | ||
%RP0conf = true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// _rotanksApplyDefaults: a helper to fill in repetitive elements of a ROL_MODEL | ||
// intended for a ROTanks core tank. | ||
// Basic usage: | ||
// ROL_MODEL | ||
// { | ||
// name = rotanks-xxx | ||
// modelName = yyy | ||
// diameter = nn // or both lowerDiameter and upperDiameter; default volume gets derived from this | ||
// length = nn | ||
// _rotanksApplyDefaults = true | ||
// } | ||
// | ||
// Runs in FOR[ROTanks]; avoids clobbering values already set. | ||
|
||
@ROL_MODEL[rotanks-*]:HAS[#_rotanksApplyDefaults,~upperDiameter]:FOR[ROTanks] | ||
{ | ||
&upperDiameter = #$diameter$ | ||
} | ||
@ROL_MODEL[rotanks-*]:HAS[#_rotanksApplyDefaults,~lowerDiameter]:FOR[ROTanks] | ||
{ | ||
&lowerDiameter = #$diameter$ | ||
} | ||
@ROL_MODEL[rotanks-*]:HAS[#_rotanksApplyDefaults,~diameter]:FOR[ROTanks] | ||
{ | ||
// diameter MUST be set for scaling to match the diameter slider | ||
&diameter = #$lowerDiameter$ | ||
} | ||
@ROL_MODEL[rotanks-*]:HAS[#_rotanksApplyDefaults]:FOR[ROTanks] | ||
{ | ||
&orientation = CENTRAL | ||
&style = Normal-Tank | ||
&mass = 0 | ||
&cost = 0 | ||
&minVerticalScale = 0.1 | ||
&maxVerticalScale = 10 | ||
|
||
// 5% less than procparts perfect cylinders. Should be vaguely reasonable | ||
// for your average pill shape; probably too good for short tanks, too mean | ||
// for long ones. Outlier models can override it however they want | ||
// (or can just set volume directly) | ||
&_defaultVolumeMultiplier = 0.95 | ||
|
||
_defaultVolume = #$upperDiameter$ | ||
@_defaultVolume += #$lowerDiameter$ | ||
@_defaultVolume /= 4 // upper+lower/2 = avgDiam, /2 = avg radius | ||
@_defaultVolume *= #$_defaultVolume$ | ||
@_defaultVolume *= 3.1416 | ||
@_defaultVolume *= #$height$ | ||
@_defaultVolume *= #$_defaultVolumeMultiplier$ | ||
&volume = #$_defaultVolume$ | ||
|
||
!_defaultVolume = delete | ||
!_defaultVolumeMultiplier = delete | ||
!_rotanksApplyDefaults = delete | ||
} |
Oops, something went wrong.