remove the mbp stuff

This commit is contained in:
RandomityGuy 2026-04-01 18:37:54 +01:00
parent b3282891cc
commit 53aaa9d16a
3 changed files with 24 additions and 149 deletions

View file

@ -82,24 +82,16 @@ class MarbleWorldMacros {
shape = new TriangleBumper();
else if (dataBlockLowerCase == "helicopteritem" || dataBlockLowerCase == "helicopteritem_mbu")
shape = new Helicopter(cast element);
else if (dataBlockLowerCase == "easteregg" || dataBlockLowerCase == "easteregg_mbu")
shape = new EasterEgg(cast element);
else if (dataBlockLowerCase == "checkpoint" || dataBlockLowerCase == "checkpoint_mbu")
shape = new Checkpoint(cast element);
else if (dataBlockLowerCase == "ductfan" || dataBlockLowerCase == "ductfan_mbu" || dataBlockLowerCase == "ductfan_mbm")
shape = new DuctFan();
else if (dataBlockLowerCase == "smallductfan" || dataBlockLowerCase == "smallductfan_mbm")
shape = new SmallDuctFan();
else if (dataBlockLowerCase == "magnet")
shape = new Magnet();
else if (dataBlockLowerCase == "antigravityitem" || dataBlockLowerCase == "antigravityitem_mbu")
shape = new AntiGravity(cast element);
else if (dataBlockLowerCase == "norespawnantigravityitem")
shape = new AntiGravity(cast element, true);
else if (dataBlockLowerCase == "landmine" || dataBlockLowerCase == "landmine_mbm")
shape = new LandMine();
else if (dataBlockLowerCase == "nuke")
shape = new Nuke();
else if (dataBlockLowerCase == "shockabsorberitem")
shape = new ShockAbsorber(cast element);
else if (dataBlockLowerCase == "superspeeditem" || dataBlockLowerCase == "superspeeditem_mbu")
@ -110,10 +102,6 @@ class MarbleWorldMacros {
shape = new TimeTravel(cast element);
else if (dataBlockLowerCase == "randompowerupitem")
shape = new RandomPowerup(cast element);
else if (dataBlockLowerCase == "blastitem" || dataBlockLowerCase == "blastitem_mbu")
shape = new Blast(cast element);
else if (dataBlockLowerCase == "megamarbleitem" || dataBlockLowerCase == "megamarbleitem_mbu")
shape = new MegaMarble(cast element);
else if (dataBlockLowerCase == "tornado" || dataBlockLowerCase == "tornado_mbm")
shape = new Tornado();
else if (dataBlockLowerCase == "trapdoor" || dataBlockLowerCase == "trapdoor_mbu")
@ -124,17 +112,6 @@ class MarbleWorldMacros {
shape = new Oilslick();
else if (dataBlockLowerCase == "arrow" || StringTools.startsWith(dataBlockLowerCase, "sign"))
shape = new Sign(cast element);
else if ([
"glass_3shape",
"glass_6shape",
"glass_9shape",
"glass_12shape",
"glass_15shape",
"glass_18shape"
].contains(dataBlockLowerCase))
shape = new Glass(cast element);
else if (["clear", "cloudy", "dusk", "wintry"].contains(dataBlockLowerCase))
shape = new shapes.Sky(dataBlockLowerCase);
else {
Console.error("Unknown item: " + element.datablock);
onFinish();

View file

@ -184,7 +184,6 @@ class MarbleWorld extends Scheduler {
public var cursorLock:Bool = true;
var timeTravelSound:Channel;
var alarmSound:Channel;
var helpTextTimeState:Float = -1e8;
var alertTextTimeState:Float = -1e8;
@ -648,10 +647,6 @@ class MarbleWorld extends Scheduler {
this.marble.blastAmount = 0;
this.marble.outOfBoundsTime = null;
this.finishTime = null;
if (this.alarmSound != null) {
this.alarmSound.stop();
this.alarmSound = null;
}
this.currentCheckpoint = null;
this.currentCheckpointTrigger = null;
@ -1006,12 +1001,6 @@ class MarbleWorld extends Scheduler {
trigger = new InBoundsTrigger(element, cast this);
} else if (datablockLowercase == "helptrigger") {
trigger = new HelpTrigger(element, cast this);
} else if (datablockLowercase == "teleporttrigger") {
trigger = new TeleportTrigger(element, cast this);
} else if (datablockLowercase == "destinationtrigger") {
trigger = new DestinationTrigger(element, cast this);
} else if (datablockLowercase == "checkpointtrigger") {
trigger = new CheckpointTrigger(element, cast this);
} else {
Console.error("Unknown trigger: " + element.datablock);
onFinish();
@ -2017,16 +2006,11 @@ class MarbleWorld extends Scheduler {
if (timeTravelSound == null) {
var ttsnd = ResourceLoader.getResource("data/sound/timetravelactive.wav", ResourceLoader.getAudio, this.soundResources);
timeTravelSound = AudioManager.playSound(ttsnd, null, true);
if (alarmSound != null)
alarmSound.pause = true;
}
} else {
if (timeTravelSound != null) {
timeTravelSound.stop();
timeTravelSound = null;
if (alarmSound != null)
alarmSound.pause = false;
}
if (!this.isMultiplayer) {
if (this.timeState.currentAttemptTime >= 3.5) {
@ -2077,49 +2061,6 @@ class MarbleWorld extends Scheduler {
}
this.timeState.timeSinceLoad += dt;
// Handle alarm warnings (that the user is about to exceed the par time)
if (!Net.isMP) {
if (this.timeState.currentAttemptTime >= 3.5) {
var alarmStart = this.mission.computeAlarmStartTime();
if (prevGameplayClock < alarmStart && this.timeState.gameplayClock >= alarmStart) {
// Start the alarm
this.alarmSound = AudioManager.playSound(ResourceLoader.getResource("data/sound/alarm.wav", ResourceLoader.getAudio, this.soundResources),
null, true); // AudioManager.createAudioSource('alarm.wav');
this.displayHelp('You have ${(this.mission.qualifyTime - alarmStart)} seconds remaining.');
}
if (prevGameplayClock < this.mission.qualifyTime && this.timeState.gameplayClock >= this.mission.qualifyTime) {
// Stop the alarm
if (this.alarmSound != null) {
this.alarmSound.stop();
this.alarmSound = null;
}
this.displayHelp("The clock has passed the Par Time.");
AudioManager.playSound(ResourceLoader.getResource("data/sound/alarm_timeout.wav", ResourceLoader.getAudio, this.soundResources));
}
}
} else {
if (this.multiplayerStarted) {
var alarmStart = this.mission.computeAlarmStartTime();
if (prevGameplayClock > alarmStart && this.timeState.gameplayClock <= alarmStart) {
// Start the alarm
if (this.alarmSound == null) {
this.alarmSound = AudioManager.playSound(ResourceLoader.getResource("data/sound/alarm.wav", ResourceLoader.getAudio,
this.soundResources), null,
true); // AudioManager.createAudioSource('alarm.wav');
this.displayHelp('You have ${alarmStart} seconds remaining.');
}
}
if (prevGameplayClock > 0 && this.timeState.gameplayClock <= 0) {
// Stop the alarm
if (this.alarmSound != null) {
this.alarmSound.stop();
this.alarmSound = null;
}
}
}
}
if (finishTime != null)
this.timeState.gameplayClock = finishTime.gameplayClock;
playGui.formatTimer(this.timeState.gameplayClock);
@ -2234,10 +2175,6 @@ class MarbleWorld extends Scheduler {
timeTravelSound.stop();
timeTravelSound = null;
}
if (alarmSound != null) {
alarmSound.stop();
alarmSound = null;
}
this.cancel(marble.oobSchedule);
}

View file

@ -160,38 +160,6 @@ class ResourceLoader {
toloadfiles.push(file);
}
}
filestats = fileSystem.dir("missions_mbg");
for (file in filestats) {
if (file.isDirectory) {
toloaddirs.push(file);
} else {
toloadfiles.push(file);
}
}
filestats = fileSystem.dir("missions_mbp");
for (file in filestats) {
if (file.isDirectory) {
toloaddirs.push(file);
} else {
toloadfiles.push(file);
}
}
filestats = fileSystem.dir("missions_mbu");
for (file in filestats) {
if (file.isDirectory) {
toloaddirs.push(file);
} else {
toloadfiles.push(file);
}
}
filestats = fileSystem.dir("multiplayer/hunt");
for (file in filestats) {
if (file.isDirectory) {
toloaddirs.push(file);
} else {
toloadfiles.push(file);
}
}
while (toloaddirs.length > 0) {
var nextdir = toloaddirs.pop();
var pathToSearch = nextdir.path;
@ -216,7 +184,9 @@ class ResourceLoader {
static function preloadMusic(onFinish:Void->Void) {
var worker = new ResourceLoaderWorker(onFinish);
worker.loadFile("sound/music/shell.ogg");
worker.loadFile("sound/music/pianoforte.ogg");
worker.loadFile("sound/groovepolice.ogg");
worker.loadFile("sound/classic vibe.ogg");
worker.loadFile("sound/beach party.ogg");
worker.run();
}
@ -229,38 +199,29 @@ class ResourceLoader {
}
static function preloadShapes(onFinish:Void->Void) {
var toloadfiles = [
StringTools.replace(Settings.optionsSettings.marbleModel, "data/", ""),
(Settings.optionsSettings.marbleCategoryIndex == 0)
? "shapes/balls/" + Settings.optionsSettings.marbleSkin + ".marble.png" : "shapes/balls/pack1/" + Settings.optionsSettings.marbleSkin +
".marble.png"
];
// var toloaddirs = [];
// var filestats = fileSystem.dir("shapes");
// for (file in filestats) {
// if (file.isDirectory) {
// toloaddirs.push(file);
// } else {
// toloadfiles.push(file);
// }
// }
// while (toloaddirs.length > 0) {
// var nextdir = toloaddirs.pop();
// for (file in fileSystem.dir(nextdir.path.substring(2))) {
// if (file.isDirectory) {
// toloaddirs.push(file);
// } else {
// toloadfiles.push(file);
// }
// }
// }
// var teleportPad = fileSystem.get("interiors_mbp/teleportpad.dts");
// var teleportTexture = fileSystem.get("interiors_mbp/repairbay.jpg");
// toloadfiles.push(teleportPad); // Because its not in the shapes folder like wtf
// toloadfiles.push(teleportTexture);
var toloadfiles = [];
var toloaddirs = [];
var filestats = fileSystem.dir("shapes");
for (file in filestats) {
if (file.isDirectory) {
toloaddirs.push(file);
} else {
toloadfiles.push(file);
}
}
while (toloaddirs.length > 0) {
var nextdir = toloaddirs.pop();
for (file in fileSystem.dir(nextdir.path.substring(2))) {
if (file.isDirectory) {
toloaddirs.push(file);
} else {
toloadfiles.push(file);
}
}
}
var worker = new ResourceLoaderWorker(onFinish);
for (file in toloadfiles) {
worker.loadFile(file);
worker.addTaskParallel((fwd) -> file.load(fwd));
}
worker.run();
}