Skip to content
This repository was archived by the owner on Jan 31, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"devDependencies": {
"@aws-sdk/abort-controller": "3.78.0",
"@aws-sdk/protocol-http": "3.78.0",
"@rivet-gg/api": "https://github.com/rivet-gg/rivet/raw/c2ed02c5f2edae0cdb012f12ef2911f8c1a1c7f2/sdks/full/typescript/archive.tgz",
"@rivet-gg/api": "https://github.com/rivet-gg/rivet/raw/89c1666358777715a0ec13a8f42ce39790c674a0/sdks/full/typescript/archive.tgz",
"@rivet-gg/api-ee": "file:vendor/rivet-gg-api-ee.tgz",
"@rivet-gg/auth": "file:gen/api-auth",
"@rivet-gg/chat": "file:gen/api-chat",
Expand Down
2 changes: 1 addition & 1 deletion scripts/copy-api-ee.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
set -euf

cp "$RIVET_EE_PATH/sdks/typescript/archive.tgz" vendor/rivet-gg-api-ee.tgz
cp "$RIVET_EE_PATH/sdks/full/typescript/archive.tgz" vendor/rivet-gg-api-ee.tgz

# HACK: Workaround to ensure the integrity hash is updated
rm -rf node_modules
Expand Down
6 changes: 1 addition & 5 deletions src/elements/dev/dev-game-logs-sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,7 @@ export default class DevGameLogsSidebar extends LitElement {
)}
>
<span>
<e-svg
class="w-3 h-3 mr-1"
preserve
src=${getRegionEmoji(regionData.universalRegion)}
></e-svg>
<e-svg class="w-3 h-3 mr-1" preserve src=${getRegionEmoji(regionData.regionNameId)}></e-svg>
${lobby.lobbyGroupNameId}
</span>
${this.renderLobbyStatus(lobby)}
Expand Down
2 changes: 1 addition & 1 deletion src/elements/pages/dev/game/pages/game-lobbies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ export default class DevGameLobbies extends LitElement {
let destroying = this.destroyingLobbies.indexOf(l.lobbyId) != -1;

let tooltipText = `${regionData.regionDisplayName}`;
let regionIcon = getRegionEmoji(regionData.universalRegion as any);
let regionIcon = getRegionEmoji(regionData.regionNameId);

return html` <tr
class=${classMap({ 'lobby-row': true, destroying })}
Expand Down
10 changes: 5 additions & 5 deletions src/elements/pages/dev/game/pages/game-logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ interface MetricPoint {
}

export const UNKNOWN_REGION = {
regionId: '00000000-0000-0000-0000-000000000000',
regionNameId: 'unknown',
provider: 'unknown',
providerDisplayName: 'Unknown',
regionDisplayName: 'Unknown',
regionId: '00000000-0000-0000-0000-000000000000',
universalRegion: 'unknown'
};
regionDisplayName: 'Unknown'
} as Rivet.cloud.RegionSummary;

@customElement('page-dev-game-logs')
export default class DevGameLogs extends LitElement {
Expand Down Expand Up @@ -433,7 +433,7 @@ export default class DevGameLogs extends LitElement {
<e-svg
class="w-6 h-6 mr-1"
preserve
src=${getRegionEmoji(regionData.universalRegion)}
src=${getRegionEmoji(regionData.regionNameId)}
></e-svg>
${regionData.regionDisplayName}
</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export default class DevGameSettingsBilling extends LitElement {
let config = this.gamePlanConfig.dynamicServersCapacity.find(
config => config.regionId == region.region.regionId
);
let regionIcon = getRegionEmoji(region.region.universalRegion);
let regionIcon = getRegionEmoji(region.region.regionNameId);
return html`
<div>
<e-svg class="w-6 h-6 mr-1" preserve src=${regionIcon}></e-svg>
Expand Down
3 changes: 2 additions & 1 deletion src/utils/emoji.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Rivet } from '@rivet-gg/api';
const U200D = String.fromCharCode(0x200d);
const UFE0Fg = /\uFE0F/g;

/** Map of `RegionSummary.regionNameId` to emoji */
const REGION_EMOJI: { [key: string]: string } = {
unknown: '❓',
local: '🏠',
Expand Down Expand Up @@ -32,7 +33,7 @@ const REGION_EMOJI: { [key: string]: string } = {
miami: '🇺🇸',
jakarta: '🇮🇩',
los_angeles: '🇺🇸'
} satisfies Record<Rivet.cloud.UniversalRegion, string>;
} satisfies Record<string, string>;

export function getRegionEmoji(regionId: string) {
let regionEmoji = REGION_EMOJI[regionId] ?? REGION_EMOJI.unknown;
Expand Down
Loading