Remove AllComponentsOneEntityDeleteTest (#19965)
* Remove AllComponentsOneEntityDeleteTest * AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
This commit is contained in:
@@ -20,5 +20,5 @@ public sealed partial class RandomFillSolutionComponent : Component
|
||||
/// Weighted random fill prototype Id. Used to pick reagent and quantity.
|
||||
/// </summary>
|
||||
[DataField("weightedRandomId", required: true, customTypeSerializer: typeof(PrototypeIdSerializer<WeightedRandomFillSolutionPrototype>))]
|
||||
public string WeightedRandomId { get; set; } = "default";
|
||||
public string? WeightedRandomId;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,9 @@ public sealed class SolutionRandomFillSystem : EntitySystem
|
||||
|
||||
private void OnRandomSolutionFillMapInit(EntityUid uid, RandomFillSolutionComponent component, MapInitEvent args)
|
||||
{
|
||||
if (component.WeightedRandomId == null)
|
||||
return;
|
||||
|
||||
var target = _solutionsSystem.EnsureSolution(uid, component.Solution);
|
||||
var pick = _proto.Index<WeightedRandomFillSolutionPrototype>(component.WeightedRandomId).Pick(_random);
|
||||
|
||||
|
||||
@@ -12,5 +12,5 @@ namespace Content.Server.Humanoid.Components;
|
||||
public sealed partial class RandomHumanoidSpawnerComponent : Component
|
||||
{
|
||||
[DataField("settings", customTypeSerializer: typeof(PrototypeIdSerializer<RandomHumanoidSettingsPrototype>))]
|
||||
public string SettingsPrototypeId = default!;
|
||||
public string? SettingsPrototypeId;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,8 @@ public sealed class RandomHumanoidSystem : EntitySystem
|
||||
private void OnMapInit(EntityUid uid, RandomHumanoidSpawnerComponent component, MapInitEvent args)
|
||||
{
|
||||
QueueDel(uid);
|
||||
SpawnRandomHumanoid(component.SettingsPrototypeId, Transform(uid).Coordinates, MetaData(uid).EntityName);
|
||||
if (component.SettingsPrototypeId != null)
|
||||
SpawnRandomHumanoid(component.SettingsPrototypeId, Transform(uid).Coordinates, MetaData(uid).EntityName);
|
||||
}
|
||||
|
||||
public EntityUid SpawnRandomHumanoid(string prototypeId, EntityCoordinates coordinates, string name)
|
||||
|
||||
@@ -246,7 +246,7 @@ namespace Content.Server.Light.EntitySystems
|
||||
ApcPowerReceiverComponent? powerReceiver = null,
|
||||
AppearanceComponent? appearance = null)
|
||||
{
|
||||
if (!Resolve(uid, ref light, ref powerReceiver))
|
||||
if (!Resolve(uid, ref light, ref powerReceiver, false))
|
||||
return;
|
||||
|
||||
// Optional component.
|
||||
|
||||
@@ -120,7 +120,7 @@ public sealed class ApcSystem : EntitySystem
|
||||
ApcComponent? apc=null,
|
||||
PowerNetworkBatteryComponent? battery = null)
|
||||
{
|
||||
if (!Resolve(uid, ref apc, ref battery))
|
||||
if (!Resolve(uid, ref apc, ref battery, false))
|
||||
return;
|
||||
|
||||
var newState = CalcChargeState(uid, battery.NetworkBattery);
|
||||
|
||||
@@ -57,7 +57,7 @@ internal sealed class SmesSystem : EntitySystem
|
||||
|
||||
private int CalcChargeLevel(EntityUid uid, BatteryComponent? battery = null)
|
||||
{
|
||||
if (!Resolve(uid, ref battery))
|
||||
if (!Resolve(uid, ref battery, false))
|
||||
return 0;
|
||||
|
||||
return ContentHelpers.RoundToLevels(battery.CurrentCharge, battery.MaxCharge, 6);
|
||||
@@ -65,7 +65,7 @@ internal sealed class SmesSystem : EntitySystem
|
||||
|
||||
private ChargeState CalcChargeState(EntityUid uid, PowerNetworkBatteryComponent? netBattery = null)
|
||||
{
|
||||
if (!Resolve(uid, ref netBattery))
|
||||
if (!Resolve(uid, ref netBattery, false))
|
||||
return ChargeState.Still;
|
||||
|
||||
return (netBattery.CurrentSupply - netBattery.CurrentReceiving) switch
|
||||
|
||||
@@ -172,10 +172,8 @@ namespace Content.Server.Solar.EntitySystems
|
||||
SolarPanelComponent? solar = null,
|
||||
PowerSupplierComponent? supplier = null)
|
||||
{
|
||||
if (!Resolve(uid, ref solar, ref supplier))
|
||||
{
|
||||
if (!Resolve(uid, ref solar, ref supplier, false))
|
||||
return;
|
||||
}
|
||||
|
||||
supplier.MaxSupply = (int) (solar.MaxSupply * solar.Coverage);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user