New option RAILWAYS
With RAILWAYS, highway-like sectors double as rail. They need to be at least 5% efficient to be operational, and then they additionally extend rail into adjacent sectors that are at least 60% efficient. New opt_RAILWAYS, SCT_HAS_RAIL(), sct_rail_track(). Update sector_mcost(), bp_neighbors(), lnd_mar_one_sector() for RAILWAYS mobility rules. Update sinfra(), spyline(), satdisp_sect() to show rail track instead of rail infrastructure for RAILWAYS. New virtual sector selector track, implemented by nsc_sct_track().
This commit is contained in:
parent
cacc393c53
commit
b27298d4c5
13 changed files with 93 additions and 7 deletions
|
@ -49,6 +49,7 @@
|
|||
static void *nsc_ver(struct valstr *, struct natstr *, void *);
|
||||
static void *nsc_ver_maxnoc(struct valstr *, struct natstr *, void *);
|
||||
static void *nsc_sct_terr(struct valstr *, struct natstr *, void *);
|
||||
static void *nsc_sct_track(struct valstr *, struct natstr *, void *);
|
||||
static void *nsc_cargo_nplane(struct valstr *, struct natstr *, void *);
|
||||
static void *nsc_cargo_nchopper(struct valstr *, struct natstr *, void *);
|
||||
static void *nsc_cargo_nxlight(struct valstr *, struct natstr *, void *);
|
||||
|
@ -160,6 +161,7 @@ struct castr sect_ca[] = {
|
|||
{"uran", fldoff(sct_uran), NSC_UCHAR, 0, NULL, EF_BAD, 0},
|
||||
{"oldown", fldoff(sct_oldown), NSC_NATID, 0, NULL, EF_NATION, 0},
|
||||
{"off", fldoff(sct_off), NSC_UCHAR, 0, NULL, EF_BAD, 0},
|
||||
{"track", 0, NSC_LONG, 0, nsc_sct_track, EF_BAD, NSC_EXTRA},
|
||||
NSC_IVEC(fldoff(sct_item), ""),
|
||||
NSC_IVEC(fldoff(sct_dist), "_dist"),
|
||||
NSC_IVEC(fldoff(sct_del), "_del"),
|
||||
|
@ -772,6 +774,13 @@ nsc_sct_terr(struct valstr *val, struct natstr *np, void *ptr)
|
|||
return ptr;
|
||||
}
|
||||
|
||||
static void *
|
||||
nsc_sct_track(struct valstr *val, struct natstr *np, void *ptr)
|
||||
{
|
||||
val->val_as.lng = sct_rail_track(ptr);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void *
|
||||
nsc_cargo_nplane(struct valstr *val, struct natstr *np, void *ptr)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue