Skip to content

Commit

Permalink
Return spawned item (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
nahilep authored and shawncplus committed Feb 24, 2019
1 parent ca18ecd commit ceb8c60
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Room.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ class Room extends GameEntity {
/**
* @param {GameState} state
* @param {string} entityRef
* @return {Item} The newly created item
*/
spawnItem(state, entityRef) {
Logger.verbose(`\tSPAWN: Adding item [${entityRef}] to room [${this.title}]`);
Expand All @@ -315,6 +316,7 @@ class Room extends GameEntity {
* @event Item#spawn
*/
newItem.emit('spawn');
return newItem;
}

/**
Expand Down

0 comments on commit ceb8c60

Please sign in to comment.