Singulo field gen power fix + powered collide fix (#10443)

* Connected check

* Power gen fix
This commit is contained in:
keronshb
2022-08-14 22:37:58 -04:00
committed by GitHub
parent 62e57ab793
commit 073e394268
2 changed files with 2 additions and 2 deletions

View File

@@ -41,7 +41,7 @@ public sealed class ContainmentFieldGeneratorSystem : EntitySystem
foreach (var generator in EntityQuery<ContainmentFieldGeneratorComponent>()) foreach (var generator in EntityQuery<ContainmentFieldGeneratorComponent>())
{ {
if (generator.PowerBuffer <= 0) //don't drain power if there's no power, or if it's somehow less than 0. if (generator.PowerBuffer <= 0) //don't drain power if there's no power, or if it's somehow less than 0.
return; continue;
generator.Accumulator += frameTime; generator.Accumulator += frameTime;

View File

@@ -133,7 +133,7 @@ namespace Content.Server.Singularity.EntitySystems
!EntityManager.HasComponent<StationDataComponent>(entity) && // these SHOULD be in null-space... but just in case. Also, maybe someone moves a singularity there.. !EntityManager.HasComponent<StationDataComponent>(entity) && // these SHOULD be in null-space... but just in case. Also, maybe someone moves a singularity there..
(component.Level > 4 || (component.Level > 4 ||
!EntityManager.HasComponent<ContainmentFieldComponent>(entity) && !EntityManager.HasComponent<ContainmentFieldComponent>(entity) &&
!EntityManager.HasComponent<ContainmentFieldGeneratorComponent>(entity)); !(EntityManager.TryGetComponent<ContainmentFieldGeneratorComponent>(entity, out var fieldGen) && fieldGen.IsConnected));
} }
private void HandleDestroy(ServerSingularityComponent component, EntityUid entity) private void HandleDestroy(ServerSingularityComponent component, EntityUid entity)