DayZ 1.24
Loading...
Searching...
No Matches
PluginBase Class Reference
Inheritance diagram for PluginBase:
[legend]
Collaboration diagram for PluginBase:
[legend]

Protected Member Functions

void PluginAdminLog ()
 
void ~PluginAdminLog ()
 
void LogPrint (string message)
 
string GetPlayerPrefix (PlayerBase player, PlayerIdentity identity)
 
string GetHitMessage (TotalDamageResult damageResult, int component, string zone, string ammo)
 
void PlayerKilled (PlayerBase player, Object source)
 
void PlayerHitBy (TotalDamageResult damageResult, int damageType, PlayerBase player, EntityAI source, int component, string dmgZone, string ammo)
 
void UnconStart (PlayerBase player)
 
void UnconStop (PlayerBase player)
 
void OnPlacementComplete (Man player, ItemBase item)
 
void OnContinouousAction (ActionData action_data)
 
void Suicide (PlayerBase player)
 
void BleedingOut (PlayerBase player)
 
void TotemFlagChange (bool top, notnull PlayerBase player, notnull EntityAI totem)
 
void PlayerList ()
 
void DirectAdminLogPrint (string str)
 
override void OnInit ()
 
void ToggleCameraTools ()
 
void CursorHide ()
 
void CursorShow ()
 
void Save ()
 
void PlayPause ()
 
void AddKeyframe ()
 
void DeleteKeyframe ()
 
void PossesInfected ()
 
void CommandHandler (DayZInfected infected)
 
void Tick ()
 
void InitAttacks ()
 
void TeleportAtCursor ()
 Set Player position at his cursor position in the world.
 
void Teleport (PlayerBase player, vector position)
 Teleport player at position.
 
void ToggleFreeCameraBackPos ()
 Enable / Disable Free camera (Fly mod)
 
void ToggleFreeCamera ()
 Enable / Disable Free camera (Fly mod) - disable of camera will teleport player at current free camera position.
 
bool IsEnabledFreeCamera ()
 
void PluginDeveloper ()
 
override void OnInit ()
 
void OnRPC (PlayerBase player, int rpc_type, ParamsReadContext ctx)
 
void PrintLogClient (string msg_log)
 
void SendServerLogToClient (string msg)
 
void OnRPCSyncSceneObject (ParamsReadContext ctx)
 
void OnRPCPluginDayzCreatureDebug (PlayerBase player, int rpc_type, ParamsReadContext ctx)
 
void HandleSetTime (PlayerBase player, ParamsReadContext ctx)
 
void HandlePresetSpawn (PlayerBase player, string presetName, EntityAI target)
 
void OnRPCServerLogRecieved (ParamsReadContext ctx)
 
void OnRPCClearInventory (PlayerBase player)
 
void OnRPCSpawnEntityOnCursorDir (PlayerBase player, ParamsReadContext ctx)
 
void OnRPCSpawnEntityOnGround (PlayerBase player, ParamsReadContext ctx)
 
void OnRPCSpawnEntityOnGroundPatternGrid (PlayerBase player, ParamsReadContext ctx)
 
void OnRPCSpawnEntity (PlayerBase player, ParamsReadContext ctx)
 
void OnSetFreeCameraEvent (PlayerBase player, FreeDebugCamera camera)
 
void OnSpawnErrorReport (string name)
 
void SetupSpawnedEntity (PlayerBase player, EntityAI entity, float health, float quantity=-1, bool special=false, string presetName="")
 
void SpawnEntityOnGroundPatternGrid (PlayerBase player, string item_name, int count, float health, float quantity, int rows, int columns, float gapRow=1, float gapColumn=1, bool special=false, bool withPhysics=false)
 
void SpawnItemOnCrosshair (notnull PlayerBase player, string itemName, float health, float quantity, float maxDist=100, bool allowFreeflight=false, bool special=false, bool withPhysics=false)
 
EntityAI SpawnEntityOnGroundPos (PlayerBase player, string item_name, float health, float quantity, vector pos, bool special=false, bool withPhysics=false)
 spawns entity on exact position
 
EntityAI SpawnEntityOnCursorDir (PlayerBase player, string item_name, float quantity, float distance, float health=-1, bool special=false, string presetName="", bool withPhysics=false)
 spawns entity in direction of cursor at specified distance
 
EntityAI SpawnEntityInInventory (notnull EntityAI target, string className, float health, float quantity, bool special=false, string presetName="", FindInventoryLocationType locationType=FindInventoryLocationType.ANY)
 tries to spawn item somewhere in inventory
 
EntityAI SpawnEntityInPlayerInventory (PlayerBase player, string item_name, float health, float quantity, bool special=false, string presetName="", FindInventoryLocationType locationType=FindInventoryLocationType.ANY)
 
EntityAI SpawnEntityAsAttachment (PlayerBase player, EntityAI parent, string att_name, float health, float quantity)
 tries to spawn item as attachment
 
EntityAI SpawnFromClipboard ()
 
void ClearInventory (EntityAI entity)
 
void ToggleHelpScreen ()
 
void ToggleScriptConsole ()
 
void ToggleMissionLoader ()
 
void PluginUniversalTemperatureSourceClient ()
 
override void OnInit ()
 
override void OnUpdate (float delta_time)
 
void InitWidgets ()
 
void DrawDebugs ()
 
void ProcessUniversalTemperatureSources ()
 
float CalcTemperatureFromTemperatureSource (notnull UTemperatureSourceDebug utsd)
 
void EnableWidgets (bool enable)
 
void UpdateStatWidgets ()
 
void UpdateStatWidget (int rowIndex, UTemperatureSourceDebug utsd)
 
void RequestUniversalTemperatureSources (PlayerBase player, int enable)
 
void PrintedDebug ()
 
void OnRPC (ParamsReadContext ctx)
 
void PluginUniversalTemperatureSourceServer ()
 
override void OnUpdate (float delta_time)
 
void GatherTemperatureSources (PlayerBase player)
 
void SendDebug ()
 
void OnRequestReceived (PlayerBase player, bool enable)
 
void OnRPC (ParamsReadContext ctx, PlayerBase player)
 
void RegisterKeyBind (int ui_id, int key_code1, int key_code2, string plugin_name, string fnc_name, string info_shortcut, string info_description)
 
void RegisterMouseBind (int ui_id, int mouse_button, int mouse_event, string plugin_name, string fnc_name, string info_shortcut, string info_description)
 
bool IsCurrentUIPageValid (int ui_page_request)
 
bool CheckMask (int source_mask, int target_mask)
 
void OnMouse (int event_id, int button)
 
MouseButtonInfo GetMouseButtonInfo (int button)
 
bool IsKeyPressed (int key)
 
void EditorUpdate ()
 
float GetAgentTransferabilityIn (int agent_id)
 
bool GrowDuringAntibioticsAttack (int agent_id, PlayerBase player)
 
float GetAgentDieOffSpeedEx (int agent_id, PlayerBase player)
 
EStatLevels GetAgentPotencyEx (int agent_id, PlayerBase player)
 
float GetAgentInvasibilityEx (int agent_id, PlayerBase player)
 
float GetAgentAntiboticsResistance (int agent_id)
 
float GetAgentAntiboticsResistanceEx (int agent_id, PlayerBase player)
 
float GetAgentTransferabilityOut (int agent_id)
 
float GetAgentTransferabilityAirOut (int agent_id)
 
float GetAgentInvasibility (int agent_id)
 
float GetAgentDigestibility (int agent_id)
 
float GetDieOffSpeed (int agent_id)
 
EStatLevels GetPotency (int agent_id)
 
float TransmitAgentsEx (EntityAI source, EntityAI target, int pathway, int dose_size=1000, int agents=0)
 
void TransmitAgents (EntityAI source, EntityAI target, int pathway, int dose_size=1000)
 
void InjectAgentsWithoutPlayer (EntityAI target, int agents)
 
void InjectAgentsWithPlayer (EntityAI target, int agents, float protection, int dose_size, int inject_type)
 will add agents to a given target, using chance of transmission and full dose size if chance succeeds
 
void InjectAgentsWithPlayerCount (EntityAI target, int agents, float protection, int dose_size, int inject_type)
 will add agents to a given target, with no probability, but the dose size is modified by m_TransferabilityOut of the agent
 
float InjectAgentWithPlayerDose (EntityAI target, int agent, float protection, float dose_size, int inject_type)
 will add agent to a given target
 
float GetProtectionLevel (int type, int slot, Man player)
 
float CalculateAgentsToTransmit (int agent_id, float protection, int dose_size, int inject_type)
 
bool DetermineChanceToTransmit (int agent_id, float protection, int inject_type)
 

Static Protected Member Functions

static int GetPlayerListTimer ()
 
static PluginCameraTools GetInstance ()
 
static PluginDeveloper GetInstance ()
 
static int GetAgentMaxCount (int agent_id)
 
static void BuildAgentArray (int agents, array< int > agents_out)
 
static float GetProtectionLevelEx (int type, int slot, Man player, bool consider_filter=true, int system=0)
 

Protected Attributes

int m_HitFilter
 
int m_PlacementFilter
 
int m_ActionsFilter
 
int m_PlayerListFilter
 
ref Timer m_Timer
 
autoptr array< Man > m_PlayerArray
 
const int TIMER_PLAYERLIST = GetPlayerListTimer()
 
bool m_IsWinHolding
 
int m_FeaturesMask
 
UIScriptedMenu m_ScriptConsole
 
float m_UTSAverageTemperature
 
ref array< ref UTemperatureSourceDebugm_UTemperatureSourceDebugs
 
ref Widget m_RootWidget [MAX_SIMULTANEOUS_UTS]
 
TextListboxWidget m_StatListWidgets [MAX_SIMULTANEOUS_UTS]
 
TextWidget m_HeaderWidget [MAX_SIMULTANEOUS_UTS]
 
const int CLICK_TIME = 200
 
const int DOUBLE_CLICK_TIME = 300
 
const int HOLD_CLICK_TIME_MIN = 300
 
ref array< ref KeyBindingm_KeyBindings
 
ref array< ref MouseButtonInfom_MouseButtons
 
ref array< ref MouseBindingm_MouseBindings
 
PluginConfigScene m_ModuleConfigScene
 
PluginConfigDebugProfile m_ModuleConfigDebugProfile
 
float m_TimeLastClickRelease
 
float m_TimeLastClickPress
 
int m_PressedMouseID
 
bool m_IsDragging
 
ref array< Shapem_ShapesSceneObjects
 
ref map< int, KeyBindingm_KeyBindings
 
ref SceneData m_SceneData
 
SceneObject m_SelectedObject
 
string m_ClassBrowserSelected
 
bool m_IsOpen
 

Static Protected Attributes

static PluginCameraTools m_Instance
 
static bool m_IsOpen
 

Private Member Functions

void PluginBase ()
 
void ~PluginBase ()
 
void OnInit ()
 
void OnUpdate (float delta_time)
 
void OnDestroy ()
 
void Log (string msg, string label)
 
string GetModuleName ()
 
 GetModuleType ()
 
void PluginConfigViewer ()
 
string MakeTabs (int count, bool inheritance=false)
 
string GetOnlyChildPath (string config_class_path, string class_path)
 
string GetBaseClassPath (string config_class_path, string class_path, string config_class)
 
string GetBaseClassPathCombined (string child_path, string base_class)
 
string GetBaseClassPathRecursive (string config_class_path, string class_path, string config_class)
 
bool ContainsFirstClass (string config_class_path, string class_path)
 
TStringArray GetConfigRecursive (string path, string name, string config_class_path, string config_class, local array< string > overridden, int depth=0, local bool check_base_class_of_class=false)
 
TStringArray GetConfig (string class_path, string filter_char)
 
TStringArray GetConfigVariables (string class_path)
 
TStringArray GetConfigHierarchy (string class_path)
 
string GetBaseClasses (string path, string item)
 
void PluginDayZInfectedDebug ()
 
void ~PluginDayZInfectedDebug ()
 
void ToggleDebugWindowEvent ()
 
void ToggleDebugWindowSetMode (int pMode)
 
void CaptureFocus ()
 
void ReleaseFocus ()
 
void Show ()
 
void Hide ()
 
void ShowWidgets (bool show)
 
override void OnUpdate (float delta_time)
 
void CreateModuleWidgets ()
 
void DestroyModuleWidgets ()
 
void ShowCard (int pCard)
 
bool OnClick (Widget w, int x, int y, int button)
 buttons clicks
 
bool OnChange (Widget w, int x, int y, bool finished)
 
void ResetValues ()
 
void SpawnNewInfectedEntity ()
 
void CleanupDebugShapes (array< Shape > shapesArr)
 
void ScriptHistoryNext ()
 
void ScriptHistoryBack ()
 
bool IsIngame ()
 
bool IsInConsole ()
 
int QuickSortPartition (TStringArray arr, int left, int right)
 
void QuickSort (TStringArray arr, int left, int right)
 
void SortStringArray (TStringArray arr)
 
void ResetGUI ()
 
void SetDeveloperItemClient ()
 
void CheckInit ()
 
void Init ()
 
override void OnUpdate (float delta_time)
 
override void OnDestroy ()
 
vector CalculatePos ()
 
void CheckInit ()
 
void Init ()
 
override void OnUpdate (float delta_time)
 
void PluginDrawCheckerboard ()
 
void ~PluginDrawCheckerboard ()
 
void CreateWidgetOverlay ()
 
bool IsActive ()
 
bool IsEven (int num)
 even or odd
 
void ShowWidgets (bool show)
 
void Show ()
 
void Hide ()
 
override void OnUpdate (float delta_time)
 
void SetWatching (bool enable)
 
bool GetWatching ()
 
void GatherPlayerInfo ()
 
void SendDebug ()
 
void OnDamageEvent (PlayerBase player, TotalDamageResult damageResult)
 
void OnRequestReceived (PlayerBase player, bool enable)
 
void OnRPC (ParamsReadContext ctx, PlayerBase player)
 
void PluginDeveloperSync ()
 
override void OnInit ()
 
void EnableUpdate (bool enable, int type, PlayerBase player)
 
void Update ()
 
void SetSystemInBitmask (PlayerBase player, int system_bit, bool state)
 
bool IsSetSystemInBitmask (PlayerBase player, int system_bit)
 
void RegisterPlayer (PlayerBase player)
 
bool IsPlayerRegistered (PlayerBase player)
 
void OnRPC (PlayerBase player, int rpc_type, ParamsReadContext ctx)
 
bool GetRPCUpdateState (ParamsReadContext ctx)
 
int GetRPCModifierID (ParamsReadContext ctx)
 
void GetRPCModifierLock (ParamsReadContext ctx, out int id, out bool lock)
 
void SendRPCStats (PlayerBase player)
 
void OnRPCStats (ParamsReadContext ctx)
 
void UpdateStatsLocal ()
 
void OnRPCStatSet (ParamsReadContext ctx, PlayerBase player)
 
void SendRPCLevels (PlayerBase player)
 
void OnRPCLevels (ParamsReadContext ctx)
 
void SendRPCMods (PlayerBase player)
 
void SendRPCModsDetail (PlayerBase player)
 
void OnRPCMods (ParamsReadContext ctx)
 
void OnRPCModsDetailed (ParamsReadContext ctx)
 
void RequestDetailedInfo (int id, notnull PlayerBase player)
 
void ActivateModifier (int id, PlayerBase player=NULL)
 
void DeactivateModifier (int id, PlayerBase player=NULL)
 
void LockModifier (int id, bool lock, PlayerBase player=NULL)
 
bool IsModifierLocked (int id, PlayerBase player=NULL)
 
void SendRPCTemp (PlayerBase player)
 
void OnRPCTemp (ParamsReadContext ctx, PlayerBase player)
 
void SendRPCAgents (PlayerBase player)
 
void OnRPCAgents (ParamsReadContext ctx)
 
void SendRPCStomach (PlayerBase player)
 
void OnRPCStomach (ParamsReadContext ctx)
 
void CaptureFocus ()
 
void ReleaseFocus ()
 
void ToggleFocus ()
 
void PluginFileHandler ()
 
void ~PluginFileHandler ()
 
override void OnInit ()
 
string GetFileName ()
 
string GetSubFolderName ()
 
void ClearFileNoSave ()
 
bool LoadFile ()
 
bool SaveFile ()
 
bool IsReadOnly ()
 
void AddText (string text)
 
void AddNewLineNoSave (string text)
 
TStringArray GetFileContent ()
 
void PluginHorticulture ()
 
void LoadFromCfg ()
 
string GetPlantType (Object obj)
 
float GetSurfaceFertility (string surface_type)
 
bool GiveWormsToPlayer (PlayerBase player, float chance)
 
PlantMaterialHealth GetPlantMaterial (string plant_type)
 
void PluginKeyBinding ()
 
override void OnInit ()
 
override void OnDestroy ()
 
void OnKeyPress (int key)
 
void OnKeyRelease (int key)
 
void OnMouseButtonPress (int button)
 
void OnMouseButtonRelease (int button)
 
void OnFrame ()
 
array< ref KeyBindingGetKeyBindings ()
 
array< ref MouseBindingGetMouseBindings ()
 
void PluginMessageManager ()
 
void Broadcast (int index)
 Broadcasts an empty message on a channel provided in the 'index' parameter.
 
void BroadcastInt (int index, int value)
 Broadcasts a message on a channel provided in the 'index' parameter, passes the Int variable.
 
void BroadcastFloat (int index, float value)
 
void BroadcastString (int index, string value)
 
void BroadcastParam (int index, Param params)
 Broadcasts a message on a channel provided in the 'index' parameter, passes the Param type object to the reciever.
 
void Subscribe (MessageReceiverBase receiver, int index)
 Subscribes an object to listen to messages on a channel provided in the 'index' parameter.
 
void Unsubscribe (MessageReceiverBase receiver, int index)
 
void UnsubscribeAll (MessageReceiverBase receiver)
 
void PluginObjectsInteractionManager ()
 
bool IsFree (Object target)
 
void Lock (Object target)
 
void Release (Object target)
 
void Decay ()
 
void SwitchPermanentCrossHair (bool state)
 
void PluginPlayerStatus ()
 
void SetNotifier (int key, int index=9, string label="", int color=0xFFFFFFFF)
 
void DisplayTendency (int key, int tendency, int status=1)
 
void SetBadge (int key, int value)
 
void SetStamina (int value, int range)
 
void SetStance (int value)
 
bool Repair (PlayerBase player, ItemBase repair_kit, Object item, float specialty_weight, string damage_zone="", bool use_kit_qty=true)
 
void CalculateHealth (PlayerBase player, ItemBase kit, Object item, float specialty_weight, string damage_zone="", bool use_kit_qty=true)
 
bool CanRepair (ItemBase repair_kit, Object item, string damage_zone="")
 
bool IsRepairValid (int repair_kit_type, int repairable_with_type)
 
bool CanRepairToPristine (PlayerBase player)
 Player can repair items to 100%; currently unused.
 
bool CanBeRepairedToPristine (Object item)
 Item can be repaired to 100%.
 
float GetKitRepairCost (ItemBase repair_kit, Object item)
 
void PluginSceneManager ()
 
void ~PluginSceneManager ()
 
override void OnInit ()
 
override void OnDestroy ()
 
void OnMouseWheel (int wheel)
 
void OnUIEditorOpened ()
 
void OnUIEditorClosed ()
 
void Event_OnClick ()
 
void Event_OnClickMiddle ()
 
void Event_OnDrag ()
 
SceneObject Event_OnDoubleClick ()
 
void InitLoad ()
 
void RestoreSceneObjectsLinks ()
 
void ExecuteInitScripts ()
 
void EditorToggle ()
 
bool IsOpened ()
 
void SelectClassName (string class_name)
 
void FreeCameraControlEnable ()
 
void FreeCameraControlDisable ()
 
void DeleteSelectedObject ()
 
void SelectObject (SceneObject obj)
 
SceneObject GetSelectedSceneObject ()
 
void SelectedObjectDuplicate ()
 
void SelectedObjectSetRot (float dir)
 
void SelectedObjectSetPosX (float value)
 
void SelectedObjectSetPosY (float value)
 
void SelectedObjectSetPosZ (float value)
 
void SelectedObjectSetDamage (float value)
 
void SelectedObjectFocus ()
 
void SelectedObjectAddAttachment (string att_name)
 
void SelectedObjectRemoveAttachment (EntityAI e)
 
void LinkSceneObjects (SceneObject scene_object1, SceneObject scene_object2)
 
void UnlinkSceneObjects (SceneObject scene_object1, SceneObject scene_object2)
 
bool AreSceneObjectsLinked (SceneObject scene_object1, SceneObject scene_object2)
 
void SetDrawSelection (bool draw)
 
bool GetDrawSelection ()
 
void SetLoadPlayerPos (bool save)
 
bool GetLoadPlayerPos ()
 
void SetRotationAngle (int angle)
 
int GetRotationAngle ()
 
void SceneLoad (string scene_name)
 
void SceneUnload ()
 
void SceneSave ()
 
bool SceneCanDelete (string scene_name)
 
bool SceneDelete (string scene_name)
 
void SceneDuplicate (string scene_name)
 
void SceneRename (string scene_name, string new_name)
 
string SceneGetName ()
 
void SetWeather (float overcast, float rain, float fog, float wind_force)
 
void SetDate (int year, int month, int day, int hour, int minute)
 
void SelectAndFocusPlayerObject ()
 
void ExecuteEnforceScript (int index, SceneObject scene_object, string script)
 
void RulerToggle ()
 
bool IsRulerActivated ()
 
void RulerAddPoint ()
 
void RulerClearVisuals ()
 
void RulerDelete ()
 
SceneData GetLoadedScene ()
 
int GetSelectedSceneObjectIndex ()
 
array< ref SceneObjectGetSceneObjects ()
 
array< ref ScenePlayerGetScenePlayers ()
 
array< ref SceneObjectGetSceneObjectsAll ()
 
SceneObject GetSceneObjectByIndex (int index)
 
SceneObject GetSceneObjectByEntity (EntityAI entity)
 
TStringArray GetSceneList ()
 
void DeleteSceneObject (SceneObject obj)
 
void DeselectObject ()
 
void SceneEditorMenuCmdRefresh ()
 
void SceneEditorMenuCmdPopup (string message)
 
void SceneEditorMenuCmdSave ()
 
bool IsMouseInScene ()
 
void EditorUpdateRuler ()
 
vector GetMousePositionInScene ()
 
override void OnInit ()
 
override void OnUpdate (float delta_time)
 
override void OnDestroy ()
 
void Show ()
 
void Hide ()
 
void OnGUITimer ()
 
void PluginTransmissionAgents ()
 
void RegisterAgent (AgentBase agent)
 
void ConstructSimpleAgentList ()
 
map< int, ref AgentBaseGetAgentList ()
 
map< int, stringGetSimpleAgentList ()
 
void RemoveAllAgents (EntityAI target)
 
void PluginVariables ()
 
void ~PluginVariables ()
 
void RegisterVariable (string name)
 
string GetName (int id)
 
int GetID (string name)
 

Static Private Member Functions

static void SetDeveloperItemClientEx (notnull Object entity, bool getFocus=false)
 
static bool FileDuplicate (string source_name, string dest_name)
 
static bool FileDelete (string file)
 
static void FileRename (string source_name, string dest_name)
 
static PluginSceneManager GetInstance ()
 
static string GetNameByID (int agent_id)
 
static void RemoveAgent (EntityAI target, int agent_id)
 

Private Attributes

string m_PlayerName
 
string m_Pid
 
vector m_Position
 
string m_PlayerPrefix
 
string m_PlayerPrefix2
 
string m_Message
 
string m_DisplayName
 
string m_HitMessage
 
float m_Distance
 
PlayerBase m_Player
 
PlayerBase m_Source
 
string m_ItemInHands
 
string m_PosArray [3]
 
int m_DotIndex
 
PlayerStat< floatm_StatWater
 
PlayerStat< floatm_StatEnergy
 
BleedingSourcesManagerServer m_BleedMgr
 
int m_CurrentMode = 0
 
bool m_HasFocus = false
 
bool m_IsActive = false
 
Widget m_MainWnd
 main controls
 
ButtonWidget m_SpawnEntityButton
 
ButtonWidget m_CardMovementButton
 
ButtonWidget m_CardFightButton
 
Widget m_CardMovementFrame
 
Widget m_CardFightFrame
 
TextWidget m_StatusText
 
XComboBoxWidget m_StanceCB
 movement card
 
XComboBoxWidget m_MindStateCB
 
EditBoxWidget m_MovementSpeedEB
 
ButtonWidget m_StartTurnButton
 
XComboBoxWidget m_TurnTypeCB
 
EditBoxWidget m_TurnDirectionEB
 
XComboBoxWidget m_VaultingCB
 
ButtonWidget m_StartVaultButton
 
ButtonWidget m_KnucleOutButton
 
XComboBoxWidget m_CrawlingTypeCB
 
ButtonWidget m_StartCrawlingButton
 
EditBoxWidget m_HitDirEB
 fight card
 
XComboBoxWidget m_HitTypeCB
 
XComboBoxWidget m_HitBodyPartCB
 
ButtonWidget m_StartHitButton
 
XComboBoxWidget m_DeathTypeCB
 
ButtonWidget m_StartDeathButton
 
XComboBoxWidget m_AttackTypeCB
 
XComboBoxWidget m_AttackDirCB
 
ButtonWidget m_StartAttackButton
 
DayZInfected m_ControlledInfected
 controlled instance
 
bool m_CH_DoTurn = false
 command handler values
 
bool m_CH_DoVault = false
 
bool m_CH_DoKnucleOut = false
 
bool m_CH_GoToCrawl = false
 
bool m_CH_DoHit = false
 
bool m_CH_StartDeath = false
 
bool m_CH_DoAttack = false
 
ref PluginDayZInfectedDebugUIHandler m_pUIHandler
 
ref array< ref PluginDayZInfectedDebugAttackDescm_AttackDescriptors = new array<ref PluginDayZInfectedDebugAttackDesc>
 
ref array< Shapem_DebugShapes = new array<Shape>()
 
ref Timer m_TickTimer
 status refresh timer
 
PluginDeveloper m_ModuleDeveloper
 
PlayerBase m_Character
 
bool m_Initialized
 
vector m_cam_pos
 
vector m_character_pos
 
vector m_camera_dir
 
vector m_cameraTrans [4]
 
vector m_demoPos
 
vector m_demoRot
 
vector m_camera_orientation
 
const float FOV = 0.5236
 
ItemBase m_Ruler
 
ref Widget m_MainWindow
 
ref set< PlayerBasem_ClientList = new set<PlayerBase>
 
ref array< ref RemotePlayerStatDebugm_PlayerDebugStats = new array<ref RemotePlayerStatDebug>
 
ref map< PlayerBase, ref RemotePlayerDamageDebugm_PlayerDebugDamage = new map<PlayerBase, ref RemotePlayerDamageDebug>
 
float m_AccuTime
 [m]
 
const int INTERVAL = 1
 
eRemoteDebugType m_DebugType
 
bool m_Watching
 
const int MAX_SIMULTANEOUS_UTS = 10
 
const float LOOKUP_RADIUS = 20
 [s]
 
int m_DetailedInfoRequested = 0
 
ref Timer m_UpdateTimer
 
ref map< PlayerBase, ref RegisterPlayerDatam_RegisteredPlayers
 
ref array< ref SyncedValuem_PlayerStatsSynced
 
ref array< ref Paramm_PlayerStomachSynced
 
ref array< ref SyncedValueLevelm_PlayerLevelsSynced
 
ref array< ref SyncedValueModifierm_PlayerModsSynced
 
string m_PlayerModsDetailedSynced
 
string m_EnvironmentDebugMessage
 
ref array< ref SyncedValueAgentm_PlayerAgentsSynced
 
bool m_StatsUpdateStatus
 
bool m_LevelsUpdateStatus
 
bool m_ModsUpdateStatus
 
bool m_AgentsUpdateStatus
 
bool m_StomachUpdateStatus
 
bool m_ReadOnly
 
int m_LineLimit
 
ref TStringArray m_FileContent
 
ref map< string, ref PlantMaterialHealthm_PlantMaterials
 
int channelsUsed = 0
 
ref array< ref MessageReceiverBasechannelList [NUM_OF_CHANNELS]
 
ref array< Objectm_LockedObjects
 
ref array< floatm_LockedObjectsDecay
 
const float TIME_TO_FORCED_UNLOCK = 60
 
const float TICK_RATE = 10
 
ref Timer m_DecayTimer
 
Hud m_Hud
 
ref multiMap< int, stringm_NotifiersLabel
 
ref multiMap< int, intm_NotifiersIndexColor
 
ref multiMap< int, stringm_NotifiersIcons
 
bool m_RulerActivated
 
ref array< vectorm_RulerPoints
 
ref array< Shapem_RulerLines
 
ref array< Shapem_RulerSpheres
 
ref SoundParams m_soundParams
 
ref SoundObjectBuilder m_soundBuilder
 
ref SoundObject m_soundObject
 
float fadeInVolume = 1.1
 
float fadeOutVolume = 0.9
 
AbstractWave m_wave
 
ref map< int, stringm_SimpleAgentList = new map<int, string>
 
bool m_IsConstructed = false
 
int m_Id
 
ref map< int, stringm_Variables
 

Static Private Attributes

static PluginKeyBinding instance
 
static string SCENE_DEFAULT_NAME = "default"
 
static string SCENE_SUFIX = "scene"
 
static PlayerBase PLAYER
 
static PluginSceneManager instance
 
static const int SCENE_EDITOR_CMD_REFRESH = 0
 
static const int SCENE_EDITOR_CMD_POPUP = 1
 
static const int SCENE_EDITOR_CMD_SAVE = 2
 
static ref map< int, ref AgentBasem_AgentList = new map<int, ref AgentBase>
 

Detailed Description

Class PluginMessageManager provides some basic Message Distribution mechanics, if you get instance of this plugin class on your object, you can use its methods to broadcast messages.

Definition at line 1 of file PluginBase.c.

Constructor & Destructor Documentation

◆ PluginBase()

void PluginBase::PluginBase ( )
private

◆ ~PluginBase()

void PluginBase::~PluginBase ( )
private

◆ ~PluginAdminLog()

void PluginBase::~PluginAdminLog ( )
inlineprotected

Definition at line 58 of file PluginAdminLog.c.

59 {
60 }

◆ ~PluginDayZInfectedDebug()

void PluginBase::~PluginDayZInfectedDebug ( )
inlineprivate

Definition at line 110 of file PluginDayZInfectedDebug.c.

111 {
112#ifndef NO_GUI
114#endif
115 }

References DestroyModuleWidgets().

◆ ~PluginDrawCheckerboard()

void PluginBase::~PluginDrawCheckerboard ( )
inlineprivate

Definition at line 14 of file PluginDrawCheckerboard.c.

14{}

◆ ~PluginFileHandler()

void PluginBase::~PluginFileHandler ( )
inlineprivate

Definition at line 32 of file PluginFileHandler.c.

33 {
35 }
void ClearFileNoSave()

◆ ~PluginSceneManager()

void PluginBase::~PluginSceneManager ( )
inlineprivate

Definition at line 28 of file PluginSceneManager.c.

29 {
30 if (instance == NULL)
31 instance = this;
32 }
static PluginKeyBinding instance

◆ ~PluginVariables()

void PluginBase::~PluginVariables ( )
inlineprivate

Definition at line 13 of file PluginVariables.c.

14 {
15 }

Member Function Documentation

◆ ActivateModifier()

void PluginBase::ActivateModifier ( int id,
PlayerBase player = NULL )
inlineprivate

Definition at line 617 of file PluginDeveloperSync.c.

618 {
619 if (!player)
621 ModifiersManager mods_manager = player.GetModifiersManager();
622 mods_manager.ActivateModifier(Math.AbsInt(id));
623 }
DayZGame GetDayZGame()
Definition DayZGame.c:3530
PlayerBase GetPlayer()
void ModifiersManager(PlayerBase player)
Definition EnMath.c:7
static proto int AbsInt(int i)
Returns absolute value.

References Math::AbsInt(), GetDayZGame(), GetPlayer(), and ModifiersManager().

Referenced by OnRPC().

◆ AddKeyframe()

void PluginBase::AddKeyframe ( )
inlineprotected

Definition at line 58 of file PluginCameraTools.c.

59 {
60 if (GetGame().GetUIManager().GetMenu())
61 GetGame().GetUIManager().GetMenu().OnKeyPress(null, 0, 0, KeyCode.KC_Q);
62 }
proto native CGame GetGame()
KeyCode
Definition EnSystem.c:157

References GetGame().

◆ AddNewLineNoSave()

void PluginBase::AddNewLineNoSave ( string text)
inlineprivate

Definition at line 117 of file PluginFileHandler.c.

118 {
119 if (m_LineLimit > -1)
120 {
121 if (m_LineLimit == 0)
122 return;
123
124 int lines_count = m_FileContent.Count();
125
126 if (lines_count > 0 && lines_count >= m_LineLimit)
127 {
129
130 for (int i = 0; i <= remove_indexes; ++i)
131 m_FileContent.RemoveOrdered(0);
132 }
133 }
134
135 m_FileContent.Insert(text);
136 }
ref TStringArray m_FileContent

◆ AddText()

void PluginBase::AddText ( string text)
inlineprivate

Definition at line 111 of file PluginFileHandler.c.

112 {
114 SaveFile();
115 }
void AddNewLineNoSave(string text)

◆ AreSceneObjectsLinked()

bool PluginBase::AreSceneObjectsLinked ( SceneObject scene_object1,
SceneObject scene_object2 )
inlineprivate

Definition at line 647 of file PluginSceneManager.c.

648 {
649 if (scene_object1.IsLinkedWithSceneObject(scene_object2) && scene_object2.IsLinkedWithSceneObject(scene_object1))
650 return true;
651 else
652 return false;
653 }

◆ BleedingOut()

void PluginBase::BleedingOut ( PlayerBase player)
inlineprotected

Definition at line 323 of file PluginAdminLog.c.

324 {
326
327 LogPrint(m_PlayerPrefix + " bled out");
328 }
void LogPrint(string message)
string GetPlayerPrefix(PlayerBase player, PlayerIdentity identity)
string m_PlayerPrefix

References GetPlayerPrefix(), and LogPrint().

◆ Broadcast()

void PluginBase::Broadcast ( int index)
inlineprivate

Broadcasts an empty message on a channel provided in the 'index' parameter.

Definition at line 16 of file PluginMessageManager.c.

17 {
18 //Debug.Log("Broadcasting message on a channel: "+ ToString(index), "Messaging System");
20 //int test = channelList[index].Count();
21 for (int i = 0; i < x.Count(); i++)
22 {
24
25 if (mrb != NULL)
26 {
27 //string s = "Broadcasting message to: "+ToString(mrb);
28 //Log(s, LogTemplates.TEMPLATE_BROADCAST);
29 mrb.OnReceive(index);
30 }
31 }
32 }
Icon x
LayoutHolder Get(int x)
Definition Container.c:1014
ref array< ref MessageReceiverBase > channelList[NUM_OF_CHANNELS]

References LayoutHolder::Count(), LayoutHolder::Get(), and x.

◆ BroadcastFloat()

void PluginBase::BroadcastFloat ( int index,
float value )
inlineprivate

Definition at line 54 of file PluginMessageManager.c.

55 {
56 //Debug.Log("Broadcasting message on a channel: "+ ToString(index), "Messaging System");
58 //int test = channelList[index].Count();
59 for (int i = 0; i < x.Count(); i++)
60 {
62
63 if (mrb)
64 {
65 //string s = "Broadcasting message to: "+ToString(mrb);
66 //Log(s, LogTemplates.TEMPLATE_BROADCAST);
67 mrb.OnReceiveFloat(index, value);
68 }
69
70 }
71 }

References LayoutHolder::Count(), LayoutHolder::Get(), and x.

◆ BroadcastInt()

void PluginBase::BroadcastInt ( int index,
int value )
inlineprivate

Broadcasts a message on a channel provided in the 'index' parameter, passes the Int variable.

Definition at line 35 of file PluginMessageManager.c.

36 {
37 //Debug.Log("Broadcasting message on a channel: "+ ToString(index), "Messaging System");
39 //int test = channelList[index].Count();
40 for (int i = 0; i < x.Count(); i++)
41 {
43
44 if (mrb)
45 {
46 //string s = "Broadcasting message to: "+ToString(mrb);
47 //Log(s, LogTemplates.TEMPLATE_BROADCAST);
48 mrb.OnReceiveInt(index, value);
49 }
50
51 }
52 }

References LayoutHolder::Count(), LayoutHolder::Get(), and x.

◆ BroadcastParam()

void PluginBase::BroadcastParam ( int index,
Param params )
inlineprivate

Broadcasts a message on a channel provided in the 'index' parameter, passes the Param type object to the reciever.

Definition at line 90 of file PluginMessageManager.c.

91 {
92 //Debug.Log("Broadcasting message on a channel: "+ ToString(index), "Messaging System");
94 //int test = channelList[index].Count();
95 for (int i = 0; i < x.Count(); i++)
96 {
97
98 if (x.Get(i))
99 x.Get(i).OnReceiveParam(index, params);
100
101 }
102 }

References LayoutHolder::Count(), LayoutHolder::Get(), and x.

◆ BroadcastString()

void PluginBase::BroadcastString ( int index,
string value )
inlineprivate

Definition at line 73 of file PluginMessageManager.c.

74 {
75 //Debug.Log("Broadcasting message on a channel: "+ ToString(index), "Messaging System");
77 //int test = channelList[index].Count();
78 for (int i = 0; i < x.Count(); i++)
79 {
80 if (x.Get(i))
81 {
82 Print("broadcasting message to: ");
83 Print(x.Get(i));
84 x.Get(i).OnReceiveString(index, value);
85 }
86 }
87 }
proto void Print(void var)
Prints content of variable to console/log.

References LayoutHolder::Count(), LayoutHolder::Get(), Print(), and x.

◆ BuildAgentArray()

static void PluginBase::BuildAgentArray ( int agents,
array< int > agents_out )
inlinestaticprotected

Definition at line 317 of file PluginTransmissionAgents.c.

318 {
319 int mask = 1;
320 for (int i = 0; i < BIT_INT_SIZE; i++)
321 {
322 if (mask & agents)
323 agents_out.Insert(mask);
324 mask = mask * 2;
325 }
326 }
const int BIT_INT_SIZE
Definition BitArray.c:4

References BIT_INT_SIZE.

◆ CalcTemperatureFromTemperatureSource()

float PluginBase::CalcTemperatureFromTemperatureSource ( notnull UTemperatureSourceDebug utsd)
inlineprotected

heat transfer through air to player (env temperature)

dist factor minimum should be at 0

Definition at line 113 of file PluginUniversalTemperatureSourceClient.c.

114 {
115 float distance = vector.Distance(m_Player.GetPosition(), utsd.GetValue(0).ToVector());
116 distance = Math.Max(distance, 0.1); //min distance cannot be 0 (division by zero)
117 float temperature = 0;
118
120 if (distance > utsd.GetValue(1).ToFloat())
121 {
122 float distFactor = 1 - (distance / utsd.GetValue(2).ToFloat());
123 distFactor = Math.Max(distFactor, 0.0);
124 temperature = utsd.GetValue(3).ToFloat() * distFactor;
125 }
126 else
127 temperature = utsd.GetValue(3).ToFloat();
128
129 //Print(temperature);
130
131 return temperature;
132 }
PlayerBase m_Player
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.
static proto float Max(float x, float y)
Returns bigger of two given values.

References vector::Distance(), m_Player, and Math::Max().

Referenced by ProcessUniversalTemperatureSources().

◆ CalculateAgentsToTransmit()

float PluginBase::CalculateAgentsToTransmit ( int agent_id,
float protection,
int dose_size,
int inject_type )
inlineprotected

Definition at line 347 of file PluginTransmissionAgents.c.

348 {
349
350 //Debug.Log("protection: "+protection.ToString());
351 float prot = 1 - protection; //reverse the value (in config, the higher the value, the higher the protection: 0 - 1) so that we can easily interpolate between 0 and 1 by multiplication
352 //Debug.Log("prot: "+prot.ToString(), "Agents");
353 float transf;
354
355 if (inject_type == InjectTypes.PLAYER_TO_ITEM)
357 else if (inject_type == InjectTypes.ITEM_TO_PLAYER)
359 else if (inject_type == InjectTypes.PLAYER_AIR_PLAYER)
361
362 //Debug.Log("transf: "+transf.ToString(), "Agents");
363 //float result = GetAgentInitialCount(agent_id) * prot * transf * dose_size;//final formula
364 float result = 1 * prot * transf * dose_size;//final formula
365 //result = Math.Ceil(result);
366 //Debug.Log("result: "+result.ToString(), "Agents");
367 return result;
368 }
float GetAgentTransferabilityAirOut(int agent_id)
float GetAgentTransferabilityIn(int agent_id)
float GetAgentTransferabilityOut(int agent_id)

References GetAgentTransferabilityAirOut(), GetAgentTransferabilityIn(), and GetAgentTransferabilityOut().

Referenced by InjectAgentsWithPlayerCount(), and InjectAgentWithPlayerDose().

◆ CalculateHealth()

void PluginBase::CalculateHealth ( PlayerBase player,
ItemBase kit,
Object item,
float specialty_weight,
string damage_zone = "",
bool use_kit_qty = true )
inlineprivate

Definition at line 27 of file PluginRepairing.c.

28 {
31
32 if (entity != null)
33 entity.SetAllowDamage(true);
34
35 bool kit_has_quantity = kit.HasQuantity();
36 int health_levels_count = item.GetNumberOfHealthLevels(damage_zone);
37 float cur_kit_quantity = kit.GetQuantity();
39 float kit_repair_cost_adjusted; //used with specialty_weight, disconnected
40 float new_quantity;
41
42 int target_level = Math.Clamp(item.GetHealthLevel(damage_zone) - 1, 0, health_levels_count - 1);
43 float health_coef;
46 health_coef = item.GetHealthLevelValue(target_level, damage_zone);
47
48 //handles kit depletion; TODO: move to separate method.
50 {
51 kit_repair_cost_adjusted = kit_repair_cost_per_level; //TODO: removed speciality weight for now, it should affect speed only (?).
52 //kit_repair_cost_adjusted = player.GetSoftSkillsManager().SubtractSpecialtyBonus( kit_repair_cost_per_level, specialty_weight );
54 if (use_kit_qty)
55 {
57 kit.SetQuantity(new_quantity);
58 }
59 }
60 else if (!kit_has_quantity) //"kit" without quantity (hammers and such) for your every day repairing needs
61 {
62 }
63 else
64 {
65 if (use_kit_qty)
66 kit.SetQuantity(0);
67 }
68
69 if (item.GetHealth01(damage_zone, "Health") < health_coef)
70 item.SetHealth01(damage_zone, "Health", health_coef);
71
72 if (entity != null)
73 entity.ProcessInvulnerabilityCheck(entity.GetInvulnerabilityTypeString());
74 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
bool CanRepairToPristine(PlayerBase player)
Player can repair items to 100%; currently unused.
float GetKitRepairCost(ItemBase repair_kit, Object item)
bool CanBeRepairedToPristine(Object item)
Item can be repaired to 100%.
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.
const int STATE_WORN
Definition constants.c:760
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.

References Class::CastTo(), Math::Clamp(), and GameConstants::STATE_WORN.

◆ CalculatePos()

vector PluginBase::CalculatePos ( )
inlineprivate

Definition at line 69 of file PluginCharPlacement.c.

70 {
71 vector cam_pos = FreeDebugCamera.GetInstance().GetPosition();
73 Math3D.DirectionAndUpMatrix(m_camera_dir/* - SnapToGround(cam_pos)*/, "0 1 0", m_cameraTrans);
75 m_demoPos = Vector(/*0.685547, -0.988281,*/0, 0, 3.68823).Multiply4(m_cameraTrans);
76 m_demoPos[1] = GetGame().SurfaceY(m_demoPos[0], m_demoPos[2]);
77
78 return m_demoPos;
79 }
vector m_cameraTrans[4]
proto native vector Vector(float x, float y, float z)
Vector constructor from components.
static void MatrixIdentity4(out vector mat[4])
Creates identity matrix.
Definition EnMath3D.c:233
static proto void DirectionAndUpMatrix(vector dir, vector up, out vector mat[4])
Creates rotation matrix from direction and up vector.

References Math3D::DirectionAndUpMatrix(), GetGame(), Math3D::MatrixIdentity4(), and Vector().

◆ CanBeRepairedToPristine()

bool PluginBase::CanBeRepairedToPristine ( Object item)
inlineprivate

Item can be repaired to 100%.

Definition at line 114 of file PluginRepairing.c.

115 {
116 return item.CanBeRepairedToPristine();
117 }

◆ CanRepair()

bool PluginBase::CanRepair ( ItemBase repair_kit,
Object item,
string damage_zone = "" )
inlineprivate

Definition at line 76 of file PluginRepairing.c.

77 {
78 int state = item.GetHealthLevel(damage_zone);
79
80 if (state != GameConstants.STATE_RUINED && (item.CanBeRepairedToPristine() && state >= GameConstants.STATE_WORN) || (!item.CanBeRepairedToPristine() && state >= GameConstants.STATE_DAMAGED))
81 {
82 int repair_kit_type = repair_kit.ConfigGetInt("repairKitType");
83
85 item.ConfigGetIntArray("repairableWithKits", repairable_with_types);
86
87 for (int i = 0; i < repairable_with_types.Count(); i++)
88 {
90
92 return true;
93 }
94 }
95 return false;
96
97 }
bool IsRepairValid(int repair_kit_type, int repairable_with_type)
const int STATE_RUINED
Definition constants.c:757
const int STATE_DAMAGED
Definition constants.c:759

References GameConstants::STATE_DAMAGED, GameConstants::STATE_RUINED, and GameConstants::STATE_WORN.

◆ CanRepairToPristine()

bool PluginBase::CanRepairToPristine ( PlayerBase player)
inlineprivate

Player can repair items to 100%; currently unused.

Definition at line 108 of file PluginRepairing.c.

109 {
110 return false;
111 }

◆ CaptureFocus() [1/2]

void PluginBase::CaptureFocus ( )
inlineprivate

Definition at line 139 of file PluginDayZInfectedDebug.c.

140 {
141 if (!m_HasFocus)
142 {
143 GetGame().GetInput().ChangeGameFocus(1);
144 GetGame().GetUIManager().ShowUICursor(true);
145 m_HasFocus = true;
146 }
147 }

References GetGame(), and m_HasFocus.

Referenced by ToggleDebugWindowEventP(), ToggleDebugWindowSetMode(), and ToggleDebugWindowSetMode().

◆ CaptureFocus() [2/2]

void PluginBase::CaptureFocus ( )
inlineprivate

Definition at line 793 of file PluginDeveloperSync.c.

794 {
795 GetGame().GetInput().ChangeGameFocus(1);
796 GetGame().GetUIManager().ShowUICursor(true);
797 }

References GetGame().

◆ CheckInit() [1/2]

void PluginBase::CheckInit ( )
inlineprivate

Definition at line 17 of file PluginCharPlacement.c.

18 {
19 if (m_Initialized)
20 {
21 Print("logging...");
22 Log(FOV.ToString(), "FOV");
23 Log(m_camera_dir.ToString(), "camera dir");
24 Log(m_cam_pos.ToString(), "camera pos");
25 Log(m_demoPos.ToString(), "character pos");
26
27 return;
28 }
29
30 if (FreeDebugCamera.GetInstance().IsActive())
31 Init();
32 }
void Log(string msg, string label)
Definition PluginBase.c:10
const float FOV
proto string ToString(bool beautify=true)
Vector to string.

References Init(), Log(), m_Initialized, Print(), float::ToString(), and vector::ToString().

◆ CheckInit() [2/2]

void PluginBase::CheckInit ( )
inlineprivate

Definition at line 8 of file PluginDoorRuler.c.

9 {
10 if (FreeDebugCamera.GetInstance().IsActive())
11 Init();
12 }

References Init().

◆ CheckMask()

bool PluginBase::CheckMask ( int source_mask,
int target_mask )
inlineprotected

Definition at line 316 of file PluginKeyBinding.c.

317 {
319 return true;
320
321 return false;
322 }

◆ CleanupDebugShapes()

void PluginBase::CleanupDebugShapes ( array< Shape > shapesArr)
inlineprivate

Definition at line 471 of file PluginDayZInfectedDebug.c.

472 {
473 for (int it = 0; it < shapesArr.Count(); ++it)
475
476 shapesArr.Clear();
477 }
Definition Debug.c:14
static void RemoveShape(out Shape shape)
Definition Debug.c:107

References Debug::RemoveShape().

Referenced by OnUpdate(), and ToggleDebugWindowSetMode().

◆ ClearFileNoSave()

void PluginBase::ClearFileNoSave ( )
inlineprivate

Definition at line 52 of file PluginFileHandler.c.

53 {
54 m_FileContent.Clear();
55 }

◆ ClearInventory()

void PluginBase::ClearInventory ( EntityAI entity)
inlineprotected

Definition at line 697 of file PluginDeveloper.c.

698 {
699 if (GetGame().IsServer())
700 entity.ClearInventory();
701 else
702 {
704 entity.RPCSingleParam(ERPCs.DEV_RPC_CLEAR_INV, params, true);
705 }
706 }
ERPCs
Definition ERPCs.c:2

References GetGame().

◆ CommandHandler()

void PluginBase::CommandHandler ( DayZInfected infected)
inlineprotected

Definition at line 376 of file PluginDayZInfectedDebug.c.

377 {
379 return;
380
381 infected.GetInputController().OverrideMovementSpeed(true, m_MovementSpeedEB.GetText().ToFloat());
382
383 DayZInfectedCommandMove moveCommand = infected.GetCommand_Move();
384 if (moveCommand)
385 {
386 moveCommand.SetStanceVariation(m_StanceCB.GetCurrentItem());
387 moveCommand.SetIdleState(m_MindStateCB.GetCurrentItem());
388 }
389
390 if (m_CH_DoTurn)
391 {
392 moveCommand.StartTurn(m_TurnDirectionEB.GetText().ToFloat(), m_TurnTypeCB.GetCurrentItem());
393 m_CH_DoTurn = false;
394 }
395 if (m_CH_DoVault)
396 {
397 infected.StartCommand_Vault(m_VaultingCB.GetCurrentItem());
398 m_CH_DoVault = false;
399 }
401 {
402 infected.StartCommand_Vault(-1);
403 m_CH_DoKnucleOut = false;
404 }
405 if (m_CH_GoToCrawl)
406 {
407 infected.StartCommand_Crawl(m_CrawlingTypeCB.GetCurrentItem());
408 m_CH_GoToCrawl = false;
409 }
410 if (m_CH_DoHit)
411 {
412 float hitDir = m_HitDirEB.GetText().ToFloat();
413 int bodyPart = m_HitBodyPartCB.GetCurrentItem();
414 bool heavyHit = m_HitTypeCB.GetCurrentItem() == 1;
415
416 infected.StartCommand_Hit(heavyHit, bodyPart, hitDir);
417
418 m_CH_DoHit = false;
419 }
420 if (m_CH_StartDeath)
421 {
422 int deathType = m_DeathTypeCB.GetCurrentItem();
423 float deathDir = m_HitDirEB.GetText().ToFloat();
424
425 infected.StartCommand_Death(deathType, deathDir);
426
427 m_CH_StartDeath = false;
428 }
429 if (m_CH_DoAttack)
430 {
431 float attackDir = m_AttackDirCB.GetCurrentItem();
432 int attackType = m_AttackDescriptors.Get(m_AttackTypeCB.GetCurrentItem()).animValue;
433
434 infected.StartCommand_Attack(null, attackType, attackDir);
435
436 m_CH_DoAttack = false;
437 }
438 }
EditBoxWidget m_TurnDirectionEB
XComboBoxWidget m_HitTypeCB
XComboBoxWidget m_DeathTypeCB
ref array< ref PluginDayZInfectedDebugAttackDesc > m_AttackDescriptors
XComboBoxWidget m_VaultingCB
XComboBoxWidget m_HitBodyPartCB
XComboBoxWidget m_AttackDirCB
XComboBoxWidget m_TurnTypeCB
EditBoxWidget m_HitDirEB
fight card
XComboBoxWidget m_StanceCB
movement card
XComboBoxWidget m_AttackTypeCB
EditBoxWidget m_MovementSpeedEB
DayZInfected m_ControlledInfected
controlled instance
bool m_CH_DoTurn
command handler values
XComboBoxWidget m_CrawlingTypeCB
XComboBoxWidget m_MindStateCB

◆ ConstructSimpleAgentList()

void PluginBase::ConstructSimpleAgentList ( )
inlineprivate

Definition at line 32 of file PluginTransmissionAgents.c.

33 {
34 string agent_name;
35 int agent_type;
36
37 for (int i = 0; i < m_AgentList.Count(); i++)
38 {
39 AgentBase agent = m_AgentList.GetElement(i);
40 agent_name = agent.GetName();
41 agent_type = agent.GetAgentType();
43 }
44 }
static ref map< int, ref AgentBase > m_AgentList
ref map< int, string > m_SimpleAgentList

Referenced by GetSimpleAgentList().

◆ ContainsFirstClass()

bool PluginBase::ContainsFirstClass ( string config_class_path,
string class_path )
inlineprivate

Definition at line 90 of file PluginConfigViewer.c.

91 {
92 int start = class_path.IndexOf(" ");
93 string name = class_path;
94 if (start > -1)
95 name = class_path.Substring(0, start);
96
97 int cfg_class_count = GetGame().ConfigGetChildrenCount(config_class_path);
98
99 for (int i = 0; i < cfg_class_count; i++)
100 {
101 string cfg_class_name = "";
102 GetGame().ConfigGetChildName(config_class_path, i, cfg_class_name);
103
104 if (cfg_class_name == name)
105 {
106 string full_name = config_class_path + " " + name;
107 int type = GetGame().ConfigGetType(full_name);
108
109 if (type == CT_CLASS)
110 return true;
111 }
112 }
113
114 if (start == -1)
115 return false;
116 else
117 {
118 string new_name = class_path.Substring(start + 1, class_path.Length() - (start + 1));
120 }
121 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
bool ContainsFirstClass(string config_class_path, string class_path)

References ContainsFirstClass(), GetGame(), and name.

Referenced by ContainsFirstClass(), and GetBaseClassPathRecursive().

◆ CreateModuleWidgets()

void PluginBase::CreateModuleWidgets ( )
inlineprivate

main controls

movement card

fight card

fill some controls

Definition at line 210 of file PluginDayZInfectedDebug.c.

211 {
212 if (!m_pUIHandler)
213 {
215 m_pUIHandler.m_pPluginInfectedDebug = this;
216 }
217
218 if (!m_MainWnd)
219 {
220 m_MainWnd = GetGame().GetWorkspace().CreateWidgets("gui/layouts/debug/day_z_infecteddebug.layout");
221 m_MainWnd.SetHandler(m_pUIHandler);
222 m_MainWnd.Show(false);
223 }
224
226 m_SpawnEntityButton = ButtonWidget.Cast(m_MainWnd.FindAnyWidget("SpawnEntityButton"));
227 m_CardMovementButton = ButtonWidget.Cast(m_MainWnd.FindAnyWidget("CardMovementButton"));
228 m_CardFightButton = ButtonWidget.Cast(m_MainWnd.FindAnyWidget("CardFightButton"));
229 m_CardMovementFrame = m_MainWnd.FindAnyWidget("CardMovementFrame");
230 m_CardFightFrame = m_MainWnd.FindAnyWidget("CardFightFrame");
231 m_StatusText = TextWidget.Cast(m_MainWnd.FindAnyWidget("StatusText"));
232
234 m_StanceCB = XComboBoxWidget.Cast(m_MainWnd.FindAnyWidget("StanceCB"));
235 m_MindStateCB = XComboBoxWidget.Cast(m_MainWnd.FindAnyWidget("MindStateCB"));
236 m_MovementSpeedEB = EditBoxWidget.Cast(m_MainWnd.FindAnyWidget("MovementSpeedEB"));
237
238 m_StartTurnButton = ButtonWidget.Cast(m_MainWnd.FindAnyWidget("StartTurnButton"));
239 m_TurnTypeCB = XComboBoxWidget.Cast(m_MainWnd.FindAnyWidget("TurnTypeCB"));
240 m_TurnDirectionEB = EditBoxWidget.Cast(m_MainWnd.FindAnyWidget("TurnDirectionEB"));
241
242 m_VaultingCB = XComboBoxWidget.Cast(m_MainWnd.FindAnyWidget("TurnTypeCB"));
243 m_StartVaultButton = ButtonWidget.Cast(m_MainWnd.FindAnyWidget("StartVaultButton"));
244 m_KnucleOutButton = ButtonWidget.Cast(m_MainWnd.FindAnyWidget("KnucleOutButton"));
245
246 m_CrawlingTypeCB = XComboBoxWidget.Cast(m_MainWnd.FindAnyWidget("TurnTypeCB"));
247 m_StartCrawlingButton = ButtonWidget.Cast(m_MainWnd.FindAnyWidget("StartCrawlingButton"));
248
250 m_HitDirEB = EditBoxWidget.Cast(m_MainWnd.FindAnyWidget("HitDirEB"));
251 m_HitTypeCB = XComboBoxWidget.Cast(m_MainWnd.FindAnyWidget("HitTypeCB"));
252 m_HitBodyPartCB = XComboBoxWidget.Cast(m_MainWnd.FindAnyWidget("HitBodyPartCB"));
253 m_StartHitButton = ButtonWidget.Cast(m_MainWnd.FindAnyWidget("StartHitButton"));
254
255 m_DeathTypeCB = XComboBoxWidget.Cast(m_MainWnd.FindAnyWidget("DeathTypeCB"));
256 m_StartDeathButton = ButtonWidget.Cast(m_MainWnd.FindAnyWidget("StartDeathButton"));
257
258 m_AttackTypeCB = XComboBoxWidget.Cast(m_MainWnd.FindAnyWidget("AttackTypeCB"));
259 m_AttackDirCB = XComboBoxWidget.Cast(m_MainWnd.FindAnyWidget("AttackDirCB"));
260 m_StartAttackButton = ButtonWidget.Cast(m_MainWnd.FindAnyWidget("StartAttackButton"));
261
263 InitAttacks();
264
265 ShowCard(0);
266 }
ButtonWidget m_StartHitButton
ButtonWidget m_CardMovementButton
ButtonWidget m_CardFightButton
ref PluginDayZInfectedDebugUIHandler m_pUIHandler
ButtonWidget m_SpawnEntityButton
ButtonWidget m_KnucleOutButton
Widget m_MainWnd
main controls
ButtonWidget m_StartTurnButton
ButtonWidget m_StartCrawlingButton
ButtonWidget m_StartDeathButton
ButtonWidget m_StartVaultButton
ButtonWidget m_StartAttackButton
void ShowCard(int pCard)

References GetGame(), InitAttacks(), m_MainWnd, m_pUIHandler, and ShowCard().

Referenced by PluginDayZInfectedDebug(), and PluginDayzPlayerDebug().

◆ CreateWidgetOverlay()

void PluginBase::CreateWidgetOverlay ( )
inlineprivate

row counter

sets alpha level for even/odd child

Definition at line 16 of file PluginDrawCheckerboard.c.

17 {
18#ifndef NO_GUI
19 if (!m_MainWindow)
20 {
21 m_MainWindow = GetGame().GetWorkspace().CreateWidgets("gui/layouts/camera_checkerboard.layout");
22 m_MainWindow.Show(false);
23 int childId = 0;
24 int row = 0;
25 bool evenOrOdd;
26 int tilesPerLine = 8;
27
28 Widget child = m_MainWindow.GetChildren();
29 while (child)
30 {
32
34 if (childId > (tilesPerLine * row) - 1)
35 row++;
36
37 if (IsEven(row))
39
41 if (evenOrOdd)
42 child.SetAlpha(0.15);
43 else
44 child.SetAlpha(0.05);
45
46 child = child.GetSibling();
47 childId++;
48 }
49 }
50#endif
51 }
ref Widget m_MainWindow
bool IsEven(int num)
even or odd

References GetGame(), and IsEven().

Referenced by PluginDrawCheckerboard().

◆ CursorHide()

void PluginBase::CursorHide ( )
inlineprotected

Definition at line 31 of file PluginCameraTools.c.

32 {
33 if (GetGame().GetUIManager().GetMenu())
34 GetGame().GetUIManager().GetMenu().OnHide();
35 }

References GetGame().

◆ CursorShow()

void PluginBase::CursorShow ( )
inlineprotected

Definition at line 40 of file PluginCameraTools.c.

41 {
42 if (GetGame().GetUIManager().GetMenu())
43 GetGame().GetUIManager().GetMenu().OnShow();
44 }

References GetGame().

◆ DeactivateModifier()

void PluginBase::DeactivateModifier ( int id,
PlayerBase player = NULL )
inlineprivate

Definition at line 626 of file PluginDeveloperSync.c.

627 {
628 if (!player)
630 ModifiersManager mods_manager = player.GetModifiersManager();
631 mods_manager.DeactivateModifier(Math.AbsInt(id));
632 }

References Math::AbsInt(), GetDayZGame(), GetPlayer(), and ModifiersManager().

Referenced by OnRPC().

◆ Decay()

void PluginBase::Decay ( )
inlineprivate

Definition at line 57 of file PluginObjectsInteractionManager.c.

58 {
59 if (m_LockedObjectsDecay.Count() > 0)
60 {
61 for (int i = 0; i < m_LockedObjectsDecay.Count(); i++)
62 {
64 {
65 m_LockedObjects.Remove(i);
66 m_LockedObjectsDecay.Remove(i);
67 }
68 else
70 }
71 }
72 }
ref array< float > m_LockedObjectsDecay
ref array< Object > m_LockedObjects

References TICK_RATE.

◆ DeleteKeyframe()

void PluginBase::DeleteKeyframe ( )
inlineprotected

Definition at line 64 of file PluginCameraTools.c.

65 {
66 if (GetGame().GetUIManager().GetMenu())
67 GetGame().GetUIManager().GetMenu().OnKeyPress(null, 0, 0, KeyCode.KC_E);
68 }

References GetGame().

◆ DeleteSceneObject()

void PluginBase::DeleteSceneObject ( SceneObject obj)
inlineprivate

Definition at line 1015 of file PluginSceneManager.c.

1016 {
1017 if (obj != NULL)
1018 {
1019 if (obj.GetObject() != GetGame().GetPlayer())
1020 {
1021 obj.UnlinkAll();
1022
1025
1026 m_SceneData.DeleteSceneObject(obj);
1027 }
1028 else
1029 SceneEditorMenuCmdPopup("You cant delete player!");
1030 }
1031
1032 EditorUpdate();
1033 }
ref SceneData m_SceneData
SceneObject GetSelectedSceneObject()
void SceneEditorMenuCmdPopup(string message)
void UnlinkAll()
EntityAI GetObject()
Definition SceneObject.c:57

References GetGame(), SceneObject::GetObject(), GetPlayer(), and SceneObject::UnlinkAll().

◆ DeleteSelectedObject()

void PluginBase::DeleteSelectedObject ( )
inlineprivate

Definition at line 411 of file PluginSceneManager.c.

412 {
414
415 if (selected_obj != NULL)
416 {
417 if (!selected_obj.IsPlayer())
418 {
420 for (int i = 0; i < scene_objects.Count(); i++)
421 {
424 }
425
426 m_SceneData.DeleteSceneObject(selected_obj);
427
428 scene_objects.RemoveItem(selected_obj);
429
431 }
432 else
433 SceneEditorMenuCmdPopup("You cant delete player!");
434 }
435
436 EditorUpdate();
437 }
array< ref SceneObject > GetSceneObjects()
void UnlinkSceneObjects(SceneObject scene_object1, SceneObject scene_object2)
bool AreSceneObjectsLinked(SceneObject scene_object1, SceneObject scene_object2)

◆ DeselectObject()

void PluginBase::DeselectObject ( )
inlineprivate

Definition at line 1057 of file PluginSceneManager.c.

1058 {
1060 }
SceneObject m_SelectedObject

References m_SelectedObject.

◆ DestroyModuleWidgets()

void PluginBase::DestroyModuleWidgets ( )
inlineprivate

Definition at line 269 of file PluginDayZInfectedDebug.c.

270 {
271 delete m_MainWnd;
272 }

References m_MainWnd.

Referenced by ~PluginDayZInfectedDebug(), and ~PluginDayzPlayerDebug().

◆ DetermineChanceToTransmit()

bool PluginBase::DetermineChanceToTransmit ( int agent_id,
float protection,
int inject_type )
inlineprotected

Definition at line 371 of file PluginTransmissionAgents.c.

372 {
373
374 //Debug.Log("protection: "+protection.ToString());
375 float prot = 1 - protection; //reverse the value (in config, the higher the value, the higher the protection: 0 - 1) so that we can easily interpolate between 0 and 1 by multiplication
376 //Debug.Log("prot: "+prot.ToString(), "Agents");
377 float transf;
378
379 if (inject_type == InjectTypes.PLAYER_TO_ITEM)
381 else if (inject_type == InjectTypes.ITEM_TO_PLAYER)
383 else if (inject_type == InjectTypes.PLAYER_AIR_PLAYER)
385#ifdef DEVELOPER
386 //Debug.Log("transf: "+transf.ToString(), "Agents");
387#endif
388 //float result = GetAgentInitialCount(agent_id) * prot * transf * dose_size;//final formula
389 bool dice = Math.RandomFloat01() < (prot * transf);
390 //result = Math.Ceil(result);
391
392 return dice;
393 }
static float RandomFloat01()
Returns a random float number between and min [inclusive] and max [inclusive].
Definition EnMath.c:126

References GetAgentTransferabilityAirOut(), GetAgentTransferabilityIn(), GetAgentTransferabilityOut(), and Math::RandomFloat01().

Referenced by InjectAgentsWithPlayer().

◆ DirectAdminLogPrint()

void PluginBase::DirectAdminLogPrint ( string str)
inlineprotected

Definition at line 368 of file PluginAdminLog.c.

369 {
370 LogPrint(str);
371 }

References LogPrint().

◆ DisplayTendency()

void PluginBase::DisplayTendency ( int key,
int tendency,
int status = 1 )
inlineprivate

Definition at line 42 of file PluginPlayerStatus.c.

43 {
44 if (key)
45 {
46 // display icon
47 int icon_index = 0; // maybe we'll have several icons for different tendencies
48 if (m_NotifiersIcons.HasKey(key))
49 {
50 string icon_name = m_NotifiersIcons.Get(key).Get(icon_index);
51 Mission mission = GetGame().GetMission();
52 if (mission)
53 {
55 if (hud)
56 hud.DisplayNotifier(key, tendency, status);
57 }
58 }
59 }
60 }
Mission mission
Mission class.
Definition gameplay.c:668
Hud GetHud()
Definition gameplay.c:701
ref multiMap< int, string > m_NotifiersIcons

References GetGame(), Mission::GetHud(), and mission.

◆ DrawDebugs()

void PluginBase::DrawDebugs ( )
inlineprotected

Definition at line 48 of file PluginUniversalTemperatureSourceClient.c.

49 {
51 {
52 float fullRange = utsd.GetValue(1).ToFloat();
53 float maxRange = utsd.GetValue(2).ToFloat();
54 float temp = utsd.GetValue(3).ToFloat();
55 vector sphPos = utsd.GetValue(0).ToVector();
56
59 if (temp < 0)
60 {
63 }
64
67 Debug.DrawArrow(m_Player.GetPosition(), sphPos, 1.0, 0xffffffff, ShapeFlags.ONCE | ShapeFlags.TRANSP);
68 }
69
71
72 if (m_UTemperatureSourceDebugs.Count() > 0)
73 {
74 DbgUI.Begin("Universal Temp Sources", 10, 300);
75 DbgUI.Text(string.Format("Lookup radius: %1m (server-side)", PluginUniversalTemperatureSourceServer.LOOKUP_RADIUS));
76 DbgUI.Text(string.Format("Count: %1", m_UTemperatureSourceDebugs.Count()));
77 DbgUI.Text(string.Format("Avg. temp: %1 °C", m_UTSAverageTemperature));
78 DbgUI.End();
79 }
80 }
Definition DbgUI.c:60
static Shape DrawCylinder(vector pos, float radius, float height=1, int color=0x1fff7f7f, ShapeFlags flags=ShapeFlags.TRANSP|ShapeFlags.NOOUTLINE)
Definition Debug.c:450
static Shape DrawArrow(vector from, vector to, float size=0.5, int color=0xFFFFFFFF, int flags=0)
Definition Debug.c:511
ref array< ref UTemperatureSourceDebug > m_UTemperatureSourceDebugs
const int COLOR_BLUE_A
Definition constants.c:71
const int COLOR_RED_A
Definition constants.c:69
const int COLOR_YELLOW_A
Definition constants.c:72
const int COLOR_GREEN_A
Definition constants.c:70
ShapeFlags
Definition EnDebug.c:126
static proto native void End()
static proto native void Begin(string windowTitle, float x=0, float y=0)
static proto native void Text(string label)

References DbgUI::Begin(), COLOR_BLUE_A, COLOR_GREEN_A, COLOR_RED_A, COLOR_YELLOW_A, Debug::DrawArrow(), Debug::DrawCylinder(), DbgUI::End(), m_Player, m_UTemperatureSourceDebugs, ProcessUniversalTemperatureSources(), and DbgUI::Text().

Referenced by OnUpdate().

◆ EditorToggle()

void PluginBase::EditorToggle ( )
inlineprivate

Definition at line 342 of file PluginSceneManager.c.

343 {
344 //Log("EditorToggle");
345
346 if (GetGame().IsMultiplayer())
347 return;
348
349 if (IsOpened())
350 {
351 // Close UI Scene Editor Menu
352 GetGame().GetUIManager().Back();
353 }
354 else
355 {
356 // Open UI Scene Editor Menu
357 GetGame().GetUIManager().EnterScriptedMenu(MENU_SCENE_EDITOR, NULL);
358 EditorUpdate();
359 }
360 }
const int MENU_SCENE_EDITOR
Definition constants.c:167

References GetGame(), IsOpened(), and MENU_SCENE_EDITOR.

◆ EditorUpdate()

void PluginBase::EditorUpdate ( )
inlineprotected

Definition at line 1065 of file PluginSceneManager.c.

1066 {
1067 if (GetGame().IsMultiplayer())
1068 return;
1069
1071 if (!objects)
1072 return;
1073 for (int i = 0; i < objects.Count(); ++i)
1074 {
1075 SceneObject obj = objects.Get(i);
1076
1078 int j;
1079
1080 if (IsOpened())
1081 {
1082 obj.EditorShapeAdd();
1083
1085 {
1086 if (GetDrawSelection())
1087 obj.EditorShapeSelect();
1088 }
1089 else
1090 obj.EditorShapeDeselect();
1091
1092 for (j = 0; j < linked_scene_objects.Count(); j++)
1094 }
1095 else
1096 {
1097 obj.EditorShapeRemove();
1098
1100 {
1101 for (j = 0; j < linked_scene_objects.Count(); j++)
1103 }
1104 }
1105 }
1106
1108 }
void SceneEditorMenuCmdRefresh()
void EditorShapeDeselect()
array< SceneObject > GetLinkedSceneObjects()
void EditorShapeSelect()
void EditorLineAdd(SceneObject obj)
void EditorShapeRemove()
void EditorLineRemove(SceneObject obj)
void EditorShapeAdd()

References SceneObject::EditorLineAdd(), SceneObject::EditorLineRemove(), SceneObject::EditorShapeAdd(), SceneObject::EditorShapeDeselect(), SceneObject::EditorShapeRemove(), SceneObject::EditorShapeSelect(), GetGame(), SceneObject::GetLinkedSceneObjects(), and IsOpened().

◆ EditorUpdateRuler()

void PluginBase::EditorUpdateRuler ( )
inlineprivate

Definition at line 1150 of file PluginSceneManager.c.

1151 {
1153
1154 for (int i = 0; i < m_RulerPoints.Count(); ++i)
1155 {
1156 vector pos1 = m_RulerPoints.Get(i);
1157
1158 m_RulerSpheres.Insert(Debug.DrawSphere(pos1, 0.1));
1159
1160 if (i < m_RulerPoints.Count() - 1)
1161 {
1162 vector pos2 = m_RulerPoints.Get(i + 1);
1164 }
1165 }
1166 }
static Shape DrawSphere(vector pos, float size=1, int color=0x1fff7f7f, ShapeFlags flags=ShapeFlags.TRANSP|ShapeFlags.NOOUTLINE)
Definition Debug.c:434
static Shape DrawLine(vector from, vector to, int color=0xFFFFFFFF, int flags=0)
Definition Debug.c:489
ref array< Shape > m_RulerLines
ref array< vector > m_RulerPoints
ref array< Shape > m_RulerSpheres

References Debug::DrawLine(), and Debug::DrawSphere().

◆ EnableUpdate()

void PluginBase::EnableUpdate ( bool enable,
int type,
PlayerBase player )
inlineprivate

Definition at line 76 of file PluginDeveloperSync.c.

77 {
78 //set update by type
81
82
83 switch (type)
84 {
85 case ERPCs.DEV_STATS_UPDATE:
86 {
88 break;
89 }
90
91 case ERPCs.DEV_LEVELS_UPDATE:
92 {
94 break;
95 }
96
97 case ERPCs.DEV_MODS_UPDATE:
98 {
100 break;
101 }
102
103 case ERPCs.DEV_AGENTS_UPDATE:
104 {
106 break;
107 }
108
109 case ERPCs.DEV_STOMACH_UPDATE:
110 {
112 break;
113 }
114 case ERPCs.DEV_TEMP_UPDATE:
115 {
117 break;
118 }
119 }
120
121 //remove players with empty mask
122 for (int i = 0; i < m_RegisteredPlayers.Count(); i++)
123 {
124 if (m_RegisteredPlayers.GetElement(i).m_Bitmask == 0)
125 {
126 m_RegisteredPlayers.RemoveElement(i);
127 i = 0;
128 }
129 }
130
131 //start/stop the tick based on existence/absence of players registered
132 if (m_UpdateTimer)
133 {
134 if (m_RegisteredPlayers.Count() == 0)
135 m_UpdateTimer.Stop();
136 else if (!m_UpdateTimer.IsRunning())
137 m_UpdateTimer.Run(1, this, "Update", NULL, true);
138 }
139 }
ref map< PlayerBase, ref RegisterPlayerData > m_RegisteredPlayers
bool IsPlayerRegistered(PlayerBase player)
void SetSystemInBitmask(PlayerBase player, int system_bit, bool state)
ref Timer m_UpdateTimer
void RegisterPlayer(PlayerBase player)

References IsPlayerRegistered(), m_UpdateTimer, RegisterPlayer(), and SetSystemInBitmask().

Referenced by OnRPC(), and OnRPCTemp().

◆ EnableWidgets()

void PluginBase::EnableWidgets ( bool enable)
inlineprotected

Definition at line 134 of file PluginUniversalTemperatureSourceClient.c.

135 {
136 for (int i = 0; i < MAX_SIMULTANEOUS_UTS; i++)
138 }
ref Widget m_RootWidget[MAX_SIMULTANEOUS_UTS]

References m_RootWidget, MAX_SIMULTANEOUS_UTS, and Show().

Referenced by RequestUniversalTemperatureSources().

◆ Event_OnClick()

void PluginBase::Event_OnClick ( )
inlineprivate

Definition at line 108 of file PluginSceneManager.c.

109 {
110 if (!IsMouseInScene() || !m_IsOpen)
111 return;
112
113 // Direction Vector from current active Camera
114 vector dir = GetGame().GetPointerDirection();
115
116 // Raycast from
117 vector from = FreeDebugCamera.GetInstance().GetPosition();
118 // Raycast to
119 vector to = from + (dir * 10000);
120 // Raycast out parameter
125 bool selected = false;
126
128 {
129 for (int i = 0; i < objects.Count(); ++i)
130 {
131 Object obj = objects.Get(i);
132
133 if (obj.IsInherited(EntityAI))
134 {
135 SceneObject sc_object = SceneObject.Cast(m_SceneData.GetSceneObjectByEntityAI(EntityAI.Cast(obj)));
136
137 if (sc_object == NULL)
138 {
139 //sc_object = m_SceneData.AddObject(obj);
140 return;
141 }
142
144 selected = true;
145
146 break;
147 }
148 }
149 }
150
151 if (!selected)
152 {
154
155 // Ruler
158 }
159
160 EditorUpdate();
161 }
static proto bool RaycastRV(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, set< Object > results=NULL, Object with=NULL, Object ignore=NULL, bool sorted=false, bool ground_only=false, int iType=ObjIntersectView, float radius=0.0, CollisionFlags flags=CollisionFlags.NEARESTCONTACT)
Raycasts world by given parameters.
static bool m_IsOpen
void SelectObject(SceneObject obj)

References GetGame(), and DayZPhysics::RaycastRV().

◆ Event_OnClickMiddle()

void PluginBase::Event_OnClickMiddle ( )
inlineprivate

Definition at line 166 of file PluginSceneManager.c.

167 {
168 if (!IsMouseInScene() || !m_IsOpen)
169 return;
170
172 {
173 // Direction Vector from current active Camera
174 vector dir = GetGame().GetPointerDirection();
175
176 // Raycast from
177 vector from = FreeDebugCamera.GetInstance().GetPosition();
178 // Raycast to
179 vector to = from + (dir * 10000);
180 // Raycast out parameter
185 bool selected = false;
186
188 {
189 for (int i = 0; i < objects.Count(); ++i)
190 {
191 Object obj = objects.Get(i);
192
193 if (obj.IsInherited(EntityAI))
194 {
195 EntityAI eai = EntityAI.Cast(obj);
196 SceneObject scene_object = m_SceneData.GetSceneObjectByEntityAI(eai);
197
198 if (!scene_object.IsPlayer())
199 {
201 {
204 else
206 }
207 }
208 else
209 SceneEditorMenuCmdPopup("I am sorry. You cant create link on player!");
210 }
211 }
212 }
213 }
214
215 EditorUpdate();
216 }
void LinkSceneObjects(SceneObject scene_object1, SceneObject scene_object2)

References GetGame(), and DayZPhysics::RaycastRV().

◆ Event_OnDoubleClick()

SceneObject PluginBase::Event_OnDoubleClick ( )
inlineprivate

Definition at line 252 of file PluginSceneManager.c.

253 {
255 return null;
256
257 // Direction Vector from current active Camera
258 vector dir = GetGame().GetPointerDirection();
259
260 // Raycast from
261 vector from = FreeDebugCamera.GetInstance().GetPosition();
262 // Raycast to
263 vector to = from + (dir * 10000);
264 // Raycast out parameter
268
270 {
272
273 if (obj != NULL)
274 {
275 SelectObject(obj);
276 return obj;
277 }
278 }
279
280 return NULL;
281 }
string m_ClassBrowserSelected

References GetGame(), and DayZPhysics::RaycastRV().

◆ Event_OnDrag()

void PluginBase::Event_OnDrag ( )
inlineprivate

Definition at line 221 of file PluginSceneManager.c.

222 {
223 if (!IsMouseInScene() || !m_IsOpen)
224 return;
225
227 {
228 // Direction Vector from current active Camera
229 vector dir = GetGame().GetPointerDirection();
230
231 // Raycast from
232 vector from = FreeDebugCamera.GetInstance().GetPosition();
233 // Raycast to
234 vector to = from + (dir * 10000);
235 // Raycast out parameter
239
240 //Raycast(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, out set<Object> results = NULL, Object with = NULL, Object ignore = NULL, bool sorted = false, bool ground_only = false, int iType = ObjIntersectView, float radius = 0.0);
241
244
245 EditorUpdate();
246 }
247 }
void SetPosition(vector pos)

References GetGame(), and DayZPhysics::RaycastRV().

◆ ExecuteEnforceScript()

void PluginBase::ExecuteEnforceScript ( int index,
SceneObject scene_object,
string script )
inlineprivate

Definition at line 842 of file PluginSceneManager.c.

843 {
844 if (script != "")
845 {
846 string cls = scene_object.GetObject().ClassName();
847 string wrapped_script = "void scMngMain() \n{\n PluginSceneManager se = GetPlugin(Type(\"PluginSceneManager\")); \n SceneObject this_obj = se.GetSceneObjectByIndex(" + index.ToString() + "); \n " + cls + " this_eai = this_obj.GetObject(); \n " + script + "\n}\n";
848
849 GetGame().ExecuteEnforceScript(wrapped_script, "scMngMain");
850 }
851 }

References GetGame().

◆ ExecuteInitScripts()

void PluginBase::ExecuteInitScripts ( )
inlineprivate

Definition at line 329 of file PluginSceneManager.c.

330 {
332 for (int i = 0; i < scene_objects.Count(); i++)
333 {
336 }
337 }
void ExecuteEnforceScript(int index, SceneObject scene_object, string script)

◆ FileDelete()

static bool PluginBase::FileDelete ( string file)
inlinestaticprivate

Definition at line 8 of file PluginFileHandler.c.

9 {
10 return DeleteFile(file);
11 }
proto native bool DeleteFile(string name)
delete file. Works only on "$profile:" and "$saves:" locations

References DeleteFile().

◆ FileDuplicate()

static bool PluginBase::FileDuplicate ( string source_name,
string dest_name )
inlinestaticprivate

Definition at line 3 of file PluginFileHandler.c.

4 {
6 }
proto native bool CopyFile(string sourceName, string destName)
copy file. destName must be "$profile:" or "$saves:" location

References CopyFile().

◆ FileRename()

static void PluginBase::FileRename ( string source_name,
string dest_name )
inlinestaticprivate

Definition at line 13 of file PluginFileHandler.c.

14 {
17 }
static bool FileDelete(string file)
static bool FileDuplicate(string source_name, string dest_name)

◆ FreeCameraControlDisable()

void PluginBase::FreeCameraControlDisable ( )
inlineprivate

Definition at line 396 of file PluginSceneManager.c.

397 {
398 // Disable Camera control
399 GetGame().GetInput().ChangeGameFocus(1);
400
401 // Enable Cursor
402 GetGame().GetUIManager().ShowUICursor(true);
403
404 if (GetGame().GetUIManager().GetMenu())
405 GetGame().GetUIManager().GetMenu().OnShow();
406 }

References GetGame().

◆ FreeCameraControlEnable()

void PluginBase::FreeCameraControlEnable ( )
inlineprivate

Definition at line 381 of file PluginSceneManager.c.

382 {
383 // Enable Camera control
384 GetGame().GetInput().ChangeGameFocus(-1);
385
386 // Disable Cursor
387 GetGame().GetUIManager().ShowUICursor(false);
388
389 if (GetGame().GetUIManager().GetMenu())
390 GetGame().GetUIManager().GetMenu().OnHide();
391 }

References GetGame().

◆ GatherPlayerInfo()

void PluginBase::GatherPlayerInfo ( )
inlineprivate

Definition at line 39 of file PluginRemotePlayerDebugServer.c.

40 {
42 GetGame().GetPlayers(players);
43 m_PlayerDebugStats.Clear();
44
45 foreach (Man playerMan : players)
46 {
49 m_PlayerDebugStats.Insert(rpd);
50 }
51 }
void RemotePlayerStatDebug(PlayerBase player)
ref array< ref RemotePlayerStatDebug > m_PlayerDebugStats

References GetGame(), m_PlayerDebugStats, and RemotePlayerStatDebug().

◆ GatherTemperatureSources()

void PluginBase::GatherTemperatureSources ( PlayerBase player)
inlineprotected

Definition at line 31 of file PluginUniversalTemperatureSourceServer.c.

32 {
34
35 if (!player)
36 return;
37
38 vector playerPos = player.GetPosition();
40
41 GetGame().GetObjectsAtPosition(playerPos, LOOKUP_RADIUS, nearestObjects, null);
42
45
47 {
49 if (ent && ent.IsUniversalTemperatureSource() && ent != player)
50 {
51 uts = ent.GetUniversalTemperatureSource();
53 utsd.AddHeader(ent.GetType());
54 utsd.Add("position", uts.GetPosition().ToString(false));
55 utsd.Add("fullrange", uts.GetFullRange().ToString());
56 utsd.Add("maxrange", uts.GetMaxRange().ToString());
57 utsd.Add("temperature", uts.GetTemperature().ToString());
58 utsd.Add("temperatureraw", uts.GetTemperatureRaw().ToString());
59 utsd.Commit();
60
62 }
63 }
64
65 if (player.GetItemInHands() && player.GetItemInHands().IsUniversalTemperatureSource())
66 {
67 uts = player.GetItemInHands().GetUniversalTemperatureSource();
69 utsd.AddHeader(player.GetItemInHands().GetType());
70 utsd.Add("position", uts.GetPosition().ToString(false));
71 utsd.Add("fullrange", uts.GetFullRange().ToString());
72 utsd.Add("maxrange", uts.GetMaxRange().ToString());
73 utsd.Add("temperature", uts.GetTemperature().ToString());
74 utsd.Add("temperatureraw", uts.GetTemperatureRaw().ToString());
75 utsd.Commit();
76
78 }
79 }

References GetGame().

Referenced by SendDebug().

◆ GetAgentAntiboticsResistance()

float PluginBase::GetAgentAntiboticsResistance ( int agent_id)
inlineprotected

Definition at line 110 of file PluginTransmissionAgents.c.

111 {
112 if (!m_AgentList.Get(agent_id)) return 0;
113 return m_AgentList.Get(agent_id).GetAntiboticsResistance();
114 }

◆ GetAgentAntiboticsResistanceEx()

float PluginBase::GetAgentAntiboticsResistanceEx ( int agent_id,
PlayerBase player )
inlineprotected

Definition at line 117 of file PluginTransmissionAgents.c.

118 {
119 if (!m_AgentList.Get(agent_id)) return 0;
120 return m_AgentList.Get(agent_id).GetAntibioticsResistanceEx(player);
121 }

◆ GetAgentDieOffSpeedEx()

float PluginBase::GetAgentDieOffSpeedEx ( int agent_id,
PlayerBase player )
inlineprotected

Definition at line 91 of file PluginTransmissionAgents.c.

92 {
93 if (!m_AgentList.Get(agent_id)) return true;
94 return m_AgentList.Get(agent_id).GetDieOffSpeedEx(player);
95 }

◆ GetAgentDigestibility()

float PluginBase::GetAgentDigestibility ( int agent_id)
inlineprotected

Definition at line 148 of file PluginTransmissionAgents.c.

149 {
150 if (!m_AgentList.Get(agent_id))
151 return 0;
152 return m_AgentList.Get(agent_id).GetDigestibility();
153 }

◆ GetAgentInvasibility()

float PluginBase::GetAgentInvasibility ( int agent_id)
inlineprotected

Definition at line 140 of file PluginTransmissionAgents.c.

141 {
142 if (!m_AgentList.Get(agent_id))
143 return 0;
144 return m_AgentList.Get(agent_id).GetInvasibility();
145 }

◆ GetAgentInvasibilityEx()

float PluginBase::GetAgentInvasibilityEx ( int agent_id,
PlayerBase player )
inlineprotected

Definition at line 103 of file PluginTransmissionAgents.c.

104 {
105 if (!m_AgentList.Get(agent_id)) return true;
106 return m_AgentList.Get(agent_id).GetInvasibilityEx(player);
107 }

◆ GetAgentList()

map< int, ref AgentBase > PluginBase::GetAgentList ( )
inlineprivate

Definition at line 46 of file PluginTransmissionAgents.c.

47 {
48 return m_AgentList;
49 }

References m_AgentList.

◆ GetAgentMaxCount()

static int PluginBase::GetAgentMaxCount ( int agent_id)
inlinestaticprotected

Definition at line 169 of file PluginTransmissionAgents.c.

170 {
171 if (!m_AgentList.Get(agent_id)) return 0;
172 return m_AgentList.Get(agent_id).GetMaxCount();
173 }

◆ GetAgentPotencyEx()

EStatLevels PluginBase::GetAgentPotencyEx ( int agent_id,
PlayerBase player )
inlineprotected

Definition at line 97 of file PluginTransmissionAgents.c.

98 {
99 if (!m_AgentList.Get(agent_id)) return true;
100 return m_AgentList.Get(agent_id).GetPotencyEx(player);
101 }

◆ GetAgentTransferabilityAirOut()

float PluginBase::GetAgentTransferabilityAirOut ( int agent_id)
inlineprotected

Definition at line 129 of file PluginTransmissionAgents.c.

130 {
131 if (!m_AgentList.Get(agent_id)) return 0;
132 return m_AgentList.Get(agent_id).GetTransferabilityAirOut();
133 }

Referenced by CalculateAgentsToTransmit(), and DetermineChanceToTransmit().

◆ GetAgentTransferabilityIn()

float PluginBase::GetAgentTransferabilityIn ( int agent_id)
inlineprotected

Definition at line 77 of file PluginTransmissionAgents.c.

78 {
79 if (!m_AgentList.Get(agent_id)) return 0;
80 return m_AgentList.Get(agent_id).GetTransferabilityIn();
81 }

Referenced by CalculateAgentsToTransmit(), and DetermineChanceToTransmit().

◆ GetAgentTransferabilityOut()

float PluginBase::GetAgentTransferabilityOut ( int agent_id)
inlineprotected

Definition at line 123 of file PluginTransmissionAgents.c.

124 {
125 if (!m_AgentList.Get(agent_id)) return 0;
126 return m_AgentList.Get(agent_id).GetTransferabilityOut();
127 }

Referenced by CalculateAgentsToTransmit(), and DetermineChanceToTransmit().

◆ GetBaseClasses()

string PluginBase::GetBaseClasses ( string path,
string item )
inlineprivate

Definition at line 478 of file PluginConfigViewer.c.

479 {
480 string adjustedPath = path;
481 bool run = true;
483 resultArr.Insert(item);
484 while (run)
485 {
486 //Print("checking for path:'" + adjustedPath +"'");
487 string baseClass = "";
488 run = GetGame().ConfigGetBaseName(adjustedPath, baseClass);
489 if (baseClass)
490 {
492 adjustedPath.Split(" ", strs);
493 strs.Remove(strs.Count() - 1);
494 strs.Insert(baseClass);
495
496 adjustedPath = string.Join(" ", strs);
497 resultArr.Insert(baseClass);
498 if (adjustedPath == path)
499 break;
500 }
501
502 }
503 string result;
504 resultArr.Invert();
505 foreach (int i, string str: resultArr)
506 {
507 if (i != 0)
508 result += " >> " + str;
509 else
510 result += str;
511 }
512
513 return result;
514 }
array< string > TStringArray
Definition EnScript.c:666

References GetGame(), and path.

◆ GetBaseClassPath()

string PluginBase::GetBaseClassPath ( string config_class_path,
string class_path,
string config_class )
inlineprivate

Definition at line 38 of file PluginConfigViewer.c.

39 {
40 if (class_path == "")
41 return "";
42
43 int start = config_class_path.Length();
44 int count = class_path.Length() - start;
46
48 GetGame().ConfigGetFullPath(config_class_path, full_path);
49
50 if (full_path.Count() > 1 && class_path_without_config_class != "")
52 else
53 return "";
54 }
string GetBaseClassPathRecursive(string config_class_path, string class_path, string config_class)
string GetOnlyChildPath(string config_class_path, string class_path)

References GetBaseClassPathRecursive(), GetGame(), and GetOnlyChildPath().

Referenced by GetConfigRecursive().

◆ GetBaseClassPathCombined()

string PluginBase::GetBaseClassPathCombined ( string child_path,
string base_class )
inlineprivate

Definition at line 56 of file PluginConfigViewer.c.

57 {
58 int current = -1;
59 int last = 0;
60
61 while (true)
62 {
63 current = child_path.IndexOfFrom(last, " ");
64 if (current > -1)
65 last = current + 1;
66 else
67 break;
68 }
69
70 string result = child_path.Substring(0, last) + base_class;
71 return result;
72 }

Referenced by GetConfigRecursive().

◆ GetBaseClassPathRecursive()

string PluginBase::GetBaseClassPathRecursive ( string config_class_path,
string class_path,
string config_class )
inlineprivate

Definition at line 74 of file PluginConfigViewer.c.

75 {
77 return config_class_path + " " + class_path;
78 else
79 {
81 GetGame().ConfigGetFullPath(config_class_path, full_path);
82
83 if (full_path.Count() > 1)
85 else
86 return "";
87 }
88 }

References ContainsFirstClass(), GetBaseClassPathRecursive(), and GetGame().

Referenced by GetBaseClassPath(), and GetBaseClassPathRecursive().

◆ GetConfig()

TStringArray PluginBase::GetConfig ( string class_path,
string filter_char )
inlineprivate

Definition at line 276 of file PluginConfigViewer.c.

277 {
278 int i;
280
281 if (class_path != "")
282 {
284
286 class_path.Split(" ", path_nodes);
287
288 if (path_nodes.Count() >= 3)
289 {
290 string c_class_path = path_nodes.Get(0) + " " + path_nodes.Get(1) + " " + path_nodes.Get(2);
291
293 string config_class = path_nodes.Get(1);
294 string class_name = path_nodes.Get(2);
295
297
302 string tabs = MakeTabs(1);
303 string tabs_inherited = MakeTabs(1, true);
304 string check_tabs = MakeTabs(path_nodes.Count() - 1, true);
305
306 nested_start.Insert(":!");
307 nested_end.Insert(":#");
308 nested_inherited_start.Insert(":!");
309 nested_inherited_end.Insert(":#");
310
311 string last_node = filter_char + MakeTabs(nested_start.Count()) + "!";
312
313 if (path_nodes.Count() == 3)
314 last_node = filter_char + MakeTabs(1) + "!";
315 else
316 {
317 for (i = 1; i < path_nodes.Count() - 2; i++)
318 {
319 tabs = MakeTabs(i);
320 tabs_inherited = MakeTabs(i, true);
321
322 string path_node = path_nodes.Get(i + 2);
323 path_node.ToLower();
324
325 nested_start.Insert(":" + tabs + "!" + path_node);
326 nested_end.Insert(":" + tabs + "#" + path_node);
327 nested_inherited_start.Insert(":" + tabs_inherited + "!" + path_node);
328 nested_inherited_end.Insert(":" + tabs_inherited + "#" + path_node);
329 }
330
331 last_node = filter_char + MakeTabs(i) + "!";
332 }
333
334 int current_nest = 0;
335
336 for (i = 0; i < result.Count(); i++)
337 {
338 string current = result.Get(i);
339 string current_lower = current;
340 current_lower.ToLower();
341
342 int len_current = current.Length();
343
344 if (current_nest < nested_start.Count())
345 {
346 int len_start = nested_start.Get(current_nest).Length();
347
348 if (len_current >= len_start)
349 {
351
352 if (current_nest == 0)
353 prefix_start = current_lower.Substring(0, len_start);
354
356 {
357 current_nest++;
358 continue;
359 }
360 }
361 }
362
363 if (current_nest >= 1)
364 {
365 int len_end = nested_end.Get(current_nest - 1).Length();
366
367 if (len_current >= len_end)
368 {
369 string prefix_end = current_lower;
370
371 if (current_nest == 0)
372 prefix_start = current_lower.Substring(0, len_start);
373
375 current_nest--;
376 }
377 }
378
379 if (current_nest == nested_start.Count())
380 {
381 string first_char = current.Substring(0, 1);
382
383 if (first_char == filter_char)
384 {
385 int bang_pos = current.IndexOf("!");
386
387 if (bang_pos > -1)
388 {
389 int len_last_node = last_node.Length();
390
392 {
393 string prefix_current = current_lower.Substring(0, len_last_node);
394
396 filtered.Insert(current.Substring(bang_pos + 1, current.Length() - (bang_pos + 1)));
397 }
398 }
399 }
400 }
401 }
402
404
406
407 for (i = 0; i < filtered.Count(); i++)
408 {
409 string c = filtered.Get(i);
410 string lower_c = c;
411 lower_c.ToLower();
412
413 if (without_duplications.Find(lower_c) < 0)
414 {
416
417 if (lower_c != c)
418 lowered.Set(lower_c, c);
419 }
420 }
421
422 module_dev.SortStringArray(without_duplications);
423
424 for (i = 0; i < without_duplications.Count(); i++)
425 {
426 string cc = without_duplications.Get(i);
427
428 if (lowered.Contains(cc))
429 cc = lowered.Get(cc);
430
431 int tilda_index = cc.IndexOf("~");
432 if (tilda_index > -1)
433 {
434 string spaces = " ";
435 if (cc.IndexOf("~}") > -1)
436 spaces = "";
437 cc = spaces + cc.Substring(tilda_index + 1, cc.Length() - (tilda_index + 1));
438 }
439
441 }
442
444 }
445 else if (filter_char == ":")
446 {
447 int cnt_config = GetGame().ConfigGetChildrenCount(class_path);
448
449 for (i = 0; i < cnt_config; i++)
450 {
451 string config_name = "";
452 GetGame().ConfigGetChildName(class_path, i, config_name);
453 filtered.Insert(config_name);
454 }
455
456 module_dev.SortStringArray(filtered);
457 }
458 }
459 else if (filter_char == ":")
460 {
461 filtered.Insert("configfile");
462 filtered.Insert("missionconfigfile");
463 }
464
465 return filtered;
466 }
class OptionSelectorMultistate extends OptionSelector class_name
PluginBase GetPlugin(typename plugin_type)
void PluginDeveloper()
TStringArray GetConfigRecursive(string path, string name, string config_class_path, string config_class, local array< string > overridden, int depth=0, local bool check_base_class_of_class=false)
string MakeTabs(int count, bool inheritance=false)

References class_name, GetConfigRecursive(), GetGame(), GetPlugin(), and MakeTabs().

Referenced by GetConfigHierarchy(), and GetConfigVariables().

◆ GetConfigHierarchy()

TStringArray PluginBase::GetConfigHierarchy ( string class_path)
inlineprivate

Definition at line 473 of file PluginConfigViewer.c.

474 {
475 return GetConfig(class_path, ":");
476 }
TStringArray GetConfig(string class_path, string filter_char)

References GetConfig().

◆ GetConfigRecursive()

TStringArray PluginBase::GetConfigRecursive ( string path,
string name,
string config_class_path,
string config_class,
local array< string > overridden,
int depth = 0,
local bool check_base_class_of_class = false )
inlineprivate

Definition at line 123 of file PluginConfigViewer.c.

124 {
125 string tabs = MakeTabs(depth + 1);
126 string child_path = path;
127 int count = GetGame().ConfigGetChildrenCount(child_path);
128 int i = 0;
129
130 bool name_printed = false;
131
133
134 for (i = 0; i < count; i++)
135 {
136 string child_name = "";
137 GetGame().ConfigGetChildName(child_path, i, child_name);
138 string c_child_path = child_path + " " + child_name;
139
141 child_name_lower.ToLower();
142
143 if (overridden.Find(child_name_lower) == -1)
144 {
145 if (!name_printed)
146 {
147 result.Insert(":" + MakeTabs(depth, check_base_class_of_class) + "!" + name);
148 name_printed = true;
149 }
151
152 int type = GetGame().ConfigGetType(c_child_path);
153
154 if (type != CT_CLASS)
155 {
156 if (type != CT_ARRAY)
157 result.Insert("-" + tabs + "!" + child_name + " = " + GetGame().ConfigGetTextOut(c_child_path));
158 else
159 {
160 result.Insert("-" + tabs + "!" + child_name + "[] = {");
161
163 GetGame().ConfigGetTextArray(c_child_path, strs);
164 string tabs_array = MakeTabs(depth + 2);
165 int j;
166 for (j = 0; j < strs.Count(); j++)
167 result.Insert("-" + tabs + "!" + child_name + "[]" + j.ToStringLen(6) + "~" + strs.Get(j) + ",");
168
169 result.Insert("-" + tabs + "!" + child_name + "[]" + j.ToStringLen(6) + "~}");
170 }
171 }
172 else
173 {
175
176 if (GetGame().ConfigGetChildrenCount(c_child_path) > 0)
177 {
179 result.InsertAll(config1);
180 }
181 else
182 result.Insert(":" + tabs + "!" + child_name);
183
186 string c_child_name = child_name;
187
188 int cc = 0;
189
190 while (true)
191 {
192 string base_class = "";
193
194 GetGame().ConfigGetBaseName(cc_child_path, base_class);
195
196 int start = c_config_class_path.Length() + 1;
197 int len = cc_child_path.Length();
198 len -= c_config_class_path.Length() + c_child_name.Length();
199 len -= 2;
200
201 if (base_class != "")
202 {
203 string only_child_path = "";
204 if (len < 0)
206 else
207 only_child_path = cc_child_path.Substring(start, len) + " " + base_class;
208
211
212 if (base_class_path != "")
213 {
215 result.InsertAll(config2);
216 }
217 else
218 {
220 result.InsertAll(config3);
221
222 break;
223 }
224
227 c_config_class_path = cc_child_path.Substring(0, cc_child_path.Length() - only_child_path.Length() - 1);
228 }
229 else
230 break;
231 }
232 }
233 }
234 }
235
236 if (name_printed)
237 result.Insert(":" + MakeTabs(depth, check_base_class_of_class) + "#" + name);
238
240 {
242 GetGame().ConfigGetFullPath(child_path, full_path);
243
244 if (full_path.Count() > 1)
245 {
247 result.InsertAll(config4);
248 }
249 }
250 else
251 {
252 string class_base_class = "";
253 GetGame().ConfigGetBaseName(child_path, class_base_class);
254
255 if (class_base_class != "")
256 {
259
260 if (cc_base_child_path != "")
261 {
263 result.InsertAll(config5);
264 }
265 else
266 {
268 result.InsertAll(config6);
269 }
270 }
271 }
272
273 return result;
274 }
string GetBaseClassPathCombined(string child_path, string base_class)
string GetBaseClassPath(string config_class_path, string class_path, string config_class)

References GetBaseClassPath(), GetBaseClassPathCombined(), GetConfigRecursive(), GetGame(), MakeTabs(), name, and path.

Referenced by GetConfig(), and GetConfigRecursive().

◆ GetConfigVariables()

TStringArray PluginBase::GetConfigVariables ( string class_path)
inlineprivate

Definition at line 468 of file PluginConfigViewer.c.

469 {
470 return GetConfig(class_path, "-");
471 }

References GetConfig().

◆ GetDieOffSpeed()

float PluginBase::GetDieOffSpeed ( int agent_id)
inlineprotected

Definition at line 155 of file PluginTransmissionAgents.c.

156 {
157 if (!m_AgentList.Get(agent_id))
158 return 0;
159 return m_AgentList.Get(agent_id).GetDieOffSpeed();
160 }

◆ GetDrawSelection()

bool PluginBase::GetDrawSelection ( )
inlineprivate

Definition at line 668 of file PluginSceneManager.c.

669 {
670 return m_ModuleConfigDebugProfile.GetSceneEditorDrawSelection();
671 }
PluginConfigDebugProfile m_ModuleConfigDebugProfile

◆ GetFileContent()

TStringArray PluginBase::GetFileContent ( )
inlineprivate

Definition at line 138 of file PluginFileHandler.c.

139 {
140 return m_FileContent;
141 }

◆ GetFileName()

string PluginBase::GetFileName ( )
inlineprivate

Definition at line 42 of file PluginFileHandler.c.

43 {
44 return string.Empty;
45 }

References string::Empty.

◆ GetHitMessage()

string PluginBase::GetHitMessage ( TotalDamageResult damageResult,
int component,
string zone,
string ammo )
inlineprotected

Definition at line 99 of file PluginAdminLog.c.

100 {
101 if (damageResult)
102 {
103 float dmg = damageResult.GetHighestDamage("Health");
104 return " into " + zone + "(" + component.ToString() + ") for " + dmg.ToString() + " damage (" + ammo + ")";
105 }
106 else // block
107 return " into Block" + "(" + component.ToString() + ") for 0 damage ";
108 }
class BoxCollidingParams component
ComponentInfo for BoxCollidingResult.

References component.

Referenced by PlayerHitBy().

◆ GetID()

int PluginBase::GetID ( string name)
inlineprivate

Definition at line 32 of file PluginVariables.c.

33 {
34 return m_Variables.GetKeyByValue(name);
35 }
ref map< int, string > m_Variables

References name.

◆ GetInstance() [1/3]

static PluginCameraTools PluginBase::GetInstance ( )
inlinestaticprotected

Definition at line 11 of file PluginCameraTools.c.

12 {
13 return m_Instance;
14 }
static PluginCameraTools m_Instance

References m_Instance.

◆ GetInstance() [2/3]

static PluginDeveloper PluginBase::GetInstance ( )
inlinestaticprotected

Definition at line 8 of file PluginDeveloper.c.

9 {
11 }

References GetPlugin().

◆ GetInstance() [3/3]

static PluginSceneManager PluginBase::GetInstance ( )
inlinestaticprivate

Definition at line 34 of file PluginSceneManager.c.

35 {
37 }
void PluginSceneManager()

References GetPlugin().

◆ GetKeyBindings()

array< ref KeyBinding > PluginBase::GetKeyBindings ( )
inlineprivate

Definition at line 260 of file PluginKeyBinding.c.

261 {
262 return m_KeyBindings;
263 }
ref array< ref KeyBinding > m_KeyBindings

◆ GetKitRepairCost()

float PluginBase::GetKitRepairCost ( ItemBase repair_kit,
Object item )
inlineprivate

Definition at line 119 of file PluginRepairing.c.

120 {
123
124 item.ConfigGetIntArray("repairableWithKits", allowedRepairKitTypes);
125 item.ConfigGetFloatArray("repairCosts", repairKitCosts);
126
127 int repairKitType = repair_kit.ConfigGetInt("repairKitType");
128
129 foreach (int i, int allowedKitType : allowedRepairKitTypes)
130 {
132 return repairKitCosts.Get(i);
133 }
134
135 return 0;
136 }

◆ GetLoadedScene()

SceneData PluginBase::GetLoadedScene ( )
inlineprivate

Definition at line 913 of file PluginSceneManager.c.

914 {
915 return m_SceneData;
916 }

◆ GetLoadPlayerPos()

bool PluginBase::GetLoadPlayerPos ( )
inlineprivate

Definition at line 684 of file PluginSceneManager.c.

685 {
686 return m_ModuleConfigDebugProfile.GetSceneEditorLoadPlayerPos();
687 }

◆ GetModuleName()

string PluginBase::GetModuleName ( )
inlineprivate

Definition at line 15 of file PluginBase.c.

16 {
17 return ClassName();
18 }

Referenced by GetModuleType(), and Log().

◆ GetModuleType()

PluginBase::GetModuleType ( )
inlineprivate

Definition at line 20 of file PluginBase.c.

21 {
22 return GetModuleName().ToType();
23 }
string GetModuleName()
Definition PluginBase.c:15
proto native ToType()
Returns internal type representation. Can be used in runtime, or cached in variables and used for fas...

References GetModuleName(), and string::ToType().

◆ GetMouseBindings()

array< ref MouseBinding > PluginBase::GetMouseBindings ( )
inlineprivate

Definition at line 268 of file PluginKeyBinding.c.

269 {
270 return m_MouseBindings;
271 }
ref array< ref MouseBinding > m_MouseBindings

◆ GetMouseButtonInfo()

MouseButtonInfo PluginBase::GetMouseButtonInfo ( int button)
inlineprotected

Definition at line 347 of file PluginKeyBinding.c.

348 {
349 for (int i = 0; i < m_MouseButtons.Count(); ++i)
350 {
352
353 if (info.GetButtonID() == button)
354 return info;
355 }
356 return NULL;
357 }
ref array< ref MouseButtonInfo > m_MouseButtons

◆ GetMousePositionInScene()

vector PluginBase::GetMousePositionInScene ( )
inlineprivate

Definition at line 1171 of file PluginSceneManager.c.

1172 {
1173 vector dir = GetGame().GetPointerDirection();
1174 vector from = FreeDebugCamera.GetInstance().GetPosition();
1175 vector to = from + (dir * 10000);
1179
1181 return contact_pos;
1182
1183 return "0 0 0";
1184 }

References GetGame(), and DayZPhysics::RaycastRV().

◆ GetName()

string PluginBase::GetName ( int id)
inlineprivate

Definition at line 27 of file PluginVariables.c.

28 {
29 return m_Variables.Get(id);
30 }

◆ GetNameByID()

static string PluginBase::GetNameByID ( int agent_id)
inlinestaticprivate

Definition at line 61 of file PluginTransmissionAgents.c.

62 {
63 return m_AgentList.Get(agent_id).GetName();
64 }

◆ GetOnlyChildPath()

string PluginBase::GetOnlyChildPath ( string config_class_path,
string class_path )
inlineprivate

Definition at line 22 of file PluginConfigViewer.c.

23 {
25 int class_path_len = class_path.Length();
26
28 {
31
32 return class_path.Substring(start, count).Trim();
33 }
34 else
35 return "";
36 }

Referenced by GetBaseClassPath().

◆ GetPlantMaterial()

PlantMaterialHealth PluginBase::GetPlantMaterial ( string plant_type)
inlineprivate

Definition at line 97 of file PluginHorticulture.c.

98 {
99 if (m_PlantMaterials.Contains(plant_type))
100 return m_PlantMaterials.Get(plant_type);
101
102 return NULL;
103 }
ref map< string, ref PlantMaterialHealth > m_PlantMaterials

◆ GetPlantType()

string PluginBase::GetPlantType ( Object obj)
inlineprivate

Definition at line 66 of file PluginHorticulture.c.

67 {
68 string seed_type = obj.GetType();
69
70 string plant_type = "";
71 GetGame().ConfigGetText("cfgVehicles " + seed_type + " Horticulture PlantType", plant_type);
72
73 return plant_type;
74 }

References GetGame().

◆ GetPlayerListTimer()

static int PluginBase::GetPlayerListTimer ( )
inlinestaticprotected

Definition at line 30 of file PluginAdminLog.c.

31 {
32 return 300; // seconds
33 }

◆ GetPlayerPrefix()

string PluginBase::GetPlayerPrefix ( PlayerBase player,
PlayerIdentity identity )
inlineprotected

Definition at line 67 of file PluginAdminLog.c.

68 {
69
70 m_Position = player.GetPosition();
72
73 for (int i = 0; i < 3; i++) // trim position precision
74 {
76 if (m_DotIndex != -1)
78 }
79
80 if (identity) // return partial message even if it fails to fetch identity
81 {
82 //return "Player \"" + "Unknown/Dead Entity" + "\" (id=" + "Unknown" + " pos=<" + m_PosArray[0] + ", " + m_PosArray[1] + ", " + m_PosArray[2] + ">)";
83 m_PlayerName = "\"" + identity.GetName() + "\"";
84 m_Pid = identity.GetId();
85 }
86 else
87 {
88 m_PlayerName = player.GetCachedName();
89 m_Pid = player.GetCachedID();
90 }
91
92
93 if (!player.IsAlive())
94 m_PlayerName = m_PlayerName + " (DEAD)";
95
96 return "Player " + m_PlayerName + " (id=" + m_Pid + " pos=<" + m_PosArray[0] + ", " + m_PosArray[1] + ", " + m_PosArray[2] + ">)";
97 }
vector m_Position
string m_PosArray[3]
string m_PlayerName
proto string Substring(int start, int len)
Substring of 'str' from 'start' position 'len' number of characters.
proto native int IndexOf(string sample)
Finds 'sample' in 'str'. Returns -1 when not found.

References string::IndexOf(), m_Position, string::Substring(), and vector::ToString().

Referenced by BleedingOut(), OnContinouousAction(), OnPlacementComplete(), PlayerHitBy(), PlayerKilled(), PlayerList(), Suicide(), TotemFlagChange(), UnconStart(), and UnconStop().

◆ GetPotency()

EStatLevels PluginBase::GetPotency ( int agent_id)
inlineprotected

Definition at line 162 of file PluginTransmissionAgents.c.

163 {
164 if (!m_AgentList.Get(agent_id))
165 return 0;
166 return m_AgentList.Get(agent_id).GetPotency();
167 }

◆ GetProtectionLevel()

float PluginBase::GetProtectionLevel ( int type,
int slot,
Man player )
inlineprotected

Definition at line 340 of file PluginTransmissionAgents.c.

341 {
342 return GetProtectionLevelEx(type, slot, player);
343 }
static float GetProtectionLevelEx(int type, int slot, Man player, bool consider_filter=true, int system=0)

References GetProtectionLevelEx().

Referenced by TransmitAgentsEx().

◆ GetProtectionLevelEx()

static float PluginBase::GetProtectionLevelEx ( int type,
int slot,
Man player,
bool consider_filter = true,
int system = 0 )
inlinestaticprotected

Definition at line 329 of file PluginTransmissionAgents.c.

330 {
331 ItemBase attachment = ItemBase.Cast(player.GetInventory().FindAttachment(slot));
332
333 if (!attachment)
334 return 0;
335
336 return attachment.GetProtectionLevel(type, consider_filter, system);
337
338 }

Referenced by GetProtectionLevel().

◆ GetRotationAngle()

int PluginBase::GetRotationAngle ( )
inlineprivate

Definition at line 700 of file PluginSceneManager.c.

701 {
702 return m_ModuleConfigDebugProfile.GetSceneEditorRotationAngle();
703 }

◆ GetRPCModifierID()

int PluginBase::GetRPCModifierID ( ParamsReadContext ctx)
inlineprivate

Definition at line 349 of file PluginDeveloperSync.c.

350 {
351 Param1<int> p = new Param1<int>(0);
352 if (ctx.Read(p))
353 return p.param1;
354
355 return 0;
356 }

Referenced by OnRPC().

◆ GetRPCModifierLock()

void PluginBase::GetRPCModifierLock ( ParamsReadContext ctx,
out int id,
out bool lock )
inlineprivate

Definition at line 359 of file PluginDeveloperSync.c.

360 {
361 Param2<int, bool> p = new Param2<int, bool>(0, false);
362 if (ctx.Read(p))
363 {
364 id = p.param1;
365 lock = p.param2;
366 }
367 }

Referenced by OnRPC().

◆ GetRPCUpdateState()

bool PluginBase::GetRPCUpdateState ( ParamsReadContext ctx)
inlineprivate

Definition at line 339 of file PluginDeveloperSync.c.

340 {
341 Param1<bool> p = new Param1<bool>(0);
342 if (ctx.Read(p))
343 return p.param1;
344
345 return false;
346 }

Referenced by OnRPC(), and OnRPCTemp().

◆ GetSceneList()

TStringArray PluginBase::GetSceneList ( )
inlineprivate

Definition at line 1007 of file PluginSceneManager.c.

1008 {
1009 return m_ModuleConfigScene.GetSceneList();
1010 }
PluginConfigScene m_ModuleConfigScene

◆ GetSceneObjectByEntity()

SceneObject PluginBase::GetSceneObjectByEntity ( EntityAI entity)
inlineprivate

Definition at line 985 of file PluginSceneManager.c.

986 {
988
989 if (scene_objects != NULL)
990 {
991 for (int i = 0; i <= scene_objects.Count(); ++i)
992 {
993 SceneObject obj = scene_objects.Get(i);
994 EntityAI e = obj.GetObject();
995
996 if (e == entity)
997 return obj;
998 }
999 }
1000
1001 return NULL;
1002 }

References SceneObject::GetObject().

◆ GetSceneObjectByIndex()

SceneObject PluginBase::GetSceneObjectByIndex ( int index)
inlineprivate

Definition at line 969 of file PluginSceneManager.c.

970 {
972
973 if (scene_objects != NULL)
974 {
975 if (index > -1 && index < scene_objects.Count())
976 return scene_objects.Get(index);
977 }
978
979 return NULL;
980 }

◆ GetSceneObjects()

array< ref SceneObject > PluginBase::GetSceneObjects ( )
inlineprivate

Definition at line 936 of file PluginSceneManager.c.

937 {
938 if (m_SceneData)
939 return m_SceneData.GetSceneObjects();
940
941 return NULL;
942 }

◆ GetSceneObjectsAll()

array< ref SceneObject > PluginBase::GetSceneObjectsAll ( )
inlineprivate

Definition at line 958 of file PluginSceneManager.c.

959 {
960 if (m_SceneData)
961 return m_SceneData.GetSceneObjectsAll();
962
963 return NULL;
964 }

◆ GetScenePlayers()

array< ref ScenePlayer > PluginBase::GetScenePlayers ( )
inlineprivate

Definition at line 947 of file PluginSceneManager.c.

948 {
949 if (m_SceneData)
950 return m_SceneData.GetScenePlayers();
951
952 return NULL;
953 }

◆ GetSelectedSceneObject()

SceneObject PluginBase::GetSelectedSceneObject ( )
inlineprivate

Definition at line 457 of file PluginSceneManager.c.

458 {
459 return m_SelectedObject;
460 }

References m_SelectedObject.

◆ GetSelectedSceneObjectIndex()

int PluginBase::GetSelectedSceneObjectIndex ( )
inlineprivate

Definition at line 921 of file PluginSceneManager.c.

922 {
924 for (int i = 0; i < scene_objects.Count(); i++)
925 {
927 return i;
928 }
929
930 return -1;
931 }

◆ GetSimpleAgentList()

map< int, string > PluginBase::GetSimpleAgentList ( )
inlineprivate

Definition at line 51 of file PluginTransmissionAgents.c.

52 {
53 if (!m_IsConstructed)
54 {
56 m_IsConstructed = true;
57 }
58 return m_SimpleAgentList;
59 }

References ConstructSimpleAgentList(), and m_SimpleAgentList.

◆ GetSubFolderName()

string PluginBase::GetSubFolderName ( )
inlineprivate

Definition at line 47 of file PluginFileHandler.c.

48 {
49 return string.Empty;
50 }

References string::Empty.

◆ GetSurfaceFertility()

float PluginBase::GetSurfaceFertility ( string surface_type)
inlineprivate

Definition at line 76 of file PluginHorticulture.c.

77 {
78 float fertility = 0.8;
79 if (surface_type == "hlina" || surface_type == "CRGrass1" || surface_type == "CRGrass2" || surface_type == "CRForest1" || surface_type == "CRForest2" || surface_type == "CRGrit1")
80 fertility = 0.8;
81
82 return fertility;
83 }

◆ GetWatching()

bool PluginBase::GetWatching ( )
inlineprivate

Definition at line 34 of file PluginRemotePlayerDebugServer.c.

35 {
36 return m_Watching;
37 }

◆ GiveWormsToPlayer()

bool PluginBase::GiveWormsToPlayer ( PlayerBase player,
float chance )
inlineprivate

Definition at line 85 of file PluginHorticulture.c.

86 {
87 if (Math.RandomFloat01() <= chance)
88 {
89 ItemBase item = ItemBase.Cast(player.GetHumanInventory().CreateInInventory("Food_Worm"));
90 item.SetQuantity(1);
91 return true;
92 }
93
94 return false;
95 }

References Math::RandomFloat01().

◆ GrowDuringAntibioticsAttack()

bool PluginBase::GrowDuringAntibioticsAttack ( int agent_id,
PlayerBase player )
inlineprotected

Definition at line 84 of file PluginTransmissionAgents.c.

85 {
86 if (!m_AgentList.Get(agent_id)) return true;
87 return m_AgentList.Get(agent_id).GrowDuringAntibioticsAttack(player);
88 }

◆ HandlePresetSpawn()

void PluginBase::HandlePresetSpawn ( PlayerBase player,
string presetName,
EntityAI target )
inlineprotected

Definition at line 194 of file PluginDeveloper.c.

195 {
196#ifdef DEVELOPER
197
199
200 if (target)
202 if (!targetPlayer)
203 return;
204
205 targetPlayer.m_PresetSpawned = true;
206 string class_name = presetName + "_Preset";
207 typename type = class_name.ToType();
208
209 if (type)
210 {
211 PresetSpawnBase presetObj = PresetSpawnBase.Cast(type.Spawn());
212
213 if (presetObj)
215 }
216
217#endif
218 }

References class_name.

Referenced by OnRPC().

◆ HandleSetTime()

void PluginBase::HandleSetTime ( PlayerBase player,
ParamsReadContext ctx )
inlineprotected

Definition at line 163 of file PluginDeveloper.c.

164 {
165#ifdef DEVELOPER
166
168
169 if (ctx.Read(p5))
170 {
171 //float time01 = p5.param4 / 100;
172 //int time_minutes = Math.Lerp(0, 24*60, time01 );
173
174 int year = p5.param1;
175 int month = p5.param2;
176 int day = p5.param3;
177 int hour = p5.param4;
178 int minute = p5.param5;
179
180
181 GetGame().GetWorld().SetDate(year, month, day, hour, minute);
182 /*
183 Debug.Log("year:" + year);
184 Debug.Log("month:" + month);
185 Debug.Log("day:" + day);
186 Debug.Log("hour:" + hour);
187 Debug.Log("minute:" + minute);
188 */
189 }
190
191#endif
192 }

References GetGame().

Referenced by OnRPC().

◆ Hide() [1/3]

void PluginBase::Hide ( )
inlineprivate

Definition at line 177 of file PluginDayZInfectedDebug.c.

178 {
179 ShowWidgets(false);
180 m_IsActive = false;
181
182 GetUApi().UpdateControls();
183
185 }
proto native UAInputAPI GetUApi()
void ShowWidgets(bool show)
ref Timer m_TickTimer
status refresh timer

References GetUApi(), m_IsActive, m_TickTimer, and ShowWidgets().

Referenced by SetDebugShowMode(), ToggleDebugWindowEventOld(), ToggleDebugWindowEventP(), ToggleDebugWindowSetMode(), and ToggleDebugWindowSetMode().

◆ Hide() [2/3]

void PluginBase::Hide ( )
inlineprivate

Definition at line 81 of file PluginDrawCheckerboard.c.

82 {
83 ShowWidgets(false);
84 m_IsActive = false;
85 }

References m_IsActive, and ShowWidgets().

◆ Hide() [3/3]

void PluginBase::Hide ( )
inlineprivate

Definition at line 25 of file PluginSoundDebug.c.

26 {
28 }

References m_TickTimer.

◆ Init() [1/2]

void PluginBase::Init ( )
inlineprivate

Definition at line 34 of file PluginCharPlacement.c.

35 {
36 if (m_Character)
37 m_Character.Delete();
38
39 m_Initialized = true;
40 m_Character = PlayerBase.Cast(GetGame().CreateObject("SurvivorF_Judy", FreeDebugCamera.GetInstance().GetPosition(), false, false/*ai*/));
41
42 FreeDebugCamera.GetInstance().SetFOV(FOV); //default scene FOV
43 m_demoRot = "0 0 0";
44 }
PlayerBase m_Character

References GetGame(), and m_Initialized.

◆ Init() [2/2]

void PluginBase::Init ( )
inlineprivate

Definition at line 14 of file PluginDoorRuler.c.

15 {
16 if (m_Ruler)
17 m_Ruler.Delete();
18
19 m_Initialized = true;
20 m_Ruler = ItemBase.Cast(GetGame().CreateObject("DoorTestCamera", FreeDebugCamera.GetInstance().GetPosition(), false, false/*ai*/));
21 }
ItemBase m_Ruler

References GetGame(), and m_Initialized.

◆ InitAttacks()

void PluginBase::InitAttacks ( )
inlineprotected

Definition at line 449 of file PluginDayZInfectedDebug.c.

450 {
451 m_AttackDescriptors.Insert(new PluginDayZInfectedDebugAttackDesc("Attack Left Light", 0));
452 m_AttackDescriptors.Insert(new PluginDayZInfectedDebugAttackDesc("Attack Right Light", 1));
453 m_AttackDescriptors.Insert(new PluginDayZInfectedDebugAttackDesc("Attack Left Heavy", 2));
454 m_AttackDescriptors.Insert(new PluginDayZInfectedDebugAttackDesc("Attack Right Heavy", 3));
455
456 m_AttackDescriptors.Insert(new PluginDayZInfectedDebugAttackDesc("Crawl Attack", 7));
457 //m_AttackDescriptors.Insert(new PluginDayZInfectedDebugAttackDesc("Crawl Attack Combo", 8));
458
459 //m_AttackDescriptors.Insert(new PluginDayZInfectedDebugAttackDesc("Door Push Attack", 9));
460 //m_AttackDescriptors.Insert(new PluginDayZInfectedDebugAttackDesc("Door Head Attack", 10));
461 //m_AttackDescriptors.Insert(new PluginDayZInfectedDebugAttackDesc("Door Shoulder Attack", 11));
462 //m_AttackDescriptors.Insert(new PluginDayZInfectedDebugAttackDesc("Door LR Attack", 12));
463 //m_AttackDescriptors.Insert(new PluginDayZInfectedDebugAttackDesc("Door Kick Attack", 13));
464 //m_AttackDescriptors.Insert(new PluginDayZInfectedDebugAttackDesc("Door Charge R", 14));
465 //m_AttackDescriptors.Insert(new PluginDayZInfectedDebugAttackDesc("Door Charge L", 15));
466
467 for (int i = 0; i < m_AttackDescriptors.Count(); ++i)
468 m_AttackTypeCB.AddItem(m_AttackDescriptors.Get(i).name);
469 }
class PluginDayZInfectedDebugUIHandler extends ScriptedWidgetEventHandler PluginDayZInfectedDebugAttackDesc(string pName, int pValue)

References PluginDayZInfectedDebugAttackDesc().

Referenced by CreateModuleWidgets().

◆ InitLoad()

void PluginBase::InitLoad ( )
inlineprivate

Definition at line 286 of file PluginSceneManager.c.

287 {
289
290 SceneLoad(PluginMissionConfig.GetInstance().GetSceneEditorName());
291
293
295 }
void ExecuteInitScripts()
void RestoreSceneObjectsLinks()
void SceneLoad(string scene_name)
static PlayerBase PLAYER

References GetGame(), GetPlayer(), and PLAYER.

◆ InitWidgets()

void PluginBase::InitWidgets ( )
inlineprotected

Definition at line 38 of file PluginUniversalTemperatureSourceClient.c.

39 {
40 for (int i = 0; i < MAX_SIMULTANEOUS_UTS; i++)
41 {
42 m_RootWidget[i] = GetGame().GetWorkspace().CreateWidgets("gui/layouts/debug/day_z_debug_remoteinfo.layout");
43 m_StatListWidgets[i] = TextListboxWidget.Cast(m_RootWidget[i].FindAnyWidget("TextListboxWidget0"));
44 m_HeaderWidget[i] = TextWidget.Cast(m_RootWidget[i].FindAnyWidget("TextWidget0"));
45 }
46 }
TextWidget m_HeaderWidget[MAX_SIMULTANEOUS_UTS]
TextListboxWidget m_StatListWidgets[MAX_SIMULTANEOUS_UTS]
proto native Widget FindAnyWidget(string pathname)

References FindAnyWidget(), GetGame(), m_RootWidget, m_StatListWidgets, and MAX_SIMULTANEOUS_UTS.

Referenced by OnInit().

◆ InjectAgentsWithoutPlayer()

void PluginBase::InjectAgentsWithoutPlayer ( EntityAI target,
int agents )
inlineprotected

Definition at line 261 of file PluginTransmissionAgents.c.

262 {
263 if (target.IsItemBase())
264 {
266 ib_target.TransferAgents(agents);
267 }
268 }

Referenced by TransmitAgentsEx().

◆ InjectAgentsWithPlayer()

void PluginBase::InjectAgentsWithPlayer ( EntityAI target,
int agents,
float protection,
int dose_size,
int inject_type )
inlineprotected

will add agents to a given target, using chance of transmission and full dose size if chance succeeds

Definition at line 271 of file PluginTransmissionAgents.c.

272 {
273 if (target && (agents != 0) && target.IsEntityAI())
274 {
276
277 for (int i = 0; i < bit_count; i++)
278 {
281 target.InsertAgent(agent_bit, dose_size);
282 }
283 }
284 }
bool DetermineChanceToTransmit(int agent_id, float protection, int inject_type)
static proto int GetNthBitSet(int value, int n)
returns the the index of n-th bit set in a bit mask counting from the right, for instance,...
static proto float Pow(float v, float power)
Return power of v ^ power.
static proto int GetNumberOfSetBits(int i)
returns the number of bits set in a bitmask i

References DetermineChanceToTransmit(), Math::GetNthBitSet(), Math::GetNumberOfSetBits(), and Math::Pow().

Referenced by TransmitAgentsEx().

◆ InjectAgentsWithPlayerCount()

void PluginBase::InjectAgentsWithPlayerCount ( EntityAI target,
int agents,
float protection,
int dose_size,
int inject_type )
inlineprotected

will add agents to a given target, with no probability, but the dose size is modified by m_TransferabilityOut of the agent

Definition at line 287 of file PluginTransmissionAgents.c.

288 {
289 if (target && (agents != 0) && target.IsEntityAI())
290 {
292
293 for (int i = 0; i < bit_count; i++)
294 {
297 target.InsertAgent(agent_bit, count);
298 }
299 }
300 }
float CalculateAgentsToTransmit(int agent_id, float protection, int dose_size, int inject_type)

References CalculateAgentsToTransmit(), Math::GetNthBitSet(), Math::GetNumberOfSetBits(), and Math::Pow().

Referenced by TransmitAgentsEx().

◆ InjectAgentWithPlayerDose()

float PluginBase::InjectAgentWithPlayerDose ( EntityAI target,
int agent,
float protection,
float dose_size,
int inject_type )
inlineprotected

will add agent to a given target

Definition at line 303 of file PluginTransmissionAgents.c.

304 {
306 {
307 if (count > 0)
308 {
309 target.InsertAgent(agent, count);
310 return count;
311 }
312 }
313 return 0;
314 }

References CalculateAgentsToTransmit().

Referenced by TransmitAgentsEx().

◆ IsActive()

bool PluginBase::IsActive ( )
inlineprivate

Definition at line 53 of file PluginDrawCheckerboard.c.

54 {
55 return m_IsActive;
56 }

References m_IsActive.

◆ IsCurrentUIPageValid()

bool PluginBase::IsCurrentUIPageValid ( int ui_page_request)
inlineprotected

Definition at line 300 of file PluginKeyBinding.c.

301 {
303
304 if (GetGame().GetUIManager().GetMenu())
305 ui_page_current = GetGame().GetUIManager().GetMenu().GetID();
306
308 {
310 return false;
311 }
312
313 return true;
314 }
bool CheckMask(int source_mask, int target_mask)
const int MENU_NONE
Definition constants.c:161
const int MENU_ANY
Definition constants.c:160

References GetGame(), MENU_ANY, and MENU_NONE.

◆ IsEnabledFreeCamera()

bool PluginBase::IsEnabledFreeCamera ( )
inlineprotected

◆ IsEven()

bool PluginBase::IsEven ( int num)
inlineprivate

even or odd

Definition at line 59 of file PluginDrawCheckerboard.c.

60 {
61 if ((num % 2) == 0)
62 return true;
63 else
64 return false;
65 }

Referenced by CreateWidgetOverlay().

◆ IsFree()

bool PluginBase::IsFree ( Object target)
inlineprivate

Definition at line 18 of file PluginObjectsInteractionManager.c.

19 {
20 if (target && m_LockedObjects.Count() > 0)
21 {
22 for (int i = 0; i < m_LockedObjects.Count(); i++)
23 {
24 if (m_LockedObjects.Get(i) == target)
25 return false;
26 }
27 }
28 return true;
29 }

Referenced by Lock().

◆ IsInConsole()

bool PluginBase::IsInConsole ( )
inlineprivate

Definition at line 778 of file PluginDeveloper.c.

779 {
780 UIScriptedMenu menu_curr = GetGame().GetUIManager().GetMenu();
781
782 if (menu_curr != NULL && menu_curr.GetID() == MENU_SCRIPTCONSOLE)
783 return true;
784
785 return false;
786 }
const int MENU_SCRIPTCONSOLE
Definition constants.c:175

References GetGame(), and MENU_SCRIPTCONSOLE.

◆ IsIngame()

bool PluginBase::IsIngame ( )
inlineprivate

Definition at line 768 of file PluginDeveloper.c.

769 {
770 UIScriptedMenu menu_curr = GetGame().GetUIManager().GetMenu();
771
772 if (menu_curr == NULL)
773 return true;
774
775 return false;
776 }

References GetGame().

◆ IsKeyPressed()

bool PluginBase::IsKeyPressed ( int key)
inlineprotected

Definition at line 362 of file PluginKeyBinding.c.

363 {
364 return (KeyState(key) == 1);
365 }
proto native int KeyState(KeyCode key)

References KeyState().

◆ IsModifierLocked()

bool PluginBase::IsModifierLocked ( int id,
PlayerBase player = NULL )
inlineprivate

Definition at line 643 of file PluginDeveloperSync.c.

644 {
645 if (!player)
647 ModifiersManager mods_manager = player.GetModifiersManager();
648
649 return mods_manager.GetModifierLock(Math.AbsInt(id));
650 }

References Math::AbsInt(), GetDayZGame(), GetPlayer(), and ModifiersManager().

◆ IsMouseInScene()

bool PluginBase::IsMouseInScene ( )
inlineprivate

Definition at line 1137 of file PluginSceneManager.c.

1138 {
1140
1141 if (widget_under_mouse != NULL && widget_under_mouse.GetName() == "pnl_SceneControl")
1142 return true;
1143
1144 return false;
1145 }
proto native Widget GetWidgetUnderCursor()

References GetWidgetUnderCursor().

◆ IsOpened()

bool PluginBase::IsOpened ( )
inlineprivate

Definition at line 365 of file PluginSceneManager.c.

366 {
367 return m_IsOpen;
368 }

◆ IsPlayerRegistered()

bool PluginBase::IsPlayerRegistered ( PlayerBase player)
inlineprivate

Definition at line 219 of file PluginDeveloperSync.c.

220 {
221 if (m_RegisteredPlayers.Contains(player))
222 return true;
223
224 return false;
225 }

Referenced by EnableUpdate(), IsSetSystemInBitmask(), RegisterPlayer(), and SetSystemInBitmask().

◆ IsReadOnly()

bool PluginBase::IsReadOnly ( )
inlineprivate

Definition at line 106 of file PluginFileHandler.c.

107 {
108 return m_ReadOnly;
109 }

◆ IsRepairValid()

bool PluginBase::IsRepairValid ( int repair_kit_type,
int repairable_with_type )
inlineprivate

Definition at line 99 of file PluginRepairing.c.

100 {
103
104 return false;
105 }

◆ IsRulerActivated()

bool PluginBase::IsRulerActivated ( )
inlineprivate

Definition at line 869 of file PluginSceneManager.c.

870 {
871 return m_RulerActivated;
872 }

◆ IsSetSystemInBitmask()

bool PluginBase::IsSetSystemInBitmask ( PlayerBase player,
int system_bit )
inlineprivate

Definition at line 195 of file PluginDeveloperSync.c.

196 {
198 return (m_RegisteredPlayers.Get(player).m_Bitmask & system_bit);
199 return false;
200 }

References IsPlayerRegistered().

Referenced by RequestDetailedInfo().

◆ LinkSceneObjects()

void PluginBase::LinkSceneObjects ( SceneObject scene_object1,
SceneObject scene_object2 )
inlineprivate

Definition at line 629 of file PluginSceneManager.c.

630 {
631 scene_object1.LinkSceneObject(scene_object2);
632 scene_object2.LinkSceneObject(scene_object1);
633 }

◆ LoadFile()

bool PluginBase::LoadFile ( )
inlineprivate

Definition at line 57 of file PluginFileHandler.c.

58 {
60
62
63 if (file_index == 0)
64 return false;
65
66 string line_content = "";
68 while (char_count != -1)
69 {
71
73 }
74
76
77 return true;
78 }
string GetFileName()
FileMode
Definition EnSystem.c:383
proto void CloseFile(FileHandle file)
Close the File.
proto int FGets(FileHandle file, string var)
Get line from file, every next call of this function returns next line.
proto FileHandle OpenFile(string name, FileMode mode)
Opens File.

References CloseFile(), FGets(), PluginFileHandler::GetFileName(), and OpenFile().

◆ LoadFromCfg()

void PluginBase::LoadFromCfg ( )
inlineprivate

Definition at line 12 of file PluginHorticulture.c.

13 {
14 string cfg_access = "CfgHorticulture"; // it is stored in dz\gear\cultivation\cfgHorticulture.hpp
15 int cfg_horticulture_count = GetGame().ConfigGetChildrenCount(cfg_access);
16
17 for (int i = 0; i < cfg_horticulture_count; i++)
18 {
19 string cfg_class_name = "";
20 GetGame().ConfigGetChildName(cfg_access, i, cfg_class_name);
22
23 int cfg_class_count = GetGame().ConfigGetChildrenCount(cfg_class_access);
24
25 for (int j = 0; j < cfg_class_count; j++)
26 {
27 string cfg_subclass_name = "";
28 GetGame().ConfigGetChildName(cfg_class_access, j, cfg_subclass_name);
30
31 int cfg_subclass_count = GetGame().ConfigGetChildrenCount(cfg_subclass_access);
32
34
35 if (cfg_class_name == "Plants")
36 {
39 }
40
41 for (int k = 0; k < cfg_subclass_count; k++)
42 {
43 string cfg_variable_name = "";
44 GetGame().ConfigGetChildName(cfg_subclass_access, k, cfg_variable_name);
46
47 if (cfg_class_name == "Plants")
48 {
49 string string_param = "";
51
52 if (cfg_variable_name == "infestedTex")
53 plantMaterialHealth.m_InfestedTex = string_param;
54 else if (cfg_variable_name == "infestedMat")
55 plantMaterialHealth.m_InfestedMat = string_param;
56 else if (cfg_variable_name == "healthyTex")
57 plantMaterialHealth.m_HealthyTex = string_param;
58 else if (cfg_variable_name == "healthyMat")
59 plantMaterialHealth.m_HealthyMat = string_param;
60 }
61 }
62 }
63 }
64 }

References GetGame().

Referenced by PluginHorticulture(), and PluginLifespan().

◆ Lock()

void PluginBase::Lock ( Object target)
inlineprivate

Definition at line 31 of file PluginObjectsInteractionManager.c.

32 {
33 if (target && !IsFree(target))
34 {
35 m_LockedObjects.Insert(target);
36 m_LockedObjectsDecay.Insert(0);
37 }
38 }
bool IsFree(Object target)

References IsFree().

◆ LockModifier()

void PluginBase::LockModifier ( int id,
bool lock,
PlayerBase player = NULL )
inlineprivate

Definition at line 635 of file PluginDeveloperSync.c.

636 {
637 if (!player)
639 ModifiersManager mods_manager = player.GetModifiersManager();
640 mods_manager.SetModifierLock(Math.AbsInt(id), lock);
641 }

References Math::AbsInt(), GetDayZGame(), GetPlayer(), and ModifiersManager().

Referenced by OnRPC().

◆ Log()

void PluginBase::Log ( string msg,
string label )
inlineprivate

Definition at line 10 of file PluginBase.c.

11 {
12 Debug.Log(msg, GetModuleName(), "n/a", label, "n/a");
13 }
static void Log(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Prints debug message with normal prio.
Definition Debug.c:133

References GetModuleName(), and Debug::Log().

◆ LogPrint()

void PluginBase::LogPrint ( string message)
inlineprotected

◆ MakeTabs()

string PluginBase::MakeTabs ( int count,
bool inheritance = false )
inlineprivate

Definition at line 7 of file PluginConfigViewer.c.

8 {
9 if (count == 0)
10 return "";
11
12 string tabs = "|--";
13 if (inheritance)
14 tabs = "|<<";
15
16 for (int i = 0; i < count - 1; i++)
17 tabs = "| " + tabs;
18
19 return tabs;
20 }

Referenced by GetConfig(), and GetConfigRecursive().

◆ OnChange()

bool PluginBase::OnChange ( Widget w,
int x,
int y,
bool finished )
inlineprivate

Definition at line 341 of file PluginDayZInfectedDebug.c.

342 {
343 return false;
344 }

◆ OnClick()

bool PluginBase::OnClick ( Widget w,
int x,
int y,
int button )
inlineprivate

buttons clicks

Definition at line 282 of file PluginDayZInfectedDebug.c.

283 {
284 if (w == m_SpawnEntityButton)
285 {
286 ResetValues();
288 return true;
289 }
290
291 if (w == m_CardMovementButton)
292 {
293 ShowCard(0);
294 return true;
295 }
296 else if (w == m_CardFightButton)
297 {
298 ShowCard(1);
299 return true;
300 }
301 else if (w == m_StartTurnButton)
302 {
303 m_CH_DoTurn = true;
304 return true;
305 }
306 else if (w == m_StartVaultButton)
307 {
308 m_CH_DoVault = true;
309 return true;
310 }
311 else if (w == m_KnucleOutButton)
312 {
313 m_CH_DoKnucleOut = true;
314 return true;
315 }
316 else if (w == m_StartCrawlingButton)
317 {
318 m_CH_GoToCrawl = true;
319 return true;
320 }
321 else if (w == m_StartHitButton)
322 {
323 m_CH_DoHit = true;
324 return true;
325 }
326 else if (w == m_StartDeathButton)
327 {
328 m_CH_StartDeath = true;
329 return true;
330 }
331 else if (w == m_StartAttackButton)
332 {
333 m_CH_DoAttack = true;
334 return true;
335 }
336
337 return false;
338 }

References ResetValues(), ShowCard(), and SpawnNewInfectedEntity().

◆ OnContinouousAction()

void PluginBase::OnContinouousAction ( ActionData action_data)
inlineprotected

Definition at line 301 of file PluginAdminLog.c.

302 {
303 if (m_ActionsFilter == 1)
304 {
305 m_Message = action_data.m_Action.GetAdminLogMessage(action_data);
306
307 if (m_Message == "")
308 return;
309
310 m_PlayerPrefix = GetPlayerPrefix(action_data.m_Player, action_data.m_Player.GetIdentity());
311
313 }
314 }
string m_Message

References GetPlayerPrefix(), LogPrint(), and m_ActionsFilter.

◆ OnDamageEvent()

void PluginBase::OnDamageEvent ( PlayerBase player,
TotalDamageResult damageResult )
inlineprivate

Definition at line 90 of file PluginRemotePlayerDebugServer.c.

91 {
92 if (!GetWatching() || !damageResult)
93 return;
94
95 float damage_global = damageResult.GetDamage("", "");
96 float damage_blood = damageResult.GetDamage("", "Blood");
97 float damage_shock = damageResult.GetDamage("", "Shock");
98
99 if (m_PlayerDebugDamage.Contains(player))
101 else
102 {
106 }
107 }
ref map< PlayerBase, ref RemotePlayerDamageDebug > m_PlayerDebugDamage

References m_PlayerDebugDamage.

◆ OnDestroy() [1/5]

void PluginBase::OnDestroy ( )
private

◆ OnDestroy() [2/5]

override void PluginBase::OnDestroy ( )
inlineprivate

Definition at line 64 of file PluginCharPlacement.c.

65 {
66 FreeDebugCamera.GetInstance().SetFOV(g_Game.GetUserFOV());
67 }
DayZGame g_Game
Definition DayZGame.c:3528

References g_Game.

◆ OnDestroy() [3/5]

override void PluginBase::OnDestroy ( )
inlineprivate

Definition at line 116 of file PluginKeyBinding.c.

117 {
118 GetGame().GetUpdateQueue(CALL_CATEGORY_SYSTEM).Remove(this.OnFrame);
119 }
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8

References CALL_CATEGORY_SYSTEM, and GetGame().

◆ OnDestroy() [4/5]

override void PluginBase::OnDestroy ( )
inlineprivate

Definition at line 58 of file PluginSceneManager.c.

59 {
61 }

◆ OnDestroy() [5/5]

override void PluginBase::OnDestroy ( )
inlineprivate

Definition at line 14 of file PluginSoundDebug.c.

15 {
17 }

References m_TickTimer.

◆ OnFrame()

void PluginBase::OnFrame ( )
inlineprivate

Definition at line 236 of file PluginKeyBinding.c.

237 {
238 for (int i = 0; i < m_MouseButtons.Count(); ++i)
239 {
241
242 if (info.IsButtonDown())
243 {
244 int time_curr = GetGame().GetTime();
245 int time_hold = info.GetTimeLastPress() + HOLD_CLICK_TIME_MIN;
246
247 if (time_hold < time_curr)
248 {
249 //Log("MB_EVENT_DRAG");
250
251 OnMouse(MB_EVENT_DRAG, info.GetButtonID());
252 }
253 }
254 }
255 }
void OnMouse(int event_id, int button)
const int HOLD_CLICK_TIME_MIN
const int MB_EVENT_DRAG

References GetGame(), and MB_EVENT_DRAG.

◆ OnGUITimer()

void PluginBase::OnGUITimer ( )
inlineprivate

Definition at line 30 of file PluginSoundDebug.c.

31 {
33 DbgUI.Begin("Sound debug", 10, 10);
34
35 DbgUI.PushID_Str("SoundParams");
36 DbgUI.Text("SoundParams: ");
38 string soundsetName = "BearGrowl_SoundSet";
40 DbgUI.PopID();
41
42 DbgUI.PushID_Str("Offset");
43 DbgUI.Text("Offset pos: ");
44 vector posOffset = "0 0 0";
45 float posVal;
46
49 DbgUI.InputFloat("", posVal, 80);
50 DbgUI.PopID();
51 posOffset[0] = posVal;
52
55 DbgUI.InputFloat("", posVal, 80);
56 DbgUI.PopID();
57 posOffset[1] = posVal;
58
61 DbgUI.InputFloat("", posVal, 80);
62 DbgUI.PopID();
63 posOffset[2] = posVal;
64 DbgUI.PopID();
65
66 if (DbgUI.Button("Create"))
67 {
70 m_soundObject = m_soundBuilder.BuildSoundObject();
72 }
73
74 DbgUI.Text("SoundObjectBuilder: ");
75
76 DbgUI.Text("SoundObject: ");
77
78 DbgUI.Text("AbstractWave: ");
79
80 vector posOffset2 = "0 10 0";
81
82 if (m_soundParams != NULL)
83 {
84 DbgUI.Text("FadeInFactor: ");
86 DbgUI.PushID_Str("fadeIn");
88 DbgUI.PopID();
89
90 DbgUI.Text("FadeOutFactor: ");
92 DbgUI.PushID_Str("fadeOut");
94 DbgUI.PopID();
95
96 DbgUI.PushID_Str("Offset2");
97 DbgUI.Text("Offset2 pos: ");
98 float posVal2;
99
100 DbgUI.SameLine();
101 DbgUI.PushID_Int(100);
102 posVal2 = posOffset2[0];
103 DbgUI.InputFloat("", posVal2, 80);
104 DbgUI.PopID();
105 posOffset2[0] = posVal2;
106
107 DbgUI.SameLine();
108 DbgUI.PushID_Int(101);
109 posVal2 = posOffset2[1];
110 DbgUI.InputFloat("", posVal2, 80);
111 DbgUI.PopID();
112 posOffset2[1] = posVal2;
113
114 DbgUI.SameLine();
115 DbgUI.PushID_Int(102);
116 posVal2 = posOffset2[2];
117 DbgUI.InputFloat("", posVal2, 80);
118 DbgUI.PopID();
119 posOffset2[2] = posVal2;
120 DbgUI.PopID();
121
122 DbgUI.Text("skip: ");
123 DbgUI.SameLine();
124 float skip = 0.0;
125 DbgUI.PushID_Int(200);
126 DbgUI.InputFloat("", skip, 80);
127 DbgUI.PopID();
128
129 if (DbgUI.Button("Create and play"))
130 {
131 m_wave = GetGame().GetSoundScene().Play3D(m_soundObject, m_soundBuilder);
135 }
136 }
137
138 if (m_wave != NULL)
139 {
140 DbgUI.Text("Wave length: " + m_wave.GetLength() + "s");
141
142 //DbgUI.Text("Wave position: " + Math.Round(m_wave.GetCurrPosition() * 100) + "%");
143 DbgUI.Text("Volume: ");
144 DbgUI.SameLine();
145 float volume = 1.0;
146 DbgUI.InputFloat(" ", volume, 80);
147 DbgUI.SameLine();
148 if (DbgUI.Button("SetVolume"))
150 DbgUI.SameLine();
151 if (DbgUI.Button("SetVolumeRelative"))
153
154 if (DbgUI.Button("Play"))
155 m_wave.Play();
156 if (DbgUI.Button("Stop"))
157 m_wave.Stop();
158 if (DbgUI.Button("Restart"))
159 m_wave.Restart();
160 if (DbgUI.Button("Repeat"))
161 m_wave.Loop(true);
162 if (DbgUI.Button("StopRepeat"))
163 m_wave.Loop(false);
164 if (DbgUI.Button("Set position"))
166 }
167
168 DbgUI.End();
170 }
void SoundObjectBuilder(SoundParams soundParams)
class JsonUndergroundAreaTriggerData GetPosition
proto void Play()
proto void SetPosition(vector position, vector velocity="0 0 0")
proto void SetVolume(float value)
proto float GetLength()
WARNING: Blocking! Waits for header to load.
proto void Loop(bool setLoop)
proto void Skip(float timeSec)
proto void Stop()
proto void SetVolumeRelative(float value)
proto void SetFadeInFactor(float volume)
proto void Restart()
ref SoundObject m_soundObject
ref SoundObjectBuilder m_soundBuilder
ref SoundParams m_soundParams
AbstractWave m_wave
static proto void InputFloat(string txt, out float value, int pxWidth=150)
static proto native void PopID()
static proto native bool Button(string txt, int minWidth=0)
static proto void InputText(string txt, out string value, int pxWidth=150)
static proto native void SameLine()
static proto void BeginCleanupScope()
static proto native void PushID_Int(int int_id)
static proto native void PushID_Str(string str_id)
static proto native void EndCleanupScope()

References DbgUI::Begin(), DbgUI::BeginCleanupScope(), DbgUI::Button(), DbgUI::End(), DbgUI::EndCleanupScope(), GetGame(), GetPlayer(), GetPosition, DbgUI::InputFloat(), DbgUI::InputText(), DbgUI::PopID(), DbgUI::PushID_Int(), DbgUI::PushID_Str(), DbgUI::SameLine(), SoundObjectBuilder(), and DbgUI::Text().

◆ OnInit() [1/9]

void PluginBase::OnInit ( )
private

◆ OnInit() [2/9]

override void PluginBase::OnInit ( )
inlineprotected

Definition at line 6 of file PluginCameraTools.c.

7 {
8 m_Instance = this;
9 }

References m_Instance.

◆ OnInit() [3/9]

override void PluginBase::OnInit ( )
inlineprotected

Definition at line 48 of file PluginDeveloper.c.

49 {
50 super.OnInit();
51
53 }
static void OnInit()

References DeveloperFreeCamera::OnInit().

◆ OnInit() [4/9]

override void PluginBase::OnInit ( )
inlineprotected

Definition at line 20 of file PluginUniversalTemperatureSourceClient.c.

21 {
22#ifndef NO_GUI
24#endif
25 }

References InitWidgets().

◆ OnInit() [5/9]

override void PluginBase::OnInit ( )
inlineprivate

Definition at line 64 of file PluginDeveloperSync.c.

65 {
66 super.OnInit();
67
68 if (GetGame().IsServer())
69 {
70 //create timer
72 }
73 }
const int CALL_CATEGORY_GAMEPLAY
Definition tools.c:10

References CALL_CATEGORY_GAMEPLAY, GetGame(), and m_UpdateTimer.

◆ OnInit() [6/9]

override void PluginBase::OnInit ( )
inlineprivate

Definition at line 37 of file PluginFileHandler.c.

38 {
39 super.OnInit();
40 }

◆ OnInit() [7/9]

override void PluginBase::OnInit ( )
inlineprivate

Definition at line 28 of file PluginKeyBinding.c.

29 {
30 super.OnInit();
31
36 m_MouseButtons.Insert(new MouseButtonInfo(MouseState.RIGHT));
37 m_MouseButtons.Insert(new MouseButtonInfo(MouseState.MIDDLE));
38 GetGame().GetUpdateQueue(CALL_CATEGORY_SYSTEM).Insert(this.OnFrame);
39
41 //Keyboard Binds |UI_ID |Key1 |Key2 |Callback Plugin |Callback Function |Info Shrtcut |Info Description
42 //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
43 // |constants.h |constants.h |constants.h |only plugin name |only function | |
44 // |MENU_*** |KeyCode.KC_*** |KeyCode.KC_*** | |in plugin | |
45 //------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
46#ifdef DEVELOPER
47 RegisterKeyBind(MENU_ANY, KeyCode.KC_LCONTROL, KeyCode.KC_F1, "PluginDeveloper", "ToggleHelpScreen", "[LCTRL]+[F1]", "Show/Hide help screen");
48 RegisterKeyBind(MENU_ANY, KeyCode.KC_LCONTROL, KeyCode.KC_F2, "PluginDeveloper", "ResetGUI", "[LCTRL]+[F2]", "Resets shown UI for testing purposes");
49 RegisterKeyBind(MENU_NONE | MENU_SCRIPTCONSOLE, KeyCode.KC_LCONTROL, KeyCode.KC_GRAVE, "PluginDeveloper", "ToggleScriptConsole", "[LCTRL]+[~]", "Show/Hide this script console");
50 RegisterKeyBind(MENU_NONE | MENU_SCRIPTCONSOLE, KeyCode.KC_RCONTROL, KeyCode.KC_GRAVE, "PluginDeveloper", "ToggleScriptConsole", "[RCTRL]+[~]", "Show/Hide this script console");
51 RegisterKeyBind(MENU_NONE | MENU_SCENE_EDITOR, KeyCode.KC_LCONTROL, KeyCode.KC_TAB, "PluginSceneManager", "EditorToggle", "[LCTRL]+[TAB]", "Show/Hide Scripted Scene Editor");
52 RegisterKeyBind(MENU_NONE | MENU_SCENE_EDITOR, KeyCode.KC_RCONTROL, KeyCode.KC_TAB, "PluginSceneManager", "EditorToggle", "[RCTRL]+[TAB]", "Show/Hide Scripted Scene Editor");
53 RegisterKeyBind(MENU_NONE, KeyCode.KC_LCONTROL, KeyCode.KC_V, "PluginDeveloper", "SpawnFromClipboard", "[Right Shift]", "Spawn item from clipboard");
54#endif
55
56#ifdef DIAG_DEVELOPER
57 RegisterKeyBind(MENU_NONE, KeyCode.KC_INSERT, -1, "PluginDeveloper", "TeleportAtCursor", "[Insert]", "Teleport player to cursor position");
58 RegisterKeyBind(MENU_NONE, KeyCode.KC_HOME, -1, "PluginDeveloper", "ToggleFreeCamera", "[Home]", "Toggle free camera and teleport player to its position");
59 RegisterKeyBind(MENU_NONE, KeyCode.KC_DIVIDE, -1, "PluginDeveloper", "ToggleFreeCameraBackPos", "[Divide numeric]", "Toggle free camera, no player teleport");
60 RegisterKeyBind(MENU_NONE, KeyCode.KC_LCONTROL, KeyCode.KC_NUMPAD9, "PluginDeveloperSync", "ToggleFocus", "[LCtrl]+[NUMPAD9]", "Toggle game focus");
61#endif
62
63#ifdef DEVELOPER
64 RegisterKeyBind(MENU_NONE, KeyCode.KC_LCONTROL, KeyCode.KC_Z, "PluginDeveloper", "SetDeveloperItemClient", "Starts watching the item", "Sets the target as Watched item for debug purposes");
65 RegisterKeyBind(MENU_SCRIPTCONSOLE, KeyCode.KC_PRIOR, -1, "PluginDeveloper", "ScriptHistoryBack", "[Page Up]", "Debug Console => Script history back");
66 RegisterKeyBind(MENU_SCRIPTCONSOLE, KeyCode.KC_NEXT, -1, "PluginDeveloper", "ScriptHistoryNext", "[Page Down]", "Debug Console => Script history next");
67 RegisterKeyBind(MENU_SCENE_EDITOR, KeyCode.KC_DELETE, -1, "PluginSceneManager", "DeleteSelectedObject", "[Delete]", "Scene Editor => Delete current selected object");
68 RegisterKeyBind(MENU_SCENE_EDITOR, KeyCode.KC_LCONTROL, KeyCode.KC_S, "PluginSceneManager", "SceneSave", "[LCtrl]+[S]", "Scene Editor => Save Current Scene");
69 RegisterKeyBind(MENU_SCENE_EDITOR, KeyCode.KC_LCONTROL, KeyCode.KC_D, "PluginSceneManager", "SelectedObjectDuplicate", "[LCtrl]+[D]", "Scene Editor => Duplicate current selected object");
70 RegisterKeyBind(MENU_SCENE_EDITOR, KeyCode.KC_LCONTROL, KeyCode.KC_F, "PluginSceneManager", "SelectedObjectFocus", "[LCtrl]+[F]", "Scene Editor => Focus camera on selected object");
71 RegisterKeyBind(MENU_SCENE_EDITOR, KeyCode.KC_LCONTROL, KeyCode.KC_E, "PluginSceneManager", "RulerToggle", "[LCtrl]+[E]", "Scene Editor => Enable/Disable addition of ruler points");
72 RegisterKeyBind(MENU_NONE, KeyCode.KC_LCONTROL, KeyCode.KC_PRIOR, "PluginRecipesManager", "CallbackGenerateCache", "[LCtrl]+[BACKSPACE]", "PluginRecipesManager => Generate recipe cache and save it to file");
73 RegisterKeyBind(MENU_ANY, KeyCode.KC_LCONTROL, KeyCode.KC_DECIMAL, "PluginItemDiagnostic", "ToggleDebugWindowEvent", "[LCtrl]+[DECIMAL]", "Close the Item Debug window");
74 RegisterKeyBind(MENU_ANY, KeyCode.KC_LCONTROL, KeyCode.KC_NUMPAD0, "PluginDayzPlayerDebug", "ToggleDebugWindowEvent", "[LCtrl]+[NUMPAD0]", "Open/Close Player debug window");
75 RegisterKeyBind(MENU_ANY, KeyCode.KC_LCONTROL, KeyCode.KC_DECIMAL, "PluginDayzPlayerDebug", "ToggleDebugWindowEventP", "[LCtrl]+[DECIMAL]", "Open/Close Player debug window");
76 RegisterKeyBind(MENU_ANY, KeyCode.KC_LCONTROL, KeyCode.KC_I, "PluginDayZInfectedDebug", "ToggleDebugWindowEvent", "[LCtrl]+[NUMPAD1]", "Open/Close Infected debug window");
77 RegisterKeyBind(MENU_ANY, KeyCode.KC_LCONTROL, KeyCode.KC_O, "PluginDayZInfectedDebug", "PossesInfected", "[LCtrl]+[NUMPAD1]", "Open/Close Infected debug window");
78 RegisterKeyBind(MENU_NONE, KeyCode.KC_LCONTROL, KeyCode.KC_SCROLL, "PluginNutritionDumper", "CheckInit", "[LCtrl]+[SCROLL LOCK]", "Enable Door Ruler");
79 RegisterKeyBind(MENU_NONE, KeyCode.KC_LCONTROL, KeyCode.KC_RBRACKET, "PluginCharPlacement", "CheckInit", "[LCtrl]+[)]", "Enable CharPlacer");
80
81 RegisterKeyBind(MENU_NONE | MENU_CAMERA_TOOLS, KeyCode.KC_LCONTROL, KeyCode.KC_K, "PluginCameraTools", "ToggleCameraTools", "[LCtrl]+[K]", "Toggle Camera Recording Tools");
82 RegisterKeyBind(MENU_CAMERA_TOOLS, KeyCode.KC_LCONTROL, KeyCode.KC_S, "PluginCameraTools", "Save", "[X]", "Recording Tools => Start Recording Camera Path");
83 RegisterKeyBind(MENU_CAMERA_TOOLS, KeyCode.KC_P, -1, "PluginCameraTools", "PlayPause", "[C]", "Recording Tools => Stop Recording Camera Path");
84 RegisterKeyBind(MENU_CAMERA_TOOLS, KeyCode.KC_LCONTROL, KeyCode.KC_Q, "PluginCameraTools", "AddKeyframe", "[C]", "Recording Tools => Add Camera Point");
85 RegisterKeyBind(MENU_CAMERA_TOOLS, KeyCode.KC_LCONTROL, KeyCode.KC_E, "PluginCameraTools", "DeleteKeyframe", "[V]", "Recording Tools => Play Camera Line");
86
87 //--------------------------------------------------------------------------------------------------------------------------------------------------------------
90 // Mouses Binds |UI_ID |Mouse Button |Mouse Event |Callback Plugin |Callback Function |Info Shrtcut |Info Description
91 //----------------------------------------------------------------------------------------------------------------------------------------------------------------
92 // |constants.h |MouseState.LEFT |MB_EVENT_CLICK |only plugin name |only function | |
93 // |MENU_*** |MouseState.RIGHT |MB_EVENT_DOUBLECLICK | |in plugin | |
94 // |MouseState.MIDDLE |MB_EVENT_DRAG | | | |
95 // | |MB_EVENT_RELEASE | | | |
96 //--------------------------------------------------------------------------------------------------------------------------------------------------------------
97 RegisterMouseBind(MENU_SCENE_EDITOR, MouseState.LEFT, MB_EVENT_CLICK, "PluginSceneManager", "Event_OnClick", "[LMB] Click", "Mission Editor => Select object in scene");
98 RegisterMouseBind(MENU_SCENE_EDITOR, MouseState.LEFT, MB_EVENT_DOUBLECLICK, "PluginSceneManager", "Event_OnDoubleClick", "[LMB] Double Click", "Mission Editor => Craete new object in scene");
99 RegisterMouseBind(MENU_SCENE_EDITOR, MouseState.LEFT, MB_EVENT_DRAG, "PluginSceneManager", "Event_OnDrag", "[LMB] Hold", "Mission Editor => Moving with selected object");
100 RegisterMouseBind(MENU_SCENE_EDITOR, MouseState.MIDDLE, MB_EVENT_CLICK, "PluginSceneManager", "Event_OnClickMiddle", "[MMB] Click", "Mission Editor => Link clicked object with selected object");
101 RegisterMouseBind(MENU_SCENE_EDITOR, MouseState.RIGHT, MB_EVENT_PRESS, "PluginSceneManager", "FreeCameraControlEnable", "[RMB] Hold", "Mission Editor => Enable camera movement");
102 RegisterMouseBind(MENU_SCENE_EDITOR, MouseState.RIGHT, MB_EVENT_RELEASE, "PluginSceneManager", "FreeCameraControlDisable", "[RMB] Release", "Mission Editor => Disable camera movement");
103 RegisterMouseBind(MENU_NONE, MouseState.LEFT, MB_EVENT_CLICK, "PluginDayZCreatureAIDebug", "Event_OnClick", "[LMB] Click", "DayZCreature graph debug => Capture entity during capture mode");
104 RegisterMouseBind(MENU_CAMERA_TOOLS, MouseState.RIGHT, MB_EVENT_RELEASE, "PluginCameraTools", "CursorShow", "[LMB] Click", "DayZCreature graph debug => Capture entity during capture mode");
105 // TO DO: (Boris V.) Remove the following commented-out mouse binds when weapon particles can be implemented properly. Also remove the events they call.
106 //RegisterMouseBind( MENU_NONE ,MouseState.LEFT ,MB_EVENT_PRESS ,"PluginDeveloper" ,"MuzzleParticleTestStart" ,"[LMB] Hold" ,"Debug particle");
107 //RegisterMouseBind( MENU_NONE ,MouseState.LEFT ,MB_EVENT_RELEASE ,"PluginDeveloper" ,"MuzzleParticleTestEnd" ,"[LMB] Release" ,"Debug particle2");
108#endif
109 //--------------------------------------------------------------------------------------------------------------------------------------------------------------
111 }
void RegisterKeyBind(int ui_id, int key_code1, int key_code2, string plugin_name, string fnc_name, string info_shortcut, string info_description)
void RegisterMouseBind(int ui_id, int mouse_button, int mouse_event, string plugin_name, string fnc_name, string info_shortcut, string info_description)
const int MENU_CAMERA_TOOLS
Definition constants.c:191
const int MB_EVENT_RELEASE
const int MB_EVENT_CLICK
const int MB_EVENT_DOUBLECLICK
const int MB_EVENT_PRESS
MouseState
Definition EnSystem.c:311

References CALL_CATEGORY_SYSTEM, GetGame(), MB_EVENT_CLICK, MB_EVENT_DOUBLECLICK, MB_EVENT_DRAG, MB_EVENT_PRESS, MB_EVENT_RELEASE, MENU_ANY, MENU_CAMERA_TOOLS, MENU_NONE, MENU_SCENE_EDITOR, and MENU_SCRIPTCONSOLE.

◆ OnInit() [8/9]

◆ OnInit() [9/9]

override void PluginBase::OnInit ( )
inlineprivate

Definition at line 3 of file PluginSoundDebug.c.

4 {
5 m_TickTimer = new Timer();
6 m_TickTimer.Run(0.1, this, "OnGUITimer", NULL, true);
7 }

References m_TickTimer.

◆ OnKeyPress()

void PluginBase::OnKeyPress ( int key)
inlineprivate

Definition at line 124 of file PluginKeyBinding.c.

125 {
126 //Print("OnKeyPress "+ key );
127
128 for (int i = 0; i < m_KeyBindings.Count(); ++i)
129 {
131
132 if (!IsCurrentUIPageValid(key_binding.GetUIMenuID()))
133 continue;
134
135 bool key1_match = false;
136 bool key2_match = false;
137
138 if (key_binding.GetKey1() > -1)
139 {
140 if (IsKeyPressed(key_binding.GetKey1()))
141 {
142 // Key1 is down
143 key1_match = true;
144 }
145 }
146 else
147 {
148 // Key1 is not set
149 key1_match = true;
150 }
151
152 if (key_binding.GetKey2() > -1)
153 {
154 if (IsKeyPressed(key_binding.GetKey2()))
155 {
156 // Key2 is down
157 key2_match = true;
158 }
159 }
160 else
161 {
162 // Key2 is not set
163 key2_match = true;
164 }
165
166 if (key1_match && key2_match)
167 {
168 //Log( "Call Method -> key press: " + itoa(key) + " " + key_binding.GetInfoDescription() );
169
170 PluginBase m = GetPlugin(key_binding.GetCallbackTarget().ToType());
171 GetGame().GameScript.CallFunction(m, key_binding.GetCallbackFunction(), NULL, 0);
172
173 break;
174 }
175 }
176 }
bool IsCurrentUIPageValid(int ui_page_request)
bool IsKeyPressed(int key)

References GetGame(), and GetPlugin().

◆ OnKeyRelease()

void PluginBase::OnKeyRelease ( int key)
inlineprivate

Definition at line 181 of file PluginKeyBinding.c.

182 {
183 }

◆ OnMouse()

void PluginBase::OnMouse ( int event_id,
int button )
inlineprotected

Definition at line 327 of file PluginKeyBinding.c.

328 {
329 for (int i = 0; i < m_MouseBindings.Count(); ++i)
330 {
332
333 if (mouse_binding.GetButtonID() == button && mouse_binding.GetMouseEvent() == event_id)
334 {
335 if (IsCurrentUIPageValid(mouse_binding.GetUIMenuID()))
336 {
337 PluginBase m = GetPlugin(mouse_binding.GetCallbackTarget().ToType());
338 GetGame().GameScript.CallFunction(m, mouse_binding.GetCallbackFunction(), NULL, 0);
339 }
340 }
341 }
342 }

References GetGame(), and GetPlugin().

◆ OnMouseButtonPress()

void PluginBase::OnMouseButtonPress ( int button)
inlineprivate

Definition at line 188 of file PluginKeyBinding.c.

189 {
191 if (button_info == NULL) return;
192 button_info.Press();
193
194 //Log("****************************");
195 //Log(" MB_EVENT_PRESS");
196
198 }
MouseButtonInfo GetMouseButtonInfo(int button)

References MB_EVENT_PRESS.

◆ OnMouseButtonRelease()

void PluginBase::OnMouseButtonRelease ( int button)
inlineprivate

Definition at line 203 of file PluginKeyBinding.c.

204 {
206 if (button_info == NULL) return;
207 int time_curr = GetGame().GetTime();
208 int time_last_press = button_info.GetTimeLastPress();
209 int time_last_release = button_info.GetTimeLastRelease();
212
214 {
215 //Log(" DOUBLE_CLICK_TIME ");
216
218 }
219 else if (time_delta_press < CLICK_TIME)
220 {
221 //Log(" MB_EVENT_CLICK ");
222
224 }
225
226 //Log(" MB_EVENT_RELEASE");
227
229
230 button_info.Release();
231 }
const int CLICK_TIME
const int DOUBLE_CLICK_TIME

References GetGame(), MB_EVENT_CLICK, MB_EVENT_DOUBLECLICK, and MB_EVENT_RELEASE.

◆ OnMouseWheel()

void PluginBase::OnMouseWheel ( int wheel)
inlineprivate

Definition at line 66 of file PluginSceneManager.c.

67 {
68 if (!IsMouseInScene())
69 return;
70
73
75 }
void AddRotation(float add_rot)

◆ OnPlacementComplete()

void PluginBase::OnPlacementComplete ( Man player,
ItemBase item )
inlineprotected

Definition at line 286 of file PluginAdminLog.c.

287 {
288 if (m_PlacementFilter == 1)
289 {
290 m_Source = PlayerBase.Cast(player);
292 m_DisplayName = item.GetDisplayName();
293
294 if (m_DisplayName == "")
295 LogPrint(m_PlayerPrefix + " placed unknown object");
296 else
297 LogPrint(m_PlayerPrefix + " placed " + m_DisplayName);
298 }
299 }
int m_PlacementFilter
string m_DisplayName
PlayerBase m_Source

References GetPlayerPrefix(), and LogPrint().

◆ OnRequestReceived() [1/2]

void PluginBase::OnRequestReceived ( PlayerBase player,
bool enable )
inlineprivate

Definition at line 110 of file PluginRemotePlayerDebugServer.c.

111 {
112 int index = m_ClientList.Find(player);
113
114 if (enable)
115 {
116 m_ClientList.Insert(player);
117 SetWatching(true);
118 }
119 else if (index != -1 && m_ClientList.Count() != 0)
120 m_ClientList.Remove(index);
121
122 if (m_ClientList.Count() == 0)
123 SetWatching(false);
124 }
void SetWatching(bool enable)
ref set< PlayerBase > m_ClientList

Referenced by OnRPC().

◆ OnRequestReceived() [2/2]

void PluginBase::OnRequestReceived ( PlayerBase player,
bool enable )
inlineprotected

Definition at line 98 of file PluginUniversalTemperatureSourceServer.c.

99 {
100 int index = m_ClientList.Find(player);
101
102 if (enable)
103 m_ClientList.Insert(player);
104 else if (index != -1 && m_ClientList.Count() > 0)
105 m_ClientList.Remove(index);
106 }

◆ OnRPC() [1/5]

void PluginBase::OnRPC ( ParamsReadContext ctx)
inlineprotected

Definition at line 215 of file PluginUniversalTemperatureSourceClient.c.

216 {
217 //Debug.Log("OnRPC called", "PluginUniversalTemperatureSourceClient");
218 //PrintedDebug();
220 }

◆ OnRPC() [2/5]

void PluginBase::OnRPC ( ParamsReadContext ctx,
PlayerBase player )
inlineprivate

Definition at line 126 of file PluginRemotePlayerDebugServer.c.

127 {
128 bool enable;
129 ctx.Read(enable);
131 }
void OnRequestReceived(PlayerBase player, bool enable)

◆ OnRPC() [3/5]

void PluginBase::OnRPC ( ParamsReadContext ctx,
PlayerBase player )
inlineprotected

Definition at line 108 of file PluginUniversalTemperatureSourceServer.c.

109 {
110 bool enable;
111 ctx.Read(enable);
112
114 }

References OnRequestReceived().

◆ OnRPC() [4/5]

void PluginBase::OnRPC ( PlayerBase player,
int rpc_type,
ParamsReadContext ctx )
inlineprotected

Definition at line 55 of file PluginDeveloper.c.

56 {
57#ifdef DIAG_DEVELOPER
58 switch (rpc_type)
59 {
60 case ERPCs.DEV_RPC_SPAWN_ITEM_ON_GROUND:
61 {
63 }
64 case ERPCs.DEV_RPC_SPAWN_ITEM_ON_GROUND_PATTERN_GRID:
65 {
67 }
68 case ERPCs.DEV_RPC_SPAWN_ITEM_ON_CURSOR:
69 {
71 }
72 case ERPCs.DEV_RPC_SPAWN_ITEM_IN_INVENTORY:
73 {
75 }
76 case ERPCs.DEV_RPC_CLEAR_INV:
77 {
79 }
80 case ERPCs.DEV_RPC_SEND_SERVER_LOG:
81 {
83 }
84 case ERPCs.RPC_SYNC_SCENE_OBJECT:
85 {
87 }
88 case ERPCs.DEV_RPC_PLUGIN_DZCREATURE_DEBUG:
89 {
91 }
92 case ERPCs.DEV_RPC_SPAWN_PRESET:
93 {
94 string presetName;
96
97 ctx.Read(presetName);
98 ctx.Read(target);
99
101 }
102 case ERPCs.DEV_RPC_SET_TIME:
103 {
104 HandleSetTime(player, ctx); break;
105 }
106 }
107
109#endif
110 }
static void OnRPC(PlayerBase player, int rpc_type, ParamsReadContext ctx)
void HandlePresetSpawn(PlayerBase player, string presetName, EntityAI target)
void OnRPCSpawnEntityOnCursorDir(PlayerBase player, ParamsReadContext ctx)
void OnRPCSyncSceneObject(ParamsReadContext ctx)
void HandleSetTime(PlayerBase player, ParamsReadContext ctx)
void OnRPCSpawnEntity(PlayerBase player, ParamsReadContext ctx)
void OnRPCSpawnEntityOnGroundPatternGrid(PlayerBase player, ParamsReadContext ctx)
void OnRPCServerLogRecieved(ParamsReadContext ctx)
void OnRPCSpawnEntityOnGround(PlayerBase player, ParamsReadContext ctx)
void OnRPCPluginDayzCreatureDebug(PlayerBase player, int rpc_type, ParamsReadContext ctx)
void OnRPCClearInventory(PlayerBase player)

References HandlePresetSpawn(), HandleSetTime(), DeveloperTeleport::OnRPC(), OnRPCClearInventory(), OnRPCPluginDayzCreatureDebug(), OnRPCServerLogRecieved(), OnRPCSpawnEntity(), OnRPCSpawnEntityOnCursorDir(), OnRPCSpawnEntityOnGround(), OnRPCSpawnEntityOnGroundPatternGrid(), and OnRPCSyncSceneObject().

◆ OnRPC() [5/5]

void PluginBase::OnRPC ( PlayerBase player,
int rpc_type,
ParamsReadContext ctx )
inlineprivate

Definition at line 230 of file PluginDeveloperSync.c.

231 {
232 if (!GetGame().IsDebug())
233 return;
234
235 switch (rpc_type)
236 {
237 case ERPCs.DEV_STATS_UPDATE:
238 {
239 EnableUpdate(GetRPCUpdateState(ctx), ERPCs.DEV_STATS_UPDATE, player); break;
240 }
241
242 case ERPCs.DEV_LEVELS_UPDATE:
243 {
244 EnableUpdate(GetRPCUpdateState(ctx), ERPCs.DEV_LEVELS_UPDATE, player); break;
245 }
246
247 case ERPCs.DEV_MODS_UPDATE:
248 {
249 EnableUpdate(GetRPCUpdateState(ctx), ERPCs.DEV_MODS_UPDATE, player); break;
250 }
251
252 case ERPCs.DEV_AGENTS_UPDATE:
253 {
254 EnableUpdate(GetRPCUpdateState(ctx), ERPCs.DEV_AGENTS_UPDATE, player); break;
255 }
256
257 case ERPCs.DEV_STOMACH_UPDATE:
258 {
259 EnableUpdate(GetRPCUpdateState(ctx), ERPCs.DEV_STOMACH_UPDATE, player); break;
260 }
261
262 case ERPCs.DEV_RPC_STATS_DATA:
263 {
264 OnRPCStats(ctx); break;
265 }
266
267 case ERPCs.DEV_RPC_LEVELS_DATA:
268 {
269 OnRPCLevels(ctx); break;
270 }
271
272 case ERPCs.DEV_RPC_MODS_DATA:
273 {
274 OnRPCMods(ctx); break;
275 }
276
277 case ERPCs.DEV_RPC_MODS_DATA_DETAILED:
278 {
279 OnRPCModsDetailed(ctx); break;
280 }
281
282 case ERPCs.DEV_RPC_AGENTS_DATA:
283 {
284 OnRPCAgents(ctx); break;
285 }
286 case ERPCs.DEV_RPC_STOMACH_DATA:
287 {
288 OnRPCStomach(ctx); break;
289 }
290
291 case ERPCs.DEV_RPC_MODS_ACTIVATE:
292 {
294 }
295 case ERPCs.DEV_RPC_MODS_DETAILED:
296 {
298 }
299
300 case ERPCs.DEV_RPC_MODS_DEACTIVATE:
301 {
303 }
304
305 case ERPCs.DEV_RPC_MODS_LOCK:
306 {
307 int id;
308 bool lock;
310 LockModifier(id, lock, player); break;
311 }
312
313 case ERPCs.DEV_RPC_MODS_RESET:
314 {
315 player.GetModifiersManager().DeactivateAllModifiers();
316 break;
317 }
318
319 case ERPCs.DEV_RPC_STATS_RESET:
320 {
321 player.GetPlayerStats().ResetAllStats();
322 break;
323 }
324
325 case ERPCs.DEV_RPC_STAT_SET:
326 {
328 break;
329 }
330 case ERPCs.DEV_TEMP_UPDATE:
331 {
333 break;
334 }
335 }
336 }
void OnRPCTemp(ParamsReadContext ctx, PlayerBase player)
void OnRPCStomach(ParamsReadContext ctx)
int GetRPCModifierID(ParamsReadContext ctx)
void OnRPCMods(ParamsReadContext ctx)
void OnRPCLevels(ParamsReadContext ctx)
void DeactivateModifier(int id, PlayerBase player=NULL)
void OnRPCStats(ParamsReadContext ctx)
void ActivateModifier(int id, PlayerBase player=NULL)
void OnRPCStatSet(ParamsReadContext ctx, PlayerBase player)
bool GetRPCUpdateState(ParamsReadContext ctx)
void EnableUpdate(bool enable, int type, PlayerBase player)
void OnRPCAgents(ParamsReadContext ctx)
void LockModifier(int id, bool lock, PlayerBase player=NULL)
void RequestDetailedInfo(int id, notnull PlayerBase player)
void OnRPCModsDetailed(ParamsReadContext ctx)
void GetRPCModifierLock(ParamsReadContext ctx, out int id, out bool lock)

References ActivateModifier(), DeactivateModifier(), EnableUpdate(), GetGame(), GetRPCModifierID(), GetRPCModifierLock(), GetRPCUpdateState(), LockModifier(), OnRPCAgents(), OnRPCLevels(), OnRPCMods(), OnRPCModsDetailed(), OnRPCStats(), OnRPCStatSet(), OnRPCStomach(), OnRPCTemp(), and RequestDetailedInfo().

◆ OnRPCAgents()

void PluginBase::OnRPCAgents ( ParamsReadContext ctx)
inlineprivate

Definition at line 696 of file PluginDeveloperSync.c.

697 {
698 //clear values
699 m_PlayerAgentsSynced.Clear();
700
702 Param1<int> p1 = new Param1<int>(0);
703
704 //get param count
705 int param_count = 0;
706 if (ctx.Read(p1))
707 param_count = p1.param1;
708
709 //read values and set
710 for (int i = 0; i < param_count; i++)
711 {
712 ctx.Read(p3);
713 m_PlayerAgentsSynced.Insert(new SyncedValueAgent(p3.param1, p3.param2, p3.param3));
714 }
715 }
void SyncedValueAgent(string name, string value, int id)
ref array< ref SyncedValueAgent > m_PlayerAgentsSynced

References SyncedValueAgent().

Referenced by OnRPC().

◆ OnRPCClearInventory()

void PluginBase::OnRPCClearInventory ( PlayerBase player)
inlineprotected

Definition at line 230 of file PluginDeveloper.c.

231 {
233 }
override void ClearInventory()
Definition ItemBase.c:8119

References ClearInventory().

Referenced by OnRPC().

◆ OnRPCLevels()

void PluginBase::OnRPCLevels ( ParamsReadContext ctx)
inlineprivate

Definition at line 483 of file PluginDeveloperSync.c.

484 {
485 //clear values
486 m_PlayerLevelsSynced.Clear();
487
489
490 //get param count
491 int param_count = 0;
492 if (ctx.Read(p3))
493 param_count = p3.param2;
494
495 //read values and set
496 for (int i = 0; i < param_count; i++)
497 {
498 if (ctx.Read(p3))
499 m_PlayerLevelsSynced.Insert(new SyncedValueLevel(p3.param1, p3.param2, p3.param3));
500 }
501 }
void SyncedValueLevel(string name, float value, float value2)
Definition SyncedValue.c:43
ref array< ref SyncedValueLevel > m_PlayerLevelsSynced

References SyncedValueLevel().

Referenced by OnRPC().

◆ OnRPCMods()

void PluginBase::OnRPCMods ( ParamsReadContext ctx)
inlineprivate

Definition at line 557 of file PluginDeveloperSync.c.

558 {
559 //clear values
560 m_PlayerModsSynced.Clear();
561
562 //ref Param3<string, float, bool> p = new Param3<string, float, bool>( "", 0, false );
563 Param1<int> p1 = new Param1<int>(0);
565 //get param count
566 int param_count = 0;
567 if (ctx.Read(p1))
568 param_count = (int) p1.param1;
569
570 //read values and set
571 for (int i = 0; i < param_count; i++)
572 {
573 if (ctx.Read(p4))
574 m_PlayerModsSynced.Insert(new SyncedValueModifier(p4.param1, p4.param2, p4.param3, p4.param4));
575 }
576 }
Param3 int
ref array< ref SyncedValueModifier > m_PlayerModsSynced

Referenced by OnRPC().

◆ OnRPCModsDetailed()

void PluginBase::OnRPCModsDetailed ( ParamsReadContext ctx)
inlineprivate

Definition at line 578 of file PluginDeveloperSync.c.

579 {
581
582 //get param count
583 if (ctx.Read(p1))
585 }
string m_PlayerModsDetailedSynced

Referenced by OnRPC().

◆ OnRPCPluginDayzCreatureDebug()

void PluginBase::OnRPCPluginDayzCreatureDebug ( PlayerBase player,
int rpc_type,
ParamsReadContext ctx )
inlineprotected

◆ OnRPCServerLogRecieved()

void PluginBase::OnRPCServerLogRecieved ( ParamsReadContext ctx)
inlineprotected

Definition at line 222 of file PluginDeveloper.c.

223 {
225
226 if (ctx.Read(param) && param.param1 != "")
228 }
static void ReceivedLogMessageFromServer(string message)
Definition Debug.c:383

References Debug::ReceivedLogMessageFromServer().

Referenced by OnRPC().

◆ OnRPCSpawnEntity()

void PluginBase::OnRPCSpawnEntity ( PlayerBase player,
ParamsReadContext ctx )
inlineprotected

Definition at line 256 of file PluginDeveloper.c.

257 {
258#ifdef DEVELOPER
260 if (ctx.Read(p))
261 {
262 EntityAI target = EntityAI.Cast(p.param1);
264
265 EntityAI ent = SpawnEntityInInventory(target, p.param2, p.param3, p.param4, p.param5, "", p.param7);
266 if (playerTarget && p.param5)
267 {
268 if (playerTarget.m_PresetSpawned)
269 {
270 playerTarget.m_PresetSpawned = false;
271 playerTarget.m_PresetItems.Clear();
272 }
273 if (ent)
274 playerTarget.m_PresetItems.Insert(ent);
275 }
276 }
277#endif
278 }
FindInventoryLocationType
flags for searching locations in inventory
Param7< EntityAI, string, float, float, bool, string, FindInventoryLocationType > DevSpawnItemParams
EntityAI SpawnEntityInInventory(notnull EntityAI target, string className, float health, float quantity, bool special=false, string presetName="", FindInventoryLocationType locationType=FindInventoryLocationType.ANY)
tries to spawn item somewhere in inventory

References SpawnEntityInInventory().

Referenced by OnRPC().

◆ OnRPCSpawnEntityOnCursorDir()

void PluginBase::OnRPCSpawnEntityOnCursorDir ( PlayerBase player,
ParamsReadContext ctx )
inlineprotected

Definition at line 236 of file PluginDeveloper.c.

237 {
239 if (ctx.Read(p))
240 SpawnEntityOnCursorDir(player, p.param1, p.param2, p.param3, p.param4, p.param5, p.param6, p.param7);
241 }
EntityAI SpawnEntityOnCursorDir(PlayerBase player, string item_name, float quantity, float distance, float health=-1, bool special=false, string presetName="", bool withPhysics=false)
spawns entity in direction of cursor at specified distance

References SpawnEntityOnCursorDir().

Referenced by OnRPC().

◆ OnRPCSpawnEntityOnGround()

void PluginBase::OnRPCSpawnEntityOnGround ( PlayerBase player,
ParamsReadContext ctx )
inlineprotected

Definition at line 243 of file PluginDeveloper.c.

244 {
246 if (ctx.Read(p))
247 SpawnEntityOnGroundPos(player, p.param1, p.param2, p.param3, p.param4, p.param5, p.param6);
248 }
EntityAI SpawnEntityOnGroundPos(PlayerBase player, string item_name, float health, float quantity, vector pos, bool special=false, bool withPhysics=false)
spawns entity on exact position

References SpawnEntityOnGroundPos().

Referenced by OnRPC().

◆ OnRPCSpawnEntityOnGroundPatternGrid()

void PluginBase::OnRPCSpawnEntityOnGroundPatternGrid ( PlayerBase player,
ParamsReadContext ctx )
inlineprotected

Definition at line 250 of file PluginDeveloper.c.

251 {
252 auto p = new Param10<string, int, float, float, int, int, float, float, bool, bool>("", 0, 0, 0, 0, 0, 0, 0, false, false);
253 if (ctx.Read(p))
254 SpawnEntityOnGroundPatternGrid(player, p.param1, p.param2, p.param3, p.param4, p.param5, p.param6, p.param7, p.param8, p.param9, p.param10);
255 }
void SpawnEntityOnGroundPatternGrid(PlayerBase player, string item_name, int count, float health, float quantity, int rows, int columns, float gapRow=1, float gapColumn=1, bool special=false, bool withPhysics=false)

References SpawnEntityOnGroundPatternGrid().

Referenced by OnRPC().

◆ OnRPCStats()

void PluginBase::OnRPCStats ( ParamsReadContext ctx)
inlineprivate

Definition at line 398 of file PluginDeveloperSync.c.

399 {
400 //clear values
401 m_PlayerStatsSynced.Clear();
402
403
405
407
408 //get param count
409 int param_count = 0;
410 if (ctx.Read(p_count))
411 param_count = p_count.param1;
412
413 //read values and set
414 for (int i = 0; i < param_count; i++)
415 {
416 ctx.Read(p);
417 m_PlayerStatsSynced.Insert(new SyncedValue(p.param1, p.param2, false, p.param3));
418 }
419 }
ref array< ref SyncedValue > m_PlayerStatsSynced

Referenced by OnRPC().

◆ OnRPCStatSet()

void PluginBase::OnRPCStatSet ( ParamsReadContext ctx,
PlayerBase player )
inlineprivate

Definition at line 442 of file PluginDeveloperSync.c.

443 {
445 if (ctx.Read(p))
446 {
447 for (int i = 0; i < player.m_PlayerStats.GetPCO().Get().Count(); i++)
448 {
449 string label = player.m_PlayerStats.GetPCO().Get().Get(i).GetLabel();
450 if (label == p.param1)
451 player.m_PlayerStats.GetPCO().Get().Get(i).SetByFloatEx(p.param2);
452
453 }
454 }
455
456 }
array< ref PlayerStatBase > Get()

References Count, and Get().

Referenced by OnRPC().

◆ OnRPCStomach()

void PluginBase::OnRPCStomach ( ParamsReadContext ctx)
inlineprivate

Definition at line 735 of file PluginDeveloperSync.c.

736 {
737 //clear values
738 m_PlayerStomachSynced.Clear();
739
740 Param1<int> p1 = new Param1<int>(0);
741 int param_count = 0;
742 if (ctx.Read(p1))
743 param_count = p1.param1;
744
745 if (param_count)
746 {
747 //invidividual stomach items
748 for (int i = 0; i < param_count; i++)
749 {
751 ctx.Read(p4);
753 }
754 //volume
756 ctx.Read(p1b);
758 }
759 }
ref array< ref Param > m_PlayerStomachSynced

Referenced by OnRPC().

◆ OnRPCSyncSceneObject()

void PluginBase::OnRPCSyncSceneObject ( ParamsReadContext ctx)
inlineprotected

Definition at line 142 of file PluginDeveloper.c.

143 {
145
146 if (ctx.Read(par))
147 {
149 SceneData scene_data = module_scene_editor.GetLoadedScene();
150 SceneObject scene_object = scene_data.GetSceneObjectByEntityAI(par.param2);
151
152 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallByName(scene_object, par.param1, par.param3);
153 }
154 }
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12

References CALL_CATEGORY_SYSTEM, GetGame(), and GetPlugin().

Referenced by OnRPC().

◆ OnRPCTemp()

void PluginBase::OnRPCTemp ( ParamsReadContext ctx,
PlayerBase player )
inlineprivate

Definition at line 665 of file PluginDeveloperSync.c.

666 {
667 if (GetGame().IsServer() && GetGame().IsMultiplayer())
668 EnableUpdate(GetRPCUpdateState(ctx), ERPCs.DEV_TEMP_UPDATE, player);
669 else if (!GetGame().IsMultiplayer() || GetGame().IsClient())
670 {
673 }
674
675 }
static ref Param1< string > PARAM1_STRING
string m_EnvironmentDebugMessage

References EnableUpdate(), GetGame(), GetRPCUpdateState(), and CachedObjectsParams::PARAM1_STRING.

Referenced by OnRPC().

◆ OnSetFreeCameraEvent()

void PluginBase::OnSetFreeCameraEvent ( PlayerBase player,
FreeDebugCamera camera )
inlineprotected

Definition at line 280 of file PluginDeveloper.c.

281 {
283 }
static void OnSetFreeCameraEvent(PlayerBase player, FreeDebugCamera camera)

References DeveloperFreeCamera::OnSetFreeCameraEvent().

◆ OnSpawnErrorReport()

void PluginBase::OnSpawnErrorReport ( string name)
inlineprotected

Definition at line 285 of file PluginDeveloper.c.

286 {
287 PrintString("PluginDeveloper.SpawnEntity() Warning- Cant spawn object: " + name);
288 //DumpStack();
289 PrintString("PluginDeveloper.SpawnEntity() Warning END");
290 }
void PrintString(string s)
Helper for printing out string expression. Example: PrintString("Hello " + var);.
Definition EnScript.c:344

References name, and PrintString().

Referenced by SpawnEntityAsAttachment(), SpawnEntityInPlayerInventory(), SpawnEntityOnCursorDir(), and SpawnEntityOnGroundPos().

◆ OnUIEditorClosed()

void PluginBase::OnUIEditorClosed ( )
inlineprivate

Definition at line 94 of file PluginSceneManager.c.

95 {
96 m_IsOpen = false;
97
99
100 m_ModuleDeveloper.ToggleFreeCameraBackPos();
101
102 EditorUpdate();
103 }
void FreeCameraControlEnable()

◆ OnUIEditorOpened()

void PluginBase::OnUIEditorOpened ( )
inlineprivate

Definition at line 80 of file PluginSceneManager.c.

81 {
82 m_IsOpen = true;
83
85
86 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).Call(this.FreeCameraControlDisable);
87
89 }
static void EnableFreeCameraSceneEditor(PlayerBase player)
void FreeCameraControlDisable()

References CALL_CATEGORY_SYSTEM, DeveloperFreeCamera::EnableFreeCameraSceneEditor(), GetGame(), and GetPlayer().

◆ OnUpdate() [1/8]

void PluginBase::OnUpdate ( float delta_time)
private

◆ OnUpdate() [2/8]

override void PluginBase::OnUpdate ( float delta_time)
inlineprivate

Definition at line 194 of file PluginDayZInfectedDebug.c.

195 {
196 super.OnUpdate(delta_time);
197
199
200 if (m_IsActive)
201 {
203 return;
204
205 m_DebugShapes.Insert(Debug.DrawSphere(m_ControlledInfected.GetPosition() + "0 2 0", 0.25, FadeColors.RED));
206 }
207 }
ref array< Shape > m_DebugShapes
void CleanupDebugShapes(array< Shape > shapesArr)

References CleanupDebugShapes(), Debug::DrawSphere(), and m_IsActive.

◆ OnUpdate() [3/8]

override void PluginBase::OnUpdate ( float delta_time)
inlineprivate

Definition at line 46 of file PluginCharPlacement.c.

47 {
48 if (!m_Initialized) return;
49 if (!FreeDebugCamera.GetInstance().IsActive()) return;
50 if (!m_Character) return;
51 m_camera_orientation = FreeDebugCamera.GetInstance().GetOrientation();
53 FreeDebugCamera.GetInstance().SetOrientation(m_camera_orientation); //remove to unlock vertical axis
54 m_cam_pos = FreeDebugCamera.GetInstance().GetPosition();
55 m_character_pos = m_Character.GetPosition();
56 m_camera_dir = FreeDebugCamera.GetInstance().GetDirection();
57
59 m_Character.SetPosition(CalculatePos());//(FreeDebugCamera.GetInstance().GetPosition() + ( m_camera_dir * 2) );
61 m_Character.SetOrientation(m_demoRot);//(FreeDebugCamera.GetInstance().GetPosition() - m_demoPos);
62 }
vector CalculatePos()
vector m_camera_orientation
proto float Normalize()
Normalizes vector. Returns length.
static proto float Atan2(float y, float x)
Returns angle in radians from tangent.
static const float RAD2DEG
Definition EnMath.c:16

References Math::Atan2(), m_Initialized, vector::Normalize(), and Math::RAD2DEG.

◆ OnUpdate() [4/8]

override void PluginBase::OnUpdate ( float delta_time)
inlineprivate

Definition at line 23 of file PluginDoorRuler.c.

24 {
25 if (!m_Initialized) return;
26 if (!FreeDebugCamera.GetInstance().IsActive()) return;
27 if (!m_Ruler) return;
28 vector cam_pos = FreeDebugCamera.GetInstance().GetPosition();
29 vector ruler_pos = m_Ruler.GetPosition();
30 vector camera_dir = FreeDebugCamera.GetInstance().GetDirection();
31 camera_dir.Normalize();
32 m_Ruler.SetPosition(FreeDebugCamera.GetInstance().GetPosition() + (camera_dir * 2));
33 m_Ruler.SetAngles(FreeDebugCamera.GetInstance().GetAngles());
34 }

References m_Initialized.

◆ OnUpdate() [5/8]

override void PluginBase::OnUpdate ( float delta_time)
inlineprivate

Definition at line 13 of file PluginRemotePlayerDebugServer.c.

14 {
15#ifdef SERVER
16 if (m_ClientList.Count() != 0)
17 {
19
20 if (m_AccuTime > INTERVAL)
21 {
22 m_AccuTime = 0;
23 SendDebug();
24 }
25 }
26#endif
27 }

◆ OnUpdate() [6/8]

override void PluginBase::OnUpdate ( float delta_time)
inlineprotected

Definition at line 27 of file PluginUniversalTemperatureSourceClient.c.

28 {
29#ifndef NO_GUI
30 if (!m_Player)
31 return;
32
34 DrawDebugs();
35#endif
36 }

References DrawDebugs(), m_Player, and UpdateStatWidgets().

◆ OnUpdate() [7/8]

override void PluginBase::OnUpdate ( float delta_time)
inlineprotected

Definition at line 17 of file PluginUniversalTemperatureSourceServer.c.

18 {
19 if (m_ClientList.Count() > 0)
20 {
22
23 if (m_AccuTime > INTERVAL)
24 {
25 m_AccuTime = 0;
26 SendDebug();
27 }
28 }
29 }

References SendDebug().

◆ OnUpdate() [8/8]

override void PluginBase::OnUpdate ( float delta_time)
inlineprivate

Definition at line 9 of file PluginSoundDebug.c.

10 {
11 ;
12 }

◆ PlayerHitBy()

void PluginBase::PlayerHitBy ( TotalDamageResult damageResult,
int damageType,
PlayerBase player,
EntityAI source,
int component,
string dmgZone,
string ammo )
inlineprotected

Definition at line 168 of file PluginAdminLog.c.

169 {
170 if (player && source)
171 {
172 string playerPrefix = GetPlayerPrefix(player, player.GetIdentity()) + "[HP: " + player.GetHealth().ToString() + "]";
173 string playerPrefix2;
176
177 if (source.IsPlayer()) // Fists
179 else
180 playerSource = PlayerBase.Cast(source.GetHierarchyParent());
181
182 if (playerSource)
184
185 switch (damageType)
186 {
187 case DamageType.CLOSE_COMBAT: // Player melee, animals, infected
188
189 if (m_HitFilter != 1 && (source.IsZombie() || source.IsAnimal())) // Infected & Animals
190 {
191 m_DisplayName = source.GetDisplayName();
192
194 }
195 else if (source.IsPlayer())// Fists
197 else if (playerSource && (source.IsMeleeWeapon() || source.IsWeapon())) // Melee weapons
198 {
199 m_ItemInHands = source.GetDisplayName();
200
201 LogPrint(playerPrefix + " hit by " + playerPrefix2 + m_HitMessage + " with " + m_ItemInHands);
202 }
203 else
204 {
205 m_DisplayName = source.GetType();
206
208 }
209 break;
210
211 case DamageType.FIRE_ARM: // Player ranged
212
213 if (source.IsWeapon() && playerSource)
214 {
215 m_ItemInHands = source.GetDisplayName();
216 m_Distance = vector.Distance(player.GetPosition(), playerSource.GetPosition());
217
218 LogPrint(playerPrefix + " hit by " + playerPrefix2 + m_HitMessage + " with " + m_ItemInHands + " from " + m_Distance + " meters ");
219 }
220 else
221 {
222 m_DisplayName = source.GetType();
223
225 }
226 break;
227
228 case DamageType.EXPLOSION: // Explosion
229
230 LogPrint(playerPrefix + " hit by explosion (" + ammo + ")");
231 break;
232
233 case DamageType.STUN: // unused atm
234
235 LogPrint(playerPrefix + " stunned by " + ammo);
236 break;
237
238 case DamageType.CUSTOM: // Others (Vehicle hit, fall, fireplace, barbed wire ...)
239 float globalHealthDamage = damageResult.GetDamage("", "Health");
240 if (ammo == DayZPlayerImplementFallDamage.FALL_DAMAGE_AMMO_HEALTH || ammo == DayZPlayerImplementFallDamage.FALL_DAMAGE_AMMO_SHOCK || ammo == DayZPlayerImplementFallDamage.FALL_DAMAGE_AMMO_HEALTH_OTHER_ATTACHMENTS)
241 {
242 if (globalHealthDamage > 0.0)
243 LogPrint(playerPrefix + " hit by " + ammo);
244 }
245 else if (source.GetType() == "AreaDamageManager")
246 {
247 EntityAI parent = EntityAI.Cast(source);
248 if (parent)
249 LogPrint(playerPrefix + " hit by " + parent.GetType() + " with " + ammo);
250 }
251 else
252 {
253 m_DisplayName = source.GetType();
254
255 LogPrint(playerPrefix + " hit by " + m_DisplayName + " with " + ammo);
256 }
257 break;
258
259 default:
260
261 LogPrint("DEBUG: PlayerHitBy() unknown damageType: " + ammo);
262 break;
263 }
264 }
265 else
266 LogPrint("DEBUG: player/source does not exist");
267 }
DamageType
exposed from C++ (do not change)
void DayZPlayerImplementFallDamage(DayZPlayer pPlayer)
string m_HitMessage
string m_ItemInHands
string GetHitMessage(TotalDamageResult damageResult, int component, string zone, string ammo)

References component, DayZPlayerImplementFallDamage(), vector::Distance(), GetHitMessage(), GetPlayerPrefix(), and LogPrint().

◆ PlayerKilled()

void PluginBase::PlayerKilled ( PlayerBase player,
Object source )
inlineprotected

Definition at line 110 of file PluginAdminLog.c.

111 {
112
113 if (!player || !source)
114 {
115 LogPrint("DEBUG: PlayerKilled() player/source does not exist");
116 return;
117 }
118
119 PlayerBase playerSource = PlayerBase.Cast(EntityAI.Cast(source).GetHierarchyParent());
120 if (!playerSource)
122
124 if (playerSource)
126
127 playerPrefix = GetPlayerPrefix(player, player.GetIdentity());
128 if (player == source) // deaths not caused by another object (starvation, dehydration)
129 {
130 m_StatWater = player.GetStatWater();
131 m_StatEnergy = player.GetStatEnergy();
132 m_BleedMgr = player.GetBleedingManagerServer();
133
135 LogPrint(playerPrefix + " died. Stats> Water: " + m_StatWater.Get().ToString() + " Energy: " + m_StatEnergy.Get().ToString() + " Bleed sources: " + m_BleedMgr.GetBleedingSourcesCount().ToString());
136 else if (m_StatWater && m_StatEnergy && !m_BleedMgr)
137 LogPrint(playerPrefix + " died. Stats> Water: " + m_StatWater.Get().ToString() + " Energy: " + m_StatEnergy.Get().ToString());
138 else
139 LogPrint(playerPrefix + " died. Stats> could not fetch");
140 }
141 else if (source.IsWeapon() || source.IsMeleeWeapon()) // player
142 {
143
144 if (source.IsMeleeWeapon())
145 LogPrint(playerPrefix + " killed by " + playerPrefix2 + " with " + source.GetDisplayName());
146 else
147 {
148 m_Distance = vector.Distance(player.GetPosition(), playerSource.GetPosition());
149 LogPrint(playerPrefix + " killed by " + playerPrefix2 + " with " + source.GetDisplayName() + " from " + m_Distance + " meters ");
150 }
151 }
152 else
153 {
154 if (playerSource)
155 {
156 //fists
157 LogPrint(playerPrefix + " killed by " + playerPrefix2 + " with (MeleeFist)");
158 }
159 else
160 {
161 //rest, Animals, Zombies
162 LogPrint(playerPrefix + " killed by " + source.GetType());
163 }
164
165 }
166 }
BleedingSourcesManagerServer m_BleedMgr
PlayerStat< float > m_StatWater
PlayerStat< float > m_StatEnergy

References vector::Distance(), GetPlayerPrefix(), and LogPrint().

◆ PlayerList()

void PluginBase::PlayerList ( )
inlineprotected

Definition at line 348 of file PluginAdminLog.c.

349 {
350 GetGame().GetPlayers(m_PlayerArray);
351
352 if (m_PlayerArray.Count() != 0)
353 {
354 LogPrint("##### PlayerList log: " + m_PlayerArray.Count().ToString() + " players");
355
356 foreach (Man player: m_PlayerArray)
357 {
358 m_Player = PlayerBase.Cast(player);
360
362 }
363
364 LogPrint("#####");
365 }
366 }
autoptr array< Man > m_PlayerArray

References GetGame(), GetPlayerPrefix(), LogPrint(), m_Player, and m_PlayerArray.

◆ PlayPause()

void PluginBase::PlayPause ( )
inlineprotected

Definition at line 52 of file PluginCameraTools.c.

53 {
54 if (GetGame().GetUIManager().GetMenu())
55 GetGame().GetUIManager().GetMenu().OnKeyPress(null, 0, 0, KeyCode.KC_P);
56 }

References GetGame().

◆ PluginAdminLog()

void PluginBase::PluginAdminLog ( )
inlineprotected

Definition at line 42 of file PluginAdminLog.c.

43 {
44 m_HitFilter = GetGame().ServerConfigGetInt("adminLogPlayerHitsOnly"); // 1 - log player hits only / 0 - log all hits ( animals/infected )
45 m_PlacementFilter = GetGame().ServerConfigGetInt("adminLogPlacement"); // 1 - log placement ( traps, tents )
46 m_ActionsFilter = GetGame().ServerConfigGetInt("adminLogBuildActions"); // 1 - log basebuilding actions ( build, dismantle, destroy )
47 m_PlayerListFilter = GetGame().ServerConfigGetInt("adminLogPlayerList"); // 1 - log periodic player list with position every 5 minutes
48
50
51 if (m_PlayerListFilter == 1)
52 {
53 m_Timer = new Timer();
54 m_Timer.Run(TIMER_PLAYERLIST, this, "PlayerList", NULL, true);
55 }
56 }
int m_PlayerListFilter
const int TIMER_PLAYERLIST
ref Timer m_Timer

References GetGame(), m_ActionsFilter, and m_Timer.

◆ PluginConfigViewer()

void PluginBase::PluginConfigViewer ( )
inlineprivate

Definition at line 3 of file PluginConfigViewer.c.

4 {
5 }

◆ PluginDayZInfectedDebug()

void PluginBase::PluginDayZInfectedDebug ( )
inlineprivate

Definition at line 103 of file PluginDayZInfectedDebug.c.

104 {
105#ifndef NO_GUI
107#endif
108 }

References CreateModuleWidgets().

◆ PluginDeveloper()

void PluginBase::PluginDeveloper ( )
inlineprotected

Definition at line 43 of file PluginDeveloper.c.

44 {
45
46 }

◆ PluginDeveloperSync()

◆ PluginDrawCheckerboard()

void PluginBase::PluginDrawCheckerboard ( )
inlineprivate

Definition at line 9 of file PluginDrawCheckerboard.c.

10 {
12 }

References CreateWidgetOverlay().

◆ PluginFileHandler()

void PluginBase::PluginFileHandler ( )
inlineprivate

Definition at line 24 of file PluginFileHandler.c.

25 {
27 m_LineLimit = -1;
28
29 LoadFile();
30 }

◆ PluginHorticulture()

void PluginBase::PluginHorticulture ( )
inlineprivate

Definition at line 5 of file PluginHorticulture.c.

References LoadFromCfg().

◆ PluginKeyBinding()

void PluginBase::PluginKeyBinding ( )
inlineprivate

Definition at line 19 of file PluginKeyBinding.c.

20 {
21 if (instance == null)
22 instance = this;
23 }

◆ PluginMessageManager()

void PluginBase::PluginMessageManager ( )
inlineprivate

Definition at line 9 of file PluginMessageManager.c.

10 {
11 for (int i = 0; i < NUM_OF_CHANNELS; i++)
13 }
const int NUM_OF_CHANNELS
Definition constants.c:325

References NUM_OF_CHANNELS.

◆ PluginObjectsInteractionManager()

void PluginBase::PluginObjectsInteractionManager ( )
inlineprivate

Definition at line 9 of file PluginObjectsInteractionManager.c.

10 {
13 //TIMERDEPRECATED - timer for decaying objects
14 m_DecayTimer = new Timer();
15 m_DecayTimer.Run(TICK_RATE, this, "Decay", NULL, true);
16 }

References m_DecayTimer.

◆ PluginPlayerStatus()

void PluginBase::PluginPlayerStatus ( )
inlineprivate

Definition at line 8 of file PluginPlayerStatus.c.

9 {
10 m_NotifiersLabel = new multiMap<int, string>; // [key] label
11 m_NotifiersIndexColor = new multiMap<int, int>; // [key] index, color
12
13 m_NotifiersIcons = new multiMap<int, string>; // [key] iconName
14 m_NotifiersIcons.Insert(NTFKEY_HUNGRY, "iconHunger");
15 m_NotifiersIcons.Insert(NTFKEY_THIRSTY, "iconThirsty");
16 m_NotifiersIcons.Insert(NTFKEY_SICK, "iconHealth");
17 m_NotifiersIcons.Insert(NTFKEY_BACTERIA, "iconBacteria");
18 m_NotifiersIcons.Insert(NTFKEY_BLEEDISH, "iconBlood");
19 m_NotifiersIcons.Insert(NTFKEY_FEVERISH, "iconTemperature");
20 m_NotifiersIcons.Insert(NTFKEY_FRACTURE, "iconFracture");
21 }
const int NTFKEY_BACTERIA
Definition _constants.c:45
const int NTFKEY_SICK
Definition _constants.c:40
enum eBadgeLevel NTFKEY_THIRSTY
const int NTFKEY_HUNGRY
Definition _constants.c:34
const int NTFKEY_FRACTURE
Definition _constants.c:37
const int NTFKEY_BLEEDISH
Definition _constants.c:42
const int NTFKEY_FEVERISH
Definition _constants.c:39
ref multiMap< int, string > m_NotifiersLabel
ref multiMap< int, int > m_NotifiersIndexColor

References NTFKEY_BACTERIA, NTFKEY_BLEEDISH, NTFKEY_FEVERISH, NTFKEY_FRACTURE, NTFKEY_HUNGRY, NTFKEY_SICK, and NTFKEY_THIRSTY.

◆ PluginSceneManager()

void PluginBase::PluginSceneManager ( )
inlineprivate

Definition at line 21 of file PluginSceneManager.c.

22 {
23 if (instance == NULL)
24 instance = this;
25 }

◆ PluginTransmissionAgents()

void PluginBase::PluginTransmissionAgents ( )
inlineprivate

Definition at line 14 of file PluginTransmissionAgents.c.

References RegisterAgent().

◆ PluginUniversalTemperatureSourceClient()

void PluginBase::PluginUniversalTemperatureSourceClient ( )
inlineprotected

◆ PluginUniversalTemperatureSourceServer()

void PluginBase::PluginUniversalTemperatureSourceServer ( )
inlineprotected

◆ PluginVariables()

void PluginBase::PluginVariables ( )
inlineprivate

Definition at line 3 of file PluginVariables.c.

4 {
5 m_Id = 0;
7 // ("variable name")
8 RegisterVariable("varNote");
9 RegisterVariable("varColor");
10
11 }
void RegisterVariable(string name)

References m_Id, and RegisterVariable().

◆ PossesInfected()

void PluginBase::PossesInfected ( )
inlineprotected

Definition at line 367 of file PluginDayZInfectedDebug.c.

368 {
369 ResetValues();
370 FreeDebugCamera.GetInstance().SetActive(true);
371 m_ControlledInfected = DayZInfected.Cast(FreeDebugCamera.GetInstance().GetCrosshairObject());
372 FreeDebugCamera.GetInstance().SetActive(false);
373 }

References ResetValues().

◆ PrintedDebug()

void PluginBase::PrintedDebug ( )
inlineprotected

Definition at line 205 of file PluginUniversalTemperatureSourceClient.c.

206 {
208 {
209 PrintString("-------------------------------------");
210 utsd.Debug();
211 PrintString("-------------------------------------");
212 }
213 }

References m_UTemperatureSourceDebugs, and PrintString().

◆ PrintLogClient()

void PluginBase::PrintLogClient ( string msg_log)
inlineprotected

Definition at line 114 of file PluginDeveloper.c.

115 {
116 if (g_Game.GetUIManager().IsMenuOpen(MENU_SCRIPTCONSOLE))
117 {
120 }
121 }
const CallID CALL_ID_SCR_CNSL_ADD_PRINT
Definition Dispatcher.c:6
Param CallMethod(CallID call_id, Param params)
Definition Dispatcher.c:36

References CALL_ID_SCR_CNSL_ADD_PRINT, CallMethod(), g_Game, and MENU_SCRIPTCONSOLE.

◆ ProcessUniversalTemperatureSources()

void PluginBase::ProcessUniversalTemperatureSources ( )
inlineprotected

next temp source is too far (not cleaned on server, like in Environment, client need to know about all sources in MAXRANGE)

Definition at line 82 of file PluginUniversalTemperatureSourceClient.c.

83 {
84 if (m_UTemperatureSourceDebugs.Count() == 0)
85 {
87
88 return;
89 }
90
92
93 // get temperature from the source (based on distance), save it for min/max filtering
95 {
97 if (vector.DistanceSq(m_Player.GetPosition(), utsd.GetValue(0).ToVector()) > Math.SqrFloat(utsd.GetValue(2).ToFloat()))
98 continue;
99
101 }
102
103 float min = MiscGameplayFunctions.GetMinValue(utsTemperatures);
104 float max = MiscGameplayFunctions.GetMaxValue(utsTemperatures);
105
106 if (max > 0 && min < 0)
107 m_UTSAverageTemperature = (max + min) * 0.5;
108 else
110
111 }
float CalcTemperatureFromTemperatureSource(notnull UTemperatureSourceDebug utsd)
static proto native float DistanceSq(vector v1, vector v2)
Returns the square distance between tips of two 3D vectors.
static proto float SqrFloat(float f)
Returns squared value.

References CalcTemperatureFromTemperatureSource(), vector::DistanceSq(), m_Player, m_UTemperatureSourceDebugs, and Math::SqrFloat().

Referenced by DrawDebugs().

◆ QuickSort()

void PluginBase::QuickSort ( TStringArray arr,
int left,
int right )
inlineprivate

Definition at line 827 of file PluginDeveloper.c.

828 {
829 int j;
830
831 if (left < right)
832 {
834 QuickSort(arr, left, j - 1);
835 QuickSort(arr, j + 1, right);
836 }
837 }
int QuickSortPartition(TStringArray arr, int left, int right)
void QuickSort(TStringArray arr, int left, int right)

References QuickSort(), and QuickSortPartition().

Referenced by QuickSort(), and SortStringArray().

◆ QuickSortPartition()

int PluginBase::QuickSortPartition ( TStringArray arr,
int left,
int right )
inlineprivate

Definition at line 789 of file PluginDeveloper.c.

790 {
791 string pivot = arr.Get(left);
792 int i = left;
793 int j = right + 1;
794 string temp;
795
796 while (true)
797 {
798 while (true)
799 {
800 i++;
801 if (i > right || arr.Get(i) > pivot)
802 break;
803 }
804
805 while (true)
806 {
807 j--;
808 if (arr.Get(j) <= pivot)
809 break;
810 }
811
812 if (i >= j)
813 break;
814
815 temp = arr.Get(i);
816 arr.Set(i, arr.Get(j));
817 arr.Set(j, temp);
818 }
819
820 temp = arr.Get(left);
821 arr.Set(left, arr.Get(j));
822 arr.Set(j, temp);
823
824 return j;
825 }

Referenced by QuickSort().

◆ RegisterAgent()

void PluginBase::RegisterAgent ( AgentBase agent)
inlineprivate

Definition at line 27 of file PluginTransmissionAgents.c.

28 {
29 m_AgentList.Insert(agent.GetAgentType(), agent);
30 }

Referenced by PluginTransmissionAgents().

◆ RegisterKeyBind()

void PluginBase::RegisterKeyBind ( int ui_id,
int key_code1,
int key_code2,
string plugin_name,
string fnc_name,
string info_shortcut,
string info_description )
inlineprotected

◆ RegisterMouseBind()

void PluginBase::RegisterMouseBind ( int ui_id,
int mouse_button,
int mouse_event,
string plugin_name,
string fnc_name,
string info_shortcut,
string info_description )
inlineprotected

◆ RegisterPlayer()

void PluginBase::RegisterPlayer ( PlayerBase player)
inlineprivate

Definition at line 204 of file PluginDeveloperSync.c.

205 {
208 }
void RegisterPlayerData()

References IsPlayerRegistered(), and RegisterPlayerData().

Referenced by EnableUpdate().

◆ RegisterVariable()

void PluginBase::RegisterVariable ( string name)
inlineprivate

Definition at line 17 of file PluginVariables.c.

18 {
19 m_Id++;
20 m_Variables.Set(m_Id, name); //REWORK.V maybe have 2 maps, one with key
21
22 }

References m_Id, and name.

Referenced by PluginVariables().

◆ Release()

void PluginBase::Release ( Object target)
inlineprivate

Definition at line 40 of file PluginObjectsInteractionManager.c.

41 {
42 if (target && m_LockedObjects.Count() > 0)
43 {
44 for (int i = 0; i < m_LockedObjects.Count(); i++)
45 {
46 if (m_LockedObjects.Get(i) == target)
47 {
48 m_LockedObjects.Remove(i);
49 m_LockedObjectsDecay.Remove(i);
50 break;
51 }
52 }
53 }
54 }

◆ ReleaseFocus() [1/2]

void PluginBase::ReleaseFocus ( )
inlineprivate

Definition at line 150 of file PluginDayZInfectedDebug.c.

151 {
152 if (m_HasFocus)
153 {
154 GetGame().GetInput().ChangeGameFocus(-1);
155 GetGame().GetUIManager().ShowUICursor(false);
156 m_HasFocus = false;
157 }
158 }

References GetGame(), and m_HasFocus.

Referenced by ToggleDebugWindowEventOld(), ToggleDebugWindowEventP(), ToggleDebugWindowSetMode(), ToggleDebugWindowSetMode(), and ~PluginDayzPlayerDebug().

◆ ReleaseFocus() [2/2]

void PluginBase::ReleaseFocus ( )
inlineprivate

Definition at line 799 of file PluginDeveloperSync.c.

800 {
801 GetGame().GetInput().ChangeGameFocus(-1);
802 GetGame().GetUIManager().ShowUICursor(false);
803 }

References GetGame().

◆ RemoveAgent()

static void PluginBase::RemoveAgent ( EntityAI target,
int agent_id )
inlinestaticprivate

Definition at line 71 of file PluginTransmissionAgents.c.

72 {
73 target.RemoveAgent(agent_id);
74 }

◆ RemoveAllAgents()

void PluginBase::RemoveAllAgents ( EntityAI target)
inlineprivate

Definition at line 66 of file PluginTransmissionAgents.c.

67 {
68 target.RemoveAllAgents();
69 }

◆ Repair()

bool PluginBase::Repair ( PlayerBase player,
ItemBase repair_kit,
Object item,
float specialty_weight,
string damage_zone = "",
bool use_kit_qty = true )
inlineprivate

Definition at line 3 of file PluginRepairing.c.

4 {
5 switch (item.GetHealthLevel(damage_zone))
6 {
8 break;
10#ifdef DEVELOPER
11 Debug.Log("repairing from GameConstants.STATE_RUINED");
12#endif
14 break;
17 CalculateHealth(player, repair_kit, item, specialty_weight,/* GameConstants.DAMAGE_PRISTINE_VALUE,*/ damage_zone, use_kit_qty);
18 break;
19 default:
21 break;
22 }
23
24 return true;
25 }
void CalculateHealth(PlayerBase player, ItemBase kit, Object item, float specialty_weight, string damage_zone="", bool use_kit_qty=true)
const int STATE_PRISTINE
Definition constants.c:761

References Debug::Log(), GameConstants::STATE_PRISTINE, GameConstants::STATE_RUINED, and GameConstants::STATE_WORN.

◆ RequestDetailedInfo()

void PluginBase::RequestDetailedInfo ( int id,
notnull PlayerBase player )
inlineprivate

Definition at line 604 of file PluginDeveloperSync.c.

605 {
606 int modifier_id = Math.AbsInt(id);
607 m_RegisteredPlayers.Get(player).m_DetailedModifierIndex = modifier_id;
608
609 if (IsSetSystemInBitmask(player, PDS_SYSTEMS.MODS_DETAILED))
610 SetSystemInBitmask(player, PDS_SYSTEMS.MODS_DETAILED, false);
611 else
612 SetSystemInBitmask(player, PDS_SYSTEMS.MODS_DETAILED, true);
613 }
bool IsSetSystemInBitmask(PlayerBase player, int system_bit)

References Math::AbsInt(), IsSetSystemInBitmask(), and SetSystemInBitmask().

Referenced by OnRPC().

◆ RequestUniversalTemperatureSources()

void PluginBase::RequestUniversalTemperatureSources ( PlayerBase player,
int enable )
inlineprotected

Definition at line 186 of file PluginUniversalTemperatureSourceClient.c.

187 {
188 //Debug.Log("RequestUniversalTemperatureSources called", "PluginUniversalTemperatureSourceClient");
189
190 if (!enable)
191 {
193 m_Player = null;
194 EnableWidgets(false);
195 return;
196 }
197
198 ScriptRPC rpc = new ScriptRPC();
199 rpc.Write(enable);
200 rpc.Send(player, ERPCs.DEV_REQUEST_UTS_DEBUG, true, player.GetIdentity());
201
203 }

References EnableWidgets(), and m_Player.

◆ ResetGUI()

void PluginBase::ResetGUI ( )
inlineprivate

Definition at line 844 of file PluginDeveloper.c.

845 {
846 if (GetGame() && GetGame().GetMission())
847 GetGame().GetMission().ResetGUI();
848 }

References GetGame().

◆ ResetValues()

void PluginBase::ResetValues ( )
inlineprivate

Definition at line 347 of file PluginDayZInfectedDebug.c.

348 {
349 m_CH_DoTurn = false;
350 m_CH_DoVault = false;
351 m_CH_DoKnucleOut = false;
352 m_CH_GoToCrawl = false;
353 m_CH_DoHit = false;
354 m_CH_StartDeath = false;
355 m_CH_DoAttack = false;
356 m_MovementSpeedEB.SetText("0");
357 m_MainWnd.Update();
358 }

References m_MainWnd.

Referenced by OnClick(), and PossesInfected().

◆ RestoreSceneObjectsLinks()

void PluginBase::RestoreSceneObjectsLinks ( )
inlineprivate

Definition at line 300 of file PluginSceneManager.c.

301 {
303
304 for (int i = 0; i < scene_objects.Count(); i++)
305 {
307
308 array<int> linked_scene_objects_indices = scene_object.m_LinkedSceneObjectsIndices;
310 {
311 for (int j = 0; j < linked_scene_objects_indices.Count(); j++)
312 {
314 if (index >= 0 && index < scene_objects.Count())
315 {
316 scene_object.LinkSceneObject(scene_objects.Get(index), false);
317
318 //PrintString("Load link: "+ ToString(scene_object.GetObject()) +" <-> "+ ToString(scene_objects.Get(index).GetObject()) );
319 }
320 }
321 }
322 scene_object.m_LinkedSceneObjectsIndices = NULL;
323 }
324 }

◆ RulerAddPoint()

void PluginBase::RulerAddPoint ( )
inlineprivate

Definition at line 877 of file PluginSceneManager.c.

878 {
880
881 m_RulerPoints.Insert(point_pos);
882
884 }
vector GetMousePositionInScene()

◆ RulerClearVisuals()

void PluginBase::RulerClearVisuals ( )
inlineprivate

Definition at line 889 of file PluginSceneManager.c.

890 {
891 for (int i = 0; i < m_RulerLines.Count(); ++i)
892 m_RulerLines.Get(i).Destroy();
893 m_RulerLines.Clear();
894
895 for (int j = 0; j < m_RulerSpheres.Count(); ++j)
896 m_RulerSpheres.Get(j).Destroy();
897 m_RulerSpheres.Clear();
898 }

◆ RulerDelete()

void PluginBase::RulerDelete ( )
inlineprivate

Definition at line 903 of file PluginSceneManager.c.

904 {
905 m_RulerPoints.Clear();
906
908 }

◆ RulerToggle()

void PluginBase::RulerToggle ( )
inlineprivate

Definition at line 856 of file PluginSceneManager.c.

857 {
858 if (IsRulerActivated())
859 m_RulerActivated = false;
860 else
861 m_RulerActivated = true;
862
864 }

◆ Save()

void PluginBase::Save ( )
inlineprotected

Definition at line 46 of file PluginCameraTools.c.

47 {
48 if (GetGame().GetUIManager().GetMenu())
49 GetGame().GetUIManager().GetMenu().OnKeyPress(null, 0, 0, KeyCode.KC_S);
50 }

References GetGame().

◆ SaveFile()

bool PluginBase::SaveFile ( )
inlineprivate

Definition at line 80 of file PluginFileHandler.c.

81 {
82 if (m_ReadOnly)
83 return false;
84
87
88 //Log("SaveFile -> Opening File: "+GetFileName());
89
91
92 if (file_index == 0)
93 return false;
94
95 for (int i = 0; i < m_FileContent.Count(); ++i)
96 {
97 //Log("SaveFile -> Writing: "+m_FileContent.Get(i));
99 }
100
102
103 return true;
104 }
string GetSubFolderName()
proto native bool MakeDirectory(string name)
Makes a directory.
proto bool FileExist(string name)
Check existence of file.
proto void FPrintln(FileHandle file, void var)
Write to file and add new line.

References CloseFile(), FileExist(), FPrintln(), PluginFileHandler::GetFileName(), GetSubFolderName(), MakeDirectory(), and OpenFile().

◆ SceneCanDelete()

bool PluginBase::SceneCanDelete ( string scene_name)
inlineprivate

Definition at line 742 of file PluginSceneManager.c.

743 {
744 if (scene_name == m_SceneData.GetNameScene())
745 return false;
746
747 return true;
748 }

◆ SceneDelete()

bool PluginBase::SceneDelete ( string scene_name)
inlineprivate

Definition at line 753 of file PluginSceneManager.c.

754 {
755 if (scene_name == m_SceneData.GetNameScene())
756 return false;
757
758 m_ModuleConfigScene.SceneDelete(scene_name);
759
760 EditorUpdate();
761
762 return true;
763 }

◆ SceneDuplicate()

void PluginBase::SceneDuplicate ( string scene_name)
inlineprivate

Definition at line 768 of file PluginSceneManager.c.

769 {
770 m_ModuleConfigScene.SceneDuplicate(scene_name);
771
772 EditorUpdate();
773 }

◆ SceneEditorMenuCmdPopup()

void PluginBase::SceneEditorMenuCmdPopup ( string message)
inlineprivate

Definition at line 1121 of file PluginSceneManager.c.

1122 {
1124 }
const CallID CALL_ID_SCENE_EDITOR_COMMAND
Definition Dispatcher.c:9
static const int SCENE_EDITOR_CMD_POPUP

References CALL_ID_SCENE_EDITOR_COMMAND, and CallMethod().

◆ SceneEditorMenuCmdRefresh()

void PluginBase::SceneEditorMenuCmdRefresh ( )
inlineprivate

◆ SceneEditorMenuCmdSave()

void PluginBase::SceneEditorMenuCmdSave ( )
inlineprivate

◆ SceneGetName()

string PluginBase::SceneGetName ( )
inlineprivate

Definition at line 791 of file PluginSceneManager.c.

792 {
793 if (m_SceneData)
794 return m_SceneData.GetNameScene();
795
796 return STRING_EMPTY;
797 }
const string STRING_EMPTY
Definition constants.c:54

References STRING_EMPTY.

◆ SceneLoad()

void PluginBase::SceneLoad ( string scene_name)
inlineprivate

Definition at line 708 of file PluginSceneManager.c.

709 {
710 SceneUnload();
711
712 PluginMissionConfig.GetInstance().SetSceneEditorName(scene_name);
714
715 if (!(GetGame().IsMultiplayer() && GetGame().IsServer()))
716 EditorUpdate();
717 }

References GetGame().

◆ SceneRename()

void PluginBase::SceneRename ( string scene_name,
string new_name )
inlineprivate

Definition at line 778 of file PluginSceneManager.c.

779 {
781
782 if (scene_name == m_SceneData.GetNameScene())
783 m_SceneData.SetNameScene(new_name);
784
785 EditorUpdate();
786 }

◆ SceneSave()

void PluginBase::SceneSave ( )
inlineprivate

Definition at line 731 of file PluginSceneManager.c.

732 {
733 m_ModuleConfigScene.ClearParams();
734 m_ModuleConfigScene.SceneDataSave(m_SceneData);
736 EditorUpdate();
737 }
void SceneEditorMenuCmdSave()

◆ SceneUnload()

void PluginBase::SceneUnload ( )
inlineprivate

Definition at line 722 of file PluginSceneManager.c.

723 {
726 }

◆ ScriptHistoryBack()

void PluginBase::ScriptHistoryBack ( )
inlineprivate

Definition at line 761 of file PluginDeveloper.c.

762 {
763 // Console key press
764 if (g_Game.GetUIManager().IsMenuOpen(MENU_SCRIPTCONSOLE))
766 }
const CallID CALL_ID_SCR_CNSL_HISTORY_BACK
Definition Dispatcher.c:4

References CALL_ID_SCR_CNSL_HISTORY_BACK, CallMethod(), g_Game, and MENU_SCRIPTCONSOLE.

◆ ScriptHistoryNext()

void PluginBase::ScriptHistoryNext ( )
inlineprivate

Definition at line 754 of file PluginDeveloper.c.

755 {
756 // Console key press
757 if (g_Game.GetUIManager().IsMenuOpen(MENU_SCRIPTCONSOLE))
759 }
const CallID CALL_ID_SCR_CNSL_HISTORY_NEXT
Definition Dispatcher.c:5

References CALL_ID_SCR_CNSL_HISTORY_NEXT, CallMethod(), g_Game, and MENU_SCRIPTCONSOLE.

◆ SelectAndFocusPlayerObject()

void PluginBase::SelectAndFocusPlayerObject ( )
inlineprivate

Definition at line 825 of file PluginSceneManager.c.

826 {
828 for (int i = 0; i < scene_objects.Count(); i++)
829 {
830 if (scene_objects.Get(i).GetObject() == GetGame().GetPlayer())
831 {
834 break;
835 }
836 }
837 }
void SelectedObjectFocus()

References GetGame(), and GetPlayer().

◆ SelectClassName()

void PluginBase::SelectClassName ( string class_name)
inlineprivate

Definition at line 373 of file PluginSceneManager.c.

374 {
376 }

References class_name.

◆ SelectedObjectAddAttachment()

void PluginBase::SelectedObjectAddAttachment ( string att_name)
inlineprivate

Definition at line 607 of file PluginSceneManager.c.

608 {
611
612 EditorUpdate();
613 }
void AddAttachment(string att_name)

◆ SelectedObjectDuplicate()

void PluginBase::SelectedObjectDuplicate ( )
inlineprivate

Definition at line 465 of file PluginSceneManager.c.

466 {
468
469 if (selected_obj)
470 {
471 if (selected_obj.GetObject() == PLAYER)
472 return;
473
475
476 vector new_pos = selected_obj.GetPosition() + Vector(1, 0, 1) + size;
477
478 SceneObject obj = m_SceneData.CreateSceneObject(selected_obj.GetTypeName(), new_pos);
479 obj.SetRotation(selected_obj.GetRotation());
480
481 array<EntityAI> attachments = selected_obj.GetAttachments();
482 for (int i = 0; i < attachments.Count(); i++)
483 obj.AddAttachment(attachments.Get(i).GetType());
484
485 SelectObject(obj);
486 }
487 }
void SetRotation(float rot)
vector GetSize()

References SceneObject::AddAttachment(), PLAYER, SceneObject::SetRotation(), and Vector().

◆ SelectedObjectFocus()

void PluginBase::SelectedObjectFocus ( )
inlineprivate

Definition at line 572 of file PluginSceneManager.c.

573 {
575
576 if (selected_obj)
577 {
578 vector cam_pos = FreeDebugCamera.GetInstance().GetPosition();
579 vector obj_pos = selected_obj.GetPosition();
581
582 vector obj_size = selected_obj.GetSize();
583
585
586 cam_pos[0] = cam_pos[0] + (obj_size[0] * 2);
587 cam_pos[1] = cam_pos[1] + obj_size[1] + 0.5;
588 cam_pos[2] = cam_pos[2] + (obj_size[2] * 2);
589
590 view_target[1] = view_target[1] + (obj_size[1] * 0.5);
591
593 cam_dir.Normalize();
594
595 FreeDebugCamera.GetInstance().SetPosition(cam_pos);
596 FreeDebugCamera.GetInstance().SetDirection(cam_dir);
597
598 //vector debug_pos = cam_pos + (cam_dir * 50);
599 //Debug.DrawLine(cam_pos, debug_pos);
600 //Debug.DrawSphere(cam_pos);
601 }
602 }

◆ SelectedObjectRemoveAttachment()

void PluginBase::SelectedObjectRemoveAttachment ( EntityAI e)
inlineprivate

Definition at line 618 of file PluginSceneManager.c.

619 {
622
623 EditorUpdate();
624 }
void RemoveAttachment(EntityAI e)

◆ SelectedObjectSetDamage()

void PluginBase::SelectedObjectSetDamage ( float value)
inlineprivate

Definition at line 556 of file PluginSceneManager.c.

557 {
560
561 if (selected_obj)
562 {
563 selected_obj.SetHealth(Math.Clamp(value, 0, selected_obj_EAI.GetMaxHealth("", "")));
564
565 EditorUpdate();
566 }
567 }

References Math::Clamp().

◆ SelectedObjectSetPosX()

void PluginBase::SelectedObjectSetPosX ( float value)
inlineprivate

Definition at line 505 of file PluginSceneManager.c.

506 {
508
509 if (selected_obj)
510 {
511 vector v = selected_obj.GetPosition();
512 v[0] = value;
513 selected_obj.SetPosition(v);
514
515 EditorUpdate();
516 }
517 }

◆ SelectedObjectSetPosY()

void PluginBase::SelectedObjectSetPosY ( float value)
inlineprivate

Definition at line 522 of file PluginSceneManager.c.

523 {
525
526 if (selected_obj)
527 {
528 vector v = selected_obj.GetPosition();
529 v[1] = value;
530 selected_obj.SetPosition(v);
531
532 EditorUpdate();
533 }
534 }

◆ SelectedObjectSetPosZ()

void PluginBase::SelectedObjectSetPosZ ( float value)
inlineprivate

Definition at line 539 of file PluginSceneManager.c.

540 {
542
544 {
545 vector v = selected_obj.GetPosition();
546 v[2] = value;
547 selected_obj.SetPosition(v);
548
549 EditorUpdate();
550 }
551 }

◆ SelectedObjectSetRot()

void PluginBase::SelectedObjectSetRot ( float dir)
inlineprivate

Definition at line 492 of file PluginSceneManager.c.

493 {
495 {
497
498 EditorUpdate();
499 }
500 }

◆ SelectObject()

void PluginBase::SelectObject ( SceneObject obj)
inlineprivate

Definition at line 442 of file PluginSceneManager.c.

443 {
445 return;
446
448
449 m_SelectedObject = obj;
450
451 EditorUpdate();
452 }

References m_SelectedObject.

◆ SendDebug() [1/2]

void PluginBase::SendDebug ( )
inlineprivate

Definition at line 53 of file PluginRemotePlayerDebugServer.c.

54 {
55#ifdef DIAG_DEVELOPER
58
59 for (int i = 0; i < m_ClientList.Count(); ++i)
60 {
62 if (player)
63 {
64 ScriptRPC rpc = new ScriptRPC();
66
68 {
69 if (player2)
70 player_damage.Insert(value);
71
72 //int xs = 1 + 1;
73 }
74
75 rpc.Write(player_damage);
76
77 rpc.Send(player, ERPCs.DEV_PLAYER_DEBUG_DATA, true, player.GetIdentity());
78 m_PlayerDebugDamage.Clear();
79 }
80 else
81 {
82 m_ClientList.Remove(i);
83 --i;
84 }
85 }
86#endif
87 }

References m_PlayerDebugDamage, and m_PlayerDebugStats.

Referenced by OnUpdate().

◆ SendDebug() [2/2]

void PluginBase::SendDebug ( )
inlineprotected

Definition at line 81 of file PluginUniversalTemperatureSourceServer.c.

82 {
83 int clientCount = m_ClientList.Count();
85 {
86 if (player)
87 {
89 ScriptRPC rpc = new ScriptRPC();
91 rpc.Send(player, ERPCs.DEV_UTS_DEBUG_DATA, true, player.GetIdentity());
92 }
93 else
94 m_ClientList.RemoveItem(player);
95 }
96 }
void GatherTemperatureSources(PlayerBase player)

References GatherTemperatureSources(), and m_ClientList.

◆ SendRPCAgents()

void PluginBase::SendRPCAgents ( PlayerBase player)
inlineprivate

Definition at line 681 of file PluginDeveloperSync.c.

682 {
683 //write and send values
684 if ((player && player.GetIdentity() && player.m_AgentPool != null) || (player && !GetGame().IsMultiplayer() && player.m_AgentPool != null))
685 {
686
687 //get agent pool data
689 player.m_AgentPool.GetDebugObject(agent_pool);
690
691 GetDayZGame().RPC(player, ERPCs.DEV_RPC_AGENTS_DATA, agent_pool, true, player.GetIdentity());
692 }
693 }

References GetDayZGame(), and GetGame().

Referenced by Update().

◆ SendRPCLevels()

void PluginBase::SendRPCLevels ( PlayerBase player)
inlineprivate

Definition at line 462 of file PluginDeveloperSync.c.

463 {
464 //write and send values
465 if (player)
466 {
468
469 rpc_params.Insert(new Param3<string, float, float>("Immunity: " + typename.EnumToString(EStatLevels, player.GetImmunityLevel()), player.GetImmunityLevel(), player.GetBordersImmunity()));
470 rpc_params.Insert(new Param3<string, float, float>("Blood: " + typename.EnumToString(EStatLevels, player.GetStatLevelBlood()), player.GetStatLevelBlood(), player.GetStatBordersBlood()));
471 rpc_params.Insert(new Param3<string, float, float>("Health: " + typename.EnumToString(EStatLevels, player.GetStatLevelHealth()), player.GetStatLevelHealth(), player.GetStatBordersHealth()));
472 rpc_params.Insert(new Param3<string, float, float>("Energy: " + typename.EnumToString(EStatLevels, player.GetStatLevelEnergy()), player.GetStatLevelEnergy(), player.GetStatBordersEnergy()));
473 rpc_params.Insert(new Param3<string, float, float>("Water: " + typename.EnumToString(EStatLevels, player.GetStatLevelWater()), player.GetStatLevelWater(), player.GetStatBordersWater()));
474
475 int param_count = rpc_params.Count();
476 rpc_params.InsertAt(new Param3<string, float, float>("PARAM_COUNT", param_count, 0), 0);
477 //send params
478 GetDayZGame().RPC(player, ERPCs.DEV_RPC_LEVELS_DATA, rpc_params, true, player.GetIdentity());
479 }
480 }
EStatLevels
Definition EStatLevels.c:2

References GetDayZGame().

Referenced by Update().

◆ SendRPCMods()

void PluginBase::SendRPCMods ( PlayerBase player)
inlineprivate

Definition at line 504 of file PluginDeveloperSync.c.

505 {
506 //write and send values
507 if (player)
508 {
510
511 //get modifiers
512 ModifiersManager mods_manager = player.GetModifiersManager();
513
514 //param count
516 mods_manager.DbgGetModifiers(modifiers);
517
518 float param_count = (float) modifiers.Count();
520
521 //set modifiers
522 for (int i = 0; i < modifiers.Count(); ++i)
523 {
524 int id = modifiers.Get(i).GetID();
525 string name = modifiers.Get(i).GetName();
526 bool active = modifiers.Get(i).IsActive();
527 bool locked = modifiers.Get(i).IsLocked();
528
530 }
531
532 //send params
533 GetDayZGame().RPC(player, ERPCs.DEV_RPC_MODS_DATA, rpc_params, true, player.GetIdentity());
534 }
535 }

References GetDayZGame(), ModifiersManager(), and name.

Referenced by Update().

◆ SendRPCModsDetail()

void PluginBase::SendRPCModsDetail ( PlayerBase player)
inlineprivate

Definition at line 541 of file PluginDeveloperSync.c.

542 {
543 //write and send values
544 if (player)
545 {
547 ModifiersManager mods_manager = player.GetModifiersManager();
548 int mod_id = m_RegisteredPlayers.Get(player).m_DetailedModifierIndex;
549 p1.param1 = mods_manager.GetModifier(mod_id).GetDebugText();
550 //send params
551 if (p1.param1 != "")
552 GetDayZGame().RPCSingleParam(player, ERPCs.DEV_RPC_MODS_DATA_DETAILED, p1, true, player.GetIdentity());
553 }
554 }

References GetDayZGame(), and ModifiersManager().

Referenced by Update().

◆ SendRPCStats()

void PluginBase::SendRPCStats ( PlayerBase player)
inlineprivate

Definition at line 373 of file PluginDeveloperSync.c.

374 {
375 //write and send values
376 if (player)
377 {
379
380 //param count
381 for (int i = 0; i < player.m_PlayerStats.GetPCO().Get().Count(); i++)
382 {
383 string label = player.m_PlayerStats.GetPCO().Get().Get(i).GetLabel();
384 float value = (float) player.m_PlayerStats.GetPCO().Get().Get(i).Get();
385 float value_norm = (float) player.m_PlayerStats.GetPCO().Get().Get(i).GetNormalized();
387 }
388 rpc_params.Insert(new Param3<string, float, float>("(NaS)Immunity", player.GetImmunity(), 0));
389 rpc_params.Insert(new Param3<string, float, float>("(NaS)BrokenLegs", player.m_BrokenLegState, 0));
390
391 rpc_params.InsertAt(new Param1<int>(rpc_params.Count()), 0); // param count
392 //send params
393 GetDayZGame().RPC(player, ERPCs.DEV_RPC_STATS_DATA, rpc_params, true, player.GetIdentity());
394 }
395 }

References Count, Get(), and GetDayZGame().

Referenced by Update().

◆ SendRPCStomach()

void PluginBase::SendRPCStomach ( PlayerBase player)
inlineprivate

Definition at line 721 of file PluginDeveloperSync.c.

722 {
723 //write and send values
724 if (player)
725 {
727 int count = player.m_PlayerStomach.GetDebugObject(stomach);
728 stomach.InsertAt(new Param1<int>(count), 0);
729
730 GetDayZGame().RPC(player, ERPCs.DEV_RPC_STOMACH_DATA, stomach, true, player.GetIdentity());
731 }
732 }

References GetDayZGame().

Referenced by Update().

◆ SendRPCTemp()

void PluginBase::SendRPCTemp ( PlayerBase player)
inlineprivate

Definition at line 656 of file PluginDeveloperSync.c.

657 {
658 if (player)
659 {
660 CachedObjectsParams.PARAM1_STRING.param1 = player.m_Environment.GetDebugMessage();
661 GetDayZGame().RPCSingleParam(player, ERPCs.DEV_TEMP_UPDATE, CachedObjectsParams.PARAM1_STRING, true, player.GetIdentity());
662 }
663 }

References GetDayZGame(), and CachedObjectsParams::PARAM1_STRING.

Referenced by Update().

◆ SendServerLogToClient()

void PluginBase::SendServerLogToClient ( string msg)
inlineprotected

Definition at line 124 of file PluginDeveloper.c.

125 {
126 if (GetGame())
127 {
129 GetGame().GetPlayers(players);
130
131 for (int i = 0; i < players.Count(); ++i)
132 {
134 Man player = players.Get(i);
135
136 if (player && player.HasNetworkID())
137 player.RPCSingleParam(ERPCs.DEV_RPC_SEND_SERVER_LOG, param, true, player.GetIdentity());
138 }
139 }
140 }

References GetGame().

◆ SetBadge()

void PluginBase::SetBadge ( int key,
int value )
inlineprivate

Definition at line 62 of file PluginPlayerStatus.c.

63 {
64 if (key)
65 {
66 Mission mission = GetGame().GetMission();
67 if (mission)
68 {
70 if (hud)
71 hud.DisplayBadge(key, value);
72 }
73 }
74 }

References GetGame(), Mission::GetHud(), and mission.

◆ SetDate()

void PluginBase::SetDate ( int year,
int month,
int day,
int hour,
int minute )
inlineprivate

Definition at line 813 of file PluginSceneManager.c.

814 {
815 m_SceneData.SetInitYear(year);
816 m_SceneData.SetInitMonth(month);
817 m_SceneData.SetInitDay(day);
818 m_SceneData.SetInitHour(hour);
819 m_SceneData.SetInitMinute(minute);
820 }

◆ SetDeveloperItemClient()

void PluginBase::SetDeveloperItemClient ( )
inlineprivate

Definition at line 872 of file PluginDeveloper.c.

873 {
874#ifdef DEVELOPER
877
879 if (debugCam && debugCam.GetCurrentCamera())
880 entity = debugCam.GetCrosshairObject();
881 else
882 {
883
884 if (player && player.GetActionManager())
885 {
886 ActionTarget at = player.GetActionManager().FindActionTarget();
887 entity = at.GetObject();
888 }
889 }
890
891 if (entity)
893#endif
894 }
static void SetDeveloperItemClientEx(notnull Object entity, bool getFocus=false)

References GetGame(), GetPlayer(), and SetDeveloperItemClientEx().

◆ SetDeveloperItemClientEx()

static void PluginBase::SetDeveloperItemClientEx ( notnull Object entity,
bool getFocus = false )
inlinestaticprivate

Definition at line 850 of file PluginDeveloper.c.

851 {
853
854 if (getFocus)
855 {
856 GetGame().GetInput().ChangeGameFocus(1);
857 GetGame().GetUIManager().ShowUICursor(true);
858 }
859
860 if (GetGame().IsMultiplayer())
861 GetGame().RPCSingleParam(GetGame().GetPlayer(), ERPCs.DEV_SET_DEV_ITEM, new Param1<Object>(entity), true, GetGame().GetPlayer().GetIdentity());
862 else
863 {
865 mid2.RegisterDebugItem(entity, player);
866 }
867#ifdef DEVELOPER
869#endif
870 }
void PluginItemDiagnostic()

References GetGame(), GetPlayer(), GetPlugin(), and PluginItemDiagnostic().

Referenced by SetDeveloperItemClient().

◆ SetDrawSelection()

void PluginBase::SetDrawSelection ( bool draw)
inlineprivate

Definition at line 658 of file PluginSceneManager.c.

659 {
660 m_ModuleConfigDebugProfile.SetSceneEditorDrawSelection(draw);
661
662 EditorUpdate();
663 }

◆ SetLoadPlayerPos()

void PluginBase::SetLoadPlayerPos ( bool save)
inlineprivate

Definition at line 676 of file PluginSceneManager.c.

677 {
678 m_ModuleConfigDebugProfile.SetSceneEditorLoadPlayerPos(save);
679 }

◆ SetNotifier()

void PluginBase::SetNotifier ( int key,
int index = 9,
string label = "",
int color = 0xFFFFFFFF )
inlineprivate

Definition at line 23 of file PluginPlayerStatus.c.

24 {
25 if (key)
26 {
27 if (m_NotifiersLabel.HasKey(key))
28 {
29 m_NotifiersLabel.Remove(key);
31 }
32
33 if (label != "")
34 {
35 m_NotifiersLabel.Insert(key, label);
38 }
39 }
40 }

◆ SetRotationAngle()

void PluginBase::SetRotationAngle ( int angle)
inlineprivate

Definition at line 692 of file PluginSceneManager.c.

693 {
694 m_ModuleConfigDebugProfile.SetSceneEditorRotationAngle(angle);
695 }

◆ SetStamina()

void PluginBase::SetStamina ( int value,
int range )
inlineprivate

Definition at line 76 of file PluginPlayerStatus.c.

77 {
78 // Log( String( "SetStamina" + itoa( value) ), LogTemplates.TEMPLATE_JANOSIK );
79 Mission mission = GetGame().GetMission();
80 if (mission)
81 {
83 if (hud)
84 hud.SetStamina(Math.Clamp(value, 0, range), range);
85 }
86 }

References Math::Clamp(), GetGame(), Mission::GetHud(), and mission.

◆ SetStance()

void PluginBase::SetStance ( int value)
inlineprivate

Definition at line 88 of file PluginPlayerStatus.c.

89 {
90 Mission mission = GetGame().GetMission();
91 if (mission)
92 {
94 if (hud)
95 hud.DisplayStance(value);
96 }
97 }

References GetGame(), Mission::GetHud(), and mission.

◆ SetSystemInBitmask()

void PluginBase::SetSystemInBitmask ( PlayerBase player,
int system_bit,
bool state )
inlineprivate

Definition at line 181 of file PluginDeveloperSync.c.

182 {
184 {
185 int current_mask = m_RegisteredPlayers.Get(player).m_Bitmask;
186 if (state)
188 else
190 }
191
192 }

References IsPlayerRegistered().

Referenced by EnableUpdate(), and RequestDetailedInfo().

◆ SetupSpawnedEntity()

void PluginBase::SetupSpawnedEntity ( PlayerBase player,
EntityAI entity,
float health,
float quantity = -1,
bool special = false,
string presetName = "" )
inlineprotected

Definition at line 292 of file PluginDeveloper.c.

293 {
294#ifdef DEVELOPER
295 if (presetName && player.m_PresetSpawned)//this is how we ascertain this is the first item being spawned from a new preset after a previous preset was already spawned in
296 {
297 player.m_PresetItems.Clear();
298 player.m_PresetSpawned = false;//is set to 'true' elsewhere after all the items have been spawned in
299 }
300 if (entity.IsInherited(PlayerBase))
301 {
303 plr.OnSpawnedFromConsole();
304 }
305 else if (entity.IsInherited(ItemBase))
306 {
309 }
310 else if (entity.IsInherited(House))
311 {
312 entity.PlaceOnSurface();
313 vector pos = entity.GetPosition();
314 vector ori = GetGame().GetSurfaceOrientation(pos[0], pos[2]);
315 entity.SetOrientation(ori);
316 }
317 if (presetName)
318 player.m_PresetItems.Insert(entity);
319
320 if (special)
321 {
322 auto debugParams = DebugSpawnParams.WithPlayer(player);
323 entity.OnDebugSpawnEx(debugParams);
324 }
325#endif
326 }
void SetupSpawnedItem(ItemBase item, float health, float quantity)
Definition ItemBase.c:4700

References GetGame(), and SetupSpawnedItem().

Referenced by SpawnEntityOnCursorDir(), and SpawnEntityOnGroundPos().

◆ SetWatching()

void PluginBase::SetWatching ( bool enable)
inlineprivate

Definition at line 29 of file PluginRemotePlayerDebugServer.c.

30 {
32 }

◆ SetWeather()

void PluginBase::SetWeather ( float overcast,
float rain,
float fog,
float wind_force )
inlineprivate

Definition at line 802 of file PluginSceneManager.c.

803 {
804 m_SceneData.SetInitOvercast(overcast);
805 m_SceneData.SetInitRain(rain);
806 m_SceneData.SetInitFog(fog);
807 m_SceneData.SetInitWindForce(wind_force);
808 }

◆ Show() [1/3]

void PluginBase::Show ( )
inlineprivate

Definition at line 161 of file PluginDayZInfectedDebug.c.

162 {
163 ShowWidgets(true);
164 m_IsActive = true;
165
166 GetUApi().ActivateExclude("menu");
167 GetUApi().UpdateControls();
168
169 if (!m_TickTimer)
170 {
171 m_TickTimer = new Timer();
172 m_TickTimer.Run(0.1, this, "Tick", NULL, true);
173 }
174 }

References GetUApi(), m_IsActive, m_TickTimer, and ShowWidgets().

Referenced by EnableWidgets(), SetDebugShowMode(), ToggleDebugWindowEventOld(), ToggleDebugWindowEventP(), ToggleDebugWindowSetMode(), and ToggleDebugWindowSetMode().

◆ Show() [2/3]

void PluginBase::Show ( )
inlineprivate

Definition at line 74 of file PluginDrawCheckerboard.c.

75 {
76 ShowWidgets(true);
77 m_IsActive = true;
78 }

References m_IsActive, and ShowWidgets().

◆ Show() [3/3]

void PluginBase::Show ( )
inlineprivate

Definition at line 19 of file PluginSoundDebug.c.

20 {
21 m_TickTimer = new Timer();
22 m_TickTimer.Run(0.1, this, "OnGUITimer", NULL, true);
23 }

References m_TickTimer.

◆ ShowCard()

void PluginBase::ShowCard ( int pCard)
inlineprivate

Definition at line 275 of file PluginDayZInfectedDebug.c.

276 {
277 m_CardMovementFrame.Show(pCard == 0);
278 m_CardFightFrame.Show(pCard == 1);
279 }

Referenced by CreateModuleWidgets(), CreateModuleWidgets(), and OnClick().

◆ ShowWidgets() [1/2]

void PluginBase::ShowWidgets ( bool show)
inlineprivate

Definition at line 188 of file PluginDayZInfectedDebug.c.

189 {
190 if (m_MainWnd)
191 m_MainWnd.Show(show);
192 }

References m_MainWnd.

Referenced by Hide(), Hide(), Show(), and Show().

◆ ShowWidgets() [2/2]

void PluginBase::ShowWidgets ( bool show)
inlineprivate

Definition at line 67 of file PluginDrawCheckerboard.c.

68 {
69 if (m_MainWindow)
70 m_MainWindow.Show(show);
71 }

◆ SortStringArray()

void PluginBase::SortStringArray ( TStringArray arr)
inlineprivate

Definition at line 839 of file PluginDeveloper.c.

840 {
841 QuickSort(arr, 0, arr.Count() - 1);
842 }

References QuickSort().

◆ SpawnEntityAsAttachment()

PluginBase::SpawnEntityAsAttachment ( PlayerBase player,
EntityAI parent,
string att_name,
float health,
float quantity )
inlineprotected

tries to spawn item as attachment

Parameters
[in]healthhealth of the item
[in]quantityquantity to set if item.HasQuantity() (-1 == set to max)
Returns
entity if ok, null otherwise

Definition at line 602 of file PluginDeveloper.c.

603 {
604 if (GetGame().IsServer())
605 {
606 Weapon_Base wpn = Weapon_Base.Cast(parent);
607 if (wpn)
608 {
609 GameInventory inventory = parent.GetInventory();
610 return inventory.CreateInInventory(att_name);
611 /*
612 vector pos = player.GetPosition();
613 EntityAI eai_gnd = SpawnEntityOnGroundPos(player, att_name, health, quantity, pos);
614 Magazine mag_gnd = Magazine.Cast(eai_gnd);
615 if (mag_gnd && player.GetWeaponManager().CanAttachMagazine(wpn, mag_gnd))
616 {
617 player.GetWeaponManager().AttachMagazine(mag_gnd);
618 }
619 return eai_gnd;
620 */
621 }
622 else
623 {
624 EntityAI eai = parent.GetInventory().CreateAttachment(att_name);
625 if (eai)
626 {
627 if (eai.IsInherited(ItemBase))
628 {
629 ItemBase i = ItemBase.Cast(eai);
631 }
632 return eai;
633 }
634 else
636 }
637 return NULL;
638 }
639 else
640 {
641 // Client -> Server Spawning: Client Side
643 player.RPCSingleParam(ERPCs.DEV_RPC_SPAWN_ITEM_AS_ATTACHMENT, params, true);
644 }
645 return NULL;
646 }
script counterpart to engine's class Inventory
Definition Inventory.c:79
void OnSpawnErrorReport(string name)

References GetGame(), OnSpawnErrorReport(), and SetupSpawnedItem().

◆ SpawnEntityInInventory()

PluginBase::SpawnEntityInInventory ( notnull EntityAI target,
string className,
float health,
float quantity,
bool special = false,
string presetName = "",
FindInventoryLocationType locationType = FindInventoryLocationType.ANY )
inlineprotected

tries to spawn item somewhere in inventory

SpawnEntityInInventory queries future parent about free inventory location of the future item

Parameters
[in]healthhealth of the item
[in]quantityquantity to set if item.HasQuantity() (-1 == set to max)
Returns
entity if ok, null otherwise

Definition at line 483 of file PluginDeveloper.c.

484 {
485 if (target.IsPlayer())
487 if (GetGame().IsServer())
488 {
490 if (target.GetInventory() && target.GetInventory().FindFirstFreeLocationForNewEntity(className, FindInventoryLocationType.ANY, il))
491 {
493 if (eai && eai.IsInherited(ItemBase))
494 {
495 if (health < 0) //check for default (-1)
496 health = eai.GetMaxHealth();
497 ItemBase i = ItemBase.Cast(eai);
499 if (special)
500 {
501 auto debugParams = DebugSpawnParams.WithPlayer(null);
502 eai.OnDebugSpawnEx(debugParams);
503 }
504 }
505 return eai;
506 }
507 }
508 else
509 {
511 GetGame().GetPlayer().RPCSingleParam(ERPCs.DEV_RPC_SPAWN_ITEM_IN_INVENTORY, params, true, GetGame().GetPlayer().GetIdentity());
512 }
513 return null;
514 }
proto native void SpawnEntity(string sClassName, vector vPos, float fRange, int iCount)
Spawn an entity through CE.
const int ECE_IN_INVENTORY
const int RF_DEFAULT
InventoryLocation.
EntityAI SpawnEntityInPlayerInventory(PlayerBase player, string item_name, float health, float quantity, bool special=false, string presetName="", FindInventoryLocationType locationType=FindInventoryLocationType.ANY)

References ECE_IN_INVENTORY, GetGame(), GetPlayer(), RF_DEFAULT, SetupSpawnedItem(), SpawnEntity(), and SpawnEntityInPlayerInventory().

Referenced by OnRPCSpawnEntity().

◆ SpawnEntityInPlayerInventory()

EntityAI PluginBase::SpawnEntityInPlayerInventory ( PlayerBase player,
string item_name,
float health,
float quantity,
bool special = false,
string presetName = "",
FindInventoryLocationType locationType = FindInventoryLocationType.ANY )
inlineprotected

Definition at line 516 of file PluginDeveloper.c.

517 {
518 if (player)
519 {
520 if (GetGame().IsServer())
521 {
522 if (locationType == FindInventoryLocationType.HANDS && player.GetItemInHands())
523 {
524 if (!GetGame().IsMultiplayer())
525 player.DropItem(player.GetItemInHands());
526 else
527 player.ServerDropEntity(player.GetItemInHands());
529 return null;
530 }
531
532
533#ifdef DEVELOPER
534 if (GetGame().IsKindOf(item_name, "Transport"))
535 {
537
538 auto debugParams = DebugSpawnParams.WithPlayer(player);
539 car.OnDebugSpawnEx(debugParams);
540
541 if (GetGame().IsMultiplayer())
542 DayZPlayerSyncJunctures.SendGetInCar(player, car);
543 else
544 player.SetGetInVehicleDebug(car);
545
546 return car;
547 }
548#endif
549
551 if (player.GetInventory() && player.GetInventory().FindFirstFreeLocationForNewEntity(item_name, locationType, il))
552 {
553 Weapon_Base wpn = Weapon_Base.Cast(il.GetParent());
554 bool is_mag = il.GetSlot() == InventorySlots.MAGAZINE || il.GetSlot() == InventorySlots.MAGAZINE2 || il.GetSlot() == InventorySlots.MAGAZINE3;
555 if (wpn && is_mag)
556 {
557 vector pos = player.GetPosition();
560 if (mag_gnd && player.GetWeaponManager().CanAttachMagazine(wpn, mag_gnd))
561 player.GetWeaponManager().AttachMagazine(mag_gnd);
562 return eai_gnd;
563 }
564 else
565 {
567 if (eai && eai.IsInherited(ItemBase))
568 {
569 if (health < 0) //check for default (-1)
570 health = eai.GetMaxHealth();
571 ItemBase i = ItemBase.Cast(eai);
573 if (special)
574 {
575 auto debugParams2 = DebugSpawnParams.WithPlayer(player);
576 eai.OnDebugSpawnEx(debugParams2);
577 }
578 }
579 return eai;
580 }
581 }
582 else
584 return NULL;
585 }
586 else
587 {
588 // Client -> Server Spawning: Client Side
590 player.RPCSingleParam(ERPCs.DEV_RPC_SPAWN_ITEM_IN_INVENTORY, params, true);
591 }
592 }
593 return NULL;
594 }
provides access to slot configuration

References CALL_CATEGORY_SYSTEM, ECE_IN_INVENTORY, GetGame(), OnSpawnErrorReport(), RF_DEFAULT, SetupSpawnedItem(), SpawnEntity(), and SpawnEntityOnGroundPos().

Referenced by SpawnEntityInInventory().

◆ SpawnEntityOnCursorDir()

PluginBase::SpawnEntityOnCursorDir ( PlayerBase player,
string item_name,
float quantity,
float distance,
float health = -1,
bool special = false,
string presetName = "",
bool withPhysics = false )
inlineprotected

spawns entity in direction of cursor at specified distance

Parameters
[in]healthhealth of the item
[in]quantityquantity to set if item.HasQuantity() (-1 == set to max)
[in]distancedistance of the item from player
Returns
entity if ok, null otherwise

Definition at line 442 of file PluginDeveloper.c.

443 {
444
445 if (GetGame().IsServer())
446 {
447 // Client -> Server Spawning: Server Side
448 EntityAI entity = player.SpawnEntityOnGroundOnCursorDir(item_name, distance);
449
450 if (entity)
451 {
452 if (!entity.IsBuilding() && health < 0 && entity.GetMaxHealth() > 0) //check for default (-1)
453 health = entity.GetMaxHealth();
455 }
456 else
458
461 item.ThrowPhysically(null, "0 0 0");
462
463 return entity;
464 }
465 else
466 {
467 // Client -> Server Spawning: Client Side
469 player.RPCSingleParam(ERPCs.DEV_RPC_SPAWN_ITEM_ON_CURSOR, params, true);
470 }
471 return NULL;
472 }
void SetupSpawnedEntity(PlayerBase player, EntityAI entity, float health, float quantity=-1, bool special=false, string presetName="")

References Class::CastTo(), GetGame(), OnSpawnErrorReport(), and SetupSpawnedEntity().

Referenced by OnRPCSpawnEntityOnCursorDir(), and SpawnFromClipboard().

◆ SpawnEntityOnGroundPatternGrid()

void PluginBase::SpawnEntityOnGroundPatternGrid ( PlayerBase player,
string item_name,
int count,
float health,
float quantity,
int rows,
int columns,
float gapRow = 1,
float gapColumn = 1,
bool special = false,
bool withPhysics = false )
inlineprotected

Definition at line 329 of file PluginDeveloper.c.

330 {
331 if (!item_name)
332 return;
333 if (GetGame().IsServer())
334 {
335 float rowDist = 0;
336 float columnDist = 0;
337
338 vector playerPos = player.GetPosition();
339 vector camDirForward = player.GetDirection();
340 vector camDirRight = camDirForward.Perpend() * -1;
341 int countLoop = 0;
342 for (int i = 0; i < rows; i++)
343 {
346 columnDist = 0;
347 for (int j = 0; j < columns; j++)
348 {
351 float hlth = health * MiscGameplayFunctions.GetTypeMaxGlobalHealth(item_name);
353 ent.PlaceOnSurface();
354
357 item.ThrowPhysically(null, "0 0 0");
358
359 countLoop++;
360 if (countLoop == count)
361 return;
363 }
364 rowDist += gapRow;
365 }
366 }
367 else
368 {
370 player.RPCSingleParam(ERPCs.DEV_RPC_SPAWN_ITEM_ON_GROUND_PATTERN_GRID, params, true);
371 }
372 }

References Class::CastTo(), GetGame(), and SpawnEntityOnGroundPos().

Referenced by OnRPCSpawnEntityOnGroundPatternGrid().

◆ SpawnEntityOnGroundPos()

PluginBase::SpawnEntityOnGroundPos ( PlayerBase player,
string item_name,
float health,
float quantity,
vector pos,
bool special = false,
bool withPhysics = false )
inlineprotected

spawns entity on exact position

Parameters
[in]healthhealth of the item
[in]quantityquantity to set if item.HasQuantity() (-1 == set to max)
[in]posposition where to spawn
Returns
entity if ok, null otherwise

Definition at line 411 of file PluginDeveloper.c.

412 {
413 if (GetGame().IsServer())
414 {
415 EntityAI entity = player.SpawnEntityOnGroundPos(item_name, pos);
416 if (entity)
418 else
420
423 item.ThrowPhysically(null, "0 0 0");
424
425 return entity;
426 }
427 else
428 {
430 player.RPCSingleParam(ERPCs.DEV_RPC_SPAWN_ITEM_ON_GROUND, params, true);
431 }
432 return NULL;
433 }

References Class::CastTo(), GetGame(), OnSpawnErrorReport(), and SetupSpawnedEntity().

Referenced by OnRPCSpawnEntityOnGround(), SpawnEntityInPlayerInventory(), SpawnEntityOnGroundPatternGrid(), and SpawnItemOnCrosshair().

◆ SpawnFromClipboard()

EntityAI PluginBase::SpawnFromClipboard ( )
inlineprotected

Definition at line 648 of file PluginDeveloper.c.

649 {
650 UIScriptedMenu menu_curr = GetGame().GetUIManager().GetMenu();
651
652 if (menu_curr == NULL)
653 {
655 if (player)
656 {
657 if (!GetGame().GetWorld().Is3rdPersonDisabled())
658 {
659 player.SetIsInThirdPerson(!player.IsInThirdPerson());//this counters the effect of switching camera through pressing the 'V' key
660 }
661
662 vector pos_player = player.GetPosition();
663
664 // Get item from clipboard
665 string clipboard;
666 GetGame().CopyFromClipboard(clipboard);
667
668 if (!clipboard.Contains(","))
669 {
670 //single item
672 SpawnItemOnCrosshair(player, clipboard.Trim(), -1, 1, 40, true);
673 else
675 }
676 else
677 {
679 clipboard.Split(",", items);
680
681 foreach (string item: items)
682 {
684 SpawnItemOnCrosshair(player, item.Trim(), -1, 1, 40, true);
685 else
686 SpawnEntityOnCursorDir(player, item.Trim(), 1, 1);
687 }
688 }
689
690 }
691 }
692
693 return NULL;
694 }
void SpawnItemOnCrosshair(notnull PlayerBase player, string itemName, float health, float quantity, float maxDist=100, bool allowFreeflight=false, bool special=false, bool withPhysics=false)

References GetGame(), GetPlayer(), DeveloperFreeCamera::IsFreeCameraEnabled(), SpawnEntityOnCursorDir(), and SpawnItemOnCrosshair().

◆ SpawnItemOnCrosshair()

void PluginBase::SpawnItemOnCrosshair ( notnull PlayerBase player,
string itemName,
float health,
float quantity,
float maxDist = 100,
bool allowFreeflight = false,
bool special = false,
bool withPhysics = false )
inlineprotected

Definition at line 374 of file PluginDeveloper.c.

375 {
376 vector from, to;
377 if (allowFreeflight && FreeDebugCamera.GetInstance().IsActive())
378 {
379 from = FreeDebugCamera.GetInstance().GetPosition();
380 to = from + FreeDebugCamera.GetInstance().GetDirection() * maxDist;
381 }
382 else
383 {
384 from = GetGame().GetCurrentCameraPosition();
385 to = from + GetGame().GetCurrentCameraDirection() * maxDist;
386 }
387
388 float hitFraction;
391
393 Object obj;
394
397
398 // something is hit
399 if (hitPos != vector.Zero)
401 }
PhxInteractionLayers
Definition DayZPhysics.c:2
static proto bool RayCastBullet(vector begPos, vector endPos, PhxInteractionLayers layerMask, Object ignoreObj, out Object hitObject, out vector hitPosition, out vector hitNormal, out float hitFraction)
static const vector Zero
Definition EnConvert.c:110

References GetGame(), DayZPhysics::RayCastBullet(), SpawnEntityOnGroundPos(), and vector::Zero.

Referenced by SpawnFromClipboard().

◆ SpawnNewInfectedEntity()

void PluginBase::SpawnNewInfectedEntity ( )
inlineprivate

Definition at line 361 of file PluginDayZInfectedDebug.c.

362 {
363 m_ControlledInfected = DayZInfected.Cast(GetGame().CreateObjectEx("ZmbF_JournalistNormal_Blue", GetGame().GetPlayer().GetPosition(), ECE_PLACE_ON_SURFACE | ECE_INITAI | ECE_EQUIP_ATTACHMENTS));
364 m_ControlledInfected.GetAIAgent().SetKeepInIdle(true);
365 }
const int ECE_EQUIP_ATTACHMENTS
const int ECE_PLACE_ON_SURFACE
const int ECE_INITAI

References ECE_EQUIP_ATTACHMENTS, ECE_INITAI, ECE_PLACE_ON_SURFACE, GetGame(), GetPlayer(), and GetPosition.

Referenced by OnClick().

◆ Subscribe()

void PluginBase::Subscribe ( MessageReceiverBase receiver,
int index )
inlineprivate

Subscribes an object to listen to messages on a channel provided in the 'index' parameter.

Definition at line 105 of file PluginMessageManager.c.

106 {
107 if (index > channelsUsed) //this is used to speed up the unsubscribeAll method, instead of all channels, we sweep just those in usage
110 if (chan.Find(receiver) >= 0) return;
111 chan.Insert(receiver);
112 }

◆ Suicide()

void PluginBase::Suicide ( PlayerBase player)
inlineprotected

Definition at line 316 of file PluginAdminLog.c.

317 {
319
320 LogPrint(m_PlayerPrefix + " committed suicide");
321 }

References GetPlayerPrefix(), and LogPrint().

◆ SwitchPermanentCrossHair()

void PluginBase::SwitchPermanentCrossHair ( bool state)
inlineprivate

Definition at line 5 of file PluginPermanentCrossHair.c.

6 {
7 if (!m_Hud)
8 m_Hud = GetGame().GetMission().GetHud();
10 }
void SetPermanentCrossHair(bool show)
Definition gameplay.c:659

References GetGame(), m_Hud, and Hud::SetPermanentCrossHair().

◆ Teleport()

void PluginBase::Teleport ( PlayerBase player,
vector position )
inlineprotected

Teleport player at position.

Definition at line 20 of file PluginDeveloper.c.

21 {
23 }
static void SetPlayerPosition(PlayerBase player, vector position, bool breakSync=false)

References DeveloperTeleport::SetPlayerPosition().

◆ TeleportAtCursor()

void PluginBase::TeleportAtCursor ( )
inlineprotected

Set Player position at his cursor position in the world.

Definition at line 14 of file PluginDeveloper.c.

15 {
17 }
static void TeleportAtCursorEx()

References DeveloperTeleport::TeleportAtCursorEx().

◆ Tick()

void PluginBase::Tick ( )
inlineprotected

Definition at line 441 of file PluginDayZInfectedDebug.c.

442 {
444 return;
445
446 }

◆ ToggleCameraTools()

void PluginBase::ToggleCameraTools ( )
inlineprotected

Definition at line 19 of file PluginCameraTools.c.

20 {
21 if (!m_IsOpen)
22 GetGame().GetUIManager().EnterScriptedMenu(MENU_CAMERA_TOOLS, null);
23 else
24 GetGame().GetUIManager().Back();
26 }

References GetGame(), and MENU_CAMERA_TOOLS.

◆ ToggleDebugWindowEvent()

void PluginBase::ToggleDebugWindowEvent ( )
inlineprivate

Definition at line 118 of file PluginDayZInfectedDebug.c.

119 {
121 if (m_CurrentMode > 2)
122 m_CurrentMode = 0;
123
125 }
void ToggleDebugWindowSetMode(int pMode)

References m_CurrentMode, and ToggleDebugWindowSetMode().

◆ ToggleDebugWindowSetMode()

void PluginBase::ToggleDebugWindowSetMode ( int pMode)
inlineprivate

Definition at line 128 of file PluginDayZInfectedDebug.c.

129 {
130 switch (pMode)
131 {
133 case 1: Show(); ReleaseFocus(); break;
134 case 2: Show(); CaptureFocus(); break;
135 }
136 }

References CaptureFocus(), CleanupDebugShapes(), Hide(), ReleaseFocus(), and Show().

Referenced by ToggleDebugWindowEvent(), and ToggleDebugWindowEvent().

◆ ToggleFocus()

void PluginBase::ToggleFocus ( )
inlineprivate

Definition at line 805 of file PluginDeveloperSync.c.

806 {
807 if (GetGame().GetInput().HasGameFocus())
808 {
809 GetGame().GetInput().ChangeGameFocus(1);
810 GetGame().GetUIManager().ShowUICursor(true);
811 }
812 else
813 {
814 GetGame().GetInput().ResetGameFocus();
815 GetGame().GetUIManager().ShowUICursor(false);
816 }
817 }
ActionInput GetInput()
Definition ActionBase.c:989

References GetGame(), and GetInput().

◆ ToggleFreeCamera()

void PluginBase::ToggleFreeCamera ( )
inlineprotected

Enable / Disable Free camera (Fly mod) - disable of camera will teleport player at current free camera position.

Definition at line 32 of file PluginDeveloper.c.

33 {
35 }
static void FreeCameraToggle(PlayerBase player, bool teleport_player=false)
Enable / Disable Free camera (Fly mod) - disable of camera will teleport player at current free camer...

References DeveloperFreeCamera::FreeCameraToggle(), GetGame(), and GetPlayer().

◆ ToggleFreeCameraBackPos()

void PluginBase::ToggleFreeCameraBackPos ( )
inlineprotected

Enable / Disable Free camera (Fly mod)

Definition at line 26 of file PluginDeveloper.c.

References DeveloperFreeCamera::FreeCameraToggle(), GetGame(), and GetPlayer().

◆ ToggleHelpScreen()

void PluginBase::ToggleHelpScreen ( )
inlineprotected

Definition at line 708 of file PluginDeveloper.c.

709 {
710 if (g_Game.GetUIManager().GetMenu() == NULL)
711 g_Game.GetUIManager().EnterScriptedMenu(MENU_HELP_SCREEN, NULL);
712 else if (g_Game.GetUIManager().IsMenuOpen(MENU_HELP_SCREEN))
713 g_Game.GetUIManager().Back();
714 }
const int MENU_HELP_SCREEN
Definition constants.c:183

References g_Game, and MENU_HELP_SCREEN.

◆ ToggleMissionLoader()

void PluginBase::ToggleMissionLoader ( )
inlineprotected

Definition at line 735 of file PluginDeveloper.c.

736 {
737 if (g_Game.GetUIManager().IsMenuOpen(MENU_MISSION_LOADER))
738 {
739 g_Game.GetUIManager().Back();
740 GetGame().GetMission().RemoveActiveInputExcludes({"menu"}, true);
741 return;
742 }
743
744 if (g_Game.GetUIManager().GetMenu())
745 g_Game.GetUIManager().GetMenu().Close();
746
747 g_Game.GetUIManager().EnterScriptedMenu(MENU_MISSION_LOADER, NULL);
748 GetGame().GetMission().AddActiveInputExcludes({"menu"});
749
750
751 }
const int MENU_MISSION_LOADER
Definition constants.c:204

References g_Game, GetGame(), and MENU_MISSION_LOADER.

◆ ToggleScriptConsole()

void PluginBase::ToggleScriptConsole ( )
inlineprotected

Definition at line 716 of file PluginDeveloper.c.

717 {
718 if (GetGame() != null && !g_Game.IsLoading() && GetGame().GetMission())
719 {
720 if (g_Game.GetUIManager().GetMenu() == NULL)
721 {
722 m_ScriptConsole = g_Game.GetUIManager().EnterScriptedMenu(MENU_SCRIPTCONSOLE, NULL);
723 GetGame().GetMission().AddActiveInputExcludes({"menu"});
724
725 }
726 else if (g_Game.GetUIManager().IsMenuOpen(MENU_SCRIPTCONSOLE))
727 {
728 g_Game.GetUIManager().Back();
729 GetGame().GetMission().RemoveActiveInputExcludes({"menu"}, true);
730 }
731 }
732 }
UIScriptedMenu m_ScriptConsole

References g_Game, GetGame(), and MENU_SCRIPTCONSOLE.

◆ TotemFlagChange()

void PluginBase::TotemFlagChange ( bool top,
notnull PlayerBase player,
notnull EntityAI totem )
inlineprotected

Definition at line 331 of file PluginAdminLog.c.

332 {
333 if (m_ActionsFilter != 1)
334 return;
335
336 string prefix = GetPlayerPrefix(player, player.GetIdentity());
337 string flagType = totem.FindAttachmentBySlotName("Material_FPole_Flag").ClassName();
338 string action;
339
340 if (top)
341 action = "raised ";
342 else
343 action = "lowered ";
344
345 LogPrint(prefix + " has " + action + flagType + " on " + totem.ClassName() + " at " + totem.GetPosition());
346 }

References GetPlayerPrefix(), LogPrint(), and m_ActionsFilter.

◆ TransmitAgents()

void PluginBase::TransmitAgents ( EntityAI source,
EntityAI target,
int pathway,
int dose_size = 1000 )
inlineprotected

Definition at line 256 of file PluginTransmissionAgents.c.

257 {
259 }
float TransmitAgentsEx(EntityAI source, EntityAI target, int pathway, int dose_size=1000, int agents=0)

References TransmitAgentsEx().

◆ TransmitAgentsEx()

float PluginBase::TransmitAgentsEx ( EntityAI source,
EntityAI target,
int pathway,
int dose_size = 1000,
int agents = 0 )
inlineprotected

Definition at line 189 of file PluginTransmissionAgents.c.

190 {
191 //Debug.Log("Transmitting agents for source: " +source.ToString()+", target: " +target.ToString(),"Agents");
192 int sourceAgents = agents;
193 int targetAgents;
194 if (!sourceAgents && source) sourceAgents = source.GetAgents(); //do not set sourceAgents again if already set
195 if (target) targetAgents = target.GetAgents();
196 float count = 0;
197
198 switch (pathway)
199 {
200 case AGT_INV_OUT: //item leaving inventory
201 break;
202
203 case AGT_INV_IN: //item entering inventory
204 break;
205
206 case AGT_UACTION_TOUCH: //player touched the item
207 //InjectAgents( source, targetAgents ,GetProtectionLevel(DEF_BIOLOGICAL,InventorySlots.GLOVES, player) );
208 break;
209
210 case AGT_WATER_POND:
211 //target.InsertAgent(eAgents.CHOLERA, dose_size);
212 InjectAgentsWithPlayer(target, eAgents.CHOLERA, 0, 1, InjectTypes.ITEM_TO_PLAYER);
213 break;
214
216 //InjectAgentsWithPlayer( target, sourceAgents , 0, dose_size, InjectTypes.ITEM_TO_PLAYER );
218 break;
219
220 case AGT_UACTION_TO_PLAYER: //user action of a consumption, only from item to player
222 break;
223
224 case AGT_UACTION_TO_ITEM: //to transfer from the player to the consumed item
226 break;
227
228 case AGT_TRANSFER_COPY: //transferring liquid
230 break;
231
232 case AGT_ITEM_TO_FLESH: //transferring liquid
234 break;
235
241 float prot_level_target = Math.Max(prot_level_mask_target, prot_level_headgear_target);//find the bigger of the 2, TODO: should be improved
242 float prot_level_source = Math.Max(prot_level_mask_source, prot_level_headgear_source);//find the bigger of the 2, TODO: should be improved
245 break;
248
250 break;
251 }
252 return count;
253 }
eAgents
Definition EAgents.c:3
float InjectAgentWithPlayerDose(EntityAI target, int agent, float protection, float dose_size, int inject_type)
will add agent to a given target
void InjectAgentsWithPlayer(EntityAI target, int agents, float protection, int dose_size, int inject_type)
will add agents to a given target, using chance of transmission and full dose size if chance succeeds
void InjectAgentsWithPlayerCount(EntityAI target, int agents, float protection, int dose_size, int inject_type)
will add agents to a given target, with no probability, but the dose size is modified by m_Transferab...
void InjectAgentsWithoutPlayer(EntityAI target, int agents)
float GetProtectionLevel(int type, int slot, Man player)
const int AGT_UACTION_CONSUME
Definition constants.c:468
const int AGT_ITEM_TO_FLESH
Definition constants.c:475
const int AGT_UACTION_TOUCH
Definition constants.c:470
const int DEF_BIOLOGICAL
Definition constants.c:478
const int DEF_CHEMICAL
Definition constants.c:479
const int AGT_AIRBOURNE_BIOLOGICAL
Definition constants.c:472
const int AGT_TRANSFER_COPY
Definition constants.c:469
const int AGT_WATER_POND
Definition constants.c:471
const int AGT_INV_OUT
Definition constants.c:467
const int AGT_UACTION_TO_PLAYER
Definition constants.c:473
const int AGT_AIRBOURNE_CHEMICAL
Definition constants.c:476
const int AGT_UACTION_TO_ITEM
Definition constants.c:474
const int AGT_INV_IN
Definition constants.c:466

References AGT_AIRBOURNE_BIOLOGICAL, AGT_AIRBOURNE_CHEMICAL, AGT_INV_IN, AGT_INV_OUT, AGT_ITEM_TO_FLESH, AGT_TRANSFER_COPY, AGT_UACTION_CONSUME, AGT_UACTION_TO_ITEM, AGT_UACTION_TO_PLAYER, AGT_UACTION_TOUCH, AGT_WATER_POND, DEF_BIOLOGICAL, DEF_CHEMICAL, GetProtectionLevel(), InjectAgentsWithoutPlayer(), InjectAgentsWithPlayer(), InjectAgentsWithPlayerCount(), InjectAgentWithPlayerDose(), and Math::Max().

Referenced by TransmitAgents().

◆ UnconStart()

void PluginBase::UnconStart ( PlayerBase player)
inlineprotected

Definition at line 269 of file PluginAdminLog.c.

270 {
272
273 LogPrint(m_PlayerPrefix + " is unconscious");
274 }

References GetPlayerPrefix(), and LogPrint().

◆ UnconStop()

void PluginBase::UnconStop ( PlayerBase player)
inlineprotected

Definition at line 276 of file PluginAdminLog.c.

277 {
278 if (player.IsAlive()) // Do not log uncon stop for dead players
279 {
281
282 LogPrint(m_PlayerPrefix + " regained consciousness");
283 }
284 }

References GetPlayerPrefix(), and LogPrint().

◆ UnlinkSceneObjects()

void PluginBase::UnlinkSceneObjects ( SceneObject scene_object1,
SceneObject scene_object2 )
inlineprivate

Definition at line 638 of file PluginSceneManager.c.

639 {
640 scene_object1.UnlinkSceneObject(scene_object2);
641 scene_object2.UnlinkSceneObject(scene_object1);
642 }

◆ Unsubscribe()

void PluginBase::Unsubscribe ( MessageReceiverBase receiver,
int index )
inlineprivate

Definition at line 114 of file PluginMessageManager.c.

115 {
117 int i = chan.Find(receiver);
118 if (i >= 0)
119 chan.Remove(i);
120 }

◆ UnsubscribeAll()

void PluginBase::UnsubscribeAll ( MessageReceiverBase receiver)
inlineprivate

Definition at line 122 of file PluginMessageManager.c.

123 {
124 //GetGame().ProfilerStart("UnsubscribeAll");
125 for (int i = 0; i <= channelsUsed; i++)
126 {
128 int c = chan.Find(receiver);
129 if (c >= 0)
130 chan.Remove(c);
131 }
132 //GetGame().ProfilerStop("UnsubscribeAll");
133 }

References channelsUsed.

◆ Update()

void PluginBase::Update ( )
inlineprivate

!!!! Highly suspect

Definition at line 142 of file PluginDeveloperSync.c.

143 {
144 if (!GetDayZGame().IsMultiplayer() || GetDayZGame().IsServer())
145 {
146 for (int i = 0; i < m_RegisteredPlayers.Count(); i++)
147 {
149 if (!player || !player.IsAlive())
150 {
151 m_RegisteredPlayers.RemoveElement(i);
152 i--;
153 }
154 else
155 {
156 int bit_mask = m_RegisteredPlayers.Get(player).m_Bitmask;
157
158 if ((PDS_SYSTEMS.MODS & bit_mask) != 0)
159 {
161 if (PDS_SYSTEMS.MODS_DETAILED & bit_mask)
163 }
164 if ((PDS_SYSTEMS.LEVELS & bit_mask) != 0)
166
167 if ((PDS_SYSTEMS.STATS & bit_mask) != 0)
169 if ((PDS_SYSTEMS.STOMACH & bit_mask) != 0)
171 if ((PDS_SYSTEMS.AGENTS & bit_mask) != 0)
173 if ((PDS_SYSTEMS.TEMPERATURE & bit_mask))
175 }
176 }
177 }
178 }
void SendRPCMods(PlayerBase player)
void SendRPCStats(PlayerBase player)
void SendRPCLevels(PlayerBase player)
void SendRPCModsDetail(PlayerBase player)
void SendRPCStomach(PlayerBase player)
void SendRPCAgents(PlayerBase player)
void SendRPCTemp(PlayerBase player)

References GetDayZGame(), SendRPCAgents(), SendRPCLevels(), SendRPCMods(), SendRPCModsDetail(), SendRPCStats(), SendRPCStomach(), and SendRPCTemp().

◆ UpdateStatsLocal()

void PluginBase::UpdateStatsLocal ( )
inlineprivate

Definition at line 422 of file PluginDeveloperSync.c.

423 {
425
426 //clear values
427 m_PlayerStatsSynced.Clear();
428
429 //set values
430 for (int i = 0; i < player.m_PlayerStats.GetPCO().Get().Count(); i++)
431 {
432 string label = player.m_PlayerStats.GetPCO().Get().Get(i).GetLabel();
433 float value = player.m_PlayerStats.GetPCO().Get().Get(i).Get();
434 float value_norm = player.m_PlayerStats.GetPCO().Get().Get(i).GetNormalized();
436 }
437
438 m_PlayerStatsSynced.Insert(new SyncedValue("(NaS)Immunity", player.GetImmunity(), false, 0));
439 m_PlayerStatsSynced.Insert(new SyncedValue("(NaS) BrokenLegs", player.m_BrokenLegState, false, 0));
440 }

References Count, Get(), GetDayZGame(), and GetPlayer().

◆ UpdateStatWidget()

void PluginBase::UpdateStatWidget ( int rowIndex,
UTemperatureSourceDebug utsd )
inlineprotected

Definition at line 168 of file PluginUniversalTemperatureSourceClient.c.

169 {
170 m_StatListWidgets[rowIndex].ClearItems();
171
172 m_HeaderWidget[rowIndex].SetText(utsd.GetHeader());
173
174 int numPairs = utsd.PairsCount();
175 for (int i = 0; i < numPairs; ++i)
176 {
177 m_StatListWidgets[rowIndex].AddItem(utsd.GetName(i), null, 0, i);
178 m_StatListWidgets[rowIndex].SetItem(i, utsd.GetValue(i), null, 1);
179 }
180
181 // manually add value for distance (client only)
182 m_StatListWidgets[rowIndex].AddItem("distance", null, 0, numPairs);
183 m_StatListWidgets[rowIndex].SetItem(numPairs, vector.Distance(m_Player.GetPosition(), utsd.GetValue(0).ToVector()).ToString(), null, 1);
184 }

References vector::Distance(), m_Player, and m_StatListWidgets.

Referenced by UpdateStatWidgets().

◆ UpdateStatWidgets()

void PluginBase::UpdateStatWidgets ( )
inlineprotected

Definition at line 140 of file PluginUniversalTemperatureSourceClient.c.

141 {
142 int i = 0;
144 for (; i < utsDebugCount && i < MAX_SIMULTANEOUS_UTS; ++i)
145 {
147 vector pos = utsd.GetValue(0).ToVector();
148 vector screen_pos_stats = GetGame().GetScreenPos(pos + "0 0 0");
149 vector screen_pos_damage = GetGame().GetScreenPos(pos + "0 2 0");
151
152 if (screen_pos_stats[2] > 0 && screen_pos_stats[0] > 0 && screen_pos_stats[1] > 0)
153 {
154 m_RootWidget[i].Show(true);
156 }
157 else
158 m_RootWidget[i].Show(false);
159 }
160
161 for (; i < MAX_SIMULTANEOUS_UTS; ++i)
162 {
163 if (m_RootWidget[i])
164 m_RootWidget[i].Show(false);
165 }
166 }
void UpdateStatWidget(int rowIndex, UTemperatureSourceDebug utsd)

References GetGame(), m_RootWidget, MAX_SIMULTANEOUS_UTS, and UpdateStatWidget().

Referenced by OnUpdate().

Member Data Documentation

◆ channelList

ref array<ref MessageReceiverBase> PluginBase::channelList[NUM_OF_CHANNELS]
private

Definition at line 7 of file PluginMessageManager.c.

◆ channelsUsed

int PluginBase::channelsUsed = 0
private

Definition at line 6 of file PluginMessageManager.c.

Referenced by UnsubscribeAll().

◆ CLICK_TIME

const int PluginBase::CLICK_TIME = 200
protected

Definition at line 273 of file PluginKeyBinding.c.

◆ DOUBLE_CLICK_TIME

const int PluginBase::DOUBLE_CLICK_TIME = 300
protected

Definition at line 274 of file PluginKeyBinding.c.

◆ fadeInVolume

float PluginBase::fadeInVolume = 1.1
private

Definition at line 178 of file PluginSoundDebug.c.

◆ fadeOutVolume

float PluginBase::fadeOutVolume = 0.9
private

Definition at line 179 of file PluginSoundDebug.c.

◆ FOV

const float PluginBase::FOV = 0.5236
private

Definition at line 15 of file PluginCharPlacement.c.

◆ HOLD_CLICK_TIME_MIN

const int PluginBase::HOLD_CLICK_TIME_MIN = 300
protected

Definition at line 275 of file PluginKeyBinding.c.

◆ instance [1/2]

PluginKeyBinding PluginBase::instance
staticprivate

Definition at line 16 of file PluginKeyBinding.c.

◆ instance [2/2]

PluginSceneManager PluginBase::instance
staticprivate

Definition at line 6 of file PluginSceneManager.c.

◆ INTERVAL

const int PluginBase::INTERVAL = 1
private

Definition at line 8 of file PluginRemotePlayerDebugServer.c.

◆ LOOKUP_RADIUS

const float PluginBase::LOOKUP_RADIUS = 20
private

[s]

Definition at line 4 of file PluginUniversalTemperatureSourceServer.c.

◆ m_AccuTime

float PluginBase::m_AccuTime
private

[m]

Definition at line 7 of file PluginRemotePlayerDebugServer.c.

◆ m_ActionsFilter

int PluginBase::m_ActionsFilter
protected

Definition at line 23 of file PluginAdminLog.c.

◆ m_AgentList

ref map<int, ref AgentBase> PluginBase::m_AgentList = new map<int, ref AgentBase>
staticprivate

Definition at line 10 of file PluginTransmissionAgents.c.

Referenced by GetAgentList().

◆ m_AgentsUpdateStatus

bool PluginBase::m_AgentsUpdateStatus
private

Definition at line 42 of file PluginDeveloperSync.c.

◆ m_AttackDescriptors

Definition at line 96 of file PluginDayZInfectedDebug.c.

◆ m_AttackDirCB

XComboBoxWidget PluginBase::m_AttackDirCB
private

Definition at line 80 of file PluginDayZInfectedDebug.c.

◆ m_AttackTypeCB

XComboBoxWidget PluginBase::m_AttackTypeCB
private

Definition at line 79 of file PluginDayZInfectedDebug.c.

◆ m_BleedMgr

BleedingSourcesManagerServer PluginBase::m_BleedMgr
private

Definition at line 19 of file PluginAdminLog.c.

◆ m_cam_pos

vector PluginBase::m_cam_pos
private

Definition at line 7 of file PluginCharPlacement.c.

◆ m_camera_dir

vector PluginBase::m_camera_dir
private

Definition at line 9 of file PluginCharPlacement.c.

◆ m_camera_orientation

vector PluginBase::m_camera_orientation
private

Definition at line 13 of file PluginCharPlacement.c.

◆ m_cameraTrans

vector PluginBase::m_cameraTrans[4]
private

Definition at line 10 of file PluginCharPlacement.c.

◆ m_CardFightButton

ButtonWidget PluginBase::m_CardFightButton
private

Definition at line 49 of file PluginDayZInfectedDebug.c.

◆ m_CardFightFrame

Widget PluginBase::m_CardFightFrame
private

Definition at line 51 of file PluginDayZInfectedDebug.c.

◆ m_CardMovementButton

ButtonWidget PluginBase::m_CardMovementButton
private

Definition at line 48 of file PluginDayZInfectedDebug.c.

◆ m_CardMovementFrame

Widget PluginBase::m_CardMovementFrame
private

Definition at line 50 of file PluginDayZInfectedDebug.c.

◆ m_CH_DoAttack

bool PluginBase::m_CH_DoAttack = false
private

Definition at line 93 of file PluginDayZInfectedDebug.c.

◆ m_CH_DoHit

bool PluginBase::m_CH_DoHit = false
private

Definition at line 91 of file PluginDayZInfectedDebug.c.

◆ m_CH_DoKnucleOut

bool PluginBase::m_CH_DoKnucleOut = false
private

Definition at line 89 of file PluginDayZInfectedDebug.c.

◆ m_CH_DoTurn

bool PluginBase::m_CH_DoTurn = false
private

command handler values

Definition at line 87 of file PluginDayZInfectedDebug.c.

◆ m_CH_DoVault

bool PluginBase::m_CH_DoVault = false
private

Definition at line 88 of file PluginDayZInfectedDebug.c.

◆ m_CH_GoToCrawl

bool PluginBase::m_CH_GoToCrawl = false
private

Definition at line 90 of file PluginDayZInfectedDebug.c.

◆ m_CH_StartDeath

bool PluginBase::m_CH_StartDeath = false
private

Definition at line 92 of file PluginDayZInfectedDebug.c.

◆ m_Character

PlayerBase PluginBase::m_Character
private

Definition at line 4 of file PluginCharPlacement.c.

◆ m_character_pos

vector PluginBase::m_character_pos
private

Definition at line 8 of file PluginCharPlacement.c.

◆ m_ClassBrowserSelected

string PluginBase::m_ClassBrowserSelected
protected

Definition at line 1051 of file PluginSceneManager.c.

◆ m_ClientList

ref set< PlayerBase > PluginBase::m_ClientList = new set<PlayerBase>
private

Definition at line 3 of file PluginRemotePlayerDebugServer.c.

Referenced by SendDebug().

◆ m_ControlledInfected

DayZInfected PluginBase::m_ControlledInfected
private

controlled instance

Definition at line 84 of file PluginDayZInfectedDebug.c.

◆ m_CrawlingTypeCB

XComboBoxWidget PluginBase::m_CrawlingTypeCB
private

Definition at line 67 of file PluginDayZInfectedDebug.c.

◆ m_CurrentMode

int PluginBase::m_CurrentMode = 0
private

Definition at line 41 of file PluginDayZInfectedDebug.c.

◆ m_DeathTypeCB

XComboBoxWidget PluginBase::m_DeathTypeCB
private

Definition at line 76 of file PluginDayZInfectedDebug.c.

◆ m_DebugShapes

ref array<Shape> PluginBase::m_DebugShapes = new array<Shape>()
private

Definition at line 98 of file PluginDayZInfectedDebug.c.

◆ m_DebugType

eRemoteDebugType PluginBase::m_DebugType
private

Definition at line 10 of file PluginRemotePlayerDebugServer.c.

◆ m_DecayTimer

ref Timer PluginBase::m_DecayTimer
private

Definition at line 7 of file PluginObjectsInteractionManager.c.

◆ m_demoPos

vector PluginBase::m_demoPos
private

Definition at line 11 of file PluginCharPlacement.c.

◆ m_demoRot

vector PluginBase::m_demoRot
private

Definition at line 12 of file PluginCharPlacement.c.

◆ m_DetailedInfoRequested

int PluginBase::m_DetailedInfoRequested = 0
private

Definition at line 27 of file PluginDeveloperSync.c.

◆ m_DisplayName

string PluginBase::m_DisplayName
private

Definition at line 9 of file PluginAdminLog.c.

◆ m_Distance

float PluginBase::m_Distance
private

Definition at line 11 of file PluginAdminLog.c.

◆ m_DotIndex

int PluginBase::m_DotIndex
private

Definition at line 16 of file PluginAdminLog.c.

◆ m_EnvironmentDebugMessage

string PluginBase::m_EnvironmentDebugMessage
private

Definition at line 36 of file PluginDeveloperSync.c.

◆ m_FeaturesMask

int PluginBase::m_FeaturesMask
protected

Definition at line 5 of file PluginDeveloper.c.

◆ m_FileContent

ref TStringArray PluginBase::m_FileContent
private

Definition at line 22 of file PluginFileHandler.c.

◆ m_HasFocus

bool PluginBase::m_HasFocus = false
private

Definition at line 42 of file PluginDayZInfectedDebug.c.

◆ m_HeaderWidget

TextWidget PluginBase::m_HeaderWidget[MAX_SIMULTANEOUS_UTS]
protected

Definition at line 11 of file PluginUniversalTemperatureSourceClient.c.

◆ m_HitBodyPartCB

XComboBoxWidget PluginBase::m_HitBodyPartCB
private

Definition at line 73 of file PluginDayZInfectedDebug.c.

◆ m_HitDirEB

EditBoxWidget PluginBase::m_HitDirEB
private

fight card

Definition at line 71 of file PluginDayZInfectedDebug.c.

◆ m_HitFilter

int PluginBase::m_HitFilter
protected

Definition at line 21 of file PluginAdminLog.c.

◆ m_HitMessage

string PluginBase::m_HitMessage
private

Definition at line 10 of file PluginAdminLog.c.

◆ m_HitTypeCB

XComboBoxWidget PluginBase::m_HitTypeCB
private

Definition at line 72 of file PluginDayZInfectedDebug.c.

◆ m_Hud

Hud PluginBase::m_Hud
private

Definition at line 3 of file PluginPermanentCrossHair.c.

◆ m_Id

int PluginBase::m_Id
private

Definition at line 24 of file PluginVariables.c.

◆ m_Initialized

bool PluginBase::m_Initialized
private

Definition at line 6 of file PluginCharPlacement.c.

◆ m_Instance

PluginCameraTools PluginBase::m_Instance
staticprotected

Definition at line 3 of file PluginCameraTools.c.

◆ m_IsActive

bool PluginBase::m_IsActive = false
private

Definition at line 43 of file PluginDayZInfectedDebug.c.

Referenced by IsActive(), and IsActive().

◆ m_IsConstructed

bool PluginBase::m_IsConstructed = false
private

Definition at line 12 of file PluginTransmissionAgents.c.

◆ m_IsDragging

bool PluginBase::m_IsDragging
protected

Definition at line 1046 of file PluginSceneManager.c.

◆ m_IsOpen [1/2]

bool PluginBase::m_IsOpen
staticprotected

Definition at line 4 of file PluginCameraTools.c.

◆ m_IsOpen [2/2]

bool PluginBase::m_IsOpen
protected

Definition at line 1052 of file PluginSceneManager.c.

◆ m_IsWinHolding

bool PluginBase::m_IsWinHolding
protected

Definition at line 4 of file PluginDeveloper.c.

◆ m_ItemInHands

string PluginBase::m_ItemInHands
private

Definition at line 14 of file PluginAdminLog.c.

◆ m_KeyBindings [1/2]

ref array<ref KeyBinding> PluginBase::m_KeyBindings
protected

Definition at line 277 of file PluginKeyBinding.c.

◆ m_KeyBindings [2/2]

ref map<int, KeyBinding> PluginBase::m_KeyBindings
protected

Definition at line 1048 of file PluginSceneManager.c.

◆ m_KnucleOutButton

ButtonWidget PluginBase::m_KnucleOutButton
private

Definition at line 65 of file PluginDayZInfectedDebug.c.

◆ m_LevelsUpdateStatus

bool PluginBase::m_LevelsUpdateStatus
private

Definition at line 40 of file PluginDeveloperSync.c.

◆ m_LineLimit

int PluginBase::m_LineLimit
private

Definition at line 20 of file PluginFileHandler.c.

◆ m_LockedObjects

ref array<Object> PluginBase::m_LockedObjects
private

Definition at line 3 of file PluginObjectsInteractionManager.c.

◆ m_LockedObjectsDecay

ref array<float> PluginBase::m_LockedObjectsDecay
private

Definition at line 4 of file PluginObjectsInteractionManager.c.

◆ m_MainWindow

ref Widget PluginBase::m_MainWindow
private

Definition at line 5 of file PluginDrawCheckerboard.c.

◆ m_MainWnd

Widget PluginBase::m_MainWnd
private

main controls

Definition at line 46 of file PluginDayZInfectedDebug.c.

Referenced by DestroyModuleWidgets(), and DestroyModuleWidgets().

◆ m_Message

string PluginBase::m_Message
private

Definition at line 8 of file PluginAdminLog.c.

◆ m_MindStateCB

XComboBoxWidget PluginBase::m_MindStateCB
private

Definition at line 56 of file PluginDayZInfectedDebug.c.

◆ m_ModsUpdateStatus

bool PluginBase::m_ModsUpdateStatus
private

Definition at line 41 of file PluginDeveloperSync.c.

◆ m_ModuleConfigDebugProfile

PluginConfigDebugProfile PluginBase::m_ModuleConfigDebugProfile
protected

Definition at line 1039 of file PluginSceneManager.c.

◆ m_ModuleConfigScene

PluginConfigScene PluginBase::m_ModuleConfigScene
protected

Definition at line 1038 of file PluginSceneManager.c.

◆ m_ModuleDeveloper

PluginDeveloper PluginBase::m_ModuleDeveloper
private

Definition at line 3 of file PluginCharPlacement.c.

◆ m_MouseBindings

ref array<ref MouseBinding> PluginBase::m_MouseBindings
protected

Definition at line 279 of file PluginKeyBinding.c.

◆ m_MouseButtons

ref array<ref MouseButtonInfo> PluginBase::m_MouseButtons
protected

Definition at line 278 of file PluginKeyBinding.c.

◆ m_MovementSpeedEB

EditBoxWidget PluginBase::m_MovementSpeedEB
private

Definition at line 57 of file PluginDayZInfectedDebug.c.

◆ m_NotifiersIcons

ref multiMap<int, string> PluginBase::m_NotifiersIcons
private

Definition at line 6 of file PluginPlayerStatus.c.

◆ m_NotifiersIndexColor

ref multiMap<int, int> PluginBase::m_NotifiersIndexColor
private

Definition at line 4 of file PluginPlayerStatus.c.

◆ m_NotifiersLabel

ref multiMap<int, string> PluginBase::m_NotifiersLabel
private

Definition at line 3 of file PluginPlayerStatus.c.

◆ m_Pid

string PluginBase::m_Pid
private

Definition at line 4 of file PluginAdminLog.c.

◆ m_PlacementFilter

int PluginBase::m_PlacementFilter
protected

Definition at line 22 of file PluginAdminLog.c.

◆ m_PlantMaterials

ref map<string, ref PlantMaterialHealth> PluginBase::m_PlantMaterials
private

Definition at line 3 of file PluginHorticulture.c.

◆ m_Player

PlayerBase PluginBase::m_Player
private

Definition at line 12 of file PluginAdminLog.c.

◆ m_PlayerAgentsSynced

ref array<ref SyncedValueAgent> PluginBase::m_PlayerAgentsSynced
private

Definition at line 37 of file PluginDeveloperSync.c.

◆ m_PlayerArray

autoptr array<Man> PluginBase::m_PlayerArray
protected

Definition at line 27 of file PluginAdminLog.c.

Referenced by PlayerList().

◆ m_PlayerDebugDamage

ref map<PlayerBase, ref RemotePlayerDamageDebug> PluginBase::m_PlayerDebugDamage = new map<PlayerBase, ref RemotePlayerDamageDebug>
private

Definition at line 6 of file PluginRemotePlayerDebugServer.c.

◆ m_PlayerDebugStats

ref array<ref RemotePlayerStatDebug> PluginBase::m_PlayerDebugStats = new array<ref RemotePlayerStatDebug>
private

Definition at line 5 of file PluginRemotePlayerDebugServer.c.

◆ m_PlayerLevelsSynced

ref array<ref SyncedValueLevel> PluginBase::m_PlayerLevelsSynced
private

Definition at line 33 of file PluginDeveloperSync.c.

◆ m_PlayerListFilter

int PluginBase::m_PlayerListFilter
protected

Definition at line 24 of file PluginAdminLog.c.

◆ m_PlayerModsDetailedSynced

string PluginBase::m_PlayerModsDetailedSynced
private

Definition at line 35 of file PluginDeveloperSync.c.

◆ m_PlayerModsSynced

ref array<ref SyncedValueModifier> PluginBase::m_PlayerModsSynced
private

Definition at line 34 of file PluginDeveloperSync.c.

◆ m_PlayerName

string PluginBase::m_PlayerName
private

Definition at line 3 of file PluginAdminLog.c.

◆ m_PlayerPrefix

string PluginBase::m_PlayerPrefix
private

Definition at line 6 of file PluginAdminLog.c.

◆ m_PlayerPrefix2

string PluginBase::m_PlayerPrefix2
private

Definition at line 7 of file PluginAdminLog.c.

◆ m_PlayerStatsSynced

ref array<ref SyncedValue> PluginBase::m_PlayerStatsSynced
private

Definition at line 31 of file PluginDeveloperSync.c.

◆ m_PlayerStomachSynced

ref array<ref Param> PluginBase::m_PlayerStomachSynced
private

Definition at line 32 of file PluginDeveloperSync.c.

◆ m_PosArray

string PluginBase::m_PosArray[3]
private

Definition at line 15 of file PluginAdminLog.c.

◆ m_Position

vector PluginBase::m_Position
private

Definition at line 5 of file PluginAdminLog.c.

◆ m_PressedMouseID

int PluginBase::m_PressedMouseID
protected

Definition at line 1045 of file PluginSceneManager.c.

◆ m_pUIHandler

ref PluginDayZInfectedDebugUIHandler PluginBase::m_pUIHandler
private

Definition at line 95 of file PluginDayZInfectedDebug.c.

◆ m_ReadOnly

bool PluginBase::m_ReadOnly
private

Definition at line 19 of file PluginFileHandler.c.

◆ m_RegisteredPlayers

ref map<PlayerBase, ref RegisterPlayerData> PluginBase::m_RegisteredPlayers
private

Definition at line 29 of file PluginDeveloperSync.c.

◆ m_RootWidget

ref Widget PluginBase::m_RootWidget[MAX_SIMULTANEOUS_UTS]
protected

Definition at line 9 of file PluginUniversalTemperatureSourceClient.c.

◆ m_Ruler

ItemBase PluginBase::m_Ruler
private

Definition at line 4 of file PluginDoorRuler.c.

◆ m_RulerActivated

bool PluginBase::m_RulerActivated
private

Definition at line 8 of file PluginSceneManager.c.

◆ m_RulerLines

ref array<Shape> PluginBase::m_RulerLines
private

Definition at line 10 of file PluginSceneManager.c.

◆ m_RulerPoints

ref array<vector> PluginBase::m_RulerPoints
private

Definition at line 9 of file PluginSceneManager.c.

◆ m_RulerSpheres

ref array<Shape> PluginBase::m_RulerSpheres
private

Definition at line 11 of file PluginSceneManager.c.

◆ m_SceneData

ref SceneData PluginBase::m_SceneData
protected

Definition at line 1049 of file PluginSceneManager.c.

◆ m_ScriptConsole

UIScriptedMenu PluginBase::m_ScriptConsole
protected

Definition at line 6 of file PluginDeveloper.c.

◆ m_SelectedObject

SceneObject PluginBase::m_SelectedObject
protected

Definition at line 1050 of file PluginSceneManager.c.

◆ m_ShapesSceneObjects

ref array<Shape> PluginBase::m_ShapesSceneObjects
protected

Definition at line 1047 of file PluginSceneManager.c.

◆ m_SimpleAgentList

ref map<int, string> PluginBase::m_SimpleAgentList = new map<int, string>
private

Definition at line 11 of file PluginTransmissionAgents.c.

Referenced by GetSimpleAgentList().

◆ m_soundBuilder

ref SoundObjectBuilder PluginBase::m_soundBuilder
private

Definition at line 176 of file PluginSoundDebug.c.

◆ m_soundObject

ref SoundObject PluginBase::m_soundObject
private

Definition at line 177 of file PluginSoundDebug.c.

◆ m_soundParams

ref SoundParams PluginBase::m_soundParams
private

Definition at line 175 of file PluginSoundDebug.c.

◆ m_Source

PlayerBase PluginBase::m_Source
private

Definition at line 13 of file PluginAdminLog.c.

◆ m_SpawnEntityButton

ButtonWidget PluginBase::m_SpawnEntityButton
private

Definition at line 47 of file PluginDayZInfectedDebug.c.

◆ m_StanceCB

XComboBoxWidget PluginBase::m_StanceCB
private

movement card

Definition at line 55 of file PluginDayZInfectedDebug.c.

◆ m_StartAttackButton

ButtonWidget PluginBase::m_StartAttackButton
private

Definition at line 81 of file PluginDayZInfectedDebug.c.

◆ m_StartCrawlingButton

ButtonWidget PluginBase::m_StartCrawlingButton
private

Definition at line 68 of file PluginDayZInfectedDebug.c.

◆ m_StartDeathButton

ButtonWidget PluginBase::m_StartDeathButton
private

Definition at line 77 of file PluginDayZInfectedDebug.c.

◆ m_StartHitButton

ButtonWidget PluginBase::m_StartHitButton
private

Definition at line 74 of file PluginDayZInfectedDebug.c.

◆ m_StartTurnButton

ButtonWidget PluginBase::m_StartTurnButton
private

Definition at line 59 of file PluginDayZInfectedDebug.c.

◆ m_StartVaultButton

ButtonWidget PluginBase::m_StartVaultButton
private

Definition at line 64 of file PluginDayZInfectedDebug.c.

◆ m_StatEnergy

PlayerStat<float> PluginBase::m_StatEnergy
private

Definition at line 18 of file PluginAdminLog.c.

◆ m_StatListWidgets

TextListboxWidget PluginBase::m_StatListWidgets[MAX_SIMULTANEOUS_UTS]
protected

Definition at line 10 of file PluginUniversalTemperatureSourceClient.c.

◆ m_StatsUpdateStatus

bool PluginBase::m_StatsUpdateStatus
private

Definition at line 39 of file PluginDeveloperSync.c.

◆ m_StatusText

TextWidget PluginBase::m_StatusText
private

Definition at line 52 of file PluginDayZInfectedDebug.c.

◆ m_StatWater

PlayerStat<float> PluginBase::m_StatWater
private

Definition at line 17 of file PluginAdminLog.c.

◆ m_StomachUpdateStatus

bool PluginBase::m_StomachUpdateStatus
private

Definition at line 43 of file PluginDeveloperSync.c.

◆ m_TickTimer

ref Timer PluginBase::m_TickTimer
private

status refresh timer

Definition at line 101 of file PluginDayZInfectedDebug.c.

◆ m_TimeLastClickPress

float PluginBase::m_TimeLastClickPress
protected

Definition at line 1044 of file PluginSceneManager.c.

◆ m_TimeLastClickRelease

float PluginBase::m_TimeLastClickRelease
protected

Definition at line 1043 of file PluginSceneManager.c.

◆ m_Timer

ref Timer PluginBase::m_Timer
protected

Definition at line 26 of file PluginAdminLog.c.

◆ m_TurnDirectionEB

EditBoxWidget PluginBase::m_TurnDirectionEB
private

Definition at line 61 of file PluginDayZInfectedDebug.c.

◆ m_TurnTypeCB

XComboBoxWidget PluginBase::m_TurnTypeCB
private

Definition at line 60 of file PluginDayZInfectedDebug.c.

◆ m_UpdateTimer

ref Timer PluginBase::m_UpdateTimer
private

Definition at line 28 of file PluginDeveloperSync.c.

◆ m_UTemperatureSourceDebugs

ref array< ref UTemperatureSourceDebug > PluginBase::m_UTemperatureSourceDebugs
protected

◆ m_UTSAverageTemperature

float PluginBase::m_UTSAverageTemperature
protected

Definition at line 5 of file PluginUniversalTemperatureSourceClient.c.

◆ m_Variables

ref map<int, string> PluginBase::m_Variables
private

Definition at line 25 of file PluginVariables.c.

◆ m_VaultingCB

XComboBoxWidget PluginBase::m_VaultingCB
private

Definition at line 63 of file PluginDayZInfectedDebug.c.

◆ m_Watching

bool PluginBase::m_Watching
private

Definition at line 11 of file PluginRemotePlayerDebugServer.c.

◆ m_wave

AbstractWave PluginBase::m_wave
private

Definition at line 180 of file PluginSoundDebug.c.

◆ MAX_SIMULTANEOUS_UTS

const int PluginBase::MAX_SIMULTANEOUS_UTS = 10
private

◆ PLAYER

PlayerBase PluginBase::PLAYER
staticprivate

Definition at line 5 of file PluginSceneManager.c.

◆ SCENE_DEFAULT_NAME

string PluginBase::SCENE_DEFAULT_NAME = "default"
staticprivate

Definition at line 3 of file PluginSceneManager.c.

◆ SCENE_EDITOR_CMD_POPUP

const int PluginBase::SCENE_EDITOR_CMD_POPUP = 1
staticprivate

Definition at line 14 of file PluginSceneManager.c.

◆ SCENE_EDITOR_CMD_REFRESH

const int PluginBase::SCENE_EDITOR_CMD_REFRESH = 0
staticprivate

Definition at line 13 of file PluginSceneManager.c.

◆ SCENE_EDITOR_CMD_SAVE

const int PluginBase::SCENE_EDITOR_CMD_SAVE = 2
staticprivate

Definition at line 15 of file PluginSceneManager.c.

◆ SCENE_SUFIX

string PluginBase::SCENE_SUFIX = "scene"
staticprivate

Definition at line 4 of file PluginSceneManager.c.

◆ TICK_RATE

const float PluginBase::TICK_RATE = 10
private

Definition at line 6 of file PluginObjectsInteractionManager.c.

Referenced by Decay().

◆ TIME_TO_FORCED_UNLOCK

const float PluginBase::TIME_TO_FORCED_UNLOCK = 60
private

Definition at line 5 of file PluginObjectsInteractionManager.c.

◆ TIMER_PLAYERLIST

const int PluginBase::TIMER_PLAYERLIST = GetPlayerListTimer()
protected

Definition at line 28 of file PluginAdminLog.c.


The documentation for this class was generated from the following files: