Merge branch 'main' of https://codeberg.org/MonkeyGG2/MonkeyGG2-v2
This commit is contained in:
@@ -28,6 +28,11 @@
|
||||
"battle"
|
||||
]
|
||||
},
|
||||
"10-minutes-till-dawn": {
|
||||
"path": "10-minutes-till-dawn",
|
||||
"aliases": [],
|
||||
"categories": []
|
||||
},
|
||||
"2048": {
|
||||
"path": "2048",
|
||||
"aliases": [],
|
||||
@@ -213,6 +218,11 @@
|
||||
"aliases": [],
|
||||
"categories": []
|
||||
},
|
||||
"Dadish 3": {
|
||||
"path": "dadish-3",
|
||||
"aliases": [],
|
||||
"categories": []
|
||||
},
|
||||
"Don't Escape": {
|
||||
"path": "w-flash/?game=dont-escape",
|
||||
"aliases": [],
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"companyName": "Flanne",
|
||||
"productName": "MinutesTillDawn",
|
||||
"productVersion": "0.1",
|
||||
"dataUrl": "10MinutesTillDawnWebGL.data.unityweb",
|
||||
"wasmCodeUrl": "10MinutesTillDawnWebGL.wasm.code.unityweb",
|
||||
"wasmFrameworkUrl": "10MinutesTillDawnWebGL.wasm.framework.unityweb",
|
||||
"graphicsAPI": ["WebGL 2.0", "WebGL 1.0"],
|
||||
"webglContextAttributes": { "preserveDrawingBuffer": false },
|
||||
"splashScreenStyle": "Dark",
|
||||
"backgroundColor": "#231F20",
|
||||
"cacheControl": { "default": "must-revalidate" },
|
||||
"developmentBuild": false,
|
||||
"multithreading": false,
|
||||
"unityVersion": "2019.4.21f1"
|
||||
}
|
||||
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
@@ -0,0 +1,84 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>10 Minutes Till Dawn</title>
|
||||
<script src="Build/UnityLoader.js"></script>
|
||||
<link rel="icon" href="icon.png">
|
||||
<script>
|
||||
var gameInstance = UnityLoader.instantiate("gameContainer", "Build/10MinutesTillDawnWebGL.json");
|
||||
var scaleToFit;
|
||||
try {
|
||||
scaleToFit = !!JSON.parse("");
|
||||
} catch (e) {
|
||||
scaleToFit = true;
|
||||
}
|
||||
|
||||
function onResize() {
|
||||
var canvas = gameInstance.Module.canvas;
|
||||
var container = gameInstance.container;
|
||||
var w;
|
||||
var h;
|
||||
|
||||
if (scaleToFit) {
|
||||
w = window.innerWidth;
|
||||
h = window.innerHeight;
|
||||
|
||||
var r = 675 / 1200;
|
||||
|
||||
if (w * r > window.innerHeight) {
|
||||
w = Math.min(w, Math.ceil(h / r));
|
||||
}
|
||||
h = Math.floor(w * r);
|
||||
} else {
|
||||
w = 1200;
|
||||
h = 675;
|
||||
}
|
||||
|
||||
container.style.width = canvas.style.width = w + "px";
|
||||
container.style.height = canvas.style.height = h + "px";
|
||||
container.style.top = Math.floor((window.innerHeight - h) / 2) + "px";
|
||||
container.style.left = Math.floor((window.innerWidth - w) / 2) + "px";
|
||||
}
|
||||
window.addEventListener("resize", onResize);
|
||||
</script>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
background: #000;
|
||||
background: ;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: visible;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div#gameContainer {
|
||||
background: transparent !important;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
div#gameContainer canvas {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
div#gameContainer[data-pixelated="true"] canvas {
|
||||
image-rendering: optimizeSpeed;
|
||||
image-rendering: -webkit-crisp-edges;
|
||||
image-rendering: -moz-crisp-edges;
|
||||
image-rendering: -o-crisp-edges;
|
||||
image-rendering: crisp-edges;
|
||||
image-rendering: -webkit-optimize-contrast;
|
||||
image-rendering: optimize-contrast;
|
||||
image-rendering: pixelated;
|
||||
-ms-interpolation-mode: nearest-neighbor;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body onload="onResize();">
|
||||
<div id="gameContainer" data-pixelated="true"></div>
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -0,0 +1,82 @@
|
||||
let isCtrlPressed = false;
|
||||
|
||||
document.addEventListener('keydown', function(event) {
|
||||
if (event.ctrlKey && event.key === 'q') {
|
||||
document.addEventListener('keydown', keyPressHandler);
|
||||
}
|
||||
});
|
||||
|
||||
function keyPressHandler(event) {
|
||||
if (event.key >= '1' && event.key <= '6') {
|
||||
handleOption(event.key);
|
||||
} else {
|
||||
document.removeEventListener('keydown', keyPressHandler);
|
||||
console.log('Removed listener for keys 1-6');
|
||||
}
|
||||
}
|
||||
|
||||
window.saveData = localStorage.getItem('RetroBowl.0.savedata.ini');
|
||||
|
||||
const handleOption = (option) => {
|
||||
const optionNumber = parseInt(option);
|
||||
switch (optionNumber) {
|
||||
case 1:
|
||||
handleAction("credits", "How many credits would you like?", addCredits);
|
||||
break;
|
||||
case 2:
|
||||
handleAction("salary", "What would you like your new salary cap to be?", changeSalaryCap);
|
||||
break;
|
||||
case 3:
|
||||
handleAction("draft", "How many 1st round draft picks would you like?", changeDraft);
|
||||
break;
|
||||
case 4:
|
||||
handleAction("stadium", "What level stadium do you want (0-10)?", changeStadiumLvl);
|
||||
break;
|
||||
case 5:
|
||||
handleAction("training", "What level training facilities do you want (0-10)?", changeTrainingLvl);
|
||||
break;
|
||||
case 6:
|
||||
handleAction("rehab", "What level rehab facilities do you want (0-10)?", changeRehabLvl);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const handleAction = (actionName, promptText, actionFunction) => {
|
||||
const newValue = prompt(promptText);
|
||||
if (!isNaN(newValue) && newValue != null) {
|
||||
actionFunction(newValue);
|
||||
window.location.reload();
|
||||
}
|
||||
};
|
||||
|
||||
const addCredits = (count) => {
|
||||
updateSaveData(/coach_credit="[0-9]+"/g, `coach_credit="${count}"`);
|
||||
}
|
||||
|
||||
const changeSalaryCap = (salary) => {
|
||||
updateSaveData(/salary_cap="[0-9]+"/, `salary_cap="${salary}"`);
|
||||
}
|
||||
|
||||
const changeDraft = (picks) => {
|
||||
updateSaveData(/draft_picks_0="[0-9]+"/, `draft_picks_0="${picks}"`);
|
||||
}
|
||||
|
||||
const changeStadiumLvl = (lvl) => {
|
||||
updateSaveData(/facility_upgraded_stadium="[0-9]+"/, `facility_upgraded_stadium="${lvl}"`);
|
||||
updateSaveData(/facility_stadium="[0-9]+"/, `facility_stadium="${lvl}"`);
|
||||
}
|
||||
|
||||
const changeTrainingLvl = (lvl) => {
|
||||
updateSaveData(/facility_upgraded_training="[0-9]+"/, `facility_upgraded_training="${lvl}"`);
|
||||
updateSaveData(/facility_training="[0-9]+"/, `facility_training="${lvl}"`);
|
||||
}
|
||||
|
||||
const changeRehabLvl = (lvl) => {
|
||||
updateSaveData(/facility_upgraded_rehab="[0-9]+"/, `facility_upgraded_rehab="${lvl}"`);
|
||||
updateSaveData(/facility_rehab="[0-9]+"/, `facility_rehab="${lvl}"`);
|
||||
}
|
||||
|
||||
const updateSaveData = (pattern, replacement) => {
|
||||
const newSave = window.saveData.replace(pattern, replacement);
|
||||
localStorage.setItem('RetroBowl.0.savedata.ini', newSave);
|
||||
}
|
||||
@@ -90,6 +90,7 @@
|
||||
</div>
|
||||
<!-- Run the game code -->
|
||||
<script src="html5game/RetroBowl.js?WAEAC=1633155445" type="text/javascript"></script>
|
||||
<script src="hacks.js"></script>
|
||||
<script>window.onload = GameMaker_Init;</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
+6
-6
@@ -203,6 +203,7 @@ function updateList() {
|
||||
// then fill it with the sorted and filtered list
|
||||
for (const item of elems) {
|
||||
document.getElementById("gamesList").appendChild(item);
|
||||
updateGameList();
|
||||
}
|
||||
}
|
||||
$("#search").on("input", updateList);
|
||||
@@ -211,12 +212,6 @@ $("#sort").on("change", updateList);
|
||||
dragElement(document.getElementById("gameButton"));
|
||||
dragElement(document.getElementById("refresh"));
|
||||
|
||||
function toggleStar(event, star) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
star.classList.toggle('filled');
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds drag functionality to an HTML element.
|
||||
*
|
||||
@@ -283,6 +278,11 @@ function returnHome() {
|
||||
}
|
||||
|
||||
/**
|
||||
function toggleStar(event, star) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
star.classList.toggle('filled');
|
||||
}
|
||||
* Refreshes the current page by reloading it.
|
||||
*
|
||||
* @return {void}
|
||||
|
||||
@@ -65,6 +65,7 @@ fetch("./config.jsonc").then((e) => e.text()).then((jsonc) => {
|
||||
updateGameList();
|
||||
});
|
||||
});
|
||||
// Pushes all starred games to the top
|
||||
function updateGameList() {
|
||||
const gamesList = document.getElementById('gamesList');
|
||||
const children = Array.from(gamesList.children);
|
||||
|
||||
Reference in New Issue
Block a user