Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 14eec22025 | |||
| 6290cf9647 | |||
| 2aa09fba3d | |||
| ed398933ac | |||
| acbee5c1e7 | |||
| f33d7a6f1b | |||
| 8e126bee36 | |||
| 59d19f1dd1 | |||
| 68503cbf0e | |||
| 1a7717e03a | |||
| e619083b57 | |||
| 1d4fbf6365 | |||
| 5d5b2f730b | |||
| 0503448c97 | |||
| 92c591e731 | |||
| a544aa53c3 | |||
| 301de33990 | |||
| f8815dd4ec | |||
| 4587cff6ab | |||
| 60dd9847a3 | |||
| 48244eaefd | |||
| cfdbe21542 | |||
| 36c04830c9 | |||
| b94b3782c6 | |||
| 5211c8f3dd | |||
| 480f7efde2 | |||
| 78fec4fcff | |||
| 7612c840c0 | |||
| 66587c503d | |||
| 3c2e3eb6d6 | |||
| 59aa449911 | |||
| 423cf5aff2 | |||
| f026c767d8 |
@@ -1 +1,2 @@
|
||||
*.zip
|
||||
.vscode/*
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ CREDITS
|
||||
|
||||
All code and graphics created by Deadlock989, with the following exceptions.
|
||||
|
||||
Code and graphics modifications after 2020-04-08 by Wyrrrd.
|
||||
Code and graphics modifications after 2020-04-08 by Wyrrrd, ickputzdirwech, Friendch and Deadlock989.
|
||||
For the latest unmodified version, see https://github.com/Wyrrrd/IndustrialDisplayPlates/tree/cd8778eb3b11f8bde5418088253123b1029dc461
|
||||
|
||||
Sounds by thomasevd and Raclure @ freesound.org.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Industrial Display Plates
|
||||
<img src="https://raw.githubusercontent.com/Wyrrrd/IndustrialDisplayPlates/master/thumbnail.png" width="128" height="128">
|
||||
<img src="https://raw.githubusercontent.com/Wyrrrd/IndustrialDisplayPlates/master/thumbnail.png" width="144" height="144">
|
||||
|
||||
### Features
|
||||
Big, medium and small signs to display item and fluid icons. Can be used to blueprint map markers.
|
||||
Big, medium and small signs to display item, fluid and signal icons. Can be used to blueprint map markers.
|
||||
|
||||
### Locale
|
||||
If you want to contribute by translating this mod, you can view the existing translations [here](https://github.com/Wyrrrd/IndustrialDisplayPlates/tree/master/locale). I'd be happy to add your language and credits to the next release.
|
||||
@@ -10,3 +10,4 @@ If you want to contribute by translating this mod, you can view the existing tra
|
||||
### Credits
|
||||
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.
|
||||
Thanks to [Friendch](https://mods.factorio.com/user/Friendch) for the french translation.
|
||||
@@ -1,4 +1,35 @@
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 1.1.2
|
||||
Date: 2021-08-21
|
||||
Changes:
|
||||
- Made virtual signals available (snouz)
|
||||
- Softer map ping sound
|
||||
Locale:
|
||||
- Adjusted French translation
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 1.1.1
|
||||
Date: 2021-08-08
|
||||
Locale:
|
||||
- Added French translation (thanks to Friendch)
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 1.1.0
|
||||
Date: 2020-12-02
|
||||
Changes:
|
||||
- Version bump for base game 1.1
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.18.5
|
||||
Date: 2020-11-23
|
||||
Bugfixes:
|
||||
- Bumped version to fix version mess
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.18.3
|
||||
Date: 2020-11-22
|
||||
Changes:
|
||||
- removed unneeded mipmap for map marker (thanks to Deadlock989)
|
||||
- restored IR compat (thanks to Deadlock989)
|
||||
- fixed steel display migration (again) (thanks to Deadlock989)
|
||||
- fixed styles (thanks to Deadlock989)
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.18.2
|
||||
Date: 2020-08-02
|
||||
Changes:
|
||||
|
||||
+18
-9
@@ -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
|
||||
@@ -359,7 +361,7 @@ local function create_display_gui(player, selected)
|
||||
local content_frame = frame.add {
|
||||
type = "frame",
|
||||
name = "inner-frame",
|
||||
style = "display_deep_frame",
|
||||
style = "display_inside_frame",
|
||||
direction = "vertical",
|
||||
}
|
||||
content_frame.style.top_margin = 8
|
||||
@@ -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
|
||||
@@ -469,15 +478,15 @@ local function set_up_display_from_ghost(entity,tags)
|
||||
end
|
||||
end
|
||||
|
||||
local function reset_globals()
|
||||
global.translations = nil
|
||||
end
|
||||
-- local function reset_globals()
|
||||
-- global.translations = nil
|
||||
-- end
|
||||
|
||||
------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
-- event handlers
|
||||
|
||||
script.on_configuration_changed(reset_globals)
|
||||
-- script.on_configuration_changed(reset_globals)
|
||||
script.on_event(defines.events.on_gui_closed, gui_close)
|
||||
script.on_event(defines.events.on_gui_click, gui_click)
|
||||
script.on_event(defines.events.on_player_mined_entity, event_raised_destroy, get_display_event_filter())
|
||||
|
||||
@@ -60,7 +60,7 @@ for display,displaydata in pairs(DID.displays) do
|
||||
result = display,
|
||||
},
|
||||
max_health = 10 + size * 30,
|
||||
flags = {"placeable-player", "placeable-neutral", "player-creation"},
|
||||
flags = {"placeable-player", "placeable-neutral", "player-creation", "not-rotatable"},
|
||||
collision_box = { {-box_size+0.1, -box_size+0.1}, {box_size-0.1, box_size-0.1} },
|
||||
selection_box = { {-box_size, -box_size}, {box_size, box_size} },
|
||||
collision_mask = {
|
||||
@@ -125,7 +125,7 @@ for display,displaydata in pairs(DID.displays) do
|
||||
result = display,
|
||||
result_count = 1,
|
||||
category = "crafting",
|
||||
enabled = mods["IndustrialRevolution"] and (displaydata.IR_unlock == nil) or (displaydata.unlock == nil),
|
||||
enabled = (mods["IndustrialRevolution"] and (displaydata.IR_unlock == nil)) or (not mods["IndustrialRevolution"] and displaydata.unlock == nil),
|
||||
ingredients = displaydata.ingredients,
|
||||
energy_required = 1,
|
||||
}
|
||||
@@ -158,11 +158,11 @@ add_styles({
|
||||
left_padding = 10,
|
||||
right_padding = 10,
|
||||
top_padding = 8,
|
||||
graphical_set = data.raw["gui-style"]["default"]["tabbed_pane"]["tab_content_frame"].graphical_set,
|
||||
type = "frame_style",
|
||||
graphical_set = data.raw["gui-style"]["default"]["filter_tabbed_pane"]["tab_content_frame"].graphical_set,
|
||||
},
|
||||
type = "tabbed_pane_style",
|
||||
parent = "tabbed_pane",
|
||||
parent = "filter_tabbed_pane",
|
||||
width = 420,
|
||||
},
|
||||
display_tab = {
|
||||
@@ -185,9 +185,9 @@ add_styles({
|
||||
horizontal_align = "center",
|
||||
},
|
||||
},
|
||||
display_deep_frame = {
|
||||
display_inside_frame = {
|
||||
type = "frame_style",
|
||||
parent = "inside_deep_frame",
|
||||
parent = "inside_shallow_frame",
|
||||
vertical_flow_style = {
|
||||
type = "vertical_flow_style",
|
||||
vertical_spacing = 0,
|
||||
@@ -196,34 +196,7 @@ add_styles({
|
||||
},
|
||||
display_tab_deep_frame = {
|
||||
type = "frame_style",
|
||||
parent = "subpanel_inset_frame",
|
||||
vertical_flow_style = {
|
||||
type = "vertical_flow_style",
|
||||
vertical_spacing = 0,
|
||||
padding = 0,
|
||||
},
|
||||
graphical_set = {
|
||||
base = {
|
||||
center = {
|
||||
position = {42,8},
|
||||
size = {1,1},
|
||||
},
|
||||
corner_size = 8,
|
||||
draw_type = "outer",
|
||||
position = {85,0},
|
||||
},
|
||||
shadow = data.raw["gui-style"]["default"]["inside_deep_frame"].graphical_set.shadow,
|
||||
},
|
||||
background_graphical_set = {
|
||||
corner_size = 8,
|
||||
overall_tiling_horizontal_padding = 5,
|
||||
overall_tiling_horizontal_size = 30,
|
||||
overall_tiling_horizontal_spacing = 10,
|
||||
overall_tiling_vertical_padding = 5,
|
||||
overall_tiling_vertical_size = 30,
|
||||
overall_tiling_vertical_spacing = 10,
|
||||
position = { 282, 17 },
|
||||
},
|
||||
parent = "slot_button_deep_frame",
|
||||
},
|
||||
display_buttons = {
|
||||
type = "table_style",
|
||||
@@ -289,8 +262,6 @@ data:extend({
|
||||
priority = "extra-high",
|
||||
width = 32,
|
||||
height = 32,
|
||||
mipmap_count = 2,
|
||||
scale = 0.5,
|
||||
flags = {"gui-icon"},
|
||||
},
|
||||
{
|
||||
|
||||
+8
-6
@@ -20,30 +20,30 @@ return {
|
||||
},
|
||||
["iron-display-small"] = {
|
||||
ingredients = {{"iron-plate",1}},
|
||||
IR_unlock = "deadlock-iron-age",
|
||||
IR_unlock = "ir2-iron-milestone",
|
||||
},
|
||||
["iron-display-medium"] = {
|
||||
ingredients = {{"iron-plate",4}},
|
||||
IR_unlock = "deadlock-iron-age",
|
||||
IR_unlock = "ir2-iron-milestone",
|
||||
},
|
||||
["iron-display"] = {
|
||||
ingredients = {{"iron-plate",9}},
|
||||
IR_unlock = "deadlock-iron-age",
|
||||
IR_unlock = "ir2-iron-milestone",
|
||||
},
|
||||
["steel-display-small"] = {
|
||||
ingredients = {{"steel-plate",1}},
|
||||
unlock = "steel-processing",
|
||||
IR_unlock = "deadlock-steel-age",
|
||||
IR_unlock = "ir2-steel-milestone",
|
||||
},
|
||||
["steel-display-medium"] = {
|
||||
ingredients = {{"steel-plate",4}},
|
||||
unlock = "steel-processing",
|
||||
IR_unlock = "deadlock-steel-age",
|
||||
IR_unlock = "ir2-steel-milestone",
|
||||
},
|
||||
["steel-display"] = {
|
||||
ingredients = {{"steel-plate",9}},
|
||||
unlock = "steel-processing",
|
||||
IR_unlock = "deadlock-steel-age",
|
||||
IR_unlock = "ir2-steel-milestone",
|
||||
},
|
||||
},
|
||||
sizes = {
|
||||
@@ -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,
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 949 B After Width: | Height: | Size: 769 B |
@@ -1,12 +1,13 @@
|
||||
{
|
||||
"name": "IndustrialDisplayPlates",
|
||||
"version": "0.18.2",
|
||||
"version": "1.1.2",
|
||||
"title": "Industrial Display Plates",
|
||||
"author": "Wyrrrd",
|
||||
"homepage": "https://github.com/Wyrrrd/IndustrialDisplayPlates",
|
||||
"dependencies": [
|
||||
"base >= 0.18.27"
|
||||
"base >= 1.1.0",
|
||||
"(?)IndustrialRevolution"
|
||||
],
|
||||
"description": "Big, medium and small signs which display item and fluid icons. Can be used to blueprint map markers.",
|
||||
"factorio_version": "0.18"
|
||||
"description": "Big, medium and small signs which display item, fluid and signal icons. Can be used to blueprint map markers.",
|
||||
"factorio_version": "1.1"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
[entity-name]
|
||||
copper-display=Panneau d'affichage en Cuivre (Grand)
|
||||
iron-display=Panneau d'affichage en Fer (Grand)
|
||||
steel-display=Panneau d'affichage en Acier (Grand)
|
||||
copper-display-medium=Panneau d'affichage en Cuivre (Moyen)
|
||||
iron-display-medium=Panneau d'affichage en Fer (Moyen)
|
||||
steel-display-medium=Panneau d'affichage en Acier (Moyen)
|
||||
copper-display-small=Panneau d'affichage en Cuivre (Petit)
|
||||
iron-display-small=Panneau d'affichage en Fer (Petit)
|
||||
steel-display-small=Panneau d'affichage en Acier (Petit)
|
||||
|
||||
[controls]
|
||||
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 sont préservés dans les plans.
|
||||
@@ -1,11 +1,11 @@
|
||||
local DID = require("globals")
|
||||
|
||||
for index, force in pairs(game.forces) do
|
||||
local technologies = force.technologies
|
||||
local recipes = force.recipes
|
||||
|
||||
if technologies["steel-processing"].researched then
|
||||
recipes["steel-display-small"].enabled = true
|
||||
recipes["steel-display-medium"].enabled = true
|
||||
recipes["steel-display"].enabled = true
|
||||
for display,displaydata in pairs(DID.displays) do
|
||||
if displaydata.IR_unlock and force.technologies[displaydata.IR_unlock] and force.technologies[displaydata.IR_unlock].researched then
|
||||
force.recipes[display].enabled = true
|
||||
elseif displaydata.unlock and force.technologies[displaydata.unlock] and force.technologies[displaydata.unlock].researched then
|
||||
force.recipes[display].enabled = true
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user