Skip to content

Commit

Permalink
Updated Omega Strikers Custom Games Modder
Browse files Browse the repository at this point in the history
Added a server selector.
  • Loading branch information
x753 committed Oct 26, 2023
1 parent 9242361 commit 6c56851
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions omega-customs.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@

input[type=text] {
font-size:16px;
width: 200px;
padding: 12px 20px;
margin-top: 10px;
margin-bottom: 5px;
width: 250px;
padding: 12px 12px;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
Expand Down Expand Up @@ -139,18 +137,40 @@
<button id="choosefile2" class="choosefile ready">or Choose File</button>
</div>

<div class="centerpoint" hidden>
<div hidden>
<input type="text" id="jwt" placeholder="jwt">
<input type="text" id="refreshToken" placeholder="refreshToken">
<input type="text" id="lobbyId" placeholder="lobbyId">
</div>

<div class="centerpoint">
<div>
<input type="text" list="GFDList" id="GFD" placeholder="GFD_Ranked" value="GFD_Ranked">
<input type="text" list="GMDList" id="GMD" placeholder="GMD_AhtenCity" value="GMD_AhtenCity">
</div>
<div>
<input type="text" list="REGIONList" id="REGION" placeholder="us-east-1" value="">
<input type="text" list="GTDList" id="GTD" placeholder="GTD_AhtenCity" value="GTD_AhtenCity">
</div>

<datalist id="REGIONList">
<option value="ap-northeast-2">
<option value="ap-southeast-1">
<option value="ap-south-1">
<option value="us-east-2">
<option value="us-east-1">
<option value="us-west-1">
<option value="us-west-2">
<option value="ca-central-1">
<option value="us-east-1-dfw-1">
<option value="us-west-2-den-1">
<option value="sa-east-1">
<option value="eu-central-1">
<option value="eu-west-1">
<option value="eu-west-2">
<option value="ap-southeast-2">
<option value="ap-northeast-1">
</datalist>

<datalist id="GFDList">
<option value="GFD_Ranked">
<option value="GFD_QuickPlay">
Expand Down Expand Up @@ -210,12 +230,13 @@
let refreshToken = document.getElementById("refreshToken").value;

let apiEndpoint = "https://prometheus-proxy.odysseyinteractive.gg/api/v1/custom-lobby/LOBBYIDPLACEHOLDER/game-options";
let requestData = '{"gameOptions":{"serverRegion":"","gameFormatId":"GFDPLACEHOLDER","mapAssetName":"GMDPLACEHOLDER","modifierAssetName":"OMD_Empty","terrainAssetName":"GTDPLACEHOLDER"}}';
let requestData = '{"gameOptions":{"serverRegion":"REGIONPLACEHOLDER","gameFormatId":"GFDPLACEHOLDER","mapAssetName":"GMDPLACEHOLDER","modifierAssetName":"OMD_Empty","terrainAssetName":"GTDPLACEHOLDER"}}';

apiEndpoint = apiEndpoint.replace('LOBBYIDPLACEHOLDER', document.getElementById('lobbyId').value);
requestData = requestData.replace('GFDPLACEHOLDER', document.getElementById('GFD').value);
requestData = requestData.replace('GMDPLACEHOLDER', document.getElementById('GMD').value);
requestData = requestData.replace('GTDPLACEHOLDER', document.getElementById('GTD').value);
requestData = requestData.replace('REGIONPLACEHOLDER', document.getElementById('REGION').value);

try {
const response = await fetch(apiEndpoint, {
Expand Down

0 comments on commit 6c56851

Please sign in to comment.