//The relative path to the 'arial.ttf' font file must be defined in the parent file with 'ArialPath' string value

#include "woods.inc"

#declare ColorKaki1 = color srgb < 101 / 255, 112 / 255, 95 / 255 >;
#declare ColorKaki2 = color srgb < 81 / 255, 87 / 255, 72 / 255 >;
#declare AmmoCrateTexture = texture{
                                    pigment{ 
                                            bozo color_map{ [0.0 ColorKaki1 ][0.5 ColorKaki2 ][ 1.0 ColorKaki1 ] }
                                            scale 0.1
                                           } 
                                    finish{specular 0.01 roughness 0.01}
                                   }

#declare TextScale = 0.125;

//La caisse de munition
#declare AmmoCrate = 
union{
	union{ 
		box{<-1, 0, -0.5>,<1, 1.5, 0.5>}
		box{<-1.1, 1.5, -0.6>, < 1.1, 1.6, 0.6>}
		texture{ AmmoCrateTexture }
	}
	intersection{
		union{
			text{ttf ArialPath "N285" 0.2, 0 scale < TextScale, TextScale, 1 > translate 0.62 * y }
			text{ttf ArialPath "8 FUZE MTSQ M577" 0.2, 0 scale < TextScale / 2, TextScale / 2, 1 > translate 0.5 * y }
			text{ttf ArialPath "LOT HAT 84 J 013 - 007" 0.2, 0 scale < TextScale / 2, TextScale / 2, 1 > translate 0.4 * y }
			text{ttf ArialPath "LOADED 9-84" 0.2, 0 scale < TextScale / 2, TextScale / 2 , 1 > translate 0.3 * y }
		}
		box{ < -1, 0, -0.01 >, < 1, 1.5, 0.01 > }
		texture{ pigment{ color srgb 1 } }
	}
}
             