-
Notifications
You must be signed in to change notification settings - Fork 931
Towners tsv #8288
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
base: master
Are you sure you want to change the base?
Towners tsv #8288
Conversation
- Add townerdat.cpp/hpp for loading towner data from TSV files - Add towners.tsv with towner definitions (position, animation, gossip) - Add quest_dialog.tsv with quest dialog mappings - Supports loading towner properties from data files instead of hardcoded values
- Replace hardcoded towner data with TSV-based loading - Add InitTownerFromData() for default initialization from TSV entries - Update InitTowners() to load data from TSV files - Maintain special initialization for cows and cow farmer - Add TownerBehaviors lookup table for O(1) behavior access - Store animation order data with stable addresses for span usage
- Replace QuestDialogTable direct access with GetTownerQuestDialog() - Replace QuestDialogTable assignments with SetTownerQuestDialog() - Update quests.cpp to use new quest dialog API - Update stores.cpp to use new quest dialog API in StartTalk() and TalkEnter() - Quest dialog data now loaded from quest_dialog.tsv
- Add townerdat.cpp to Source/CMakeLists.txt - Add towner TSV files to CMake/Assets.cmake - Add townerdat_test to CMake/Tests.cmake - Add test fixtures for towner TSV files - Add townerdat_test.cpp for testing towner data loading
c66015c to
a084180
Compare
| /** | ||
| * @brief Finds the towner data entry from TSV for a given type. | ||
| */ | ||
| [[maybe_unused]] const TownerDataEntry *FindTownerDataEntry(_talker_id type, Point position = {}) |
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.
Seems this is a debug only function?
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.
Yes, it is only called inside DebugTalkToTowner.
I don't know the best way to deal with that.
|
@AJenbo I tried to make this logic more dynamic but I think I went too far. Please don't merge yet. Let me test Hellfire properly first. |
4cb0b85 to
aaa46a4
Compare
befe238 to
800dfd8
Compare
cad3b36 to
54d310e
Compare
|
@AJenbo so far I didn't find any issues. I think it's good now. |
Move towners to TSV file.