-
Notifications
You must be signed in to change notification settings - Fork 290
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
Debug menu can look across z levels and reset ignored messages #2025
Merged
Coolthulhu
merged 1 commit into
cataclysmbnteam:upload
from
joveeater:debug-improvements
Oct 20, 2022
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6651,21 +6651,21 @@ void game::pre_print_all_tile_info( const tripoint &lp, const catacurses::window | |
print_all_tile_info( lp, w_info, area_name, 1, first_line, last_line, cache ); | ||
} | ||
|
||
cata::optional<tripoint> game::look_around() | ||
cata::optional<tripoint> game::look_around( bool force_3d ) | ||
{ | ||
tripoint center = u.pos() + u.view_offset; | ||
look_around_result result = look_around( /*show_window=*/true, center, center, false, false, | ||
false ); | ||
false, false, tripoint_zero, force_3d ); | ||
return result.position; | ||
} | ||
|
||
look_around_result game::look_around( bool show_window, tripoint ¢er, | ||
const tripoint &start_point, bool has_first_point, bool select_zone, bool peeking, | ||
bool is_moving_zone, const tripoint &end_point ) | ||
bool is_moving_zone, const tripoint &end_point, bool force_3d ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That signature got really ugly. 5 |
||
{ | ||
bVMonsterLookFire = false; | ||
// TODO: Make this `true` | ||
const bool allow_zlev_move = m.has_zlevels() && get_option<bool>( "FOV_3D" ); | ||
const bool allow_zlev_move = m.has_zlevels() && ( get_option<bool>( "FOV_3D" ) || force_3d ); | ||
|
||
temp_exit_fullscreen(); | ||
|
||
|
@@ -6750,8 +6750,10 @@ look_around_result game::look_around( bool show_window, tripoint ¢er, | |
#endif // TILES | ||
|
||
const int old_levz = get_levz(); | ||
const int min_levz = std::max( old_levz - fov_3d_z_range, -OVERMAP_DEPTH ); | ||
const int max_levz = std::min( old_levz + fov_3d_z_range, OVERMAP_HEIGHT ); | ||
const int min_levz = force_3d ? -OVERMAP_DEPTH : std::max( old_levz - fov_3d_z_range, | ||
-OVERMAP_DEPTH ); | ||
const int max_levz = force_3d ? OVERMAP_HEIGHT : std::min( old_levz + fov_3d_z_range, | ||
OVERMAP_HEIGHT ); | ||
|
||
m.update_visibility_cache( old_levz ); | ||
const visibility_variables &cache = m.get_visibility_variables_cache(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 one is great, I wasted a ton of time "emulating" it by switching 3D fov on just for one teleport.