-
Notifications
You must be signed in to change notification settings - Fork 24
Resolve #43 -- Code rework #44
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't review your styles since you are wildly inconsistent with how you format your less files. Mixed indentation, spaces before commas and no spaces before commas, lines over 300 characters long just to mention a few things. I recommend you get a proper editor to work on this project, since you're obviously not using one (or you're not using it properly).
messages: [], | ||
lobby: NetworkServiceStatic.currentLobby, | ||
network: NetworkService, | ||
isHost: this.isHost, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't do anything.
get playerSettings() { | ||
return this.settings.playerSettings; | ||
|
||
iconByUser(user: { idServer: number}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iconForUser
would be a better name, fix the spacing, get a complete type in here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d
} | ||
} | ||
|
||
data() { | ||
this.canCreateLobby = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should go in the data initializer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d
network: NetworkService | ||
network: NetworkService, | ||
staticService: StaticService, | ||
lobbySelected: undefined, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be null, not undefined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d
}; | ||
} | ||
|
||
select(lobby: lobby.LobbyListItem) { | ||
this.lobbySelected = lobby; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
selectedLobby
would be a better name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d
src/ui/services/networkService.ts
Outdated
}); | ||
function startGame(gameServerPort){ | ||
function startGame(data){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nested functions are never a good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d
src/ui/services/networkService.ts
Outdated
execFile.execFile(configContent.pathToLolExe, | ||
args, {cwd: configContent.pathToLolFolder, maxBuffer: 1024 * 90000}, | ||
execFile(localStorage.getItem("path") + "/League of Legends.exe", | ||
args, {cwd: localStorage.getItem("path"), maxBuffer: 1024 * 90000}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either leave this on a single line or indent it properly, this is one statement that looks like two.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d
src/ui/services/networkService.ts
Outdated
this.emit("host", true); | ||
} else { | ||
this.emit("host", false); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.emit("host", data.isHost)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d
src/vendor/protocol.d.ts
Outdated
@@ -153,7 +153,7 @@ declare namespace lobby { | |||
/** Name of the lobby. */ | |||
name: string; | |||
/** Creator of the lobby. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d
src/vendor/protocol.d.ts
Outdated
id: number; | ||
|
||
iconURL: string; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d
Code rework, new design and summoner icons
Refs #43