Skip to content

Commit 57457f4

Browse files
committed
Add additional module colors; move module colors to a globally accessible table
1 parent 9a63cb5 commit 57457f4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+31
-16
lines changed

changelog.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
---------------------------------------------------------------------------------------------------
2+
Version: 0.00.11
3+
Date: 2020.06.25
4+
Features:
5+
- Added additional module icon colors, 'deep-red', 'gray', 'orange', 'purple', and 'vanilla-red' for optional use by other mods
6+
- Exposed module colors, accessible from 'reskins.bobs.module_color_map[color]
7+
---------------------------------------------------------------------------------------------------
28
Version: 0.00.10
39
Date: 2020.06.24
410
Features:
12 KB
12.3 KB
12.4 KB
12.5 KB
12.5 KB
12.5 KB
12.3 KB
12.1 KB

info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "reskins-bobs",
3-
"version": "0.00.10",
3+
"version": "0.00.11",
44
"factorio_version": "0.18",
55
"title": "Artisanal Reskins: Bob's Mods",
66
"author": "Kirazy",
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-- Copyright (c) 2020 Kirazy
2+
-- Part of Artisanal Reskins: Bob's Mods
3+
--
4+
-- See LICENSE.md in the project directory for license information.
5+
6+
-- Check to see if reskinning needs to be done.
7+
if not mods["zero-modules"] then return end

prototypes/functions.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,22 @@ else
1616
reskins.bobs.basic_belt_tint = reskins.lib.tint_index["tier-0"]
1717
end
1818

19+
reskins.bobs.module_color_map = {
20+
["blue"] = {primary = util.color("70b6ff"), secondary = util.color("30d2ff")},
21+
["brown"] = {primary = util.color("9c7c60"), secondary = util.color("fff0d9")},
22+
["cyan"] = {primary = util.color("70f1ff"), secondary = util.color("30ffd2")},
23+
["deep-red"] = {primary = util.color("cb302a"), secondary = util.color("ff7a66")},
24+
["gray"] = {primary = util.color("b7b7b7"), secondary = util.color("d5d5d5")},
25+
["green"] = {primary = util.color("95e26c"), secondary = util.color("2bff2b")},
26+
["orange"] = {primary = util.color("ffa345"), secondary = util.color("ffbf96")},
27+
["pine"] = {primary = util.color("7a9e96"), secondary = util.color("bfffd2")},
28+
["pink"] = {primary = util.color("f96bcd"), secondary = util.color("ffbfe9")},
29+
["purple"] = {primary = util.color("9c70ff"), secondary = util.color("ac6eff")},
30+
["red"] = {primary = util.color("f27c52"), secondary = util.color("ff9999")},
31+
["vanilla-red"] = {primary = util.color("f27c52"), secondary = util.color("ffe27c")},
32+
["yellow"] = {primary = util.color("ffdd45"), secondary = util.color("ffed66")},
33+
}
34+
1935
-- ROBOT PARTICLE AND DEATH ANIMATIONS
2036
local function adjust_animation(animation, shift)
2137

prototypes/item/modules.lua

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,6 @@ if not mods["bobmodules"] then return end
88
if reskins.lib.setting("reskins-bobs-do-bobmodules") == false then return end
99

1010
-- Modules
11-
local color_map = {
12-
["blue"] = {"70b6ff", "30d2ff"},
13-
["brown"] = {"9c7c60", "fff0d9"},
14-
["cyan"] = {"70f1ff", "30ffd2"},
15-
["green"] = {"95e26c", "2bff2b"},
16-
["pine"] = {"7a9e96", "bfffd2"},
17-
["pink"] = {"f96bcd", "ffbfe9"},
18-
["red"] = {"f27c52", "ff9999"},
19-
["yellow"] = {"ffdd45", "ffff66"},
20-
}
21-
2211
local modules_map = {
2312
["speed"] = {"blue", true},
2413
["effectivity"] = {"yellow", true},
@@ -68,10 +57,7 @@ for class, map in pairs(modules_map) do
6857
entity.art_style = "artisan-reskin"
6958

7059
-- Overwrite beacon_tint property
71-
entity.beacon_tint = {
72-
primary = util.color(color_map[color][1]),
73-
secondary = util.color(color_map[color][2])
74-
}
60+
entity.beacon_tint = reskins.bobs.module_color_map[color]
7561

7662
-- Label to skip to next iteration
7763
::continue::

0 commit comments

Comments
 (0)