Skip to content

Commit 6961f32

Browse files
committed
fixed crucial bugs
1 parent 9da5290 commit 6961f32

File tree

5 files changed

+23
-3
lines changed

5 files changed

+23
-3
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const { app, BrowserWindow, ipcMain, Menu, webContents } = require('electron');
22
const path = require('path');
33

4-
let steam = true;
4+
let steam = false;
55
if (steam) {
66
const steamworks = require("steamworks.js")
77
const client = steamworks.init(2940750);

src/script/public/App/social_stuff/online_level_overview.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,7 @@ class OnlineLevelPlayerScoreBoardHandler {
684684
level_data2.style = `display: flex;gap: 5vw;`
685685

686686
conquered_label.textContent = level_player_data.points_made >= this.required_points ? 'Level Conquered' : '';
687+
conquered_label.style = 'position: absolute;right: 5%;'
687688

688689
// add to document
689690
span3.appendChild(level_data1);

src/script/public/Game/Game.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,10 @@ function initAllPatterns(official_patterns, costum_patterns, Fieldx, Fieldy, cos
506506
};
507507

508508
function initializeDocument(field, fieldIndex, fieldTitle, onlineMode, OnlineGameDataArray, maxAmoOfMoves, CreativeLevel_from_onlineMode_costumPatterns, costumCoords) {
509+
if (localStorage.getItem('sett-ShowFieldData') == null) {
510+
localStorage.setItem('sett-ShowFieldData', 'true');
511+
};
512+
509513
// Hide unnecessary elements
510514
GameField.style.display = 'flex';
511515
gameModeFields_Div.style.display = 'none';
@@ -1203,9 +1207,18 @@ const SetGameFieldIconForCurrentField = (xy, fieldIndex, fromCreativeLevel, forT
12031207

12041208
// online game in creative level
12051209
if (fromCreativeLevel) {
1210+
let icon = null;
1211+
1212+
if (PlayingInCreatedLevel_AsGuest) {
1213+
icon = costumLevelIcon;
1214+
1215+
} else if (player_levels_handler.online_level_overview_handler) {
1216+
icon = universal_level_icons[player_levels_handler.online_level_overview_handler.level.icon];
1217+
};
1218+
12061219
if (Game_Upper_Field_Icon.querySelector("img")) Game_Upper_Field_Icon.querySelector("img").remove();
12071220
let img5 = document.createElement("img");
1208-
img5.src = universal_level_icons[player_levels_handler.online_level_overview_handler.level.icon];
1221+
img5.src = icon;
12091222
img5.width = "31";
12101223
img5.height = "31";
12111224
img5.style.margin = "0.5vh 0 0 0";
@@ -1591,7 +1604,7 @@ function check_draw(options, cells) {
15911604
for (let shift_idx = 0; shift_idx < shift; shift_idx++) {
15921605

15931606
if (((bigboard >> BigInt(shift_idx)) & bit_condition) == BigInt(0)) {
1594-
console.log("es kann noch gesetzt werden:", shift_idx, ((bigboard >> BigInt(i)) & bit_condition), ((bigboard >> BigInt(i)) & bit_condition).toString(2), shift, bigboard, i, bit_condition, bit_condition.toString(2), bit_condition.toString(2).length);
1607+
// console.log("es kann noch gesetzt werden:", shift_idx, ((bigboard >> BigInt(i)) & bit_condition), ((bigboard >> BigInt(i)) & bit_condition).toString(2), shift, bigboard, i, bit_condition, bit_condition.toString(2), bit_condition.toString(2).length);
15951608
return false;
15961609
};
15971610
};

src/script/public/Game/processWinner.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,6 +1487,8 @@ socket.on('global_UltimateWin', async(player1_won, player2_won, WinCombination,
14871487
function setNew_SkillPoints(plus) {
14881488
console.log("plus", plus);
14891489

1490+
if (plus > 100) plus = 100;
1491+
14901492
let old_Elo = parseInt(localStorage.getItem('ELO'));
14911493
let ELO_point = 0;
14921494

src/script/public/serverHandler.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1759,6 +1759,10 @@ socket.on('StartGame', (RoomData) => { // RoomData
17591759

17601760
globalLevelID = RoomData[0].level_id;
17611761

1762+
global_creative_level_data = {};
1763+
global_creative_level_data['level_name'] = FieldTitle;
1764+
global_creative_level_data['required_points'] = required_points_to_win;
1765+
17621766
if (random_player_mode) {
17631767
PlayedAgainstNRandomPlayer(true);
17641768
Achievement.new(20);

0 commit comments

Comments
 (0)