9 static int m_SystemsMask;
12 bool m_ModifiersEnabled =
true;
14 bool m_StaminaDisabled;
15 bool m_ClientInventoryDesync =
false;
19 bool m_LogPlayerStats;
20 Shape m_VehicleFreeAreaBox;
21 ref EnvDebugData m_EnvDebugData;
22 ref FallDamageDebugData m_FallDamageDebugData;
24 ref WeaponLiftDiag m_WeaponLiftDiag =
new WeaponLiftDiag();
36 protected void BindCallbacks()
104 #ifdef ENABLE_LOGGING
308 super.OnRPC(player, rpc_type, ctx);
312 case ERPCs.DIAG_MISC_ENVIRONMENT_DEBUG_DATA:
315 m_EnvDebugData =
new EnvDebugData();
317 ctx.
Read(m_EnvDebugData);
321 case ERPCs.DIAG_MISC_FALLDAMAGE_DEBUG_DATA:
323 if (!m_FallDamageDebugData)
324 m_FallDamageDebugData =
new FallDamageDebugData();
326 ctx.
Read(m_FallDamageDebugData);
330 case ERPCs.DIAG_VEHICLES_DUMP_CRASH_DATA_CONTENTS:
332 Param1<array<ref CrashDebugData>> par =
new Param1<array<ref CrashDebugData>>(null);
335 CrashDebugData.DumpDataArray(par.param1);
342 override void OnUpdate(
float delta_time)
344 super.OnUpdate(delta_time);
354 UpdateMiscVehicleGetOutBox();
355 UpdateEnvironmentDebug();
357 UpdateMaterialDebug();
358 UpdateWeaponLiftDiag(delta_time);
359 UpdateBaseBuildingFullDebug();
360 UpdateCharacterStepSurfaceDebug();
364 void CheckTimeAccel()
366 if (!FeatureTimeAccel.m_CurrentTimeAccel)
373 TimeAccelParam param = GetTimeAccelMenuState();
375 if (!FeatureTimeAccel.AreTimeAccelParamsSame(param, FeatureTimeAccel.m_CurrentTimeAccel))
377 int timeAccelBig = param.param2;
378 float timeAccelSmall = param.param2 - timeAccelBig;
379 FeatureTimeAccel.CopyTimeAccelClipboard(param.param1, timeAccelBig, timeAccelSmall, param.param3 );
380 FeatureTimeAccel.SendTimeAccel(
g_Game.GetPlayer(), param);
381 FeatureTimeAccel.m_CurrentTimeAccel = param;
387 static void CBInventoryHandsAckMove(
bool enable,
int id)
389 PluginInventoryDebug pluginInventoryDebug = PluginInventoryDebug.Cast(
GetPlugin(PluginInventoryDebug));
390 DiagToggleRPCServer(enable, pluginInventoryDebug.m_IsHandAckEnable,
ERPCs.DIAG_INVENTORY_ACK_HANDS);
393 static void CBEnableDesyncRepair(
bool enable,
int id)
395 PluginInventoryDebug pluginInventoryDebug = PluginInventoryDebug.Cast(
GetPlugin(PluginInventoryDebug));
396 DiagToggleRPCServer(enable, pluginInventoryDebug.m_IsDesyncRepairEnable,
ERPCs.DIAG_INVENTORY_REPAIR_DESYNC);
399 static void CBClientDesync(
bool enable,
int id)
401 PluginInventoryDebug pluginInventoryDebug = PluginInventoryDebug.Cast(
GetPlugin(PluginInventoryDebug));
402 pluginInventoryDebug.SetLocalOnlyMoveEnable(enable);
405 static void CBOldProcessInputData(
bool enable,
int id)
407 PluginInventoryDebug pluginInventoryDebug = PluginInventoryDebug.Cast(
GetPlugin(PluginInventoryDebug));
408 pluginInventoryDebug.SetOldProcessInputDataEnable(enable);
411 static void CBCraftingGenerate(
bool enabled,
int id)
413 PluginRecipesManager pluginRecipesManager = PluginRecipesManager.Cast(
GetPlugin(PluginRecipesManager));
414 DiagButtonAction(enabled,
id,
ScriptCaller.Create(pluginRecipesManager.CallbackGenerateCache));
418 static void CBCraftingInstant(
bool enabled)
420 PluginRecipesManager pluginRecipesManager = PluginRecipesManager.Cast(
GetPlugin(PluginRecipesManager));
421 DiagToggleRPC(enabled, pluginRecipesManager.IsEnableDebugCrafting(),
ERPCs.DIAG_CRAFTING_INSTANT);
425 static void CBCraftingDump(
bool enabled,
int id)
427 PluginRecipesManager pluginRecipesManager = PluginRecipesManager.Cast(
GetPlugin(PluginRecipesManager));
428 DiagButtonAction(enabled,
id,
ScriptCaller.Create(pluginRecipesManager.GenerateHumanReadableRecipeList));
432 static void CBCheatsModifiers(
bool enabled)
435 DiagToggleRPCServer(enabled, pluginDiag.m_ModifiersEnabled,
ERPCs.DIAG_CHEATS_MODIFIERS);
439 static void CBCheatsKillPlayer(
bool enabled,
int id)
441 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_CHEATS_KILL_PLAYER,
true);
445 static void CBCheatsInvincibility(
int value)
448 DiagToggleRPCServer(value, pluginDiag.m_IsInvincible,
ERPCs.DIAG_CHEATS_INVINCIBILITY);
452 static void CBCheatsStaminaDisable(
bool enabled)
456 player.SetStaminaDisabled(enabled);
459 DiagToggleRPCServer(enabled, pluginDiag.m_StaminaDisabled,
ERPCs.DIAG_CHEATS_DISABLE_STAMINA);
463 static void CBCheatsResetPlayer(
bool enabled,
int id)
467 player.ResetPlayer(
false);
468 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_CHEATS_RESET_PLAYER,
true);
472 static void CBCheatsResetPlayerMax(
bool enabled,
int id)
476 player.ResetPlayer(
true);
477 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_CHEATS_RESET_PLAYER_MAX,
true);
481 static void CBCheatsInventoryAccess(
bool enabled)
483 DiagToggleRPCServer(enabled,
PlayerBase.DEBUG_INVENTORY_ACCESS,
ERPCs.DIAG_CHEATS_INVENTORY_ACCESS);
487 static void CBCheatsFixItems(
bool enabled,
int id)
489 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_CHEATS_ITEMS_FIX,
true);
492 static void CBCreateHit(
bool enabled,
int id)
494 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_CHEATS_CREATE_HIT,
true);
497 static void CBCreateHitLight(
bool enabled,
int id)
499 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_CHEATS_CREATE_HIT_LIGHT,
true);
503 static void CBPlayerAgentsInjectActions(
bool enabled)
509 static void CBSoftSkillsShowDebug(
bool enabled)
516 static void CBSoftSkillsToggleState(
bool enabled)
523 static void CBSoftSkillsToggleModel(
bool enabled)
526 DiagToggleRPC(enabled, ssMngr.
IsLinear(),
ERPCs.DIAG_SOFT_SKILLS_TOGGLE_MODEL);
530 static void CBSoftSkillsSpecialtyValue(
float value)
537 static void CBLifespanBloodyHands(
bool enabled)
542 bool hasBloodyHands = player.HasBloodyHands();
543 DiagToggleRPCServer(enabled, hasBloodyHands,
ERPCs.DIAG_LIFESPAN_BLOODY_HANDS);
548 static void CBLifespanPlaytimeUpdate(
float value)
551 DiagToggleRPCServer(value * 60, pluginDiag.m_Playtime,
ERPCs.DIAG_LIFESPAN_PLAYTIME_UPDATE);
555 static void CBMiscPersonalLight(
bool enabled)
557 PlayerBaseClient.m_PersonalLightDisabledByDebug = enabled;
558 PlayerBaseClient.UpdatePersonalLight();
562 static void CBMiscItemDebugActions(
bool enabled)
568 static void CBMiscLogPlayerStats(
bool enabled)
571 DiagToggleRPC(enabled, pluginDiag.m_LogPlayerStats,
ERPCs.DIAG_MISC_LOG_PLAYER_STATS);
575 static void CBMiscForceHintIndex(
int index)
581 static void CBMiscPermanentCrossHair(
bool enabled)
583 PluginPermanentCrossHair crosshair = PluginPermanentCrossHair.Cast(
GetPlugin(PluginPermanentCrossHair));
584 crosshair.SwitchPermanentCrossHair(enabled);
588 void UpdateMiscVehicleGetOutBox()
592 if (m_VehicleFreeAreaBox)
594 m_VehicleFreeAreaBox.Destroy();
595 m_VehicleFreeAreaBox = null;
604 else if (m_VehicleFreeAreaBox)
606 m_VehicleFreeAreaBox.Destroy();
607 m_VehicleFreeAreaBox = null;
612 static void CBMiscToggleHud(
bool enabled)
615 mission.GetHud().Show(!enabled);
618 mission.HideCrosshairVisibility();
622 mission.RefreshCrosshairVisibility();
627 static void CBMiscEnvironmentDebug(
bool enabled)
629 SendDiagRPC(enabled,
ERPCs.DIAG_MISC_ENVIRONMENT_DEBUG);
632 void UpdateEnvironmentDebug()
635 Environment.DisplayEnvDebugPlayerInfo(
true, m_EnvDebugData);
636 else if (m_EnvDebugData)
637 m_EnvDebugData = null;
641 void UpdateMaterialDebug()
650 void UpdateWeaponLiftDiag(
float delta_time)
656 GetWeaponLiftDiag().DrawDiag(weaponLiftDebug, delta_time);
662 void UpdateBaseBuildingFullDebug()
664 #ifdef DIAG_DEVELOPER
666 ConstructionDebug.Update();
671 void UpdateCharacterStepSurfaceDebug()
673 #ifdef DIAG_DEVELOPER
675 CharacterStepsDebug.Update();
681 static WeaponLiftDiag GetWeaponLiftDiag()
684 return pluginDiag.m_WeaponLiftDiag;
691 string materialPath =
"Graphics/Materials/postprocess/ghost";
701 float channelWeights[] = { 0, 0, 0, 0 };
702 float noiseOffset[] = { 0, 0 };
703 float noiseScale[] = { 1, 1 };
704 float noiseLo[] = { 0, 0, 0, 0 };
705 float noiseHi[] = { 1, 1, 1, 1 };
706 float ghostOffset[] = { 0, 0 };
707 float ghostScale[] = { 1, 1 };
708 float colormod[] = { 1, 1, 1, 0.5 };
709 int spacer_height = 10;
711 float rw, gw, bw, aw;
722 float nsx = 1, nsy = 1;
732 float rl = 0, rh = 1;
733 float gl = 0, gh = 1;
734 float bl = 0, bh = 1;
735 float al = 0, ah = 1;
756 float gox = 50, goy = 25;
757 float gsx = 0.85, gsy = 0.85;
767 float cmr = 1, cmg = 1, cmb = 1, cma = 1;
777 channelWeights = { rw, gw, bw, aw };
778 noiseOffset = { nox, noy };
779 noiseScale = { nsx, nsy };
780 noiseLo = { rl, gl, bl, al };
781 noiseHi = { rh, gh, bh, ah };
782 ghostOffset = { gox, goy };
783 ghostScale = { gsx, gsy };
784 colormod = { cmr, cmg, cmb, cma };
804 #ifdef ENABLE_LOGGING
805 static void CBMiscEnvironmentLoggingDryWet(
bool enabled)
807 SendDiagRPC(enabled,
ERPCs.DIAG_MISC_ENVIRONMENT_LOGGING_DRYWET);
810 static void CBMiscEnvironmentLoggingItemHeat(
bool enabled)
812 SendDiagRPC(enabled,
ERPCs.DIAG_MISC_ENVIRONMENT_LOGGING_ITEMHEAT);
816 static void CBMiscFallDamageDebug(
bool enabled)
818 SendDiagRPC(enabled,
ERPCs.DIAG_MISC_FALLDAMAGE_DEBUG);
821 void UpdateFallDamageDebug()
825 else if (m_FallDamageDebugData)
826 m_FallDamageDebugData = null;
830 static void CBMiscDisplayPlayerInfo(
int value)
832 PluginRemotePlayerDebugClient prpdc = PluginRemotePlayerDebugClient.Cast(
GetPlugin(PluginRemotePlayerDebugClient));
837 static void CBMiscUniversalTemperatureSources(
bool enabled)
840 client.RequestUniversalTemperatureSources(
PlayerBase.Cast(
g_Game.GetPlayer()), enabled);
844 static void CBMiscBulletImpact(
bool enabled,
int id)
853 static void CBMiscGoUnconscious(
bool enabled,
int id)
855 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_MISC_GO_UNCONSCIOUS,
true);
859 static void CBMiscGoUnconsciousDelayed(
bool enabled,
int id)
861 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_MISC_GO_UNCONSCIOUS_DELAYED,
true);
865 static void CBMiscQuickRestrain(
bool enabled)
868 DiagToggleRPC(enabled, player.IsQuickRestrain(),
ERPCs.DIAG_MISC_QUICK_RESTRAIN);
872 static void CBMiscHairHide(
bool enabled,
int id)
875 DiagButtonRPCIntInt(enabled,
id, value, enabled,
ERPCs.DIAG_MISC_HAIR_LEVEL_HIDE,
true);
879 static void CBMiscHairHideAll(
bool enabled)
888 static void CBMiscCamShake(
bool enabled,
int id)
891 DiagButtonAction(enabled,
id,
ScriptCaller.Create(cam.SpawnDiagCameraShake));
895 static void CBMiscQuickFishing(
bool enabled)
898 DiagToggleRPC(enabled, player.IsQuickFishing(),
ERPCs.DIAG_MISC_QUICK_FISHING);
902 static void CBMiscShockImpact(
bool enabled,
int id)
904 DiagButtonAction(enabled,
id,
ScriptCaller.Create(ShockImpact));
907 static void ShockImpact()
909 static float intensity;
914 player.SpawnShockEffect(intensity);
918 static void CBMiscPlugArrows(
bool enabled)
920 g_Game.EnableEMPlugs(enabled);
924 static void CBMiscTargetableByAI(
bool enabled,
int id)
928 DiagToggleRPC(enabled, player.m_CanBeTargetedDebug,
ERPCs.DIAG_MISC_TARGETABLE_BY_AI);
932 static void CBMiscHitIndication()
962 static void CBMiscHitIndicationSpawnHit(
bool enabled,
int id)
964 DiagButtonAction(enabled,
id,
ScriptCaller.Create(SpawnHitDirEffect));
967 static void SpawnHitDirEffect()
974 static void CBDebugMonitor(
bool enabled,
int id)
976 SendDiagRPC(enabled,
ERPCs.DIAG_MISC_DEBUG_MONITOR,
true);
979 g_Game.GetMission().CreateDebugMonitor();
981 g_Game.GetMission().HideDebugMonitor();
984 static void CBPRADrawAll(
bool enabled,
int id)
990 static void CBPRADetect(
bool enabled,
int id)
998 Print(
"player: " + player +
" | at position: " + player.GetPosition() +
" | intersects area: " + pra.
areaName);
1000 Print(
"player: " + player +
" | at position: " + player.GetPosition() +
" | is NOT in any PlayerRestrictedArea");
1008 static void CBDEGroundEnable(
bool enabled)
1014 static void CBDECloudEnable(
bool enabled)
1021 static void CBDEGroundThreshold(
float value)
1027 static void CBDEGroundRadius(
float value)
1033 static void CBDEGroundIntensity(
float value)
1039 static void CBDEGroundFromSurfaceEnable(
bool value)
1045 static void CBDEWindWeight(
float weight)
1051 static void CBDEGroundLifetimeRange(
float value)
1059 static void CBDEGroundSizeRange(
float value)
1068 static void CBDECloudThreshold(
float value)
1074 static void CBDECloudDistance(
float value)
1080 static void CBDECloudCooldown(
float value)
1087 static void CBDECloudDuration(
float value)
1094 static void CBDECloudFromSurfaceEnable(
bool value)
1101 static void CBMiscFreezeEntity(
bool enabled,
int id)
1103 DiagButtonAction(enabled,
id,
ScriptCaller.Create(FreezeEntity));
1106 static void FreezeEntity()
1122 FreeDebugCamera camera = FreeDebugCamera.GetInstance();
1123 entity =
EntityAI.Cast(camera.GetCrosshairObject());
1127 entity.DisableSimulation(!entity.GetIsSimulationDisabled());
1131 static void CBMiscFreezePlayer(
bool enabled,
int id)
1133 DiagButtonAction(enabled,
id,
ScriptCaller.Create(FreezePlayer));
1136 static void FreezePlayer()
1140 player.DisableSimulation(!player.GetIsSimulationDisabled());
1144 static void CBVehicleDebugOutput(
int value)
1150 bitValue = EVehicleDebugOutputType.DAMAGE_APPLIED;
1154 bitValue = EVehicleDebugOutputType.DAMAGE_APPLIED | EVehicleDebugOutputType.DAMAGE_CONSIDERED;
1156 else if (value == 3)
1158 bitValue = EVehicleDebugOutputType.CONTACT;
1160 else if (value == 4)
1162 bitValue = EVehicleDebugOutputType.DAMAGE_APPLIED | EVehicleDebugOutputType.CONTACT;
1164 SendDiagRPC(bitValue,
ERPCs.DIAG_VEHICLE_DEBUG_OUTPUT,
true);
1168 static void CBDumpCrashData(
bool value)
1172 SendDiagRPC(
true,
ERPCs.DIAG_VEHICLES_DUMP_CRASH_DATA_REQUEST,
true);
1180 static void SimulateMode(
bool enabled,
int id,
int rpc)
1188 DiagButtonRPC(enabled,
id, rpc,
true);
1193 DiagButtonRPCSelf(enabled,
id, rpc);
1198 DiagButtonRPC(enabled,
id, rpc,
true);
1199 DiagButtonRPCSelf(enabled,
id, rpc);
1206 static void CBSimulateInfiniteLoop(
bool enabled,
int id)
1208 SimulateMode(enabled,
id,
ERPCs.DIAG_SIMULATE_INFINITE_LOOP);
1212 static void CBSimulateNullPointer(
bool enabled,
int id)
1214 SimulateMode(enabled,
id,
ERPCs.DIAG_SIMULATE_NULL_POINTER);
1218 static void CBSimulateDivisionByZero(
bool enabled,
int id)
1220 SimulateMode(enabled,
id,
ERPCs.DIAG_SIMULATE_DIVISION_BY_ZERO);
1224 static void CBSimulateErrorFunction(
bool enabled,
int id)
1226 SimulateMode(enabled,
id,
ERPCs.DIAG_SIMULATE_ERROR_FUNCTION);
1230 static void CBWeaponParticles(
bool enabled)
1236 static void CBWeaponDebug(
bool enabled)
1239 DiagToggleAction(enabled,
ScriptCaller.Create(player.ShowWeaponDebug), player.IsWeaponDebugEnabled());
1243 static void CBWeaponAimNoise(
bool enabled)
1254 static void CBWeaponRecoil(
bool enabled)
1265 static void CBWeaponUnlimitedAmmo(
bool enabled)
1271 static void CBWeaponBurstVersion(
int value)
1275 DiagToggleRPC(value, wpnMngr.GetBurstOption(),
ERPCs.DIAG_WEAPON_BURST_VERSION);
1279 static void CBBleedingSources(
bool enabled)
1282 player.GetBleedingManagerRemote().SetDiag(enabled);
1286 static void CBBleedingDisableBloodLoss(
bool enabled)
1288 SendDiagRPC(enabled,
ERPCs.DIAG_BLEEDING_DISABLE_BLOOD_LOSS,
true);
1292 static void CBBleedingActivateSource(
int value)
1294 SendDiagRPC(value,
ERPCs.DIAG_BLEEDING_ACTIVATE_SOURCE,
true);
1298 static void CBBleedingActivateAllSources(
bool enabled,
int id)
1300 DiagButtonRPC(enabled,
id,
ERPCs.DIAG_BLEEDING_ACTIVATE_ALL_SOURCES,
true);
1304 static void CBBleedingActivateSourceLevel(
int value)
1316 bone =
"lefttoebase";
1330 for (
int i = 0; i < count; ++i)
1340 CBBleedingActivateSource(idx);
1344 static void CBBleedingReload(
bool enabled,
int id)
1347 BleedingSourcesManagerRemote bsMngrRem = player.GetBleedingManagerRemote();
1348 DiagButtonAction(enabled,
id,
ScriptCaller.Create(bsMngrRem.Reload));
1352 static void CBBBleedingIndicators()
1359 if (player && player.GetBleedingManagerRemote())
1361 player.GetBleedingManagerRemote().Reload();
1393 static void CBLogsActions(
bool enabled)
1399 static void CBLogsWeapons(
bool enabled)
1405 static void CBLogsSync(
bool enabled)
1411 static void CBLogsBaseBuilding(
bool enabled)
1417 static void CBLogsSymptoms(
bool enabled)
1423 static void CBLogsInventoryMove(
bool enabled)
1429 static void CBLogsInventoryReservation(
bool enabled)
1435 static void CBLogsInventoryHFSM(
bool enabled)
1441 static void CBLogsQuickbar(
bool enabled)
1447 static void CBLogsBleedingChances(
bool enabled)
1453 static void CBTriggerDebug(
bool enabled)
1455 EnableDebugSystemClient(ESubscriberSystems.TRIGGERS, enabled);
1459 static void CBBaseBuildingWood(
bool enabled)
1461 SendDiagRPC(enabled,
ERPCs.DIAG_BASEBUILDING_WOOD,
true);
1465 static void CBBaseBuildingGate(
bool enabled)
1467 SendDiagRPC(enabled,
ERPCs.DIAG_BASEBUILDING_GATE,
true);
1471 static void CBBaseBuildingFast(
int value)
1474 player.GetConstructionActionData().SetFastConstructionMode(value);
1475 SendDiagRPC(value,
ERPCs.DIAG_BASEBUILDING_FASTBUILD);
1479 static void CBBaseBuildingDebug(
bool enabled)
1482 ConstructionDebug.ResetValues();
1486 static void CBBaseBuildingCollisionDebug(
bool enabled)
1493 static void CBFinishersFinisherForced(
int value)
1496 DiagToggleRPC(value - 1, player.GetMeleeCombat().DebugGetForcedFinisherType(),
ERPCs.DIAG_FINISHERS_FORCE_FINISHER);
1500 static void CBCameraToolsEnableRemoteCamera(
bool enabled)
1507 if (!enabled && player.m_CameraToolsMenuClient)
1509 player.m_CameraToolsMenuClient.DelayedDestroy();
1513 g_Game.RPCSingleParam( null,
ERPCs.DIAG_CAMERATOOLS_CAM_SUBSCRIBE, param,
true );
1518 static void CBSetGeyserDiagData()
1526 Param params =
new Param3<bool, float, float>(enabled, timeInterval, timeDuration);
1527 g_Game.RPCSingleParam(null,
ERPCs.DIAG_GEYSER_VALUES, params,
true);
1530 static void CBSetRadioGameplayLogging(
bool enabled)
1532 SendDiagRPC(enabled,
ERPCs.DIAG_RADIO_GAMEPLAY_LOGGING);
1537 static void CBRoboclientActive(
bool enabled)
1541 if (!player || !player.m_Bot)
1546 player.m_Bot.Start();
1549 player.m_Bot.Stop();
1553 static void CBRoboclientRestart(
bool enabled)
1564 if (!player || !player.m_Bot)
1567 player.m_Bot.Restart();
1571 static void CBRoboclientChangeStateMachine(
int index)
1575 if (!player || !player.m_Bot)
1578 player.m_Bot.ChangeStateMachine(index);
1596 vector end = start + (
g_Game.GetCurrentCameraDirection() * 5.0);
1598 vector hitPos, hitNormal;
1618 mask = (
ItemBase.GetDebugActionsMask() | type);
1622 mask = (
ItemBase.GetDebugActionsMask() & (~type));
1631 static void EnableDebugSystemClient(ESubscriberSystems system,
bool enable)
1636 mask = (m_SystemsMask | system);
1640 mask = (m_SystemsMask & (~system));
1643 if (mask != m_SystemsMask)
1647 m_SystemsMask = mask;
1655 static void DiagButtonActionParams(
bool enabled,
int id,
ScriptCaller action,
Param params)
1659 action.Invoke(params);
1665 static void DiagButtonAction(
bool enabled,
int id,
ScriptCaller action)
1667 DiagButtonActionParams(enabled,
id, action, null);
1671 static void DiagButtonRPC(
bool enabled,
int id,
int rpc,
bool serverOnly =
false)
1674 SendDiagRPCBasicParam params =
new SendDiagRPCBasicParam(rpc, serverOnly);
1676 DiagButtonActionParams(enabled,
id, action, params);
1680 static void DiagButtonRPCSelf(
bool enabled,
int id,
int rpc)
1683 SendDiagRPCSelfBasicParam params =
new SendDiagRPCSelfBasicParam(rpc);
1685 DiagButtonActionParams(enabled,
id, action, params);
1689 static void DiagButtonRPCIntInt(
bool enabled,
int id,
int value,
int value2,
int rpc,
bool serverOnly =
false)
1697 DiagButtonActionParams(enabled,
id, action, params);
1701 static void DiagToggleRPC(
bool value,
int current,
int rpc)
1703 if (value != current)
1705 SendDiagRPC(value, rpc,
false);
1710 static void DiagToggleRPC(
int value,
int current,
int rpc)
1712 if (value != current)
1714 SendDiagRPC(value, rpc,
false);
1719 static void DiagToggleRPC(
float value,
int current,
int rpc)
1721 if (value != current)
1723 SendDiagRPC(value, rpc,
false);
1728 static void DiagToggleRPCServer(
bool value, out
bool current,
int rpc)
1730 if (value != current)
1733 SendDiagRPC(value, rpc,
true);
1738 static void DiagToggleRPCServer(
int value, out
int current,
int rpc)
1740 if (value != current)
1743 SendDiagRPC(value, rpc,
true);
1748 static void DiagToggleRPCServer(
float value, out
float current,
int rpc)
1750 if (value != current)
1753 SendDiagRPC(value, rpc,
true);
1758 static void DiagToggleRPCAction(
int value,
ScriptCaller action,
int current,
int rpc)
1760 if (value != current)
1762 SendDiagRPC(value, rpc);
1763 action.Invoke(value);
1768 static void DiagToggleAction(
int value,
ScriptCaller action,
int current)
1770 if (value != current)
1772 action.Invoke(value);
1777 static void SendDiagRPCSelf(
Param value,
int rpc)
1782 g_Game.RPCSelfSingleParam(player, rpc, value);
1787 static void SendDiagRPCSelfBasic(SendDiagRPCSelfBasicParam param)
1789 SendDiagRPCSelf(null, param.param1);
1793 static void SendDiagRPCSelfParam(SendDiagRPCSelfParamParam param)
1795 SendDiagRPCSelf(param.param2, param.param1);
1799 static void SendDiagRPC(
Param value,
int rpc,
bool serverOnly =
false)
1805 if (
g_Game.IsMultiplayer() && playerIdentity)
1807 g_Game.RPCSingleParam(player, rpc, value,
true, playerIdentity);
1810 if (!
g_Game.IsMultiplayer() || !serverOnly)
1812 g_Game.RPCSelfSingleParam(player, rpc, value);
1818 static void SendDiagRPCBasic(SendDiagRPCBasicParam param)
1820 SendDiagRPC(null, param.param1, param.param2);
1824 static void SendDiagRPCParam(SendDiagRPCParamParam param)
1826 SendDiagRPC(param.param3, param.param1, param.param2);
1830 static void SendDiagRPC(
int rpc,
bool serverOnly =
false)
1832 SendDiagRPC(null, rpc, serverOnly);
1836 static void SendDiagRPC(
bool value,
int rpc,
bool serverOnly =
false)
1843 static void SendDiagRPC(
int value,
int rpc,
bool serverOnly =
false)
1850 static void SendDiagRPC(
float value,
int rpc,
bool serverOnly =
false)
1857 static void CBUpdateSBDummyServers()
1859 m_SBDiagScriptInvoker.Invoke();
1864 return m_SBDiagScriptInvoker;