1.0.1 • Published 10 months ago

sb-modding v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

small modified version of starblast-modding due to a bug that happened to me.

Full changes:

/src/utils/PrivateServerFinder.js:

	let server;
	try {
		server = await URLFetcher("https://starblast.io/simstatus.json")
	}
	catch (e) {
		throw new Error("Failed to connect to the database")
	}
	try {
		server = JSON.parse(server).filter(server => server.modding && server.location === region).sort((a,b) => a.usage.cpu - b.usage.cpu)[0];
	}
	catch (e) {
		throw new Error("Server database malformed or updated")
	}

to

	let server;
	let datag;
	try {
		server = await fetch("https://starblast.io/simstatus.json");
		const date = await server.json();
		datag = await date.filter(server => server.modding && server.location === 'Europe').sort((a, b) => a.usage.cpu - b.usage.cpu)[0];
	}
	catch (e) {
		console.log('Catched Error: '+e)
	}
1.0.1

10 months ago

1.0.0

10 months ago