Skip to content
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

Pull request for sample_npc.h, sample_npc.c, genstruct.c, and default_room #639

Open
wants to merge 47 commits into
base: dev
Choose a base branch
from

Conversation

navila-luna
Copy link
Contributor

@navila-luna navila-luna commented May 25, 2020

Pull request for the inclusion of sample_npc.h and sample_npc.c. In addition, modifications to the genstruct.h and default_room.c file More information about the application of the sample_npc module can be found in issues #562 and #563

@navila-luna navila-luna added enhancement New feature or request x/rpg-openworld RPG feature random world/room generation labels May 25, 2020
@navila-luna navila-luna self-assigned this May 25, 2020
@dwahme
Copy link
Contributor

dwahme commented May 25, 2020

Hey, for some reason this includes a bunch of changes to WDL files- specifically, include/wdl/validate.h, src/wdl/src/load_game.c, src/wdl/src/parse.c, src/wdl/src/validate.c,. and tests/wdl/test_validation.c. You should undo those changes

@navila-luna navila-luna changed the title Openworld/samples npcs Pull request for sample_npc.h, sample_npc.c, genstruct.c, and default_room May 25, 2020
@navila-luna navila-luna changed the base branch from master to dev May 25, 2020 19:22
Copy link
Contributor

@edward3-uchi edward3-uchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good! I'm worried that you might be experiencing some sort of compile problem that is stopping you from including files properly. Also, there has been quite a few changes to gen_structs.h. I know you make some changes to the structs as well, but a few of the definitions dont exist anymore. Besides for that, the npc files look good! Just make sure to not have tab characters and use 4 spaces for each new line!

CMakeLists.txt Outdated Show resolved Hide resolved
include/openworld/default_items.h Outdated Show resolved Hide resolved
include/openworld/default_rooms.h Outdated Show resolved Hide resolved
include/openworld/gen_structs.h Outdated Show resolved Hide resolved
include/openworld/gen_structs.h Outdated Show resolved Hide resolved
src/openworld/src/gen_structs.c Outdated Show resolved Hide resolved
src/openworld/src/gen_structs.c Outdated Show resolved Hide resolved
tests/openworld/CMakeLists.txt Outdated Show resolved Hide resolved
tests/openworld/test_items.c Outdated Show resolved Hide resolved
tests/openworld/test_rooms.c Outdated Show resolved Hide resolved
Copy link
Contributor

@dwahme dwahme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you submit or review a PR, please check the diff output for all the changes that were made- many of my comments could have been avoided

About 1500 of the 1900 lines changed in this PR were spaces being converted to tabs (which is not allowed in the chiventure style guide). It's much harder to focus on both the design and technical details of the code when seeing there other changes, which means that more in-depth passes will need to be made

include/openworld/default_npcs.h Outdated Show resolved Hide resolved
include/openworld/default_npcs.h Outdated Show resolved Hide resolved
include/openworld/default_npcs.h Outdated Show resolved Hide resolved
include/openworld/default_npcs.h Outdated Show resolved Hide resolved
include/openworld/default_rooms.h Outdated Show resolved Hide resolved
tests/openworld/test_autogenerate.c Outdated Show resolved Hide resolved
tests/openworld/test_autogenerate.c Outdated Show resolved Hide resolved
tests/openworld/test_autogenerate.c Outdated Show resolved Hide resolved
Comment on lines +34 to +39
HASH_FIND_STR(tmp, "olive", item);
cr_assert_str_eq(item->short_desc, "a black olive");
cr_assert_str_eq(item->long_desc, "A singular, unrefrigerated black olive");
}

}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove changes made to other files if they aren't a part of this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure what because the merge conflict wasn't very clear (specific lines, some even just two lines) if they were old or new so i just replace it with what bryan had pr for which had all tests passing and working.

tests/openworld/test_structs.c Outdated Show resolved Hide resolved
@navila-luna
Copy link
Contributor Author

Ok so far, I have done the majority of the suggestion(spaces, spelling, comments, and tests). I have yet to change the function I npc_lookup. I'm still trying to figure out what is meant by adding the npc name instead of a pointer. I'm thinking that strncpy could work.

@dwahme
Copy link
Contributor

dwahme commented Jun 8, 2020

A number of my comments from the previous pass at the PR have not been addressed yet, and most of them relate to using tabs as indentation. Additionally, it looks like there are more places where this is the case, or other cases where whitespace and styling have been modified.

Again, please check the diff output for all the changes that were made during this pull request- this is under the "files" tab for this PR. As it stands right now, the amount of changes to the code due to whitespace is keeping me from performing an in-depth review of both design and technical implementation of the code, which is a requirement for me to approve this PR. There's about 1800 lines of changes in this PR, but I'd estimate about 1200 of them are just whitespace issues

It appears so that whenever I'm editing, since rn i'm editing through git hub that it puts it tabbing even when i did spaces.
I find it a bit weird that there were tab issues here as i only modified the room spec struct fixed a merge conflict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request x/rpg-openworld RPG feature random world/room generation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Design and implement a mock "sample_npc.h" module Create predefined sample NPCs for the Algorithm generation
4 participants