1class PluginItemDiagnosticEventHandler
extends ScriptedWidgetEventHandler
6 if( ButtonWidget.Cast(w))
8 GetGame().GetMission().AddActiveInputExcludes({
"menu"});
16 if( ButtonWidget.Cast(w))
18 GetGame().GetMission().RemoveActiveInputExcludes({
"menu"},
true);
24 override bool OnClick( Widget w,
int x,
int y,
int button )
26 return m_Owner.OnClick( w,
x,
y, button );
31 return m_Owner.OnMouseButtonDown( w,
x,
y, button );
36 return m_Owner.OnMouseButtonUp( w,
x,
y, button );
176 myTimer1.Run(1,
this,
"Tick", NULL,
true);
188 SetDebugDeveloper_item(item);
217 #ifdef DIAG_DEVELOPER
225 GetGame().GetInput().ResetGameFocus();
226 GetGame().GetUIManager().ShowUICursor(
false);
229 if (
GetGame().GetUIManager().IsDialogVisible())
231 GetGame().GetUIManager().CloseDialog();
241 GetGame().RPCSingleParam(player,
ERPCs.RPC_ITEM_DIAG_CLOSE,null,
true);
280 Debug.LogError(
"PluginItemDiagnostic: dead debug record, removing record");
300 Param1<Object> p1 =
new Param1<Object>(item);
304 if (!
GetGame().IsMultiplayer())
321 if (!
GetGame().IsMultiplayer())
332 SetDebugDeveloper_item(entity);
378 for(
int i = 0; i < count; i++)
413 override void OnUpdate(
float delta_time)
415 super.OnUpdate(delta_time);
437 pts[0] =
GetGame().GetPlayer().GetPosition();
456 if (vars_server && vars_client)
465 for(
int i = 0; i < agents_count; i++)
478 for(
int i = 0; i <
m_Agents.Count(); i++)
488 for(
int i = 0; i < vars_server.Count(); i++)
490 Param param_server = vars_server.Get(i);
493 Param param_client = vars_client.Get(i);
496 string name = p2_server.param1;
506 Debug.Log(
"----------------------",
"ItemDebug");
521 Param1<string> debug_output =
new Param1<string>(entity.GetDebugText());
522 properties.Insert(debug_output);
527 Param1<int> agents_count =
new Param1<int>(num_of_agents);
528 properties.InsertAt(agents_count,1);
533 int number_of_items = 0;
535 properties.Insert(quantity);
539 properties.Insert(liquid_type);
543 properties.Insert(wetness);
547 properties.Insert(temperature);
551 properties.Insert(frozen);
555 properties.Insert(FTProgress);
560 properties.Insert(FTChangeTime);
564 properties.Insert(FTRemainingTime);
569 properties.Insert(OverheatPgs);
576 properties.Insert(CookingTime);
580 properties.Insert(DecayTime);
584 properties.Insert(DecayDelta);
589 properties.Insert(energy);
601 properties.Insert(health);
621 Param1<int> item_count =
new Param1<int>(number_of_items);
622 properties.InsertAt(item_count,2);
633 int agents = item.GetAgents();
634 if(agents == 0)
return 0;
635 int num_of_agents = 0;
637 PluginTransmissionAgents.BuildAgentArray(agents, agents_aray);
638 int agents_count = agents_aray.Count();
640 for(
int i = 0; i < agents_count; i++)
643 string agent_name = PluginTransmissionAgents.GetNameByID(agents_aray.Get(i));
644 Param1<string> param1 =
new Param1<string>(agent_name);
645 properties.Insert(param1);
649 return num_of_agents;
override bool OnMouseEnter(Widget w, int x, int y)
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
Super root of all classes in Enforce script.
override FoodStage GetFoodStage()
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Serialization general interface. Serializer API works with:
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
override bool OnClick(Widget w, int x, int y, int button)
buttons clicks
proto native CGame GetGame()
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
proto void GetMousePos(out int x, out int y)
void OnInit()
Callback for user defined initialization. Called for all suites during TestHarness....
enum ProcessDirectDamageFlags m_Owner
override void OnRPC(ParamsReadContext ctx)
void ShowWidgets(bool show)
void ToggleDebugWindowEvent()
void RegisterDebugItem(ItemBase item, PlayerBase player)
void UpdateNumericalVarsWidget(array< ref Param > vars_server, array< ref Param > vars_client)
ref map< string, float > m_Floats
ref map< string, float > m_VarsNumbersFinalServer
void GeneratePropertiesObject(EntityAI item)
void GetLocalProperties(EntityAI entity, array< ref Param > properties, bool client=false)
TextWidget m_ClassNameWidget
ref map< string, float > m_VarsFinalClient
ButtonWidget m_CloseButton
PluginConfigDebugProfile m_ConfigDebugProfile
TextListboxWidget m_DebugFloatsProperListWidget
TextListboxWidget m_DebugClientVarsWidget
void SetDragging(bool enable)
void FillServerFinalVars(int count, ParamsReadContext ctx, array< ref Param > params)
void OnSelectAction(EntityAI ent, int actionId)
TextWidget m_DebugOutputClient
ItemPreviewWidget m_ItemPreviewWidget
void PluginItemDiagnostic()
int FillWithAgents(ItemBase item, array< ref Param > properties)
TextListboxWidget m_DebugAgentListWidget
void OnScriptMenuOpened(bool opened)
ref PluginItemDiagnosticEventHandler m_EventHandler
void FillAgentArray(ParamsReadContext ctx, int agents_count)
ref map< PlayerBase, Object > m_ObserversMap
Object GetWatchedItem(PlayerBase player)
void StopWatchRequest(PlayerBase player)
TextWidget m_DebugOutputServer
void DisplayAll(EntityAI item, array< ref Param > vars_server, array< ref Param > vars_client, string debug_text_server)
void ~PluginItemDiagnostic()
ref array< ref Param > m_Properties
bool OnMouseButtonDown(Widget w, int x, int y, int button)
PluginBase GetPlugin(typename plugin_type)
ref TextWidget m_DistanceWidget[MAX_SIMULTANIOUS_PLAYERS]