Releases: untoldwind/KontrolSystem2
Releases · untoldwind/KontrolSystem2
v0.5.7.1
Result<T, E>
overhaul.
Background:
- The main use-case of
Result<T, E>
is to serve as return of a function that can either have a successful result of
typeT
or an error of typeE
. - In pretty much all cases the error is just a
string
, i.e. the common use isResult<T, string>
Changes:
- For simplification the type parameter for the error case is dropped, i.e. a result is just
Result<T>
- The old notation
Result<T, E>
(or ratherResult<T, string>
) will still work, but the second parameter is ignored
- The old notation
- The
result.error
field is now a newly introducedcore::error::Error
- For compatibility
core::error::Error
will be automatically converted to a string - Just like before an error
Result
can be created using the builtinErr
function with an error message
- For compatibility
- In addition to the error
message
thecore::error::Error
additional contains astack_trace
to help locating
where theError
was created - As an additional helper there this a
core::error::current_stack()
function to obtain the current stack trace for
debugging purposes.
Support for script based logs:
- Add
MAIN_LOG
andopen_log_file(string)
toksp::debug
- Log files will be cared ein
logs
sub-folder ofto2Local
- Log files will be cared ein
v0.5.7.0
Result<T, E>
overhaul.
Background
- The main use-case of
Result<T, E>
is to serve as return of a function that can either have a successful result of
typeT
or an error of typeE
. - In pretty much all cases the error is just a
string
, i.e. the common use isResult<T, string>
Changes
- For simplification the type parameter for the error case is dropped, i.e. a result is just
Result<T>
- The old notation
Result<T, E>
(or ratherResult<T, string>
) will still work, but the second parameter is ignored
- The old notation
- The
result.error
field is now a newly introducedcore::error::Error
- For compatibility
core::error::Error
will be automatically converted to a string - Just like before an error
Result
can be created using the builtinErr
function with an error message
- For compatibility
- In addition to the error
message
thecore::error::Error
additional contains astack_trace
to help locating
where theError
was created - As an additional helper there this a
core::error::current_stack()
function to obtain the current stack trace for
debugging purposes.
v0.5.6.3
- Add
ObjectAssemblyEngineDeltaV.engine
andObjectAssemblyEngineDeltaV.part
field - Add
StageDeltaV.parts
andObjectAssemblyStageDeltaV.parts
fields - Add additional
ksp::vessel::Part.engine
field to make naming compatible with OAB (and other modules).module_engine
is now supposed to be deprecated
v0.5.6.2
- Add
body.atmosphere_pressure(altitude : float)
method - Add
body.atmosphere_temperature(altitude : float)
method - Add
body.atmosphere_density(altitude : float)
method - Add
engine.calc_max_thrust_output_atm()
method - Fix
GeoCoordinates.terrain_height
andbody.terrain_height
to include offset from scenery
v0.5.6.1
Minor cleanup:
- Improve parser support for string-interpolation
- Improve language documentation
v0.5.6.0
- Add
part.part_title
andpart.part_description
toksp::vessel
andksp::oab
- Support for c# style string interpolation
- Instead of
"Hello " + a.to_string() + " world " + b.to_string()
one can now just write$"Hello {a} world {b}"
- Formatting is supported via
{<interpolationExpression>[,<alignment>][:<formatString>]}
- See https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated for more details
- Instead of
v0.5.5.5
- Add
engineMode.propellant
field - Protentially breaking changes:
- Cleanup
ModuleCommand
: Remove fields that belong toPart
to access those usemoduleCommand.part.field
- Cleanup
ModuleDockingNode
: Remove fields that belong toPart
to access those usedockingNode.part.field
- Cleanup
- Add
.part
field to allModule*
types - Add
moduleCommand.required_resources
- Add
moduleSolarPanel.resource_setting
- Add
moduleHeatshield.required_resources
- Add binding for transmitter modules
- Add binding for lighting modules
- Add binding for generator modules
- Support air intake, command, decoupler, docking node, generator, light, transmitter, science_experiment in VAB
- Make resource container information available in VAB
- Add
.flat_map
and.filter_map
to ranges - Make
warp_to
,cancel_warp
andset_warp_index
inksp::game::warp
available in sync context (i.e. inside UI callback)- This is in part a rollback of the previous change to
warp_to
- This is in part a rollback of the previous change to
- Add binding for RCS modules
- Add binding for ReactionWheel modules
- Add
.active_transmitter
field toScienceStorage
ScienceStorage
had to be moved fromksp::science
toksp::vessel
- Add
.connection_status
to vessel
v0.5.5.4
- Add
engineMode.propellant
field - Protentially breaking changes:
- Cleanup
ModuleCommand
: Remove fields that belong toPart
to access those usemoduleCommand.part.field
- Cleanup
ModuleDockingNode
: Remove fields that belong toPart
to access those usedockingNode.part.field
- Cleanup
- Add
.part
field to allModule*
types - Add
moduleCommand.required_resources
- Add
moduleSolarPanel.resource_setting
- Add
moduleHeatshield.required_resources
- Add binding for transmitter modules
- Add binding for lighting modules
- Add binding for generator modules
- Support air intake, command, decoupler, docking node, generator, light, transmitter, science_experiment in VAB
- Make resource container information available in VAB
- Add
.flat_map
and.filter_map
to ranges - Make
warp_to
,cancel_warp
andset_warp_index
inksp::game::warp
available in sync context (i.e. inside UI callback)- This is in part a rollback of the previous change to
warp_to
- This is in part a rollback of the previous change to
- Add binding for RCS modules
- Add binding for ReactionWheel modules
- Add
.active_transmitter
field toScienceStorage
ScienceStorage
had to be moved fromksp::science
toksp::vessel
- Add
.connection_status
to vessel
v0.5.5.3
- Add
engineMode.propellant
field - Protentially breaking changes:
- Cleanup
ModuleCommand
: Remove fields that belong toPart
to access those usemoduleCommand.part.field
- Cleanup
ModuleDockingNode
: Remove fields that belong toPart
to access those usedockingNode.part.field
- Cleanup
- Add
.part
field to allModule*
types - Add
moduleCommand.required_resources
- Add
moduleSolarPanel.resource_setting
- Add
moduleHeatshield.required_resources
- Add binding for transmitter modules
- Add binding for lighting modules
- Add binding for generator modules
- Support air intake, command, decoupler, docking node, generator, light, transmitter, science_experiment in VAB
- Make resource container information available in VAB
- Add
.flat_map
and.filter_map
to ranges - Make
warp_to
,cancel_warp
andset_warp_index
inksp::game::warp
available in sync context (i.e. inside UI callback)- This is in part a rollback of the previous change to
warp_to
- This is in part a rollback of the previous change to
- Add binding for RCS modules
- Add binding for ReactionWheel modules
v0.5.5.2
- Add
engineMode.propellant
field - Protentially breaking changes:
- Cleanup
ModuleCommand
: Remove fields that belong toPart
to access those usemoduleCommand.part.field
- Cleanup
ModuleDockingNode
: Remove fields that belong toPart
to access those usedockingNode.part.field
- Cleanup
- Add
.part
field to allModule*
types - Add
moduleCommand.required_resources
- Add
moduleSolarPanel.resource_setting
- Add
moduleHeatshield.required_resources
- Add binding for transmitter modules
- Add binding for lighting modules
- Add binding for generator modules
- Support air intake, command, decoupler, docking node, generator, light, transmitter, science_experiment in VAB
- Make resource container information available in VAB
- Add a
sync_warp_to
toksp::game::warp
as a temporary workaround (to be used with care)