Constructor
new Family()
- Source:
Properties:
| Name | Type | Description |
|---|---|---|
parent |
Character | The parent character who heads this family. Always a woman because we trace kinship matrilinearly during generation. |
generation |
number | The generation number of this family (1 for the founding generation, 2 for parents with children, and so forth). |
familyName |
string | The surname shared by members of this family, derived from the male partner’s last name of the original parent. Actual people in the family will have different names for all the normal reasons. |
members |
Array.<Character> | All characters in the family. |
Extends
Members
guid
- Description:
A unique identifier for this model instance.
- Source:
- Overrides:
Properties:
| Name | Type | Description |
|---|---|---|
guid |
String |
A unique identifier for this model instance.
tags
- Description:
An array of string tags that characterize this item.
- Source:
- Overrides:
Properties:
| Name | Type | Description |
|---|---|---|
tags |
Set |
An array of string tags that characterize this item.
Methods
asJSON() → {String}
- Description:
Converts the model to JSON, converting sets to arrays.
- Source:
- Overrides:
Returns:
JSON
- Type
- String
has(tag) → {Boolean}
- Description:
Does this model have the given tag?
- Source:
- Overrides:
Parameters:
| Name | Type | Description |
|---|---|---|
tag |
String |
Returns:
true if it does, false otherwise
- Type
- Boolean
is(tag) → {Boolean}
- Description:
Does this model have the given tag?
- Source:
- Overrides:
- Deprecated:
- Use has() instead
Parameters:
| Name | Type | Description |
|---|---|---|
tag |
String |
Returns:
true if it does, false otherwise
- Type
- Boolean
matches(model) → {Boolean}
- Description:
Compares this model to another for value equality, ignoring their guids. Two independently-created models with the same properties (e.g. two identical items generated separately) will match even though they have different guids.
- Source:
- Overrides:
Parameters:
| Name | Type | Description |
|---|---|---|
model |
Model |
Returns:
true if the models are equal in every respect except guid
- Type
- Boolean
not(tag) → {Boolean}
- Description:
Does this model not have the given tag?
- Source:
- Overrides:
Parameters:
| Name | Type | Description |
|---|---|---|
tag |
String |
Returns:
true if it does not have the tag, false otherwise
- Type
- Boolean
typeOf(prefix) → {String}
- Description:
Given a prefix like
ammoormedia, will return the specific tag for this item, such asammo:22ormedia:35mm.
- Source:
- Overrides:
Parameters:
| Name | Type | Description |
|---|---|---|
prefix |
String | the prefix to match |
Returns:
the first tag found that matches this prefix
- Type
- String