Ship Components Do Not Detect "Enabled" Change Through Mouse

High Sodium shared this bug 3 years ago
Outdated

So as the title says, there seems to an issue with components that are activated via mouse being detected correctly by the programmable block.


For example if you have a drill on a mining ship and you use the mouse to activate it, it is not detected as active by the PB.

I have a simple script that reflects that for reproduction. If you activate the drill manually (ie. setting power to on/off in the block) the scripts work correctly. If you drill normally (ie. with left click on the mouse) the script doesn't detect the component.Enabled change


public Program()
{
    Runtime.UpdateFrequency = UpdateFrequency.Update100;
}

public void Main(string argument, UpdateType updateSource)
{
    IMyShipDrill rightDrill;
    IMyInteriorLight light;

    light = GridTerminalSystem.GetBlockWithName("Active Light") as 
    IMyInteriorLight;
    rightDrill = GridTerminalSystem.GetBlockWithName("Right Drill") as 
    IMyShipDrill;

if (rightDrill == null)
{
    Echo("I can't get there!"); //good ol' SCVs
    return;
}
if(light == null)
{
    Echo("The light don't exist, sir!");
    return;
}

//---------- Culprit -------------
light.Enabled = rightDrill.Enabled;

}

Replies (1)

photo
1

Hello, Engineer!


Thank you for your feedback! Your topic has been added between considered issues.

Please keep voting for the issue as it will help us to identify the most serious bugs.


We really appreciate your patience.


Kind Regards

Keen Software House: QA Department

Leave a Comment
 
Attach a file