diff --git a/changelog.txt b/changelog.txt index 1a5e076..e5fb795 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,8 +1,16 @@ --------------------------------------------------------------------------------------------------- +Version: 1.2.0 +Date: 2021-08-16 + Changes: + - Made virtual signals available (snouz) + - Softer map pin sound + Locale: + - Adjusted French translation +--------------------------------------------------------------------------------------------------- Version: 1.1.1 Date: 2021-08-08 Locale: - - Added french translation (thanks to Friendch) + - Added French translation (thanks to Friendch) --------------------------------------------------------------------------------------------------- Version: 1.1.0 Date: 2020-12-02 diff --git a/control.lua b/control.lua index a56b979..0818d71 100644 --- a/control.lua +++ b/control.lua @@ -37,16 +37,18 @@ end local function add_map_marker(entity, icon_type, icon_name) if icon_type and icon_name then - entity.force.add_chart_tag(entity.surface, { icon = { type = icon_type, name = icon_name}, position = entity.position }) + local map_type = (icon_type == "virtual-signal") and "virtual" or icon_type + entity.force.add_chart_tag(entity.surface, { icon = { type = map_type, name = icon_name}, position = entity.position }) entity.surface.play_sound{path = "map-marker-ping", position = entity.position, volume_modifier = 1} end end local function change_map_markers(entity, icon_type, icon_name) + local map_type = (icon_type == "virtual-signal") and "virtual" or icon_type local markers = get_map_markers(entity) if markers then for _,marker in pairs(markers) do - marker.icon = { type = icon_type, name = icon_name} + marker.icon = { type = map_type, name = icon_name} end end end @@ -74,7 +76,7 @@ local function get_render_sprite_info(entity) local id = find_entity_render(entity) if id then local strings = splitstring(rendering.get_sprite(id), "/") - if #strings == 2 then return strings[1], strings[2] end + return strings[1], strings[2], strings[1] == 'virtual-signal' and 'virtual' or strings[1] end return nil, nil end @@ -377,7 +379,14 @@ local function create_display_gui(player, selected) for prototype_type,prototypes in pairs(DID.elem_prototypes) do for _,prototype in pairs(game[prototypes]) do if not DID.displays[prototype.name] and not ((prototype_type == "item" and prototype.has_flag("hidden")) or (prototype_type == "fluid" and prototype.hidden)) then - local group = (prototype.group.name == "fluids") and "intermediate-products" or prototype.group.name + local group = "" + if prototype_type == "virtual-signal" then + group = prototype.subgroup.group.name + elseif prototype_type == "fluids" then + group = "intermediate-products" + else + group = prototype.group.name + end if not DID.group_blacklist[group] then if button_table[group] == nil then button_table[group] = {} end if button_table[group][prototype.subgroup.name] == nil then button_table[group][prototype.subgroup.name] = {} end diff --git a/globals.lua b/globals.lua index 834f0f1..199fa95 100644 --- a/globals.lua +++ b/globals.lua @@ -54,9 +54,11 @@ return { elem_prototypes = { item = "item_prototypes", fluid = "fluid_prototypes", + ["virtual-signal"] = "virtual_signal_prototypes", }, group_blacklist = { ["creative-mod_creative-tools"] = true, + ["other"] = true, }, icon_size = 64, icon_mipmaps = 4, diff --git a/info.json b/info.json index 06624b1..79c6920 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "IndustrialDisplayPlates", - "version": "1.1.1", + "version": "1.2.0", "title": "Industrial Display Plates", "author": "Wyrrrd", "homepage": "https://github.com/Wyrrrd/IndustrialDisplayPlates", @@ -8,6 +8,6 @@ "base >= 1.1.0", "(?)IndustrialRevolution" ], - "description": "Big, medium and small signs which display item and fluid icons. Can be used to blueprint map markers.", + "description": "Big, medium and small signs which display item, fluid and signal icons. Can be used to blueprint map markers.", "factorio_version": "1.1" } diff --git a/locale/fr b/locale/fr/strings.cfg similarity index 90% rename from locale/fr rename to locale/fr/strings.cfg index bce9130..e2b2965 100644 --- a/locale/fr +++ b/locale/fr/strings.cfg @@ -14,4 +14,4 @@ display-map-marker=Marqueur de carte display-plate=Panneau d'affichage [entity-description] -display=Une icône qui peut être reliée à un marqueur sur la carte. Les paramètres seront préservés par les Plans de Construction. +display=Une icône qui peut être reliée à un marqueur sur la carte. Les paramètres sont préservés dans les plans. diff --git a/sound/ping.ogg b/sound/ping.ogg index 22a1049..c11c6cb 100644 Binary files a/sound/ping.ogg and b/sound/ping.ogg differ