Skip to content

setTrainSpeed vs getTrainSpeed #2732

@KWKSND

Description

@KWKSND

Describe the bug

When you use setTrainSpeed( ) you are able to set it to a positive or negative number.

When using getTrainSpeed( ) it will not return a negative number.
When the speed is set below 0 getTrainSpeed() will only return 0.

To be able to make a train that is reversible and have all cars match the engine speed this function must return the negative value that was set to the train using setTrainSpeed( )

Steps to reproduce

create train
set speed to a negative value using setTrainSpeed( )
output value using getTrainSpeed( ) to see only a 0.

Version

No response

Additional context

No response

Relevant log output

No response

Security Policy

  • I have read and understood the Security Policy and this issue is not security related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions