Game saves when exiting to the main menu or quitting the game in general. Rings are now properly in the Accessories tab instead of the equipment tab. Fixed using == comparison instead of bitwise AND comparisons for accessory detection.
This commit is contained in:
parent
ad1e2260cf
commit
cf6185bb50
@ -2076,6 +2076,9 @@ bool Crawler::IsReflectiveTile(TilesheetData tileSheet,int tileID){
|
||||
}
|
||||
|
||||
bool Crawler::OnUserDestroy(){
|
||||
if(GameState::STATE!=GameState::states[States::MAIN_MENU]){ //If we're on the main menu, we don't have a save file loaded. So we would skip saving the game.
|
||||
SaveFile::SaveGame();
|
||||
}
|
||||
GFX.Reset();
|
||||
for(auto&[key,value]:MAP_DATA){
|
||||
if(MAP_DATA[key].optimizedTile!=nullptr){
|
||||
|
@ -1033,13 +1033,13 @@ const bool EnhancementInfo::CanBeEnhanced()const{
|
||||
|
||||
|
||||
const bool ItemInfo::IsWeapon()const{
|
||||
return slot==EquipSlot::WEAPON;
|
||||
return slot&EquipSlot::WEAPON;
|
||||
}
|
||||
const bool ItemInfo::IsArmor()const{
|
||||
return IsEquippable()&&!IsWeapon()&&!IsAccessory();
|
||||
}
|
||||
const bool ItemInfo::IsAccessory()const{
|
||||
return slot==EquipSlot::RING1||slot==EquipSlot::RING2;
|
||||
return slot&EquipSlot::RING1||slot&EquipSlot::RING2;
|
||||
}
|
||||
|
||||
const bool Item::IsWeapon()const{
|
||||
|
@ -40,6 +40,7 @@ All rights reserved.
|
||||
#include "Crawler.h"
|
||||
#include "CharacterRotatingDisplay.h"
|
||||
#include "ClassInfo.h"
|
||||
#include "SaveFile.h"
|
||||
|
||||
INCLUDE_game
|
||||
INCLUDE_GFX
|
||||
@ -58,6 +59,7 @@ void Menu::InitializeOverworldMenuWindow(){
|
||||
overworldMenuWindow->ADD("Settings Button",MenuComponent)({{4,12+28*3},{88,24}},"Settings",[](MenuFuncData data){/*Menu::OpenMenu(SETTINGS_MENU);*/return true;})END;
|
||||
overworldMenuWindow->ADD("Quit Button",MenuComponent)({{4,12+28*4},{88,24}},"Quit Game",[](MenuFuncData data){
|
||||
Menu::CloseAllMenus();
|
||||
SaveFile::SaveGame();
|
||||
game->ResetGame();
|
||||
return true;
|
||||
})END;
|
||||
|
@ -39,7 +39,7 @@ All rights reserved.
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 2
|
||||
#define VERSION_PATCH 1
|
||||
#define VERSION_BUILD 5256
|
||||
#define VERSION_BUILD 5260
|
||||
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
|
@ -3,7 +3,7 @@ Equipment
|
||||
Ring of the Slime King
|
||||
{
|
||||
Slot = Ring1,Ring2
|
||||
ItemCategory = Equipment
|
||||
ItemCategory = Accessories
|
||||
|
||||
# See ItemStats.txt for valid stat names
|
||||
StatValues = Health,Attack,Mana,Move Spd %
|
||||
@ -15,7 +15,7 @@ Equipment
|
||||
Ring of the Bear
|
||||
{
|
||||
Slot = Ring1,Ring2
|
||||
ItemCategory = Equipment
|
||||
ItemCategory = Accessories
|
||||
|
||||
# See ItemStats.txt for valid stat names
|
||||
StatValues = Health,Attack,Mana
|
||||
|
Loading…
x
Reference in New Issue
Block a user