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

[Steam Version] Cannot click the big cookie #950

Closed
AFKoncore opened this issue Sep 2, 2021 · 15 comments
Closed

[Steam Version] Cannot click the big cookie #950

AFKoncore opened this issue Sep 2, 2021 · 15 comments
Labels

Comments

@AFKoncore
Copy link

Describe the bug
When loading this mod on the Steam version and clicking the big cookie the animation plays fine but you get no cookie, the number of time clicked in the Stats tab does not increase.

Browser
Steam Version (Electron)

@AFKoncore AFKoncore added the Bug label Sep 2, 2021
@DanielNoord
Copy link
Collaborator

I currently don't have the Steam version myself so I can't really investigate this. Does the game work besides the big cookie?

@TFHatGuy
Copy link

TFHatGuy commented Sep 2, 2021

I currently don't have the Steam version myself so I can't really investigate this. Does the game work besides the big cookie?

It seems to from what I've seen of it – the bottom bar appears, and the colourings work on buildings as intended; though I hadn't bothered importing my web save to check on things like sounds or flashes, I imagine they would work fine too – though I wouldn't be 100% certain of that.

@AFKoncore
Copy link
Author

@DanielNoord I sent you a DM on reddit re: getting you the Steam version, if you want it.

@DanielNoord
Copy link
Collaborator

See my response to your DM on reddit.

For others, I currently don't have access to a windows computer (only a Mac) so even with the game I wouldn't be able to test anything. When I get my hands on a windows computer I will try and fix these bugs asap.
In the meantime, if anybody wants to open a PR to try and fix some of the issues you are more than welcome to!

@Reaver01
Copy link

Reaver01 commented Sep 2, 2021

Here's what I can gather rn on the clicking issue:

image

It looks like e ends up undefined and breaks clicking.

image

It can technically be fixed by removing this section out of the if statement on line 4634 in main.js, but there is probably a better solution that I'm too tired to think of.

@Urganot
Copy link
Contributor

Urganot commented Sep 2, 2021

@Reaver01 hwo do you open the console ingame? I might be able to help but i have no idea how to debug it

@LeapingSheep
Copy link

@Reaver01 hwo do you open the console ingame? I might be able to help but i have no idea how to debug it

steamapps\common\Cookie Clicker\resources\app
Edit start.js and at line 7 change false to true.

@Urganot
Copy link
Contributor

Urganot commented Sep 2, 2021

The problem seems to be the eventhandler itself. for some reason it is called but doesnt receive the event.
image

@Urganot
Copy link
Contributor

Urganot commented Sep 2, 2021

When executing AddEvent(bigCookie,'click',Game.ClickCookie); in the console, the handler will be called twice. the first time e is undefined the second time e is populated.
Maybe the AddEvent(bigCookie,'click',Game.ClickCookie); (line 4713) is too early in the lifecycle?

@Urganot
Copy link
Contributor

Urganot commented Sep 2, 2021

@DanielNoord The problem lies int he FixMouseY function
after being initialized here
image
The function then calls the Game.CookieClicked eventhandler
image
In the end the event doesnt reach the Game.ClickCookie method

I dont know js well enough to fix this though

@Urganot
Copy link
Contributor

Urganot commented Sep 2, 2021

They changed the code here from the web game in the web its
image
while in steam its
image

@Urganot
Copy link
Contributor

Urganot commented Sep 2, 2021

I think i fixed it. I opened PR #953
ypu can test it by using https://urganot.github.io/CookieMonster/dist/CookieMonsterDev.js as the source
image

Version warning is not fixed

@LeapingSheep
Copy link

LeapingSheep commented Sep 2, 2021

❤️ Its working with your CookieMonsterDev.js!!!

@DanielNoord
Copy link
Collaborator

Going to push this ASAP! Thanks for your amazing and quick work here @Urganot

@DanielNoord
Copy link
Collaborator

Closed with #953, let me know if there are any problems accessing it from the normal link!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants