Skip to content

Commit

Permalink
added dining_room_table_interaction.js
Browse files Browse the repository at this point in the history
  • Loading branch information
nishchalgv1 committed Oct 26, 2024
1 parent 34a42f3 commit faef2e4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { displayDialogue } from '../../utils';
import { updateEnergyState } from '../../utils/energyUpdate';
import { getRandomTip } from '../../utils/randomTip';

export const diningRoomTableInteractions = (player, k, map) => {
player.onCollide('dining_room_table', () => {
displayDialogue({
k,
player,
text: ["Here's a fun fact about dining etiquette:", getRandomTip()],
});
updateEnergyState(player.state, player.state.energy + 5);
});
};
2 changes: 2 additions & 0 deletions src/interactions/map_campus_house_1/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { kitchenFridgeInteractions } from './kitchenFridge.interaction';
import { bedroomShelfInteractions } from './bedroomShelf.interaction';
import { livingRoomCouchInteractions } from './livingRoomCouch.interaction';
import { bedroomTableInteractions } from './bedroom_table.interaction';
import { diningRoomTableInteractions } from './dining_room_table.interaction';

const interactions = [
// Add more interactions here
Expand All @@ -19,6 +20,7 @@ const interactions = [
bedroomShelfInteractions,
livingRoomCouchInteractions,
bedroomTableInteractions,
diningRoomTableInteractions,
];

export default interactions;

0 comments on commit faef2e4

Please sign in to comment.