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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user