dmlary / morrow

Ruby ECS-based MUD server
MIT License
4 stars 1 forks source link

EntityManager: incorrect merging of bases when modification is in grandparent #90

Open dmlary opened 4 years ago

dmlary commented 4 years ago

Given the following entities:

- id: spec:collide/result
  base:
  - 'spec:collide/left'
  - 'spec:collide/right'

- id: spec:collide/left
  base: spec:collide/left_parent
  components:
  - viewable:
      short: from left

- id: spec:collide/left_parent

- id: spec:collide/right
  base: spec:collide/right_parent

- id: spec:collide/right_parent
  components:
  - viewable:
      short: from right parent

We would expect spec:collide/result to have short description from right parent, but currently it gives the value from left.

[1] pry(Morrow::Console)> entity_short('spec:collide/result')
=> "from left"