14enum ESubscriberSystems
16 TRIGGERS = 0x00000001,
22typedef Param1<int> SendDiagRPCSelfBasicParam;
26typedef Param3<int,bool,Param> SendDiagRPCParamParam;
38 int m_TotalHairLevelsAdjusted;
46 g_Game.ConfigGetTextArray(
"cfgVehicles Head_Default simpleHiddenSelections", m_HairSelectionArray);
47 m_TotalHairLevelsAdjusted = m_HairSelectionArray.Count() - 1;
48 for (
int i = 0; i < m_HairSelectionArray.Count(); ++i)
50 m_HairHidingStateMap.Insert(i, 1);
65 protected void RegisterDiags()
67 RegisterDeveloperDiags();
68 RegisterModdedDiagsIDs();
69 RegisterModdedDiags();
77 private void RegisterDeveloperDiags()
419 #ifdef TRIGGER_DEBUG_BASIC
502 protected int GetModdedDiagID()
504 return ++m_ModdedDiagID;
508 protected int GetModdedRootMenu()
514 protected void RegisterModdedDiagsIDs();
517 protected void RegisterModdedDiags()
533 case ERPCs.DIAG_ITEM_DEBUG_ACTIONS:
544 case ERPCs.DIAG_PLAYER_SYMPTOMS_DEBUG_ON:
545 case ERPCs.DIAG_PLAYER_SYMPTOMS_DEBUG_OFF:
546 case ERPCs.DIAG_PLAYER_SYMPTOMS_DEBUG:
548 if (player.GetSymptomManager())
550 player.GetSymptomManager().OnRPCDebug(rpc_type, ctx);
560 case ERPCs.DIAG_CRAFTING_INSTANT:
564 PluginRecipesManager pluginRecipesManager = PluginRecipesManager.Cast(
GetPlugin(PluginRecipesManager));
574 case ERPCs.DIAG_CHEATS_MODIFIERS:
582 case ERPCs.DIAG_CHEATS_KILL_PLAYER:
584 player.SetHealth(
"",
"", -1);
589 case ERPCs.DIAG_CHEATS_INVINCIBILITY:
599 parent.SetAllowDamage(
true);
600 parent.SetCanBeDestroyed(
true);
603 player.SetAllowDamage(
true);
604 player.SetCanBeDestroyed(
true);
611 parent.SetAllowDamage(
true);
612 parent.SetCanBeDestroyed(
false);
615 player.SetAllowDamage(
true);
616 player.SetCanBeDestroyed(
false);
623 parent.SetAllowDamage(
false);
626 player.SetAllowDamage(
false);
635 case ERPCs.DIAG_CHEATS_DISABLE_STAMINA:
643 case ERPCs.DIAG_CHEATS_RESET_PLAYER:
645 player.ResetPlayer(
false);
650 case ERPCs.DIAG_CHEATS_RESET_PLAYER_MAX:
652 player.ResetPlayer(
true);
657 case ERPCs.DIAG_CHEATS_INVENTORY_ACCESS:
665 case ERPCs.DIAG_CHEATS_ITEMS_FIX:
667 player.FixAllInventoryItems();
674 case ERPCs.DIAG_SOFT_SKILLS_SHOW_DEBUG:
680 player.GetSoftSkillsManager().StartSynchTimer();
684 player.GetSoftSkillsManager().StopSynchTimer();
685 player.GetSoftSkillsManager().ResetDebugWindow();
692 case ERPCs.DIAG_SOFT_SKILLS_TOGGLE_STATE:
700 case ERPCs.DIAG_SOFT_SKILLS_TOGGLE_MODEL:
708 case ERPCs.DIAG_SOFT_SKILLS_SPECIALTY_VALUE:
723 case ERPCs.DIAG_LIFESPAN_BLOODY_HANDS:
734 case ERPCs.DIAG_LIFESPAN_PLAYTIME_UPDATE:
739 player.StatUpdate(
"playtime", player.StatGet(
"playtime") * -1);
742 player.SetLastShavedSeconds( 0 );
746 pluginLifespann.UpdateLifespan( player,
true );
755 case ERPCs.DIAG_MISC_LOG_PLAYER_STATS:
767 case ERPCs.DIAG_MISC_ENVIRONMENT_DEBUG:
771 if (player.m_Environment)
777 case ERPCs.DIAG_MISC_ENVIRONMENT_LOGGING_DRYWET:
781 if (player.m_Environment)
790 case ERPCs.DIAG_MISC_FALLDAMAGE_DEBUG:
794 if (player.GetFallDamage())
801 case ERPCs.DIAG_MISC_GO_UNCONSCIOUS:
803 GoUnconscious(player);
808 case ERPCs.DIAG_MISC_GO_UNCONSCIOUS_DELAYED:
815 case ERPCs.DIAG_MISC_QUICK_RESTRAIN:
825 case ERPCs.DIAG_MISC_HAIR_LEVEL_HIDE:
830 player.UpdateHairSelectionVisibility(
true);
838 case ERPCs.DIAG_MISC_QUICK_FISHING:
846 case ERPCs.DIAG_MISC_TARGETABLE_BY_AI:
856 case ERPCs.DIAG_SIMULATE_INFINITE_LOOP:
860 Print(
"simulating infinite loop");
866 case ERPCs.DIAG_SIMULATE_NULL_POINTER:
869 NULL_player.SetHealth(
"",
"", -1);
874 case ERPCs.DIAG_SIMULATE_DIVISION_BY_ZERO:
877 int division_by_zero = 1/zero;
882 case ERPCs.DIAG_SIMULATE_ERROR_FUNCTION:
892 case ERPCs.DIAG_WEAPON_PARTICLES:
900 case ERPCs.DIAG_WEAPON_RECOIL:
908 case ERPCs.DIAG_WEAPON_BURST_VERSION:
919 case ERPCs.DIAG_BLEEDING_DISABLE_BLOOD_LOSS:
927 case ERPCs.DIAG_BLEEDING_ACTIVATE_SOURCE:
935 case ERPCs.DIAG_BLEEDING_ACTIVATE_ALL_SOURCES:
937 player.GetBleedingManagerServer().ActivateAllBS();
945 case ERPCs.DIAG_LOGS_ACTIONS:
953 case ERPCs.DIAG_LOGS_WEAPONS:
961 case ERPCs.DIAG_LOGS_SYMPTOMS:
969 case ERPCs.DIAG_LOGS_INVENTORY_MOVE:
977 case ERPCs.DIAG_LOGS_INVENTORY_RESERVATION:
985 case ERPCs.DIAG_LOGS_INVENTORY_HFSM:
996 case ERPCs.DIAG_BASEBUILDING_WOOD:
1004 case ERPCs.DIAG_BASEBUILDING_GATE:
1015 case ERPCs.DIAG_FINISHERS_FORCE_FINISHER:
1026 case ERPCs.DIAG_CAMERATOOLS_CAM_DATA:
1028 if (!player.m_CameraToolsMenuClient)
1030 player.m_CameraToolsMenuClient =
new CameraToolsMenuClient();
1033 player.m_CameraToolsMenuClient.OnRPC(ctx);
1041 case ERPCs.DIAG_TIMEACCEL:
1043 TimeAccelParam tap =
new TimeAccelParam(
false, 0, 0);
1047 FeatureTimeAccel.m_CurrentTimeAccel = tap;
1051 foreach (Man p : players)
1075 case ERPCs.DIAG_TIMEACCEL_CLIENT_SYNC:
1077 TimeAccelParam tap2 =
new TimeAccelParam(
false, 0, 0);
1081 int bigFactor = tap2.param2;
1082 float smallFactor = tap2.param2 - bigFactor;
1083 SetTimeAccelMenuState(tap2.param1, bigFactor, smallFactor, tap2.param3);
1084 FeatureTimeAccel.m_CurrentTimeAccel = tap2;
1092 case ERPCs.DIAG_VEHICLE_DEBUG_OUTPUT:
1099 case ERPCs.DIAG_VEHICLES_DUMP_CRASH_DATA_REQUEST:
1102 CrashDebugData.SendData(player);
1111 if (player.IsUnconscious())
1113 player.SetHealth(
"",
"Shock", 100);
1117 player.m_UnconsciousEndTime = -60;
1118 player.SetHealth(
"",
"Shock", 0);
1123 void InitTimeAccel()
1125 FeatureTimeAccel.m_CurrentTimeAccel = GetTimeAccelMenuState();
1129 if (
GetGame().CommandlineGetParam(
"timeAccel", value))
1134 value.
Split(
",", params);
1136 bool enable = params[0].ToInt();
1137 int timeAccelBig = params[1].ToInt();
1138 float timeAccelSmall = params[2].ToFloat();
1139 int bitMask = params[3].ToInt();
1141 SetTimeAccelMenuState(enable, timeAccelBig, timeAccelSmall, bitMask);
1145 TimeAccelParam GetTimeAccelMenuState()
1150 float timeAccel = timeAccelBig + timeAccelSmall;
1151 int bitMask = FeatureTimeAccel.GetTimeAccelBitmask();
1153 TimeAccelParam param =
new TimeAccelParam(enable, timeAccel, bitMask);
1157 void SetTimeAccelMenuState(
bool enable,
int bigFactor,
float smallFactor,
int bitmask)
1166 bool on = (bit & bitmask);
PluginBase GetPlugin(typename plugin_type)
static const int DROP_SCATTER_LOW
static const int DROP_COLOR_RED
static const float DROP_SIZE_END_LOW
static const float SEQUENCE_DROP_DELAY_MIN_LOW
static const float DROP_SIZE_VARIATION_MAX_LOW
static const float DROP_SIZE_VARIATION_MIN_LOW
static const float DROP_DURATION_LOW
static const float DROP_PROGRESS_THRESHOLD
static const float DROP_COLOR_DESATURATIONEND
static const int DROP_COLOR_ALPHA_START
static const float DROP_SIZE_START_LOW
static const int DROP_COLOR_BLUE
static const float SEQUENCE_DURATION_DEFAULT
Used to pre-gen poisson probabilities, I REALLY wouldn't go over 10 here. Values above 12 cause overf...
static const float SEQUENCE_DROP_DELAY_MAX_LOW
static const int DROP_COLOR_ALPHA_END
static const int DROP_COLOR_GREEN
proto native void GetPlayers(out array< Man > players)
override ScriptCallQueue GetCallQueue(int call_category)
void RPCSingleParam(Object target, int rpc_type, Param param, bool guaranteed, PlayerIdentity recipient=null)
see CGame.RPC
static ref Param2< int, int > PARAM2_INT_INT
static ref Param1< bool > PARAM1_BOOL
static ref Param1< float > PARAM1_FLOAT
static ref Param1< int > PARAM1_INT
Super root of all classes in Enforce script.
static void SymptomLogEnable(bool enable)
static void InventoryMoveLogEnable(bool enable)
static void InventoryHFSMLogEnable(bool enable)
static void ActionLogEnable(bool enable)
static void WeaponLogEnable(bool enable)
static void InventoryReservationLogEnable(bool enable)
void OnRPC(PlayerBase player, int rpc_type, ParamsReadContext ctx)
static bool m_GunParticlesState
proto void CallLater(func fn, int delay=0, bool repeat=false, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
adds call into the queue with given parameters and arguments (arguments are held in memory until the ...
Serialization general interface. Serializer API works with:
proto bool Read(void value_in)
void SynchSpecialtyLevel()
void SetSpecialtyLevel(float specialty_level)
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
array< string > TStringArray
void Split(string sample, out array< string > output)
Splits string into array of strings separated by 'sample'.
proto int Replace(string sample, string replace)
Replace all occurrances of 'sample' in 'str' by 'replace'.