DayZ 1.24
Loading...
Searching...
No Matches
DayZProfilesOptions Class Reference

Private Member Functions

DayZGame m_Game void DayZProfilesOptions ()
 
void RegisterProfileOption (EDayZProfilesOptions option, string profileOptionName, bool def=true)
 
void RegisterProfileOptionBool (EDayZProfilesOptions option, string profileOptionName, bool defaultValue=true)
 
void RegisterProfileOptionInt (EDayZProfilesOptions option, string profileOptionName, int defaultValue=0)
 
void RegisterProfileOptionFloat (EDayZProfilesOptions option, string profileOptionName, float defaultValue=0.0)
 
void ResetOptionsBool ()
 
void ResetOptions ()
 
void ResetOptionsInt ()
 
void ResetOptionsFloat ()
 
void SetProfileOption (EDayZProfilesOptions option, bool value)
 
void SetProfileOptionBool (EDayZProfilesOptions option, bool value)
 
void SetProfileOptionInt (EDayZProfilesOptions option, int value)
 
void SetProfileOptionFloat (EDayZProfilesOptions option, float value)
 
bool GetProfileOption (EDayZProfilesOptions option)
 
bool GetProfileOptionBool (EDayZProfilesOptions option)
 
int GetProfileOptionInt (EDayZProfilesOptions option)
 
float GetProfileOptionFloat (EDayZProfilesOptions option)
 
bool GetProfileOptionDefault (EDayZProfilesOptions option)
 
bool GetProfileOptionDefaultBool (EDayZProfilesOptions option)
 
int GetProfileOptionDefaultInt (EDayZProfilesOptions option)
 
float GetProfileOptionDefaultFloat (EDayZProfilesOptions option)
 
map< EDayZProfilesOptions, ref DayZProfilesOptionBoolGetProfileOptionMap ()
 

Private Attributes

ref map< EDayZProfilesOptions, ref DayZProfilesOptionBoolm_DayZProfilesOptionsBool
 
ref map< EDayZProfilesOptions, ref DayZProfilesOptionIntm_DayZProfilesOptionsInt
 
ref map< EDayZProfilesOptions, ref DayZProfilesOptionFloatm_DayZProfilesOptionsFloat
 
ref map< EDayZProfilesOptions, ref DayZProfilesOptionm_DayZProfilesOptions
 

Detailed Description

Definition at line 388 of file DayZGame.c.

Constructor & Destructor Documentation

◆ DayZProfilesOptions()

DayZGame m_Game void DayZProfilesOptions::DayZProfilesOptions ( )
inlineprivate

Definition at line 395 of file DayZGame.c.

396 {
400 }
ref map< EDayZProfilesOptions, ref DayZProfilesOptionBool > m_DayZProfilesOptionsBool
Definition DayZGame.c:390
ref map< EDayZProfilesOptions, ref DayZProfilesOptionInt > m_DayZProfilesOptionsInt
Definition DayZGame.c:391
ref map< EDayZProfilesOptions, ref DayZProfilesOptionFloat > m_DayZProfilesOptionsFloat
Definition DayZGame.c:392

References m_DayZProfilesOptionsBool, m_DayZProfilesOptionsFloat, and m_DayZProfilesOptionsInt.

Member Function Documentation

◆ GetProfileOption()

bool DayZProfilesOptions::GetProfileOption ( EDayZProfilesOptions option)
inlineprivate

Definition at line 533 of file DayZGame.c.

534 {
536 {
538 return po.param2;
539 }
540
541 return true;
542 }

References m_DayZProfilesOptionsBool.

Referenced by GetProfileOptionBool().

◆ GetProfileOptionBool()

bool DayZProfilesOptions::GetProfileOptionBool ( EDayZProfilesOptions option)
inlineprivate

Definition at line 544 of file DayZGame.c.

545 {
546 return GetProfileOption(option);
547 }
bool GetProfileOption(EDayZProfilesOptions option)
Definition DayZGame.c:533

References GetProfileOption().

◆ GetProfileOptionDefault()

bool DayZProfilesOptions::GetProfileOptionDefault ( EDayZProfilesOptions option)
inlineprivate

Definition at line 571 of file DayZGame.c.

572 {
574 }
bool GetProfileOptionDefaultBool(EDayZProfilesOptions option)
Definition DayZGame.c:576

References GetProfileOptionDefaultBool().

◆ GetProfileOptionDefaultBool()

bool DayZProfilesOptions::GetProfileOptionDefaultBool ( EDayZProfilesOptions option)
inlineprivate

Definition at line 576 of file DayZGame.c.

577 {
579 {
581 return po.param3;
582 }
583
584 ErrorEx("Invalid profile option id! Returning 'true'.", ErrorExSeverity.WARNING);
585 return true;
586 }
ErrorExSeverity
Definition EnDebug.c:62
enum ShapeType ErrorEx

References ErrorEx, and m_DayZProfilesOptionsBool.

Referenced by GetProfileOptionDefault().

◆ GetProfileOptionDefaultFloat()

float DayZProfilesOptions::GetProfileOptionDefaultFloat ( EDayZProfilesOptions option)
inlineprivate

Definition at line 600 of file DayZGame.c.

601 {
603 {
605 return po.param3;
606 }
607
608 ErrorEx("Invalid profile option id! Returning '0.0'.", ErrorExSeverity.WARNING);
609 return 0.0;
610 }

References ErrorEx, and m_DayZProfilesOptionsFloat.

◆ GetProfileOptionDefaultInt()

int DayZProfilesOptions::GetProfileOptionDefaultInt ( EDayZProfilesOptions option)
inlineprivate

Definition at line 588 of file DayZGame.c.

589 {
591 {
593 return po.param3;
594 }
595
596 ErrorEx("Invalid profile option id! Returning '0'.", ErrorExSeverity.WARNING);
597 return 0;
598 }

References ErrorEx, and m_DayZProfilesOptionsInt.

◆ GetProfileOptionFloat()

float DayZProfilesOptions::GetProfileOptionFloat ( EDayZProfilesOptions option)
inlineprivate

Definition at line 560 of file DayZGame.c.

561 {
563 {
565 return po.param2;
566 }
567
568 return 0.0;
569 }

References m_DayZProfilesOptionsFloat.

◆ GetProfileOptionInt()

int DayZProfilesOptions::GetProfileOptionInt ( EDayZProfilesOptions option)
inlineprivate

Definition at line 549 of file DayZGame.c.

550 {
552 {
554 return po.param2;
555 }
556
557 return 0;
558 }

References m_DayZProfilesOptionsInt.

◆ GetProfileOptionMap()

map< EDayZProfilesOptions, ref DayZProfilesOptionBool > DayZProfilesOptions::GetProfileOptionMap ( )
inlineprivate

Definition at line 612 of file DayZGame.c.

613 {
616
617 return null;
618 }
ref map< EDayZProfilesOptions, ref DayZProfilesOption > m_DayZProfilesOptions
Definition DayZGame.c:622

References m_DayZProfilesOptions.

◆ RegisterProfileOption()

void DayZProfilesOptions::RegisterProfileOption ( EDayZProfilesOptions option,
string profileOptionName,
bool def = true )
inlineprivate

init of DayZProfilesOption - profileOptionName, value from Profiles files, or use default value

Definition at line 402 of file DayZGame.c.

403 {
404 if (!m_DayZProfilesOptionsBool.Contains(option))
405 {
408
411 }
412 }
DayZProfilesOption DayZProfilesOptionBool
Definition DayZGame.c:384
void SetProfileOptionBool(EDayZProfilesOptions option, bool value)
Definition DayZGame.c:504
bool GetProfileValueBool(string name, bool def=false)
Return value from profile variable, if variable with given name is not present, default value is retu...
Definition tools.c:958

References GetProfileValueBool(), m_DayZProfilesOptionsBool, and SetProfileOptionBool().

Referenced by RegisterProfileOptionBool().

◆ RegisterProfileOptionBool()

void DayZProfilesOptions::RegisterProfileOptionBool ( EDayZProfilesOptions option,
string profileOptionName,
bool defaultValue = true )
inlineprivate

Definition at line 414 of file DayZGame.c.

415 {
417 }
void RegisterProfileOption(EDayZProfilesOptions option, string profileOptionName, bool def=true)
Definition DayZGame.c:402

References RegisterProfileOption().

◆ RegisterProfileOptionFloat()

void DayZProfilesOptions::RegisterProfileOptionFloat ( EDayZProfilesOptions option,
string profileOptionName,
float defaultValue = 0.0 )
inlineprivate

init of DayZProfilesOption - profileOptionName, value from Profiles files, or use default value

Definition at line 433 of file DayZGame.c.

434 {
435 if (!m_DayZProfilesOptionsFloat.Contains(option))
436 {
438 string outValue;
439 GetGame().GetProfileString(profileOptionName, outValue);
440 float value = outValue.ToFloat();
441
444 }
445 }
Param3< string, float, float > DayZProfilesOptionFloat
Definition DayZGame.c:386
void SetProfileOptionFloat(EDayZProfilesOptions option, float value)
Definition DayZGame.c:521
proto native CGame GetGame()

References GetGame(), m_DayZProfilesOptionsFloat, and SetProfileOptionFloat().

◆ RegisterProfileOptionInt()

void DayZProfilesOptions::RegisterProfileOptionInt ( EDayZProfilesOptions option,
string profileOptionName,
int defaultValue = 0 )
inlineprivate

init of DayZProfilesOption - profileOptionName, value from Profiles files, or use default value

Definition at line 419 of file DayZGame.c.

420 {
421 if (!m_DayZProfilesOptionsInt.Contains(option))
422 {
424 string outValue;
425 GetGame().GetProfileString(profileOptionName, outValue);
426 int value = outValue.ToInt();
427
430 }
431 }
Param3< string, int, int > DayZProfilesOptionInt
Definition DayZGame.c:385
void SetProfileOptionInt(EDayZProfilesOptions option, int value)
Definition DayZGame.c:509

References GetGame(), m_DayZProfilesOptionsInt, and SetProfileOptionInt().

◆ ResetOptions()

void DayZProfilesOptions::ResetOptions ( )
inlineprivate

Definition at line 459 of file DayZGame.c.

460 {
462 }
void ResetOptionsBool()
Definition DayZGame.c:447

References ResetOptionsBool().

◆ ResetOptionsBool()

void DayZProfilesOptions::ResetOptionsBool ( )
inlineprivate

◆ ResetOptionsFloat()

void DayZProfilesOptions::ResetOptionsFloat ( )
inlineprivate

◆ ResetOptionsInt()

void DayZProfilesOptions::ResetOptionsInt ( )
inlineprivate

Definition at line 464 of file DayZGame.c.

References GetGame(), m_DayZProfilesOptionsInt, and SetProfileOptionInt().

◆ SetProfileOption()

void DayZProfilesOptions::SetProfileOption ( EDayZProfilesOptions option,
bool value )
inlineprivate

Definition at line 492 of file DayZGame.c.

493 {
495 {
497
498 po.param2 = value;
499 GetGame().SetProfileString(po.param1, value.ToString());
500 GetGame().SaveProfile();
501 }
502 }

References GetGame(), and m_DayZProfilesOptionsBool.

Referenced by SetProfileOptionBool().

◆ SetProfileOptionBool()

void DayZProfilesOptions::SetProfileOptionBool ( EDayZProfilesOptions option,
bool value )
inlineprivate

Definition at line 504 of file DayZGame.c.

505 {
507 }
void SetProfileOption(EDayZProfilesOptions option, bool value)
Definition DayZGame.c:492

References SetProfileOption().

Referenced by RegisterProfileOption(), and ResetOptionsBool().

◆ SetProfileOptionFloat()

void DayZProfilesOptions::SetProfileOptionFloat ( EDayZProfilesOptions option,
float value )
inlineprivate

Definition at line 521 of file DayZGame.c.

522 {
524 {
526
527 po.param2 = value;
528 GetGame().SetProfileString(po.param1, value.ToString());
529 GetGame().SaveProfile();
530 }
531 }

References GetGame(), and m_DayZProfilesOptionsFloat.

Referenced by RegisterProfileOptionFloat(), and ResetOptionsFloat().

◆ SetProfileOptionInt()

void DayZProfilesOptions::SetProfileOptionInt ( EDayZProfilesOptions option,
int value )
inlineprivate

Definition at line 509 of file DayZGame.c.

510 {
512 {
514
515 po.param2 = value;
516 GetGame().SetProfileString(po.param1, value.ToString());
517 GetGame().SaveProfile();
518 }
519 }

References GetGame(), and m_DayZProfilesOptionsInt.

Referenced by RegisterProfileOptionInt(), and ResetOptionsInt().

Member Data Documentation

◆ m_DayZProfilesOptions

ref map<EDayZProfilesOptions, ref DayZProfilesOption> DayZProfilesOptions::m_DayZProfilesOptions
private

DEPRECATED

Definition at line 622 of file DayZGame.c.

Referenced by GetProfileOptionMap().

◆ m_DayZProfilesOptionsBool

◆ m_DayZProfilesOptionsFloat

◆ m_DayZProfilesOptionsInt


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