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

Changed verb syncing to work closer like IThingHolder #412

Commits on Jan 3, 2024

  1. Changed verb syncing to work closer like IThingHolder

    One of the changes I've proposed in rwmt#411, without any API implementation.
    
    List of changes:
    - `VerbOwnerType` enum was removed and replaced by `supportedVerbOwnerTypes` array
    - The array includes `typeof(Thing)` in stead of `typeof(Pawn)` for increased compatibility
    - `IVerbOwner` sync worker entry was added
    - `Verb` sync worker entry was modified to sync the owner as `IVerbOwner`
    
    Those changes should result in greater compatibility, as new supported `IVerbOwner` types can now be added to the array and synced using their own sync workers.
    
    This should also end up simplifying `Verb` sync worker going forward, as we won't have to expand it anymore in the future - only the array of supported types.
    
    Things that I did not include, but we may want to potentially consider:
    - Add more vanilla types to the list of supported verb owners, which could include:
      - `HediffComp` (specifically for `HediffComp_VerbGiver`) - however, in vanilla RW they don't have gizmos, but a mod could add a comp that adds one
      - `Pawn_MeleeVerbs_TerrainSource` - likely will never gizmos, probably will be completely pointless to include
      - `Pawn_NativeVerbs` - same as above
    - Automatically including all subtypes of `IVerbOwner` which have an explicit sync worker
      - Would simplify mod compat, as mods would (likely) never need to modify the list of supported verb owners
      - Could have potentially unintended consequences?
    SokyranTheDragon committed Jan 3, 2024
    Configuration menu
    Copy the full SHA
    269709e View commit details
    Browse the repository at this point in the history

Commits on Jan 7, 2024

  1. IVerbOwner, ISelectable - support all implementations by default

    I've placed `IVerbOwner` sync worker in the `Interfaces` region, which I've placed at the very bottom. This is due to issues with syncing `IVerbOwner` - for example, trying to sync a `Pawn` caused it to be synced as `IVerbOwner`, which caused it to be recursively synced as `IVerbOwner` until the game crashed.
    
    Placing it lower fixed the issue.
    SokyranTheDragon committed Jan 7, 2024
    Configuration menu
    Copy the full SHA
    6a96199 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f1e4095 View commit details
    Browse the repository at this point in the history