-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Even more refactor #411
base: main
Are you sure you want to change the base?
Even more refactor #411
Conversation
… save/load save state saving/loading from/to slot 5 which is not guaranteed to be the main after online session
…move `read_prng` and some `get_frame_count` from `State`, remove `get_frame_count` from rpc
…quidOutOfBoundsBugfix`
…s`, `set_pause`, `get_offset` from the `State`
…o `remove_liquid_oob`, move `API::init` to the end of state.cpp
…nctions in state.hpp to namespace
…d` to `StateMemory::get_entity`, move the rest of the function to the `API` namespace
@@ -472,13 +468,13 @@ void UI::update_floor_at(float x, float y, LAYER l) | |||
if (uid == -1) | |||
return; | |||
auto ent = get_entity_ptr(uid); | |||
if ((ent->type->search_flags & 0x100) == 0 || !test_flag(ent->flags, 3)) | |||
if (!(ent->type->search_flags & ENTITY_MASK::FLOOR) || !test_flag(ent->flags, 3)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this fine, or should i be using != ENTITY_MASK::X
wherever possible?
|
||
if (rec_mode == RECURSIVE_MODE::EXCLUSIVE) | ||
{ | ||
if (mask.has_value() && (acutal_mask(mask.value()) & ent->type->search_flags) != 0) | ||
if (mask.has_value() && !!(actual_mask(mask.value()) & ent->type->search_flags)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This approach !!
is very debatable online, so I'm just highlighting it beforehand.
The only alternative I think is using function for it
…on definitions to the `deprecated_lua.cpp`, move some simple function definitions from rpc to entity and state lua
…set_drop_chance`, remove some more functions from rpc, move update_state function to state
…` version for exposing them
…with added warning for online
With this, files are more or less around 1k lines
|
Looking for way to reduce
lua_vm.cpp
size. Maybe alsorpc.cpp
and other things that feel usefullContinuation of #407