MCPcopy Create free account
hub / github.com/Phobos-developers/Phobos / LoadFromINIFile

Method LoadFromINIFile

src/Ext/BulletType/Body.cpp:25–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23// load / save
24
25void BulletTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI)
26{
27 auto pThis = this->OwnerObject();
28 const char* pSection = pThis->ID;
29 INI_EX exINI(pINI);
30
31 this->Armor.Read(exINI, pSection, "Armor");
32 this->Interceptable.Read(exINI, pSection, "Interceptable");
33 this->Interceptable_DeleteOnIntercept.Read(exINI, pSection, "Interceptable.DeleteOnIntercept");
34 this->Interceptable_WeaponOverride.Read<true>(exINI, pSection, "Interceptable.WeaponOverride");
35 this->Gravity.Read(exINI, pSection, "Gravity");
36
37 this->TrajectoryType.LoadFromINI(pINI, pSection);
38
39 this->Shrapnel_AffectsGround.Read(exINI, pSection, "Shrapnel.AffectsGround");
40 this->Shrapnel_AffectsBuildings.Read(exINI, pSection, "Shrapnel.AffectsBuildings");
41 this->Shrapnel_UseWeaponTargeting.Read(exINI, pSection, "Shrapnel.UseWeaponTargeting");
42 this->ClusterScatter_Min.Read(exINI, pSection, "ClusterScatter.Min");
43 this->ClusterScatter_Max.Read(exINI, pSection, "ClusterScatter.Max");
44 this->SubjectToLand.Read(exINI, pSection, "SubjectToLand");
45 this->SubjectToLand_Detonate.Read(exINI, pSection, "SubjectToLand.Detonate");
46 this->SubjectToWater.Read(exINI, pSection, "SubjectToWater");
47 this->SubjectToWater_Detonate.Read(exINI, pSection, "SubjectToWater.Detonate");
48 this->AAOnly.Read(exINI, pSection, "AAOnly");
49 this->Arcing_AllowElevationInaccuracy.Read(exINI, pSection, "Arcing.AllowElevationInaccuracy");
50 this->ReturnWeapon.Read<true>(exINI, pSection, "ReturnWeapon");
51
52 this->Splits.Read(exINI, pSection, "Splits");
53 this->AirburstSpread.Read(exINI, pSection, "AirburstSpread");
54 this->RetargetAccuracy.Read(exINI, pSection, "RetargetAccuracy");
55 this->RetargetSelf.Read(exINI, pSection, "RetargetSelf");
56 this->RetargetSelf_Probability.Read(exINI, pSection, "RetargetSelf.Probability");
57 this->AroundTarget.Read(exINI, pSection, "AroundTarget");
58 this->Airburst_UseCluster.Read(exINI, pSection, "Airburst.UseCluster");
59 this->Airburst_RandomClusters.Read(exINI, pSection, "Airburst.RandomClusters");
60 this->Splits_TargetingDistance.Read(exINI, pSection, "Splits.TargetingDistance");
61 this->Splits_TargetCellRange.Read(exINI, pSection, "Splits.TargetCellRange");
62 this->Splits_UseWeaponTargeting.Read(exINI, pSection, "Splits.UseWeaponTargeting");
63 this->AirburstWeapon_ApplyFirepowerMult.Read(exINI, pSection, "AirburstWeapon.ApplyFirepowerMult");
64
65 // Ares 0.7
66 this->BallisticScatter_Min.Read(exINI, pSection, "BallisticScatter.Min");
67 this->BallisticScatter_Max.Read(exINI, pSection, "BallisticScatter.Max");
68
69 INI_EX exArtINI(CCINIClass::INI_Art);
70
71 if (strlen(pThis->ImageFile))
72 pSection = pThis->ImageFile;
73
74 this->LaserTrail_Types.Read(exArtINI, pSection, "LaserTrail.Types");
75
76 this->TrajectoryValidation();
77}
78
79void BulletTypeExt::ExtData::TrajectoryValidation() const
80{

Callers

nothing calls this directly

Calls 3

TrajectoryValidationMethod · 0.95
ReadMethod · 0.45
LoadFromINIMethod · 0.45

Tested by

no test coverage detected