Skip to content

Connector counterpart access#274

Draft
CorwinMacGregor wants to merge 4 commits intoMerlinofMines:masterfrom
CorwinMacGregor:Connector-Counterpart-Access
Draft

Connector counterpart access#274
CorwinMacGregor wants to merge 4 commits intoMerlinofMines:masterfrom
CorwinMacGregor:Connector-Counterpart-Access

Conversation

@CorwinMacGregor
Copy link
Contributor

These changes provide access to IMyShipConnector's OtherConnector value, which is blockref for the connector on the other side of a docked connector's docking interface

Have minified these changes in-place in an in-game copy of this script; changes are functional, do not appear to produce any bugs or glitches, and throw no errors

Add COUNTERPART to the enum of Properties
Add COUNTERPART Property word-tokens
Add String Handler for COUNTERPART property, referencing IMyShipConnector's OtherConnector value
@MerlinofMines
Copy link
Owner

Please add tests to the Connector Block to cover the added functionality

@MerlinofMines
Copy link
Owner

Oh, please also update the docs to describe the new property

@CorwinMacGregor
Copy link
Contributor Author

I don't know how to go about making or adding test(s) for this functionality, but I have hand-minified it and injected it into a copy of the base workshop-available EasyCommands script, where it functioned as intended without any (apparent) adverse side effects.

I'll take a look at how I might want to go about seeing this feature documented in the docs.

@MerlinofMines
Copy link
Owner

There is a test class for ConnectorBlock and you can use it along with other BlockHandlerTests as an example of how to add them

https://github.com/MerlinofMines/EasyCommands/blob/master/EasyCommands.Tests/ScriptTests/FunctionalTests/BlockHandlers/ConnectorBlockTests.cs

These should run just fine locally as long as your project is set up correctly in visual studio.

As for docs, the relevant file is here:
https://github.com/MerlinofMines/EasyCommands/blob/master/docs/EasyCommands/blockHandlers/connector.md

@CorwinMacGregor CorwinMacGregor marked this pull request as draft March 24, 2025 03:26
@CorwinMacGregor
Copy link
Contributor Author

Converted to draft as I still need to write the testing files, and the changes to the docs

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.

2 participants