enable scripts during playtest option

This commit is contained in:
Yoshman29
2023-04-19 03:04:40 +02:00
parent 6149753495
commit 498af57dd6
4 changed files with 27 additions and 12 deletions
+3
View File
@@ -0,0 +1,3 @@
function update(elapsed) {
dad.angle += 25;
}
+9
View File
@@ -177,6 +177,12 @@ class Charter extends UIState {
onSelect: _chart_playtest_opponent_here
},
null,
{
label: 'Enable scripts during playtesting',
onSelect: _chart_enablescripts,
icon: Options.charterEnablePlaytestScripts ? 1 : 0
},
null,
{
label: "Edit metadata information"
}
@@ -843,6 +849,9 @@ class Charter extends UIState {
playtestChart(0, true);
inline function _chart_playtest_opponent_here(_)
playtestChart(Conductor.songPosition, true, true);
function _chart_enablescripts(t) {
t.icon = (Options.charterEnablePlaytestScripts = !Options.charterEnablePlaytestScripts) ? 1 : 0;
}
function _playback_metronome(t) {
t.icon = (Options.charterMetronomeEnabled = !Options.charterMetronomeEnabled) ? 1 : 0;
+14 -12
View File
@@ -550,19 +550,21 @@ class PlayState extends MusicBeatState
var camPos:FlxPoint = new FlxPoint(0, 0);
switch(SONG.meta.name) {
// case "":
// ADD YOUR HARDCODED SCRIPTS HERE!
default:
for(content in [
Paths.getFolderContent('songs/${SONG.meta.name.toLowerCase()}/scripts', true, fromMods ? MODS : BOTH),
Paths.getFolderContent('data/charts/', true, fromMods ? MODS : BOTH)]) {
for(file in content) {
var ext = Path.extension(file).toLowerCase();
if (Script.scriptExtensions.contains(ext))
scripts.add(Script.create(file));
if (!chartingMode || Options.charterEnablePlaytestScripts) {
switch(SONG.meta.name) {
// case "":
// ADD YOUR HARDCODED SCRIPTS HERE!
default:
for(content in [
Paths.getFolderContent('songs/${SONG.meta.name.toLowerCase()}/scripts', true, fromMods ? MODS : BOTH),
Paths.getFolderContent('data/charts/', true, fromMods ? MODS : BOTH)]) {
for(file in content) {
var ext = Path.extension(file).toLowerCase();
if (Script.scriptExtensions.contains(ext))
scripts.add(Script.create(file));
}
}
}
}
}
add(comboGroup);
+1
View File
@@ -53,6 +53,7 @@ class Options
public static var charterMetronomeEnabled:Bool = false;
public static var charterShowSections:Bool = true;
public static var charterShowBeats:Bool = true;
public static var charterEnablePlaytestScripts:Bool = true;
/**
* PLAYER 1 CONTROLS