Skip to content

Commit

Permalink
rename get_savegame, fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Auto committed Dec 14, 2024
1 parent 68cf5c9 commit 55bba79
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/game_api/game_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ class JournalPeopleData : public JournalPageData
bool killed_by_NA;
bool defeated_NA;
// uint16_t padding;
TEXTURE portret_texture;
TEXTURE portrait_texture;
};

// probably same as JournalPeopleData, just not using portret_texture
// probably same as JournalPeopleData, just not using portrait_texture
class JournalBestiaryData : public JournalPageData
{
public:
Expand Down Expand Up @@ -109,7 +109,7 @@ struct SaveRelated
game_unordered_map<ENT_TYPE, StickersData> stickers_data;

/// Gets local version of the SaveData
SaveData* get_SaveData()
SaveData* get_savegame()
{
return savedata.decode_local();
}
Expand Down
19 changes: 10 additions & 9 deletions src/game_api/script/usertypes/game_manager_lua.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
#include <type_traits> // for move, declval
#include <utility> // for min, max

#include "game_manager.hpp" // for GameManager, JournalPopupUI, GameProps
#include "memory.hpp" // for memory_read TODO:temp
#include "savedata.hpp" // for SaveData
#include "screen.hpp" // IWYU pragma: keep
#include "script/sol_helper.hpp" // for ZeroIndexArray
#include "containers/game_allocator.hpp" // for game_allocator
#include "game_manager.hpp" // for GameManager, JournalPopupUI, GameProps
#include "memory.hpp" // for memory_read TODO:temp
#include "savedata.hpp" // for SaveData
#include "screen.hpp" // IWYU pragma: keep
#include "script/sol_helper.hpp" // for ZeroIndexArray

namespace NGM
{
Expand Down Expand Up @@ -102,8 +103,8 @@ void register_usertypes(sol::state& lua)
&SaveRelated::trap_part_to_main,
"stickers_data",
&SaveRelated::stickers_data,
"get_SaveData",
&SaveRelated::get_SaveData);
"get_savegame",
&SaveRelated::get_savegame);

/// Used in SaveRelated
lua.new_usertype<JournalPageData>(
Expand Down Expand Up @@ -148,8 +149,8 @@ void register_usertypes(sol::state& lua)
&JournalPeopleData::killed_by_NA,
"defeated_NA",
&JournalPeopleData::defeated_NA,
"portret_texture",
&JournalPeopleData::portret_texture,
"portrait_texture",
&JournalPeopleData::portrait_texture,
sol::base_classes,
sol::bases<JournalPageData>());

Expand Down

0 comments on commit 55bba79

Please sign in to comment.