Skip to content

Game- and cluster-update methods should not depend on class name matching #1

Description

@tsebring

Change game and cluster update methods not to depend on game object identification flags that are set based on full or partial class name matching.

Game objects contain little information to tell us what kind they are, guessing based on class name will always be required but should be minimized to improve compatibility with mods.

Code

var statusComponents = objects.Where(x => x.IsDinoStatusComponent).ToDictionary(x => x.ObjectId, x => x);

Should be

var statusComponents = objects.Where(x => x.IsStatusComponent).ToDictionary(x => x.ObjectId, x => x);
// or...
var objectMap = objects.ToDictionary(x => x.ObjectId, x => x);

etc.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions