Skip to content

Commit

Permalink
fix bad virtual
Browse files Browse the repository at this point in the history
  • Loading branch information
Dregu committed Oct 8, 2023
1 parent 6e96eae commit 0579776
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/game_api/entities_floors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class Door : public Floor
/// Returns the darkest light level used to fade the entity when entering or exiting. 0 = black, 1 = no change
virtual float light_level() = 0;
/// Should we display the button prompt when collided by player. Will always return `true` for exits, layers and others that the game never locks, even if you lock it with `unlock` function
virtual bool is_unlocked(Entity* player) = 0;
virtual bool is_unlocked() = 0;
/// Can the door actually be entered by player. Overrides the button prompt too if false.
virtual bool can_enter(Entity* player) = 0;
};
Expand Down
2 changes: 1 addition & 1 deletion src/game_api/script/usertypes/vtables_lua.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void register_usertypes(sol::state& lua)
VTableEntry<"hide_ui", 41, float(Entity*)>,
VTableEntry<"enter", 42, uint8_t(Entity*)>,
VTableEntry<"light_level", 44, float()>,
VTableEntry<"is_unlocked", 45, bool(Entity*)>,
VTableEntry<"is_unlocked", 45, bool()>,
VTableEntry<"can_enter", 46, bool(Entity*)>>;
static DoorVTable door_vtable(lua, lua["Door"], "ENTITY_OVERRIDE");

Expand Down

0 comments on commit 0579776

Please sign in to comment.