Skip to content

Commit 2d45af1

Browse files
authored
Merge pull request #78 from boltgolt/dev
Version 1.3.0
2 parents b2312cc + c0ca5c6 commit 2d45af1

File tree

11 files changed

+54
-24
lines changed

11 files changed

+54
-24
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"name": "boltobserv",
3-
"version": "1.2.2",
3+
"version": "1.3.0",
44
"_whatisthis": "Older versions of Boltobserv used this file to check for updates, so it can't be deleted. The real package.json is in /src"
55
}

src/config/config.json5

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// without making changes here. This makes your config a lot more portable.
55

66
{
7-
"_version": "1.2.0",
7+
"_version": "1.3.0",
88

99
// Settings related to the Boltobserv window
1010
"window": {
@@ -17,7 +17,7 @@
1717
// Make the background of the window transparent
1818
"transparent": false,
1919

20-
// Change the background color of the window even with transparency
20+
// Change the background color of the window with optional transparency
2121
// The color should be in hexadecimal color code
2222
// like #FFF or #FFFFFF to normal color and #80FFFFFF to color with transparency
2323
"backgroundColor": "#000000",
@@ -59,14 +59,18 @@
5959
}
6060
},
6161

62-
// Settings that will change the way the radar will be displayed
62+
// Settings that will change the way the radar is displayed
6363
"radar": {
6464
// Hide advisories on the radar
6565
"hideAdvisories": false,
66+
// When true, players higher on the map will show over lower ones
67+
// If false, the player slot number determines the stacking order
68+
// The spectated player is always visible on top of everything
69+
"highestPlayerOnTop": true,
6670
// Show the buyzones on the map, or only when players can buy
67-
// Can either be "never", "buytime" or "always"
71+
// Only works on SimpleRadar maps, can either be "never", "buytime" or "always"
6872
"showBuyzones": "buytime",
69-
// Show Boltobserv and Simple Radar logos
73+
// Show Boltobserv, Simple Radar and Lexogrine logos
7074
"showLogos": true,
7175

7276
// Show muzzle flashes for players shooting
@@ -127,7 +131,7 @@
127131
"game": {
128132
// Seconds of inactivity before considering a connection to the game client as lost
129133
// Set to -1 to never timeout
130-
"connectionTimout": 30,
134+
"connectionTimout": 90,
131135

132136
// The port GSI will try to connect to
133137
"networkPort": 36363,

src/css/map.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ div.dot.bomb {
9999
}
100100

101101
div.dot.active {
102-
z-index: 16;
102+
z-index: 7000 !important;
103103
box-shadow: 0 0 0 .2vmin rgba(0, 0, 0, .9), 0 0 0 1vmin rgba(255, 255, 255, .9), 0 0 2.4vmin 1.2vmin rgba(255, 255, 255, .2);
104104
}
105105

@@ -125,7 +125,7 @@ div.dot.dead {
125125
text-shadow: none;
126126
border-radius: 0;
127127
clip-path: polygon(20% 0%, 0% 20%, 30% 50%, 0% 80%, 20% 100%, 50% 70%, 80% 100%, 100% 80%, 70% 50%, 100% 20%, 80% 0%, 50% 30%);
128-
z-index: 13;
128+
z-index: 13 !important;
129129
filter: none;
130130
}
131131

@@ -157,7 +157,7 @@ div.label {
157157
}
158158

159159
div.label.active {
160-
z-index: 16;
160+
z-index: 7000 !important;
161161
font-size: 5vmin;
162162
}
163163

src/css/waiting.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ body {
6767

6868
#container > div:first-child section {
6969
position: absolute;
70-
width: 80%;
71-
left: 10%;
70+
width: 90%;
71+
left: 5%;
7272
top: 4.4rem;
7373
text-align: center;
7474
font-size: .8rem;
7575
cursor: pointer;
7676
z-index: 2000;
7777
-webkit-app-region: no-drag;
78-
color: #333;
78+
color: #555;
7979
}
8080

8181
#container > div:first-child section a {

src/html/waiting.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626

2727
<section id="donate">
2828
Has Boltobserv been useful to you?
29-
<a href="https://ko-fi.com/boltgolt" target="_blank">Please consider donating towards continued development, thank you!</a>
29+
<a href="https://ko-fi.com/boltgolt" target="_blank">Please consider donating towards continued development at ko-fi.com/boltgolt</a>
30+
Thank you!
3031
</section>
3132
</div>
3233

@@ -132,7 +133,8 @@
132133
// If electron, make the donate button open a browser tab and not a window
133134
document.getElementById("donate").querySelector("a").href = ""
134135
document.getElementById("donate").querySelector("a").target = ""
135-
document.getElementById("donate").addEventListener("click", () => {
136+
document.getElementById("donate").addEventListener("click", event => {
137+
event.preventDefault()
136138
electron.shell.openExternal("https://ko-fi.com/boltgolt")
137139
})
138140
}

src/loadconfig.js

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,27 @@ const path = require("path")
44
const util = require("util")
55
const pack = require("./package.json")
66

7-
let cachedConfig = false
7+
/**
8+
* Copy deep object values into target object
9+
* @param {Object} core Target object
10+
* @param {Object} override Source object
11+
*/
12+
function deepCopyObject(core, override) {
13+
// For each core property
14+
for (let prop in core) {
15+
// Check if the prop is an deeper object, run this function recursively on it if it is
16+
if (typeof core[prop] == "object") {
17+
deepCopyObject(core[prop], override[prop])
18+
continue
19+
}
20+
21+
// Otherwise, if the prop is set in both the core and overwrite, set it to the overwrite value
22+
if (typeof override[prop] != 'undefined') {
23+
core[prop] = override[prop]
24+
}
25+
}
26+
}
27+
828
// Load the default config
929
let loadedConfig = JSON5.parse(fs.readFileSync(path.join(__dirname, "config", "config.json5"), "utf8"))
1030

@@ -16,8 +36,8 @@ if (pack.version != loadedConfig._version) {
1636
if (fs.existsSync(path.join(__dirname, "config", "config.override.json5"))) {
1737
// Read the overwrite file
1838
let override = JSON5.parse(fs.readFileSync(path.join(__dirname, "config", "config.override.json5"), "utf8"))
19-
// Merge the configs
20-
Object.assign(loadedConfig, override)
39+
// Set any settings in the core config to the override ones
40+
deepCopyObject(loadedConfig, override)
2141
}
2242

2343
// Show config in console if enabled

src/maps/de_ancient/meta.json5

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
22
"version": {
33
// The version of this meta file
4-
"radar": 1,
4+
"radar": 2,
55
// The object format version this file is using
66
"format": 3
77
},
88

99
// The amount of in-game units per pixel of the 1024px radar image
10-
"resolution": 4.19,
10+
"resolution": 4.26,
1111

1212
// How many in-game units is the origin (0,0) of the map from the bottom left point of the radar
1313
"offset": {
14-
"x": 2520,
15-
"y": 2660
14+
"x": 2590,
15+
"y": 2520
1616
},
1717

1818
// Contains any special map splits
-3.03 KB
Loading

src/maps/de_ancient/radar.png

-78.7 KB
Loading

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "boltobserv",
3-
"version": "1.2.2",
3+
"version": "1.3.0",
44
"description": "External radar for CSGO observers",
55
"main": "index.js",
66
"homepage": "https://github.com/boltgolt/boltobserv/",

0 commit comments

Comments
 (0)