don't display the death message on graves if the message is empty (#896)

stable-5.4
Tobias Zwick 2013-11-30 14:42:52 +07:00
parent 17ab2c53a3
commit e9853dc493
1 changed files with 10 additions and 2 deletions

View File

@ -10,7 +10,15 @@ public func IsInteractable() { return true; }
public func Interact(object clonk)
{
if(!Contents(0) || !Contents(0)->~IsClonk()) return false;
var deathMessage = Contents(0)->GetObjCoreDeathMessage();
if(deathMessage == nil) deathMessage = "";
PlayerMessage(clonk->GetController(), Format("$Epitaph$ %s.|%v", Contents(0)->~GetName(), Format("%s",deathMessage)));
var graveInscription;
if(deathMessage)
{
graveInscription = Format("$Epitaph$ %s.|\"%s\"", Contents(0)->~GetName(), deathMessage);
} else {
graveInscription = Format("$Epitaph$ %s.", Contents(0)->~GetName());
}
PlayerMessage(clonk->GetController(), graveInscription);
}