|
11 | 11 | using Sandbox.Definitions; |
12 | 12 | using Sandbox.Engine.Multiplayer; |
13 | 13 | using Sandbox.Game.Entities; |
| 14 | +using Sandbox.Game.Entities.Cube; |
14 | 15 | using Sandbox.Game.EntityComponents; |
15 | 16 | using Sandbox.Game.Multiplayer; |
16 | 17 | using Sandbox.Game.World; |
@@ -108,16 +109,19 @@ public override void Update() |
108 | 109 | var delayTimer = new System.Timers.Timer |
109 | 110 | { |
110 | 111 | AutoReset = false, |
111 | | - Interval = 5000, |
| 112 | + Interval = 30000, |
112 | 113 | }; |
113 | 114 |
|
114 | 115 | delayTimer.Elapsed += (sender, args) => _ready = true; |
115 | 116 | delayTimer.Start(); |
116 | | - |
117 | | - var keepAliveAction = MyAPIGateway.TerminalControls.CreateAction<IMyRemoteControl>("Concealment.KeepAlive"); |
118 | | - keepAliveAction.Action = KeepAlive; |
119 | | - MyAPIGateway.TerminalControls.AddAction<IMyRemoteControl>(keepAliveAction); |
120 | | - |
| 117 | + |
| 118 | + if (Settings.Data.RCKeepAliveAction) |
| 119 | + { |
| 120 | + var keepAliveAction = MyAPIGateway.TerminalControls.CreateAction<IMyRemoteControl>("Concealment.KeepAlive"); |
| 121 | + keepAliveAction.Action = KeepAlive; |
| 122 | + MyAPIGateway.TerminalControls.AddAction<IMyRemoteControl>(keepAliveAction); |
| 123 | + } |
| 124 | + |
121 | 125 | MyMultiplayer.Static.ClientJoined += RevealCryoPod; |
122 | 126 |
|
123 | 127 | _init = true; |
@@ -367,14 +371,21 @@ public bool IsExcluded(ConcealGroup group) |
367 | 371 | if (block == null) |
368 | 372 | continue; |
369 | 373 |
|
370 | | - if (block is IMyProductionBlock p && !Settings.Data.ConcealProduction && p.IsProducing) |
371 | | - { |
372 | | - Log.Debug($"{group.GridNames} exempted production ({p.CustomName} active)"); |
373 | | - exclude = true; |
374 | | - break; |
375 | | - } |
376 | | - |
377 | | - if (Settings.Data.ExcludedSubtypes.Contains(block.BlockDefinition.Id.SubtypeName)) |
| 374 | + if (block is MyRefinery r && !Settings.Data.ConcealProduction && !r.InputInventory.Empty() && r.IsFunctional && r.Enabled) |
| 375 | + { |
| 376 | + Log.Debug($"{group.GridNames} exempted refinery ({r.CustomName} active)"); |
| 377 | + exclude = true; |
| 378 | + break; |
| 379 | + } |
| 380 | + |
| 381 | + if (block is MyProductionBlock p && !Settings.Data.ConcealProduction && p.IsProducing) |
| 382 | + { |
| 383 | + Log.Debug($"{group.GridNames} exempted production ({p.CustomName} active)"); |
| 384 | + exclude = true; |
| 385 | + break; |
| 386 | + } |
| 387 | + |
| 388 | + if (Settings.Data.ExcludedSubtypes.Contains(block.BlockDefinition.Id.SubtypeName)) |
378 | 389 | { |
379 | 390 | Log.Debug($"{group.GridNames} exempted subtype {block.BlockDefinition.Id.SubtypeName}"); |
380 | 391 | exclude = true; |
|
0 commit comments