Implement bludtype.txt support.
This commit is contained in:
parent
282ba4f18d
commit
1add7e71b7
3 changed files with 20 additions and 3 deletions
|
|
@ -1,3 +1,3 @@
|
|||
[default]
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.1.23 \cu(Sun 10 Oct 19:30:50 CEST 2021)\c-";
|
||||
SWWM_SHORTVER="\cw1.1.23 \cu(2021-10-10 19:30:50)\c-";
|
||||
SWWM_MODVER="\chSWWM \czGZ\c- \cw1.1.23 \cu(Mon 11 Oct 16:20:44 CEST 2021)\c-";
|
||||
SWWM_SHORTVER="\cw1.1.23 \cu(2021-10-11 16:20:44)\c-";
|
||||
|
|
|
|||
|
|
@ -568,7 +568,7 @@ extend Class SWWMHandler
|
|||
}
|
||||
}
|
||||
// only replace vanilla blood if no other gore mod is doing it
|
||||
if ( (e.Replacee == "Blood") && (!e.Replacement || e.Replacement == "Blood") && swwm_blood ) e.Replacement = "mkBlood";
|
||||
if ( (((e.Replacee == "Blood") && (!e.Replacement || e.Replacement == "Blood")) || (bludtypes.Find(e.Replacee.GetClassName()) < bludtypes.Size())) && swwm_blood ) e.Replacement = "mkBlood";
|
||||
else if ( e.Replacee is 'ItemFog' ) e.Replacement = 'SWWMItemFog';
|
||||
else if ( e.Replacee is 'TeleportFog' ) e.Replacement = 'SWWMTeleportFog';
|
||||
else if ( (e.Replacee is 'CommanderKeen') && (!e.Replacement || (e.Replacement == 'CommanderKeen')) )
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ Class SWWMHandler : EventHandler
|
|||
// for checkreplacement
|
||||
bool hasdrlamonsters;
|
||||
int iskdizd;
|
||||
Array<String> bludtypes;
|
||||
|
||||
// profiling data
|
||||
bool profiling;
|
||||
|
|
@ -52,6 +53,22 @@ Class SWWMHandler : EventHandler
|
|||
}
|
||||
if ( LevelInfo.MapExists("Z1M1") && (LevelInfo.MapChecksum("Z1M1") ~== "2B7744234ED2C162AD08A3255E979F65") )
|
||||
iskdizd = true;
|
||||
// read bludtype files if they can be found
|
||||
for ( int lmp = Wads.FindLump("BLUDTYPE"); lmp != -1; lmp = Wads.FindLump("BLUDTYPE",lmp+1) )
|
||||
{
|
||||
String dat = Wads.ReadLump(lmp);
|
||||
Array<String> list;
|
||||
// fucking Windows
|
||||
dat.Replace("\r","");
|
||||
list.Clear();
|
||||
dat.Split(list,"\n");
|
||||
for ( int i=0; i<list.Size(); i++ )
|
||||
{
|
||||
if ( (list[i].Length() == 0) || (list[i].Left(2) == "//") || (list[i].Left(1) == "") )
|
||||
continue;
|
||||
bludtypes.Push(list[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override void WorldTick()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue