Fix the lobby slots.
- lobbyInfo.Slots is now a dictionary, keyed by the name of the PlayerReference that the slot is tied to. - LockRace/Color/Team is now specified on the slot, avoiding map lookups in the lobby - Observers are no longer tied to slots -> players will join as observers instead of crashing the game if there are no available slots - Observers are able to change their name and color
This commit is contained in:
@@ -113,15 +113,6 @@ Container@SERVER_LOBBY:
|
||||
Y:2
|
||||
Width:20
|
||||
Height:20
|
||||
Label@SPECTATOR:
|
||||
Id:SPECTATOR
|
||||
Text:Spectator
|
||||
Width:278
|
||||
Height:25
|
||||
X:160
|
||||
Y:0
|
||||
Align:Center
|
||||
Font:Bold
|
||||
Container@TEMPLATE_REMOTE:
|
||||
Id:TEMPLATE_REMOTE
|
||||
X:5
|
||||
@@ -185,17 +176,112 @@ Container@SERVER_LOBBY:
|
||||
Y:2
|
||||
Width:20
|
||||
Height:20
|
||||
Label@SPECTATOR:
|
||||
Id:SPECTATOR
|
||||
Text:Spectator
|
||||
Container@TEMPLATE_EMPTY:
|
||||
Id:TEMPLATE_EMPTY
|
||||
X:5
|
||||
Y:0
|
||||
Width:475
|
||||
Height:25
|
||||
Visible:false
|
||||
Children:
|
||||
DropDownButton@NAME_HOST:
|
||||
Id:NAME_HOST
|
||||
Text:Name
|
||||
Width:150
|
||||
Height:25
|
||||
Font:Regular
|
||||
Visible:false
|
||||
Label@NAME:
|
||||
Id:NAME
|
||||
Text:Name
|
||||
Width:145
|
||||
Height:25
|
||||
X:5
|
||||
Y:0-1
|
||||
Visible:false
|
||||
Button@JOIN:
|
||||
Id:JOIN
|
||||
Text:Play in this slot
|
||||
Font:Regular
|
||||
Width:278
|
||||
Height:25
|
||||
X:160
|
||||
Y:0
|
||||
Container@TEMPLATE_BOT:
|
||||
Id:TEMPLATE_BOT
|
||||
X:5
|
||||
Y:0
|
||||
Width:475
|
||||
Height:25
|
||||
Visible:false
|
||||
Children:
|
||||
DropDownButton@NAME_HOST:
|
||||
Id:NAME_HOST
|
||||
Text:Name
|
||||
Width:150
|
||||
Height:25
|
||||
Font:Regular
|
||||
Visible:false
|
||||
Label@NAME:
|
||||
Id:NAME
|
||||
Text:Name
|
||||
Width:145
|
||||
Height:25
|
||||
X:5
|
||||
Y:0-1
|
||||
Visible:false
|
||||
Label@BOT:
|
||||
Id:BOT
|
||||
Text:Bot
|
||||
Width:278
|
||||
Height:25
|
||||
X:160
|
||||
Y:0
|
||||
Align:Center
|
||||
Font:Bold
|
||||
Container@TEMPLATE_EMPTY:
|
||||
Id:TEMPLATE_EMPTY
|
||||
Container@TEMPLATE_LOCAL_SPECTATOR:
|
||||
Id:TEMPLATE_LOCAL_SPECTATOR
|
||||
X:5
|
||||
Y:0
|
||||
Width:475
|
||||
Height:25
|
||||
Visible:false
|
||||
Children:
|
||||
TextField@NAME:
|
||||
Id:NAME
|
||||
Text:Name
|
||||
Width:150
|
||||
Height:25
|
||||
MaxLength:16
|
||||
DropDownButton@COLOR:
|
||||
Id:COLOR
|
||||
Width:80
|
||||
Height:25
|
||||
X:160
|
||||
Font:Regular
|
||||
Children:
|
||||
ColorBlock@COLORBLOCK:
|
||||
Id:COLORBLOCK
|
||||
X:5
|
||||
Y:6
|
||||
Width:PARENT_RIGHT-35
|
||||
Height:PARENT_BOTTOM-12
|
||||
Label@SPECTATOR:
|
||||
Text:Spectator
|
||||
Width:198
|
||||
Height:25
|
||||
X:240
|
||||
Y:0
|
||||
Align:Center
|
||||
Font:Bold
|
||||
Checkbox@STATUS:
|
||||
Id:STATUS
|
||||
X:448
|
||||
Y:2
|
||||
Width:20
|
||||
Height:20
|
||||
Container@TEMPLATE_REMOTE_SPECTATOR:
|
||||
Id:TEMPLATE_REMOTE_SPECTATOR
|
||||
X:5
|
||||
Y:0
|
||||
Width:475
|
||||
@@ -209,54 +295,50 @@ Container@SERVER_LOBBY:
|
||||
Height:25
|
||||
X:5
|
||||
Y:0-1
|
||||
Button@JOIN:
|
||||
Id:JOIN
|
||||
Text:Play in this slot
|
||||
Font:Regular
|
||||
Width:278
|
||||
Button@KICK:
|
||||
Id:KICK
|
||||
Text:X
|
||||
Width:25
|
||||
Height:23
|
||||
X:125
|
||||
Y:2
|
||||
Font:Bold
|
||||
ColorBlock@COLOR:
|
||||
Id:COLOR
|
||||
X:165
|
||||
Y:6
|
||||
Width:45
|
||||
Height:13
|
||||
Label@SPECTATOR:
|
||||
Text:Spectator
|
||||
Width:198
|
||||
Height:25
|
||||
X:160
|
||||
Y:0
|
||||
Label@BOT:
|
||||
Id:BOT
|
||||
Text:Bot
|
||||
Width:278
|
||||
Height:25
|
||||
X:160
|
||||
X:240
|
||||
Y:0
|
||||
Align:Center
|
||||
Font:Bold
|
||||
Container@TEMPLATE_EMPTY_HOST:
|
||||
Id:TEMPLATE_EMPTY_HOST
|
||||
Checkbox@STATUS:
|
||||
Id:STATUS
|
||||
X:448
|
||||
Y:2
|
||||
Width:20
|
||||
Height:20
|
||||
Container@TEMPLATE_NEW_SPECTATOR:
|
||||
Id:TEMPLATE_NEW_SPECTATOR
|
||||
X:5
|
||||
Y:0
|
||||
Width:400
|
||||
Width:475
|
||||
Height:25
|
||||
Visible:false
|
||||
Children:
|
||||
DropDownButton@NAME:
|
||||
Id:NAME
|
||||
Text:Name
|
||||
Width:150
|
||||
Height:25
|
||||
Font:Regular
|
||||
Button@JOIN:
|
||||
Id:JOIN
|
||||
Text:Play in this slot
|
||||
Button@SPECTATE:
|
||||
Id:SPECTATE
|
||||
Text:Spectate
|
||||
Font:Regular
|
||||
Width:278
|
||||
Height:25
|
||||
X:160
|
||||
Y:0
|
||||
Label@BOT:
|
||||
Id:BOT
|
||||
Text:Bot
|
||||
Width:278
|
||||
Height:25
|
||||
X:160
|
||||
Y:0
|
||||
Align:Center
|
||||
Font:Bold
|
||||
Container@LABEL_CONTAINER:
|
||||
X:25
|
||||
Y:5
|
||||
|
||||
@@ -241,6 +241,106 @@ Background@SERVER_LOBBY:
|
||||
Y:0
|
||||
Align:Center
|
||||
Font:Bold
|
||||
Container@TEMPLATE_LOCAL_SPECTATOR:
|
||||
Id:TEMPLATE_LOCAL_SPECTATOR
|
||||
X:5
|
||||
Y:0
|
||||
Width:475
|
||||
Height:25
|
||||
Visible:false
|
||||
Children:
|
||||
TextField@NAME:
|
||||
Id:NAME
|
||||
Text:Name
|
||||
Width:150
|
||||
Height:25
|
||||
MaxLength:16
|
||||
DropDownButton@COLOR:
|
||||
Id:COLOR
|
||||
Width:80
|
||||
Height:25
|
||||
X:160
|
||||
Font:Regular
|
||||
Children:
|
||||
ColorBlock@COLORBLOCK:
|
||||
Id:COLORBLOCK
|
||||
X:5
|
||||
Y:6
|
||||
Width:PARENT_RIGHT-35
|
||||
Height:PARENT_BOTTOM-12
|
||||
Label@SPECTATOR:
|
||||
Text:Spectator
|
||||
Width:198
|
||||
Height:25
|
||||
X:240
|
||||
Y:0
|
||||
Align:Center
|
||||
Font:Bold
|
||||
Checkbox@STATUS:
|
||||
Id:STATUS
|
||||
X:448
|
||||
Y:2
|
||||
Width:20
|
||||
Height:20
|
||||
Container@TEMPLATE_REMOTE_SPECTATOR:
|
||||
Id:TEMPLATE_REMOTE_SPECTATOR
|
||||
X:5
|
||||
Y:0
|
||||
Width:475
|
||||
Height:25
|
||||
Visible:false
|
||||
Children:
|
||||
Label@NAME:
|
||||
Id:NAME
|
||||
Text:Name
|
||||
Width:145
|
||||
Height:25
|
||||
X:5
|
||||
Y:0-1
|
||||
Button@KICK:
|
||||
Id:KICK
|
||||
Text:X
|
||||
Width:25
|
||||
Height:23
|
||||
X:125
|
||||
Y:2
|
||||
Font:Bold
|
||||
ColorBlock@COLOR:
|
||||
Id:COLOR
|
||||
X:165
|
||||
Y:6
|
||||
Width:45
|
||||
Height:13
|
||||
Label@SPECTATOR:
|
||||
Text:Spectator
|
||||
Width:198
|
||||
Height:25
|
||||
X:240
|
||||
Y:0
|
||||
Align:Center
|
||||
Font:Bold
|
||||
Checkbox@STATUS:
|
||||
Id:STATUS
|
||||
X:448
|
||||
Y:2
|
||||
Width:20
|
||||
Height:20
|
||||
Container@TEMPLATE_NEW_SPECTATOR:
|
||||
Id:TEMPLATE_NEW_SPECTATOR
|
||||
X:5
|
||||
Y:0
|
||||
Width:475
|
||||
Height:25
|
||||
Visible:false
|
||||
Children:
|
||||
Button@SPECTATE:
|
||||
Id:SPECTATE
|
||||
Text:Spectate
|
||||
Font:Regular
|
||||
Width:278
|
||||
Height:25
|
||||
X:160
|
||||
Y:0
|
||||
Container@LABEL_CONTAINER:
|
||||
X:25
|
||||
Y:40
|
||||
|
||||
Reference in New Issue
Block a user