Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
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: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
38 changes: 38 additions & 0 deletions .github/workflows/nightly-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# .github/workflows/nightly-sync.yml

name: Push to Public Nightly Branch

on:
push:
branches:
- '' # This triggers the action whenever there's a push to the nightly branch in the private repo

jobs:
push_to_public_nightly:
runs-on: ubuntu-latest

steps:
# Checkout the private repo's code
- name: Checkout private repository code
uses: actions/checkout@v3

# Set up Git configuration
- name: Set up Git config
run: |
git config --global user.name "JacksonTheMaster"
git config --global user.email "jakob.langisch@gmail.com"

# Add the public repository as a remote
- name: Add public repository as remote
run: |
git remote add public https://JacksonTheMaster:${{ secrets.PAT_TOKEN }}@github.com/JacksonTheMaster/StationeersServerUI.git
git fetch public

# Force push to the public repo's nightly branch
- name: Push to public nightly branch
run: |
git push public HEAD:nightly --force

# Optional: Remove the public remote if you don't want it sticking around
- name: Clean up remotes
run: git remote remove public
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ UnityCrashHandler64.exe
UnityPlayer.dll
setting.xml
rocketstation_DedicatedServer.exe
/saves/*
/saves/*
.github/
repos.md
Binary file not shown.
141 changes: 72 additions & 69 deletions UIMod/config.html
Original file line number Diff line number Diff line change
@@ -1,76 +1,79 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Edit Configuration</title>
<link rel="stylesheet" href="/static/style.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Edit Configuration</title>
<link rel="stylesheet" href="/static/style.css">
</head>

<body>
<header>
<img src="/static/stationeers.png" alt="Stationeers Banner" id="banner">
</header>
<main>
<button onclick="window.location.href = '/'">Cancel</button>
<h1>Edit Configuration</h1>
<form action="/saveconfig" method="post">
<label for="exePath">Server Executable Path:</label><br>
<input type="text" id="exePath" name="exePath" value="{{ExePath}}" readonly><br>

<label for="StartLocalHost">Start Local Host:</label><br>
<input type="text" id="StartLocalHost" name="StartLocalHost" value="{{StartLocalHost}}"
pattern="^\S*$" title="No spaces allowed" required><br>

<label for="ServerVisible">Server Visible:</label><br>
<input type="text" id="ServerVisible" name="ServerVisible" value="{{ServerVisible}}"
pattern="^\S*$" title="No spaces allowed" required><br>

<label for="GamePort">Game Port:</label><br>
<input type="text" id="GamePort" name="GamePort" value="{{GamePort}}"
pattern="^\S*$" title="No spaces allowed" required><br>

<label for="UpdatePort">Update Port:</label><br>
<input type="text" id="UpdatePort" name="UpdatePort" value="{{UpdatePort}}"
pattern="^\S*$" title="No spaces allowed" required><br>

<label for="AutoSave">Auto Save:</label><br>
<input type="text" id="AutoSave" name="AutoSave" value="{{AutoSave}}"
pattern="^\S*$" title="No spaces allowed" required><br>

<label for="SaveInterval">Save Interval:</label><br>
<input type="text" id="SaveInterval" name="SaveInterval" value="{{SaveInterval}}"
pattern="^\S*$" title="No spaces allowed" required><br>

<label for="LocalIpAddress">Local IP Address:</label><br>
<input type="text" id="LocalIpAddress" name="LocalIpAddress" value="{{LocalIpAddress}}"
pattern="^\S*$" title="No spaces allowed" required><br>

<label for="ServerPassword">Server Password:</label><br>
<input type="text" id="ServerPassword" name="ServerPassword" value="{{ServerPassword}}"
pattern="^\S*$" title="No spaces allowed"><br>

<label for="AdminPassword">Admin Password:</label><br>
<input type="text" id="AdminPassword" name="AdminPassword" value="{{AdminPassword}}"
pattern="^\S*$" title="No spaces allowed"><br>

<label for="ServerMaxPlayers">Server Max Players:</label><br>
<input type="text" id="ServerMaxPlayers" name="ServerMaxPlayers" value="{{ServerMaxPlayers}}"
pattern="^\S*$" title="No spaces allowed" required><br>

<label for="ServerName">Server Name:</label><br>
<input type="text" id="ServerName" name="ServerName" value="{{ServerName}}"
pattern="^\S*$" title="No spaces allowed" required><br>

<label for="AdditionalParams">Additional Parameters: (CustomParam1 Value1 CustomParam2 Value2)</label><br>
<input type="text" id="AdditionalParams" name="AdditionalParams" value="{{AdditionalParams}}"
pattern="^\S*$" title="No spaces allowed"><br>
<label for="saveFileName">Save File Name:</label><br>
<input type="text" id="saveFileName" name="saveFileName" value="{{SaveFileName}}"
pattern="^\S*$" title="No spaces allowed" required><br><br>
<input type="submit" value="Save">
</form>
</main>
<header>
<img src="/static/stationeers.png" alt="Stationeers Banner" id="banner">
</header>
<main>
<h1>Edit Configuration</h1>
<form action="/saveconfig" method="post">
<label for="exePath">Server Executable Path:</label><br>
<input type="text" id="exePath" name="exePath" value="{{ExePath}}" readonly><br>

<label for="StartLocalHost">Start Local Host:</label><br>
<input type="text" id="StartLocalHost" name="StartLocalHost" value="{{StartLocalHost}}"
pattern="^\S*$" title="No spaces allowed" required><br>

<label for="ServerVisible">Server Visible:</label><br>
<input type="text" id="ServerVisible" name="ServerVisible" value="{{ServerVisible}}"
pattern="^\S*$" title="No spaces allowed" required><br>

<label for="GamePort">Game Port:</label><br>
<input type="text" id="GamePort" name="GamePort" value="{{GamePort}}" pattern="^\S*$"
title="No spaces allowed" required><br>

<label for="UpdatePort">Update Port:</label><br>
<input type="text" id="UpdatePort" name="UpdatePort" value="{{UpdatePort}}" pattern="^\S*$"
title="No spaces allowed" required><br>

<label for="AutoSave">Auto Save:</label><br>
<input type="text" id="AutoSave" name="AutoSave" value="{{AutoSave}}" pattern="^\S*$"
title="No spaces allowed" required><br>

<label for="SaveInterval">Save Interval:</label><br>
<input type="text" id="SaveInterval" name="SaveInterval" value="{{SaveInterval}}" pattern="^\S*$"
title="No spaces allowed" required><br>

<label for="LocalIpAddress">Local IP Address:</label><br>
<input type="text" id="LocalIpAddress" name="LocalIpAddress" value="{{LocalIpAddress}}"
pattern="^\S*$" title="No spaces allowed" required><br>

<label for="ServerPassword">Server Password:</label><br>
<input type="text" id="ServerPassword" name="ServerPassword" value="{{ServerPassword}}"
pattern="^\S*$" title="No spaces allowed"><br>

<label for="AdminPassword">Admin Password (inop with current Stationeers builds):</label><br>
<input type="text" id="AdminPassword" name="AdminPassword" value="{{AdminPassword}}"
pattern="^\S*$" title="No spaces allowed. Also, this Admin Pwd seems to not work any more with the Stationeers Dedicated Server. "><br>

<label for="ServerMaxPlayers">Server Max Players:</label><br>
<input type="text" id="ServerMaxPlayers" name="ServerMaxPlayers" value="{{ServerMaxPlayers}}"
pattern="^\S*$" title="No spaces allowed" required><br>

<label for="ServerName">Server Name:</label><br>
<input type="text" id="ServerName" name="ServerName" value="{{ServerName}}" pattern="^\S*$"
title="No spaces allowed" required><br>

<label for="AdditionalParams">Additional Parameters: (CustomParam1 Value1 CustomParam2
Value2)</label><br>
<input type="text" id="AdditionalParams" name="AdditionalParams" value="{{AdditionalParams}}"
pattern="^\S*$" title="No spaces allowed"><br>

<label for="saveFileName">Save File Name:</label><br>
<input type="text" id="saveFileName" name="saveFileName" value="{{SaveFileName}}" pattern="^\S*$"
title="No spaces allowed" required><br><br>

<input type="submit" value="Save">
</form>
</main>
</body>

</html>
20 changes: 10 additions & 10 deletions UIMod/config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"discordToken": "redacted",
"controlChannelID": "1279897558495531129",
"statusChannelID": "1279897558495531129",
"connectionListChannelID": "1279897558495531129",
"logChannelID": "1279902452044267530",
"saveChannelID": "1279897558495531129",
"controlPanelChannelID": "1279897558495531129",
"blackListFilePath": "C:/SteamCMD/Stationeers/Blacklist.txt",
"backupDir": "C:/SteamCMD/Stationeers/saves/EuropaProd/backup",
"isDiscordEnabled": false
"discordToken": "redacted",
"controlChannelID": "1279897558495531129",
"statusChannelID": "1279897558495531129",
"connectionListChannelID": "1279897558495531129",
"logChannelID": "1279902452044267530",
"saveChannelID": "1279897558495531129",
"controlPanelChannelID": "1279897558495531129",
"blackListFilePath": "./Blacklist.txt",
"isDiscordEnabled": false,
"errorChannelID": "1279897558495531129"
}
2 changes: 1 addition & 1 deletion UIMod/config.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Config>
<server>
<exePath>./rocketstation_DedicatedServer.exe</exePath>
<settings>StartLocalHost true ServerVisible true GamePort 27016 UpdatePort 27015 AutoSave true SaveInterval 500 LocalIpAddress 10.0.50.166 ServerMaxPlayers 1 ServerName StationeersServerWithUI</settings>
<settings>StartLocalHost true ServerVisible true GamePort 27016 UpdatePort 27015 AutoSave true SaveInterval 500 LocalIpAddress 127.0.0.1 ServerMaxPlayers 1 ServerName StationeersServerWithUI</settings>
</server>
<saveFileName>EuropaProd</saveFileName>
</Config>
60 changes: 60 additions & 0 deletions UIMod/futherconfig.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Edit Configuration</title>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
<header>
<h1>Edit Configuration</h1>
</header>
<main>
<form action="/saveconfigasjson" method="post">

<label for="isDiscordEnabled">Discord Enabled:</label><br>
<select id="isDiscordEnabled" name="isDiscordEnabled">
<option value="true" {{isDiscordEnabledTrue}}>Enabled</option>
<option value="false" {{isDiscordEnabledFalse}}>Disabled</option>
</select><br>

<label for="discordToken">Discord Token:</label><br>
<input type="text" id="discordToken" name="discordToken" value="{{discordToken}}"><br>

<label for="controlChannelID">Admin Command Channel ID:</label><br>
<input type="text" id="controlChannelID" name="controlChannelID" value="{{controlChannelID}}"><br>

<label for="controlPanelChannelID">Control Panel Channel ID:</label><br>
<input type="text" id="controlPanelChannelID" name="controlPanelChannelID" value="{{controlPanelChannelID}}"><br>

<label for="statusChannelID">Status Channel ID:</label><br>
<input type="text" id="statusChannelID" name="statusChannelID" value="{{statusChannelID}}"><br>

<label for="connectionListChannelID">Connection List Channel ID:</label><br>
<input type="text" id="connectionListChannelID" name="connectionListChannelID" value="{{connectionListChannelID}}"><br>

<label for="logChannelID">Log Channel ID:</label><br>
<input type="text" id="logChannelID" name="logChannelID" value="{{logChannelID}}"><br>

<label for="saveChannelID">Save Info Channel ID:</label><br>
<input type="text" id="saveChannelID" name="saveChannelID" value="{{saveChannelID}}"><br>

<label for="errorChannelID">Error Info Channel ID:</label><br>
<input type="text" id="errorChannelID" name="errorChannelID" value="{{errorChannelID}}"><br>

<label for="blackListFilePath">Banned Players List File Path:</label><br>
<input type="text" id="blackListFilePath" name="blackListFilePath" value="{{blackListFilePath}}"><br>

<input type="submit" value="Save">
</form>
</main>
<script>
document.getElementById('isDiscordEnabled').addEventListener('change', function() {
if (this.value === 'false') {
alert('You are missing out nice features! Please consider using the Discord Integration. Info can be found on the GitHub page.');
}
});
</script>
</body>
</html>
9 changes: 5 additions & 4 deletions UIMod/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
<img src="/static/stationeers.png" alt="Stationeers Banner" id="banner">
</header>
<main>
<h1>Stationeers Dedicated Server Control v2.2.X</h1>
<h1>Stationeers Dedicated Server Control v2.4.1</h1>
<div id="controls">
<button onclick="startServer()">Start Server</button>
<button onclick="stopServer()">Stop Server</button>
<button onclick="window.location.href = '/config'">Edit Configuration</button>
<button onclick="window.location.href = '/static/apiinfo.html'">REST-API Information</button>
<button onclick="window.location.href = '/config'">Game Server Config</button>
<button onclick="window.location.href = '/futherconfig'">Further Config</button>
<button onclick="window.location.href = '/static/apiinfo.html'">API Info</button>
</div>
<p id="status"></p>
<div id="console"></div>
Expand All @@ -25,7 +26,7 @@ <h2>Saves</h2>
<ul id="backupList"></ul>
</div>
<br><br>
Copyright &copy; 2024 JMG J. Langisch. Licensed under <a href="https://github.com/jmgit/stationeers-server-ui/blob/main/LICENSE">MIT License</a>.
Copyright &copy; 2024 JMG J. Langisch. Licensed under <a href="https://github.com/jacksonthemaster/StationeersServerUI/blob/main/LICENSE">MIT License</a>.
</main>
<script src="/static/script.js"></script>
</body>
Expand Down
48 changes: 40 additions & 8 deletions UIMod/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ function setDefaultConsoleMessage() {

const bootCompleteMessage = "System boot complete.\nINFO: Press 'Start' to launch the game server.";

// Random chance to trigger a funny bug (e.g., 20% chance)
const bugChance = Math.random();
const bugMessage = "ERROR: Nuclear parts in airflow detected! Initiating repair sequence...";

// First, type the boot title
typeTextWithCallback(consoleElement, bootTitle, 50, () => {
// After the title is typed, start the progress bar update sequence
Expand All @@ -127,18 +131,46 @@ function setDefaultConsoleMessage() {
index++;
} else {
clearInterval(bootInterval); // Stop when progress is done
// Display the completion message
setTimeout(() => {
const completionElement = document.createElement('div');
completionElement.innerHTML = bootCompleteMessage.replace(/\n/g, '<br>'); // Add the completion message
consoleElement.appendChild(completionElement);

if (bugChance < 0.05) {
const bugElement = document.createElement('div');
bugElement.style.color = 'red'; // Make it look like an error
bugElement.textContent = bugMessage;
consoleElement.appendChild(bugElement);
consoleElement.scrollTop = consoleElement.scrollHeight;
}, 500); // Delay for .5 second after progress reaches 100%

// Delay for 2 seconds before "repairing"
setTimeout(() => {
const repairMessage = "Repair complete. Continuing boot sequence...";
const repairElement = document.createElement('div');
repairElement.style.color = 'green';
repairElement.textContent = repairMessage;
consoleElement.appendChild(repairElement);
consoleElement.scrollTop = consoleElement.scrollHeight;

// Finally, display the completion message after another short delay
setTimeout(() => {
const completionElement = document.createElement('div');
completionElement.innerHTML = bootCompleteMessage.replace(/\n/g, '<br>'); // Add the completion message
consoleElement.appendChild(completionElement);
consoleElement.scrollTop = consoleElement.scrollHeight;
}, 1000); // Delay for 1 second after repair message
}, 2000); // Repair after 2 seconds
} else {
// Display the normal completion message
setTimeout(() => {
const completionElement = document.createElement('div');
completionElement.innerHTML = bootCompleteMessage.replace(/\n/g, '<br>'); // Add the completion message
consoleElement.appendChild(completionElement);
consoleElement.scrollTop = consoleElement.scrollHeight;
}, 200); // Delay for .5 second after progress reaches 100%
}
}
}, 200); // Each progress update every 200ms
}, 2000); // Initial delay of 1s to simulate a pause
}, 150); // Each progress update every 150ms
}, 100); // Initial delay of 2s to simulate a pause
});
}


fetchOutput();
fetchBackups();
Loading