[#2796] Reorder comms data assignment in station placement#2797
Closed
oznogon wants to merge 1 commit intodaid:masterfrom
Closed
[#2796] Reorder comms data assignment in station placement#2797oznogon wants to merge 1 commit intodaid:masterfrom
oznogon wants to merge 1 commit intodaid:masterfrom
Conversation
In ECS, setTemplate() overwrites the entity's CommsReceiver component to use the default comms script. In place_station_scenario_utility.lua, re-initialize setCommsFunction immediately after applying setTemplate in placeStation. On legacy this should be idempotent, on ECS this should restore the expected state.
daid
reviewed
Mar 18, 2026
| end | ||
| end | ||
| if commsStation ~= nil then | ||
| station:setCommsScript(""):setCommsFunction(commsStation) |
Owner
There was a problem hiding this comment.
The setCommsScript is redundant (setting a function overrules a script) and this looks odd, does it this depend on some global?
Contributor
Author
There was a problem hiding this comment.
going to throw this valid hot potato at @Xansta
Contributor
There was a problem hiding this comment.
So, I did both setCommsScript to an empty string and setCommsFunction to the desired function based on something that happened when I was first writing scripts several years ago. I can't tell you why specifically, because I don't remember. I have not gone back to change instances because while it's redundant, and my reasons are fuzzy, it still works and I've been spending my time writing other scenario scripts
Contributor
Author
|
Closing in favor of #2798 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In ECS,
setTemplate()overwrites the entity's CommsReceiver component to use the default comms script.In
place_station_scenario_utility.lua, re-initializesetCommsFunctionimmediately after applyingsetTemplateinplaceStation. On legacy this should be idempotent, on ECS this should restore the expected state.Should fix #2796.