Skip to content

Commit

Permalink
Add cfg validator and fix errors (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
StonesmileGit authored Jun 11, 2022
1 parent ec97d9d commit 9b5abf1
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 10 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/validateCfgFiles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Validate cfg files"

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
validate-cfg-files:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Validate config files
uses: KSP-CKAN/KSPMMCfgParser@master
2 changes: 1 addition & 1 deletion GameData/KerbalismConfig/Support/BeyondHome.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ RadiationBody:NEEDS[BeyondHome]
}

//Scaythe is magnetically inactive. For unknown reasons, radioactive isotopes
are slightly concentrated at the poles
//are slightly concentrated at the poles
RadiationBody:NEEDS[BeyondHome]
{
name = Scaythe
Expand Down
3 changes: 2 additions & 1 deletion GameData/KerbalismConfig/Support/GPO.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ RadiationBody:NEEDS[Olei]
radiation_model = metallic
radiation_inner = 1.5
radiation_pause = -0.004
}
RadiationBody:NEEDS[Olei]
{
name = Scorch
Expand Down
2 changes: 1 addition & 1 deletion GameData/KerbalismConfig/Support/SSPX.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@

}

@PART[Large_Crewed_Lab]:NEEDS[StationPartsExpansionRedux,ProfileRealismOverhaul]:AFTER[RealismOverhaul,KerbalismConfig]
@PART[Large_Crewed_Lab]:NEEDS[StationPartsExpansionRedux,ProfileRealismOverhaul]:AFTER[RealismOverhaul]
{
%MODULE[Habitat]
{
Expand Down
2 changes: 1 addition & 1 deletion GameData/KerbalismConfig/Support/SSTU.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@
// Only patch SSTUModularPart if it has a solar panel.
// This isn't fail-proof as a modular part can have switcheable solar panels and "Solar-None" as the default option,
// but we want to avoid adding the SolarPanelFixer on parts that don't have a solar panel.
@PART[*]:HAS[@MODULE:HAS[#name[SSTUModularPart],!#currentSolar[Solar-None]]]:NEEDS[SSTU]:AFTER[KerbalismDefault]
@PART[*]:HAS[@MODULE:HAS[#name[SSTUModularPart],~currentSolar[Solar-None]]]:NEEDS[SSTU]:AFTER[KerbalismDefault]
{
MODULE
{
Expand Down
6 changes: 3 additions & 3 deletions GameData/KerbalismConfig/Support/USI/USI_Kontainers.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@
{
@textureNames = UmbraSpaceIndustries/Kontainers/Assets/Tank_01;UmbraSpaceIndustries/Kontainers/Assets/Tank_03;UmbraSpaceIndustries/Kontainers/Assets/Tank_00;UmbraSpaceIndustries/Kontainers/Assets/Tank_06;UmbraSpaceIndustries/Kontainers/Assets/Tank_07;UmbraSpaceIndustries/Kontainers/Assets/Tank_05;UmbraSpaceIndustries/Kontainers/Assets/Tank_08
@textureDisplayNames = Water;Waste Water;LFO;Fuel;Mono Propellant;Liquid Hydrogen;Xenon
!fuelTankSetups
!fuelTankSetups = null
@useFuelSwitchModule = false
@nextButtonText = Next Cargo Texture
@prevButtonText = Previous Cargo Texture
Expand All @@ -389,7 +389,7 @@
{
@textureNames = UmbraSpaceIndustries/Kontainers/Assets/Tank_01;UmbraSpaceIndustries/Kontainers/Assets/Tank_03;UmbraSpaceIndustries/Kontainers/Assets/Tank_00;UmbraSpaceIndustries/Kontainers/Assets/Tank_06;UmbraSpaceIndustries/Kontainers/Assets/Tank_07;UmbraSpaceIndustries/Kontainers/Assets/Tank_05;UmbraSpaceIndustries/Kontainers/Assets/Tank_08
@textureDisplayNames = Water;Waste Water;LFO;Fuel;Mono Propellant;Liquid Hydrogen;Xenon
!fuelTankSetups
!fuelTankSetups = null
@useFuelSwitchModule = false
@nextButtonText = Next Cargo Texture
@prevButtonText = Previous Cargo Texture
Expand Down Expand Up @@ -1032,7 +1032,7 @@
{
@textureNames = UmbraSpaceIndustries/Kontainers/Assets/Kontainer_10;UmbraSpaceIndustries/Kontainers/Assets/Kontainer_13;UmbraSpaceIndustries/Kontainers/Assets/Kontainer_01;UmbraSpaceIndustries/Kontainers/Assets/Kontainer_11
@textureDisplayNames = Food;Waste;Uraninite;Ore
!fuelTankSetups
!fuelTankSetups = null
@useFuelSwitchModule = false
@nextButtonText = Next Cargo Texture
@prevButtonText = Previous Cargo Texture
Expand Down
2 changes: 1 addition & 1 deletion GameData/KerbalismConfig/System/Parts.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// ==============================================================================

//Aviation
@PART[SXTBuzzard|SXTmk3Cockpit52|SXTke111|25mKossak|SXTClyde|625mBonny|SXTmeadowlark|SXTEntenteCordiale|SXTGoose|SXTOsaulNoseCockpitAn225|RP0Nose-Cockpit||X1_Crew|Mark1Cockpit|RO-X1Cockpit]:NEEDS[ProfileRealismOverhaul]:AFTER[RealismOverhaul]
@PART[SXTBuzzard|SXTmk3Cockpit52|SXTke111|25mKossak|SXTClyde|625mBonny|SXTmeadowlark|SXTEntenteCordiale|SXTGoose|SXTOsaulNoseCockpitAn225|RP0Nose-Cockpit|X1_Crew|Mark1Cockpit|RO-X1Cockpit]:NEEDS[ProfileRealismOverhaul]:AFTER[RealismOverhaul]
{
processConfigureExclude = true
MODULE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ KERBALISM_HDD_SIZES
}
}

@PART[FASAGeminiPod2|FASAGeminiPod2White|ROAdvCapsule|RO-Mk1Cockpit|RO-Mk1CockpitInline|MK1CrewCabin|ok_bo_fem|ok_bo_male|rn_zond_sa|rn_lok_sa|rn_lok_bo|]:NEEDS[FeatureScience]:FOR[RO-KerbalismHardDrives]
@PART[FASAGeminiPod2|FASAGeminiPod2White|ROAdvCapsule|RO-Mk1Cockpit|RO-Mk1CockpitInline|MK1CrewCabin|ok_bo_fem|ok_bo_male|rn_zond_sa|rn_lok_sa|rn_lok_bo]:NEEDS[FeatureScience]:FOR[RO-KerbalismHardDrives]
{
!MODULE[HardDrive] {}
MODULE
Expand Down
2 changes: 1 addition & 1 deletion GameData/KerbalismConfig/System/Sickbay.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PARTUPGRADE:NEEDS[RP-0,FeatureComfort]
}
}

@PART[*]:HAS[#CrewCapacity[>3],@MODULE[Habitat],!MODULE[GravityRing]!MODULE[ModuleCommand],!MODULE[Laboratory],!MODULE[LaunchClamp],!MODULE[ModuleUnpressurizedCockpit]]:NEEDS[ProfileRealismOverhaul,FeatureComfort]:AFTER[zzzKerbalism]
@PART[*]:HAS[#CrewCapacity[>3],@MODULE[Habitat],!MODULE[GravityRing],!MODULE[ModuleCommand],!MODULE[Laboratory],!MODULE[LaunchClamp],!MODULE[ModuleUnpressurizedCockpit]]:NEEDS[ProfileRealismOverhaul,FeatureComfort]:AFTER[zzzKerbalism]
{
MODULE
{
Expand Down

0 comments on commit 9b5abf1

Please sign in to comment.