Skip to content
This repository has been archived by the owner on Aug 29, 2022. It is now read-only.

Commit

Permalink
1.4.0?
Browse files Browse the repository at this point in the history
  • Loading branch information
notweuz committed Jun 21, 2022
1 parent e2e2a10 commit 72594cf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions source/HscriptHandler.hx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import HealthIcon;
import Section;
import StrumNote;
import ClientPrefs;
import Conductor;
import Note;
import NoteSplash;

Expand All @@ -35,9 +36,11 @@ class HscriptHandler {
public static function setVars(interp:Interp) {
interp.variables.set('PlayState', PlayState);
interp.variables.set('Character', Character);
interp.variables.set('Paths', Paths);
interp.variables.set('Boyfriend', Boyfriend);
interp.variables.set('HealthIcon', HealthIcon);
interp.variables.set('StrumNote', StrumNote);
interp.variables.set('Conductor', Conductor);
interp.variables.set('ClientPrefs', ClientPrefs);
interp.variables.set('GameOverSubstate', GameOverSubstate);
interp.variables.set('Note', Note);
Expand Down
2 changes: 1 addition & 1 deletion source/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ class Main extends Sprite
fpsVar.visible = ClientPrefs.showFPS;
}
#end
FlxG.autoPause = false;

#if html5
FlxG.autoPause = false;
FlxG.mouse.visible = false;
#end
}
Expand Down
8 changes: 6 additions & 2 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,6 @@ class PlayState extends MusicBeatState
{
Paths.clearStoredMemory();

callOnHScripts('create', []);

ratingStuff = [
['F', 0.2], //From 0% to 19%
['E', 0.4], //From 20% to 39%
Expand Down Expand Up @@ -1480,6 +1478,7 @@ class PlayState extends MusicBeatState

Conductor.safeZoneOffset = (ClientPrefs.safeFrames / 60) * 1000;
callOnLuas('onCreatePost', []);
callOnHScripts('create', []);

super.create();

Expand Down Expand Up @@ -4497,6 +4496,7 @@ class PlayState extends MusicBeatState
if (canMiss) {
noteMissPress(key);
callOnLuas('noteMissPress', [key]);
callOnHScripts('noteMissPress', [key]);
}
}

Expand Down Expand Up @@ -4693,6 +4693,7 @@ class PlayState extends MusicBeatState
}

callOnLuas('noteMiss', [notes.members.indexOf(daNote), daNote.noteData, daNote.noteType, daNote.isSustainNote, daNote.ID]);
callOnHScripts('noteMiss', [notes.members.indexOf(daNote), daNote.noteData, daNote.noteType, daNote.isSustainNote, daNote.ID]);
}

function noteMissPress(direction:Int = 1):Void //You pressed a key when there was no notes to press for this key
Expand Down Expand Up @@ -4820,6 +4821,7 @@ class PlayState extends MusicBeatState
note.hitByOpponent = true;

callOnLuas('opponentNoteHit', [notes.members.indexOf(note), Math.abs(note.noteData), note.noteType, note.isSustainNote, note.ID]);
callOnHScripts('opponentNoteHit', [notes.members.indexOf(note), Math.abs(note.noteData), note.noteType, note.isSustainNote, note.ID]);

if (!note.isSustainNote)
{
Expand Down Expand Up @@ -4952,6 +4954,7 @@ class PlayState extends MusicBeatState
var leData:Int = Math.round(Math.abs(note.noteData));
var leType:String = note.noteType;
callOnLuas('goodNoteHit', [notes.members.indexOf(note), leData, leType, isSus, note.ID]);
callOnHScripts('goodNoteHit', [notes.members.indexOf(note), leData, leType, isSus, note.ID]);

if (!note.isSustainNote)
{
Expand Down Expand Up @@ -5458,6 +5461,7 @@ class PlayState extends MusicBeatState

// Rating FC
ratingFC = "";
if (perfects > 0 && !ClientPrefs.removePerfects) ratingFC = "PFC";
if (sicks > 0) ratingFC = "SFC";
if (goods > 0) ratingFC = "GFC";
if (bads > 0 || shits > 0) ratingFC = "FC";
Expand Down

0 comments on commit 72594cf

Please sign in to comment.