]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Wrapped Parcels can be labelled with Papers (#40783)
authorCentronias <charlie.t.santos@gmail.com>
Wed, 8 Oct 2025 22:17:11 +0000 (15:17 -0700)
committerGitHub <noreply@github.com>
Wed, 8 Oct 2025 22:17:11 +0000 (22:17 +0000)
* labels

* oop

* Update Resources/Prototypes/Entities/Objects/Misc/parcel_wrap.yml

Resources/Prototypes/Entities/Objects/Misc/parcel_wrap.yml
Resources/Textures/Objects/Misc/ParcelWrap/paper_labels.rsi/bounty.png [new file with mode: 0644]
Resources/Textures/Objects/Misc/ParcelWrap/paper_labels.rsi/captains_paper.png [new file with mode: 0644]
Resources/Textures/Objects/Misc/ParcelWrap/paper_labels.rsi/invoice.png [new file with mode: 0644]
Resources/Textures/Objects/Misc/ParcelWrap/paper_labels.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Objects/Misc/ParcelWrap/paper_labels.rsi/paper.png [new file with mode: 0644]

index 58455ba211d539a869d6a362e378f91bba6e5c28..61d8452b93b38894afc95548b4884a0012ba2e3d 100644 (file)
@@ -38,6 +38,7 @@
   - type: ContainerContainer
     containers:
       contents: !type:ContainerSlot
+      paper_label: !type:ContainerSlot
   - type: Appearance
   - type: GenericVisualizer
     visuals:
           "Large": { state: "parcel-medium" }
           "Huge": { state: "parcel-large" }
           "Ginormous": { state: "parcel-large" }
+      enum.PaperLabelVisuals.HasLabel:
+        enum.PaperLabelVisuals.Layer:
+          True: { visible: true }
+          False: { visible: false }
+      enum.PaperLabelVisuals.LabelType:
+        enum.PaperLabelVisuals.Layer:
+          Paper: { state: paper }
+          Bounty: { state: bounty }
+          CaptainsPaper: { state: captains_paper }
+          Invoice: { state: invoice }
   - type: Sprite
     sprite: Objects/Misc/ParcelWrap/wrapped_parcel.rsi
     layers:
     - state: parcel-medium
       map: [ "enum.WrappedParcelVisuals.Layer" ]
+    - state: paper
+      visible: false
+      sprite: Objects/Misc/ParcelWrap/paper_labels.rsi
+      map: ["enum.PaperLabelVisuals.Layer"]
   - type: WrappedParcel
     unwrapDelay: 0.5
     unwrapSound:
       params:
         volume: -4
     unwrapTrash: ParcelWrapTrash
+  - type: ItemSlots
+  - type: PaperLabel
+    labelSlot:
+      insertVerbText: comp-paper-label-insert
+      ejectVerbText: comp-paper-label-eject
+      whitelist:
+        components:
+        - Paper
+      blacklist:
+        tags:
+        - Book
   - type: Damageable
     damageContainer: Inorganic
   - type: Destructible
diff --git a/Resources/Textures/Objects/Misc/ParcelWrap/paper_labels.rsi/bounty.png b/Resources/Textures/Objects/Misc/ParcelWrap/paper_labels.rsi/bounty.png
new file mode 100644 (file)
index 0000000..8b44d0e
Binary files /dev/null and b/Resources/Textures/Objects/Misc/ParcelWrap/paper_labels.rsi/bounty.png differ
diff --git a/Resources/Textures/Objects/Misc/ParcelWrap/paper_labels.rsi/captains_paper.png b/Resources/Textures/Objects/Misc/ParcelWrap/paper_labels.rsi/captains_paper.png
new file mode 100644 (file)
index 0000000..b02ea9c
Binary files /dev/null and b/Resources/Textures/Objects/Misc/ParcelWrap/paper_labels.rsi/captains_paper.png differ
diff --git a/Resources/Textures/Objects/Misc/ParcelWrap/paper_labels.rsi/invoice.png b/Resources/Textures/Objects/Misc/ParcelWrap/paper_labels.rsi/invoice.png
new file mode 100644 (file)
index 0000000..2089996
Binary files /dev/null and b/Resources/Textures/Objects/Misc/ParcelWrap/paper_labels.rsi/invoice.png differ
diff --git a/Resources/Textures/Objects/Misc/ParcelWrap/paper_labels.rsi/meta.json b/Resources/Textures/Objects/Misc/ParcelWrap/paper_labels.rsi/meta.json
new file mode 100644 (file)
index 0000000..4136d89
--- /dev/null
@@ -0,0 +1,23 @@
+{
+    "version": 1,
+    "license": "CC-BY-SA-3.0",
+    "copyright": "Original sprites by Vermidia and modified by SpaceRox1244; manual offset applied by Centronias",
+    "size": {
+        "x": 32,
+        "y": 32
+    },
+    "states": [
+        {
+            "name": "paper"
+        },
+        {
+            "name": "bounty"
+        },
+        {
+            "name": "captains_paper"
+        },
+        {
+            "name": "invoice"
+        }
+    ]
+}
diff --git a/Resources/Textures/Objects/Misc/ParcelWrap/paper_labels.rsi/paper.png b/Resources/Textures/Objects/Misc/ParcelWrap/paper_labels.rsi/paper.png
new file mode 100644 (file)
index 0000000..f9f9773
Binary files /dev/null and b/Resources/Textures/Objects/Misc/ParcelWrap/paper_labels.rsi/paper.png differ