Skipping bounties (#26537)
* add button to menu * networking and component work * try to add access stuff * main functionality done * add access lock? I think? * remove extra line * fix access system * move SkipTime to StationCargoBountyDatabaseComponent * Disable/Enable skip button based on cooldown * remove debugging * add access denied sound * remove DataField tags * dynamic timer
This commit is contained in:
@@ -32,16 +32,30 @@ public sealed partial class CargoBountyConsoleComponent : Component
|
||||
/// </summary>
|
||||
[DataField("printSound")]
|
||||
public SoundSpecifier PrintSound = new SoundPathSpecifier("/Audio/Machines/printer.ogg");
|
||||
|
||||
/// <summary>
|
||||
/// The sound made when the bounty is skipped.
|
||||
/// </summary>
|
||||
[DataField("skipSound")]
|
||||
public SoundSpecifier SkipSound = new SoundPathSpecifier("/Audio/Effects/Cargo/ping.ogg");
|
||||
|
||||
/// <summary>
|
||||
/// The sound made when bounty skipping is denied due to lacking access.
|
||||
/// </summary>
|
||||
[DataField("denySound")]
|
||||
public SoundSpecifier DenySound = new SoundPathSpecifier("/Audio/Effects/Cargo/buzz_two.ogg");
|
||||
}
|
||||
|
||||
[NetSerializable, Serializable]
|
||||
public sealed class CargoBountyConsoleState : BoundUserInterfaceState
|
||||
{
|
||||
public List<CargoBountyData> Bounties;
|
||||
public TimeSpan UntilNextSkip;
|
||||
|
||||
public CargoBountyConsoleState(List<CargoBountyData> bounties)
|
||||
public CargoBountyConsoleState(List<CargoBountyData> bounties, TimeSpan untilNextSkip)
|
||||
{
|
||||
Bounties = bounties;
|
||||
UntilNextSkip = untilNextSkip;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,3 +69,14 @@ public sealed class BountyPrintLabelMessage : BoundUserInterfaceMessage
|
||||
BountyId = bountyId;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class BountySkipMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public string BountyId;
|
||||
|
||||
public BountySkipMessage(string bountyId)
|
||||
{
|
||||
BountyId = bountyId;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user