Merge branch 'pregametutorial' of http://184.154.0.242:7990/scm/min/mineplex into type-wars

This commit is contained in:
Sarah 2015-12-19 12:56:05 +01:00
commit 152e759c10
3 changed files with 35 additions and 0 deletions

View File

@ -36,6 +36,7 @@ public abstract class GameTutorial
public boolean PlayTutorialSounds = false; public boolean PlayTutorialSounds = false;
public boolean ShowPrepareTimer = false; public boolean ShowPrepareTimer = false;
public boolean CustomEnding = false; public boolean CustomEnding = false;
public boolean TutorialNotification = false;
public long TimeBetweenPhase = 0; public long TimeBetweenPhase = 0;
public long StartAfterTutorial = 5000; public long StartAfterTutorial = 5000;
@ -58,6 +59,30 @@ public abstract class GameTutorial
for(TutorialPhase phase : _phases) for(TutorialPhase phase : _phases)
phase.setTutorial(this); phase.setTutorial(this);
if(TutorialNotification)
{
TutorialPhase phase = getPhase(1);
for(TutorialText text : phase.getText())
{
int index = text.ID();
text.setID(index + 1);
}
TutorialText[] newText = new TutorialText[phase.getText().length + 1];
for(int i = 0; i < newText.length; i++)
{
if(i == 0)
{
newText[i] = new TutorialText("Please notice that this is a Tutorial", 1);
continue;
}
else
{
newText[i] = phase.getText()[i];
}
}
phase.setText(newText);
}
Manager.GetChat().Silence(60000, false); Manager.GetChat().Silence(60000, false);
_started = System.currentTimeMillis(); _started = System.currentTimeMillis();
Manager.getPluginManager().callEvent(new GameTutorialStartEvent(this)); Manager.getPluginManager().callEvent(new GameTutorialStartEvent(this));

View File

@ -222,6 +222,11 @@ public abstract class TutorialPhase
return _text; return _text;
} }
public void setText(TutorialText[] text)
{
_text = text;
}
public Location getLocation() public Location getLocation()
{ {
return _location; return _location;

View File

@ -59,4 +59,9 @@ public class TutorialText
_text = text; _text = text;
} }
public void setID(int id)
{
_id = id;
}
} }