From 7e2e58e8cd3b931e603da37b8b6699464b00c31c Mon Sep 17 00:00:00 2001 From: protocol-1903 <67478786+protocol-1903@users.noreply.github.com> Date: Mon, 11 Nov 2024 12:45:14 -0700 Subject: [PATCH] Added support for PyBlock mapgen warning (PyBlock needs to be updated) (#376) Co-authored-by: Zachary Picco --- changelog.txt | 3 ++- control.lua | 7 +++++-- info.json | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index 2ec1d7d9..2794f1b0 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,7 +1,8 @@ --------------------------------------------------------------------------------------------------- Version: 3.0.21 -Date: ~~~~~~~~~~ +Date: 2024-11-11 Changes: + - Added support for PyBlock mapgen warning (PyBlock needs to be updated) - Rotated niobium mine pipe connection to match 1.1 direction. --------------------------------------------------------------------------------------------------- Version: 3.0.20 diff --git a/control.lua b/control.lua index 43a30462..854af11c 100644 --- a/control.lua +++ b/control.lua @@ -75,9 +75,12 @@ py.on_event(defines.events.on_player_created, function(event) local player = game.players[event.player_index] player.print {"messages.welcome"} local autoplace_controls = game.surfaces["nauvis"].map_gen_settings.autoplace_controls - if autoplace_controls["stone"] and autoplace_controls["stone"].richness <= 1 then + game.print(autoplace_controls["raw-coal"].size) + if script.active_mods["PyBlock"] ~= nil and (game.surfaces["nauvis"].map_gen_settings.property_expression_names.elevation ~= "elevation_island" or autoplace_controls["raw-coal"].size ~= 0) then + player.print {"messages.pyblock-warning-no-preset"} + elseif script.active_mods["PyBlock"] == nil and autoplace_controls["stone"] and autoplace_controls["stone"].richness <= 1 then player.print {"messages.warning-no-preset", {"map-gen-preset-name.py-recommended"}} - end + end if autoplace_controls["enemy-base"] and autoplace_controls["enemy-base"].size > 0 then player.print {"messages.warning-biters"} end diff --git a/info.json b/info.json index d83567d5..c512ab44 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "pycoalprocessing", - "version": "3.0.20", + "version": "3.0.21", "factorio_version": "2.0", "title": "Pyanodons Coal Processing", "author": "Pyanodon, Nexela, Kingarthur, notnotmelon, Mootykins, ShadowGlass, Archezekiel, Quintuple",