But i get a error:
←[Knmlc ERROR: "Real_houses_townset.nml", line 174: 'nearby_tile_class' is not defined as a function.
Code: Select all
/* template_realhouse_001 */
template template_realhouse_001_t1(x,y,filename) {
[x+2, y+2, 64, 64, -1, -1, filename]
[x+2, y+2, 64, 64, -1, -1, filename]
[x+2, y+2, 64, 64, -1, -1, filename]
[x+2, y+2, 64, 64, -1, -1, filename]
}
//32bpp
template template_realhouse_001_t1_32bpp(x,y,filename) {
[x+158, y+3, 264, 264, -130, -135, filename]
[x+158, y+400, 264, 264, -130, -135, filename]
[x+158, y+797, 264, 264, -130, -135, filename]
[x+158, y+1193, 264, 264, -130, -135, filename]
}
template template_realhouse_001_t2(x,y,filename) {
[x+2, y+2, 64, 64, -1, -1, filename]
[x+2, y+2, 64, 64, -1, -1, filename]
[x+2, y+2, 64, 64, -1, -1, filename]
[x+2, y+2, 64, 64, -1, -1, filename]
}
//32bpp
template template_realhouse_001_t2_32bpp(x,y,filename) {
[x+287, y+65, 264, 264, -129, -137, filename]
[x+287, y+462, 264, 264, -129, -137, filename]
[x+287, y+859, 264, 264, -129, -137, filename]
[x+287, y+1255, 264, 264, -129, -137, filename]
}
template template_realhouse_001_t3(x,y,filename) {
[x+2, y+2, 64, 64, -1, -1, filename]
[x+2, y+2, 64, 64, -1, -1, filename]
[x+2, y+2, 64, 64, -1, -1, filename]
[x+2, y+2, 64, 64, -1, -1, filename]
}
//32bpp
template template_realhouse_001_t3_32bpp(x,y,filename) {
[x+33, y+65, 264, 264, -127, -137, filename]
[x+33, y+462, 264, 264, -127, -137, filename]
[x+33, y+859, 264, 264, -127, -137, filename]
[x+1, y+1255, 295, 264, -159, -137, filename]
}
template template_realhouse_001_t4(x,y,filename) {
[x+2, y+2, 64, 64, -1, -1, filename]
[x+2, y+2, 64, 64, -1, -1, filename]
[x+2, y+2, 64, 64, -1, -1, filename]
[x+2, y+2, 64, 64, -1, -1, filename]
}
//32bpp
template template_realhouse_001_t4_32bpp(x,y,filename) {
[x+160, y+127, 264, 264, -128, -139, filename]
[x+160, y+524, 264, 264, -128, -139, filename]
[x+160, y+921, 264, 264, -128, -139, filename]
[x+160, y+1317, 264, 264, -128, -139, filename]
}
cargotable { PASS, MAIL, GOOD, FOOD }
switch(FEAT_HOUSES, SELF, switch_houses_cargo_type_accept, climate) {
CLIMATE_ARCTIC: return PASS + (MAIL << 5) + (FOOD << 10);
CLIMATE_TROPICAL: return PASS + (MAIL << 5) + (FOOD << 10);
return PASS + (MAIL << 5) + (GOOD << 10);
}
spriteset (spriteset_realhouse_001_t1) {
template_realhouse_001_t1(0,0,"gfx/template_realhouse_001.png")
}
alternative_sprites(spriteset_realhouse_001_t1, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP) {template_realhouse_001_t1_32bpp(0,0, "gfx/template_realhouse_32_001.png") }
spriteset (spriteset_realhouse_001_t2) {
template_realhouse_001_t2(0,0,"gfx/template_realhouse_001.png")
}
alternative_sprites(spriteset_realhouse_001_t2, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP) {template_realhouse_001_t2_32bpp(0,0, "gfx/template_realhouse_32_001.png") }
spriteset (spriteset_realhouse_001_t3) {
template_realhouse_001_t3(0,0,"gfx/template_realhouse_001.png")
}
alternative_sprites(spriteset_realhouse_001_t3, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP) {template_realhouse_001_t3_32bpp(0,0, "gfx/template_realhouse_32_001.png") }
spriteset (spriteset_realhouse_001_t4) {
template_realhouse_001_t4(0,0,"gfx/template_realhouse_001.png")
}
alternative_sprites(spriteset_realhouse_001_t4, ZOOM_LEVEL_IN_4X, BIT_DEPTH_32BPP) {template_realhouse_001_t4_32bpp(0,0, "gfx/template_realhouse_32_001.png") }
spritelayout spritelayout_realhouse_001_t1_view1 {
ground {
sprite: GROUNDSPRITE_NORMAL;
}
building {
sprite: spriteset_realhouse_001_t1(0);
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
}
}
spritelayout spritelayout_realhouse_001_t2_view1 {
ground {
sprite: GROUNDSPRITE_NORMAL;
}
building {
sprite: spriteset_realhouse_001_t2(0);
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
}
}
spritelayout spritelayout_realhouse_001_t3_view1 {
ground {
sprite: GROUNDSPRITE_NORMAL;
}
building {
sprite: spriteset_realhouse_001_t3(0);
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
}
}
spritelayout spritelayout_realhouse_001_t4_view1 {
ground {
sprite: GROUNDSPRITE_NORMAL;
}
building {
sprite: spriteset_realhouse_001_t4(0);
xoffset: 0;
yoffset: 0;
zoffset: 0;
xextent: 16;
yextent: 16;
zextent: 16;
}
}
/* Switches */
switch(FEAT_HOUSES, PARENT, switch_check_road_northeast_001, nearby_tile_class(-1, 0)) {
1: return 1;
return 0;
}
/* Switches End */
item (FEAT_HOUSES, item_realhouse_001, -1, HOUSE_SIZE_2X2) {
property {
substitute: 40;
name: string(STR_template_realhouse_001);
building_flags: bitmask();
population: 15;
mail_multiplier: 6;
accepted_cargos: [[PASS, 3], [MAIL, 1], [GOOD, 1]];
local_authority_impact: 100;
removal_cost_multiplier: 70;
probability: 8;
years_available: [1970, 9999];
minimum_lifetime: 10;
availability_mask:[bitmask(TOWNZONE_OUTSKIRT, TOWNZONE_OUTER_SUBURB), ALL_CLIMATES | bitmask(ABOVE_SNOWLINE)];
refresh_multiplier: 0;
building_class: 0;
}
graphics {
graphics_north: spritelayout_realhouse_001_t1_view1;
graphics_east: spritelayout_realhouse_001_t2_view1;
graphics_west: spritelayout_realhouse_001_t3_view1;
graphics_south: spritelayout_realhouse_001_t4_view1;
construction_check: switch_check_road_northeast_001;
}
}
Code: Select all
/* Switches */
switch(FEAT_HOUSES, PARENT, switch_check_road_northeast_001, nearby_tile_class(-1, 0)) {
1: return 1;
return 0;
}
/* Switches End */
Code: Select all
construction_check: switch_check_road_northeast_001;