Azylaminaz
Vox Populi
- Reaction score
- 91
I wanted to recode one of my maps that was developed by many people over many years (very messy). For this, though, I wanted to create a really strong, stable map core... The features of the map would be added to that (I want the map designed to be easy to modify by myself and others).
To do this, at the very center of the core, I wanted four basic collections (structs): all, team, user, and object. Object would be contained by user, user by team, and team by all. Object would be any unit. All would be a general collection which holds the teams and can do a few methods (such as flushing and whatnot).
My goal is for the entire system to be elegant. The current version of the map is near impossible for me to edit without causing random, chaotic bugs somewhere else. -_-
ATM what I've done is start with an interface baseS which objectS extends, userS extends objectS, teamS extends objectS, and all extends teamS. I've created a parent method for all of them which returns the container. The problem is returning a child (the children would obvious be itself). Originally I started with four globals for the levels of collection but decided that would be chaotic to work with and would much rather prefer each collection to contain the variables (not global). This obviously gives me the problem of variables requiring a set size.
Is there anyway to go about this without using a whole mess of globals or internal collections (force/group)? I haven't gone much pass structs in vJASS, so I don't know all the nifty things that are available. ^^
To do this, at the very center of the core, I wanted four basic collections (structs): all, team, user, and object. Object would be contained by user, user by team, and team by all. Object would be any unit. All would be a general collection which holds the teams and can do a few methods (such as flushing and whatnot).
My goal is for the entire system to be elegant. The current version of the map is near impossible for me to edit without causing random, chaotic bugs somewhere else. -_-
ATM what I've done is start with an interface baseS which objectS extends, userS extends objectS, teamS extends objectS, and all extends teamS. I've created a parent method for all of them which returns the container. The problem is returning a child (the children would obvious be itself). Originally I started with four globals for the levels of collection but decided that would be chaotic to work with and would much rather prefer each collection to contain the variables (not global). This obviously gives me the problem of variables requiring a set size.
Is there anyway to go about this without using a whole mess of globals or internal collections (force/group)? I haven't gone much pass structs in vJASS, so I don't know all the nifty things that are available. ^^