Tweak borg laws (#24698)
* Change emagged laws to append modifiers instead of completely changing them. * Maybe fix everything not working * bugfix * Fix missing secrecy law and allow basic borgs to be emagged correctly * Localization * Actual localization * test * Test * Remove dummy debug value * Fix bad law ordering * Tweak the secrecy law * Minor law tweaks * Remove obsolete argument * Fix YAML
This commit is contained in:
@@ -23,20 +23,6 @@ public sealed partial class EmagSiliconLawComponent : Component
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool RequireOpenPanel = true;
|
||||
|
||||
/// <summary>
|
||||
/// The laws that the borg is given when emagged.
|
||||
/// Law 0 is prepended to this, so this can only include the static laws.
|
||||
/// </summary>
|
||||
[DataField(required: true), ViewVariables(VVAccess.ReadWrite)]
|
||||
public ProtoId<SiliconLawsetPrototype> EmagLaws = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Lawset created from the prototype id and law 0.
|
||||
/// Cached when getting laws and only modified during an ion storm event.
|
||||
/// </summary>
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public SiliconLawset? Lawset;
|
||||
|
||||
/// <summary>
|
||||
/// How long the borg is stunned when it's emagged. Setting to 0 will disable it.
|
||||
/// </summary>
|
||||
|
||||
@@ -16,7 +16,7 @@ public sealed partial class SiliconLawProviderComponent : Component
|
||||
|
||||
/// <summary>
|
||||
/// Lawset created from the prototype id.
|
||||
/// Cached when getting laws and only modified during an ion storm event.
|
||||
/// Cached when getting laws and modified during an ion storm event and when emagged.
|
||||
/// </summary>
|
||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||
public SiliconLawset? Lawset;
|
||||
|
||||
@@ -17,6 +17,12 @@ public sealed partial class SiliconLawset
|
||||
[DataField(required: true), ViewVariables(VVAccess.ReadWrite)]
|
||||
public List<SiliconLaw> Laws = new();
|
||||
|
||||
/// <summary>
|
||||
/// What entity the lawset considers as a figure of authority.
|
||||
/// </summary>
|
||||
[DataField(required: true), ViewVariables(VVAccess.ReadWrite)]
|
||||
public string ObeysTo = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// A single line used in logging laws.
|
||||
/// </summary>
|
||||
@@ -45,7 +51,8 @@ public sealed partial class SiliconLawset
|
||||
|
||||
return new SiliconLawset()
|
||||
{
|
||||
Laws = laws
|
||||
Laws = laws,
|
||||
ObeysTo = ObeysTo
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -66,4 +73,10 @@ public sealed partial class SiliconLawsetPrototype : IPrototype
|
||||
/// </summary>
|
||||
[DataField(required: true, customTypeSerializer: typeof(PrototypeIdListSerializer<SiliconLawPrototype>))]
|
||||
public List<string> Laws = new();
|
||||
|
||||
/// <summary>
|
||||
/// What entity the lawset considers as a figure of authority.
|
||||
/// </summary>
|
||||
[DataField(required: true), ViewVariables(VVAccess.ReadWrite)]
|
||||
public string ObeysTo = string.Empty;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user