Started moving tutorial hard coded messages ito scripts

This commit is contained in:
Sachith Hasaranga Seneviratne
2014-06-20 11:36:10 +05:30
parent b32b9ffe85
commit 388e9cb208
2 changed files with 5 additions and 35 deletions

View File

@@ -22,3 +22,8 @@ void tutorial_bananas()
}
void tutorial_nitro_collect()
{
displayMessage("Collect nitro bottles (we will use them after the curve)");
}

View File

@@ -832,34 +832,6 @@ void TrackObjectPresentationActionTrigger::onTriggerItemApproached(Item* who)
false);
}
}
else if (m_action == "tutorial_bananas")
{
Scripting::ScriptEngine* m_script_engine = World::getWorld()->getScriptEngine();
m_action_active = false;
m_script_engine->runScript(m_action);
}
else if (m_action == "haybail")
{
/*to activate this add the following line to stk-assets/farm/scene.xml
<object type="action-trigger" action="haybail" distance="30.0" xyz="100.72 10.20 -26.22" hpr="0.0 -0.0 0.0" scale="7.00 7.00 7.00"/>
*/
m_action_active=false;
Scripting::ScriptEngine* m_script_engine = World::getWorld()->getScriptEngine();
m_script_engine->runScript(m_action);
}
else if (m_action == "haybail-activate")
{
/*to activate this add the following line to stk-assets/farm/scene.xml
<object type="action-trigger" action="haybail" distance="30.0" xyz="100.72 10.20 -26.22" hpr="0.0 -0.0 0.0" scale="7.00 7.00 7.00"/>
*/
m_action_active=false;
Scripting::ScriptEngine* m_script_engine = World::getWorld()->getScriptEngine();
m_script_engine->runScript(m_action);
}
else if (m_action == "tutorial_giftboxes")
{
m_action_active = false;
@@ -880,13 +852,6 @@ void TrackObjectPresentationActionTrigger::onTriggerItemApproached(Item* who)
new TutorialMessageDialog(_("Press <B> to look behind, to fire the weapon with <%s> while pressing <B> to to fire behind!", fire),
true);
}
else if (m_action == "tutorial_nitro_collect")
{
m_action_active = false;
new TutorialMessageDialog(_("Collect nitro bottles (we will use them after the curve)"),
true);
}
else if (m_action == "tutorial_nitro_use")
{
m_action_active = false;