Skip to content

Commit 9568c8b

Browse files
Merge pull request #1 from theRustyKnife/2.0-dev
2.0-release
2 parents 52eeb8a + c8510c2 commit 9568c8b

File tree

5 files changed

+75
-3
lines changed

5 files changed

+75
-3
lines changed

ccsc.lua

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
local DATA_PATH = ".special-cases" -- path to the definition file
2+
local DATA_PRIORITY = "low" -- priority to use in case of mod conflicts (one of "low" (should be used for third party translation mods) or "normal" (for all other mods))
3+
4+
if remote then -- running control
5+
local INTERFACE_NAME = "crafting-combinator_init"
6+
7+
local data = require(DATA_PATH)
8+
data.priority = DATA_PRIORITY
9+
10+
local function init() return data; end
11+
12+
local i = 1
13+
while true do
14+
if not (remote.interfaces[INTERFACE_NAME .. i]) then break; end
15+
i = i + 1
16+
end
17+
18+
remote.add_interface(INTERFACE_NAME .. i, {init = init})
19+
else -- running data
20+
crafting_combinator_data = crafting_combinator_data or {}
21+
t_ccsc = require(DATA_PATH)
22+
23+
if crafting_combinator_data.overrides then
24+
for i, v in pairs(t_ccsc.overrides) do
25+
if not (DATA_PRIORITY == "low" and crafting_combinator_data.overrides[i]) then
26+
crafting_combinator_data.overrides[i] = v
27+
end
28+
end
29+
else crafting_combinator_data.overrides = t_ccsc.overrides; end
30+
31+
if crafting_combinator_data.icons then
32+
for i, v in pairs(t_ccsc.icons) do
33+
if not (DATA_PRIORITY == "low" and crafting_combinator_data.icons[i]) then
34+
crafting_combinator_data.icons[i] = v
35+
end
36+
end
37+
else crafting_combinator_data.icons = t_ccsc.icons; end
38+
end

control.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require "ccsc"

data.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require "ccsc"

info.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "crafting-combinator-locale",
3-
"version": "1.0.1",
3+
"version": "2.0.0",
44
"factorio_version": "0.14",
55
"title": "Crafting Combinator Locale",
6-
"author": "LuziferSenpai (and theRustyKnife)",
6+
"author": "LuziferSenpai and theRustyKnife",
77
"description": "Translations for the Crafting Combinator mod.",
88
"homepage": "https://mods.factorio.com/mods/theRustyKnife/crafting-combinator-locale",
9-
"date": "03.11.2016",
9+
"date": "01.12.2016",
1010
"dependencies": [],
1111
"contributors":[
1212
"theRustyKnife"

special-cases.lua

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
local crafting_combinator_data = {}
2+
3+
-- items to be used as recipes to prevent unnecessary virtual recipe creation
4+
-- ["recipe-name"] = "item-name",
5+
crafting_combinator_data.overrides = {
6+
--Item Collectors
7+
["item-collector"] = "item-collector-area",
8+
9+
--Bio Industries
10+
["bi-liquid-air"] = "liquid-air",
11+
["bi-nitrogen"] = "nitrogen",
12+
["Bio_Cannon"] = "Bio_Cannon_Area",
13+
["bi-biomass-0"] = "bi-biomass",
14+
["bi-crushed-stone"] = "stone-crushed",
15+
["bi-seedling"] = "seedling",
16+
}
17+
18+
-- if the icon can't be found by the mod use this to assign it mannualy
19+
-- ["recipe-name"] = "__path__/to/icon",
20+
crafting_combinator_data.icons = {
21+
--Senpais Overhall
22+
["alien-artifact-from-small"] = "__base__/graphics/icons/alien-artifact.png",
23+
24+
--Bio Industries
25+
["bi-plastic"] = "__base__/graphics/icons/plastic-bar.png",
26+
27+
--Switch Liquid IO
28+
["flame-thrower-ammo-r"] = "__base__/graphics/icons/flame-thrower-ammo.png",
29+
["sulfur-r"] = "__base__/graphics/icons/sulfur.png",
30+
}
31+
32+
return crafting_combinator_data

0 commit comments

Comments
 (0)