Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
enconvert.c File Reference

Go to the source code of this file.

Data Structures

class  bool
class  EnumTools
class  float
class  func
class  typename
class  vector

Enumerations

enum  EBool { NO = 0 , YES = 1 }

Functions

proto string AsciiToString ()
 Converts ASCII code to string.
bool InRange (int min, int max, bool inclusive_min=true, bool inclusive_max=true)
 Check whether integer falls into an inclusive range.
proto string ToHex ()
 Integer to hex (as string).
proto string ToString ()
string ToStringLen (int len)
 Integer to string with fixed length, padded with zeroes.

Variables

static string m_ZeroPad [ZERO_PAD_SIZE] = {"", "0", "00", "000", "0000", "00000", "000000", "0000000"}
const int MAX = 2147483647
const int MIN = -2147483648
enum EBool ZERO_PAD_SIZE = 8

Enumeration Type Documentation

◆ EBool

enum EBool
Enumerator
NO 
YES 

Definition at line 16 of file enconvert.c.

Function Documentation

◆ AsciiToString()

proto string AsciiToString ( )
protected

Converts ASCII code to string.

Parameters
asciiASCII code for convert to string.
Returns
string - Converted int.
int ascii_code = 77;
string str = ascii_code.AsciiToString();
Print(str);
>> str = 'M'
proto void Print(void var)
Prints content of variable to console/log.

◆ InRange()

bool InRange ( int min,
int max,
bool inclusive_min = true,
bool inclusive_max = true )
protected

Check whether integer falls into an inclusive range.

Parameters
minint low end of range
maxint high end of range
Returns
bool True if this value is withing the set range
int num = 123;
bool test = num.InRange( 100, 150 );
Print(test);
>> s = true

Definition at line 97 of file enconvert.c.

◆ ToHex()

proto string ToHex ( )
protected

Integer to hex (as string).

Returns
string Converted integer as hexadecimal value
int num = 10;
string s = num.ToHex();
Print(s);
>> s = '0xA'

◆ ToString()

proto string ToString ( )
protected

Referenced by HFSMBase< Class FSMStateBase, Class FSMEventBase, Class FSMActionBase, Class FSMGuardBase >::Abort(), DimmingConfig::AddDimmingPattern(), ApplyModificationsResults(), EmoteConstructor::ConstructEmotes(), AnimatedActionBase::Do(), AnimatedActionBase::End(), HFSMBase< Class FSMStateBase, Class FSMEventBase, Class FSMActionBase, Class FSMGuardBase >::FindAbortDestinationState(), ForceSwapEntities(), ScriptedWidgetEventHandler::GenerateQuickBarBackgroundTiles(), CharcoalMdfr::GetDebugTextSimple(), KeysToUIElements::GetKeyToUIElement(), LogTemplates::GetTemplate(), HandleForceSwapEntities(), HandleHandEvent(), HandleSwapEntities(), HandleTakeToDst(), ActionInput::Init(), ActionBaseCB::Interrupt(), MissionBase::InvokeOnConnect(), MissionBase::InvokeOnDisconnect(), Component::LogErrorBadCompType(), BotStateBase::OnAbort(), HandStateBase::OnAbort(), Entity::OnAction(), OnActionEnd(), ScriptConsoleGeneralTab::OnClick(), ManBase::OnConnect(), ManBase::OnDisconnect(), BotStateBase::OnEntry(), HandStateBase::OnEntry(), OnErrorThrown(), BotStateBase::OnExit(), ActionBaseCB::OnFinish(), ActionDeployBase::OnFinishProgressServer(), LaughterSymptom::OnGetActivatedClient(), SymptomBase::OnGetActivatedClient(), LaughterSymptom::OnGetActivatedServer(), SymptomBase::OnGetActivatedServer(), LaughterSymptom::OnGetDeactivatedClient(), SymptomBase::OnGetDeactivatedClient(), LaughterSymptom::OnGetDeactivatedServer(), SymptomBase::OnGetDeactivatedServer(), UIPopupScript::OnOpen(), Icon::OnPerformRecipe(), Land_WarheadStorage_Main::OnPowerOnClient(), ManBase::OnReconnect(), OnUpdateClient(), HFSMBase< Class FSMStateBase, Class FSMEventBase, Class FSMActionBase, Class FSMGuardBase >::ProcessAbortEvent(), HFSMBase< WeaponStateBase, WeaponEventBase, WeaponActionBase, WeaponGuardBase >::ProcessAbortEvent(), HFSMBase< Class FSMStateBase, Class FSMEventBase, Class FSMActionBase, Class FSMGuardBase >::ProcessEvent(), HFSMBase< WeaponStateBase, WeaponEventBase, WeaponActionBase, WeaponGuardBase >::ProcessEvent(), KeysToUIElements::RegisterKeyToUIElement(), LogTemplates::RegisterLogTamplate(), ScriptedWidgetEventHandler::Remove(), SVNBlamePlugin::Run(), ManBase::Save(), ActionInput::SetInput(), ScriptedWidgetEventHandler::SetInterpTime(), SlotsIcon::SetItemSize(), DebugMonitor::SetPosition(), SetTextSmart(), ScriptedWidgetEventHandler::SetTimeBefore(), ScriptedWidgetEventHandler::Show(), SpawnItems(), FSMBase< Class FSMStateBase, Class FSMEventBase, Class FSMActionBase, Class FSMGuardBase >::Start(), HFSMBase< Class FSMStateBase, Class FSMEventBase, Class FSMActionBase, Class FSMGuardBase >::Start(), OFSMBase< Class FSMStateBase, Class FSMEventBase, Class FSMActionBase, Class FSMGuardBase >::Start(), StoreInputForRemotes(), SwapEntities(), TakeToDst(), HFSMBase< Class FSMStateBase, Class FSMEventBase, Class FSMActionBase, Class FSMGuardBase >::Terminate(), ComponentEnergyManager::UnplugCordFromSocket(), Land_WarheadStorage_Main::UpdateDoorStateClient(), ServerBrowserTab::UpdatePageButtons(), Container::UpdateRowVisibility(), ComponentEnergyManager::UpdateSelections(), ComponentEnergyManager::UpdateSocketSelections(), ValidateDestroy(), EffectSound::ValidateSoundWave(), ValidateSwap(), and ValidateSyncMove().

◆ ToStringLen()

string ToStringLen ( int len)
protected

Integer to string with fixed length, padded with zeroes.

Parameters
numint integer to convert
lenint fixed length
Returns
vector Converted s as vector
int num = 123;
string s = num.ToStringLen(5);
Print(s);
>> s = '00123'

Definition at line 59 of file enconvert.c.

References string::Length(), m_ZeroPad, string::ToString(), and ZERO_PAD_SIZE.

Referenced by ItemBase::GetSlotPosition(), ItemBase::RemoveSlot(), ItemBase::SetSlotTextureDigged(), ItemBase::SetSlotTextureFertilized(), UpdatePlant(), and ItemBase::UpdateSlotTexture().

Variable Documentation

◆ m_ZeroPad

string m_ZeroPad[ZERO_PAD_SIZE] = {"", "0", "00", "000", "0000", "00000", "000000", "0000000"}
staticprotected

Definition at line 25 of file enconvert.c.

Referenced by ToStringLen().

◆ MAX

◆ MIN

◆ ZERO_PAD_SIZE

enum EBool ZERO_PAD_SIZE = 8

Referenced by ToStringLen().