Use PrintfEx instead of hacks to send chat messages to the hud.
This commit is contained in:
parent
6dc4528136
commit
fece16ae04
3 changed files with 7 additions and 38 deletions
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r230 \cu(Fri 29 Jul 11:38:20 CEST 2022)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r230 \cu(2022-07-29 11:38:20)\c-";
|
||||
SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r231 \cu(Fri 29 Jul 11:38:37 CEST 2022)\c-";
|
||||
SWWM_SHORTVER="\cw1.3pre r231 \cu(2022-07-29 11:38:37)\c-";
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ Class IconMessage : Inventory
|
|||
{
|
||||
if ( Owner.InStateSequence(Owner.CurState,Owner.SeeState) )
|
||||
{
|
||||
Console.MidPrint(smallfont,StringTable.Localize("$BOSSLINE_IOS"));
|
||||
Console.PrintfEx(PRINT_CHAT,StringTable.Localize("$BOSSLINE_IOS"));
|
||||
DepleteOrDestroy();
|
||||
return;
|
||||
}
|
||||
|
|
@ -22,7 +22,7 @@ Class ArchangelusMessage : Inventory
|
|||
{
|
||||
if ( Owner.InStateSequence(Owner.CurState,Owner.SeeState) )
|
||||
{
|
||||
Console.MidPrint(smallfont,StringTable.Localize("$BOSSLINE_ARCHANGELUS"));
|
||||
Console.PrintfEx(PRINT_CHAT,StringTable.Localize("$BOSSLINE_ARCHANGELUS"));
|
||||
DepleteOrDestroy();
|
||||
return;
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@ Class DSparilMessage : Inventory
|
|||
{
|
||||
if ( Owner.InStateSequence(Owner.CurState,Owner.SeeState) )
|
||||
{
|
||||
Console.MidPrint(smallfont,StringTable.Localize("$BOSSLINE_DSPARIL"));
|
||||
Console.PrintfEx(PRINT_CHAT,StringTable.Localize("$BOSSLINE_DSPARIL"));
|
||||
DepleteOrDestroy();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,7 +127,6 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
transient BrokenLines midl;
|
||||
int midsz;
|
||||
|
||||
bool koraxhack, mainframehack, bosshack;
|
||||
int puzzlecnt, realpuzzlecnt;
|
||||
|
||||
SWWMWeaponTooltip ctip;
|
||||
|
|
@ -523,9 +522,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
}
|
||||
if ( koraxline )
|
||||
{
|
||||
koraxhack = true;
|
||||
Console.Printf(msg);
|
||||
koraxhack = false;
|
||||
Console.PrintfEx(PRINT_CHAT,"\cmKorax\c-: "..msg);
|
||||
return true;
|
||||
}
|
||||
bool ispuzzle = false;
|
||||
|
|
@ -764,18 +761,7 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
mainframeline = true;
|
||||
if ( mainframeline )
|
||||
{
|
||||
mainframehack = true;
|
||||
Console.Printf(msg);
|
||||
mainframehack = false;
|
||||
return true;
|
||||
}
|
||||
if ( (msg == StringTable.Localize("$BOSSLINE_IOS"))
|
||||
|| (msg == StringTable.Localize("$BOSSLINE_ARCHANGELUS"))
|
||||
|| (msg == StringTable.Localize("$BOSSLINE_DSPARIL")) )
|
||||
{
|
||||
bosshack = true;
|
||||
Console.Printf(msg);
|
||||
bosshack = false;
|
||||
Console.PrintfEx(PRINT_CHAT,"\cmAI Mainframe\c-: "..msg);
|
||||
return true;
|
||||
}
|
||||
if ( !fnt || (fnt == smallfont) )
|
||||
|
|
@ -797,23 +783,6 @@ Class SWWMStatusBar : BaseStatusBar
|
|||
|
||||
override bool ProcessNotify( EPrintLevel printlevel, String outline )
|
||||
{
|
||||
if ( koraxhack )
|
||||
{
|
||||
// treat as chat message
|
||||
printlevel = PRINT_CHAT;
|
||||
outline = "\cmKorax\c-: "..outline;
|
||||
}
|
||||
else if ( mainframehack )
|
||||
{
|
||||
// same here, hi yholl
|
||||
printlevel = PRINT_CHAT;
|
||||
outline = "\cmAI Mainframe\c-: "..outline;
|
||||
}
|
||||
else if ( bosshack )
|
||||
{
|
||||
// no need to attach name, these are done specifically for this
|
||||
printlevel = PRINT_CHAT;
|
||||
}
|
||||
// append chat messages to full history
|
||||
if ( (printlevel == PRINT_CHAT) || (printlevel == PRINT_TEAMCHAT) )
|
||||
EventHandler.SendNetworkEvent("swwmstoremessage."..outline.Left(outline.Length()-1),level.totaltime,printlevel,consoleplayer);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue