From ec2a16b02576df927d2e66d939c8c2827d151178 Mon Sep 17 00:00:00 2001 From: craftersshaft Date: Thu, 27 May 2021 14:22:57 -0400 Subject: [PATCH] health dies yay --- source/ModchartState.hx | 1 - source/PlayState.hx | 20 +------------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/source/ModchartState.hx b/source/ModchartState.hx index 4c2ac07..7c8df78 100644 --- a/source/ModchartState.hx +++ b/source/ModchartState.hx @@ -328,7 +328,6 @@ class ModchartState // get some fukin globals up in here bois setVar("difficulty", PlayState.storyDifficulty); - setVar("health", PlayState.instance.health); setVar("bpm", Conductor.bpm); setVar("scrollspeed", FlxG.save.data.scrollSpeed != 1 ? FlxG.save.data.scrollSpeed : PlayState.SONG.speed); setVar("fpsCap", FlxG.save.data.fpsCap); diff --git a/source/PlayState.hx b/source/PlayState.hx index f64a4e4..ecf029c 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -125,7 +125,7 @@ class PlayState extends MusicBeatState private var curSong:String = ""; private var gfSpeed:Int = 1; - public var health:Float = 1; //making public for modchart's sake, but things could go wrong + private var health:Float = 1; private var combo:Int = 0; public static var misses:Int = 0; private var accuracy:Float = 0.00; @@ -1833,9 +1833,6 @@ class PlayState extends MusicBeatState if (health > 2) health = 2; - #if windows - if (executeModchart && luaModchart != null){luaModchart.setVar('health', health);}; - #end if (healthBar.percent < 20) iconP1.animation.curAnim.curFrame = 1; else @@ -2364,9 +2361,6 @@ class PlayState extends MusicBeatState else { health -= 0.075; - #if windows - if (executeModchart && luaModchart != null){ luaModchart.setVar('health', health);}; - #end vocals.volume = 0; if (theFunne) noteMiss(daNote.noteData, daNote); @@ -2562,9 +2556,6 @@ class PlayState extends MusicBeatState combo = 0; misses++; health -= 0.2; - #if windows - if (executeModchart && luaModchart != null){ luaModchart.setVar('health', health);}; - #end ss = false; shits++; if (FlxG.save.data.accuracyMod == 0) @@ -2573,9 +2564,6 @@ class PlayState extends MusicBeatState daRating = 'bad'; score = 0; health -= 0.06; - #if windows - if (executeModchart && luaModchart != null){ luaModchart.setVar('health', health);}; - #end ss = false; bads++; if (FlxG.save.data.accuracyMod == 0) @@ -2587,17 +2575,11 @@ class PlayState extends MusicBeatState goods++; if (health < 2) health += 0.04; - #if windows - if (executeModchart && luaModchart != null){ luaModchart.setVar('health', health);}; - #end if (FlxG.save.data.accuracyMod == 0) totalNotesHit += 0.75; case 'sick': if (health < 2) health += 0.1; - #if windows - if (executeModchart && luaModchart != null){ luaModchart.setVar('health', health);}; - #end if (FlxG.save.data.accuracyMod == 0) totalNotesHit += 1; sicks++;