diff --git a/plugin_template/patches/configs/relay_module.patch b/plugin_template/patches/configs/relay_module.patch index 3237cbc..de8a9b3 100644 --- a/plugin_template/patches/configs/relay_module.patch +++ b/plugin_template/patches/configs/relay_module.patch @@ -1,47 +1,18 @@ -:parts #antenna_0v_dish_ra-2 { - +Module_NextRelay { - +Data_NextRelay { +@stage "CommNext:setup-relays"; +@use "relay_mixins"; +@use "constants"; - } - } - PAMModuleVisualsOverride +: [ - { - PartComponentModuleName: "PartComponentModule_NextRelay", - ModuleDisplayName: "PartModules/NextRelay/Name", - ShowHeader: true, - ShowFooter: true - } - ]; +:parts #antenna_0v_dish_ra-2 { + @include override-range($commnext-RANGE-RA2); + @include add-next-relay-visuals(); } :parts #antenna_0v_dish_ra-15 { - +Module_NextRelay { - +Data_NextRelay { - - } - } - PAMModuleVisualsOverride +: [ - { - PartComponentModuleName: "PartComponentModule_NextRelay", - ModuleDisplayName: "PartModules/NextRelay/Name", - ShowHeader: true, - ShowFooter: true - } - ]; + @include override-range($commnext-RANGE-RA15); + @include add-next-relay-visuals(); } :parts #antenna_0v_dish_ra-100 { - +Module_NextRelay { - +Data_NextRelay { - - } - } - PAMModuleVisualsOverride +: [ - { - PartComponentModuleName: "PartComponentModule_NextRelay", - ModuleDisplayName: "PartModules/NextRelay/Name", - ShowHeader: true, - ShowFooter: true - } - ]; + @include override-range($commnext-RANGE-RA100); + @include add-next-relay-visuals(); } \ No newline at end of file diff --git a/plugin_template/patches/configs/stages.patch b/plugin_template/patches/configs/stages.patch new file mode 100644 index 0000000..cc25790 --- /dev/null +++ b/plugin_template/patches/configs/stages.patch @@ -0,0 +1,7 @@ +// We want to run our relay setup before the orbital survey, otherwise the small +// relay OAB part info will be moved to second page of the Part Details window +@define-stage "CommNext:setup-relays": +{ + @before "falki.orbital_survey"; +}; + diff --git a/plugin_template/patches/libraries/_constants.patch b/plugin_template/patches/libraries/_constants.patch new file mode 100644 index 0000000..67bbe16 --- /dev/null +++ b/plugin_template/patches/libraries/_constants.patch @@ -0,0 +1,6 @@ +// Was 36G, now 2G +$commnext-RANGE-RA2: 2000000000.00; +// Was 86G, now 15G +$commnext-RANGE-RA15: 15000000000.00; +// Was 130G, now 30G +$commnext-RANGE-RA100: 30000000000.00; \ No newline at end of file diff --git a/plugin_template/patches/libraries/_relay_mixins.patch b/plugin_template/patches/libraries/_relay_mixins.patch new file mode 100644 index 0000000..2a8d0e4 --- /dev/null +++ b/plugin_template/patches/libraries/_relay_mixins.patch @@ -0,0 +1,18 @@ +@mixin override-range($range) { + Module_DataTransmitter { + Data_Transmitter { + Range: $range; + } + } +} + +@mixin add-next-relay-visuals() { + PAMModuleVisualsOverride +: [ + { + PartComponentModuleName: "PartComponentModule_NextRelay", + ModuleDisplayName: "PartModules/NextRelay/Name", + ShowHeader: true, + ShowFooter: true + } + ]; +}