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

And the UN help increase in money didn't worked... because all the Action Buttons are bugged and using fixed values #32

Closed
Clauvin opened this issue Apr 28, 2017 · 8 comments
Assignees

Comments

@Clauvin
Copy link
Owner

Clauvin commented Apr 28, 2017

The bug is: after increasing the UNHelpVariation by 1, the value given by the United Nations does not increase.

@Clauvin Clauvin added the bug label Apr 28, 2017
@Clauvin Clauvin added this to the Beta 0 Version milestone Apr 28, 2017
@Clauvin Clauvin self-assigned this Apr 28, 2017
@Clauvin
Copy link
Owner Author

Clauvin commented Apr 28, 2017

So, here's the problem's cause: ...the Action is created with a fixed value. Calling it later uses that fixed value.

@Clauvin
Copy link
Owner Author

Clauvin commented Apr 28, 2017

Possible solutions:

1 - Change that value when any other value related changes.
2 - Do a McGyverism with the code tha we have and make this work.
3 - Don't make this work, just avoid situations like this in the future.

@Clauvin
Copy link
Owner Author

Clauvin commented Apr 28, 2017

Damn. I just realized, but this means that ALL THE ACTION BUTTONS ARE BROKEN. Every single one of them uses numbers created in the start of the game. Their equations... all their equations... don't reflect values that change while the game goes.

Dammit.

@Clauvin Clauvin changed the title And the UN help increase in money didn't worked... And the UN help increase in money didn't worked... because all the Action Buttons are bugged Apr 28, 2017
@Clauvin
Copy link
Owner Author

Clauvin commented Apr 28, 2017

More work than initially expected, since the Action Buttons system works with constants created at game start, and they should work with variables.

In other words, the PlayerAction now has to work in a way that calls for functions with values, instead of values.

@Clauvin
Copy link
Owner Author

Clauvin commented May 3, 2017

Fine.

To solve this, the solution is to make the events work with Delegates. The delegates will store functions and that functions will be used in realtime.

@Clauvin
Copy link
Owner Author

Clauvin commented May 3, 2017

Ok, to make everything more organized (considering that I will have to create... 7 new functions to be called by Actions...) I will create a new class called ActionConstructor, to deal with creating Actions and their respective functions.

@Clauvin Clauvin changed the title And the UN help increase in money didn't worked... because all the Action Buttons are bugged And the UN help increase in money didn't worked... because all the Action Buttons are twice bugged May 3, 2017
@Clauvin
Copy link
Owner Author

Clauvin commented May 3, 2017

So. Yeah. The "calculations only at the start" doesn't apply only to the values created when the buttons are pressed, but also to the cooldown period.

This doesn't look much like a problem and is not... until the time is changed to pass faster... but the cooldowns are all using the first "time speed" value.

I'm creating another issue, to avoid bogging down too much this page.

@Clauvin Clauvin changed the title And the UN help increase in money didn't worked... because all the Action Buttons are twice bugged And the UN help increase in money didn't worked... because all the Action Buttons are very bugged May 3, 2017
@Clauvin Clauvin changed the title And the UN help increase in money didn't worked... because all the Action Buttons are very bugged And the UN help increase in money didn't worked... because all the Action Buttons are bugged May 3, 2017
@Clauvin Clauvin changed the title And the UN help increase in money didn't worked... because all the Action Buttons are bugged And the UN help increase in money didn't worked... because all the Action Buttons are bugged and using fixed values May 3, 2017
Clauvin added a commit that referenced this issue May 3, 2017
ActionConstructor creates the PlayerActions that the player will use in
the game and also stores the functions that will be called by the
actions.
Clauvin added a commit that referenced this issue May 3, 2017
Clauvin added a commit that referenced this issue May 3, 2017
...both constructors were using the RESULTS of the functions, instead of
the functions themselves.
Clauvin added a commit that referenced this issue May 3, 2017
Clauvin added a commit that referenced this issue May 3, 2017
Clauvin added a commit that referenced this issue May 3, 2017
Clauvin added a commit that referenced this issue May 3, 2017
@Clauvin
Copy link
Owner Author

Clauvin commented May 3, 2017

And that's that, bug finally fixed.

@Clauvin Clauvin closed this as completed May 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant