Skip to content

Commit

Permalink
feat: Add support for F.E.A.R./F.E.A.R. Combat
Browse files Browse the repository at this point in the history
  • Loading branch information
cetteup committed Feb 7, 2023
1 parent 0818adc commit 0c6edf9
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 36 deletions.
1 change: 1 addition & 0 deletions cmd/joinme.click-launcher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func init() {
titles.Cod2,
titles.Cod4,
titles.CodWaw,
titles.Fear,
titles.FearSec2,
titles.Paraworld,
titles.Swat4,
Expand Down
70 changes: 70 additions & 0 deletions internal/titles/fear.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
package titles

import (
"github.com/cetteup/joinme.click-launcher/internal/domain"
"github.com/cetteup/joinme.click-launcher/internal/titles/internal"
"github.com/cetteup/joinme.click-launcher/pkg/game_launcher"
"github.com/cetteup/joinme.click-launcher/pkg/software_finder"
)

var Fear = domain.GameTitle{
Name: "F.E.A.R./F.E.A.R. Combat", // Combat is the free to play release of the multiplayer, both are compatible with patch >=1.07
ProtocolScheme: "fear",
FinderConfigs: []software_finder.Config{
{
ForType: software_finder.RegistryFinder,
RegistryKey: software_finder.RegistryKeyLocalMachine,
RegistryPath: "SOFTWARE\\WOW6432Node\\Monolith Productions\\FEAR\\1.00.0000",
RegistryValueName: "InstallDir",
},
{
ForType: software_finder.RegistryFinder,
RegistryKey: software_finder.RegistryKeyLocalMachine,
RegistryPath: "SOFTWARE\\WOW6432Node\\Monolith Productions\\FEARCombat\\1.00.0000",
RegistryValueName: "InstallDir",
},
},
LauncherConfig: game_launcher.Config{
ExecutableName: "FEARMP.exe",
HookConfigs: []game_launcher.HookConfig{
{
Handler: internal.HookKillProcess,
When: game_launcher.HookWhenPreLaunch,
ExitOnError: true,
},
},
},
URLValidator: internal.IPPortURLValidator{},
CmdBuilder: internal.MakeSimpleCmdBuilder("+join"),
HookHandlers: []game_launcher.HookHandler{
internal.MakeKillProcessHookHandler(true),
},
}

var FearSec2 = domain.GameTitle{
Name: "F.E.A.R. Combat (SEC2)",
ProtocolScheme: "fearsec2",
FinderConfigs: []software_finder.Config{
{
ForType: software_finder.RegistryFinder,
RegistryKey: software_finder.RegistryKeyLocalMachine,
RegistryPath: "SOFTWARE\\WOW6432Node\\FEAR-Community.org\\FEAR Combat (SEC2)",
RegistryValueName: "Path",
},
},
LauncherConfig: game_launcher.Config{
ExecutableName: "FEARMP.exe",
HookConfigs: []game_launcher.HookConfig{
{
Handler: internal.HookKillProcess,
When: game_launcher.HookWhenPreLaunch,
ExitOnError: true,
},
},
},
URLValidator: internal.IPPortURLValidator{},
CmdBuilder: internal.MakeSimpleCmdBuilder("+join"),
HookHandlers: []game_launcher.HookHandler{
internal.MakeKillProcessHookHandler(true),
},
}
36 changes: 0 additions & 36 deletions internal/titles/fear_sec2.go

This file was deleted.

0 comments on commit 0c6edf9

Please sign in to comment.