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

Command polish #8

Merged
merged 20 commits into from
Aug 7, 2023
Merged

Command polish #8

merged 20 commits into from
Aug 7, 2023

Commits on Aug 7, 2023

  1. Prefer double quotes

    Consistently use double quotes throughout code.
    Yochien committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    b57f25b View commit details
    Browse the repository at this point in the history
  2. Simplify argument validation

    Removes some unnecessary and confusing nesting based around validating command arguments.
    Yochien committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    c78ee75 View commit details
    Browse the repository at this point in the history
  3. Update status command's description

    Reflects the commands ability to display status for multiple NPCs.
    Yochien committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    3c1689f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    75a939b View commit details
    Browse the repository at this point in the history
  5. Improve readability of main loop control flow

    Removing continue makes following the flow of control of the main loop more obvious.
    Yochien committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    69c50a4 View commit details
    Browse the repository at this point in the history
  6. Allow NPC rank to be removed

    Use numbers 0 or below to reset NPC rank. Bounds all negative ranks to 0, so all negative values have the same ranking as 0.
    
    The distinction between ranked or not could help establish which NPCs are active in the encounter or not.
    Yochien committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    8def0ee View commit details
    Browse the repository at this point in the history
  7. Improve NPC class str method readability

    This commit makes it more clear what the final output should look like and why.
    Yochien committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    a2244f3 View commit details
    Browse the repository at this point in the history
  8. Code styling on attack and smite commands

    Minor stylistic changes in preparation for changing rank command behavior.
    Yochien committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    5ec1ed3 View commit details
    Browse the repository at this point in the history
  9. Perform error checking on bestiary load

    Uses the YAML file format instead of a home grown CSV format. This allows for use of the robust PyYAML parser for loading objects from a file.
    
    This commit also performs some basic error checking to keep the program from hard crashing when encountering some kind of syntactical error in the provided YAML file.
    Yochien committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    1452c5a View commit details
    Browse the repository at this point in the history
  10. Implement add all

    This commit implements the all selector for the add command. This commit also provides better error messages in the case the user provides a non integer for a selector index.
    Yochien committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    3f42638 View commit details
    Browse the repository at this point in the history
  11. Remove unused constant

    No longer needed after modifying load behavior.
    Yochien committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    dcda886 View commit details
    Browse the repository at this point in the history
  12. Output number of loaded NPCs

    Gives an indication of load status success automatically.
    Yochien committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    b513739 View commit details
    Browse the repository at this point in the history
  13. Make command error methods static

    This method did not need to differ per instance and did not rely on any class attributes.
    Yochien committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    0a225ff View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    9052398 View commit details
    Browse the repository at this point in the history
  15. Display NPC marked status

    This behavior regressed after rewrite of NPC.__str__
    Yochien committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    e52a8ef View commit details
    Browse the repository at this point in the history
  16. Make NPC display and status unique

    The NPC.__str__ method used for displaying NPCs in menus is somewhat simplified by hiding NPC base type if the NPC has a nickname.
    
    The status command now reveals the NPC base type and note details.
    Yochien committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    9bc78c0 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    ef7f93a View commit details
    Browse the repository at this point in the history
  18. Move rank sorting responsibility to main

    Sorts list after every operation meaning ordering can be maintained if other commands cause side effects that change the overall NPC ordering.
    Yochien committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    12308e0 View commit details
    Browse the repository at this point in the history
  19. Reset rank on death

    Effective rank is set to 0 on death. Rank can be edited after death. Effective rank will be restored on revive.
    Yochien committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    626bc25 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    7f7bd3a View commit details
    Browse the repository at this point in the history