Skip to content

Commit

Permalink
feature: added dining room table interaction (#189)
Browse files Browse the repository at this point in the history
Part of #130
  • Loading branch information
r4pt0s authored Oct 29, 2024
2 parents 67d7e94 + e97bda6 commit 30dcb48
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 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);
});
};
7 changes: 3 additions & 4 deletions src/interactions/map_campus_house_1/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import { kitchenFridgeInteractions } from './kitchenFridge.interaction';
import { bedroomShelfInteractions } from './bedroomShelf.interaction';
import { livingRoomCouchInteractions } from './livingRoomCouch.interaction';
import { bedroomTableInteractions } from './bedroom_table.interaction';
import { bedroomPlantInteractions } from './bedroom_plant.interaction';
import { diningTableInteractions } from './diningtableinteraction';
import { diningRoomTableInteractions } from './dining_room_table.interaction';

const interactions = [
// Add more interactions here
Expand All @@ -21,8 +20,8 @@ const interactions = [
bedroomShelfInteractions,
livingRoomCouchInteractions,
bedroomTableInteractions,
diningTableInteractions,
bedroomPlantInteractions,
diningRoomTableInteractions,
restroomToiletInteractions,
];

export default interactions;

0 comments on commit 30dcb48

Please sign in to comment.