Skip to main content

Song

Kindclass
Packagedata
Full namedata.Song
Sourcesource/data/Song.hx

Public fields​

NameTypeStaticDefaultNotes
songStringno——
notesArray<SwagSection>no——
eventsArray<Dynamic>no——
bpmFloatno——
needsVoicesBoolnotrue—
arrowSkinStringno——
splashSkinStringno——
gameOverCharStringno——
gameOverSoundStringno——
gameOverLoopStringno——
gameOverEndStringno——
disableNoteRGBBoolnofalse—
speedFloatno1—
stageStringno——
player1Stringno'bf'—
player2Stringno'dad'—
gfVersionStringno'gf'—
psychV1ChartBoolyesfalse—
loadedSongNameStringyes—#if MODS_ALLOWED

Public methods​

hasDifficulty​

static function hasDifficulty(songName:String, difficulty:String):Bool
ParameterTypeDefault
songNameString—
difficultyString—

View source

loadFromJson​

static function loadFromJson(jsonInput:String, ?folder:String):SwagSong

Only compiled when #if MODS_ALLOWED.

ParameterTypeDefault
jsonInputString—
folder (optional)String—

View source

dummySong​

static function dummySong(songName:String = 'test'):SwagSong

Only compiled when #if MODS_ALLOWED.

Empty but fully valid song used when a chart file cannot be found. Keeps direct PlayState entry, the anti-cheat song swap and chart-less debug paths working in content-stripped (NO_BUILTIN_CONTENT) builds.

ParameterTypeDefault
songName (optional)String'test'

View source

parseJSON​

static function parseJSON(rawJson:String):Dynamic

Only compiled when #if MODS_ALLOWED.

ParameterTypeDefault
rawJsonString—

View source

Internals​

Private / internal members
Method
static function onLoadJson(songJson:Dynamic)