Browse Source

Fix feature aliases not working

pull/8/head
Anton Tarasenko 2 years ago
parent
commit
05b3b1613d
  1. 6
      config/AcediaAliases.ini
  2. 14
      sources/Aliases/AliasesAPI.uc
  3. 1
      sources/Manifest.uc

6
config/AcediaAliases.ini

@ -1,5 +1,4 @@
[AcediaCore.FeatureAliasSource]
; Field Medic weapons
[AcediaCore:Commands_Feature FeatureAliases]
Alias="commands"
Alias="command"
@ -8,6 +7,9 @@ Alias="comand"
Alias="cmds"
Alias="cmd"
[AcediaCore:Avarice_Feature FeatureAliases]
Alias="Avarice"
[AcediaFixes:FixAmmoSelling_Feature FeatureAliases]
Alias="FixAmmoSelling"
Alias="FixSelling"
@ -48,11 +50,9 @@ Alias="DualiesFix"
Alias="FixFFHack"
Alias="FixFriendlyFireHack"
Alias="FixFriendFireHack"
Alias="FixFFHack"
Alias="FFHackFix"
Alias="FriendlyFireHackFix"
Alias="FriendFireHackFix"
Alias="FFHackFix"
[AcediaFixes:FixInfiniteNades_Feature FeatureAliases]
Alias="FixInfiniteNades"

14
sources/Aliases/AliasesAPI.uc

@ -116,21 +116,21 @@ public final function AliasSource GetColorSource()
*/
public final function AliasSource GetFeatureSource()
{
local AliasSource colorSource;
local AliasSource featureSource;
local class<AliasSource> sourceClass;
sourceClass = class'AliasService'.default.colorAliasesSource;
sourceClass = class'AliasService'.default.featureAliasesSource;
if (sourceClass == none)
{
_.logger.Auto(noColorAliasSource);
_.logger.Auto(noFeatureAliasSource);
return none;
}
colorSource = AliasSource(sourceClass.static.GetInstance(true));
if (colorSource == none)
featureSource = AliasSource(sourceClass.static.GetInstance(true));
if (featureSource == none)
{
_.logger.Auto(invalidColorAliasSource).ArgClass(sourceClass);
_.logger.Auto(invalidFeatureAliasSource).ArgClass(sourceClass);
return none;
}
return colorSource;
return featureSource;
}
/**

1
sources/Manifest.uc

@ -28,6 +28,7 @@ defaultproperties
aliasSources(0) = class'AliasSource'
aliasSources(1) = class'WeaponAliasSource'
aliasSources(2) = class'ColorAliasSource'
aliasSources(3) = class'FeatureAliasSource'
testCases(0) = class'TEST_Base'
testCases(1) = class'TEST_ActorService'
testCases(2) = class'TEST_Boxes'

Loading…
Cancel
Save