Skip to content

Commit

Permalink
Merge pull request #127 from post-kerbin-mining-corporation/dev
Browse files Browse the repository at this point in the history
Release 1.6.4
  • Loading branch information
ChrisAdderley authored Jan 22, 2022
2 parents db9538f + 20cca95 commit 55bb330
Show file tree
Hide file tree
Showing 7 changed files with 85 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .mod_data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package:
- changelog.txt
dependencies: # Configure dependencies
ModuleManager:
version: 4.1.4
version: 4.2.1
location: s3
B9PartSwitch:
version: 2.18.0
Expand Down
5 changes: 5 additions & 0 deletions GameData/CryoTanks/Localization/en-us.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ Localization
#LOC_CryoTanks_isru_LCH4Ox_StopAction = Stop ISRU [LCH4+Ox]
#LOC_CryoTanks_isru_LCH4Ox_ToggleAction = Toggle ISRU [LCH4+Ox]

#LOC_CryoTanks_LFConverterEfficiency = <CryoTanks> LF mass converter efficiency
#LOC_CryoTanks_LFOConverterEfficiency = <CryoTanks> LFO mass converter efficiency
#LOC_CryoTanks_LFLFOConverterEfficiency = <CryoTanks> LF and LFO mass converter efficiency


// Plugin
// ModuleCryoTank
#LOC_CryoTanks_ModuleCryoTank_ModuleName = Cryogenic Tank
Expand Down
14 changes: 14 additions & 0 deletions GameData/CryoTanks/Localization/ru.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,20 @@ Localization
#LOC_CryoTanks_isru_LH2Ox_StartAction = Вкл. конвертер [ЖH2/Ок]
#LOC_CryoTanks_isru_LH2Ox_StopAction = Выкл. конвертер [ЖH2/Ок]
#LOC_CryoTanks_isru_LH2Ox_ToggleAction = Перекл. конвертер [ЖH2/Ок]

#LOC_CryoTanks_isru_LCH4_name = ЖCH4
#LOC_CryoTanks_isru_LCH4_StartAction = Вкл. конвертер [ЖCH4]
#LOC_CryoTanks_isru_LCH4_StopAction = Выкл. конвертер [ЖCH4]
#LOC_CryoTanks_isru_LCH4_ToggleAction = Перекл. конвертер [ЖCH4]

#LOC_CryoTanks_isru_LCH4Ox_name = ЖCH4/Ок
#LOC_CryoTanks_isru_LCH4Ox_StartAction = Вкл. конвертер [ЖCH4/Ок]
#LOC_CryoTanks_isru_LCH4Ox_StopAction = Выкл. конвертер [ЖCH4/Ок]
#LOC_CryoTanks_isru_LCH4Ox_ToggleAction = Перекл. конвертер [ЖCH4/Ок]

#LOC_CryoTanks_LFConverterEfficiency = <CryoTanks> Эффективность ЖТ конвертера по массе
#LOC_CryoTanks_LFOConverterEfficiency = <CryoTanks> Эффективность ЖТ/Ок конвертера по массе
#LOC_CryoTanks_LFLFOConverterEfficiency = <CryoTanks> Эффективность ЖТ и ЖТ/Ок конвертера по массе

// Plugin
// ModuleCryoTank
Expand Down
Binary file not shown.
68 changes: 60 additions & 8 deletions GameData/CryoTanks/Patches/CryoTanksISRU_patch.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
// an invariant mass was used to calculate the values
//=====================================================================================


// ---------------------------------------------------------------------------
// Add to the description Ore-LF and Ore-LFO converters mass efficiency values
// ---------------------------------------------------------------------------

// generate Ore-LF mass efficiency value
@PART:HAS[#CryoTanks_Converter[Set],@MODULE[ModuleResourceConverter]:HAS[@INPUT_RESOURCE:HAS[#ResourceName[Ore]],@OUTPUT_RESOURCE:HAS[#ResourceName[LiquidFuel]],!OUTPUT_RESOURCE:HAS[#ResourceName[Oxidizer]]]]:FOR[CryoTanks]
{
ore-density = #$@RESOURCE_DEFINITION[Ore]/density$
Expand All @@ -20,10 +22,9 @@
@olf-mass-efficiency /= #$ore-density$
@olf-mass-efficiency /= #$olf-ore-ratio$
olf-mass-efficiency_int = #$olf-mass-efficiency[0,.]$

// CURRENTLY DISABLED as it won't localize
//@description = #$description$\n<color=#2cbcc9><CryoTanks> LF mass converter efficiency: $olf-mass-efficiency_int$%</color>
}

// generate Ore-LFO mass efficiency value
@PART:HAS[#CryoTanks_Converter[Set],@MODULE[ModuleResourceConverter]:HAS[@INPUT_RESOURCE:HAS[#ResourceName[Ore]],@OUTPUT_RESOURCE:HAS[#ResourceName[LiquidFuel]],@OUTPUT_RESOURCE:HAS[#ResourceName[Oxidizer]]]]:FOR[CryoTanks]
{
%ore-density = #$@RESOURCE_DEFINITION[Ore]/density$
Expand All @@ -38,27 +39,78 @@
olfo-mass_lf = 1
@olfo-mass_lf *= #$lf-density$
@olfo-mass_lf *= #$olfo-lf-ratio$
olfo-mass_ox = 1
@olfo-mass_ox *= #$ox-density$
@olfo-mass_ox *= #$olfo-ox-ratio$

olfo-mass-efficiency = 0
@olfo-mass-efficiency += #$olfo-mass_lf$
@olfo-mass-efficiency += #$olfo-mass_ox$
@olfo-mass-efficiency /= #$ore-density$
@olfo-mass-efficiency /= #$olfo-ore-ratio$
@olfo-mass-efficiency *= 100
olfo-mass-efficiency_int = #$olfo-mass-efficiency[0,.]$
@description = #$description$\n<color=#2cbcc9><CryoTanks> LFO mass converter efficiency: $olfo-mass-efficiency_int$%</color>
}

// if Ore-LF equal to Ore-LFO combine them into one line and add to desc
@PART:HAS[#olf-mass-efficiency_int,#olfo-mass-efficiency_int]:FOR[CryoTanks]
{
olf-olfo-mass-efficiency_int = #$olf-mass-efficiency_int$
@olf-olfo-mass-efficiency_int -= #$olfo-mass-efficiency_int$
}

@PART:HAS[#olf-olfo-mass-efficiency_int[0]]:FOR[CryoTanks]
{
olf-olfo-text = #LOC_CryoTanks_LFLFOConverterEfficiency
@description = #$description$\n<color=#2cbcc9>$olf-olfo-text$: $olf-mass-efficiency_int$%</color>
}

// otherwise add to desc each line
@PART:HAS[~olf-olfo-mass-efficiency_int[0],#olf-mass-efficiency_int]:FOR[CryoTanks]
{
olf-text = #LOC_CryoTanks_LFConverterEfficiency
@description = #$description$\n<color=#2cbcc9>$olf-text$: $olf-mass-efficiency_int$%</color>
}

@PART:HAS[~olf-olfo-mass-efficiency_int[0],#olfo-mass-efficiency_int]:FOR[CryoTanks]
{
olfo-text = #LOC_CryoTanks_LFOConverterEfficiency
@description = #$description$\n<color=#2cbcc9>$olfo-text$: $olfo-mass-efficiency_int$%</color>
}

// remove all variable
@PART:HAS[#olf-mass-efficiency_int]:FOR[CryoTanks]
{
!ore-density = none
!lf-density = none
!olf-lf-ratio = none
!olf-ore-ratio = none
!olf-mass-efficiency = none
!olf-mass-efficiency_int = none
!olf-text = none

!olf-olfo-mass-efficiency_int = none
!olf-olfo-text = none
}

@PART:HAS[#olfo-mass-efficiency_int]:FOR[CryoTanks]
{
!ore-density = none
!lf-density = none
!ox-density = none
!olfo-lf-ratio = none
!olfo-ox-ratio = none
!olfo-ore-ratio = none
!olfo-mass_lf = none
!olfo-mass_ox = none
!olfo-mass-efficiency = none
!olfo-mass-efficiency_int = none
!olfo-text = none
}

// -----------------------------------------
// adds LH2, LH2Ox, LCH4, LCH4Ox Converters
// -----------------------------------------

@PART:HAS[#CryoTanks_Converter[Set]]:FOR[CryoTanks]
{
Expand Down
2 changes: 1 addition & 1 deletion GameData/CryoTanks/Versioning/CryoTanks.version
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
"MAJOR":1,
"MINOR":6,
"PATCH":3,
"PATCH":4,
"BUILD":0
},
"KSP_VERSION":
Expand Down
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v1.6.4
------
- Bugfixes

v1.6.3
------
- Bugfixes
Expand Down

0 comments on commit 55bb330

Please sign in to comment.