Spawn items outside the main maps
This commit is contained in:
		| @@ -1,5 +1,5 @@ | ||||
| import metamap from "./metamap.txt?raw"; | ||||
| import {Architecture, LoadedNewMap, NewMap} from "../../newmap.ts"; | ||||
| import {Architecture, LoadedNewMap, NewMap, Progress} from "../../newmap.ts"; | ||||
| import {Grid, Point} from "../../engine/datatypes.ts"; | ||||
| import mapZoo from "../zoo/map.ts"; | ||||
| import mapOptometrist from "../optometrist/map.ts"; | ||||
| @@ -8,6 +8,8 @@ import mapCoffeeShop from "../coffeeShop/map.ts"; | ||||
| import mapClub from "../club/map.ts"; | ||||
| import mapManor from "../manor/map.ts"; | ||||
| import mapLibrary from "../library/map.ts"; | ||||
| import {choose} from "../../utils.ts"; | ||||
| import {ALL_STATS} from "../../datatypes.ts"; | ||||
|  | ||||
| const mapHub: NewMap = () => { | ||||
|   let metamapLayer = Grid.createGridFromMultilineString(metamap); | ||||
| @@ -34,6 +36,8 @@ const mapHub: NewMap = () => { | ||||
|         cell.architecture = Architecture.Wall; | ||||
|       } else if (metamapLayer.get(src) == " ") { | ||||
|         cell.architecture = Architecture.Floor; | ||||
|         let stat = choose(ALL_STATS); | ||||
|         cell.pickup = choose<Progress>([stat, stat, stat, "EXP"]); | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user