mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
at the very least fixes tgui?
This commit is contained in:
@@ -28,6 +28,9 @@ export class DreamSeeker {
|
|||||||
.map(key => encodeURIComponent(key)
|
.map(key => encodeURIComponent(key)
|
||||||
+ '=' + encodeURIComponent(params[key]))
|
+ '=' + encodeURIComponent(params[key]))
|
||||||
.join('&');
|
.join('&');
|
||||||
|
logger.log(
|
||||||
|
`topic call at ${this.client.defaults.baseURL + '/dummy?' + query}`
|
||||||
|
);
|
||||||
return this.client.get('/dummy?' + query);
|
return this.client.get('/dummy?' + query);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,8 +67,6 @@ export const findCacheRoot = async () => {
|
|||||||
|
|
||||||
const onCacheRootFound = cacheRoot => {
|
const onCacheRootFound = cacheRoot => {
|
||||||
logger.log(`found cache at '${cacheRoot}'`);
|
logger.log(`found cache at '${cacheRoot}'`);
|
||||||
// Plant a dummy
|
|
||||||
fs.closeSync(fs.openSync(cacheRoot + '/dummy', 'w'));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const reloadByondCache = async bundleDir => {
|
export const reloadByondCache = async bundleDir => {
|
||||||
@@ -93,6 +91,9 @@ export const reloadByondCache = async bundleDir => {
|
|||||||
// Clear garbage
|
// Clear garbage
|
||||||
const garbage = await resolveGlob(cacheDir, './*.+(bundle|chunk|hot-update).*');
|
const garbage = await resolveGlob(cacheDir, './*.+(bundle|chunk|hot-update).*');
|
||||||
try {
|
try {
|
||||||
|
// Plant a dummy browser window file, we'll be using this to avoid world topic
|
||||||
|
fs.closeSync(fs.openSync(cacheDir + '/dummy', 'w'));
|
||||||
|
|
||||||
for (let file of garbage) {
|
for (let file of garbage) {
|
||||||
fs.unlinkSync(file);
|
fs.unlinkSync(file);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,8 +48,9 @@ if (window.__windowId__ === '[' + 'tgui:windowId' + ']') {
|
|||||||
// Basic checks to detect whether this page runs in BYOND
|
// Basic checks to detect whether this page runs in BYOND
|
||||||
var isByond = (tridentVersion !== null || window.cef_to_byond)
|
var isByond = (tridentVersion !== null || window.cef_to_byond)
|
||||||
&& location.hostname === '127.0.0.1'
|
&& location.hostname === '127.0.0.1'
|
||||||
&& location.pathname.indexOf('/tmp') === 0
|
|
||||||
&& location.search !== '?external';
|
&& location.search !== '?external';
|
||||||
|
//As of BYOND 515 the path doesn't seem to include tmp dir anymore if you're trying to open tgui in external browser and looking why it doesn't work
|
||||||
|
//&& location.pathname.indexOf('/tmp') === 0
|
||||||
|
|
||||||
// Version constants
|
// Version constants
|
||||||
Byond.IS_BYOND = isByond;
|
Byond.IS_BYOND = isByond;
|
||||||
@@ -202,6 +203,8 @@ if (window.__windowId__ === '[' + 'tgui:windowId' + ']') {
|
|||||||
var len = styleSheets.length;
|
var len = styleSheets.length;
|
||||||
for (var i = 0; i < len; i++) {
|
for (var i = 0; i < len; i++) {
|
||||||
var styleSheet = styleSheets[i];
|
var styleSheet = styleSheets[i];
|
||||||
|
if(styleSheet.href === undefined)
|
||||||
|
continue;
|
||||||
if (styleSheet.href.indexOf(url) !== -1) {
|
if (styleSheet.href.indexOf(url) !== -1) {
|
||||||
return styleSheet.rules.length > 0;
|
return styleSheet.rules.length > 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,4 +117,20 @@ do
|
|||||||
done < <(jq -r '[.map_file] | flatten | .[]' $json)
|
done < <(jq -r '[.map_file] | flatten | .[]' $json)
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Check for non-515 compatable .proc/ syntax
|
||||||
|
if grep -P --exclude='__byond_version_compat.dm' '\.proc/' code/**/*.dm; then
|
||||||
|
echo
|
||||||
|
echo -e "${RED}ERROR: Outdated proc reference use detected in code, please use proc reference helpers.${NC}"
|
||||||
|
st=1
|
||||||
|
fi;
|
||||||
|
|
||||||
|
if [ $st = 0 ]; then
|
||||||
|
echo
|
||||||
|
echo -e "${GREEN}No errors found using grep!${NC}"
|
||||||
|
fi;
|
||||||
|
if [ $st = 1 ]; then
|
||||||
|
echo
|
||||||
|
echo -e "${RED}Errors found, please fix them and try again.${NC}"
|
||||||
|
fi;
|
||||||
|
|
||||||
exit $st
|
exit $st
|
||||||
|
|||||||
Reference in New Issue
Block a user