Archived
Compare commits
2
Commits
v1.1.3
...
18299fd3f5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18299fd3f5 | ||
|
|
9d8443c9b2 |
@@ -1,4 +1,9 @@
|
|||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 1.1.4
|
||||||
|
Date: 2021-09-07
|
||||||
|
Bugfixes:
|
||||||
|
- fixed crash and unwanted behaviour introduced with last release
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 1.1.3
|
Version: 1.1.3
|
||||||
Date: 2021-09-06
|
Date: 2021-09-06
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
|
|||||||
+32
-4
@@ -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
|
||||||
@@ -553,16 +580,17 @@ script.on_event(defines.events.on_player_setup_blueprint, function (event)
|
|||||||
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
|
||||||
|
for index,entity in pairs(event.mapping.get()) do
|
||||||
|
local stype,sname = get_render_sprite_info(entity)
|
||||||
|
if stype and sname then
|
||||||
|
|
||||||
-- Workaround for blueprint update bug
|
-- Workaround for blueprint update bug
|
||||||
if blueprint.get_blueprint_entity_count() == 0 then
|
if blueprint.get_blueprint_entity_count() == 0 then
|
||||||
player.print({"display-plates.blueprint-wont-have-icons"})
|
player.print({"display-plates.blueprint-wont-have-icons"})
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if blueprint then
|
|
||||||
for index,entity in pairs(event.mapping.get()) do
|
|
||||||
local stype,sname = get_render_sprite_info(entity)
|
|
||||||
if stype and sname then
|
|
||||||
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,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "IndustrialDisplayPlates",
|
"name": "IndustrialDisplayPlates",
|
||||||
"version": "1.1.3",
|
"version": "1.1.4",
|
||||||
"title": "Industrial Display Plates",
|
"title": "Industrial Display Plates",
|
||||||
"author": "Wyrrrd",
|
"author": "Wyrrrd",
|
||||||
"homepage": "https://github.com/Wyrrrd/IndustrialDisplayPlates",
|
"homepage": "https://github.com/Wyrrrd/IndustrialDisplayPlates",
|
||||||
|
|||||||
Reference in New Issue
Block a user