Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit 31a1536

Browse files
committed
Update to v1.0.11
1 parent 476b102 commit 31a1536

File tree

4 files changed

+1986
-6
lines changed

4 files changed

+1986
-6
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gennia",
3-
"version": "1.0.10patch2",
3+
"version": "1.0.11",
44
"description": "Yet another portable generals.io server & client",
55
"main": "main.js",
66
"scripts": {
@@ -23,7 +23,7 @@
2323
"build": {
2424
"appId": "com.reqwey.gennia",
2525
"productName": "Gennia",
26-
"copyright": "© 2022 Gennia Developing Team",
26+
"copyright": "© 2023 Gennia Developing Team",
2727
"win": {
2828
"icon": "assets/img/favicon-new.png"
2929
}

preload.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
*/
88
const { contextBridge, ipcRenderer, app, Menu, dialog } = require('electron')
9-
const { Titlebar, Color } = require("custom-electron-titlebar");
9+
const { Titlebar, TitlebarColor } = require("custom-electron-titlebar");
1010
const { getIPAdress } = require('./util')
1111
const path = require('path');
1212
var titlebar;
@@ -24,7 +24,7 @@ window.addEventListener('DOMContentLoaded', async () => {
2424
console.log('content loaded');
2525
titlebar = new Titlebar({
2626
icon: path.join(__dirname, 'assets/img/favicon-new.png'),
27-
backgroundColor: Color.fromHex('#596975b3')
27+
backgroundColor: TitlebarColor.fromHex('#596975b3')
2828
// menu: menu
2929
});
3030

src/server/map.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/*
2+
3+
Gennia Map Constructor
4+
5+
@Author: Reqwey(hi@reqwey.com)
6+
Jackiexiao(707610215@qq.com)
7+
GitHub Copilot
8+
9+
*/
110
const Block = require('./block');
211
const Point = require('./point');
312

@@ -19,8 +28,8 @@ function getRandomInt(min, max) {
1928

2029
class GameMap {
2130
constructor(width, height, mountain, city, swamp, kings) {
22-
this.width = parseInt(kings.length * 2.7 + 10 * width);
23-
this.height = parseInt(kings.length * 2.7 + 10 * height);
31+
this.width = parseInt(kings.length * 5 + 6 * width);
32+
this.height = parseInt(kings.length * 5 + 6 * height);
2433
if (mountain + city === 0) {
2534
this.mountain = this.city = 0
2635
} else {
@@ -120,6 +129,7 @@ class GameMap {
120129
}
121130
}
122131
}
132+
console.log('Kings generated successfully');
123133
// Generate the mountain
124134
for (let i = 1; i <= this.mountain; ++i) {
125135
let generated = false
@@ -139,6 +149,7 @@ class GameMap {
139149
}
140150
if (!generated) { this.mountain = i - 1; console.log("Mountain Interrupted", i); break }
141151
}
152+
console.log('Mountains generated successfully');
142153
// Generate the city
143154
for (let i = 1; i <= this.city; ++i) {
144155
let generated = false
@@ -159,6 +170,7 @@ class GameMap {
159170
}
160171
if (!generated) { this.city = i - 1; console.log("City Interrupted", i); break }
161172
}
173+
console.log('Cities generated successfully');
162174
// Generate the swamp.
163175
for (let i = 1, x, y; i <= this.swamp; ++i) {
164176
while (true) {
@@ -168,6 +180,7 @@ class GameMap {
168180
}
169181
this.map[x][y].type = 'Swamp'
170182
}
183+
console.log('Swamps generated successfully');
171184
let kings = this.kings
172185
return new Promise(function (resolve, reject) {
173186
console.log('Map generated successfully')

0 commit comments

Comments
 (0)