Make Unlock All button actually unlock every node. Allow tile fade groups to specify tiles that should be unhidden. NPCs have unlock conditions now. Layers have unlock conditions.

This commit is contained in:
2024-01-29 22:25:32 -06:00
parent 7a41361710
commit 390e7fefbf
17 changed files with 402 additions and 190 deletions
+3 -2
View File
@@ -43,6 +43,7 @@ All rights reserved.
#include "DEFINES.h"
#include "olcUTIL_DataFile.h"
#include "Unlock.h"
#include "State_OverworldMap.h"
INCLUDE_DATA
INCLUDE_game
@@ -53,8 +54,8 @@ void Menu::InitializeSettingsWindow(){
Menu*settingsWindow=CreateMenu(SETTINGS,CENTERED,windowSize);
settingsWindow->ADD("Unlock All Button",MenuComponent)(geom2d::rect<float>{{4,4},{72,12}},"Unlock All",[](MenuFuncData data){
for(auto&[key,size]:DATA["Levels"]){
Unlock::UnlockArea(key);
for(auto&cp:State_OverworldMap::connections){
Unlock::UnlockArea(cp.map);
}
SoundEffect::PlaySFX("Buy Item",SoundEffect::CENTERED);
return true;