Forked - https://mods.factorio.com/mod/TogglePeacefulMode
Toggle Peaceful Mode Forked lets you switch peaceful mode on or off at any time without using console commands.
The selected mode is applied to all existing surfaces and is automatically synchronized with newly created Space Age and modded surfaces.
When the mode is changed, mobile enemy units are removed so that their behavior matches the selected peaceful-mode setting.
Forked from the original Toggle Peaceful Mode mod by Cerbrus and updated for Factorio 2.1.