Adapt NiGHTS items to UDMF

This commit is contained in:
MascaraSnake 2021-12-28 14:01:45 +01:00
parent b4a206c063
commit 42f823600c
4 changed files with 75 additions and 11 deletions

View file

@ -6866,26 +6866,76 @@ udmf
{
title = "Super Paraloop";
sprite = "NPRUA0";
arg0
{
title = "Flags";
type = 12;
enum
{
1 = "Bonus time only";
2 = "Spawn immediately";
}
}
}
1708
{
title = "Drill Refill";
sprite = "NPRUB0";
arg0
{
title = "Flags";
type = 12;
enum
{
1 = "Bonus time only";
2 = "Spawn immediately";
}
}
}
1709
{
title = "Nightopian Helper";
sprite = "NPRUC0";
arg0
{
title = "Flags";
type = 12;
enum
{
1 = "Bonus time only";
2 = "Spawn immediately";
}
}
}
1711
{
title = "Extra Time";
sprite = "NPRUD0";
arg0
{
title = "Flags";
type = 12;
enum
{
1 = "Bonus time only";
2 = "Spawn immediately";
}
}
}
1712
{
title = "Link Freeze";
sprite = "NPRUE0";
arg0
{
title = "Flags";
type = 12;
enum
{
1 = "Bonus time only";
2 = "Spawn immediately";
}
}
}
1713
{

View file

@ -13105,19 +13105,24 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
if (mthing->options & MTF_OBJECTSPECIAL) // No egg trap for this boss
mobj->flags2 |= MF2_BOSSNOTRAP;
}
if (mobj->flags & MF_NIGHTSITEM)
{
// Requires you to be in bonus time to activate
if (mthing->args[0] & TMNI_BONUSONLY)
mobj->flags2 |= MF2_STRONGBOX;
// Spawn already displayed
if (mthing->args[0] & TMNI_REVEAL)
{
mobj->flags |= MF_SPECIAL;
mobj->flags &= ~MF_NIGHTSITEM;
}
}
return true;
}
static void P_SetAmbush(mobj_t *mobj)
{
if (mobj->flags & MF_NIGHTSITEM)
{
// Spawn already displayed
mobj->flags |= MF_SPECIAL;
mobj->flags &= ~MF_NIGHTSITEM;
}
if (mobj->flags & MF_PUSHABLE)
mobj->flags &= ~MF_PUSHABLE;
@ -13163,10 +13168,6 @@ static void P_SetObjectSpecial(mobj_t *mobj)
mobj->flags2 |= MF2_STRONGBOX;
}
// Requires you to be in bonus time to activate
if (mobj->flags & MF_NIGHTSITEM)
mobj->flags2 |= MF2_STRONGBOX;
// Pushables bounce and slide coolly with object special flag set
if (mobj->flags & MF_PUSHABLE)
{

View file

@ -4896,6 +4896,13 @@ static void P_ConvertBinaryMap(void)
mapthings[i].args[2] = LE_ALLBOSSESDEAD + paramoffset;
mapthings[i].args[3] = LE_PINCHPHASE + paramoffset;
}
if (mobjinfo[mobjtype].flags & MF_NIGHTSITEM)
{
if (mapthings[i].options & MTF_OBJECTSPECIAL)
mapthings[i].args[0] |= TMNI_BONUSONLY;
if (mapthings[i].options & MTF_AMBUSH)
mapthings[i].args[0] |= TMNI_REVEAL;
}
}
if (mapthings[i].type >= 1 && mapthings[i].type <= 35) //Player starts

View file

@ -82,6 +82,12 @@ typedef enum
TMGD_LEFT = 2,
} textmapguarddirection_t;
typedef enum
{
TMNI_BONUSONLY = 1,
TMNI_REVEAL = 1<<1,
} textmapnightsitem_t;
//FOF flags
typedef enum
{