Skip to content

Commit

Permalink
Merge pull request #16 from seionmoya/main
Browse files Browse the repository at this point in the history
Remove unused properties in GameConfig
  • Loading branch information
seionmoya authored Aug 30, 2024
2 parents 9dc2fce + 92591b9 commit 5a51ef2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 37 deletions.
38 changes: 19 additions & 19 deletions Fuyu.Platform.Common/Models/EFT/Responses/GameConfigResponse.cs
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace Fuyu.Platform.Common.Models.EFT.Responses
{
[DataContract]
public struct GameConfigResponse
{
[DataMember]
public int aid;
// SKIPPED: aid
// Reason: only used on BSG's internal server

[DataMember]
public string lang;
// SKIPPED: lang
// Reason: only used on BSG's internal server

[DataMember]
public Dictionary<string, string> languages;
// SKIPPED: languages
// Reason: only used on BSG's internal server

[DataMember]
public bool ndaFree;
// SKIPPED: ndaFree
// Reason: only used on BSG's internal server

[DataMember]
public int taxonomy;
// SKIPPED: taxomony
// Reason: only used on BSG's internal server

[DataMember]
public string activeProfileId;
// SKIPPED: activeProfileId
// Reason: only used on BSG's internal server

[DataMember]
public Backends backend;

[DataMember]
public bool useProtobuf;
// SKIPPED: useProtobuf
// Reason: only used on BSG's internal server

[DataMember]
public double utc_time;

[DataMember]
public int totalInGame;
// SKIPPED: totalInGame
// Reason: only used on BSG's internal server

[DataMember]
public bool reportAvailable;

[DataMember]
public bool twitchEventMember;

[DataMember]
public string sessionMode;
// SKIPPED: sessionMode
// Reason: only used on BSG's internal server

[DataMember]
public PurchasedGames purchasedGames;

// NOTE: in relation to trader "Ref" (is game synced with Arena)
[DataMember]
public bool isGameSynced;
}
Expand Down
23 changes: 5 additions & 18 deletions Fuyu.Platform.Server/Behaviours/EFT/GameConfig.cs
Original file line number Diff line number Diff line change
@@ -1,40 +1,27 @@
using Fuyu.Platform.Common.Http;
using Fuyu.Platform.Common.Models.EFT.Responses;
using Fuyu.Platform.Common.Serialization;
using Fuyu.Platform.Server.Databases;

namespace Fuyu.Platform.Server.Behaviours.EFT
{
public class GameConfig : FuyuBehaviour
{
public override void Run(FuyuContext context)
{
var sessionId = context.GetSessionId();
var accountId = FuyuDatabase.Accounts.GetSession(sessionId);

var languages = EftDatabase.Locales.GetLanguages();
var response = new ResponseBody<GameConfigResponse>
{
data = new GameConfigResponse()
{
aid = accountId,
lang = "en", // TODO: observe how this works
languages = languages,
ndaFree = false,
taxonomy = 6,
backend = new Backends()
{
Lobby = "http://localhost:8000",
Trading = "http://localhost:8000",
Messaging = "http://localhost:8000",
Main = "http://localhost:8000",
RagFair = "http://localhost:8000"
Lobby = "http://localhost:8000",
Trading = "http://localhost:8000",
Messaging = "http://localhost:8000",
Main = "http://localhost:8000",
RagFair = "http://localhost:8000"
},
useProtobuf = false,
utc_time = 1724450891.010541,
reportAvailable = true,
twitchEventMember = false,
sessionMode = "pve",
purchasedGames = new PurchasedGames()
{
eft = true,
Expand Down

0 comments on commit 5a51ef2

Please sign in to comment.