Skip to content

Commit

Permalink
fix not working track type selection / fix wrong length / remove ship…
Browse files Browse the repository at this point in the history
… / remove env file
  • Loading branch information
eisfeuer committed May 28, 2020
1 parent b8e3b23 commit 22b3314
Show file tree
Hide file tree
Showing 14 changed files with 21 additions and 5 deletions.
18 changes: 16 additions & 2 deletions mod/res/construction/station/rail/motras.con
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ local function hasDistanceFromCenter(platformLength, position, distance)
return math.abs(position) <= distance
end

local function getTrackModule(trackType, catenary)
if trackType > 0 then
if catenary > 0 then
return 'station/rail/modules/motras_track_train_high_speed_catenary.module'
end
return 'station/rail/modules/motras_track_train_high_speed.module'
end

if catenary > 0 then
return 'station/rail/modules/motras_track_train_normal_catenary.module'
end
return 'station/rail/modules/motras_track_train_normal.module'
end

local oddBuildingPlacement = {
{
{ gridX = 0, slot = 7, module = 'station/rail/modules/motras_main_building_small_era_c.module'}
Expand Down Expand Up @@ -344,7 +358,7 @@ function data()
key = "motras_length",
name = _("length_in_m"),
uiType = "COMBOBOX",
values = { _("40"), _("80"), _("120"), _("160"), _("200"), _("240"), _("320"), _("360"), _("400"), _("440"), _("480") },
values = { _("40"), _("80"), _("120"), _("160"), _("200"), _("240"), _("280"), _("320"), _("360"), _("400"), _("440"), _("480") },
defaultIndex = 3,
},
{
Expand Down Expand Up @@ -404,7 +418,7 @@ function data()

local patternOptions = {
platformModule = platformModules[params.motras_platform_height + 1],
trackModule = 'station/rail/modules/motras_track_train_normal_catenary.module',
trackModule = getTrackModule(params.trackType, params.catenary),
trackCount = trackCount,
horizontalSize = length
}
Expand Down
2 changes: 1 addition & 1 deletion mod/res/scripts/motras_platform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local c = require('motras_constants')
local PlatformClass = {}

function PlatformClass:new(gridElement)
Platform = gridElement
local Platform = gridElement

function Platform:isPlatform()
return true
Expand Down
2 changes: 1 addition & 1 deletion mod/res/scripts/motras_track.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local c = require('motras_constants')
local TrackClass = {}

function TrackClass:new(gridElement)
Track = gridElement
local Track = gridElement

function Track:isTrack()
return true
Expand Down
2 changes: 1 addition & 1 deletion mod/res/scripts/motras_void.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function voidClass:new(gridElement, grid)
gridElement = makeGridElement(gridElement.gridX, gridElement.gridY, grid)
end

Void = gridElement
local Void = gridElement

function Void:getSlotId()
return nil
Expand Down
2 changes: 2 additions & 0 deletions rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ end
task :remove_debug do
puts 'removing debug stuff'
sh "rm #{staging_area_path}/res/scripts/inspect.lua"
sh "rm #{staging_area_path}/res/scripts/env.lua"
sh "rm -rf #{staging_area_path}/res/models/model/vehicle"
end

task cleanpush: [:clean_staging_area, :push]
Expand Down
Binary file added work/screenshots/20200522004108_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added work/screenshots/20200522165354_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added work/screenshots/20200522170012_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added work/screenshots/20200522170901_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added work/screenshots/20200522171117_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added work/screenshots/20200522172129_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added work/screenshots/20200522172358_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added work/screenshots/20200522173534_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added work/screenshots/20200522173715_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 22b3314

Please sign in to comment.