Skip to content

(#54) Implement TrainSets#205

Draft
marcinn wants to merge 12 commits intomainfrom
dev/trainsets6
Draft

(#54) Implement TrainSets#205
marcinn wants to merge 12 commits intomainfrom
dev/trainsets6

Conversation

@marcinn
Copy link
Copy Markdown
Member

@marcinn marcinn commented Apr 26, 2026

Fixes #54

Copy link
Copy Markdown
Member Author

@marcinn marcinn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • remove ai slop
  • do better public api
  • reduce mover changes

To do in next review:

  • check commands refactoring

Comment thread addons/libmaszyna/libmaszyna.gd Outdated
add_autoload_singleton("Console", "res://addons/libmaszyna/console/console.gd")
add_autoload_singleton("AudioStreamManager", "res://addons/libmaszyna/sound/audio_stream_manager.gd")
add_autoload_singleton("UserSettings","res://addons/libmaszyna/settings/user_settings.gd" )
_ensure_autoload("MaszynaEnvironment", "res://addons/libmaszyna/environment/maszyna_environment.gd")
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this ai slop

Comment thread addons/libmaszyna/libmaszyna.gd Outdated
remove_autoload_singleton("Console")
remove_autoload_singleton("MaszynaEnvironment")
remove_autoload_singleton("UserSettings")
_remove_autoload_if_present("AudioStreamManager")
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this ai slop

Comment thread addons/libmaszyna/libmaszyna.gd Outdated
ProjectSettings.set_initial_value(name, default_value)


func _ensure_autoload(name: String, path: String) -> void:
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this ai slop

compatibility_minimum = "4.4"
reloadable = true
compatibility_minimum = "4.6"
reloadable = false
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this ai slop

func _enter_tree():
_ensure_curve()
_ensure_track()
_ensure_virtual_track()
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Virtual track should not be exposed, and should be managed internally

#pragma once
//---------------------------------------------------------------------------
// Q: 20160805 - odlaczenie pliku fizyki .pas od kompilacji
#include "hamulce.h"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not change Mover!

// TDynamicObject *vehicle{nullptr}; // detected obstacle
int vehicle_end{-1}; // facing end of the obstacle
TMoverParameters *vehicle{nullptr}; // detected obstacle
int vehicle_end{-1}; // facing end of the obstacle
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not change Mover!

bool LoadTypeChange{false}; // indicates load type was changed
std::string LoadQuantity; // jednostki miary
int LoadStatus = 0; //+1=trwa rozladunek,+2=trwa zaladunek,+4=zakończono,0=zaktualizowany model
bool LoadTypeChange{false}; // indicates load type was changed
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not change Mover!


// double CouplerForce(int const End, double dt);
// void CollisionDetect(int const End, double const dt); //
double CouplerForce(int const End, double dt);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine :)

// which aren't part of the same consist
// vehicles which aren't part of the same consist
auto const safevelocitylimit{15.0};
auto const selfvx{std::cos(Rot.Rz) * V};
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fcking ai slop - revert mover changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement TrainSets

1 participant