Skip to content

Commit

Permalink
Update version to 1.0.0, set change log
Browse files Browse the repository at this point in the history
  • Loading branch information
narc0tiq committed Dec 18, 2024
1 parent e0ada4b commit a849e6b
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 19 deletions.
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ your mining sites and warns you when they're starting to run low.

Once the mod is installed, using it is relatively simple:

* Use the shortcut button "Resource monitor marker" to drag-select at least one
* Use the shortcut button "Resource monitor" to drag-select at least one
ore entity in a patch (like using a blueprint).
* _Can't find the shortcut button? You may need to add it to the [shortcut
bar](https://wiki.factorio.com/Shortcut_bar)._
Expand All @@ -32,9 +32,10 @@ at all!) or "all sites" (which never hides them).

Each site has some buttons associated with it:

* The 'ab|' button allows you to rename the site. This can be useful to prevent
auto-naming from overwriting one of your sites with another.
* Note: Names may not be longer than 50 characters!
* The 'ab|' button allows you to add a name tag for the site. The name tag will
replace the index in the display.
* Note: Names may not be longer than 64 characters!
* However, [rich-text=tags] count as only 3 characters
* The 'eye' button opens the map to the center of the ore site.
* The 'X' button allows you to delete the site. When first clicked, it turns
red; click it again within 2 seconds to confirm deletion, or leave it alone to
Expand Down Expand Up @@ -90,6 +91,7 @@ members of the #factorio IRC on espernet.
* Italian translation by futuroattore86
* Chinese translation by @71e6fd52 and @muink
* Japanese translation by @shelaf
* Ukrainian translation by @MetenBouldry
* More updating assistance by @kylewill0725
* Other-mod-friendly patches by @JonasJurczok
* Resource monitor shortcut graphics by @npc-strider (aka morley376)
Expand All @@ -106,35 +108,38 @@ members of the #factorio IRC on espernet.
* SpaceEx explorer viewer patch by @oof2win2
* Ore counts adjusted by mining productivity by @georgehank
* With fixes by @EvilPLa
* The aforementioned [Factorio mod localization project](https://github.com/dima74/factorio-mods-localization) for making my life incredibly easy! Thank you @dima74!

* The aforementioned [Factorio mod localization project](https://github.com/dima74/factorio-mods-localization)
for making my life incredibly easy! Thank you @dima74! Thank you all contributors!


## Remote interface ##

YARM's remote interface is grown as needed; there are only a few functions currently:

- `remote.call("YARM", "reset_player", player_name_or_index)`: sets the target player's character to be whatever the player has selected (if it's of a compatible type, of course) and clears out internal data relative to the player.
- Note: this is considered deprecated, as the player character is no longer (since v0.8) being changed to allow remote viewing.
- `remote.call("YARM", "reset_ui", player_name_or_index)`: destroys the target player's YARM UI, forcing it to be recreated (hopefully correctly) at the next UI update cycle (about every 5 seconds).
- `remote.call("YARM", "reset_ui", player_name_or_index)`: destroys the target player's YARM UI, forcing it to be recreated (hopefully correctly) at the next UI update cycle (configurable, default 5 seconds).
- `remote.call("YARM", "set_filter", player_name_or_index, new_filter)`: provides programmatic hooks to change the active filter. The filter value may be 'none', 'warnings', or 'all' -- other values are unsupported. The previously active filter is returned.
- `remote.call("YARM", "get_filter", player_name_or_index)`: returns the given player's current filter (as above) without changing it.
- `remote.call("YARM", "get_on_site_updated_event_id")`: returns the identifier for the `on_site_updated` event, detailed below. You should probably call this every time mods are initialized, as it is set in the main `control.lua` runtime.

Additionally, there is one event:

- `on_site_updated` is periodically raised whenever a site's ore count and stats are brought up to date. The event contains:
- `force_name`, the name of the force owning this site
- `site_name`, the name of the site that just finished updating; site names are unique within a force
- `site_name`, the index of the site that just finished updating; site indexes are unique within a force
- NB: before YARM 1.0, this was the unique name, which no longer exists
- `name_tag`, the player-assigned name tag of the site (empty by default)
- `ore_type`, the entity.name of the resource entities tracked in this site (e.g., `crude-oil` or `iron-ore`)
- `amount`, the number of ore units remaining in the site
- `ore_per_minute`, the number of ore units mined in a minute on this site, based on the number mined since the last update
- `remaining_permille`, the ratio of ore remaining versus the initial amount from when the site was created
- NB: permille is analogous to percent, but multiplied by 1000 instead of 100; its symbol is ‰
- `ore_type`, the prototype name of the site's ore entity
- `etd_minutes`, the number of minutes until the site is believed to be depleted


## License ##

The source of **YARM** is Copyright 2015 Octav "narc" Sandulescu. It
The source of **YARM** is Copyright 2015 Octav "narc" Sandulescu and contributors. It
is licensed under the [MIT license][mit], available in this package in the file
[LICENSE.md](LICENSE.md).

Expand Down
49 changes: 44 additions & 5 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,51 @@
Version: 1.0.0
Date: 2024-12-18
Bugfixes:
- fix a crash on submitting/cancelling a site expansion very quickly (narc, #181)
- fix a many-times-reported crash when an entity is removed while scanning a site (narc, #180)
Changes:
- make the fake ore items optional, and turn them off by default (narc, #178)
- fix a crash on submitting/cancelling a site expansion very quickly (#181)
- fix a many-times-reported crash when an entity is removed while scanning a site (#180)
- fix that sites with the same auto-generated name would overwrite each other (#52)
Changes:
- make the fake ore items optional, and turn them off by default (#178)
- the localization has been horribly messed up (big release!) but it is now possible for
translators to work from Crowdin, so it should be easier to update in future
- the GUI now updates without destroying and recreating itself every time (#99); this should
remove most (probably all) issues with buttons not reacting to clicks
- surface, site, and ore names are no longer colored (#14)
Features:
- use LuaRendering for overlay instead of creating a false chest entity -- should be faster to display the overlay now (narc, #179)
- use LuaRendering for overlay instead of creating a false chest entity -- should be faster to
display the overlay now (#179)
- use Enter to confirm the rename box, Esc to cancel it (fix #75)
- include surface name in the ore tracker (this fixes #183: ores on different surfaces were
overriding each other and messing up site ore counts)
- add color schemes (#23); the default remains red-to-green, but there is now also a red-to-blue
and grayscale, as well as full customization for anyone who wants it
- add custom site name formatting (#48): sites now have a custom name tag for players to
configure, and multiple sites can have the same name tag without overwriting each other
- add HUD update time setting, between 0.5 and 10 seconds (default remains 5 seconds)
Translation:
- add Ukrainian language (@MetenBouldry, #138)
Info:
- remove unused array_pair library (it was wonderful when it was needed)
- add a hsv library to convert RGB to HSV and back again, for easier linear interpolation in
the HSV colorspace (this entry might be the fanciest thing I've written all year)
- change the big monolithic resmon.lua to a bunch of modules in the resmon/ folder; this
should make no difference to players but any contributors will find it a bit easier to work
with:
- the click module contains everything to do with clicking in the UI (i.e., button management)
- the locale module deals with creating localized strings as well as some other special text
- the migrations module provides a framework to centralize migrating runtime data
- the sites module provides ordering and filtering sites, as well as turning them into data for display
- the types module centralizes how new lua tables of different formats are created
- the ui module contains the main UI handling for the HUD root, rename window, etc.
- the yatable module ("Yet Another Table") handles displaying sites data from the sites module,
including all the logic for UI update-in-place
- known bug: it is possible to add the same location multiple times, in different sites;
previously, this was masked by the site auto-name conflict bug, but fixing it correctly
is much more difficult than asking players to delete duplicates themselves. Sorry :(
Remote Interface:
- remove the remote call `reset_player` (fake players haven't existed for a long time!)
- validate input to `set_filter` (it should be an actual filter)
- remove deprecated `show_expando` and `hide_expando`
---------------------------------------------------------------------------------------------------
Version: 0.11.2
Date: 2024-10-24
Expand Down
6 changes: 3 additions & 3 deletions info.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "YARM",
"version": "0.11.2",
"version": "1.0.0",
"factorio_version": "2.0",
"title": "YARM - Resource Monitor",
"author": "Mithaldu (current maintainer)",
"author": "Mithaldu (current maintainer) and Narc",
"homepage": "https://github.com/narc0tiq/YARM",
"dependencies": [
"? aai-programmable-vehicles",
"? angelsrefining",
"? omnimatter",
"? dqol-resource-monitor"
],
"description": "This mod helps you to keep track of your mining sites, with useful data such as the percent mined, and estimated time to depletion.\n\n*** GUI_Unifyer is highly recommended to be installed with this mod. ***\n\nOriginal author: Octav 'narc' Sandulescu, based on work by drs, jorgenRe, and L0771"
"description": "This mod helps you to keep track of your mining sites, with useful data such as the percent mined, and estimated time to depletion.\n\nOriginal author: Octav 'narc' Sandulescu, based on work by drs, jorgenRe, and L0771"
}

0 comments on commit a849e6b

Please sign in to comment.