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

Add "Ignore research status" cheat #5815

Merged
merged 2 commits into from
Jul 23, 2017
Merged

Conversation

wolfreak99
Copy link
Contributor

For a long time I've attempted to make a cheat that would invent all the items, to be used over multiplayer. Despite numerous attempts, I can't seem to grasp the algorithm of the research list. Errors happen, list doesn't organize right, infinite loops, etc. It recently hit me that it could be handled indirectly by having the windows (the only areas the invention status is checked) ignore the status, that way the research list is not actually affected.

This does not reload the windows, however. That will need to be done manually. This is to preserve scroll positions and also prevent someone on multiplayer from enabling/disabling the cheat and throwing off someones click.

@Gymnasiast
Copy link
Member

Rather than adding checks everywhere, wouldn't it be a better idea to have ride_type_is_invented() always return true when in this mode?

@wolfreak99
Copy link
Contributor Author

@Gymnasiast for the sake of stability, i chose to avoid adding the checks inside the research.c (such as here ). if i were to have ride_type_invented check the cheats mode, would i be able to modify it to be ride_type_is_invented(sint32 type, bool bypassCheat) or something of that sort?

Or i could rewrite
bool ride_type_is_invented(sint32 type)
to

bool ride_type_is_invented(sint32 type) { return ride_type_is_invented_ext(type, false); }

that way the portions inside research.c can just check ride_type_is_invented_ext(type, true)

@wolfreak99 wolfreak99 force-pushed the invent branch 3 times, most recently from 13f2677 to 3bff785 Compare July 15, 2017 21:47
@Gymnasiast
Copy link
Member

Hm, good point. I'll have to think about this.

@wolfreak99
Copy link
Contributor Author

@Gymnasiast I apologize about the multiple pushing spam, I was trying to fix something and i kept forgetting to amend the message etc.

But i did change it to how you suggested so it won't effect too many files. The main issue I was worried about is it being also read inside research_finish_item, I don't want to break anything so I did add a temporary disable to the cheat inside there to be safe. It makes sense to listen to the cheats when attempting to build a new ride, but not while it's actually performing the research. I really hope i'm making sense right now, my mind is really scattered at the second from these pain killers

@Gymnasiast
Copy link
Member

On second thought, your initial solution might be better after all - it played safer. Sorry for the U-turn on this.
Could you drop the last commit and rebase this?

@wolfreak99 wolfreak99 force-pushed the invent branch 2 times, most recently from 86b0e30 to 64bf75a Compare July 23, 2017 00:33
@Gymnasiast Gymnasiast merged commit 47a89c4 into OpenRCT2:develop Jul 23, 2017
janisozaur added a commit to janisozaur/OpenRCT2 that referenced this pull request Aug 9, 2017
- Feature: [OpenRCT2#5815] Add cheat to ignore research status and access rides/scenery not yet invented.
- Feature: [OpenRCT2#5857] Keyboard shortcut for clear scenery.
- Feature: [OpenRCT2#5877] Allow up to 16 stations to be synchronised
- Feature: [OpenRCT2#5970] The Bobsleigh Roller Coaster now supports on-ride photos.
- Feature: [OpenRCT2#5991] Allow all tracked rides that can be tested without guests to the Track Designer
- Fix: [OpenRCT2#2127, OpenRCT2#2229, OpenRCT2#5586] Mountain tool cost calculation
- Fix: [OpenRCT2#3589] Crash due to invalid footpathEntry in path_paint
- Fix: [OpenRCT2#3852] Constructing path not clearing scenery on server.
- Fix: [OpenRCT2#4455] Crash in window_sign_invalidate due to original bug
- Fix: [OpenRCT2#4715] Fix OpenGL rendering of water when zoomed. See OpenRCT2#5890.
- Fix: [OpenRCT2#4931] Crash in path_paint - footpathentry was null
- Fix: [OpenRCT2#5629] Issue with tower ride modes approach to station - incorrect sum caused sawtooth in velocity
- Fix: [OpenRCT2#5768] Prevent loading non-existent title sequences.
- Fix: [OpenRCT2#5858] Crash when using custom ride with no colour presets.
- Fix: [OpenRCT2#5865] Ride preview flickering on uneven terrain or mid air.
- Fix: [OpenRCT2#5872] Incorrect OpenGL rendering of masked sprites
- Fix: [OpenRCT2#5880] Leaving bumper cars without building causes assertion.
- Fix: [OpenRCT2#5890] Fix zoomed OpenGL rendering of special sprites with primary and secondary colours.
- Fix: [OpenRCT2#5912] Negative queue when moving entrance in paused state.
- Fix: [OpenRCT2#5920] Placing guest spawn doesn't do anything every 3rd click
- Fix: [OpenRCT2#5939] Crash when importing 'Six Flags Santa Fe'.
- Fix: [OpenRCT2#5977] Custom music files not showing up in music list
- Fix: [OpenRCT2#5981] Ride list doesn't update after using quick demolish.
- Fix: [OpenRCT2#5984] Allow socket binding to same port after crash
- Fix: [OpenRCT2#5998] Staff not getting paid / no loan interest.
- Fix: [OpenRCT2#6026] 'Select ride to advertise' dropdown does not display all items.
- Fix: [OpenRCT2#6052] Unable to place entrance/exit on certain ride types.
- Fix: [OpenRCT2#6071] Quick demolish can delete protected ride.
- Fix: [OpenRCT2#6111] Mute button always visible in editor.
- Fix: [OpenRCT2#6113] Track preview shows incorrect highest drop height.
- Improved: [OpenRCT2#2223] Change mountain tool to ignore higher surrounding tiles.
- Improved: [OpenRCT2#4301] Leading and trailing whitespace in player name is now removed.
- Improved: [OpenRCT2#5859] OpenGL rendering performance
- Improved: [OpenRCT2#5863] Switching drawing engines no longer requires the application to restart.
- Improved: [OpenRCT2#6003] Doors placed on tracks will now work with all vehicles
- Improved: [OpenRCT2#6037] Autosaves are now stored in a subfolder
- Improved: The land tool buttons can now be held down to increase/decrease size.
- Improved: Dropdowns longer than 32 items overflow into columns.
- Improved: Ride Type option in ride window is now a dropdown.
- Improved: "About OpenRCT2" window redesigned, now contains OpenRCT2 info and access to changelog
janisozaur added a commit that referenced this pull request Aug 9, 2017
- Feature: [#5815] Add cheat to ignore research status and access rides/scenery not yet invented.
- Feature: [#5857] Keyboard shortcut for clear scenery.
- Feature: [#5877] Allow up to 16 stations to be synchronised
- Feature: [#5970] The Bobsleigh Roller Coaster now supports on-ride photos.
- Feature: [#5991] Allow all tracked rides that can be tested without guests to the Track Designer
- Fix: [#2127, #2229, #5586] Mountain tool cost calculation
- Fix: [#3589] Crash due to invalid footpathEntry in path_paint
- Fix: [#3852] Constructing path not clearing scenery on server.
- Fix: [#4455] Crash in window_sign_invalidate due to original bug
- Fix: [#4715] Fix OpenGL rendering of water when zoomed. See #5890.
- Fix: [#4931] Crash in path_paint - footpathentry was null
- Fix: [#5629] Issue with tower ride modes approach to station - incorrect sum caused sawtooth in velocity
- Fix: [#5768] Prevent loading non-existent title sequences.
- Fix: [#5858] Crash when using custom ride with no colour presets.
- Fix: [#5865] Ride preview flickering on uneven terrain or mid air.
- Fix: [#5872] Incorrect OpenGL rendering of masked sprites
- Fix: [#5880] Leaving bumper cars without building causes assertion.
- Fix: [#5890] Fix zoomed OpenGL rendering of special sprites with primary and secondary colours.
- Fix: [#5912] Negative queue when moving entrance in paused state.
- Fix: [#5920] Placing guest spawn doesn't do anything every 3rd click
- Fix: [#5939] Crash when importing 'Six Flags Santa Fe'.
- Fix: [#5977] Custom music files not showing up in music list
- Fix: [#5981] Ride list doesn't update after using quick demolish.
- Fix: [#5984] Allow socket binding to same port after crash
- Fix: [#5998] Staff not getting paid / no loan interest.
- Fix: [#6026] 'Select ride to advertise' dropdown does not display all items.
- Fix: [#6052] Unable to place entrance/exit on certain ride types.
- Fix: [#6071] Quick demolish can delete protected ride.
- Fix: [#6111] Mute button always visible in editor.
- Fix: [#6113] Track preview shows incorrect highest drop height.
- Improved: [#2223] Change mountain tool to ignore higher surrounding tiles.
- Improved: [#4301] Leading and trailing whitespace in player name is now removed.
- Improved: [#5859] OpenGL rendering performance
- Improved: [#5863] Switching drawing engines no longer requires the application to restart.
- Improved: [#6003] Doors placed on tracks will now work with all vehicles
- Improved: [#6037] Autosaves are now stored in a subfolder
- Improved: The land tool buttons can now be held down to increase/decrease size.
- Improved: Dropdowns longer than 32 items overflow into columns.
- Improved: Ride Type option in ride window is now a dropdown.
- Improved: "About OpenRCT2" window redesigned, now contains OpenRCT2 info and access to changelog
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

2 participants