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.
Inventory UNCLEARABLE flag
Moderator: GZDoom Developers
- Major Cooke
- Posts: 8176
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Inventory UNCLEARABLE flag
Last edited by Major Cooke on Fri Feb 01, 2019 11:31 am, edited 2 times in total.
Re: Inventory UNCLEARABLE flag
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.
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.
- phantombeta
- Posts: 2089
- 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
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.
- Major Cooke
- Posts: 8176
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: Inventory UNCLEARABLE flag
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.
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.
Re: Inventory UNCLEARABLE flag
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.
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.
- Major Cooke
- Posts: 8176
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: Inventory UNCLEARABLE flag
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.
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.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49073
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Inventory UNCLEARABLE flag
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.