feat: more admin controls, new icons, MSAA...
- fixed scaling viewport
@@ -23,7 +23,7 @@ compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
|
||||
@@ -23,7 +23,7 @@ compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
|
||||
@@ -23,7 +23,7 @@ compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
|
||||
@@ -23,7 +23,7 @@ compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
|
||||
BIN
assets/sprites/back.png
Normal file
|
After Width: | Height: | Size: 151 B |
40
assets/sprites/back.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://2plbtkcttn7o"
|
||||
path="res://.godot/imported/back.png-73d0d71f353725c6ba9218045b96399b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/back.png"
|
||||
dest_files=["res://.godot/imported/back.png-73d0d71f353725c6ba9218045b96399b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
assets/sprites/bracket.png
Normal file
|
After Width: | Height: | Size: 167 B |
40
assets/sprites/bracket.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cdhuhbt2ws5sy"
|
||||
path="res://.godot/imported/bracket.png-31c6864ee533d160bca76e6c85f99c4e.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/bracket.png"
|
||||
dest_files=["res://.godot/imported/bracket.png-31c6864ee533d160bca76e6c85f99c4e.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
assets/sprites/button.png
Normal file
|
After Width: | Height: | Size: 170 B |
40
assets/sprites/button.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cftuywdnwvop0"
|
||||
path="res://.godot/imported/button.png-01faf565b773239305f3664038f20e61.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/button.png"
|
||||
dest_files=["res://.godot/imported/button.png-01faf565b773239305f3664038f20e61.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
assets/sprites/cancel.png
Normal file
|
After Width: | Height: | Size: 229 B |
40
assets/sprites/cancel.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://stk7umv2ppss"
|
||||
path="res://.godot/imported/cancel.png-dcc5e0579b1b7ac5745b3b3804e100ab.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/cancel.png"
|
||||
dest_files=["res://.godot/imported/cancel.png-dcc5e0579b1b7ac5745b3b3804e100ab.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
assets/sprites/long_button.png
Normal file
|
After Width: | Height: | Size: 174 B |
40
assets/sprites/long_button.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bvind4dms08sd"
|
||||
path="res://.godot/imported/long_button.png-97ae4bec79a5441e5b3d9a75cbdf673f.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/long_button.png"
|
||||
dest_files=["res://.godot/imported/long_button.png-97ae4bec79a5441e5b3d9a75cbdf673f.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
assets/sprites/observe.png
Normal file
|
After Width: | Height: | Size: 261 B |
40
assets/sprites/observe.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://da13ksuf4vkqe"
|
||||
path="res://.godot/imported/observe.png-5a0a3c79f51f4f13ffdfce42e4ad04da.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/observe.png"
|
||||
dest_files=["res://.godot/imported/observe.png-5a0a3c79f51f4f13ffdfce42e4ad04da.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
assets/sprites/player.png
Normal file
|
After Width: | Height: | Size: 228 B |
40
assets/sprites/player.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b6iac21s36dku"
|
||||
path="res://.godot/imported/player.png-e1eaffe0873063c60a0d0b322e4d87d9.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/player.png"
|
||||
dest_files=["res://.godot/imported/player.png-e1eaffe0873063c60a0d0b322e4d87d9.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
assets/sprites/player_badge.png
Normal file
|
After Width: | Height: | Size: 262 B |
40
assets/sprites/player_badge.png.import
Normal file
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dta0orurmv5qj"
|
||||
path="res://.godot/imported/player_badge.png-63850d039b551977db5c0c02f6402465.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/player_badge.png"
|
||||
dest_files=["res://.godot/imported/player_badge.png-63850d039b551977db5c0c02f6402465.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
@@ -25,13 +25,13 @@ binary_format/architecture="universal"
|
||||
custom_template/debug=""
|
||||
custom_template/release=""
|
||||
debug/export_console_wrapper=0
|
||||
application/icon="uid://ckmfi0cjgxgyk"
|
||||
application/icon="uid://dd7lvnidxr5ss"
|
||||
application/icon_interpolation=4
|
||||
application/bundle_identifier="com.abunchofknowitalls.connect4"
|
||||
application/signature=""
|
||||
application/app_category="Games"
|
||||
application/short_version="0.1.1"
|
||||
application/version="0.1.1"
|
||||
application/short_version=""
|
||||
application/version=""
|
||||
application/copyright="RPI Minds & Machines"
|
||||
application/copyright_localized={}
|
||||
application/min_macos_version_x86_64="10.12"
|
||||
@@ -261,13 +261,13 @@ dotnet/embed_build_outputs=false
|
||||
name="Windows (x86_64)"
|
||||
platform="Windows Desktop"
|
||||
runnable=true
|
||||
advanced_options=false
|
||||
advanced_options=true
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
exclude_filter=""
|
||||
export_path="../../Downloads/connect4-moderator-observer (win-x86_64) (0.1.0).exe"
|
||||
export_path="../../Downloads/connect4-moderator-observer (win-x86_64).exe"
|
||||
patches=PackedStringArray()
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
@@ -293,7 +293,7 @@ codesign/digest_algorithm=1
|
||||
codesign/description=""
|
||||
codesign/custom_options=PackedStringArray()
|
||||
application/modify_resources=true
|
||||
application/icon=""
|
||||
application/icon="uid://dd7lvnidxr5ss"
|
||||
application/console_wrapper_icon=""
|
||||
application/icon_interpolation=4
|
||||
application/file_version=""
|
||||
@@ -301,7 +301,7 @@ application/product_version=""
|
||||
application/company_name=""
|
||||
application/product_name=""
|
||||
application/file_description=""
|
||||
application/copyright=""
|
||||
application/copyright="RPI Minds & Machines"
|
||||
application/trademarks=""
|
||||
application/export_angle=0
|
||||
application/export_d3d12=0
|
||||
@@ -325,20 +325,20 @@ Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorActi
|
||||
Remove-Item -Recurse -Force '{temp_dir}'"
|
||||
dotnet/include_scripts_content=false
|
||||
dotnet/include_debug_symbols=false
|
||||
dotnet/embed_build_outputs=false
|
||||
dotnet/embed_build_outputs=true
|
||||
|
||||
[preset.2]
|
||||
|
||||
name="Windows (arm64)"
|
||||
platform="Windows Desktop"
|
||||
runnable=false
|
||||
advanced_options=false
|
||||
advanced_options=true
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
exclude_filter=""
|
||||
export_path="../../Downloads/connect4-moderator-observer (win-arm64) (0.1.0).exe"
|
||||
export_path="../../Downloads/connect4-moderator-observer (win-arm64).exe"
|
||||
patches=PackedStringArray()
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
@@ -364,7 +364,7 @@ codesign/digest_algorithm=1
|
||||
codesign/description=""
|
||||
codesign/custom_options=PackedStringArray()
|
||||
application/modify_resources=true
|
||||
application/icon=""
|
||||
application/icon="uid://dd7lvnidxr5ss"
|
||||
application/console_wrapper_icon=""
|
||||
application/icon_interpolation=4
|
||||
application/file_version=""
|
||||
@@ -396,20 +396,20 @@ Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorActi
|
||||
Remove-Item -Recurse -Force '{temp_dir}'"
|
||||
dotnet/include_scripts_content=false
|
||||
dotnet/include_debug_symbols=false
|
||||
dotnet/embed_build_outputs=false
|
||||
dotnet/embed_build_outputs=true
|
||||
|
||||
[preset.3]
|
||||
|
||||
name="Linux (x86_64)"
|
||||
platform="Linux"
|
||||
runnable=true
|
||||
advanced_options=false
|
||||
advanced_options=true
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
exclude_filter=""
|
||||
export_path="../../Downloads/connect4-moderator-observer (linux-x86_64) (0.1.0)"
|
||||
export_path="../../Downloads/connect4-moderator-observer (linux-x86_64).out"
|
||||
patches=PackedStringArray()
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
@@ -426,7 +426,7 @@ debug/export_console_wrapper=0
|
||||
binary_format/embed_pck=true
|
||||
texture_format/s3tc_bptc=true
|
||||
texture_format/etc2_astc=false
|
||||
shader_baker/enabled=true
|
||||
shader_baker/enabled=false
|
||||
binary_format/architecture="x86_64"
|
||||
ssh_remote_deploy/enabled=false
|
||||
ssh_remote_deploy/host="user@host_ip"
|
||||
@@ -442,20 +442,20 @@ kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
|
||||
rm -rf \"{temp_dir}\""
|
||||
dotnet/include_scripts_content=false
|
||||
dotnet/include_debug_symbols=false
|
||||
dotnet/embed_build_outputs=false
|
||||
dotnet/embed_build_outputs=true
|
||||
|
||||
[preset.4]
|
||||
|
||||
name="Linux (arm64)"
|
||||
platform="Linux"
|
||||
runnable=false
|
||||
advanced_options=false
|
||||
advanced_options=true
|
||||
dedicated_server=false
|
||||
custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
exclude_filter=""
|
||||
export_path="../../Downloads/connect4-moderator-observer (linux-arm64) (0.1.0)"
|
||||
export_path="../../Downloads/connect4-moderator-observer (linux-arm64).out"
|
||||
patches=PackedStringArray()
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
@@ -472,7 +472,7 @@ debug/export_console_wrapper=0
|
||||
binary_format/embed_pck=true
|
||||
texture_format/s3tc_bptc=true
|
||||
texture_format/etc2_astc=false
|
||||
shader_baker/enabled=true
|
||||
shader_baker/enabled=false
|
||||
binary_format/architecture="arm64"
|
||||
ssh_remote_deploy/enabled=false
|
||||
ssh_remote_deploy/host="user@host_ip"
|
||||
@@ -488,4 +488,4 @@ kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
|
||||
rm -rf \"{temp_dir}\""
|
||||
dotnet/include_scripts_content=false
|
||||
dotnet/include_debug_symbols=false
|
||||
dotnet/embed_build_outputs=false
|
||||
dotnet/embed_build_outputs=true
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ebf78p6bpq5m"
|
||||
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
|
||||
uid="uid://dd7lvnidxr5ss"
|
||||
path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.svg"
|
||||
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
|
||||
source_file="res://icon.png"
|
||||
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
@@ -38,6 +38,3 @@ process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
1
icon.svg
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><g fill="#fff" transform="translate(12.322 12.322)scale(.101)"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042" transform="translate(12.322 12.322)scale(.101)"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></svg>
|
||||
|
Before Width: | Height: | Size: 995 B |
@@ -10,15 +10,24 @@ config_version=5
|
||||
|
||||
[application]
|
||||
|
||||
config/name="connect4-moderator-observer"
|
||||
config/name="Connect4 Moderator - Observer"
|
||||
config/version="0.1.2"
|
||||
run/main_scene="uid://dcx5nvs0pa7me"
|
||||
config/features=PackedStringArray("4.5", "C#", "Forward Plus")
|
||||
config/icon="uid://ckmfi0cjgxgyk"
|
||||
boot_splash/image="uid://dd7lvnidxr5ss"
|
||||
config/icon="uid://dd7lvnidxr5ss"
|
||||
|
||||
[autoload]
|
||||
|
||||
Connection="*res://scripts/Connection.cs"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/viewport_width=1280
|
||||
window/size/viewport_height=720
|
||||
window/stretch/mode="canvas_items"
|
||||
window/stretch/aspect="expand"
|
||||
|
||||
[dotnet]
|
||||
|
||||
project/assembly_name="connect4-moderator-observer"
|
||||
@@ -28,3 +37,5 @@ project/assembly_name="connect4-moderator-observer"
|
||||
textures/canvas_textures/default_texture_filter=0
|
||||
textures/vram_compression/import_s3tc_bptc=true
|
||||
textures/vram_compression/import_etc2_astc=true
|
||||
anti_aliasing/quality/msaa_2d=2
|
||||
anti_aliasing/quality/msaa_3d=2
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
[gd_scene load_steps=14 format=3 uid="uid://m542qwlp7hl7"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dg5jt0o0r0v3r" path="res://scripts/BoardScreen.cs" id="1_b3w8x"]
|
||||
[ext_resource type="PackedScene" uid="uid://rl33x81cxlh0" path="res://scenes/bracket_view.tscn" id="2_u1oi2"]
|
||||
[ext_resource type="Texture2D" uid="uid://dlx02qat7j6lf" path="res://assets/sprites/AssetTileset.png" id="3_1tlhv"]
|
||||
[ext_resource type="FontFile" uid="uid://c3jmev24lo6ci" path="res://assets/fonts/PixelOperator8.ttf" id="3_rjcmr"]
|
||||
[ext_resource type="Texture2D" uid="uid://ckmfi0cjgxgyk" path="res://assets/sprites/RedChip.png" id="4_1hrcj"]
|
||||
[ext_resource type="Texture2D" uid="uid://qy30emdgrk7o" path="res://assets/sprites/YellowChip.png" id="5_i2o8i"]
|
||||
[ext_resource type="Texture2D" uid="uid://8un28mol7qow" path="res://assets/sprites/BoardTileMap.png" id="6_i2o8i"]
|
||||
[ext_resource type="PackedScene" uid="uid://pdean68jjg80" path="res://scenes/button_small.tscn" id="7_glh1q"]
|
||||
[ext_resource type="Script" uid="uid://b3q4gq63qmx23" path="res://scripts/BackButton.cs" id="8_u1oi2"]
|
||||
|
||||
[sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_b3w8x"]
|
||||
|
||||
@@ -31,10 +31,8 @@ sources/0 = SubResource("TileSetAtlasSource_i2o8i")
|
||||
atlas = ExtResource("3_1tlhv")
|
||||
region = Rect2(112, 32, 16, 16)
|
||||
|
||||
[node name="BoardScreen" type="Node2D" node_paths=PackedStringArray("BackButton")]
|
||||
[node name="BoardScreen" type="Node2D"]
|
||||
script = ExtResource("1_b3w8x")
|
||||
BracketScene = ExtResource("2_u1oi2")
|
||||
BackButton = NodePath("BracketButton")
|
||||
|
||||
[node name="Floor Collider" type="StaticBody2D" parent="."]
|
||||
position = Vector2(0, 200)
|
||||
@@ -77,6 +75,7 @@ position = Vector2(274, 0)
|
||||
shape = SubResource("SegmentShape2D_i2o8i")
|
||||
|
||||
[node name="Player1Card" type="Node2D" parent="."]
|
||||
position = Vector2(0, 8)
|
||||
|
||||
[node name="Left" type="Sprite2D" parent="Player1Card"]
|
||||
position = Vector2(-556, -300)
|
||||
@@ -123,6 +122,7 @@ theme_override_font_sizes/font_size = 8
|
||||
text = "NOT READY"
|
||||
|
||||
[node name="Player2Card" type="Node2D" parent="."]
|
||||
position = Vector2(989, -64)
|
||||
|
||||
[node name="Left" type="Sprite2D" parent="Player2Card"]
|
||||
position = Vector2(-556, -228)
|
||||
@@ -181,6 +181,7 @@ offset_left = -566.0
|
||||
offset_top = 281.0
|
||||
offset_right = -550.0
|
||||
offset_bottom = 297.0
|
||||
script = ExtResource("8_u1oi2")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="BracketButton"]
|
||||
position = Vector2(8, 8)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://rl33x81cxlh0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dm25u0a2lqk2x" path="res://scripts/BracketScene.cs" id="1_dvj3m"]
|
||||
[ext_resource type="Texture2D" uid="uid://ckmfi0cjgxgyk" path="res://assets/sprites/RedChip.png" id="2_7c11m"]
|
||||
[ext_resource type="PackedScene" uid="uid://b4tujjdhmk4h" path="res://scenes/red_chip.tscn" id="3_1511b"]
|
||||
[ext_resource type="Texture2D" uid="uid://dd7lvnidxr5ss" path="res://icon.png" id="2_mbqc8"]
|
||||
[ext_resource type="Texture2D" uid="uid://stk7umv2ppss" path="res://assets/sprites/cancel.png" id="3_as653"]
|
||||
[ext_resource type="Script" uid="uid://1y72woiynf31" path="res://scripts/AdminControls.cs" id="4_mbqc8"]
|
||||
|
||||
[node name="BracketView" type="Control" node_paths=PackedStringArray("Players", "Matches")]
|
||||
@@ -15,8 +15,8 @@ grow_vertical = 2
|
||||
script = ExtResource("1_dvj3m")
|
||||
Players = NodePath("HBoxContainer/PlayerList")
|
||||
Matches = NodePath("HBoxContainer/MatchList")
|
||||
JoinButton = ExtResource("2_7c11m")
|
||||
BoardScene = ExtResource("3_1511b")
|
||||
WatchButton = ExtResource("2_mbqc8")
|
||||
TerminateKickButton = ExtResource("3_as653")
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
custom_minimum_size = Vector2(0, 36)
|
||||
@@ -26,7 +26,7 @@ anchor_right = 1.0
|
||||
grow_horizontal = 2
|
||||
color = Color(0.13319641, 0.13319641, 0.13319638, 1)
|
||||
|
||||
[node name="AdminControls" type="HBoxContainer" parent="ColorRect" node_paths=PackedStringArray("BecomeAdmin", "StartTournament")]
|
||||
[node name="AdminControls" type="HBoxContainer" parent="ColorRect" node_paths=PackedStringArray("BecomeAdmin", "StartTournament", "Label", "Timeout")]
|
||||
custom_minimum_size = Vector2(0, 36)
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
@@ -36,6 +36,8 @@ grow_horizontal = 2
|
||||
script = ExtResource("4_mbqc8")
|
||||
BecomeAdmin = NodePath("BecomeAdmin")
|
||||
StartTournament = NodePath("StartTournament")
|
||||
Label = NodePath("Label")
|
||||
Timeout = NodePath("HSlider")
|
||||
|
||||
[node name="BecomeAdmin" type="Button" parent="ColorRect/AdminControls"]
|
||||
layout_mode = 2
|
||||
@@ -45,6 +47,21 @@ text = "Become Admin"
|
||||
layout_mode = 2
|
||||
text = "Start Tournament"
|
||||
|
||||
[node name="Label" type="Label" parent="ColorRect/AdminControls"]
|
||||
layout_mode = 2
|
||||
text = "Wait To Move: 5.0s "
|
||||
|
||||
[node name="HSlider" type="HSlider" parent="ColorRect/AdminControls"]
|
||||
custom_minimum_size = Vector2(256, 0)
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 1
|
||||
min_value = 0.1
|
||||
max_value = 5.0
|
||||
step = 0.2
|
||||
value = 5.0
|
||||
tick_count = 25
|
||||
ticks_on_borders = true
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = -1
|
||||
|
||||
@@ -6,6 +6,8 @@ public partial class AdminControls : HBoxContainer
|
||||
{
|
||||
[Export] public Button BecomeAdmin;
|
||||
[Export] public Button StartTournament;
|
||||
[Export] public Label Label;
|
||||
[Export] public Slider Timeout;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
@@ -17,6 +19,31 @@ public partial class AdminControls : HBoxContainer
|
||||
{
|
||||
StartTournament.Hide();
|
||||
}
|
||||
|
||||
if (!Connection.Instance.IsAdmin)
|
||||
{
|
||||
Label.Hide();
|
||||
Timeout.Hide();
|
||||
}
|
||||
|
||||
Timeout.Value = Connection.Instance.CurrentWaitTimeout;
|
||||
var time = Connection.Instance.CurrentWaitTimeout.ToString();
|
||||
if (time.Length > 3)
|
||||
{
|
||||
time = time.Substring(0, 3);
|
||||
}
|
||||
|
||||
Label.Text = "Wait To Move: " + time + "s ";
|
||||
Timeout.ValueChanged += value =>
|
||||
{
|
||||
Connection.Instance.SetTournamentWait((float)value);
|
||||
var time = Connection.Instance.CurrentWaitTimeout.ToString();
|
||||
if (time.Length > 3)
|
||||
{
|
||||
time = time.Substring(0, 3);
|
||||
}
|
||||
Label.Text = "Wait To Move: " + time + "s ";
|
||||
};
|
||||
|
||||
BecomeAdmin.Pressed += ShowAuthPopup;
|
||||
}
|
||||
@@ -119,5 +146,7 @@ public partial class AdminControls : HBoxContainer
|
||||
{
|
||||
StartTournament.Show();
|
||||
}
|
||||
Label.Show();
|
||||
Timeout.Show();
|
||||
}
|
||||
}
|
||||
|
||||
18
scripts/BackButton.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class BackButton : TextureButton
|
||||
{
|
||||
private const string BRACKET_SCENE_PATH = "res://scenes/bracket_view.tscn";
|
||||
|
||||
public override void _Pressed()
|
||||
{
|
||||
TransitionToBracket();
|
||||
base._Pressed();
|
||||
}
|
||||
|
||||
private void TransitionToBracket()
|
||||
{
|
||||
GetTree().ChangeSceneToFile(BRACKET_SCENE_PATH);
|
||||
}
|
||||
}
|
||||
1
scripts/BackButton.cs.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b3q4gq63qmx23
|
||||
@@ -4,8 +4,6 @@ using System.Collections.Generic;
|
||||
|
||||
public partial class BoardScreen : Node2D {
|
||||
|
||||
[Export] public BaseButton BackButton;
|
||||
|
||||
private const string RED_CHIP_PATH = "res://scenes/red_chip.tscn";
|
||||
private const string YELLOW_CHIP_PATH = "res://scenes/yellow_chip.tscn";
|
||||
private const string BRACKET_SCENE_PATH = "res://scenes/bracket_view.tscn";
|
||||
@@ -15,6 +13,9 @@ public partial class BoardScreen : Node2D {
|
||||
private const int CHIP_X_OFF = -(CHIP_SIZE + CHIP_PADDING) * 7 / 2 + (CHIP_SIZE + CHIP_PADDING) / 2;
|
||||
private const int Y_OFF = 300;
|
||||
private const int CARD_CENTER_X_DEFAULT = -536;
|
||||
private const double MOVE_TIMEOUT_BEFORE_PLACE = 1.0f;
|
||||
|
||||
private double currentTimeout = 0.0f;
|
||||
|
||||
private PackedScene redChip;
|
||||
private PackedScene ylwChip;
|
||||
@@ -23,6 +24,8 @@ public partial class BoardScreen : Node2D {
|
||||
private Node2D player2Card;
|
||||
private MatchData matchData;
|
||||
|
||||
private List<(string, int)> moves;
|
||||
|
||||
private RigidBody2D[,] chips = new RigidBody2D[6, 7]; // 6 rows 7 cols | 0, 0 is top left
|
||||
|
||||
// Called when the node enters the scene tree for the first time.
|
||||
@@ -40,19 +43,35 @@ public partial class BoardScreen : Node2D {
|
||||
matchData = Connection.Instance.CurrentObservingMatch;
|
||||
player1Card.GetNode<Label>("Name").Text = matchData.player1;
|
||||
player2Card.GetNode<Label>("Name").Text = matchData.player2;
|
||||
|
||||
GetNode<TextureButton>("BracketButton").Pressed += TransitionToBracket;
|
||||
|
||||
|
||||
Connection.Instance.OnObserveWin += ObserveWin;
|
||||
Connection.Instance.OnObserveDraw += ObserveDraw;
|
||||
Connection.Instance.OnObserveTerminated += ObserveTerminated;
|
||||
Connection.Instance.OnObserveMove += ObserveMove;
|
||||
Connection.Instance.OnTournamentEnd += ShowTournamentScoreboard;
|
||||
}
|
||||
|
||||
BackButton.Pressed += () =>
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (Connection.Instance.PreviousMoves.Count != 0 && currentTimeout <= 0.0f)
|
||||
{
|
||||
TransitionToBracket();
|
||||
};
|
||||
var move = Connection.Instance.PreviousMoves[0];
|
||||
Connection.Instance.PreviousMoves.RemoveAt(0);
|
||||
if (move.Item1 == matchData.player1)
|
||||
{
|
||||
spawnRed(move.Item2);
|
||||
}
|
||||
else
|
||||
{
|
||||
spawnYellow(move.Item2);
|
||||
}
|
||||
|
||||
currentTimeout = MOVE_TIMEOUT_BEFORE_PLACE;
|
||||
}
|
||||
else if (currentTimeout >= 0.0f)
|
||||
{
|
||||
currentTimeout -= delta;
|
||||
}
|
||||
}
|
||||
|
||||
public override void _ExitTree()
|
||||
@@ -66,52 +85,41 @@ public partial class BoardScreen : Node2D {
|
||||
|
||||
private void ObserveMove(string username, int column)
|
||||
{
|
||||
if (username == matchData.player1)
|
||||
{
|
||||
spawnRed(column);
|
||||
}
|
||||
else
|
||||
{
|
||||
spawnYellow(column);
|
||||
}
|
||||
Connection.Instance.PreviousMoves.Add((username, column));
|
||||
}
|
||||
|
||||
private void ObserveWin(string winner)
|
||||
{
|
||||
var popup = new Popup();
|
||||
popup.AlwaysOnTop = true;
|
||||
popup.PopupCentered();
|
||||
popup.Size = new Vector2I(128, 128);
|
||||
var text = new Label();
|
||||
text.Text = winner + " wins!";
|
||||
popup.AddChild(text);
|
||||
GetTree().Root.AddChild(popup);
|
||||
TransitionToBracket();
|
||||
PopupMessage(winner + " wins!");
|
||||
}
|
||||
|
||||
private void ObserveDraw()
|
||||
{
|
||||
var popup = new Popup();
|
||||
popup.AlwaysOnTop = true;
|
||||
popup.PopupCentered();
|
||||
popup.Size = new Vector2I(128, 128);
|
||||
var text = new Label();
|
||||
text.Text = "Draw!";
|
||||
popup.AddChild(text);
|
||||
GetTree().Root.AddChild(popup);
|
||||
TransitionToBracket();
|
||||
PopupMessage("Draw!");
|
||||
}
|
||||
|
||||
private void ObserveTerminated()
|
||||
{
|
||||
PopupMessage("Match Terminated");
|
||||
}
|
||||
|
||||
private void PopupMessage(string message)
|
||||
{
|
||||
var popup = new Popup();
|
||||
popup.AlwaysOnTop = true;
|
||||
popup.PopupCentered();
|
||||
popup.Size = new Vector2I(128, 128);
|
||||
popup.Size = new Vector2I(200, 100);
|
||||
var text = new Label();
|
||||
text.Text = "Match Terminated";
|
||||
text.Text = message;
|
||||
popup.AddChild(text);
|
||||
text.GrowHorizontal = Control.GrowDirection.Both;
|
||||
text.GrowVertical = Control.GrowDirection.Both;
|
||||
text.HorizontalAlignment = HorizontalAlignment.Center;
|
||||
text.VerticalAlignment = VerticalAlignment.Center;
|
||||
text.AnchorsPreset = (int) Control.LayoutPreset.FullRect;
|
||||
popup.InitialPosition = Window.WindowInitialPosition.CenterMainWindowScreen;
|
||||
GetTree().Root.AddChild(popup);
|
||||
popup.Show();
|
||||
TransitionToBracket();
|
||||
}
|
||||
|
||||
@@ -153,33 +161,6 @@ public partial class BoardScreen : Node2D {
|
||||
GetTree().ChangeSceneToFile(BRACKET_SCENE_PATH);
|
||||
}
|
||||
|
||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
public override void _Process(double delta) {
|
||||
/*
|
||||
if(p1 != null) {
|
||||
Label username = player1Card.GetNode<Label>("Name");
|
||||
username.Text = p1.username;
|
||||
|
||||
if(p1.isReady) {
|
||||
Label status = player1Card.GetNode<Label>("Status");
|
||||
status.Text = "Ready!";
|
||||
status.AddThemeColorOverride("font_color", Colors.LimeGreen);
|
||||
}
|
||||
}
|
||||
|
||||
if(p2 != null) {
|
||||
Label username = player2Card.GetNode<Label>("Name");
|
||||
username.Text = p2.username;
|
||||
|
||||
if(p2.isReady) {
|
||||
Label status = player2Card.GetNode<Label>("Status");
|
||||
status.Text = "Ready!";
|
||||
status.AddThemeColorOverride("font_color", Colors.LimeGreen);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
* Determines if the column can have a new chip placed
|
||||
* Will return -1 if invalid
|
||||
|
||||
@@ -6,7 +6,8 @@ public partial class BracketScene : Control
|
||||
{
|
||||
[Export] public Tree Players;
|
||||
[Export] public Tree Matches;
|
||||
[Export] public Texture2D JoinButton;
|
||||
[Export] public Texture2D WatchButton;
|
||||
[Export] public Texture2D TerminateKickButton;
|
||||
private const string BOARD_SCENE_PATH = "res://scenes/game.tscn";
|
||||
|
||||
private List<PlayerData> _playerList;
|
||||
@@ -26,6 +27,7 @@ public partial class BracketScene : Control
|
||||
Matches.SetColumnTitle(2, "Yellow");
|
||||
Matches.HideRoot = true;
|
||||
Matches.ButtonClicked += WatchGame;
|
||||
Matches.ButtonClicked += TerminateGame;
|
||||
|
||||
Connection.Instance.OnUpdatedPlayers += UpdatePlayers;
|
||||
Connection.Instance.OnUpdatedMatches += UpdateMatches;
|
||||
@@ -52,7 +54,7 @@ public partial class BracketScene : Control
|
||||
item.SetText(2, playerList[i].isPlaying ? "Yes" : "No");
|
||||
if (Connection.Instance.IsAdmin)
|
||||
{
|
||||
item.AddButton(0, JoinButton, i, false, "Kick"); // TODO
|
||||
item.AddButton(0, TerminateKickButton, i, false, "Kick"); // TODO
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -68,7 +70,11 @@ public partial class BracketScene : Control
|
||||
item.SetText(0, matchList[i].matchId.ToString());
|
||||
item.SetText(1, matchList[i].player1);
|
||||
item.SetText(2, matchList[i].player2);
|
||||
item.AddButton(0, JoinButton, i, false, "Watch");
|
||||
item.AddButton(0, WatchButton, item.GetButtonCount(0), false, "Watch");
|
||||
if (Connection.Instance.IsAdmin)
|
||||
{
|
||||
item.AddButton(0, TerminateKickButton, item.GetButtonCount(0), false, "Terminate");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,6 +94,14 @@ public partial class BracketScene : Control
|
||||
}
|
||||
}
|
||||
|
||||
private void TerminateGame(TreeItem item, long column, long id, long mouseButtonIndex)
|
||||
{
|
||||
if (mouseButtonIndex == 1 && column == 0 && id - 1 > 0 && _matchList[(int) id - 1] != null)
|
||||
{
|
||||
Connection.Instance.TerminateGame(_matchList[(int) id - 1].matchId);
|
||||
}
|
||||
}
|
||||
|
||||
private void TransitionToBoard()
|
||||
{
|
||||
GetTree().ChangeSceneToFile(BOARD_SCENE_PATH);
|
||||
|
||||
@@ -41,7 +41,9 @@ public partial class Connection : Node
|
||||
public bool IsAdmin { get; private set; }
|
||||
public bool IsPlayer { get; private set; }
|
||||
public bool ActiveTournament { get; private set; }
|
||||
|
||||
public List<(string, int)> PreviousMoves { get; private set; } = new List<(string, int)>();
|
||||
public double CurrentWaitTimeout { get; private set; } = 5.0;
|
||||
|
||||
|
||||
public MatchData CurrentObservingMatch { get; private set; }
|
||||
|
||||
@@ -218,15 +220,16 @@ public partial class Connection : Node
|
||||
SendCommand("TOURNAMENT", "START");
|
||||
}
|
||||
|
||||
public void TerminateGame()
|
||||
public void TerminateGame(int matchID)
|
||||
{
|
||||
if (!IsAdmin) return;
|
||||
SendCommand("GAME", "TERMINATE");
|
||||
SendCommand("GAME", "TERMINATE:" + matchID);
|
||||
}
|
||||
|
||||
public void SetTournamentWait(float waitTime)
|
||||
{
|
||||
if (!IsAdmin) return;
|
||||
CurrentWaitTimeout = waitTime;
|
||||
SendCommand("TOURNAMENT", "WAIT:" + waitTime);
|
||||
}
|
||||
|
||||
@@ -305,6 +308,7 @@ public partial class Connection : Node
|
||||
if (body == "AUTH:ACK")
|
||||
{
|
||||
IsAdmin = true;
|
||||
SetTournamentWait(5.0f);
|
||||
OnBecomeAdmin?.Invoke();
|
||||
}
|
||||
|
||||
@@ -465,8 +469,24 @@ public partial class Connection : Node
|
||||
OnUpdatedMatches?.Invoke(matches);
|
||||
break;
|
||||
case "WATCH":
|
||||
string[] game = segments[2].Split(",");
|
||||
CurrentObservingMatch = new MatchData(int.Parse(game[0]), game[1], game[2]);
|
||||
CurrentObservingMatch = null;
|
||||
PreviousMoves.Clear();
|
||||
string[] activeMatchData = segments[2].Split("|");
|
||||
if (activeMatchData.IsEmpty())
|
||||
{
|
||||
string[] matchData = segments[2].Split(',');
|
||||
CurrentObservingMatch = new MatchData(int.Parse(matchData[0]), matchData[1], matchData[2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
string[] matchData = activeMatchData[0].Split(',');
|
||||
CurrentObservingMatch = new MatchData(int.Parse(matchData[0]), matchData[1], matchData[2]);
|
||||
for (int i = 1; i < activeMatchData.Length; i++)
|
||||
{
|
||||
string[] moveData = activeMatchData[i].Split(',');
|
||||
PreviousMoves.Add((moveData[0], int.Parse(moveData[1])));
|
||||
}
|
||||
}
|
||||
OnWatchGameAck?.Invoke();
|
||||
break;
|
||||
default:
|
||||
|
||||