forked from Mirrors/openclonk
Added kill logs rule
announces the kills/deaths of the players in the game log. To be tested in Hideout now
parent
b51b8e335b
commit
fc5eb73d6a
|
@ -20,6 +20,7 @@ protected func Initialize()
|
|||
// Rules
|
||||
CreateObject(Rule_Restart);
|
||||
CreateObject(Rule_ObjectFade)->DoFadeTime(5 * 36);
|
||||
CreateObject(Rule_KillLogs);
|
||||
|
||||
// Doors and spinwheels.
|
||||
var gate, wheel;
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
[DefCore]
|
||||
id=Rule_KillLogs
|
||||
Version=4,10,0,0
|
||||
Category=C4D_StaticBack|C4D_Rule
|
||||
Width=1
|
||||
Height=1
|
||||
Picture=0,0,64,64
|
Binary file not shown.
After Width: | Height: | Size: 5.2 KiB |
|
@ -0,0 +1,33 @@
|
|||
/*-- Kill logs --*/
|
||||
|
||||
func Initialize()
|
||||
{
|
||||
// only one at a time
|
||||
if(ObjectCount(Find_ID(GetID())) > 1) return RemoveObject();
|
||||
}
|
||||
|
||||
public func Activate(int plr)
|
||||
{
|
||||
MessageWindow(GetProperty("Description"), plr);
|
||||
return true;
|
||||
}
|
||||
|
||||
func OnClonkDeath(object clonk, int killed_by)
|
||||
{
|
||||
var plr=clonk->GetOwner();
|
||||
if(plr == NO_OWNER) return;
|
||||
|
||||
// assert there are three StringTbl entries for each
|
||||
var which_one=Random(3)+1;
|
||||
|
||||
if(!GetPlayerName(killed_by))
|
||||
return Log(Translate(Format("KilledByGaya%d", which_one)),GetTaggedPlayerName(plr), clonk.Prototype->GetName());
|
||||
if(plr == killed_by)
|
||||
return Log(Translate(Format("Selfkill%d", which_one)),GetTaggedPlayerName(plr), clonk.Prototype->GetName());
|
||||
if(!Hostile(plr,killed_by))
|
||||
return Log(Translate(Format("Teamkill%d", which_one)),GetTaggedPlayerName(plr), clonk.Prototype->GetName(), GetTaggedPlayerName(killed_by));
|
||||
Log(Translate(Format("KilledByPlayer%d", which_one)),GetTaggedPlayerName(plr), clonk.Prototype->GetName(), GetTaggedPlayerName(killed_by));
|
||||
}
|
||||
|
||||
local Name = "$Name$";
|
||||
local Description = "$Description$";
|
|
@ -0,0 +1,15 @@
|
|||
Name=Killlogs
|
||||
Description=Wenn diese Spielregel aktiviert ist, werden Tode der Spieler im Log kommentiert.
|
||||
|
||||
Selfkill1=%s hat einen eigenen %s umgebracht.
|
||||
Selfkill2=%s mochte seinen einen %s nicht mehr.
|
||||
Selfkill3=%s hat Selbstmord begangen! Der arme %s.
|
||||
KilledByPlayer1=%s hat einen %s an %s verloren.
|
||||
KilledByPlayer2=%ss %s konnte nichts gegen %s machen.
|
||||
KilledByPlayer3=%s konnte mit seinem %s nicht gut genug kämpfen für %s.
|
||||
KilledByGaya1=%s hat einen %s weggezaubert bekommen.
|
||||
KilledByGaya2=%ss %s stirbt von alleine.
|
||||
KilledByGaya3=%s hat einen %s an Gaya verloren.
|
||||
Teamkill1=%s hat einen %s an %s verloren. Teamkiller!
|
||||
Teamkill2=%ss %s ist bei %s in Ungnade gefallen.
|
||||
Teamkill3=%ss %s wurde von %s sauber hintergangen.
|
|
@ -0,0 +1,15 @@
|
|||
Name=Kill logs
|
||||
Description=When this rule is activated, the deaths of the players' are announced in the log.
|
||||
|
||||
Selfkill1=%s killed his own %s.
|
||||
Selfkill2=%s didn't like his %s any more.
|
||||
Selfkill3=%s committed suicide! Poor %s.
|
||||
KilledByPlayer1=%s has lost his %s to %s.
|
||||
KilledByPlayer2=%s's %s couldn't do anything against %s.
|
||||
KilledByPlayer3=%s's %s was not able to defeat %s.
|
||||
KilledByGaya1=%s has got one %s spirited away.
|
||||
KilledByGaya2=%s's %s dies on its own.
|
||||
KilledByGaya3=%s lost a %s to Gaya.
|
||||
Teamkill1=%s has lost a %s to %s. Teamkiller!
|
||||
Teamkill2=%s's %s fell out of %s's favour.
|
||||
Teamkill3=%s's %s was denied by %s.
|
Loading…
Reference in New Issue