Module Train

Description

Module Status: Work in progress.

Usage:

    local Train = require('__eradicators-library__/erlib/factorio/Train')()
    

LuaTrain

get_first_locomotive(train)
get_force(train)
get_position(train)

TrainSchedule

Train.Schedule.remove_record(train_schedule, index)
Train.Schedule.add_record(train_schedule[, index], record)
Train.Schedule.remove_all_temporary_stops(train_schedule)


LuaTrain

get_first_locomotive(train)

Parameters:

Returns:

    LuaEntity
get_force(train)

Parameters:

Returns:

    LuaForce The force of the first locomotive.
get_position(train)

Parameters:

Returns:

    LuaPosition The position of the first locomotive.

TrainSchedule

Important Note: Lua nil is a valid TrainSchedule, it represents a schedule without any stations.
Train.Schedule.remove_record(train_schedule, index)

Parameters:

Returns:

    TrainSchedule or nil
Train.Schedule.add_record(train_schedule[, index], record)

Parameters:

Returns:

    TrainSchedule or nil
Train.Schedule.remove_all_temporary_stops(train_schedule)

Parameters:

Returns:

    TrainSchedule or nil
generated by LDoc 1.4.6 Last updated 2021-09-10 19:51:19