Skip to content

Commit

Permalink
Fix crash related to viewing ruin planets
Browse files Browse the repository at this point in the history
  • Loading branch information
Quezler authored Nov 16, 2023
1 parent 6afaaff commit 44dee89
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mods/glutenfree-se-tinted-pyramids/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"title": "Space Exploration - tinted pyramids",
"description": "Tints unlooted pyramids in the color of the module.",
"category": "cheats",
"version": "1.0.15",
"version": "1.0.16",
"author": "Quezler",
"factorio_version": "1.1",
"dependencies": [
Expand Down
4 changes: 4 additions & 0 deletions mods/glutenfree-se-tinted-pyramids/scripts/handler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ function Handler.on_post_surface_created(event)
if zone.type ~= "planet" then return end
if zone.is_homeworld then return end

-- https://mods.factorio.com/mod/glutenfree-se-tinted-pyramids/discussion/65555c2f0106094c6fc67b8f
-- TODO: why does this only crash on the "large" planetside ruin and not the "smaller" one?
if not zone.glyph then return game.print(zone.name .. ' has no glyph?') end

-- if the module is taken, return the tint to the default :)
local inside_surface_name = Ancient.vault_surface_name(zone)
local inside_surface = game.get_surface(inside_surface_name)
Expand Down

0 comments on commit 44dee89

Please sign in to comment.