mirror of
https://github.com/Sokomine/colormachine.git
synced 2024-11-12 21:50:17 +01:00
added support for myroofs
This commit is contained in:
parent
1f738ab99b
commit
505b99a164
|
@ -15,3 +15,6 @@ hardenedclay?
|
|||
clstone?
|
||||
colorcubes?
|
||||
colouredstonebricks?
|
||||
myroof?
|
||||
mydeck?
|
||||
lavalamp?
|
||||
|
|
34
init.lua
34
init.lua
|
@ -292,7 +292,7 @@ local mydeck_names = {'deck_boards','deck_beam',
|
|||
'stairs','stairsb','stairs_ocorner','stairs_icorner','stairs_railr','stairs_raill','stairs_railr_end','stairs_raill_end'};
|
||||
for i,v in ipairs( mydeck_names ) do
|
||||
colormachine.data[ 'mydeck_'..v..'s_' ] = {
|
||||
nr= 1.0 + 1/100*i;
|
||||
nr= 1.0 + 1/100*i,
|
||||
modname='mydeck',
|
||||
shades={1,0,1,0,0,0,1,0},
|
||||
grey_shades={1,1,1,1,1},
|
||||
|
@ -303,6 +303,28 @@ for i,v in ipairs( mydeck_names ) do
|
|||
composed=1,
|
||||
p=1};
|
||||
end
|
||||
mydeck_names = nil;
|
||||
|
||||
|
||||
local myroofs_names = {'', '_bundle', '_icorner','_ocorner',
|
||||
'_round_bundle', '_round_long', '_round_long_icorner', '_round_long_ocorner',
|
||||
'_long', '_long_icorner', '_long_ocorner'};
|
||||
for i,v in ipairs( myroofs_names ) do
|
||||
colormachine.data[ 'myroofs'..v..'_' ] = {
|
||||
nr= 2.0 + 1/100*i,
|
||||
modname='myroofs',
|
||||
shades={1,0,1,0,0,0,1,0},
|
||||
grey_shades={1,1,1,1,1},
|
||||
u=0,
|
||||
descr="myr"..tostring(i),
|
||||
block="myroofs:asphalt_shingle_grey"..v,
|
||||
add='asphalt_shingle_',
|
||||
obj_postfix=v,
|
||||
composed=1,
|
||||
p=1};
|
||||
end
|
||||
myroof_names = nil;
|
||||
|
||||
|
||||
colormachine.ordered = {}
|
||||
|
||||
|
@ -543,6 +565,16 @@ colormachine.translate_color_name = function( meta, k, new_color, c, s, g, as_ob
|
|||
end
|
||||
end
|
||||
|
||||
if( colormachine.data[k].modname=='myroofs' and as_obj_name==1 ) then
|
||||
if( g==5 or new_color == 'black' ) then
|
||||
return "myroofs:asphalt_shingle_hd_asphalt"..(colormachine.data[k].postfix or '');
|
||||
elseif( new_color=='orange') then
|
||||
return "myroofs:asphalt_shingle_hd_terracotta"..(colormachine.data[k].postfix or '');
|
||||
elseif( new_color=='dark_orange') then
|
||||
return "myroofs:asphalt_shingle_hd_wood"..(colormachine.data[k].postfix or '');
|
||||
end
|
||||
end
|
||||
|
||||
if( (k=='homedecor_book_' or k=='homedecor_bottle_' or k=='homedecor_welcome_mat_' ) and as_obj_name==1) then
|
||||
if( new_color == 'dark_orange' ) then
|
||||
new_color = 'brown';
|
||||
|
|
Loading…
Reference in New Issue
Block a user