You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Look for tripoints in activity_actor.cpp and convert the code to use typed tripoint, including the change of the operations called (which typically resulted in a typed overload).
Describe alternatives you've considered
Testing
Loaded a save and walked until a monster was detected.
Additional context
I've gotten the help I needed with the issues mentioned here previously, so this is now ready for review. Many thanks @Qrox.
In messages.h I tried to add a typed template along the untyped one (commented out with //###) but trying to use that causes linking errors with complaints about definitions already being present in fake_messages (which seems to be a lie, at least based on the cpp file).
Not sure why that happens, but I think you do need to add implementations of the newly added functions to tests/fake_messages.cpp so that the unit test can compile. (fake_messages.cpp is used to replace messages.cpp in the unit test.)
Trying to use the creature_tracker.h creature_at template for tripoint_bub_ms (already defined in master, so not of my doing) causes linking problems with rather unhelpful error messages.
It seems the required instantiation is not declared in creature_tracker.cpp.
The tripoint_bub_ms overloads for npc, avatar, Character, and const Creature are not instantiated. For example, the Creature overload should be template const Creature *creature_tracker::creature_at<Creature>( const tripoint_bub_ms &, bool ) const; and added after line 467.
This file contains hidden or 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
astyledastyled PR, label is assigned by github actionsBasicBuildPassedThis PR builds correctly, label assigned by github actionsBionicsCBM (Compact Bionic Modules)[C++]Changes (can be) made in C++. Previously named `Code`Code: TestsMeasurement, self-control, statistics, balancing.Crafting / Construction / RecipesIncludes: Uncrafting / DisassemblingItems: ContainersThings that hold other thingsjson-styledJSON lint passed, label assigned by github actionsMap / MapgenOvermap, Mapgen, Map extras, Map displayNPC / FactionsNPCs, AI, Speech, Factions, OwnershipVehiclesVehicles, parts, mechanics & interactions
3 participants
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.
Summary
None
Purpose of change
Use typed tripoints in another piece of code.
Describe the solution
Look for tripoints in activity_actor.cpp and convert the code to use typed tripoint, including the change of the operations called (which typically resulted in a typed overload).
Describe alternatives you've considered
Testing
Loaded a save and walked until a monster was detected.
Additional context
I've gotten the help I needed with the issues mentioned here previously, so this is now ready for review. Many thanks @Qrox.