forked from Mirrors/openclonk
don't display the death message on graves if the message is empty (#896)
parent
17ab2c53a3
commit
e9853dc493
|
@ -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);
|
||||
}
|
Loading…
Reference in New Issue