Updated invisible track check
*Updated Track.hasNoMaterials to detect a track as invisible if it has no sleepers and rails
This commit is contained in:
parent
ad064734d1
commit
e19d2ff7e4
@ -51,10 +51,10 @@ export default class Track extends SceneryObject {
|
|||||||
|
|
||||||
hasNoMaterials() {
|
hasNoMaterials() {
|
||||||
if(!this.prefab_name) return false;
|
if(!this.prefab_name) return false;
|
||||||
|
const materials = this.prefab_name.split(',');
|
||||||
|
if(materials.length < 3) return false;
|
||||||
|
|
||||||
return !this.prefab_name.split(',').some((name) => {
|
return materials[0] === 'none-slp' && materials[2] === 'trans-mat';
|
||||||
return name.trim() !== 'trans-mat';
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getStartAngleXZ() {
|
getStartAngleXZ() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user