61 PluginDeveloperSync developer_sync = PluginDeveloperSync.Cast(
GetPlugin( PluginDeveloperSync ) );
66 ref Param1<bool> params =
new Param1<bool>( state );
69 player.RPCSingleParam(
ERPCs.DEV_AGENTS_UPDATE, params,
true );
78 developer_sync.EnableUpdate( state,
ERPCs.DEV_AGENTS_UPDATE, player );
116 PluginDeveloperSync developer_sync = PluginDeveloperSync.Cast(
GetPlugin( PluginDeveloperSync ) );
122 if ( developer_sync.m_PlayerAgentsSynced.Count() > 0 )
124 for (
int i = 0; i < developer_sync.m_PlayerAgentsSynced.Count(); i++ )
126 AddAgent( developer_sync.m_PlayerAgentsSynced.Get( i ).GetName(), developer_sync.m_PlayerAgentsSynced.Get( i ).GetValue(), developer_sync.m_PlayerAgentsSynced.Get( i ).GetID() );
145 if ( w.GetName() ==
"ButtonAgentActivate" )
153 else if ( w.GetName() ==
"ButtonAgentDeactivate" )
160 else if ( w.GetName() ==
"ResetAgents" )
177 ref Param1<int> p1 =
new Param1<int>( agent_id );
178 Man man =
GetGame().GetPlayer();
179 man.RPCSingleParam(
ERPCs.DEV_AGENT_GROW, p1,
true, man.GetIdentity());
184 ref Param1<bool> p1 =
new Param1<bool>(
false );
185 Man man =
GetGame().GetPlayer();
186 man.RPCSingleParam(
ERPCs.DEV_RPC_AGENT_RESET, p1,
true, man.GetIdentity());
189 void AddAgent(
string title,
string value,
int id )
191 Widget widget =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/debug/day_z_hud_debug_agent.layout",
m_WgtAgents );
192 ButtonWidget btn = ButtonWidget.Cast( widget.FindAnyWidget(
"TextAgentName" ) );
198 Widget activate_button = widget.FindAnyWidget(
"ButtonAgentActivate" );
203 count_widget.SetText(value);
206 Widget deactivate_button = widget.FindAnyWidget(
"ButtonAgentDeactivate" );
213 m_WgtAgents.GetScript( WgtModifiersContent_panel_script );
214 WgtModifiersContent_panel_script.Update();
230 FitWindowByContent( TextListboxWidget.Cast(
m_WgtAgents) );