Skip to content

Commit

Permalink
the changes!!
Browse files Browse the repository at this point in the history
Added the Denpa Engine Health Drain Bug as a feature
OG HP Colors RETURNS
Fixed default songs with spaces not being picked up correctly
Sustain notes now render under normal notes and the strums
Botplay text is now created again
Finally fixed an issue with sustain notes after the first Troll Mode loop
  • Loading branch information
JordanSantiagoYT committed Nov 13, 2023
1 parent 4384b4c commit e7f8e4d
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 37 deletions.
2 changes: 2 additions & 0 deletions assets/preload/data/funnyTips.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ All it takes is one YouTube Video
"JS Engine"? Never heard of it
I wonder what goombas taste like...
Finna blow up a toilet
what 5 grams of jordan santiago does to an fnf engine:
"i DARE you to make a 30+mb chart with normal psych :joy_cat:" - justAMZ
What's a debug without a 7? ;)
JS engine aint JavaScript engine
Expand Down Expand Up @@ -61,5 +62,6 @@ Download JS Engine right now! oh wait you're already here, uhhh... STOP USING OS
THERES TOO MUCH ZOOMING PLEASE HELP ME TURN IT OFF- Options, then Visuals & UI, then turn off Double Note Ghosts.
I kinda like future in 2024- Wait, 2024 EXISTS????? HUHHHH???
Stefan's grammar is so bad and un-understandable for real
2006archives says: "Penis"
Mario is the best rythm gamer on mania charts. Go subscribe him tho btw.
Mays, you know what happend if you gonna ignore Trollge?
10 changes: 10 additions & 0 deletions source/ClientPrefs.hx
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ class ClientPrefs { //default settings if it can't find a save file containing y
public static var opponentRateCount:Bool = true;
public static var coolGameplay:Bool = false;
public static var skipResultsScreen:Bool = false;
public static var denpaDrainBug:Bool = false;
public static var ogHPColor:Bool = false;
public static var hudType:String = 'Kade Engine';
public static var smoothHealth:Bool = true;
public static var smoothHealthType:String = 'Golden Apple 1.5';
Expand Down Expand Up @@ -272,6 +274,8 @@ class ClientPrefs { //default settings if it can't find a save file containing y
FlxG.save.data.holdNoteHits = holdNoteHits;
FlxG.save.data.comboScoreEffect = comboScoreEffect;
FlxG.save.data.comboMultiType = comboMultiType;
FlxG.save.data.denpaDrainBug = denpaDrainBug;
FlxG.save.data.ogHPColor = ogHPColor;
FlxG.save.data.charsAndBG = charsAndBG;
FlxG.save.data.pbRControls = pbRControls;
FlxG.save.data.doubleGhost = doubleGhost;
Expand Down Expand Up @@ -438,6 +442,12 @@ class ClientPrefs { //default settings if it can't find a save file containing y
if(FlxG.save.data.noGunsRNG != null) {
noGunsRNG = FlxG.save.data.noGunsRNG;
}
if(FlxG.save.data.denpaDrainBug != null) {
denpaDrainBug = FlxG.save.data.denpaDrainBug;
}
if(FlxG.save.data.ogHPColor != null) {
ogHPColor = FlxG.save.data.ogHPColor;
}
if(FlxG.save.data.showRamUsage != null) {
showRamUsage = FlxG.save.data.showRamUsage;
}
Expand Down
11 changes: 5 additions & 6 deletions source/FreeplayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,12 @@ class FreeplayState extends MusicBeatState
Paths.currentModDirectory = songs[curSelected].folder;
var poop:String = Highscore.formatSong(songs[curSelected].songName.toLowerCase(), curDifficulty);
PlayState.SONG = Song.loadFromJson(poop, songs[curSelected].songName.toLowerCase());
for (i in 0...CoolUtil.defaultSongs.length) {
if (Paths.formatToSongPath(PlayState.SONG.song) == CoolUtil.defaultSongs[i] && curDifficulty == 2 && ClientPrefs.JSEngineRecharts) {
if (CoolUtil.defaultSongs.contains(PlayState.SONG.song.toLowerCase()) && curDifficulty == 2 && ClientPrefs.JSEngineRecharts) {
PlayState.SONG = Song.loadFromJson(songs[curSelected].songName.toLowerCase() + '-jshard', songs[curSelected].songName.toLowerCase());
}
} else {
PlayState.SONG = Song.loadFromJson(poop, songs[curSelected].songName.toLowerCase());
}

if (PlayState.SONG.needsVoices)
vocals = new FlxSound().loadEmbedded(Paths.voices(PlayState.SONG.song));
else
Expand Down Expand Up @@ -482,14 +483,12 @@ class FreeplayState extends MusicBeatState
PlayState.SONG = Song.loadFromJson(poop, songLowercase);

if(sys.FileSystem.exists(Paths.modsJson(songLowercase + '/' + poop)) || sys.FileSystem.exists(Paths.json(songLowercase + '/' + poop)) || OpenFlAssets.exists(Paths.modsJson(songLowercase + '/' + poop)) || OpenFlAssets.exists(Paths.json(songLowercase + '/' + poop))) {
for (i in 0...CoolUtil.defaultSongs.length) {
if (Paths.formatToSongPath(PlayState.SONG.song) == CoolUtil.defaultSongs[i] && curDifficulty == 2 && ClientPrefs.JSEngineRecharts) {
if (CoolUtil.defaultSongs.contains(PlayState.SONG.song.toLowerCase()) && curDifficulty == 2 && ClientPrefs.JSEngineRecharts) {
PlayState.SONG = Song.loadFromJson(songs[curSelected].songName.toLowerCase() + '-jshard', songs[curSelected].songName.toLowerCase());
PlayState.storyDifficulty == 2;
} else {
PlayState.storyDifficulty = curDifficulty;
}
}
PlayState.isStoryMode = false;

trace('CURRENT WEEK: ' + WeekData.getWeekFileName());
Expand Down
32 changes: 20 additions & 12 deletions source/Note.hx
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,18 @@ class Note extends FlxSprite
public var multAlpha:Float = 1;
public var multSpeed(default, set):Float = 1;

public var prevNoteIsSustainNote:Bool = false;

public static var SUSTAIN_SIZE:Int = 44;

public var copyX:Bool = true;
public var copyY:Bool = true;
public var copyScale:Bool = true;
public var copyAngle:Bool = true;
public var copyAlpha:Bool = true;

public var dumbHitboxThing:Bool = true;

public var hitHealth:Float = 0.023;
public var missHealth:Float = 0.0475;
public var rating:String = 'unknown';
Expand Down Expand Up @@ -371,6 +376,7 @@ class Note extends FlxSprite
multAlpha = 0.6;
hitsoundDisabled = true;
if(ClientPrefs.downScroll) flipY = true;
prevNoteIsSustainNote = prevNote.isSustainNote;

offsetX += width / 2;
copyAngle = false;
Expand Down Expand Up @@ -572,6 +578,20 @@ class Note extends FlxSprite
distance = (0.45 * (Conductor.songPosition - strumTime) * songSpeed * multSpeed);
if (!myStrum.downScroll) distance *= -1;

if(animation != null && animation.curAnim != null && animation.curAnim.name.endsWith('end'))
{
y -= height-2;
if (!prevNoteIsSustainNote) //only for really short sustains that only have an end and no regular parts
{
y += height*0.25; //move back down slightly into the note
}
}

if(copyScale && isSustainNote)
//scale.set(myStrum.scale.x, myStrum.scale.y);
if (!dumbHitboxThing)
updateHitbox();

var angleDir = strumDirection * Math.PI / 180;
if (copyAngle)
angle = strumDirection - 90 + strumAngle + offsetAngle;
Expand Down Expand Up @@ -623,16 +643,4 @@ class Note extends FlxSprite
clipRect = swagRect;
}
}

@:noCompletion
override function set_clipRect(rect:FlxRect):FlxRect // original fix by Ne_Eo
{
if (rect != null)
clipRect = rect;

if (frames != null)
frame = frames.frames[animation.frameIndex];

return rect;
}
}
Loading

1 comment on commit e7f8e4d

@Stefan2008Git
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me when I didn't asked for permission before on Denpa Engine @JordanSantiagoYT

Please sign in to comment.