Location class
A class that represents a location in a settlement
Constructors
-
Location({required String name, required Npc owner, required LocationType type, required String zone, required List<
String> outsideDescription, required String buildingDescription, List<Goods> ? goods}) -
const
- Location.fromJson(String source)
-
factory
-
Location.fromMap(Map<
String, dynamic> map) -
factory
-
Location.fromShallowMap(Map<
String, dynamic> map) -
factory
Properties
- buildingDescription → String
-
The description of the building itself
final
-
goods
→ List<
Goods> ? -
A list with goods, null if there are no goods in the location
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- name → String
-
The name of the location
final
-
outsideDescription
→ List<
String> -
The descriptions of the street outside the location
final
- owner → Npc
-
The owner of the location
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → LocationType
-
The type of the location (shop, monument, etc.)
final
- zone → String
-
The zone in the settlement this location appears in
final
Methods
-
copyWith(
{String? name, Npc? owner, LocationType? type, String? zone, List< String> ? outsideDescription, String? buildingDescription, List<Goods> ? goods}) → Location -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → String -
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
covariant Location other) → bool -
The equality operator.
override