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

Fix /cheat command not researching all valid technologies. #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

heinwessels
Copy link
Contributor

Fix the /cheat command to actually research all technologies. It doesn't research inifnite levels very far, and ignores the victory tech.

Only caveat is that it will research all techs even if it's the first console command entered by the player, when the console still says "Repeat the command to proceed". I couldn't find a way around this.

Screencast.from.30-04-24.09.29.30.webm

@heinwessels heinwessels force-pushed the cheat branch 4 times, most recently from 40f40a2 to 63712a5 Compare May 1, 2024 06:10
@TMDarky
Copy link

TMDarky commented May 20, 2024

I'm not a modding expert but it seems there's an event that can be used to check if the cheat command was actually run.
I guess the first time the command is entered, the event is not called as cheat mode is not enabled.
https://lua-api.factorio.com/latest/events.html#on_player_cheat_mode_enabled

Also it would seem the command called when enabling cheat mode is "research all technologies", which can be called separately in the console and will not be fixed by this pull request
https://lua-api.factorio.com/latest/classes/LuaForce.html#research_all_technologies

@grandseiken
Copy link
Owner

Sorry it took me so long to look at this. I'm not sure why research_all_technologies doesn't work (probably the hidden/disabled techs?), but using the cheat event sounds like it'd be good at least.

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.

3 participants