Page MenuHomeFeedback Tracker

Enum.Insert request
New, NormalPublic

Description

The modded and inherited enum is nice and all, but in most cases, all we really need is a way to insert new enums into the tail end of the existing one.

I propose a similar system as used in arrays, to allow modders to Insert new enums. We do not need the ability to remove or re-order the existing ones, as that could potentially break the system, however inserting a new element would not affect current functionality.

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Operating System Version
N/A
Category
General

Event Timeline

Unknown Object (User) added a subscriber: Unknown Object (User).May 13 2019, 1:25 PM
rVn claimed this task.May 13 2019, 3:12 PM
rVn triaged this task as Normal priority.

Add an example of where would you want to use this please

AussieCleetus added a comment.EditedMay 13 2019, 3:56 PM

Salutesh and I were just discussing this.

A good example is player stats, rather than having to make a new enum, inheriting the old one, then going through and changing the enum reference where needed for anything being edited, allowing us to simply add a new enum into the existing one, would mean simply easier following of the flow of code.

I've read the inheritance documentation and definitely understand that the same outcome can be achieved using the current system, but for the average coder, it might be a bit too complicated of a concept.

Seeing as inserting a new element to the enum at the end is effectively the same as inheriting the old enum into a new one and adding the new entries, it's more of a "QOL/Ease of use" request than a "we really desperately need it this way".

It's effectively on par with having allowed us to re-define constants. Not a huge change, but a nice QOL/Ease of use addition.

I was thinking about this a little bit, and thought to myself what I would do with a Enum.Insert, and I have determined that my use would be to add EventTypes, so I could make a custom events that would run on the event system. Unless there is a simpler way of doing this.

That's actually should be done, if I want to add a new option into the game, I need to mod the EDayZProfilesOptions enum, instead, overwriting where it's used.

NiiRoZz removed a subscriber: NiiRoZz.Jul 28 2019, 1:30 AM
NiiRoZz added a subscriber: NiiRoZz.