Inventory UNCLEARABLE flag

Moderator: GZDoom Developers

Post Reply
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Inventory UNCLEARABLE flag

Post by Major Cooke »

Graf has merged this PR so this can be closed.

Pull Request
I'd like to allow items to remain droppable at any time, yet immune to ClearInventory.
Last edited by Major Cooke on Fri Feb 01, 2019 11:31 am, edited 2 times in total.
User avatar
Rachael
Posts: 13542
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Inventory UNCLEARABLE flag

Post by Rachael »

In the wake of what seems to be yet another trend of creating yet another massive pile of very light-weight convenience features - why do you need this?

I'll be honest - the reason why I don't like this is because ClearInventry() in my opinion should do exactly what it implies - the need for exceptions for every little thing in the game engine is senseless to me - which often evolves into exceptions to exceptions - and the DamageMobj refactor should stand as a perfect testament to that.

Piling on exception to the exception after exception to the exception after 50 dozen more exceptions is exactly what gets the engine into such an unwieldy state in the long run.
User avatar
phantombeta
Posts: 2088
Joined: Thu May 02, 2013 1:27 am
Operating System Version (Optional): Windows 10
Graphics Processor: nVidia with Vulkan support
Location: Brazil

Re: Inventory UNCLEARABLE flag

Post by phantombeta »

In this case, there's a real use case for the feature: depending on what you're doing with your mod (an RPG mod, for example), ClearInventory can actually completely break the mod - I imagine this would be for situations like that.
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Inventory UNCLEARABLE flag

Post by Major Cooke »

Adding onto what Phantom said, I would have to create hacky workarounds that make it even MORE unwieldy than introducing an Unclearable flag, JUST so I can clear the Undroppable flag and then drop an item.

An upcoming mod of mine is reliant upon ensuring inter-mod compatibility will work properly, since you can have multiple players at once.
Last edited by Major Cooke on Fri Feb 01, 2019 10:47 am, edited 2 times in total.
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: Inventory UNCLEARABLE flag

Post by Apeirogon »

But clear inventory is virtual, so you can override it with you own function.
https://github.com/coelckers/gzdoom/blo ... y.txt#L314
Or you talking about acs clear inventory function?

Also, yes, "exception to the exception for the exception" is not good. Since at some moment function would contain only exception for the exceptions, with handling for the exceptions which doesnt except exceptions from the previous exceptions list.
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Inventory UNCLEARABLE flag

Post by Major Cooke »

The scope of that function is too narrow.

ClearInventory would need to be applied to other actors when they might not even exist in the mod, or some actors that are incapable of inheriting from another.

Furthermore, stacking on check after check for actor classes/names costs more than an extra check for a flag.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Inventory UNCLEARABLE flag

Post by Graf Zahl »

While I understand Rachael's reservations for cluttering up the code, this is simple enough to not become an obstacle like the infamous pain flags.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”