Skip to content

Commit

Permalink
Corrected truck and trailer wear naming
Browse files Browse the repository at this point in the history
  • Loading branch information
kniffen committed Nov 19, 2022
1 parent c8c6baf commit 8a0a32d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/components/Trailer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'hook',
'wheels',
'liftAxle',
'damage'
'wear'
]">

<template v-slot:general>
Expand All @@ -30,8 +30,8 @@
<List :items="liftAxleList"></List>
</template>

<template v-slot:damage>
<List :items="damageList"></List>
<template v-slot:wear>
<List :items="wearList"></List>
</template>

</Box>
Expand Down Expand Up @@ -119,7 +119,7 @@
]
},
damageList: function() {
wearList: function() {
return Object.keys(this.damage).map(key => ({
name: key, value: `${Math.floor(100 * this.damage[key])}%`
}))
Expand Down
16 changes: 8 additions & 8 deletions src/components/Truck.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'lights',
'wheels',
'liftAxle',
'damage',
'wear',
]">

<template v-slot:general>
Expand Down Expand Up @@ -106,8 +106,8 @@
<List :items="liftAxleList"></List>
</template>

<template v-slot:damage>
<List :items="damageList"></List>
<template v-slot:wear>
<List :items="wearList"></List>
</template>

</Box>
Expand Down Expand Up @@ -166,7 +166,7 @@
chassisList: function() {
return [
{name: "Damage", value: `${Math.floor(100 * this.chassis.damage)}%`},
{name: "Wear", value: `${Math.floor(100 * this.chassis.damage)}%`},
{name: "Position X", value: this.position.X},
{name: "Position Y", value: this.position.Y},
{name: "Position Z", value: this.position.Z},
Expand All @@ -190,7 +190,7 @@
cabinList: function() {
return [
{name: "Damage", value: `${Math.floor(100 * this.cabin.damage)}%`},
{name: "Wear", value: `${Math.floor(100 * this.cabin.damage)}%`},
{name: "Position X", value: this.cabin.position.X},
{name: "Position Y", value: this.cabin.position.Y},
{name: "Position Z", value: this.cabin.position.Z},
Expand Down Expand Up @@ -238,7 +238,7 @@
{name: "Water Temperature", value: `${Math.round(this.engine.waterTemperature.value)}°C`},
{name: "Battery", value: `${Math.round(this.engine.batteryVoltage.value)} Volts`},
{name: "RPM", value: `${Math.round(this.engine.rpm.value)} / ${this.engine.rpm.max}`},
{name: "Damage", value: `${Math.floor(100 * this.engine.damage)}%`},
{name: "Wear", value: `${Math.floor(100 * this.engine.damage)}%`},
]
},
Expand All @@ -247,7 +247,7 @@
{name: "Forward gears", value: this.transmission.forwardGears},
{name: "Reverse gears", value: this.transmission.reverseGears},
{name: "Current gears", value: `${this.transmission.gear.selected} (${this.transmission.gear.displayed})`},
{name: "Damage", value: `${Math.floor(100 * this.transmission.damage)}%`},
{name: "Wear", value: `${Math.floor(100 * this.transmission.damage)}%`},
{name: "Forward gear ratios", value: this.transmission.gearRatiosForward.filter(ratio => ratio > 0)},
{name: "Reverse gear ratios", value: this.transmission.gearRatiosReverse.filter(ratio => ratio < 0)},
]
Expand Down Expand Up @@ -278,7 +278,7 @@
]
},
damageList: function() {
wearList: function() {
return Object.keys(this.damage).map(key => ({
name: key, value: `${Math.floor(100 * this.damage[key])}%`
}))
Expand Down

0 comments on commit 8a0a32d

Please sign in to comment.