Opened 9 years ago
Closed 8 years ago
#353 closed defect (fixed)
Handle unloaded units being referenced outside factory
Reported by: | ibboard | Owned by: | ibboard |
---|---|---|---|
Priority: | major | Milestone: | WarFoundry API 0.2 |
Component: | WarFoundry-API | Version: | Trunk |
Keywords: | Cc: | ||
Blocked By: | Blocking: | #351 |
Description
Now that we're handling requirements then the Race factory is handing work off to other factories. These other factories have to make certain assumptions about how they can work (e.g. they have to assume that they could be working with any factory). These assumptions cause problems when it comes to requirements referencing units that haven't been loaded yet - Race.GetUnitType(id)
fails because the load has been triggered but the unit isn't loaded yet, so it returns a null.
We can't just wait for loading to complete before Race.GetUnitType(id)
completes, because that would hang the factory. Instead, we need to standardise things so that external factories can use the Race factory to get at objects.
Change History (6)
comment:1 Changed 9 years ago by
Owner: | set to ibboard |
---|---|
Status: | new → accepted |
In [951]: