Skip to content

Commit 30dcb48

Browse files
authored
feature: added dining room table interaction (#189)
Part of #130
2 parents 67d7e94 + e97bda6 commit 30dcb48

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { displayDialogue } from '../../utils';
2+
import { updateEnergyState } from '../../utils/energyUpdate';
3+
import { getRandomTip } from '../../utils/randomTip';
4+
5+
export const diningRoomTableInteractions = (player, k, map) => {
6+
player.onCollide('dining_room_table', () => {
7+
displayDialogue({
8+
k,
9+
player,
10+
text: ["Here's a fun fact about dining etiquette:", getRandomTip()],
11+
});
12+
updateEnergyState(player.state, player.state.energy + 5);
13+
});
14+
};

src/interactions/map_campus_house_1/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import { kitchenFridgeInteractions } from './kitchenFridge.interaction';
77
import { bedroomShelfInteractions } from './bedroomShelf.interaction';
88
import { livingRoomCouchInteractions } from './livingRoomCouch.interaction';
99
import { bedroomTableInteractions } from './bedroom_table.interaction';
10-
import { bedroomPlantInteractions } from './bedroom_plant.interaction';
11-
import { diningTableInteractions } from './diningtableinteraction';
10+
import { diningRoomTableInteractions } from './dining_room_table.interaction';
1211

1312
const interactions = [
1413
// Add more interactions here
@@ -21,8 +20,8 @@ const interactions = [
2120
bedroomShelfInteractions,
2221
livingRoomCouchInteractions,
2322
bedroomTableInteractions,
24-
diningTableInteractions,
25-
bedroomPlantInteractions,
23+
diningRoomTableInteractions,
24+
restroomToiletInteractions,
2625
];
2726

2827
export default interactions;

0 commit comments

Comments
 (0)