Make jugs label deletable (#19082)

* Fix bug with undeletable label on jugs

* Fix label text for jugs

* Documented LabelComponent

* Revert "Fix label text for jugs"

This reverts commit 38b7cc75ca51770b3693d0cef4f0364424619b73.

* make jugs labels names lowercase

* Fix documentation of LabelComponent
This commit is contained in:
Fahasor 2023-08-16 01:41:10 +03:00 committed by GitHub
parent 623e7b82fc
commit 65c7e88c48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 22 deletions

View File

@ -1,12 +1,19 @@
namespace Content.Server.Labels.Components
{
/// <summary>
/// Makes entities have a label in their name. Labels are normally given by <see cref="HandLabelerComponent"/>
/// </summary>
[RegisterComponent]
public sealed class LabelComponent : Component
{
/// <summary>
/// The actual text in the label
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("currentLabel")]
public string? CurrentLabel { get; set; }
[DataField("originalName")]
public string? OriginalName { get; set; }
}
}

View File

@ -46,6 +46,8 @@
fillBaseName: jug
- type: StaticPrice
price: 80
- type: Label
originalName: jug
- type: entity
parent: Jug
@ -54,7 +56,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Carbon
currentLabel: carbon
- type: SolutionContainerManager
solutions:
beaker:
@ -69,7 +71,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Iodine
currentLabel: iodine
- type: SolutionContainerManager
solutions:
beaker:
@ -84,7 +86,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Fluorine
currentLabel: fluorine
- type: SolutionContainerManager
solutions:
beaker:
@ -99,7 +101,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Chlorine
currentLabel: chlorine
- type: SolutionContainerManager
solutions:
beaker:
@ -114,7 +116,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Aluminium
currentLabel: aluminium
- type: SolutionContainerManager
solutions:
beaker:
@ -129,7 +131,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Phosphorus
currentLabel: phosphorus
- type: SolutionContainerManager
solutions:
beaker:
@ -144,7 +146,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Sulfur
currentLabel: sulfur
- type: SolutionContainerManager
solutions:
beaker:
@ -159,7 +161,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Silicon
currentLabel: silicon
- type: SolutionContainerManager
solutions:
beaker:
@ -174,7 +176,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Hydrogen
currentLabel: hydrogen
- type: SolutionContainerManager
solutions:
beaker:
@ -189,7 +191,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Lithium
currentLabel: lithium
- type: SolutionContainerManager
solutions:
beaker:
@ -204,7 +206,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Sodium
currentLabel: sodium
- type: SolutionContainerManager
solutions:
beaker:
@ -219,7 +221,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Potassium
currentLabel: potassium
- type: SolutionContainerManager
solutions:
beaker:
@ -234,7 +236,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Radium
currentLabel: radium
- type: SolutionContainerManager
solutions:
beaker:
@ -249,7 +251,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Iron
currentLabel: iron
- type: SolutionContainerManager
solutions:
beaker:
@ -264,7 +266,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Copper
currentLabel: copper
- type: SolutionContainerManager
solutions:
beaker:
@ -279,7 +281,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Gold
currentLabel: gold
- type: SolutionContainerManager
solutions:
beaker:
@ -294,7 +296,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Mercury
currentLabel: mercury
- type: SolutionContainerManager
solutions:
beaker:
@ -309,7 +311,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Silver
currentLabel: silver
- type: SolutionContainerManager
solutions:
beaker:
@ -324,7 +326,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Ethanol
currentLabel: ethanol
- type: SolutionContainerManager
solutions:
beaker:
@ -339,7 +341,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Sugar
currentLabel: sugar
- type: SolutionContainerManager
solutions:
beaker:
@ -354,7 +356,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Nitrogen
currentLabel: nitrogen
- type: SolutionContainerManager
solutions:
beaker:
@ -369,7 +371,7 @@
noSpawn: true
components:
- type: Label
currentLabel: Oxygen
currentLabel: oxygen
- type: SolutionContainerManager
solutions:
beaker: