You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In GTNewHorizons/GT5-Unofficial@eb2b7d5 I wanted to have the config GUI to have a category per handler. So i enabled the categorized mode (here). It worked, however, i had the client category not capitalized. In order to do this, i tried 2 methods:
# Configuration file
client {
##########################################################################################################
# colormodulation
#--------------------------------------------------------------------------------------------------------#
# Color Modulation section
##########################################################################################################
colormodulation {
# hex value for the cable insulation color modulation. [default: #404040]
S:cableInsulation=#404040
# hex value for the construction foam color modulation. [default: #404040]
S:constructionFoam=#404040
# hex value for the machine metal color modulation. [default: #D2DCFF]
S:machineMetal=#D2DCFF
}
##########################################################################################################
# iface
#--------------------------------------------------------------------------------------------------------#
# Interface section
##########################################################################################################
iface {
# if true, puts the cover tabs display on the right of the UI instead of the left. [default: false]
B:coverTabsFlipped=false
# if true, makes cover tabs visible on GregTech machines. [default: true]
B:coverTabsVisible=true
# Which style to use for title tab on machine GUI? 0: text tab split-dark, 1: text tab unified, 2: item icon tab. [range: -2147483648 ~ 2147483647, default: 0]
I:titleTabStyle=0
# How verbose should tooltips be when LSHIFT is held? 0: disabled, 1: one-line, 2: normal, 3+: extended. [range: -2147483648 ~ 2147483647, default: 3]
I:tooltipShiftVerbosity=3
# How verbose should tooltips be? 0: disabled, 1: one-line, 2: normal, 3+: extended. [range: -2147483648 ~ 2147483647, default: 2]
I:tooltipVerbosity=2
}
##########################################################################################################
# preference
#--------------------------------------------------------------------------------------------------------#
# Preference section
##########################################################################################################
preference {
# if true, input filter will initially be on when input buses are placed in the world. [default: false]
B:inputBusInitialFilter=false
# if true, allow multistacks on single blocks by default when they are first placed in the world. [default: false]
B:singleBlockInitialAllowMultiStack=false
# if true, input filter will initially be on when machines are placed in the world. [default: false]
B:singleBlockInitialFilter=false
}
##########################################################################################################
# render
#--------------------------------------------------------------------------------------------------------#
# Render section
##########################################################################################################
render {
# if true, enables dirt particles when pollution reaches the threshold. [default: true]
B:renderDirtParticles=true
# if true, render flipped machine with flipped textures. [default: true]
B:renderFlippedMachinesFlipped=true
# if true, enables glowing of the machine controllers. [default: true]
B:renderGlowTextures=true
# if true, render indicators on hatches. [default: true]
B:renderIndicatorsOnHatch=true
# if true, enables the blue charge bar for an electric item's charge. [default: true]
B:renderItemChargeBar=true
# if true, enables the green -> red durability for an item's damage value. [default: true]
B:renderItemDurabilityBar=true
# if true, enables pollution fog when pollution reaches the threshold. [default: true]
B:renderPollutionFog=true
# if true, enables ambient-occlusion smooth lighting on tiles. [default: true]
B:renderTileAmbientOcclusion=true
# enables BaseMetaTileEntity block updates handled by BlockUpdateHandler. [default: false]
B:useBlockUpdateHandler=false
}
##########################################################################################################
# waila
#--------------------------------------------------------------------------------------------------------#
# Waila section
##########################################################################################################
waila {
# if true, enables showing voltage tier of transformer for Waila, instead of raw voltage number. [default: false]
B:wailaAverageNS=false
# if true, enables showing voltage tier of transformer for Waila, instead of raw voltage number. [default: true]
B:wailaTransformerVoltageTier=true
}
}
As you can see below, it did not work (i ensured twice that the langkey exists):
The other method (currently implemented in the linked commit) is to capitalize the category name in the config annotation:
This can be explained when we look at the config file:
The config
# Configuration file
Client {
##########################################################################################################
# colormodulation
#--------------------------------------------------------------------------------------------------------#
# Color Modulation section
##########################################################################################################
colormodulation {
}
##########################################################################################################
# iface
#--------------------------------------------------------------------------------------------------------#
# Interface section
##########################################################################################################
iface {
}
##########################################################################################################
# preference
#--------------------------------------------------------------------------------------------------------#
# Preference section
##########################################################################################################
preference {
}
##########################################################################################################
# render
#--------------------------------------------------------------------------------------------------------#
# Render section
##########################################################################################################
render {
}
##########################################################################################################
# waila
#--------------------------------------------------------------------------------------------------------#
# Waila section
##########################################################################################################
waila {
}
}
client {
colormodulation {
# hex value for the cable insulation color modulation. [default: #404040]
S:cableInsulation=#404040
# hex value for the construction foam color modulation. [default: #404040]
S:constructionFoam=#404040
# hex value for the machine metal color modulation. [default: #D2DCFF]
S:machineMetal=#D2DCFF
}
iface {
# if true, puts the cover tabs display on the right of the UI instead of the left. [default: false]
B:coverTabsFlipped=false
# if true, makes cover tabs visible on GregTech machines. [default: true]
B:coverTabsVisible=true
# Which style to use for title tab on machine GUI? 0: text tab split-dark, 1: text tab unified, 2: item icon tab. [range: -2147483648 ~ 2147483647, default: 0]
I:titleTabStyle=0
# How verbose should tooltips be when LSHIFT is held? 0: disabled, 1: one-line, 2: normal, 3+: extended. [range: -2147483648 ~ 2147483647, default: 3]
I:tooltipShiftVerbosity=3
# How verbose should tooltips be? 0: disabled, 1: one-line, 2: normal, 3+: extended. [range: -2147483648 ~ 2147483647, default: 2]
I:tooltipVerbosity=2
}
preference {
# if true, input filter will initially be on when input buses are placed in the world. [default: false]
B:inputBusInitialFilter=false
# if true, allow multistacks on single blocks by default when they are first placed in the world. [default: false]
B:singleBlockInitialAllowMultiStack=false
# if true, input filter will initially be on when machines are placed in the world. [default: false]
B:singleBlockInitialFilter=false
}
render {
# if true, enables dirt particles when pollution reaches the threshold. [default: true]
B:renderDirtParticles=true
# if true, render flipped machine with flipped textures. [default: true]
B:renderFlippedMachinesFlipped=true
# if true, enables glowing of the machine controllers. [default: true]
B:renderGlowTextures=true
# if true, render indicators on hatches. [default: true]
B:renderIndicatorsOnHatch=true
# if true, enables the blue charge bar for an electric item's charge. [default: true]
B:renderItemChargeBar=true
# if true, enables the green -> red durability for an item's damage value. [default: true]
B:renderItemDurabilityBar=true
# if true, enables pollution fog when pollution reaches the threshold. [default: true]
B:renderPollutionFog=true
# if true, enables ambient-occlusion smooth lighting on tiles. [default: true]
B:renderTileAmbientOcclusion=true
# enables BaseMetaTileEntity block updates handled by BlockUpdateHandler. [default: false]
B:useBlockUpdateHandler=false
}
waila {
# if true, enables showing voltage tier of transformer for Waila, instead of raw voltage number. [default: false]
B:wailaAverageNS=false
# if true, enables showing voltage tier of transformer for Waila, instead of raw voltage number. [default: true]
B:wailaTransformerVoltageTier=true
}
}
Imo, there are a few issues here:
Config.LangKey annotation does ignore classes, so it's impossible to change the displayed string for main config classes in game when categorization mode is enabled.
The category field of the Config annotation is not sanitized, because forge never expects non lowercase configs.
The parsing of the sub classes does not use the same parent category, as sub categories use sanitized parent category names while main categories use the raw name.
i'm running GTNHLib 0.5.5
The text was updated successfully, but these errors were encountered:
In GTNewHorizons/GT5-Unofficial@eb2b7d5 I wanted to have the config GUI to have a category per handler. So i enabled the categorized mode (here). It worked, however, i had the
client
category not capitalized. In order to do this, i tried 2 methods:@Config.langKey
annotation:It did work:
However, the sub categories are empty:
This can be explained when we look at the config file:
Imo, there are a few issues here:
Config.LangKey
annotation does ignore classes, so it's impossible to change the displayed string for main config classes in game when categorization mode is enabled.category
field of theConfig
annotation is not sanitized, because forge never expects non lowercase configs.i'm running GTNHLib 0.5.5
The text was updated successfully, but these errors were encountered: