-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from TaloDev/develop
Release 0.11.0
- Loading branch information
Showing
50 changed files
with
577 additions
and
508 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"editor.detectIndentation": true, | ||
"editor.insertSpaces": false, | ||
"editor.indentSize": "tabSize", | ||
"editor.tabSize": 4 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class_name PlayerGroupsAPI extends TaloAPI | ||
|
||
func get_group(group_id: String) -> TaloPlayerGroup: | ||
var res = await client.make_request(HTTPClient.METHOD_GET, "/%s" % [group_id]) | ||
|
||
match (res.status): | ||
200: | ||
return TaloPlayerGroup.new(res.body.group) | ||
_: | ||
return null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
class_name TaloPlayer extends TaloEntityWithProps | ||
|
||
var id: String | ||
var groups: Array[TaloGroup] = [] | ||
var groups: Array[TaloPlayerGroupStub] = [] | ||
|
||
func _init(data: Dictionary): | ||
super._init(data.props.map(func (prop): return TaloProp.new(prop.key, prop.value))) | ||
super._init(data.props.map(func (prop): return TaloProp.new(prop.key, prop.value))) | ||
|
||
id = data.id | ||
groups.assign(data.groups.map(func (group): return TaloGroup.new(group.id, group.name))) | ||
id = data.id | ||
groups.assign(data.groups.map(func (group): return TaloPlayerGroupStub.new(group.id, group.name))) | ||
|
||
func set_prop(key: String, value: String, update: bool = true) -> void: | ||
super.set_prop(key, value) | ||
if update: | ||
await Talo.players.update() | ||
super.set_prop(key, value) | ||
if update: | ||
await Talo.players.update() | ||
|
||
func delete_prop(key: String, update: bool = true) -> void: | ||
super.delete_prop(key) | ||
if update: | ||
await Talo.players.update() | ||
super.delete_prop(key) | ||
if update: | ||
await Talo.players.update() | ||
|
||
func is_in_talo_group_id(group_id: String) -> bool: | ||
return not groups.filter(func (group: TaloGroup): return group.id == group_id).is_empty() | ||
return not groups.filter(func (group: TaloPlayerGroupStub): return group.id == group_id).is_empty() | ||
|
||
func is_in_talo_group_name(group_name: String) -> bool: | ||
return not groups.filter(func (group: TaloGroup): return group.name == group_name).is_empty() | ||
return not groups.filter(func (group: TaloPlayerGroupStub): return group.name == group_name).is_empty() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
class_name TaloPlayerGroup extends Node | ||
|
||
var id: String | ||
var display_name: String | ||
var description: String | ||
var rules: Array | ||
var rule_mode: String | ||
var members_visible: bool | ||
var count: int | ||
var members: Array[TaloPlayer] | ||
var updated_at: String | ||
|
||
func _init(data: Dictionary): | ||
id = data.id | ||
display_name = data.name | ||
description = data.description | ||
rules = data.rules | ||
rule_mode = data.ruleMode | ||
members_visible = data.membersVisible | ||
count = data.count | ||
if data.has("members"): | ||
members.assign(data.members.map(func (member): return TaloPlayer.new(member))) | ||
else: | ||
members = [] | ||
updated_at = data.updatedAt |
2 changes: 1 addition & 1 deletion
2
addons/talo/entities/group.gd → addons/talo/entities/player_group_stub.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.