🐛 Skip unreachable job targets in pickJob #23
@@ -78,6 +78,7 @@ export class GameScene extends Phaser.Scene {
|
|||||||
this.adapter.onAction = (action) => {
|
this.adapter.onAction = (action) => {
|
||||||
if (action.type === 'CHANGE_TILE') {
|
if (action.type === 'CHANGE_TILE') {
|
||||||
this.worldSystem.setTile(action.tileX, action.tileY, action.tile)
|
this.worldSystem.setTile(action.tileX, action.tileY, action.tile)
|
||||||
|
this.worldSystem.refreshTerrainTile(action.tileX, action.tileY, action.tile)
|
||||||
} else if (action.type === 'SPAWN_RESOURCE') {
|
} else if (action.type === 'SPAWN_RESOURCE') {
|
||||||
this.resourceSystem.spawnResourcePublic(action.resource)
|
this.resourceSystem.spawnResourcePublic(action.resource)
|
||||||
this.worldSystem.addResourceTile(action.resource.tileX, action.resource.tileY)
|
this.worldSystem.addResourceTile(action.resource.tileX, action.resource.tileY)
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ export class TreeSeedlingSystem {
|
|||||||
this.removeSprite(id)
|
this.removeSprite(id)
|
||||||
this.adapter.send({ type: 'REMOVE_TREE_SEEDLING', seedlingId: id })
|
this.adapter.send({ type: 'REMOVE_TREE_SEEDLING', seedlingId: id })
|
||||||
this.adapter.send({ type: 'CHANGE_TILE', tileX, tileY, tile: TileType.FOREST })
|
this.adapter.send({ type: 'CHANGE_TILE', tileX, tileY, tile: TileType.FOREST })
|
||||||
this.worldSystem.refreshTerrainTile(tileX, tileY, TileType.FOREST)
|
|
||||||
|
|
||||||
const resourceId = `tree_grown_${tileX}_${tileY}_${Date.now()}`
|
const resourceId = `tree_grown_${tileX}_${tileY}_${Date.now()}`
|
||||||
this.adapter.send({
|
this.adapter.send({
|
||||||
|
|||||||
Reference in New Issue
Block a user