Skip to content

Commit

Permalink
Standardize module naming pattern (*.module.ahk) and class suffix (Mo…
Browse files Browse the repository at this point in the history
…dule)
  • Loading branch information
bmcclure committed Sep 26, 2021
1 parent d261fa8 commit 45bc683
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 15 deletions.
12 changes: 6 additions & 6 deletions Lib/Launchpad/App/Launchpad.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@

GetDefaultModules(config) {
modules := super.GetDefaultModules(config)
modules["Bethesda"] := "BethesdaModule"
modules["Blizzard"] := "BlizzardModule"
modules["Epic"] := "EpicModule"
modules["Origin"] := "OriginModule"
modules["Riot"] := "RiotModule"
modules["Steam"] := "SteamModule"
modules["Bethesda"] := "Bethesda"
modules["Blizzard"] := "Blizzard"
modules["Epic"] := "Epic"
modules["Origin"] := "Origin"
modules["Riot"] := "Riot"
modules["Steam"] := "Steam"
return modules
}

Expand Down
12 changes: 6 additions & 6 deletions Lib/Launchpad/Includes.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,20 @@
#Include Installer\DependencyInstaller.ahk
#Include Installer\LaunchpadUpdate.ahk
#Include Locator\GameExeLocator.ahk
#Include Modules\Bethesda\BethesdaModule.ahk
#Include Modules\Bethesda\Bethesda.module.ahk
#Include Modules\Bethesda\GamePlatform\BethesdaPlatform.ahk
#Include Modules\Blizzard\BlizzardModule.ahk
#Include Modules\Blizzard\Blizzard.module.ahk
#Include Modules\Blizzard\Config\BlizzardProductDb.ahk
#Include Modules\Blizzard\GamePlatform\BlizzardPlatform.ahk
#Include Modules\Epic\EpicModule.ahk
#Include Modules\Epic\Epic.module.ahk
#Include Modules\Epic\GamePlatform\EpicPlatform.ahk
#Include Modules\LaunchpadApi\AuthProvider\LaunchpadApiAuthProvider.ahk
#Include Modules\LaunchpadApi\DataSource\ApiDataSource.ahk
#Include Modules\Origin\OriginModule.ahk
#Include Modules\Origin\Origin.module.ahk
#Include Modules\Origin\GamePlatform\OriginPlatform.ahk
#Include Modules\Riot\RiotModule.ahk
#Include Modules\Riot\Riot.module.ahk
#Include Modules\Riot\GamePlatform\RiotPlatform.ahk
#Include Modules\Steam\SteamModule.ahk
#Include Modules\Steam\Steam.module.ahk
#Include Modules\Steam\GamePlatform\SteamPlatform.ahk
#Include Service\BuilderManager.ahk
#Include Service\LauncherManager.ahk
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Lib/Shared/AppLib/App/AppBase.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class AppBase {

GetDefaultModules(config) {
modules := Map()
modules["Auth"] := "AuthModule"
modules["Auth"] := "Auth"
return modules
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ class ClassComponentLoader extends ComponentLoaderBase {

LoadComponent(key, componentInfo) {
if (Type(componentInfo) == "String") {
componentInfo := Map("class", componentInfo)
className := componentInfo . this.componentManager.classSuffix
componentInfo := Map("class", className)
}

className := this.GetComponentClass(key, componentInfo)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class ContainerServiceBase extends AppServiceBase {
loadAlterEvent := ""
loader := ""
discoverer := ""
classSuffix := ""

__New(app, defaultComponentInfo := "", defaultComponents := "", autoLoad := true) {
this.defaultComponentInfo := defaultComponentInfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class ModuleManager extends ConfigurableContainerServiceBase {
loadEvent := Events.MODULE_LOAD
loadAlterEvent := Events.MODULE_LOAD_ALTER
moduleDirs := []
classSuffix := "Module"

__New(app, configPath, moduleDirs := "", defaultModuleInfo := "", defaultModules := "", autoLoad := true) {
configObj := ModuleConfig(app, configPath, true)
Expand Down
2 changes: 1 addition & 1 deletion Lib/Shared/Includes.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
#Include DataLib\StructuredData\StructuredDataBase.ahk
#Include DataLib\StructuredData\VdfData.ahk
#Include DataLib\StructuredData\Xml.ahk
#Include Modules\Auth\AuthModule.ahk
#Include Modules\Auth\Auth.module.ahk
#Include ThemeLib\LV_Constants.ahk
#Include ThemeLib\AnimatedGif\AnimatedGif.ahk
#Include ThemeLib\GuiShape\GuiShapeBase.ahk
Expand Down
File renamed without changes.

0 comments on commit 45bc683

Please sign in to comment.