Closed PatrikLundell closed 1 month ago
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.
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.