Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getter to allow other objects to read the m_Sector of a SectorEffect #411

Closed
wants to merge 1 commit into from
Closed

Getter to allow other objects to read the m_Sector of a SectorEffect #411

wants to merge 1 commit into from

Conversation

OrdinaryMagician
Copy link
Contributor

Since the m_Sector variable should be protected, one way to give read-only access to others would clearly be with a "GetSector" function in the class.

…to its m_Sector variable to outside objects.
@coelckers
Copy link
Member

What's the point of having this?

@OrdinaryMagician
Copy link
Contributor Author

OrdinaryMagician commented Jan 27, 2018

If you need to stop effects on a specific sector through zscript, you'd need to check that variable while iterating through sectoreffects. e.g.: like what Light_Stop does in ACS, except checking actual, specific sectors instead of a sector tag.

I know, most of my submissions are just ZScript equivalents of what can already be done in ACS.

Also I guess in the future I should link back to the code submission threads where I actually explain what the purpose of these are. (thread for this one)

@MajorCooke
Copy link
Contributor

I am in full support for this too. Being able to do stuff without requiring calling an ACS script with a tag would be a godsend. TIDs, when working with ZScript can become quite an annoyance, especially if you just want to raise one platform instead of all of them without needing to assign additional TIDs.

@OrdinaryMagician
Copy link
Contributor Author

Closing this one since Graf suggested a different solution.

@OrdinaryMagician OrdinaryMagician deleted the sectoreffect_getter branch January 28, 2018 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants