128 {
129 PluginDeveloperSync developerSync = PluginDeveloperSync.Cast(
GetPlugin( PluginDeveloperSync ) );
130 if ( developerSync.m_PlayerStatsSynced.Count() > 0 )
131 {
132 foreach (int i, SyncedValue syncedValue : developerSync.m_PlayerStatsSynced)
133 {
134 string statName = syncedValue.
GetName();
136 float value = syncedValue.
GetValue();
137
138 if ( statName == "BloodType" )
139 {
141 bool positive;
142
144 name +=
"("+BloodTypes.GetBloodTypeName(Math.Round(value), type, positive)+
")";
146 }
147 else
148 {
149 if (statName == "HeatBuffer")
150 {
151 float heatBufferNormalized = Math.Round(Math.Lerp(-1, 1, valueNormalized) * 1000) * 0.001;
153 }
154 else
156
157 }
158
160 m_SliderWidgets.GetKeyByValue(statName).SetCurrent(valueNormalized * 100);
161 }
162 }
163
164 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
PluginBase GetPlugin(typename plugin_type)
ref map< ref SliderWidget, string > m_SliderWidgets
ref array< ref TextWidget > m_StatValues
proto string ToString(bool simple=true)