diff --git a/language.version b/language.version index 1fbaf31f4..87f5f4213 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1071 \cu(Sun 24 Dec 18:27:07 CET 2023)\c-"; -SWWM_SHORTVER="\cw1.3pre r1071 \cu(2023-12-24 18:27:07)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r1072 \cu(Tue 26 Dec 11:41:49 CET 2023)\c-"; +SWWM_SHORTVER="\cw1.3pre r1072 \cu(2023-12-26 11:41:49)\c-"; diff --git a/zscript/compat/swwm_hdoom.zsc b/zscript/compat/swwm_hdoom.zsc index c2c0abefd..0a8fccd47 100644 --- a/zscript/compat/swwm_hdoom.zsc +++ b/zscript/compat/swwm_hdoom.zsc @@ -34,7 +34,7 @@ Class SWWMHDoomHandler : StaticEventHandler return; callout_len = int(ceil((S_GetLength("hdoom/horny")*GameTicRate)/16)*16); SetRandomSeed[hdscreen](Random[hdscreen]()+consoleplayer+int(MSTimeF())); - Console.Printf( + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY, "\cx┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\c-\n" "\cx┃ \cfOh my, someone appears to be \cgH \ckO \cdR \cvN \chY \ct♥ \cx┃\c-\n" "\cx┃ \cfWell, too bad, this mod isn't compatible with H-Doom \cx┃\c-\n" diff --git a/zscript/compat/swwm_shame.zsc b/zscript/compat/swwm_shame.zsc index ae89cdaf0..e8f2e696b 100644 --- a/zscript/compat/swwm_shame.zsc +++ b/zscript/compat/swwm_shame.zsc @@ -44,7 +44,7 @@ Class SWWMBrutalHandler : StaticEventHandler let shnd = SWWMStaticHandler(StaticEventHandler.Find("SWWMStaticHandler")); shnd.isbd = true; shnd.bdname = which; - Console.Printf( + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY, "\cx┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\c-\n" "\cx┃ \cfIf you have "..whichshort.." on your autoload you really shouldn't. \cx┃\c-\n" "\cx┃ \cfIf you manually loaded it with this mod, why would you? \cx┃\c-\n" diff --git a/zscript/handler/swwm_handler.zsc b/zscript/handler/swwm_handler.zsc index 5e189adf6..eb4ddc936 100644 --- a/zscript/handler/swwm_handler.zsc +++ b/zscript/handler/swwm_handler.zsc @@ -258,7 +258,7 @@ Class SWWMHandler : EventHandler bprofiletics,(bprofiletics>1)?"s":""); for ( int i=0; i<8; i++ ) str.AppendFormat(" %s | %6d | %11.6f | %11.6f\n",prof_name[i],prof_calls[i],prof_ms[i],prof_avg[i]); - Console.Printf(str); + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,str); } override void PostUiTick() diff --git a/zscript/handler/swwm_statichandler.zsc b/zscript/handler/swwm_statichandler.zsc index 1c863600f..1ad936536 100644 --- a/zscript/handler/swwm_statichandler.zsc +++ b/zscript/handler/swwm_statichandler.zsc @@ -76,7 +76,7 @@ Class SWWMStaticHandler : StaticEventHandler while ( t = sti.Next() ) stinkers.Push(t); if ( stinkers.Size() > 0 ) { - foreach ( s:stinkers ) Console.Printf("%s is not STAT_STATIC!",s.GetClassName()); + foreach ( s:stinkers ) Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"%s is not STAT_STATIC!",s.GetClassName()); ThrowAbortException("Panic! %d static thinker%s been tampered with!",stinkers.Size(),(stinkers.Size()==1)?" has":"s have"); } } @@ -181,7 +181,7 @@ Class SWWMStaticHandler : StaticEventHandler } // warning for unsupported if ( Wads.FindLumpFullName("swwmgamesupported",0,true) != -1 ) return; - Console.Printf( + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY, "\cx┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\c-\n" "\cx┃ \cr[\cgWARNING\cr] \cx┃\c-\n" "\cx┃ \chSWWM \czGZ \cjis \cfNOT\cj compatible with the loaded IWAD. \cx┃\c-\n" @@ -257,7 +257,7 @@ Class SWWMStaticHandler : StaticEventHandler foreach ( cv:cvarlist ) { let rcv = CVar.FindCVar(cv); - Console.Printf(cv.." = "..rcv.GetString()); + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,cv.." = "..rcv.GetString()); } } else if ( e.Name ~== "swwmgetplaytime" ) @@ -284,8 +284,8 @@ Class SWWMStaticHandler : StaticEventHandler if ( str != "" ) str = str..", "; str.AppendFormat("%d seconds",sec); } - if ( str == "" ) Console.Printf("No Data"); - else Console.Printf(str); + if ( str == "" ) Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"No Data"); + else Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,str); } else if ( e.Name ~== "swwmresetachievements" ) { @@ -298,23 +298,23 @@ Class SWWMStaticHandler : StaticEventHandler } else if ( e.Name ~== "swwmdumpachievements" ) { - Console.Printf("---STATE---"); + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"---STATE---"); let di = DictionaryIterator.Create(achievementstate); while ( di.Next() ) - Console.Printf("%s = %s",di.Key(),di.Value()); - Console.Printf("---PROGRESS---"); + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"%s = %s",di.Key(),di.Value()); + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"---PROGRESS---"); di = DictionaryIterator.Create(achievementprogress); while ( di.Next() ) - Console.Printf("%s = %s",di.Key(),di.Value()); + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"%s = %s",di.Key(),di.Value()); } else if ( e.Name ~== "swwmgetversion" ) { let ti = ThinkerIterator.Create("SWWMSaveVerData",Thinker.STAT_STATIC); let svd = SWWMSaveVerData(ti.Next()); - if ( svd ) Console.Printf("\cj%s\c-",svd.ver); - else Console.Printf("\cg(no version data)\c-"); - if ( tainted ) Console.Printf("\cgversion mismatched\c-"); - else Console.Printf("\cdversion not mismatched\c-"); + if ( svd ) Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"\cj%s\c-",svd.ver); + else Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"\cg(no version data)\c-"); + if ( tainted ) Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"\cgversion mismatched\c-"); + else Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"\cdversion not mismatched\c-"); } else if ( e.Name ~== "swwmdumpthinkers" ) { @@ -353,7 +353,7 @@ Class SWWMStaticHandler : StaticEventHandler ti.Destroy(); } for ( int i=0; i1)?String.Format(" [%d]",stink[i]):""); + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"%s%s%s\c-",stink[i]?"\cj":"\cu",sdefs[i].GetClassName(),(stink[i]>1)?String.Format(" [%d]",stink[i]):""); } else if ( e.Name ~== "swwmdumphandlers" ) { @@ -362,7 +362,7 @@ Class SWWMStaticHandler : StaticEventHandler if ( !(cls is 'StaticEventHandler') || (cls == 'StaticEventHandler') || (cls == 'EventHandler') ) continue; bool reg = (cls is 'EventHandler')?EventHandler.Find((Class)(cls)):StaticEventHandler.Find((Class)(cls)); - Console.Printf("%s%s\c-",reg?"\cj":"\cu",cls.GetClassName()); + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"%s%s\c-",reg?"\cj":"\cu",cls.GetClassName()); } } else if ( e.Name ~== "swwmtestdlgsize" ) @@ -374,7 +374,7 @@ Class SWWMStaticHandler : StaticEventHandler String dat = Wads.ReadLump(lmp); dat.Split(lst,"\n",0); bool skipme = true; - Console.Printf("[default]"); + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"[default]"); bool fail = false; foreach ( l:lst ) { @@ -391,18 +391,18 @@ Class SWWMStaticHandler : StaticEventHandler BrokenLines bl = f.BreakLines(line,220); if ( bl.Count() > 4 ) { - Console.Printf("\cg%s [%d]\c-",l.Left(st-4),bl.Count()); + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"\cg%s [%d]\c-",l.Left(st-4),bl.Count()); fail = true; } bl.Destroy(); } - if ( !fail ) Console.Printf("ALL OK"); + if ( !fail ) Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"ALL OK"); lmp = Wads.FindLumpFullName("language.es_dlg"); lst.Clear(); dat = Wads.ReadLump(lmp); dat.Split(lst,"\n",0); skipme = true; - Console.Printf("[es]"); + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"[es]"); foreach ( l:lst ) { if ( l.Left(7) == "// E1M8" ) skipme = false; @@ -418,19 +418,19 @@ Class SWWMStaticHandler : StaticEventHandler BrokenLines bl = f.BreakLines(line,220); if ( bl.Count() > 4 ) { - Console.Printf("\cg%s [%d]\c-",l.Left(st-4),bl.Count()); + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"\cg%s [%d]\c-",l.Left(st-4),bl.Count()); fail = true; } bl.Destroy(); } - if ( !fail ) Console.Printf("ALL OK"); + if ( !fail ) Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"ALL OK"); } else if ( e.Name ~== "swwmvalidatedlgfiles" ) { for ( int lmp = Wads.FindLumpFullName("swwmdialogue",0,true); lmp != -1; lmp = Wads.FindLumpFullName("swwmdialogue",lmp+1,true) ) { - Console.Printf("\ce-- PARSING FILE \cf'%s'\ce...\c-",Wads.GetLumpFullName(lmp)); - Console.Printf(""); + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"\ce-- PARSING FILE \cf'%s'\ce...\c-",Wads.GetLumpFullName(lmp)); + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,""); String dat = Wads.ReadLump(lmp); dat.Replace("\r",""); // just in case Array lines; @@ -465,7 +465,7 @@ Class SWWMStaticHandler : StaticEventHandler if ( !indlg ) ThrowAbortException("line %d, 'ENDDLG' found without start of dialogue.",cur+1); if ( inseq ) ThrowAbortException("dialogue '%s', line %d, premature end of sequence %d.",sdlg,cur+1,nseq); if ( !gotseq ) ThrowAbortException("dialogue '%s', line %d, dialogue is empty.",sdlg,cur+1); - Console.Printf(""); + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,""); indlg = false; cur++; continue; @@ -475,7 +475,7 @@ Class SWWMStaticHandler : StaticEventHandler if ( lines[cur].Left(4) == "DLG " ) { sdlg = lines[cur].Mid(4); - Console.Printf("\cqdialogue \cd'%s'\cq:\c-",sdlg); + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY,"\cqdialogue \cd'%s'\cq:\c-",sdlg); indlg = true; nseq = 1; cur++; @@ -492,15 +492,15 @@ Class SWWMStaticHandler : StaticEventHandler // put out the sequence if ( sname == "" ) ThrowAbortException("dialogue '%s', line %d, sequence %d has no name.",sdlg,cur+1,nseq); if ( scnt <= 0 ) ThrowAbortException("dialogue '%s', line %d, sequence %d has invalid count.",sdlg,cur+1,nseq); - Console.Printf(" \cqsequence \cd%d\cq with character \cd'%s'\cq, name \cd'%s'\cq:\c-",nseq,schr,sname); - if ( sdelay > 0 ) Console.Printf(" \cqdelay: \cd%d\c-",sdelay); - if ( sstartdelay > 0 ) Console.Printf(" \cqstartdelay: \cd%d\c-",sstartdelay); - if ( senddelay > 0 ) Console.Printf(" \cqenddelay: \cd%d\c-",senddelay); - if ( schardelay > 0 ) Console.Printf(" \cqchardelay: \cd%d\c-",schardelay); - if ( spausedelay > 0 ) Console.Printf(" \cqpausedelay: \cd%d\c-",spausedelay); - if ( sznvspecial ) Console.Printf(" \cq+\cdznvspecial\c-"); - if ( sindirect ) Console.Printf(" \cq+\cdindirect\c-"); - Console.Printf(" \cqcount: \cd%d\c-\n\cd---\c-",scnt); + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY," \cqsequence \cd%d\cq with character \cd'%s'\cq, name \cd'%s'\cq:\c-",nseq,schr,sname); + if ( sdelay > 0 ) Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY," \cqdelay: \cd%d\c-",sdelay); + if ( sstartdelay > 0 ) Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY," \cqstartdelay: \cd%d\c-",sstartdelay); + if ( senddelay > 0 ) Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY," \cqenddelay: \cd%d\c-",senddelay); + if ( schardelay > 0 ) Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY," \cqchardelay: \cd%d\c-",schardelay); + if ( spausedelay > 0 ) Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY," \cqpausedelay: \cd%d\c-",spausedelay); + if ( sznvspecial ) Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY," \cq+\cdznvspecial\c-"); + if ( sindirect ) Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY," \cq+\cdindirect\c-"); + Console.PrintfEx(PRINT_HIGH|PRINT_NONOTIFY," \cqcount: \cd%d\c-\n\cd---\c-",scnt); for ( int i=0; i= 2 ) Console.Printf("Entry \"%s\" defines no tab.",ref); return true; } if ( StringTable.Localize(text,false) == text ) { - Console.Printf("Entry \"%s\" defines no text.",ref); + if ( developer >= 2 ) Console.Printf("Entry \"%s\" defines no text.",ref); return true; } return false; @@ -625,7 +625,7 @@ Class SWWMLoreLibrary : SWWMStaticThinker e.tag = "$"..tag; if ( StringTable.Localize(e.tag) == "" ) { - Console.Printf("Entry \"%s\" has an empty tag.",ref); + if ( developer >= 2 ) Console.Printf("Entry \"%s\" has an empty tag.",ref); return true; } String ttab = StringTable.Localize(tab,false); @@ -635,13 +635,13 @@ Class SWWMLoreLibrary : SWWMStaticThinker else if ( ttab ~== "Enemy" ) e.tab = LORE_ENEMY; else { - Console.Printf("Entry \"%s\" has an incorrect tab setting of \"%s\".",ref,ttab); + if ( developer >= 2 ) Console.Printf("Entry \"%s\" has an incorrect tab setting of \"%s\".",ref,ttab); return true; } e.text = "$"..text; if ( StringTable.Localize(e.text) == "" ) { - Console.Printf("Entry \"%s\" has empty text.",ref); + if ( developer >= 2 ) Console.Printf("Entry \"%s\" has empty text.",ref); return true; } e.assoc = "$"..assoc; @@ -682,8 +682,10 @@ Class SWWMLoreLibrary : SWWMStaticThinker assocstr.Split(rel,";",0); foreach ( r:rel ) { - if ( (r != "") && !DirectAdd(r) ) - Console.Printf("Related entry \"%s\" not found, please update LANGUAGE.txt",r); + if ( r == "" ) continue; + bool rslt = DirectAdd(r); + if ( (developer >= 2) && !rslt ) + Console.Printf("Related entry \"%s\" not found.",r); } } }