Gang

Gang

Represents a Gang, which is a set of characters of a specific kind or purpose. Could also be called a “party”.

Constructor

new Gang(paramsopt)

Description:
  • Create a Gang.

Source:
Properties:
Name Type Attributes Description
members Array.<Character>

The members of the gang.

kind String

The kind or type of the gang.

name String <optional>

The name of the gang.

Example
const gang = new Gang({
  name: 'Oakley Boys',
  kind: 'Cowboy Posse',
  members: [pa, littleJohn, billy]
});
Parameters:
Name Type Attributes Description
params Object <optional>
Properties
Name Type Attributes Default Description
kind String

The kind/type of the gang.

name String <optional>

The name of the gang.

members Array <optional>
[]

The members of the gang.

tags Array <optional>
[]

Tags associated with the gang.

Extends

Members

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:
Parameters:
Name Type Description
tag String
Returns:

true if it does, false otherwise

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 ammo or media, will return the specific tag for this item, such as ammo:22 or media:35mm.

Source:
Overrides:
Parameters:
Name Type Description
prefix String

the prefix to match

Returns:

the first tag found that matches this prefix

Type
String