Skip to content

Commit

Permalink
#238 United wagons and cars. WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
George-VB committed Apr 24, 2024
1 parent caa9d2d commit 49f3e72
Show file tree
Hide file tree
Showing 12 changed files with 611 additions and 546 deletions.
2 changes: 1 addition & 1 deletion compile.bat
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ goto :EOF
:WriteCustomTags
echo VERSION :%REPO_REVISION%
echo MIN_COMPATIBLE_REVISION:%MIN_COMPATIBLE_REVISION%
echo TITLE :xUSSR Railway Set 0.9-dev.r%REPO_REVISION%
echo TITLE :xUSSR Railway Set 0.8.2.r%REPO_REVISION%
echo FILENAME :%NMLNAME%.grf
goto :EOF

Expand Down
522 changes: 262 additions & 260 deletions src/PNMLs_usage

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/cars/cars-header.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@ grf
}

}

disable_car = 0;
6 changes: 6 additions & 0 deletions src/code-templates.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,12 @@ if (disable_acdcemu) { item (FEAT_TRAINS, name) { property { climates_available:
#define allow_subway(name) \
if (disable_subway) { item (FEAT_TRAINS, name) { property { climates_available: NO_CLIMATE; } } } \

#define allow_wagon(name) \
if (disable_wagon) { item (FEAT_TRAINS, name) { property { climates_available: NO_CLIMATE; } } } \

#define allow_car(name) \
if (disable_car) { item (FEAT_TRAINS, name) { property { climates_available: NO_CLIMATE; } } } \

// Special cargo support
#define use_yeti(name, cargo_allow_refit_list) \
if (yeti_on) { item (FEAT_TRAINS, name) { property { cargo_allow_refit: [cargo_allow_refit_list]; } } } \
Expand Down
3 changes: 0 additions & 3 deletions src/electric/electric-header.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ grf
def_value: 15;
}
}

param 5
{
new_costs
Expand All @@ -67,7 +66,6 @@ grf
};
}
}

param 4
{
new_rcosts
Expand All @@ -87,7 +85,6 @@ grf
};
}
}

param 2
{
disable_acelectric
Expand Down
65 changes: 55 additions & 10 deletions src/header.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,80 @@ grf
bit: 7;
def_value: 0;
}
disable_groups
{
name: string(STR_PARAM_DISABLE_GROUPS_NAME);
desc: string(STR_PARAM_DISABLE_GROUPS_DESC);
type: bool;
bit: 4;
def_value: 0;
}
}
param 4
param 1
{
speed_penalty_percent
{
type: int;
name: string(STR_PARAM_SPEED_PENALTY_PERCENT_NAME);
desc: string(STR_PARAM_SPEED_PENALTY_PERCENT_DESC);
min_value: 0;
max_value: 50;
def_value: 15;
}
}
param 2
{
new_costs
{
type: int;
name: string(STR_PARAM_RCBASE_NAME);
desc: string(STR_PARAM_RCBASE_DESC);
name: string(STR_PARAM_CBASE_NAME);
desc: string(STR_PARAM_CBASE_DESC);
min_value: 0;
max_value: 2;
max_value: 3;
def_value: 0;
names:
{
0: string(STR_PARAM_BASE_DEFAULT);
1: string(STR_PARAM_BASE_HALVED);
2: string(STR_PARAM_BASE_QUARTERED);
3: string(STR_PARAM_BASE_EIGHT);
};
}
}
param 1
param 3
{
speed_penalty_percent
new_rcosts
{
type: int;
name: string(STR_PARAM_SPEED_PENALTY_PERCENT_NAME);
desc: string(STR_PARAM_SPEED_PENALTY_PERCENT_DESC);
name: string(STR_PARAM_RCBASE_NAME);
desc: string(STR_PARAM_RCBASE_DESC);
min_value: 0;
max_value: 50;
def_value: 15;
max_value: 3;
def_value: 0;
names:
{
0: string(STR_PARAM_BASE_DEFAULT);
1: string(STR_PARAM_BASE_HALVED);
2: string(STR_PARAM_BASE_QUARTERED);
3: string(STR_PARAM_BASE_EIGHT);
};
}
}
}

#define anystate(GRF_ID) \
grf_future_status(GRF_ID) || \
grf_current_status(GRF_ID) \

disable_wagon = 0;
if (anystate("Meo\B7"))
{
disable_wagon = 1;
}

disable_car = 0;
if (anystate("Meo\B8"))
{
disable_car = 1;
}

31 changes: 31 additions & 0 deletions src/wagons/wagons-cargos.pnml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Заголовок грузов
#include "cargoes-all.pnml"
#include "wagons-code-templates-lv-pred.pnml"
#include "cargoes-open-templates.pnml"

// Грузы для грузовых вагонов
#include "cargoes-capacity.pnml"
#include "cargoes-refit.pnml"
#include "cargoes-loadspeed.pnml"
#include "cargoes-weight.pnml"
#include "cargoes5/cargoes.pnml"
#include "cargoes5/cargoes-flatbed.pnml"
#include "cargoes6/cargoes.pnml"
#include "cargoes6/cargoes-gondola.pnml"
#include "cargoes6/cargoes-flatbed.pnml"
#include "cargoes7/cargoes-gondola.pnml"
#include "cargoes8/cargoes-crates.pnml"
#include "cargoes8/cargoes.pnml"
#include "cargoes8/cargoes-gondola.pnml"
#include "cargoes8/cargoes-flatbed.pnml"
#include "cargoes8/container/containers.pnml"
#include "cargoes9/cargoes.pnml"
#include "cargoes9/cargoes-gondola.pnml"
#include "cargoes9/cargoes-flatbed.pnml"
#include "cargoes9/container/containers.pnml"
#include "cargoes10/cargoes.pnml"
#include "cargoes11/cargoes.pnml"
#include "cargoes12/cargoes.pnml"
#include "cargoes12/container/containers.pnml"
#include "cargoes13/cargoes.pnml"
#include "cargoes14/cargoes.pnml"
2 changes: 2 additions & 0 deletions src/wagons/wagons-header.pnml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@ grf
}

}

disable_wagon = 0;
Loading

0 comments on commit 49f3e72

Please sign in to comment.