delaunay mapgen 1st version
This commit is contained in:
@ -57,11 +57,12 @@ func (pfbl PrefabLoader) PrefabRoomsList() []Room {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
//prepare actual legends
|
||||
currentTileLegend := file.DefaultTileLegend
|
||||
currentMobsLegend := file.DefaultMobsLegend
|
||||
currentItemLegend := file.DefaultItemLegend
|
||||
|
||||
for _, rawPrefab := range file.Prefabs {
|
||||
//prepare actual legends
|
||||
currentTileLegend := file.DefaultTileLegend
|
||||
currentMobsLegend := file.DefaultMobsLegend
|
||||
currentItemLegend := file.DefaultItemLegend
|
||||
|
||||
for k,v := range rawPrefab.TileLegend {
|
||||
currentTileLegend[k] = v
|
||||
@ -99,7 +100,7 @@ func (pfbl PrefabLoader) PrefabRoomsList() []Room {
|
||||
continue
|
||||
}
|
||||
if shortName == "connector" {
|
||||
f = NewFloor
|
||||
f = NewWall
|
||||
room.Connectors = append(room.Connectors, types.Coords{i,j})
|
||||
} else {
|
||||
f, ok = TileTypeMap[shortName]
|
||||
@ -122,4 +123,4 @@ var TileTypeMap = map[string]func()*Tile{
|
||||
"decorated_wall": NewDecoratedWall,
|
||||
"water": NewWaterTile,
|
||||
"deep_water": NewDeepWaterTile,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user