-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Let objects be declared as abstract even if they contain no members #61
Comments
If the generalization objects don't add any member, why are they needed then? |
Mostly, modders are expected to inherit from the generalization object for a specialized case and not use the generalization object itself. For example, in AoE2 we derive the stances DiplomaticAbility(Ability):
diplomatic_stances : set(DiplomaticStance) It should only be possible to add |
And |
Example:
|
Turns out this only solves the problem for sets. We have situations in the API where a member has the Example:
The |
Possible solution: Another container type like
|
I've created #65 to track this feature. |
According to the specification, nyan objects "remain abstract until all members have values" ("A
nyan::Object
is "abstract" iff it contains at least one undefined member"). Some of the openage API objects would require objects to be abstract that contain no members. These objects are often used as generalization objects that should be inherited from, but not be used on their own.Examples :
GameEntityType
,DiplomaticStance
,TradeRoute
,DropoffType
Proposed solution: Use the same idea as in #58 and introduce parameters for sets. In this case the definition could look like this:
set(typename, only_children=True)
For single references, use a new
child
container type:child(typename)
The text was updated successfully, but these errors were encountered: