Skip to content

Commit

Permalink
Fixed a typo in trainConfiguratorGui.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
CondensedChaos committed Jul 25, 2023
1 parent 574943c commit c323363
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion _metadata
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"name" : "Meteora-Train-System",
"steamContentId" : "3006987088",
"tags" : "Crafting and Building|In-Game Tools|Mechanics|Vehicles and Mounts",
"version" : "1.1"
"version" : "1.2"
}
Binary file added _previewimage
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ end

function displayCarData(TrainSetData, indexedTrainset, carNumber)

if self.logging thensb.logInfo("\ndisplaycardata() car N " .. tostring(carNumber) .. "called") end
if self.logging then sb.logInfo("\ndisplaycardata() car N " .. tostring(carNumber) .. "called") end

local vehicleName = indexedTrainset[carNumber].vehicleName
local hasPantograph = self.listOfCars[vehicleName].hasPantograph
Expand Down
8 changes: 3 additions & 5 deletions objects/rails/stationController/stationController.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1257,10 +1257,8 @@ function update(dt)
--storage.saveFile[storage.uuid].nodepos = {}
world.setProperty("stationController_file", storage.saveFile)
storage.saveFile = world.getProperty("stationController_file")
if self.logging then
sb.logInfo("SAVE FILE AS FOLLOWS: ")
if storage.saveFile then tprint(storage.saveFile) end
end
if self.logging then sb.logInfo("SAVE FILE AS FOLLOWS: ") end
if storage.saveFile then tprint(storage.saveFile) end
else
if self.logging then sb.logInfo("SAVE FILE FOUND: ") end
if storage.saveFile[storage.uuid] == nil then
Expand Down Expand Up @@ -1297,7 +1295,7 @@ function update(dt)
if storage.saveFile[storage.uuid].grouped then
end
end
if self.logging and storage.saveFile then tprint(storage.saveFile) end
if storage.saveFile then tprint(storage.saveFile) end
end

initNodePos()
Expand Down
6 changes: 3 additions & 3 deletions scripts/linkedTrain.lua
Original file line number Diff line number Diff line change
Expand Up @@ -944,12 +944,12 @@ function testRunModeRoutine(currentStopPos)
sb.logInfo("=============TARGET RAIL STOP (" .. tostring(self.nextStation) .. ") pos:" .. tostring(posTarget[1]) .. "," .. tostring(posTarget[2]))
--sb.logInfo("POS[1][1] == POS[2][1]: " .. tostring((currentStopPos[1] == posTarget[1])))
--sb.logInfo("POS[1][2] == POS[2][2]: " .. tostring((currentStopPos[2] == posTarget[2])))
sb.logInfo("POS[1][1] == POS[2][1] +-0.85: " .. tostring( (currentStopPos[1] <= (posTarget[1] + 0.85)) and (currentStopPos[1] >= (posTarget[1] - 0.85)) ) )
sb.logInfo("POS[1][2] == POS[2][2] +-0.85: " .. tostring( (currentStopPos[2] <= (posTarget[2] + 0.85)) and (currentStopPos[2] >= (posTarget[2] - 0.85)) ) )
sb.logInfo("POS[1][1] == POS[2][1] +-1: " .. tostring( (currentStopPos[1] <= (posTarget[1] + 1)) and (currentStopPos[1] >= (posTarget[1] - 1)) ) )
sb.logInfo("POS[1][2] == POS[2][2] +-1: " .. tostring( (currentStopPos[2] <= (posTarget[2] + 1)) and (currentStopPos[2] >= (posTarget[2] - 1)) ) )
end

--if (currentStopPos[1] == posTarget[1]) and (currentStopPos[2] == posTarget[2]) then
if ( ( (currentStopPos[1] <= (posTarget[1] + 0.85)) and (currentStopPos[1] >= (posTarget[1] - 0.85)) ) and ( (currentStopPos[2] <= (posTarget[2] + 0.85)) and (currentStopPos[2] >= (posTarget[2] - 0.85)) ) ) then
if ( ( (currentStopPos[1] <= (posTarget[1] + 1)) and (currentStopPos[1] >= (posTarget[1] - 1)) ) and ( (currentStopPos[2] <= (posTarget[2] + 1)) and (currentStopPos[2] >= (posTarget[2] - 1)) ) ) then
local arrivedAtStation = self.nextStation
local stationEntityId = self.stationsData.id[self.nextStation]
world.sendEntityMessage(stationEntityId, "testRunCarArrivedAt", arrivedAtStation, world.time())
Expand Down

0 comments on commit c323363

Please sign in to comment.