3 TextListboxWidget m_WgtValues;
71 PluginDeveloperSync developer_sync = PluginDeveloperSync.Cast(
GetPlugin( PluginDeveloperSync ) );
76 ref Param1<bool> params =
new Param1<bool>( state );
79 player.RPCSingleParam(
ERPCs.DEV_STATS_UPDATE, params,
true );
88 developer_sync.EnableUpdate( state,
ERPCs.DEV_STATS_UPDATE, player );
106 PluginDeveloperSync developerSync = PluginDeveloperSync.Cast(
GetPlugin(PluginDeveloperSync));
111 if ( developerSync.m_PlayerStatsSynced.Count() > 0 )
113 foreach (
SyncedValue syncedValue : developerSync.m_PlayerStatsSynced)
129 PluginDeveloperSync developerSync = PluginDeveloperSync.Cast(
GetPlugin( PluginDeveloperSync ) );
130 if ( developerSync.m_PlayerStatsSynced.Count() > 0 )
132 foreach (
int i,
SyncedValue syncedValue : developerSync.m_PlayerStatsSynced)
134 string statName = syncedValue.
GetName();
136 float value = syncedValue.
GetValue();
138 if ( statName ==
"BloodType" )
149 if (statName ==
"HeatBuffer")
151 float heatBufferNormalized =
Math.
Round(
Math.
Lerp(-1, 1, valueNormalized) * 1000) * 0.001;
160 m_SliderWidgets.GetKeyByValue(statName).SetCurrent(valueNormalized * 100);
180 SliderWidget sw = SliderWidget.Cast(widget.FindAnyWidget(
"StatSlider"));
184 m_WgtPanel.GetScript( WgtModifiersContent_panel_script );
185 WgtModifiersContent_panel_script.
Update();
195 TextListboxWidget wgt = TextListboxWidget.Cast(
m_WgtPanel);
202 if ( w.GetName() ==
"ResetStats" )
223 SliderWidget sw = SliderWidget.Cast(w);
225 for (
int i = 0; i < player.m_PlayerStats.GetPCO().
Get().
Count(); i++ )
227 string label = player.m_PlayerStats.GetPCO().Get().Get( i ).GetLabel();
228 if(label == stat_name)
230 float stat_min = player.m_PlayerStats.GetPCO().Get().Get( i ).GetMin();
231 float stat_max = player.m_PlayerStats.GetPCO().Get().Get( i ).GetMax();
232 float current_value_norm = sw.GetCurrent() / 100;
233 float current_value_abs = stat_min + (stat_max - stat_min) * current_value_norm;
253 ref Param1<bool> params =
new Param1<bool>(
false );
256 player.RPCSingleParam(
ERPCs.DEV_RPC_STATS_RESET, params,
true );
269 player.RPCSingleParam(
ERPCs.DEV_RPC_STAT_SET, params,
true );
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
PluginBase GetPlugin(typename plugin_type)
static string GetBloodTypeName(int bloodtype, out string type, out bool positive)
proto native WorkspaceWidget GetWorkspace()
void RPCChangeStat(string stat, float value)
bool OnChange(Widget w, int x, int y, bool finished)
bool OnClick(Widget w, int x, int y, int button)
void ~HudDebugWinCharStats()
ref map< ref EditBoxWidget, string > m_StatValuesInput
void AddValue(string title, string value, string value2)
ref map< ref SliderWidget, string > m_SliderWidgets
void FitWindowByContent(TextListboxWidget wgt)
void SetUpdate(bool state)
void AddValue(string title, string value)
override void SetUpdate(bool state)
void HudDebugWinCharStats(Widget widget_root)
ref array< ref Widget > m_StatWidgets
ref array< ref TextWidget > m_StatValues
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto string ToString(bool simple=true)
proto native CGame GetGame()
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float Round(float f)
Returns mathematical round of value.