Regarding the checked extensions, you have to use an S2GM manifest first of all, and add a minimumPlatform object to it, like this:
install(s2gm({
name: "Spectacles: Bruce's Story",
author: "Fat Cerberus",
summary: "Follow Scott Starcross in his quest to stop the Primus.",
resolution: '320x240',
script: 'scripts/main.js',
minimumPlatform: {
recommend: "minisphere 2.1 or later",
apiVersion: 2.0,
extensions: [
"sphere-legacy-api",
"sphere-obj-constructors",
"sphere-obj-props",
"sphere-map-engine",
"sphere-rng-object",
"sphere-s2gm",
"sphere-spherefs",
]
},
}));
The engine will then check for required extensions when loading the game, before any JS code is even executed. This is better than leaving the requirements check completely up to script, as RequireScript()'d scripts may actually cause a runtime error before the check can be done if they use any extended functionality.