You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.2 KiB
40 lines
1.2 KiB
2 years ago
|
/**
|
||
|
* Author: dkanus
|
||
|
* Home repo: https://insultplayers.ru/git/dkanus/KFZedsReport
|
||
|
*/
|
||
3 years ago
|
class ReportInteraction extends Interaction;
|
||
|
|
||
|
var KFZedsReportMut reportMutator;
|
||
|
|
||
2 years ago
|
event NotifyLevelChange() {
|
||
3 years ago
|
if (master != none) {
|
||
|
master.RemoveInteraction(self);
|
||
|
}
|
||
|
}
|
||
|
|
||
2 years ago
|
function PostRender(Canvas canvas) {
|
||
|
local float textWidth, textHeight;
|
||
|
local string maxZedsReport, spawnRateReport;
|
||
|
local string tagWhite, tagGreen;
|
||
|
|
||
3 years ago
|
if (canvas == none) return;
|
||
|
if (reportMutator == none) return;
|
||
|
|
||
|
tagWhite = Chr(27) $ Chr(250) $ Chr(250) $ Chr(250);
|
||
|
tagGreen = Chr(27) $ Chr(1) $ Chr(200) $ Chr(1);
|
||
|
maxZedsReport = tagWhite $ "Current total zeds"
|
||
|
@ tagGreen $ reportMutator.repCurrentTotalZeds
|
||
|
@ tagWhite $ "out of server's total"
|
||
|
@ tagGreen $ reportMutator.repGameInfo_MaxMonsters;
|
||
|
spawnRateReport = tagWhite $ "Current spawn rate is"
|
||
|
@ tagGreen $ reportMutator.repCurrentSpawnRate;
|
||
|
canvas.TextSize(maxZedsReport, textWidth, textHeight);
|
||
|
canvas.SetPos(0, 0);
|
||
|
canvas.DrawText(maxZedsReport);
|
||
|
canvas.SetPos(0, textHeight + 10);
|
||
|
canvas.DrawText(spawnRateReport);
|
||
|
}
|
||
|
|
||
2 years ago
|
defaultproperties {
|
||
3 years ago
|
bVisible = true
|
||
|
}
|