Merge branch 'master' into buckle-locker-fix-1262

This commit is contained in:
DrSmugleaf
2020-07-07 20:36:43 +02:00
5598 changed files with 6598 additions and 6497 deletions

View File

@@ -40,17 +40,15 @@ namespace Content.Server.GameObjects.EntitySystems.AI
foreach (var processor in processors)
{
var att = (AiLogicProcessorAttribute)Attribute.GetCustomAttribute(processor, typeof(AiLogicProcessorAttribute));
if (att != null)
{
_processorTypes.Add(att.SerializeName, processor);
}
// Tests should pick this up
DebugTools.AssertNotNull(att);
_processorTypes.Add(att.SerializeName, processor);
}
}
/// <inheritdoc />
public override void Update(float frameTime)
{
var entities = EntityManager.GetEntities(EntityQuery);
foreach (var entity in entities)
{
@@ -77,15 +75,14 @@ namespace Content.Server.GameObjects.EntitySystems.AI
if (controller.Processor != null) return;
controller.Processor = CreateProcessor(controller.LogicName);
controller.Processor.SelfEntity = controller.Owner;
controller.Processor.VisionRadius = controller.VisionRadius;
controller.Processor.Setup();
}
private UtilityAi CreateProcessor(string name)
private AiLogicProcessor CreateProcessor(string name)
{
if (_processorTypes.TryGetValue(name, out var type))
{
return (UtilityAi)_typeFactory.CreateInstance(type);
return (AiLogicProcessor)_typeFactory.CreateInstance(type);
}
// processor needs to inherit AiLogicProcessor, and needs an AiLogicProcessorAttribute to define the YAML name

View File

@@ -275,7 +275,7 @@ namespace Content.Server.GameObjects.EntitySystems
}
// OK WE'RE GOOD CONSTRUCTION STARTED.
Get<AudioSystem>().PlayAtCoords("/Audio/items/deconstruct.ogg", loc);
Get<AudioSystem>().PlayAtCoords("/Audio/Items/deconstruct.ogg", loc);
if (prototype.Stages.Count == 2)
{
// Exactly 2 stages, so don't make an intermediate frame.
@@ -327,7 +327,7 @@ namespace Content.Server.GameObjects.EntitySystems
}
// OK WE'RE GOOD CONSTRUCTION STARTED.
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/items/deconstruct.ogg", placingEnt);
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Items/deconstruct.ogg", placingEnt);
if (prototype.Stages.Count == 2)
{
// Exactly 2 stages, so don't make an intermediate frame.

View File

@@ -93,7 +93,7 @@ namespace Content.Server.Interfaces.GameObjects.Components.Interaction
{
if (player.AttachedEntity == null
|| player.AttachedEntity.Transform.GridID != gridId) continue;
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/effects/alert.ogg", player.AttachedEntity);
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Effects/alert.ogg", player.AttachedEntity);
}
}