Closed CalebJohn closed 9 years ago
Why should the door re-open whenever the player enters the level again? Shouldn't the door just stay open?
I figured it might be useful to let the player know that the hidden door stays open, that way if they forget they won't spend anytime trying to reopen a door. I can change that behavior if we think it would be to annoying.
Personally I find it annoying, once a door is open it typically stays open. I'm open to other opinions though.
@8bitgentleman Good point I removed the sound and animation when you re-enter a level, I also slowed down the fireplace reveal because it seemed to fast.
This looks solid to me. Maybe have @niamu take a look before it's merged?
Too lazy to make this a pull request, but it fixes my minor annoyance with the painting going askew again just after you opened the hidden door.
diff --git a/src/nodes/hiddendoortrigger.lua b/src/nodes/hiddendoortrigger.lua
index 774f14c..2a07e53 100644
--- a/src/nodes/hiddendoortrigger.lua
+++ b/src/nodes/hiddendoortrigger.lua
@@ -78,6 +78,7 @@ function HiddenDoorTrigger:keypressed( button, player )
if result == 'Yes' then
Gamestate.currentState().doors[self.target].node:show()
app.gamesaves:active():set(self.key, true)
+ self.open = true
end
player.freeze = false
self.fixed = result == 'Yes'
@niamu nice change, I added it here.
This fixes a bug where no image for hidden doors was showing when re-entering a level. Additionally I think it's nicer to alert the player that the door is hideable.
To test this open the fireplace in the house and then leave the level and come back.
This also slows down up the greendale door becuase it now plays the sound every time which was weird without an animation.