Fix robusted dionas not being recoverable (#21636)
* Fix robusted dionas not being recoverable * Implement a polymorph cooldown field, used for TreeMorph Allows the polymorphed Diona some time to work off robust harvest without immediately polymorphing again. * Minor adjustment to polymorph cooldown timing * Apply suggestions from code review Co-authored-by: Kara <lunarautomaton6@gmail.com> * fix: trigger polymorph revert on destruction As suggested by mirrorcult, DamageThresholdReached is not the ideal candidate for reverting a polymorph on destruction, as there exists a DestructionEventArgs to listen for instead. --------- Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
@@ -97,6 +97,14 @@ namespace Content.Shared.Polymorph
|
||||
|
||||
[DataField("allowRepeatedMorphs", serverOnly: true)]
|
||||
public bool AllowRepeatedMorphs = false;
|
||||
|
||||
/// <summary>
|
||||
/// The amount of time that should pass after this polymorph has ended, before a new one
|
||||
/// can occur.
|
||||
/// </summary>
|
||||
[DataField("cooldown", serverOnly: true)]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public TimeSpan Cooldown = TimeSpan.Zero;
|
||||
}
|
||||
|
||||
public enum PolymorphInventoryChange : byte
|
||||
|
||||
Reference in New Issue
Block a user