# Class: LocationBaseModel (/jsdoc/nqtr/index/classes/LocationBaseModel)



Defined in: [src/classes/navigation/LocationBaseModel.ts:16](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/classes/navigation/LocationBaseModel.ts#L16)

The base model of a location. I suggest you extend this class to create your own location model.

## Example [#example]

```typescript
export const mcHome = new LocationBaseModel('mc_home', mainMap, {
    name: 'MC Home',
    icon: "https://icon.jpg",
});
```

## Extends [#extends]

* [`LocationStoredClass`](/jsdoc/nqtr/index/classes/LocationStoredClass)

## Implements [#implements]

* `LocationInternalInterface`

## Constructors [#constructors]

### Constructor [#constructor]

\> **new LocationBaseModel**(`id`, `map`, `props?`): `LocationBaseModel`

Defined in: [src/classes/navigation/LocationBaseModel.ts:25](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/classes/navigation/LocationBaseModel.ts#L25)

#### Parameters [#parameters]

##### id [#id]

`string`

The id of the location, it must be unique.

##### map [#map]

[`MapInterface`](/jsdoc/nqtr/index/interfaces/MapInterface)

The map where the location is.

##### props? [#props]

[`LocationBaseModelProps`](/jsdoc/nqtr/index/interfaces/LocationBaseModelProps) = `{}`

The properties of the location.

#### Returns [#returns]

`LocationBaseModel`

#### Overrides [#overrides]

[`LocationStoredClass`](/jsdoc/nqtr/index/classes/LocationStoredClass).[`constructor`](/jsdoc/nqtr/index/classes/LocationStoredClass#constructor)

## Properties [#properties]

### id [#id-1]

\> `readonly` **id**: `string`

Defined in: node\_modules/@drincs/pixi-vn/dist/StoredClassModel-uMifeNzV.d.ts:41

Is id of the stored class. is unique for this class.

#### Implementation of [#implementation-of]

`LocationInternalInterface.id`

#### Inherited from [#inherited-from]

[`LocationStoredClass`](/jsdoc/nqtr/index/classes/LocationStoredClass).[`id`](/jsdoc/nqtr/index/classes/LocationStoredClass#id)

## Accessors [#accessors]

### activities [#activities]

#### Get Signature [#get-signature]

\> **get** **activities**(): [`ActivityInterface`](/jsdoc/nqtr/index/interfaces/ActivityInterface)\[]

Defined in: [src/classes/navigation/NavigationAbstractClass.ts:176](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/classes/navigation/NavigationAbstractClass.ts#L176)

The activities associated with this class, filtered based on their scheduling.

##### Returns [#returns-1]

[`ActivityInterface`](/jsdoc/nqtr/index/interfaces/ActivityInterface)\[]

#### Implementation of [#implementation-of-1]

`LocationInternalInterface.activities`

#### Inherited from [#inherited-from-1]

[`LocationStoredClass`](/jsdoc/nqtr/index/classes/LocationStoredClass).[`activities`](/jsdoc/nqtr/index/classes/LocationStoredClass#activities)

***

### activitiesIds [#activitiesids]

#### Get Signature [#get-signature-1]

\> **get** **activitiesIds**(): `string`\[]

Defined in: [src/classes/navigation/NavigationAbstractClass.ts:69](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/classes/navigation/NavigationAbstractClass.ts#L69)

All the ids of the activities associated with this class. Compared to [activities](/jsdoc/nqtr/index/interfaces/LocationInterface#activities), they are not filtered based on their scheduling.

##### Returns [#returns-2]

`string`\[]

#### Implementation of [#implementation-of-2]

`LocationInternalInterface.activitiesIds`

#### Inherited from [#inherited-from-2]

[`LocationStoredClass`](/jsdoc/nqtr/index/classes/LocationStoredClass).[`activitiesIds`](/jsdoc/nqtr/index/classes/LocationStoredClass#activitiesids)

***

### disabled [#disabled]

#### Get Signature [#get-signature-2]

\> **get** **disabled**(): `boolean`

Defined in: [src/classes/navigation/LocationBaseModel.ts:49](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/classes/navigation/LocationBaseModel.ts#L49)

Whether is disabled. If it is a string, it is a Pixi'VN flag name.

##### Returns [#returns-3]

`boolean`

#### Set Signature [#set-signature]

\> **set** **disabled**(`value`): `void`

Defined in: [src/classes/navigation/LocationBaseModel.ts:56](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/classes/navigation/LocationBaseModel.ts#L56)

##### Parameters [#parameters-1]

###### value [#value]

`string` | `boolean`

##### Returns [#returns-4]

`void`

***

### hidden [#hidden]

#### Get Signature [#get-signature-3]

\> **get** **hidden**(): `boolean`

Defined in: [src/classes/navigation/LocationBaseModel.ts:64](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/classes/navigation/LocationBaseModel.ts#L64)

Whether is hidden. If it is a string, it is a Pixi'VN flag name.

##### Returns [#returns-5]

`boolean`

#### Set Signature [#set-signature-1]

\> **set** **hidden**(`value`): `void`

Defined in: [src/classes/navigation/LocationBaseModel.ts:71](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/classes/navigation/LocationBaseModel.ts#L71)

##### Parameters [#parameters-2]

###### value [#value-1]

`string` | `boolean`

##### Returns [#returns-6]

`void`

***

### icon [#icon]

#### Get Signature [#get-signature-4]

\> **get** **icon**(): `string` | `undefined`

Defined in: [src/classes/navigation/LocationBaseModel.ts:79](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/classes/navigation/LocationBaseModel.ts#L79)

The icon of the location.

##### Returns [#returns-7]

`string` | `undefined`

***

### map [#map-1]

#### Get Signature [#get-signature-5]

\> **get** **map**(): [`MapInterface`](/jsdoc/nqtr/index/interfaces/MapInterface)

Defined in: [src/classes/navigation/LocationStoredClass.ts:22](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/classes/navigation/LocationStoredClass.ts#L22)

The map where the location is.

##### Returns [#returns-8]

[`MapInterface`](/jsdoc/nqtr/index/interfaces/MapInterface)

#### Implementation of [#implementation-of-3]

`LocationInternalInterface.map`

#### Inherited from [#inherited-from-3]

[`LocationStoredClass`](/jsdoc/nqtr/index/classes/LocationStoredClass).[`map`](/jsdoc/nqtr/index/classes/LocationStoredClass#map)

***

### name [#name]

#### Get Signature [#get-signature-6]

\> **get** **name**(): `string`

Defined in: [src/classes/navigation/LocationBaseModel.ts:38](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/classes/navigation/LocationBaseModel.ts#L38)

The name of the location.
If you set undefined, it will return the initial value of name.

##### Returns [#returns-9]

`string`

#### Set Signature [#set-signature-2]

\> **set** **name**(`value`): `void`

Defined in: [src/classes/navigation/LocationBaseModel.ts:41](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/classes/navigation/LocationBaseModel.ts#L41)

##### Parameters [#parameters-3]

###### value [#value-2]

`string` | `undefined`

##### Returns [#returns-10]

`void`

***

### rooms [#rooms]

#### Get Signature [#get-signature-7]

\> **get** **rooms**(): [`RoomInterface`](/jsdoc/nqtr/index/interfaces/RoomInterface)\[]

Defined in: [src/classes/navigation/LocationStoredClass.ts:26](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/classes/navigation/LocationStoredClass.ts#L26)

Get all rooms in the location.

##### Returns [#returns-11]

[`RoomInterface`](/jsdoc/nqtr/index/interfaces/RoomInterface)\[]

The rooms in the location.

#### Implementation of [#implementation-of-4]

`LocationInternalInterface.rooms`

#### Inherited from [#inherited-from-4]

[`LocationStoredClass`](/jsdoc/nqtr/index/classes/LocationStoredClass).[`rooms`](/jsdoc/nqtr/index/classes/LocationStoredClass#rooms)

## Methods [#methods]

### addActivity() [#addactivity]

\> **addActivity**(`activity`, `options?`): `void`

Defined in: [src/classes/navigation/NavigationAbstractClass.ts:72](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/classes/navigation/NavigationAbstractClass.ts#L72)

Connects the activity to the class.

#### Parameters [#parameters-4]

##### activity [#activity]

`string` | [`ActivityInterface`](/jsdoc/nqtr/index/interfaces/ActivityInterface)

The activity to connect to the class.

##### options? [#options]

[`ActiveScheduling`](/jsdoc/nqtr/index/interfaces/ActiveScheduling) = `{}`

#### Returns [#returns-12]

`void`

#### Implementation of [#implementation-of-5]

`LocationInternalInterface.addActivity`

#### Inherited from [#inherited-from-5]

[`LocationStoredClass`](/jsdoc/nqtr/index/classes/LocationStoredClass).[`addActivity`](/jsdoc/nqtr/index/classes/LocationStoredClass#addactivity)

***

### clearExpiredActivities() [#clearexpiredactivities]

\> **clearExpiredActivities**(): `void`

Defined in: [src/classes/navigation/NavigationAbstractClass.ts:149](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/classes/navigation/NavigationAbstractClass.ts#L149)

Removes the useless activities.

#### Returns [#returns-13]

`void`

#### Implementation of [#implementation-of-6]

`LocationInternalInterface.clearExpiredActivities`

#### Inherited from [#inherited-from-6]

[`LocationStoredClass`](/jsdoc/nqtr/index/classes/LocationStoredClass).[`clearExpiredActivities`](/jsdoc/nqtr/index/classes/LocationStoredClass#clearexpiredactivities)

***

### getStorageProperty() [#getstorageproperty]

\> `protected` **getStorageProperty**\<`T`>(`propertyName`, `idToUse?`): `T` | `undefined`

Defined in: node\_modules/@drincs/pixi-vn/dist/StoredClassModel-uMifeNzV.d.ts:56

Get a property from the storage.

#### Type Parameters [#type-parameters]

##### T [#t]

`T` = `StorageElementType`

#### Parameters [#parameters-5]

##### propertyName [#propertyname]

`string`

The name of the property to get.

##### idToUse? [#idtouse]

`string`

The id of the instance to get the property.

#### Returns [#returns-14]

`T` | `undefined`

The value of the property. If the property is not found, returns undefined.

#### Default [#default]

```ts
this.id
```

#### Implementation of [#implementation-of-7]

`LocationInternalInterface.getStorageProperty`

#### Inherited from [#inherited-from-7]

[`LocationStoredClass`](/jsdoc/nqtr/index/classes/LocationStoredClass).[`getStorageProperty`](/jsdoc/nqtr/index/classes/LocationStoredClass#getstorageproperty)

***

### migrateOldStorage() [#migrateoldstorage]

\> `protected` **migrateOldStorage**(`oldCategoryId?`): `void`

Defined in: node\_modules/@drincs/pixi-vn/dist/StoredClassModel-uMifeNzV.d.ts:37

#### Parameters [#parameters-6]

##### oldCategoryId? [#oldcategoryid]

`string`

#### Returns [#returns-15]

`void`

#### Implementation of [#implementation-of-8]

`LocationInternalInterface.migrateOldStorage`

#### Inherited from [#inherited-from-8]

[`LocationStoredClass`](/jsdoc/nqtr/index/classes/LocationStoredClass).[`migrateOldStorage`](/jsdoc/nqtr/index/classes/LocationStoredClass#migrateoldstorage)

***

### removeActivity() [#removeactivity]

\> **removeActivity**(`activity`): `void`

Defined in: [src/classes/navigation/NavigationAbstractClass.ts:134](https://github.com/DRincs-Productions/nqtr/blob/08e4514a78064e151b4c2db0972abaf6aefff32f/src/classes/navigation/NavigationAbstractClass.ts#L134)

Disconnects the activity from the class.

#### Parameters [#parameters-7]

##### activity [#activity-1]

`string` | [`ActivityInterface`](/jsdoc/nqtr/index/interfaces/ActivityInterface)

The activity to disconnect from the class.

#### Returns [#returns-16]

`void`

#### Implementation of [#implementation-of-9]

`LocationInternalInterface.removeActivity`

#### Inherited from [#inherited-from-9]

[`LocationStoredClass`](/jsdoc/nqtr/index/classes/LocationStoredClass).[`removeActivity`](/jsdoc/nqtr/index/classes/LocationStoredClass#removeactivity)

***

### setStorageProperty() [#setstorageproperty]

\> `protected` **setStorageProperty**\<`T`>(`propertyName`, `value`): `void`

Defined in: node\_modules/@drincs/pixi-vn/dist/StoredClassModel-uMifeNzV.d.ts:49

Update a property in the storage.

#### Type Parameters [#type-parameters-1]

##### T [#t-1]

`T`

The type of the value to set. (Deprecated, it is not necessary to specify the type of the value, it will be inferred from the value)

#### Parameters [#parameters-8]

##### propertyName [#propertyname-1]

`string`

The name of the property to set.

##### value [#value-3]

`StorageElementType`

The value to set. If is undefined, the property will be removed from the storage.

#### Returns [#returns-17]

`void`

#### Implementation of [#implementation-of-10]

`LocationInternalInterface.setStorageProperty`

#### Inherited from [#inherited-from-10]

[`LocationStoredClass`](/jsdoc/nqtr/index/classes/LocationStoredClass).[`setStorageProperty`](/jsdoc/nqtr/index/classes/LocationStoredClass#setstorageproperty)
