diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 54f1069dd..99eda461e 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,9 @@ -February 12, 2008 +February 16, 2008 (Changes by Graf Zahl) +- Added customizable pickup flash. +- Added option to show shorter messages for save game and screenshot confirmation. + Also added this to the 'Messages' menu. + +February 15, 2008 - Version bump to 2.2.0. - Disabled console alpha when the console is fullscreen. - Re-enabled maybedrawnow for the software renderer. This should be replaced diff --git a/src/g_game.cpp b/src/g_game.cpp index f0573093b..0f733f550 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -102,6 +102,7 @@ FIntCVar gameskill ("skill", 2, CVAR_SERVERINFO|CVAR_LATCH); CVAR (Int, deathmatch, 0, CVAR_SERVERINFO|CVAR_LATCH); CVAR (Bool, chasedemo, false, 0); CVAR (Bool, storesavepic, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) +CVAR (Bool, longsavemessages, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) gameaction_t gameaction; gamestate_t gamestate = GS_STARTUP; @@ -2065,7 +2066,11 @@ void G_DoSaveGame (bool okForQuicksave, FString filename, const char *descriptio } fclose(stdfile); } - if (success) Printf ("%s (%s)\n", GStrings("GGSAVED"), filename.GetChars()); + if (success) + { + if (longsavemessages) Printf ("%s (%s)\n", GStrings("GGSAVED"), filename.GetChars()); + else Printf ("%s\n", GStrings("GGSAVED")); + } else Printf(PRINT_HIGH, "Save failed\n"); BackupSaveName = filename; diff --git a/src/g_heretic/a_hereticartifacts.cpp b/src/g_heretic/a_hereticartifacts.cpp index 2f51d0f17..4463ea01b 100644 --- a/src/g_heretic/a_hereticartifacts.cpp +++ b/src/g_heretic/a_hereticartifacts.cpp @@ -24,7 +24,7 @@ IMPLEMENT_ACTOR (AArtiTomeOfPower, Heretic, 86, 134) PROP_Flags (MF_SPECIAL|MF_COUNTITEM) PROP_Flags2 (MF2_FLOATBOB) PROP_SpawnState (0) - PROP_Inventory_FlagsSet (IF_PICKUPFLASH) + PROP_Inventory_PickupFlash (1) PROP_Inventory_Icon ("ARTIPWBK") PROP_PowerupGiver_Powerup ("PowerWeaponLevel2") PROP_Inventory_PickupMessage("$TXT_ARTITOMEOFPOWER") @@ -106,7 +106,8 @@ IMPLEMENT_ACTOR (AArtiTimeBomb, Heretic, 34, 72) PROP_Flags2 (MF2_FLOATBOB) PROP_SpawnState (0) PROP_Inventory_DefMaxAmount - PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND) + PROP_Inventory_PickupFlash (1) + PROP_Inventory_FlagsSet (IF_INVBAR|IF_FANCYPICKUPSOUND) PROP_Inventory_Icon ("ARTIFBMB") PROP_Inventory_PickupSound ("misc/p_pkup") PROP_Inventory_PickupMessage("$TXT_ARTIFIREBOMB") diff --git a/src/g_hexen/a_blastradius.cpp b/src/g_hexen/a_blastradius.cpp index 234f2db08..1d77d195a 100644 --- a/src/g_hexen/a_blastradius.cpp +++ b/src/g_hexen/a_blastradius.cpp @@ -37,7 +37,8 @@ IMPLEMENT_ACTOR (AArtiBlastRadius, Hexen, 10110, 74) PROP_Flags2 (MF2_FLOATBOB) PROP_SpawnState (0) PROP_Inventory_DefMaxAmount - PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND) + PROP_Inventory_PickupFlash (1) + PROP_Inventory_FlagsSet (IF_INVBAR|IF_FANCYPICKUPSOUND) PROP_Inventory_Icon ("ARTIBLST") PROP_Inventory_PickupSound ("misc/p_pkup") PROP_Inventory_PickupMessage("$TXT_ARTIBLASTRADIUS") diff --git a/src/g_hexen/a_boostarmor.cpp b/src/g_hexen/a_boostarmor.cpp index 4142845ce..ae18363c6 100644 --- a/src/g_hexen/a_boostarmor.cpp +++ b/src/g_hexen/a_boostarmor.cpp @@ -33,7 +33,8 @@ IMPLEMENT_ACTOR (AArtiBoostArmor, Hexen, 8041, 22) PROP_Flags2 (MF2_FLOATBOB) PROP_SpawnState (0) PROP_Inventory_DefMaxAmount - PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND) + PROP_Inventory_PickupFlash (1) + PROP_Inventory_FlagsSet (IF_INVBAR|IF_FANCYPICKUPSOUND) PROP_Inventory_Icon ("ARTIBRAC") PROP_Inventory_PickupSound ("misc/p_pkup") PROP_Inventory_PickupMessage("$TXT_ARTIBOOSTARMOR") diff --git a/src/g_hexen/a_flechette.cpp b/src/g_hexen/a_flechette.cpp index 8e91dc4e2..2f27da135 100644 --- a/src/g_hexen/a_flechette.cpp +++ b/src/g_hexen/a_flechette.cpp @@ -159,7 +159,8 @@ IMPLEMENT_ACTOR (AArtiPoisonBag, Hexen, 8000, 72) PROP_Flags2 (MF2_FLOATBOB) PROP_SpawnState (0) PROP_Inventory_DefMaxAmount - PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND) + PROP_Inventory_PickupFlash (1) + PROP_Inventory_FlagsSet (IF_INVBAR|IF_FANCYPICKUPSOUND) PROP_Inventory_Icon ("ARTIPSBG") PROP_Inventory_PickupSound ("misc/p_pkup") PROP_Inventory_PickupMessage("$TXT_ARTIPOISONBAG") diff --git a/src/g_hexen/a_healingradius.cpp b/src/g_hexen/a_healingradius.cpp index 3f777650b..fbbe6bf5b 100644 --- a/src/g_hexen/a_healingradius.cpp +++ b/src/g_hexen/a_healingradius.cpp @@ -48,7 +48,8 @@ IMPLEMENT_ACTOR (AArtiHealingRadius, Hexen, 10120, 0) PROP_Flags2 (MF2_FLOATBOB) PROP_SpawnState (0) PROP_Inventory_DefMaxAmount - PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND) + PROP_Inventory_PickupFlash (1) + PROP_Inventory_FlagsSet (IF_INVBAR|IF_FANCYPICKUPSOUND) PROP_Inventory_Icon ("ARTIHRAD") PROP_Inventory_PickupSound ("misc/p_pkup") PROP_Inventory_PickupMessage("$TXT_ARTIHEALINGRADIUS") diff --git a/src/g_hexen/a_summon.cpp b/src/g_hexen/a_summon.cpp index a51fc4721..61b697574 100644 --- a/src/g_hexen/a_summon.cpp +++ b/src/g_hexen/a_summon.cpp @@ -30,7 +30,8 @@ IMPLEMENT_ACTOR (AArtiDarkServant, Hexen, 86, 16) PROP_SpawnState (S_ARTI_SUMMON) PROP_Inventory_RespawnTics (30+4200) PROP_Inventory_DefMaxAmount - PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND) + PROP_Inventory_PickupFlash (1) + PROP_Inventory_FlagsSet (IF_INVBAR|IF_FANCYPICKUPSOUND) PROP_Inventory_Icon ("ARTISUMN") PROP_Inventory_PickupSound ("misc/p_pkup") PROP_Inventory_PickupMessage("$TXT_ARTISUMMON") diff --git a/src/g_hexen/a_teleportother.cpp b/src/g_hexen/a_teleportother.cpp index 2940c3471..75610b3ba 100644 --- a/src/g_hexen/a_teleportother.cpp +++ b/src/g_hexen/a_teleportother.cpp @@ -44,7 +44,8 @@ IMPLEMENT_ACTOR (AArtiTeleportOther, Hexen, 10040, 17) PROP_Flags2 (MF2_FLOATBOB) PROP_SpawnState (S_ARTI_TELOTHER1) PROP_Inventory_DefMaxAmount - PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND) + PROP_Inventory_PickupFlash (1) + PROP_Inventory_FlagsSet (IF_INVBAR|IF_FANCYPICKUPSOUND) PROP_Inventory_Icon ("ARTITELO") PROP_Inventory_PickupSound ("misc/p_pkup") PROP_Inventory_PickupMessage("$TXT_ARTITELEPORTOTHER") diff --git a/src/g_raven/a_artitele.cpp b/src/g_raven/a_artitele.cpp index 410bb62d7..4b2ee066e 100644 --- a/src/g_raven/a_artitele.cpp +++ b/src/g_raven/a_artitele.cpp @@ -31,7 +31,8 @@ IMPLEMENT_ACTOR (AArtiTeleport, Raven, 36, 18) PROP_Flags2 (MF2_FLOATBOB) PROP_SpawnState (0) PROP_Inventory_DefMaxAmount - PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND) + PROP_Inventory_PickupFlash (1) + PROP_Inventory_FlagsSet (IF_INVBAR|IF_FANCYPICKUPSOUND) PROP_Inventory_Icon ("ARTIATLP") PROP_Inventory_PickupSound ("misc/p_pkup") PROP_Inventory_PickupMessage("$TXT_ARTITELEPORT") diff --git a/src/g_shared/a_pickups.cpp b/src/g_shared/a_pickups.cpp index f2a7b8eba..9618c0950 100644 --- a/src/g_shared/a_pickups.cpp +++ b/src/g_shared/a_pickups.cpp @@ -587,18 +587,18 @@ bool AInventory::GoAway () // Dropped items never stick around if (flags & MF_DROPPED) { - if (ItemFlags & IF_PICKUPFLASH) + if (PickupFlash != NULL) { - Spawn (x, y, z, ALLOW_REPLACE); + Spawn(PickupFlash, x, y, z, ALLOW_REPLACE); } return false; } if (!ShouldStay ()) { - if (ItemFlags & IF_PICKUPFLASH) + if (PickupFlash != NULL) { - Spawn (x, y, z, ALLOW_REPLACE); + Spawn(PickupFlash, x, y, z, ALLOW_REPLACE); } Hide (); if (ShouldRespawn ()) @@ -857,7 +857,7 @@ void AInventory::Hide () { SetState (&States[S_HIDESPECIAL]); tics = 1400; - if (ItemFlags & IF_PICKUPFLASH) tics += 30; + if (PickupFlash != NULL) tics += 30; } else { diff --git a/src/g_shared/a_pickups.h b/src/g_shared/a_pickups.h index 3f58cfcd7..0acf90170 100644 --- a/src/g_shared/a_pickups.h +++ b/src/g_shared/a_pickups.h @@ -90,7 +90,7 @@ enum IF_INVBAR = 1<<6, // Item appears in the inventory bar IF_HUBPOWER = 1<<7, // Powerup is kept when moving in a hub IF_INTERHUBSTRIP = 1<<8, // Item is removed when travelling between hubs - IF_PICKUPFLASH = 1<<9, // Item "flashes" when picked up + //IF_PICKUPFLASH = 1<<9, // superseded by 'PickupFlash' property. IF_ALWAYSPICKUP = 1<<10, // For IF_AUTOACTIVATE, MaxAmount=0 items: Always "pick up", even if it doesn't do anything IF_FANCYPICKUPSOUND = 1<<11, // Play pickup sound in "surround" mode IF_BIGPOWERUP = 1<<12, // Affected by RESPAWN_SUPER dmflag @@ -136,6 +136,7 @@ public: int DropTime; // Countdown after dropping DWORD ItemFlags; + const PClass *PickupFlash; // actor to spawn as pickup flash WORD PickupSound; diff --git a/src/info.h b/src/info.h index 60d3670dd..13c6c4da6 100644 --- a/src/info.h +++ b/src/info.h @@ -317,6 +317,7 @@ enum ADEF_Inventory_RespawnTics, ADEF_Inventory_FlagsSet, ADEF_Inventory_FlagsClear, + ADEF_Inventory_PickupFlash, ADEF_PuzzleItem_Number, // Identifies the puzzle item for UsePuzzleItem diff --git a/src/infodefaults.cpp b/src/infodefaults.cpp index eb8ca2563..aad622bb7 100644 --- a/src/infodefaults.cpp +++ b/src/infodefaults.cpp @@ -255,6 +255,7 @@ static void ApplyActorDefault (int defnum, const char *datastr, int dataint) case ADEF_Inventory_FlagsSet: item->ItemFlags |= dataint; break; case ADEF_Inventory_FlagsClear: item->ItemFlags &= ~dataint; break; + case ADEF_Inventory_PickupFlash:item->PickupFlash = dataint? fuglyname("PickupFlash") : NULL; case ADEF_Inventory_Amount: item->Amount = dataint; break; case ADEF_Inventory_RespawnTics:item->RespawnTics = dataint; break; case ADEF_Inventory_MaxAmount: item->MaxAmount = dataint; break; diff --git a/src/infomacros.h b/src/infomacros.h index c103e8f8c..1c7c2de18 100644 --- a/src/infomacros.h +++ b/src/infomacros.h @@ -297,6 +297,7 @@ public: #define PROP_Inventory_RespawnTics(x) ADD_WORD_PROP(ADEF_Inventory_RespawnTics,x) #define PROP_Inventory_FlagsSet(x) ADD_LONG_PROP(ADEF_Inventory_FlagsSet,x) #define PROP_Inventory_FlagsClear(x) ADD_LONG_PROP(ADEF_Inventory_FlagsClear,x) +#define PROP_Inventory_PickupFlash(x) ADD_BYTE_PROP(ADEF_Inventory_PickupFlash, x) #define PROP_PuzzleItem_Number(x) ADD_BYTE_PROP(ADEF_PuzzleItem_Number,x) diff --git a/src/m_misc.cpp b/src/m_misc.cpp index 7c4328279..3909d32ed 100644 --- a/src/m_misc.cpp +++ b/src/m_misc.cpp @@ -81,6 +81,7 @@ FGameConfigFile *GameConfig; CVAR(Bool, screenshot_quiet, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG); CVAR(String, screenshot_type, "png", CVAR_ARCHIVE|CVAR_GLOBALCONFIG); CVAR(String, screenshot_dir, "", CVAR_ARCHIVE|CVAR_GLOBALCONFIG); +EXTERN_CVAR(Bool, longsavemessages); extern void FreeKeySections(); @@ -721,7 +722,9 @@ void M_ScreenShot (const char *filename) if (!screenshot_quiet) { - Printf ("Captured %s\n", autoname.GetChars()); + int slash = -1; + if (!longsavemessages) slash = autoname.LastIndexOfAny(":/\\"); + Printf ("Captured %s\n", autoname.GetChars()+slash+1); } } else diff --git a/src/m_options.cpp b/src/m_options.cpp index c2f6b4b37..26b2c34ce 100644 --- a/src/m_options.cpp +++ b/src/m_options.cpp @@ -92,6 +92,8 @@ CVAR (Float, mouse_sensitivity, 1.f, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) // Show messages has default, 0 = off, 1 = on CVAR (Bool, show_messages, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) CVAR (Bool, show_obituaries, true, CVAR_ARCHIVE) +EXTERN_CVAR (Bool, longsavemessages) +EXTERN_CVAR (Bool, screenshot_quiet) extern int skullAnimCounter; @@ -134,6 +136,11 @@ value_t OnOff[2] = { { 1.0, "On" } }; +value_t OffOn[2] = { + { 0.0, "On" }, + { 1.0, "Off" } +}; + menu_t *CurrentMenu; int CurrentItem; static const char *OldMessage; @@ -794,7 +801,10 @@ static menuitem_t MessagesItems[] = { { cdiscrete, "Critical Messages", {&msg2color}, {21.0}, {0.0}, {0.0}, {TextColors} }, { cdiscrete, "Chat Messages", {&msg3color}, {21.0}, {0.0}, {0.0}, {TextColors} }, { cdiscrete, "Team Messages", {&msg4color}, {21.0}, {0.0}, {0.0}, {TextColors} }, - { cdiscrete, "Centered Messages", {&msgmidcolor}, {21.0}, {0.0}, {0.0}, {TextColors} } + { cdiscrete, "Centered Messages", {&msgmidcolor}, {21.0}, {0.0}, {0.0}, {TextColors} }, + { redtext, " ", {NULL}, {0.0}, {0.0}, {0.0}, {NULL} }, + { discrete, "Screenshot messages", {&screenshot_quiet}, {2.0}, {0.0}, {0.0}, {OffOn} }, + { discrete, "Detailed save messages",{&longsavemessages}, {2.0}, {0.0}, {0.0}, {OnOff} }, }; menu_t MessagesMenu = diff --git a/src/thingdef/thingdef.cpp b/src/thingdef/thingdef.cpp index 47f2f6292..8246b1cd5 100644 --- a/src/thingdef/thingdef.cpp +++ b/src/thingdef/thingdef.cpp @@ -492,10 +492,12 @@ void ParseActor(FScanner &sc) // fields in the weapons // //========================================================================== + void FinishThingdef() { unsigned int i; bool isRuntimeActor=false; + int errorcount=0; for (i = 0;i < PClass::m_Types.Size(); i++) { @@ -517,6 +519,26 @@ void FinishThingdef() GetDefaultByType(ti)->flags &=~MF_COUNTKILL; } + if (ti->IsDescendantOf(RUNTIME_CLASS(AInventory))) + { + AInventory * defaults=(AInventory *)ti->Defaults; + fuglyname v; + + v = defaults->PickupFlash; + if (v != NAME_None && v.IsValidName()) + { + defaults->PickupFlash = PClass::FindClass(v); + if (isRuntimeActor) + { + if (!defaults->PickupFlash) + { + Printf("Unknown pickup flash '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); + errorcount++; + } + } + } + } + // the typeinfo properties of weapons have to be fixed here after all actors have been declared if (ti->IsDescendantOf(RUNTIME_CLASS(AWeapon))) { @@ -531,11 +553,13 @@ void FinishThingdef() { if (!defaults->AmmoType1) { - I_Error("Unknown ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); + Printf("Unknown ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); + errorcount++; } else if (defaults->AmmoType1->ParentClass != RUNTIME_CLASS(AAmmo)) { - I_Error("Invalid ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); + Printf("Invalid ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); + errorcount++; } } } @@ -548,11 +572,13 @@ void FinishThingdef() { if (!defaults->AmmoType2) { - I_Error("Unknown ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); + Printf("Unknown ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); + errorcount++; } else if (defaults->AmmoType2->ParentClass != RUNTIME_CLASS(AAmmo)) { - I_Error("Invalid ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); + Printf("Invalid ammo type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); + errorcount++; } } } @@ -565,11 +591,13 @@ void FinishThingdef() { if (!defaults->SisterWeaponType) { - I_Error("Unknown sister weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); + Printf("Unknown sister weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); + errorcount++; } else if (!defaults->SisterWeaponType->IsDescendantOf(RUNTIME_CLASS(AWeapon))) { - I_Error("Invalid sister weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); + Printf("Invalid sister weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); + errorcount++; } } } @@ -586,10 +614,26 @@ void FinishThingdef() if (ready || select || deselect || fire) { // Do some consistency checks. If these states are undefined the weapon cannot work! - if (!ready) I_Error("Weapon %s doesn't define a ready state.\n", ti->TypeName.GetChars()); - if (!select) I_Error("Weapon %s doesn't define a select state.\n", ti->TypeName.GetChars()); - if (!deselect) I_Error("Weapon %s doesn't define a deselect state.\n", ti->TypeName.GetChars()); - if (!fire) I_Error("Weapon %s doesn't define a fire state.\n", ti->TypeName.GetChars()); + if (!ready) + { + Printf("Weapon %s doesn't define a ready state.\n", ti->TypeName.GetChars()); + errorcount++; + } + if (!select) + { + Printf("Weapon %s doesn't define a select state.\n", ti->TypeName.GetChars()); + errorcount++; + } + if (!deselect) + { + Printf("Weapon %s doesn't define a deselect state.\n", ti->TypeName.GetChars()); + errorcount++; + } + if (!fire) + { + Printf("Weapon %s doesn't define a fire state.\n", ti->TypeName.GetChars()); + errorcount++; + } } } @@ -606,15 +650,21 @@ void FinishThingdef() defaults->WeaponClass = PClass::FindClass(v); if (!defaults->WeaponClass) { - I_Error("Unknown weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); + Printf("Unknown weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); + errorcount++; } else if (!defaults->WeaponClass->IsDescendantOf(RUNTIME_CLASS(AWeapon))) { - I_Error("Invalid weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); + Printf("Invalid weapon type '%s' in '%s'\n", v.GetChars(), ti->TypeName.GetChars()); + errorcount++; } } } } + if (errorcount > 0) + { + I_Error("%d errors during actor postprocessing", errorcount); + } // Since these are defined in DECORATE now the table has to be initialized here. for(int i=0;i<31;i++) diff --git a/src/thingdef/thingdef_properties.cpp b/src/thingdef/thingdef_properties.cpp index 22e5f0b9d..315f8703a 100644 --- a/src/thingdef/thingdef_properties.cpp +++ b/src/thingdef/thingdef_properties.cpp @@ -247,12 +247,14 @@ static flagdef InventoryFlags[] = DEFINE_FLAG(IF, INVBAR, AInventory, ItemFlags), DEFINE_FLAG(IF, HUBPOWER, AInventory, ItemFlags), DEFINE_FLAG(IF, INTERHUBSTRIP, AInventory, ItemFlags), - DEFINE_FLAG(IF, PICKUPFLASH, AInventory, ItemFlags), DEFINE_FLAG(IF, ALWAYSPICKUP, AInventory, ItemFlags), DEFINE_FLAG(IF, FANCYPICKUPSOUND, AInventory, ItemFlags), DEFINE_FLAG(IF, BIGPOWERUP, AInventory, ItemFlags), DEFINE_FLAG(IF, KEEPDEPLETED, AInventory, ItemFlags), DEFINE_FLAG(IF, IGNORESKILL, AInventory, ItemFlags), + + DEFINE_DEPRECATED_FLAG(PICKUPFLASH, AInventory, 5), + }; static flagdef WeaponFlags[] = @@ -398,6 +400,9 @@ static void HandleDeprecatedFlags(AActor *defaults, bool set, int index) case 4: // LONGMELEERANGE defaults->meleethreshold = set? 196*FRACUNIT : 0; break; + case 5: // INVENTORY.PICKUPFLASH + static_cast(defaults)->PickupFlash = set? fuglyname("PickupFlash") : NULL; + break; default: break; // silence GCC } @@ -1816,6 +1821,15 @@ static void InventoryDefMaxAmount (FScanner &sc, AInventory *defaults, Baggage & } +//========================================================================== +// +//========================================================================== +static void InventoryPickupflash (FScanner &sc, AInventory *defaults, Baggage &bag) +{ + sc.MustGetString(); + defaults->PickupFlash = fuglyname(sc.String); +} + //========================================================================== // //========================================================================== @@ -2500,6 +2514,7 @@ static const ActorProps props[] = { "inventory.givequest", (apf)InventoryGiveQuest, RUNTIME_CLASS(AInventory) }, { "inventory.icon", (apf)InventoryIcon, RUNTIME_CLASS(AInventory) }, { "inventory.maxamount", (apf)InventoryMaxAmount, RUNTIME_CLASS(AInventory) }, + { "inventory.pickupflash", (apf)InventoryPickupflash, RUNTIME_CLASS(AInventory) }, { "inventory.pickupmessage", (apf)InventoryPickupmsg, RUNTIME_CLASS(AInventory) }, { "inventory.pickupsound", (apf)InventoryPickupsound, RUNTIME_CLASS(AInventory) }, { "inventory.respawntics", (apf)InventoryRespawntics, RUNTIME_CLASS(AInventory) },