Skip to content

Commit

Permalink
Added support for PyBlock mapgen warning (PyBlock needs to be updated) (
Browse files Browse the repository at this point in the history
#376)

Co-authored-by: Zachary Picco <[email protected]>
  • Loading branch information
protocol-1903 and notnotmelon authored Nov 11, 2024
1 parent 81f6681 commit 7e2e58e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 5 additions & 2 deletions control.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 7e2e58e

Please sign in to comment.