Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
minetest_game
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
minetest_game
Commits
3484ff23
Commit
3484ff23
authored
6 years ago
by
tenplus1
Committed by
Paramat
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Dye mod: Remove 'basecolor', 'excolor', 'unicolor' groups
parent
689f0c54
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mods/dye/init.lua
+11
-34
11 additions, 34 deletions
mods/dye/init.lua
with
11 additions
and
34 deletions
mods/dye/init.lua
+
11
−
34
View file @
3484ff23
-- Other mods can use these for looping through available colors
dye
=
{}
dye
.
basecolors
=
{
"white"
,
"grey"
,
"black"
,
"red"
,
"yellow"
,
"green"
,
"cyan"
,
"blue"
,
"magenta"
}
dye
.
excolors
=
{
"white"
,
"lightgrey"
,
"grey"
,
"darkgrey"
,
"black"
,
"red"
,
"orange"
,
"yellow"
,
"lime"
,
"green"
,
"aqua"
,
"cyan"
,
"sky_blue"
,
"blue"
,
"violet"
,
"magenta"
,
"red_violet"
}
-- Make dye names and descriptions available globally
...
...
@@ -25,47 +20,28 @@ dye.dyes = {
{
"pink"
,
"Pink"
},
}
-- This collection of colors is partly a historic thing, partly something else
local
dyes
=
{
{
"white"
,
"White Dye"
,
{
dye
=
1
,
basecolor_white
=
1
,
excolor_white
=
1
,
unicolor_white
=
1
}},
{
"grey"
,
"Grey Dye"
,
{
dye
=
1
,
basecolor_grey
=
1
,
excolor_grey
=
1
,
unicolor_grey
=
1
}},
{
"dark_grey"
,
"Dark Grey Dye"
,
{
dye
=
1
,
basecolor_grey
=
1
,
excolor_darkgrey
=
1
,
unicolor_darkgrey
=
1
}},
{
"black"
,
"Black Dye"
,
{
dye
=
1
,
basecolor_black
=
1
,
excolor_black
=
1
,
unicolor_black
=
1
}},
{
"violet"
,
"Violet Dye"
,
{
dye
=
1
,
basecolor_magenta
=
1
,
excolor_violet
=
1
,
unicolor_violet
=
1
}},
{
"blue"
,
"Blue Dye"
,
{
dye
=
1
,
basecolor_blue
=
1
,
excolor_blue
=
1
,
unicolor_blue
=
1
}},
{
"cyan"
,
"Cyan Dye"
,
{
dye
=
1
,
basecolor_cyan
=
1
,
excolor_cyan
=
1
,
unicolor_cyan
=
1
}},
{
"dark_green"
,
"Dark Green Dye"
,
{
dye
=
1
,
basecolor_green
=
1
,
excolor_green
=
1
,
unicolor_dark_green
=
1
}},
{
"green"
,
"Green Dye"
,
{
dye
=
1
,
basecolor_green
=
1
,
excolor_green
=
1
,
unicolor_green
=
1
}},
{
"yellow"
,
"Yellow Dye"
,
{
dye
=
1
,
basecolor_yellow
=
1
,
excolor_yellow
=
1
,
unicolor_yellow
=
1
}},
{
"brown"
,
"Brown Dye"
,
{
dye
=
1
,
basecolor_brown
=
1
,
excolor_orange
=
1
,
unicolor_dark_orange
=
1
}},
{
"orange"
,
"Orange Dye"
,
{
dye
=
1
,
basecolor_orange
=
1
,
excolor_orange
=
1
,
unicolor_orange
=
1
}},
{
"red"
,
"Red Dye"
,
{
dye
=
1
,
basecolor_red
=
1
,
excolor_red
=
1
,
unicolor_red
=
1
}},
{
"magenta"
,
"Magenta Dye"
,
{
dye
=
1
,
basecolor_magenta
=
1
,
excolor_red_violet
=
1
,
unicolor_red_violet
=
1
}},
{
"pink"
,
"Pink Dye"
,
{
dye
=
1
,
basecolor_red
=
1
,
excolor_red
=
1
,
unicolor_light_red
=
1
}},
}
-- Define items
for
_
,
row
in
ipairs
(
dyes
)
do
for
_
,
row
in
ipairs
(
dye
.
dyes
)
do
local
name
=
row
[
1
]
local
description
=
row
[
2
]
local
groups
=
row
[
3
]
local
item_name
=
"dye:
"
..
name
local
item_image
=
"dye_"
..
name
..
".png"
minetest
.
register_craftitem
(
item_
name
,
{
inventory_image
=
item_image
,
description
=
description
,
local
groups
=
{
dye
=
1
}
groups
[
"color_
"
..
name
]
=
1
minetest
.
register_craftitem
(
"dye:"
..
name
,
{
inventory_image
=
"dye_"
..
name
..
".png"
,
description
=
description
..
" Dye"
,
groups
=
groups
})
minetest
.
register_craft
({
type
=
"shapeless"
,
output
=
item_
name
..
" 4"
,
output
=
"dye:"
..
name
..
" 4"
,
recipe
=
{
"group:flower,color_"
..
name
},
})
end
-- Manually add coal->black dye
-- Manually add coal
->
black dye
minetest
.
register_craft
({
type
=
"shapeless"
,
...
...
@@ -74,6 +50,7 @@ minetest.register_craft({
})
-- Mix recipes
local
dye_recipes
=
{
-- src1, src2, dst
-- RYB mixes
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment