forked from Mirrors/openclonk
Fix treasure hunt goal messages.
parent
d3ee2fac57
commit
0afc12a3f0
|
@ -18,41 +18,19 @@ public func OnOilDelivered() { return is_fulfilled = true; }
|
|||
|
||||
public func GetDescription(int plr)
|
||||
{
|
||||
var desc;
|
||||
if (is_fulfilled)
|
||||
return "$MsgGoalFulfilled$";
|
||||
desc = "$MsgGoalFulfilled$";
|
||||
else if (got_oil)
|
||||
return "$MsgGotOil$";
|
||||
desc = "$MsgGotOil$";
|
||||
else if (has_gem_task)
|
||||
return "$MsgGoalUnFulfilled$";
|
||||
desc = "$MsgGoalUnFulfilled$";
|
||||
else
|
||||
return "$MsgGoalOil$";
|
||||
desc = "$MsgGoalOil$";
|
||||
if (has_gem_task || g_num_goldbars) desc = Format("%s|%s", desc, Format("$MsgSideGoal$", g_num_goldbars, MAX_GOLD_BARS));
|
||||
return desc;
|
||||
}
|
||||
|
||||
public func Activate(int byplr)
|
||||
{
|
||||
var desc = GetDescription(byplr);
|
||||
if (has_gem_task) desc = Format("%s|%s", desc, Format("$MsgSideGoal$", g_num_goldbars, MAX_GOLD_BARS));
|
||||
ToggleGoalMessage(desc, byplr);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Shows or hides a message window with information.
|
||||
private func ToggleGoalMessage(string msg, int plr)
|
||||
{
|
||||
// If goal message open -> hide it.
|
||||
if (GetEffect("GoalMessage", this))
|
||||
{
|
||||
CustomMessage("", nil, plr, nil, nil, nil, nil, nil, MSG_HCenter);
|
||||
RemoveEffect("GoalMessage", this);
|
||||
return;
|
||||
}
|
||||
// Otherwise open a new message.
|
||||
AddEffect("GoalMessage", this, 100, 0, this);
|
||||
CustomMessage(Format("@%s", msg), nil, plr, 0, 16 + 64, 0xffffff, GUI_MenuDeco, this, MSG_HCenter);
|
||||
return;
|
||||
}
|
||||
|
||||
protected func FxGoalMessageStart() {}
|
||||
public func GetShortDescription(int plr) {}
|
||||
|
||||
/*-- Proplist --*/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Name=Ölsuche
|
||||
Name2=Schatzsuche
|
||||
MsgSideGoal=Sekundärziel: %d von %d Goldbarren gefunden.
|
||||
MsgGoalFulfilled=Schatz gefunden und verkauft :-)
|
||||
MsgGoalUnFulfilled=Schatz noch nicht gefunden und verkauft :-(
|
||||
MsgGoalFulfilled=Spielziel erfüllt.
|
||||
MsgGoalUnFulfilled=Finde den Schatz und bringe ihn zu Dagobert, um Öl für das Flugzeug zu erhalten!
|
||||
MsgGoalOil=Finde ein neues Ölfass.
|
||||
MsgGotOil=Bringe das Ölfass zum Flugzeug.
|
|
@ -1,7 +1,7 @@
|
|||
Name=Oil hunt
|
||||
Name2=Treasure hunt
|
||||
MsgSideGoal=Side goal: %d of %d gold bars found.
|
||||
MsgGoalFulfilled=Treasure found and sold.
|
||||
MsgGoalUnFulfilled=Treasure not yet found and sold yet.
|
||||
MsgGoalFulfilled=Goal fulfilled.
|
||||
MsgGoalUnFulfilled=Find the treasure and deliver it to Dagobert to get oil for your plane.
|
||||
MsgGoalOil=Find a new oil barrel.
|
||||
MsgGotOil=Bring the oil barrel to the plane.
|
Loading…
Reference in New Issue