Skip to content

Commit

Permalink
Gracefully handle the inability to place a chart tag
Browse files Browse the repository at this point in the history
  • Loading branch information
narc0tiq committed May 2, 2019
1 parent 0088a3f commit ae2a106
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ members of the #factorio IRC on espernet.
* Other-mod-friendly patches by @JonasJurczok
* Resource monitor shortcut graphics by @npc-strider (aka morley376)
* Sorting implementation by @okradonkey
* [The Factorio Discord](https://discord.gg/5N4pQPF), especially Factorio devs helping in #mod-making (especially @Bilka, @Klonan, @Rseding91)


## Remote interface ##
Expand Down
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
---------------------------------------------------------------------------------------------------
Version: 0.8.12
Date: 2019-05-02
Bugfixes:
- Gracefully handle the inability to place a chart tag (e.g., when the area it belongs to is uncharted).
---------------------------------------------------------------------------------------------------
Version: 0.8.11
Date: 2019-05-02
Bugfixes:
Expand Down
1 change: 1 addition & 0 deletions resmon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ function resmon.update_chart_tag(site)
text = site.name,
}
site.chart_tag = site.force.add_chart_tag(site.surface, chart_tag)
if not site.chart_tag then return end -- may fail if chunk is not currently charted accd. to @Bilka
end

local display_value = format_number_si(site.amount)
Expand Down

0 comments on commit ae2a106

Please sign in to comment.