-- Upgrade Notification --

-- ABOUT: Instead of a super form, FL Chan will get permanent upgrades to her abilites, so this will notify the player as soon as the Emeralds are collected.

if srb2p return end -- If we're in SRB2P, this will end the code

addHook("ThinkFrame", function()
	for player in players.iterate do -- For every player out there...
		if player.mo.skin ~= "flchan" then // If the player is FL Chan...
			continue -- Continues the code
		end
		
		if (All7Emeralds(emeralds)) and not player.flnotified // If the player gets all Emeralds and isn't notified yet...
			player.flnotified = true -- Activates the code for only one frame
			S_StartSound(player.mo, sfx_zelda) -- Plays the Zelda sound
			COM_BufInsertText(player, "cechoduration 5") -- The main message will stay on screen for 5 seconds
			COM_BufInsertText(player, "cecho Congrats on getting those emeralds!\\ Check the console for more info on\\ FL Chan's upgrades!") -- The main message
			print("\x83\FL Chan Emerald Upgrades:", "\x87\Slow Fall: \x80\You can now perform this ability multiple times per jump. Swimming will remain unaffected.", -- The console information
			"\x87\Mic Drop: \x80\Mics will now create larger shockwaves and you'll now gain extra height when using this ability in midair.",
			"\x87\Kaboom Box: \x80\Kaboom Boxes will now create larger sound blasts when detonated manually and you'll now be sent higher in the air when using the Kaboom Box's passive.")
		end
		
		if (All7Emeralds(emeralds))
			player.mo.flchanupgraded = 1
		else
			player.mo.flchanupgraded = 0
		end
	end
end)