File tree Expand file tree Collapse file tree 5 files changed +75
-3
lines changed
Expand file tree Collapse file tree 5 files changed +75
-3
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 1+ require " ccsc"
Original file line number Diff line number Diff line change 1+ require " ccsc"
Original file line number Diff line number Diff line change 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"
Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments