Skip to content

Commit

Permalink
fixed player colors
Browse files Browse the repository at this point in the history
  • Loading branch information
errorcouldntloadname committed Sep 28, 2021
1 parent f54a285 commit a2389ed
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
14 changes: 0 additions & 14 deletions Defold/scripts/game_controller.script
Original file line number Diff line number Diff line change
Expand Up @@ -152,20 +152,6 @@ end

function join(room_id)
if room_id ~= nil then
client:get_available_rooms("Ascii", function(err, rooms)
if (err) then
console.error(err);
return
end

for i, room in pairs(rooms) do
print(room.roomId)
print(room.clients)
print(room.maxClients)
print(room.metadata)
print(room.options)
end
end);
client:join_or_create("Ascii", {GroupName = room_id}, function(err, room_instance)
if err then
print("ERROR JOINING ROOM")
Expand Down
2 changes: 1 addition & 1 deletion Server/src/Ascii.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class State extends Schema {
@type("number") time = 300;
@type("boolean") paused = true;
//function to create a new player for given id
createPlayer (id: string) { this.players[ id ] = new Player(Object.keys(this.players).length); }
createPlayer (id: string) { this.players[ id ] = new Player(this.players.size); }
@type([Customer]) customers = new ArraySchema<Customer>();
createCustomer (wants: MapSchema<number>, id: number) { this.customers.push(new Customer(wants, id)); }
}
Expand Down

0 comments on commit a2389ed

Please sign in to comment.