Browse Source

Change configs to adapt to AcediaCore's changes

master
Anton Tarasenko 2 years ago
parent
commit
89dd02820f
  1. 12
      sources/FixAmmoSelling/FixAmmoSelling.uc
  2. 18
      sources/FixDoshSpam/FixDoshSpam.uc
  3. 10
      sources/FixDualiesCost/FixDualiesCost.uc
  4. 40
      sources/FixFFHack/FixFFHack.uc
  5. 12
      sources/FixInfiniteNades/FixInfiniteNades.uc
  6. 30
      sources/FixInventoryAbuse/FixInventoryAbuse.uc
  7. 14
      sources/FixLogSpam/FixLogSpam.uc
  8. 20
      sources/FixPipes/FixPipes.uc
  9. 12
      sources/FixProjectileFF/FixProjectileFF.uc
  10. 14
      sources/FixSpectatorCrash/FixSpectatorCrash.uc
  11. 15
      sources/FixZedTimeLags/FixZedTimeLags.uc

12
sources/FixAmmoSelling/FixAmmoSelling.uc

@ -1,6 +1,6 @@
/**
* Config object for `FixAmmoSelling_Feature`.
* Copyright 2021 Anton Tarasenko
* Copyright 2021-2022 Anton Tarasenko
*------------------------------------------------------------------------------
* This file is part of Acedia.
*
@ -23,15 +23,15 @@ class FixAmmoSelling extends FeatureConfig
var public config bool allowNegativeDosh;
protected function AssociativeArray ToData()
protected function HashTable ToData()
{
local AssociativeArray data;
data = __().collections.EmptyAssociativeArray();
data.SetBool(P("allowNegativeDosh"), allowNegativeDosh, true);
local HashTable data;
data = __().collections.EmptyHashTable();
data.SetBool(P("allowNegativeDosh"), allowNegativeDosh);
return data;
}
protected function FromData(AssociativeArray source)
protected function FromData(HashTable source)
{
if (source != none) {
allowNegativeDosh = source.GetBool(P("allowNegativeDosh"));

18
sources/FixDoshSpam/FixDoshSpam.uc

@ -1,6 +1,6 @@
/**
* Config object for `FixDoshSpam_Feature`.
* Copyright 2021 Anton Tarasenko
* Copyright 2021-2022 Anton Tarasenko
*------------------------------------------------------------------------------
* This file is part of Acedia.
*
@ -26,18 +26,18 @@ var public /*config*/ float doshPerSecondLimitMin;
var public /*config*/ int criticalDoshAmount;
var public /*config*/ float checkInterval;
protected function AssociativeArray ToData()
protected function HashTable ToData()
{
local AssociativeArray data;
data = __().collections.EmptyAssociativeArray();
data.SetFloat(P("doshPerSecondLimitMax"), doshPerSecondLimitMax, true);
data.SetFloat(P("doshPerSecondLimitMin"), doshPerSecondLimitMin, true);
data.SetInt(P("criticalDoshAmount"), criticalDoshAmount, true);
data.SetFloat(P("checkInterval"), checkInterval, true);
local HashTable data;
data = __().collections.EmptyHashTable();
data.SetFloat(P("doshPerSecondLimitMax"), doshPerSecondLimitMax);
data.SetFloat(P("doshPerSecondLimitMin"), doshPerSecondLimitMin);
data.SetInt(P("criticalDoshAmount"), criticalDoshAmount);
data.SetFloat(P("checkInterval"), checkInterval);
return data;
}
protected function FromData(AssociativeArray source)
protected function FromData(HashTable source)
{
if (source != none)
{

10
sources/FixDualiesCost/FixDualiesCost.uc

@ -23,15 +23,15 @@ class FixDualiesCost extends FeatureConfig
var public config bool allowSellValueIncrease;
protected function AssociativeArray ToData()
protected function HashTable ToData()
{
local AssociativeArray data;
data = __().collections.EmptyAssociativeArray();
data.SetBool(P("allowSellValueIncrease"), allowSellValueIncrease, true);
local HashTable data;
data = __().collections.EmptyHashTable();
data.SetBool(P("allowSellValueIncrease"), allowSellValueIncrease);
return data;
}
protected function FromData(AssociativeArray source)
protected function FromData(HashTable source)
{
if (source != none)
{

40
sources/FixFFHack/FixFFHack.uc

@ -1,6 +1,6 @@
/**
* Config object for `FixFFHack_Feature`.
* Copyright 2021 Anton Tarasenko
* Copyright 2021-2022 Anton Tarasenko
*------------------------------------------------------------------------------
* This file is part of Acedia.
*
@ -25,52 +25,56 @@ var public config bool scaleByDefault;
var public config array< class<DamageType> > alwaysScale;
var public config array< class<DamageType> > neverScale;
protected function AssociativeArray ToData()
protected function HashTable ToData()
{
local int i;
local DynamicArray damageTypeArray;
local AssociativeArray data;
data = _.collections.EmptyAssociativeArray();
data.SetBool(P("scaleByDefault"), scaleByDefault, true);
damageTypeArray = _.collections.EmptyDynamicArray();
local int i;
local HashTable data;
local ArrayList damageTypeArray;
data = _.collections.EmptyHashTable();
data.SetBool(P("scaleByDefault"), scaleByDefault);
damageTypeArray = _.collections.EmptyArrayList();
for (i = 0; i < alwaysScale.length; i += 1) {
damageTypeArray.AddItem(_.text.FromString(string(alwaysScale[i])));
damageTypeArray.AddString(string(alwaysScale[i]));
}
data.SetItem(P("alwaysScale"), damageTypeArray);
damageTypeArray = _.collections.EmptyDynamicArray();
_.memory.Free(damageTypeArray);
damageTypeArray = _.collections.EmptyArrayList();
for (i = 0; i < neverScale.length; i += 1) {
damageTypeArray.AddItem(_.text.FromString(string(neverScale[i])));
damageTypeArray.AddString(string(neverScale[i]));
}
data.SetItem(P("neverScale"), damageTypeArray);
_.memory.Free(damageTypeArray);
return data;
}
protected function FromData(AssociativeArray source)
protected function FromData(HashTable source)
{
local int i;
local DynamicArray damageTypeArray;
local int i;
local ArrayList damageTypeArray;
if (source == none) {
return;
}
scaleByDefault = source.GetBool(P("scaleByDefault"));
alwaysScale.length = 0;
damageTypeArray = source.GetDynamicArray(P("alwaysScale"));
damageTypeArray = source.GetArrayList(P("alwaysScale"));
if (damageTypeArray != none) {
for (i = 0; i < damageTypeArray.GetLength(); i += 1)
{
alwaysScale[i] = class<DamageType>(
_.memory.LoadClass(damageTypeArray.GetText(i)));
_.memory.LoadClassS(damageTypeArray.GetString(i)));
}
}
_.memory.Free(damageTypeArray);
neverScale.length = 0;
damageTypeArray = source.GetDynamicArray(P("neverScale"));
damageTypeArray = source.GetArrayList(P("neverScale"));
if (damageTypeArray != none) {
for (i = 0; i < damageTypeArray.GetLength(); i += 1)
{
neverScale[i] = class<DamageType>(
_.memory.LoadClass(damageTypeArray.GetText(i)));
_.memory.LoadClassS(damageTypeArray.GetString(i)));
}
}
_.memory.Free(damageTypeArray);
}
protected function DefaultIt()

12
sources/FixInfiniteNades/FixInfiniteNades.uc

@ -1,6 +1,6 @@
/**
* Config object for `FixInfiniteNades_Feature`.
* Copyright 2021 Anton Tarasenko
* Copyright 2021-2022 Anton Tarasenko
*------------------------------------------------------------------------------
* This file is part of Acedia.
*
@ -23,15 +23,15 @@ class FixInfiniteNades extends FeatureConfig
var public config bool ignoreTossFlags;
protected function AssociativeArray ToData()
protected function HashTable ToData()
{
local AssociativeArray data;
data = __().collections.EmptyAssociativeArray();
data.SetBool(P("ignoreTossFlags"), ignoreTossFlags, true);
local HashTable data;
data = __().collections.EmptyHashTable();
data.SetBool(P("ignoreTossFlags"), ignoreTossFlags);
return data;
}
protected function FromData(AssociativeArray source)
protected function FromData(HashTable source)
{
if (source != none) {
ignoreTossFlags = source.GetBool(P("ignoreTossFlags"), true);

30
sources/FixInventoryAbuse/FixInventoryAbuse.uc

@ -1,6 +1,6 @@
/**
* Config object for `FixInventoryAbuse_Feature`.
* Copyright 2021 Anton Tarasenko
* Copyright 2021-2022 Anton Tarasenko
*------------------------------------------------------------------------------
* This file is part of Acedia.
*
@ -25,17 +25,17 @@ class FixInventoryAbuse extends FeatureConfig
var public config float checkInterval;
var public config array<FixInventoryAbuse_Feature.DualiesPair> dualiesClasses;
protected function AssociativeArray ToData()
protected function HashTable ToData()
{
local int i;
local DynamicArray pairsArray;
local AssociativeArray data, pair;
data = _.collections.EmptyAssociativeArray();
data.SetFloat(P("checkInterval"), checkInterval, true);
pairsArray = _.collections.EmptyDynamicArray();
local int i;
local ArrayList pairsArray;
local HashTable data, pair;
data = _.collections.EmptyHashTable();
data.SetFloat(P("checkInterval"), checkInterval);
pairsArray = _.collections.EmptyArrayList();
for (i = 0; i < dualiesClasses.length; i += 1)
{
pair = _.collections.EmptyAssociativeArray();
pair = _.collections.EmptyHashTable();
pair.SetItem( P("single"),
_.text.FromString(string(dualiesClasses[i].single)));
pair.SetItem( P("dual"),
@ -43,27 +43,28 @@ protected function AssociativeArray ToData()
pairsArray.AddItem(pair);
}
data.SetItem(P("dualiesClasses"), pairsArray);
_.memory.Free(pairsArray);
return data;
}
protected function FromData(AssociativeArray source)
protected function FromData(HashTable source)
{
local int i;
local DynamicArray pairsArray;
local AssociativeArray loadedPair;
local ArrayList pairsArray;
local HashTable loadedPair;
local FixInventoryAbuse_Feature.DualiesPair newPair;
if (source == none) {
return;
}
checkInterval = source.GetFloat(P("checkInterval"), 0.25);
pairsArray = source.GetDynamicArray(P("dualiesClasses"));
pairsArray = source.GetArrayList(P("dualiesClasses"));
dualiesClasses.length = 0;
if (pairsArray == none) {
return;
}
for (i = 0; i < pairsArray.GetLength(); i += 1)
{
loadedPair = pairsArray.GetAssociativeArray(i);
loadedPair = pairsArray.GetHashTable(i);
if (loadedPair == none) continue;
newPair.single = class<KFWeaponPickup>(
@ -72,6 +73,7 @@ protected function FromData(AssociativeArray source)
_.memory.LoadClass(loadedPair.GetText(P("dual"))) );
dualiesClasses[dualiesClasses.length] = newPair;
}
_.memory.Free(pairsArray);
}
protected function DefaultIt()

14
sources/FixLogSpam/FixLogSpam.uc

@ -1,6 +1,6 @@
/**
* Config object for `FixLogSpam_Feature`.
* Copyright 2021 Anton Tarasenko
* Copyright 2021-2022 Anton Tarasenko
*------------------------------------------------------------------------------
* This file is part of Acedia.
*
@ -24,16 +24,16 @@ class FixLogSpam extends FeatureConfig
var public config bool fixPickupSpam;
var public config bool fixTraderSpam;
protected function AssociativeArray ToData()
protected function HashTable ToData()
{
local AssociativeArray data;
data = __().collections.EmptyAssociativeArray();
data.SetBool(P("fixPickupSpam"), fixPickupSpam, true);
data.SetBool(P("fixTraderSpam"), fixTraderSpam, true);
local HashTable data;
data = __().collections.EmptyHashTable();
data.SetBool(P("fixPickupSpam"), fixPickupSpam);
data.SetBool(P("fixTraderSpam"), fixTraderSpam);
return data;
}
protected function FromData(AssociativeArray source)
protected function FromData(HashTable source)
{
if (source != none)
{

20
sources/FixPipes/FixPipes.uc

@ -1,6 +1,6 @@
/**
* Config object for `FixPipes_Feature`.
* Copyright 2021 Anton Tarasenko
* Copyright 2021-2022 Anton Tarasenko
*------------------------------------------------------------------------------
* This file is part of Acedia.
*
@ -27,19 +27,19 @@ var public config bool preventCorpseDetonation;
var public config bool preventNPCDetonation;
var public config float proximityCheckElevation;
protected function AssociativeArray ToData()
protected function HashTable ToData()
{
local AssociativeArray data;
data = __().collections.EmptyAssociativeArray();
data.SetBool(P("preventMassiveDamage"), preventMassiveDamage, true);
data.SetBool(P("preventSuspiciousDamage"), preventSuspiciousDamage, true);
data.SetBool(P("preventCorpseDetonation"), preventCorpseDetonation, true);
data.SetBool(P("preventNPCDetonation"), preventNPCDetonation, true);
data.SetFloat(P("proximityCheckElevation"), proximityCheckElevation, true);
local HashTable data;
data = __().collections.EmptyHashTable();
data.SetBool(P("preventMassiveDamage"), preventMassiveDamage);
data.SetBool(P("preventSuspiciousDamage"), preventSuspiciousDamage);
data.SetBool(P("preventCorpseDetonation"), preventCorpseDetonation);
data.SetBool(P("preventNPCDetonation"), preventNPCDetonation);
data.SetFloat(P("proximityCheckElevation"), proximityCheckElevation);
return data;
}
protected function FromData(AssociativeArray source)
protected function FromData(HashTable source)
{
if (source == none) {
return;

12
sources/FixProjectileFF/FixProjectileFF.uc

@ -1,6 +1,6 @@
/**
* Config object for `FixProjectileFF_Feature`.
* Copyright 2021 Anton Tarasenko
* Copyright 2021-2022 Anton Tarasenko
*------------------------------------------------------------------------------
* This file is part of Acedia.
*
@ -23,15 +23,15 @@ class FixProjectileFF extends FeatureConfig
var public config bool ignoreFriendlyFire;
protected function AssociativeArray ToData()
protected function HashTable ToData()
{
local AssociativeArray data;
data = __().collections.EmptyAssociativeArray();
data.SetBool(P("ignoreFriendlyFire"), ignoreFriendlyFire, true);
local HashTable data;
data = __().collections.EmptyHashTable();
data.SetBool(P("ignoreFriendlyFire"), ignoreFriendlyFire);
return data;
}
protected function FromData(AssociativeArray source)
protected function FromData(HashTable source)
{
if (source != none) {
ignoreFriendlyFire = source.GetBool(P("ignoreFriendlyFire"));

14
sources/FixSpectatorCrash/FixSpectatorCrash.uc

@ -1,6 +1,6 @@
/**
* Config object for `FixSpectatorCrash_Feature`.
* Copyright 2021 Anton Tarasenko
* Copyright 2021-2022 Anton Tarasenko
*------------------------------------------------------------------------------
* This file is part of Acedia.
*
@ -24,16 +24,16 @@ class FixSpectatorCrash extends FeatureConfig
var public config float spectatorChangeTimeout;
var public config bool allowServerBlock;
protected function AssociativeArray ToData()
protected function HashTable ToData()
{
local AssociativeArray data;
data = __().collections.EmptyAssociativeArray();
data.SetBool(P("allowServerBlock"), allowServerBlock, true);
data.SetFloat(P("spectatorChangeTimeout"), spectatorChangeTimeout, true);
local HashTable data;
data = __().collections.EmptyHashTable();
data.SetBool(P("allowServerBlock"), allowServerBlock);
data.SetFloat(P("spectatorChangeTimeout"), spectatorChangeTimeout);
return data;
}
protected function FromData(AssociativeArray source)
protected function FromData(HashTable source)
{
if (source == none) {
return;

15
sources/FixZedTimeLags/FixZedTimeLags.uc

@ -1,6 +1,6 @@
/**
* Config object for `FixZedTimeLags_Feature`.
* Copyright 2021 Anton Tarasenko
* Copyright 2021-2022 Anton Tarasenko
*------------------------------------------------------------------------------
* This file is part of Acedia.
*
@ -24,17 +24,16 @@ class FixZedTimeLags extends FeatureConfig
var public config int maxGameSpeedUpdatesAmount;
var public config bool disableTick;
protected function AssociativeArray ToData()
protected function HashTable ToData()
{
local AssociativeArray data;
data = __().collections.EmptyAssociativeArray();
data.SetBool(P("disableTick"), disableTick, true);
data.SetInt(P("maxGameSpeedUpdatesAmount"),
maxGameSpeedUpdatesAmount, true);
local HashTable data;
data = __().collections.EmptyHashTable();
data.SetBool(P("disableTick"), disableTick);
data.SetInt(P("maxGameSpeedUpdatesAmount"), maxGameSpeedUpdatesAmount);
return data;
}
protected function FromData(AssociativeArray source)
protected function FromData(HashTable source)
{
if (source == none) {
return;

Loading…
Cancel
Save