Skip to content

Commit

Permalink
feature: added bedroom_plant interaction (#179)
Browse files Browse the repository at this point in the history
Part #130
  • Loading branch information
r4pt0s authored Oct 26, 2024
2 parents b164bd6 + 548dead commit 30a32c8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/interactions/map_campus_house_1/bedroom_plant.interaction.js
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 bedroomPlantInteractions = (player, k, map) => {
player.onCollide('bedroom_plant', () => {
displayDialogue({
k,
player,
text: ["Here's a tip for caring for your plants:", getRandomTip()],
});
updateEnergyState(player.state, player.state.energy + 3);
});
};
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 { bedroomPlantInteractions } from './bedroom_plant.interaction';

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

export default interactions;

0 comments on commit 30a32c8

Please sign in to comment.