Skip to content

More game action visitors added (all Park, Staff, Guest, Banner)#12933

Closed
tombomp wants to merge 8 commits into
OpenRCT2:developfrom
tombomp:GameActionVisitors
Closed

More game action visitors added (all Park, Staff, Guest, Banner)#12933
tombomp wants to merge 8 commits into
OpenRCT2:developfrom
tombomp:GameActionVisitors

Conversation

@tombomp

@tombomp tombomp commented Sep 15, 2020

Copy link
Copy Markdown
Contributor

There's a lot of files changed here but it's all pretty rote stuff. There's still a few involving a MapRange that don't have a visitor, this is just all the simple ones.

With the names if I noticed an already existing similar one was using a name different to the variable I used that, otherwise I mostly just copied the variable name. Obviously any better naming suggestions are welcome.


void AcceptParameters(GameActionParameterVisitor & visitor) override
{
visitor.Visit("type", _type);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm what would plugin users pass for this?

{
}

void AcceptParameters(GameActionParameterVisitor & visitor) override

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not expose this action it should never be used by plugins it is only used by TrackDesigns.

{
}

void AcceptParameters(GameActionParameterVisitor & visitor) override

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debatable if this is safe to perform from a plugin. Pretty sure this will unload the plugin.


void AcceptParameters(GameActionParameterVisitor & visitor) override
{
visitor.Visit("parameter", _parameter);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this action does not follow the order of other commands. value should be parameter and parameter should be some sort of type

void AcceptParameters(GameActionParameterVisitor & visitor) override
{
visitor.Visit("setting", _setting);
visitor.Visit("value", _value);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parameter?

@duncanspumpkin

Copy link
Copy Markdown
Contributor

There are a few here that I do not think should be usable by plugins and others that are dangerous to use. A lot of the parameters need some careful thought on their names as we should standardise it as much as possible to prevent issues with later renaming.

@Gymnasiast

Copy link
Copy Markdown
Member

@tombomp Are you still working on this?

@tombomp

tombomp commented Dec 17, 2020

Copy link
Copy Markdown
Contributor Author

@tombomp Are you still working on this?

Ah sorry real life got in the way but I'm not, sorry. I'll close it, sorry for not finishing it. Some of these have been added by other PRs anyway and the rest has enough issues someone else should probably start from scratch re naming and which ones are worth exposing. Sorry once again.

@tombomp tombomp closed this Dec 17, 2020
@tupaschoal

Copy link
Copy Markdown
Member

No need to be sorry, it happens. Thanks for letting us know and feel free to come back when you're freer :)

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.

4 participants