mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 07:48:55 +00:00
tgui
tgui update
This commit is contained in:
@@ -28,6 +28,9 @@ export class DreamSeeker {
|
||||
.map(key => encodeURIComponent(key)
|
||||
+ '=' + encodeURIComponent(params[key]))
|
||||
.join('&');
|
||||
logger.log(
|
||||
`topic call at ${this.client.defaults.baseURL + '/dummy?' + query}`
|
||||
);
|
||||
return this.client.get('/dummy?' + query);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,8 +67,6 @@ export const findCacheRoot = async () => {
|
||||
|
||||
const onCacheRootFound = cacheRoot => {
|
||||
logger.log(`found cache at '${cacheRoot}'`);
|
||||
// Plant a dummy
|
||||
fs.closeSync(fs.openSync(cacheRoot + '/dummy', 'w'));
|
||||
};
|
||||
|
||||
export const reloadByondCache = async bundleDir => {
|
||||
@@ -93,6 +91,9 @@ export const reloadByondCache = async bundleDir => {
|
||||
// Clear garbage
|
||||
const garbage = await resolveGlob(cacheDir, './*.+(bundle|chunk|hot-update).*');
|
||||
try {
|
||||
// Plant a dummy browser window file, we'll be using this to avoid world topic
|
||||
fs.closeSync(fs.openSync(cacheRoot + '/dummy', 'w'));
|
||||
|
||||
for (let file of garbage) {
|
||||
fs.unlinkSync(file);
|
||||
}
|
||||
|
||||
@@ -48,8 +48,9 @@ if (window.__windowId__ === '[' + 'tgui:windowId' + ']') {
|
||||
// Basic checks to detect whether this page runs in BYOND
|
||||
var isByond = (tridentVersion !== null || window.cef_to_byond)
|
||||
&& location.hostname === '127.0.0.1'
|
||||
&& location.pathname.indexOf('/tmp') === 0
|
||||
&& 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
|
||||
Byond.IS_BYOND = isByond;
|
||||
@@ -202,6 +203,8 @@ if (window.__windowId__ === '[' + 'tgui:windowId' + ']') {
|
||||
var len = styleSheets.length;
|
||||
for (var i = 0; i < len; i++) {
|
||||
var styleSheet = styleSheets[i];
|
||||
if(styleSheet.href === undefined)
|
||||
continue;
|
||||
if (styleSheet.href.indexOf(url) !== -1) {
|
||||
return styleSheet.rules.length > 0;
|
||||
}
|
||||
|
||||
@@ -117,4 +117,11 @@ do
|
||||
done < <(jq -r '[.map_file] | flatten | .[]' $json)
|
||||
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;
|
||||
|
||||
exit $st
|
||||
|
||||
Reference in New Issue
Block a user