2024-04-01 09:06:13 +03:00
|
|
|
|
using Content.Shared.Whitelist;
|
2024-04-26 18:16:24 +10:00
|
|
|
|
using Robust.Shared.GameStates;
|
2024-02-13 22:48:39 +01:00
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations;
|
2022-03-10 23:37:35 -06:00
|
|
|
|
|
2024-04-26 18:16:24 +10:00
|
|
|
|
namespace Content.Shared.UserInterface
|
2021-11-23 18:19:08 +00:00
|
|
|
|
{
|
2024-04-29 16:06:43 +12:00
|
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
2024-02-13 22:48:39 +01:00
|
|
|
|
public sealed partial class ActivatableUIComponent : Component
|
2021-11-23 18:19:08 +00:00
|
|
|
|
{
|
2024-04-26 18:16:24 +10:00
|
|
|
|
[DataField(required: true, customTypeSerializer: typeof(EnumSerializer))]
|
2024-04-29 16:06:43 +12:00
|
|
|
|
public Enum? Key;
|
2021-11-23 18:19:08 +00:00
|
|
|
|
|
2024-04-29 16:06:43 +12:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Whether the item must be held in one of the user's hands to work.
|
2024-08-28 10:57:12 +10:00
|
|
|
|
/// This is ignored unless <see cref="RequiresComplex"/> is true.
|
2024-04-29 16:06:43 +12:00
|
|
|
|
/// </summary>
|
2021-11-23 18:19:08 +00:00
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2023-10-10 20:06:24 -07:00
|
|
|
|
[DataField]
|
2024-04-29 16:06:43 +12:00
|
|
|
|
public bool InHandsOnly;
|
2021-11-23 18:19:08 +00:00
|
|
|
|
|
2023-10-10 20:06:24 -07:00
|
|
|
|
[DataField]
|
2024-04-29 16:06:43 +12:00
|
|
|
|
public bool SingleUser;
|
2021-11-23 18:19:08 +00:00
|
|
|
|
|
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2023-10-10 20:06:24 -07:00
|
|
|
|
[DataField]
|
2024-04-29 16:06:43 +12:00
|
|
|
|
public bool AdminOnly;
|
2021-11-23 18:19:08 +00:00
|
|
|
|
|
2023-10-10 20:06:24 -07:00
|
|
|
|
[DataField]
|
|
|
|
|
|
public LocId VerbText = "ui-verb-toggle-open";
|
2022-02-25 00:10:12 +13:00
|
|
|
|
|
2022-03-15 16:59:20 +13:00
|
|
|
|
/// <summary>
|
2024-08-28 10:57:12 +10:00
|
|
|
|
/// Whether you need to be able to do complex interactions to operate this UI.
|
2022-03-15 16:59:20 +13:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <remarks>
|
|
|
|
|
|
/// This should probably be true for most machines & computers, but there will still be UIs that represent a
|
2024-08-28 10:57:12 +10:00
|
|
|
|
/// more generic interaction / configuration that might not require complex.
|
2022-03-15 16:59:20 +13:00
|
|
|
|
/// </remarks>
|
2022-11-15 19:34:47 +13:00
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2023-10-10 20:06:24 -07:00
|
|
|
|
[DataField]
|
2024-08-28 10:57:12 +10:00
|
|
|
|
public bool RequiresComplex = true;
|
2022-03-15 16:59:20 +13:00
|
|
|
|
|
2024-04-01 09:06:13 +03:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Entities that are required to open this UI.
|
|
|
|
|
|
/// </summary>
|
2024-04-29 16:06:43 +12:00
|
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
|
public EntityWhitelist? RequiredItems;
|
2024-04-01 09:06:13 +03:00
|
|
|
|
|
Northstar Gloves (#16021)
* Added Gloves of North Star, no sprite or talking yet...
* Added sprites for the gloves of the north star...
* Replaced more placeholder sprites for northstar gloves...
* Added gloves of the north star to uplink...
* Added speech on hit, not yet configureable
* Not functional yet, but a step in the right direction I hope...
* IT WORKS!!
* Licensing and cleanup
* Reduced attack speed, changed from chat to popup, added some admin logging. It was causing too much adminlog spam otherwise
* Reorganized some files, final build??
* Changed the adminlog type from Verb to new type ItemConfigure
* More cleanup, fix sprite reference maybe
* Keronshb's suggestions, fixed some stuff, made hit sound use the meaty punch sfx
* Adds support for hiding speak/whisper/emote from adminlogs, makes northstar speak again!
* Some file shuffling, some of Keronshb's requests. Might appear a bit funky in github because vscode kept duplicating files for some reason and I had to delete them
* Made it work with the latest changes on Master
* Final? cleanup, upped dmg to 8, made ui not activate on activateinhand, instead you need to right click
* Set value to 0 credits, that's all
* Well that was much easier than I made it out to be. Now you can only activate the gloves with right click, no more mispredicts.
* Update MeleeWeaponSystem.cs
Iunno why this got changed in the first place, but I'm changin it back
* emptycommit
* emptycommit
* The tiny fixening
2023-05-23 11:12:30 -07:00
|
|
|
|
/// <summary>
|
2024-04-29 16:06:43 +12:00
|
|
|
|
/// If true, then this UI can only be opened via verbs. I.e., normal interactions/activations will not open
|
|
|
|
|
|
/// the UI.
|
Northstar Gloves (#16021)
* Added Gloves of North Star, no sprite or talking yet...
* Added sprites for the gloves of the north star...
* Replaced more placeholder sprites for northstar gloves...
* Added gloves of the north star to uplink...
* Added speech on hit, not yet configureable
* Not functional yet, but a step in the right direction I hope...
* IT WORKS!!
* Licensing and cleanup
* Reduced attack speed, changed from chat to popup, added some admin logging. It was causing too much adminlog spam otherwise
* Reorganized some files, final build??
* Changed the adminlog type from Verb to new type ItemConfigure
* More cleanup, fix sprite reference maybe
* Keronshb's suggestions, fixed some stuff, made hit sound use the meaty punch sfx
* Adds support for hiding speak/whisper/emote from adminlogs, makes northstar speak again!
* Some file shuffling, some of Keronshb's requests. Might appear a bit funky in github because vscode kept duplicating files for some reason and I had to delete them
* Made it work with the latest changes on Master
* Final? cleanup, upped dmg to 8, made ui not activate on activateinhand, instead you need to right click
* Set value to 0 credits, that's all
* Well that was much easier than I made it out to be. Now you can only activate the gloves with right click, no more mispredicts.
* Update MeleeWeaponSystem.cs
Iunno why this got changed in the first place, but I'm changin it back
* emptycommit
* emptycommit
* The tiny fixening
2023-05-23 11:12:30 -07:00
|
|
|
|
/// </summary>
|
2024-04-29 16:06:43 +12:00
|
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
|
public bool VerbOnly;
|
Northstar Gloves (#16021)
* Added Gloves of North Star, no sprite or talking yet...
* Added sprites for the gloves of the north star...
* Replaced more placeholder sprites for northstar gloves...
* Added gloves of the north star to uplink...
* Added speech on hit, not yet configureable
* Not functional yet, but a step in the right direction I hope...
* IT WORKS!!
* Licensing and cleanup
* Reduced attack speed, changed from chat to popup, added some admin logging. It was causing too much adminlog spam otherwise
* Reorganized some files, final build??
* Changed the adminlog type from Verb to new type ItemConfigure
* More cleanup, fix sprite reference maybe
* Keronshb's suggestions, fixed some stuff, made hit sound use the meaty punch sfx
* Adds support for hiding speak/whisper/emote from adminlogs, makes northstar speak again!
* Some file shuffling, some of Keronshb's requests. Might appear a bit funky in github because vscode kept duplicating files for some reason and I had to delete them
* Made it work with the latest changes on Master
* Final? cleanup, upped dmg to 8, made ui not activate on activateinhand, instead you need to right click
* Set value to 0 credits, that's all
* Well that was much easier than I made it out to be. Now you can only activate the gloves with right click, no more mispredicts.
* Update MeleeWeaponSystem.cs
Iunno why this got changed in the first place, but I'm changin it back
* emptycommit
* emptycommit
* The tiny fixening
2023-05-23 11:12:30 -07:00
|
|
|
|
|
2022-03-15 16:59:20 +13:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Whether spectators (non-admin ghosts) should be allowed to view this UI.
|
|
|
|
|
|
/// </summary>
|
2022-11-15 19:34:47 +13:00
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2023-10-10 20:06:24 -07:00
|
|
|
|
[DataField]
|
2024-05-24 17:03:03 +12:00
|
|
|
|
public bool BlockSpectators;
|
2022-03-15 16:59:20 +13:00
|
|
|
|
|
2022-09-08 14:22:14 +00:00
|
|
|
|
/// <summary>
|
2024-04-29 16:06:43 +12:00
|
|
|
|
/// Whether the item must be in the user's currently selected/active hand.
|
|
|
|
|
|
/// This is ignored unless <see cref="InHandsOnly"/> is true.
|
2022-09-08 14:22:14 +00:00
|
|
|
|
/// </summary>
|
2022-11-15 19:34:47 +13:00
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2023-10-10 20:06:24 -07:00
|
|
|
|
[DataField]
|
2024-04-29 16:06:43 +12:00
|
|
|
|
public bool RequireActiveHand = true;
|
2022-09-08 14:22:14 +00:00
|
|
|
|
|
2021-11-23 18:19:08 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The client channel currently using the object, or null if there's none/not single user.
|
|
|
|
|
|
/// NOTE: DO NOT DIRECTLY SET, USE ActivatableUISystem.SetCurrentSingleUser
|
|
|
|
|
|
/// </summary>
|
2024-04-29 16:06:43 +12:00
|
|
|
|
[DataField, AutoNetworkedField]
|
2024-04-26 18:16:24 +10:00
|
|
|
|
public EntityUid? CurrentSingleUser;
|
2021-11-23 18:19:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|