|
@@ -177,27 +177,42 @@ function MapSeed(seedID: number, rangeMaps: RangeMaps): SeedMap|undefined {
|
|
|
return seed;
|
|
|
}
|
|
|
|
|
|
+/** Any object with a unique identifier */
|
|
|
interface IdentifiableObject {
|
|
|
+ /** The ID number for this object */
|
|
|
ID: number,
|
|
|
};
|
|
|
|
|
|
+/** A seed */
|
|
|
interface Seed extends IdentifiableObject {};
|
|
|
|
|
|
+/** An IdentifiableObject that points to another IdentifiableObject */
|
|
|
interface MappableObject extends IdentifiableObject {
|
|
|
+ /** The ID that this object points to */
|
|
|
PointsTo: number,
|
|
|
};
|
|
|
|
|
|
+/** A complete map of all object IDs and where they point to */
|
|
|
type RangeMaps = {
|
|
|
+ /** The list of seed IDs */
|
|
|
Seeds: Seed[],
|
|
|
+ /** The map of seed to soil IDs */
|
|
|
SeedToSoil: MappableObject[],
|
|
|
+ /** The map of soil to fertilizer IDs */
|
|
|
SoilToFertilizer: MappableObject[],
|
|
|
+ /** The map of fertilizer to water IDs */
|
|
|
FertilizerToWater: MappableObject[],
|
|
|
+ /** The map of water to light IDs */
|
|
|
WaterToLight: MappableObject[],
|
|
|
+ /** The map of light to temperature IDs */
|
|
|
LightToTemperature: MappableObject[],
|
|
|
+ /** The map of temperature to humidity IDs */
|
|
|
TemperatureToHumidity: MappableObject[],
|
|
|
+ /** The map of humidity to location IDs */
|
|
|
HumidityToLocation: MappableObject[],
|
|
|
}
|
|
|
|
|
|
+/** A completed map of a seed's property IDs */
|
|
|
type SeedMap = {
|
|
|
/** The ID of the seed */
|
|
|
ID: number,
|