Add sachith500 patch which allow to display message when doors are closed in overworld.
I sightly modified it - currently less changes are needed in the exporter.
This commit is contained in:
parent
842bc33b13
commit
091a7c7c5d
@ -20,6 +20,7 @@
|
||||
|
||||
#include "audio/sfx_base.hpp"
|
||||
#include "audio/sfx_buffer.hpp"
|
||||
#include "challenges/unlock_manager.hpp"
|
||||
#include "graphics/irr_driver.hpp"
|
||||
#include "graphics/material_manager.hpp"
|
||||
#include "graphics/particle_emitter.hpp"
|
||||
@ -674,6 +675,35 @@ void TrackObjectPresentationActionTrigger::onTriggerItemApproached(Item* who)
|
||||
new RacePausedDialog(0.8f, 0.6f);
|
||||
//dynamic_cast<OverWorld*>(World::getWorld())->scheduleSelectKart();
|
||||
}
|
||||
//action trigger near big doors in the overword to notify players that they'll open once they finish all the challenges
|
||||
else if (m_action == "big_door")
|
||||
{
|
||||
m_action_active = false;
|
||||
|
||||
unsigned int unlocked_challenges = 0;
|
||||
GameSlot* slot = unlock_manager->getCurrentSlot();
|
||||
std::vector<OverworldChallenge> m_challenges = World::getWorld()->getTrack()->getChallengeList();
|
||||
|
||||
for (unsigned int i=0; i<m_challenges.size(); i++)
|
||||
{
|
||||
if (m_challenges[i].m_challenge_id == "tutorial")
|
||||
{
|
||||
unlocked_challenges++;
|
||||
continue;
|
||||
}
|
||||
if (slot->getChallenge(m_challenges[i].m_challenge_id)
|
||||
->isSolvedAtAnyDifficulty())
|
||||
{
|
||||
unlocked_challenges++;
|
||||
}
|
||||
}
|
||||
|
||||
// allow ONE unsolved challenge : the last one and check for negation
|
||||
if ((unlocked_challenges < m_challenges.size() - 1))
|
||||
{
|
||||
new TutorialMessageDialog(_("Complete all challenges to unlock the big door!"), true);
|
||||
}
|
||||
}
|
||||
else if (m_action == "tutorial_drive")
|
||||
{
|
||||
//if (World::getWorld()->getPhase() == World::RACE_PHASE)
|
||||
|
Loading…
x
Reference in New Issue
Block a user