Detect un-research in editor
- ickputzdirwech
- Filter Inserter
- Posts: 794
- Joined: Sun May 07, 2017 10:16 am
- Contact:
Detect un-research in editor
Is there any way to detect if a technology got un-researched in the map editor? I couldn't find any event that gets triggered or something like that. I want to revert changes I did on_research_finished. It's a very minor issue but I wondered if it is possible at all.
Mods: Shortcuts for 1.1, ick's Sea Block, ick's vanilla tweaks
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write
Re: Detect un-research in editor
If you do this with the console you could mayby use on_console_command
https://lua-api.factorio.com/latest/eve ... le_command
but I think that just works in a running game, but I am not sure
https://lua-api.factorio.com/latest/eve ... le_command
but I think that just works in a running game, but I am not sure
- ickputzdirwech
- Filter Inserter
- Posts: 794
- Joined: Sun May 07, 2017 10:16 am
- Contact:
Re: Detect un-research in editor
I mean the “Un-research” button in the technology screen. I hadn’t thought about console commands yet. Right now I am making sure everything is in the right state on_research_finished and on_technology_effects_reset.
Mods: Shortcuts for 1.1, ick's Sea Block, ick's vanilla tweaks
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write
Re: Detect un-research in editor
I actually never realized an un-research button, but I never really used the map editor.
But I think a button belongs to a GUI, so maybe this on_gui_click could work https://lua-api.factorio.com/latest/eve ... _gui_click
But I think a button belongs to a GUI, so maybe this on_gui_click could work https://lua-api.factorio.com/latest/eve ... _gui_click
- ickputzdirwech
- Filter Inserter
- Posts: 794
- Joined: Sun May 07, 2017 10:16 am
- Contact:
Re: Detect un-research in editor
That only fires for custom GUIs, not base game ones. I also don’t want to “use a sledgehammer to crack a nut”. I am mostly fine with how I solved it for now, since it only poses a problem if people mess around in the editor or use console commands. And it’ll get fixed as soon as they research the next technology in the “normal” way.
Mods: Shortcuts for 1.1, ick's Sea Block, ick's vanilla tweaks
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write
Re: Detect un-research in editor
They added on_research_reversed viewtopic.php?f=3&t=95683
- ickputzdirwech
- Filter Inserter
- Posts: 794
- Joined: Sun May 07, 2017 10:16 am
- Contact:
Re: Detect un-research in editor
Yeah noticed that as well. Didn’t have time to test it yet, but the description in the docs sounds like it’s exactly what I was missing. The devs are just awesome!
@Moderators: I wouldn’t mind if this got moved to implement modding interface request.
@Moderators: I wouldn’t mind if this got moved to implement modding interface request.
Mods: Shortcuts for 1.1, ick's Sea Block, ick's vanilla tweaks
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write
Tools: Atom language pack
Text quickly seems cold and unfriendly. Be careful how you write and interpret what others have written.
- A reminder for me and all who read what I write