1
0

7 Commits

Author SHA1 Message Date
Wyrrrd e7d44327e8 Release maintenance 2023-03-15 23:07:36 +01:00
dwightkung fd7ab16354 zh-CN locale (#22)
simplified Chinese
2023-03-15 22:52:03 +01:00
billbo99 18299fd3f5 Add remote interface to allow other mods to query / change sprites in… (#20)
* Add remote interface to allow other mods to query / change sprites in display frames
* update map marker if present
2022-07-11 22:29:56 +02:00
Wyrrrd 9d8443c9b2 moved workaround in code
moved to only trigger if blueprint contains displays with sprites, fixes "attempt to index local" crash as well
2021-09-07 11:02:31 +02:00
Wyrrrd be669f7b3e Quick fix locale file 2021-09-06 23:52:17 +02:00
Friendch e49a69058b Blueprint update FR local (#17)
* Add files via upload

Made a misstake, forgot the folder, now I master the thing don't worry ^^

* Update fr

* Rename fr to string.cfg
2021-09-06 21:49:50 +00:00
Wyrrrd bf22a80ca9 Workaround for blueprint update bug
thanks to Honktown for the help
2021-09-06 10:35:15 +02:00
9 changed files with 102 additions and 18 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ CREDITS
All code and graphics created by Deadlock989, with the following exceptions. All code and graphics created by Deadlock989, with the following exceptions.
Code and graphics modifications after 2020-04-08 by Wyrrrd, ickputzdirwech, Friendch and Deadlock989. Code and graphics modifications after 2020-04-08 by Wyrrrd, ickputzdirwech, Friendch, dwightkung and Deadlock989.
For the latest unmodified version, see https://github.com/Wyrrrd/IndustrialDisplayPlates/tree/cd8778eb3b11f8bde5418088253123b1029dc461 For the latest unmodified version, see https://github.com/Wyrrrd/IndustrialDisplayPlates/tree/cd8778eb3b11f8bde5418088253123b1029dc461
Sounds by thomasevd and Raclure @ freesound.org. Sounds by thomasevd and Raclure @ freesound.org.
+1
View File
@@ -11,3 +11,4 @@ If you want to contribute by translating this mod, you can view the existing tra
Thanks to [Deadlock989](https://mods.factorio.com/user/Deadlock989) for the [original mod](https://mods.factorio.com/mod/IndustrialDisplays). Thanks to [Deadlock989](https://mods.factorio.com/user/Deadlock989) for the [original mod](https://mods.factorio.com/mod/IndustrialDisplays).
Sounds by thomasevd and Raclure on freesound.org. Sounds by thomasevd and Raclure on freesound.org.
Thanks to [Friendch](https://mods.factorio.com/user/Friendch) for the french translation. Thanks to [Friendch](https://mods.factorio.com/user/Friendch) for the french translation.
Thanks to [dwightkung](https://github.com/dwightkung) for the simplified chinese translation.
+15
View File
@@ -1,4 +1,19 @@
--------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
Version: 1.1.5
Date: 2023-03-15
Locale:
- Added simplified Chinese translation (thanks to dwightkung)
---------------------------------------------------------------------------------------------------
Version: 1.1.4
Date: 2021-09-07
Bugfixes:
- fixed crash and unwanted behaviour introduced with last release
---------------------------------------------------------------------------------------------------
Version: 1.1.3
Date: 2021-09-06
Bugfixes:
- Implemented controlled error message for blueprint update bug in factorio to avoid crash
---------------------------------------------------------------------------------------------------
Version: 1.1.2 Version: 1.1.2
Date: 2021-08-21 Date: 2021-08-21
Changes: Changes:
+35
View File
@@ -478,6 +478,33 @@ local function set_up_display_from_ghost(entity,tags)
end end
end end
remote.add_interface(
"IndustrialDisplayPlates",
{
get_sprite = function(event)
if event and event.entity and event.entity.valid then
local spritetype, spritename = get_render_sprite_info(event.entity)
return {spritetype=spritetype, spritename=spritename}
else
return nil
end
end,
set_sprite = function(event)
if event and event.entity and event.entity.valid and event.sprite and game.is_valid_sprite_path(event.sprite) then
destroy_render(event.entity)
render_overlay_sprite(event.entity, event.sprite)
if get_has_map_marker(event.entity) then
local spritetype, spritename = get_render_sprite_info(event.entity)
change_map_markers(event.entity, spritetype, spritename)
end
end
end
}
)
-- local function reset_globals() -- local function reset_globals()
-- global.translations = nil -- global.translations = nil
-- end -- end
@@ -552,10 +579,18 @@ script.on_event(defines.events.on_player_setup_blueprint, function (event)
local blueprint = nil local blueprint = nil
if player and player.blueprint_to_setup and player.blueprint_to_setup.valid_for_read then blueprint = player.blueprint_to_setup if player and player.blueprint_to_setup and player.blueprint_to_setup.valid_for_read then blueprint = player.blueprint_to_setup
elseif player and player.cursor_stack.valid_for_read and player.cursor_stack.name == "blueprint" then blueprint = player.cursor_stack end elseif player and player.cursor_stack.valid_for_read and player.cursor_stack.name == "blueprint" then blueprint = player.cursor_stack end
if blueprint then if blueprint then
for index,entity in pairs(event.mapping.get()) do for index,entity in pairs(event.mapping.get()) do
local stype,sname = get_render_sprite_info(entity) local stype,sname = get_render_sprite_info(entity)
if stype and sname then if stype and sname then
-- Workaround for blueprint update bug
if blueprint.get_blueprint_entity_count() == 0 then
player.print({"display-plates.blueprint-wont-have-icons"})
return
end
blueprint.set_blueprint_entity_tag(index, "display-plate-sprite-type", stype) blueprint.set_blueprint_entity_tag(index, "display-plate-sprite-type", stype)
blueprint.set_blueprint_entity_tag(index, "display-plate-sprite-name", sname) blueprint.set_blueprint_entity_tag(index, "display-plate-sprite-name", sname)
blueprint.set_blueprint_entity_tag(index, "display-plate-sprite-map-marker", get_has_map_marker(entity)) blueprint.set_blueprint_entity_tag(index, "display-plate-sprite-map-marker", get_has_map_marker(entity))
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "IndustrialDisplayPlates", "name": "IndustrialDisplayPlates",
"version": "1.1.2", "version": "1.1.5",
"title": "Industrial Display Plates", "title": "Industrial Display Plates",
"author": "Wyrrrd", "author": "Wyrrrd",
"homepage": "https://github.com/Wyrrrd/IndustrialDisplayPlates", "homepage": "https://github.com/Wyrrrd/IndustrialDisplayPlates",
+3
View File
@@ -1,3 +1,6 @@
[display-plates]
blueprint-wont-have-icons=Dieser aktualisierte Blaupause wird keine Symbole oder Kartenmarkierungen der Anzeigeplatten enthalten. Um diese hinzuzufügen, erstelle eine neue Blaupause.
[entity-name] [entity-name]
copper-display=Kupferanzeigeplatte (groß) copper-display=Kupferanzeigeplatte (groß)
iron-display=Eisenanzeigeplatte (groß) iron-display=Eisenanzeigeplatte (groß)
+3
View File
@@ -1,3 +1,6 @@
[display-plates]
blueprint-wont-have-icons=This updated blueprint will not contain any icons or map markers of the display plates. To include them, create a new blueprint.
[entity-name] [entity-name]
copper-display=Copper display plate (large) copper-display=Copper display plate (large)
iron-display=Iron display plate (large) iron-display=Iron display plate (large)
+3
View File
@@ -1,3 +1,6 @@
[display-plates]
blueprint-wont-have-icons=Ce plan mis à jour ne contiendra pas les icônes ni les marqueurs de carte des panneaux d'affichage. Pour les inclure, créez-en un nouveau.
[entity-name] [entity-name]
copper-display=Panneau d'affichage en Cuivre (Grand) copper-display=Panneau d'affichage en Cuivre (Grand)
iron-display=Panneau d'affichage en Fer (Grand) iron-display=Panneau d'affichage en Fer (Grand)
+24
View File
@@ -0,0 +1,24 @@
[mod-name]
IndustrialDisplayPlates=工业展示板
[mod-description]
IndustrialDisplayPlates=显示物品、流体和信号图标的大、中、小标志。可用于绘制包含地图标记的蓝图。
[display-plates]
blueprint-wont-have-icons=此更新的蓝图将不包含任何显示板的图标或地图标记。要包含它们,请创建一个新的蓝图。
[entity-name]
copper-display=铜质显示板(大)
iron-display=铁质展示板(大)
steel-display=钢制展示板(大)
copper-display-medium=铜质显示板(中)
iron-display-medium=铁质展示板(中)
steel-display-medium=钢制展示板(中)
copper-display-small=铜质显示板(小)
iron-display-small=铁质展示板(小)
steel-display-small=钢显示板(小)
[controls]
display-map-marker=地图标记
display-plate=展示板
[entity-description]
display=一个可以链接到地图标记的图标性标志。图标和地图标记设置可被保留在蓝图中。