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

14
sources/Aliases/AliasesAPI.uc

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

1
sources/Manifest.uc

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

Loading…
Cancel
Save