Inventory UNCLEARABLE flag

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Inventory UNCLEARABLE flag

Re: Inventory UNCLEARABLE flag

by Graf Zahl » Fri Feb 01, 2019 11:30 am

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.

Re: Inventory UNCLEARABLE flag

by Major Cooke » Fri Feb 01, 2019 10:29 am

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.

Re: Inventory UNCLEARABLE flag

by Apeirogon » Fri Feb 01, 2019 10:26 am

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.

Re: Inventory UNCLEARABLE flag

by Major Cooke » Fri Feb 01, 2019 10:16 am

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.

Re: Inventory UNCLEARABLE flag

by phantombeta » Fri Feb 01, 2019 10:00 am

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.

Re: Inventory UNCLEARABLE flag

by Rachael » Fri Feb 01, 2019 9:50 am

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.

Inventory UNCLEARABLE flag

by Major Cooke » Fri Feb 01, 2019 9:41 am

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.

Top