]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
usable bookshelf (#15333)
authorKit0vras <123590995+Kit0vras@users.noreply.github.com>
Sat, 6 May 2023 02:20:02 +0000 (05:20 +0300)
committerGitHub <noreply@github.com>
Sat, 6 May 2023 02:20:02 +0000 (12:20 +1000)
Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
26 files changed:
Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml [new file with mode: 0644]
Resources/Prototypes/Entities/Objects/Magic/books.yml
Resources/Prototypes/Entities/Structures/Furniture/bookshelf.yml
Resources/Prototypes/Recipes/Construction/Graphs/furniture/bookshelf.yml [new file with mode: 0644]
Resources/Prototypes/Recipes/Construction/furniture.yml
Resources/Prototypes/tags.yml
Resources/Textures/Structures/Furniture/bookshelf.rsi/book-1.png
Resources/Textures/Structures/Furniture/bookshelf.rsi/book-10.png [new file with mode: 0644]
Resources/Textures/Structures/Furniture/bookshelf.rsi/book-11.png [new file with mode: 0644]
Resources/Textures/Structures/Furniture/bookshelf.rsi/book-12.png [new file with mode: 0644]
Resources/Textures/Structures/Furniture/bookshelf.rsi/book-13.png [new file with mode: 0644]
Resources/Textures/Structures/Furniture/bookshelf.rsi/book-14.png [new file with mode: 0644]
Resources/Textures/Structures/Furniture/bookshelf.rsi/book-15.png [new file with mode: 0644]
Resources/Textures/Structures/Furniture/bookshelf.rsi/book-16.png [new file with mode: 0644]
Resources/Textures/Structures/Furniture/bookshelf.rsi/book-17.png [new file with mode: 0644]
Resources/Textures/Structures/Furniture/bookshelf.rsi/book-18.png [new file with mode: 0644]
Resources/Textures/Structures/Furniture/bookshelf.rsi/book-19.png [new file with mode: 0644]
Resources/Textures/Structures/Furniture/bookshelf.rsi/book-2.png
Resources/Textures/Structures/Furniture/bookshelf.rsi/book-3.png
Resources/Textures/Structures/Furniture/bookshelf.rsi/book-4.png
Resources/Textures/Structures/Furniture/bookshelf.rsi/book-5.png
Resources/Textures/Structures/Furniture/bookshelf.rsi/book-6.png [new file with mode: 0644]
Resources/Textures/Structures/Furniture/bookshelf.rsi/book-7.png [new file with mode: 0644]
Resources/Textures/Structures/Furniture/bookshelf.rsi/book-8.png [new file with mode: 0644]
Resources/Textures/Structures/Furniture/bookshelf.rsi/book-9.png [new file with mode: 0644]
Resources/Textures/Structures/Furniture/bookshelf.rsi/meta.json

diff --git a/Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml b/Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml
new file mode 100644 (file)
index 0000000..af363cf
--- /dev/null
@@ -0,0 +1,71 @@
+- type: entity
+  id: BookshelfFilled
+  parent: Bookshelf
+  suffix: random filled
+  components:
+  - type: StorageFill
+    contents:
+      - id: BookRandom
+        prob: 0.4
+        amount: 1
+        maxAmount: 4
+      - id: BookNarsieLegend
+        prob: 0.1
+      - id: BookTruth
+        prob: 0.1
+      - id: BookWorld
+        prob: 0.1
+      - id: BookIanAntarctica
+        prob: 0.1
+      - id: BookSlothClownSSS
+        prob: 0.1
+      - id: BookSlothClownPranks
+        prob: 0.1
+      - id: BookSlothClownMMD
+        prob: 0.1
+      - id: BookStruck
+        prob: 0.1
+      - id: BookSun
+        prob: 0.1
+      - id: BookPossum
+        prob: 0.1
+      - id: BookCafe
+        prob: 0.1
+      - id: BookFeather
+        prob: 0.1
+      - id: BookIanLostWolfPup
+        prob: 0.1
+      - id: BookIanRanch
+        prob: 0.1
+      - id: BookIanOcean
+        prob: 0.1
+      - id: BookIanMountain
+        prob: 0.1
+      - id: BookIanCity
+        prob: 0.1
+      - id: BookIanArctic
+        prob: 0.1
+      - id: BookIanDesert
+        prob: 0.1
+      - id: BookNames
+        prob: 0.1
+      - id: BookEarth
+        prob: 0.1
+      - id: BookAurora
+        prob: 0.1
+      - id: BookTemple
+        prob: 0.1
+      - id: BookWatched
+        prob: 0.1
+      - id: BookMedicalOfficer
+        prob: 0.1
+      - id: BookMorgue
+        prob: 0.1
+      - id: BookRufus
+        prob: 0.1
+      - id: BookMap
+        prob: 0.1
+      - id: BookJourney
+        prob: 0.1
+      - id: BookInspiration
+        prob: 0.1
index b9208dc669f9cc5aa4e7387b2b322944eeb7c19e..1961348cd558f732a70c181ffb586ea7381497dc 100644 (file)
@@ -10,6 +10,9 @@
       layers:
         - state: book_demonomicon
     - type: Spellbook
+    - type: Tag
+      tags:
+      - Spellbook
 
 - type: entity
   id: SpawnSpellbook
index 461e1b5bdaf1c18b75cd5ad9423a4276e28381d8..7274ec391b0d9d971292f6be8a5b423fb39e3c3f 100644 (file)
@@ -2,7 +2,7 @@
   id: Bookshelf
   parent: BaseStructure
   name: "bookshelf"
-  description: Mostly filled with erotica.
+  description: Mostly filled with books.
   components:
   - type: Sprite
     sprite: Structures/Furniture/bookshelf.rsi
     layers:
       - state: base
       - state: book-0
-        map: [ "enum.DamageStateVisualLayers.Base" ]
-  - type: RandomSprite
-    available:
-      - enum.DamageStateVisualLayers.Base:
-          book-0: ""
-      - enum.DamageStateVisualLayers.Base:
-          book-1: ""
-      - enum.DamageStateVisualLayers.Base:
-          book-2: ""
-      - enum.DamageStateVisualLayers.Base:
-          book-3: ""
-      - enum.DamageStateVisualLayers.Base:
-          book-4: ""
-      - enum.DamageStateVisualLayers.Base:
-          book-5: ""
+      - map: ["enum.StorageFillLayers.Fill"]
+  - type: Appearance
+  - type: StorageFillVisualizer
+    maxFillLevels: 20
+    fillBaseName: book
   - type: Damageable
     damageModifierSet: Wood
     damageContainer: Inorganic
@@ -41,8 +31,8 @@
       - !type:SpawnEntitiesBehavior
         spawn:
           MaterialWoodPlank:
-            min: 1
-            max: 1
+            min: 2
+            max: 3
       - !type:DoActsBehavior
         acts: ["Destruction"]
   - type: Tag
     bodyType: Static
   - type: Anchorable
   - type: Pullable
+  - type: Storage
+    capacity: 200
+    whitelist:
+      tags:
+        - Document
+        - Folder
+        - Write
+        - Book
+        - Spellbook
+  - type: UserInterface
+    interfaces:
+    - key: enum.StorageUiKey.Key
+      type: StorageBoundUserInterface
+  - type: InteractionOutline
+  - type: ContainerContainer
+    containers:
+      storagebase: !type:Container
+  - type: Construction
+    graph: Bookshelf
+    node: bookshelf
diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/furniture/bookshelf.yml b/Resources/Prototypes/Recipes/Construction/Graphs/furniture/bookshelf.yml
new file mode 100644 (file)
index 0000000..7f3b593
--- /dev/null
@@ -0,0 +1,26 @@
+- type: constructionGraph
+  id: Bookshelf
+  start: start
+  graph:
+    - node: start
+      actions:
+        - !type:DestroyEntity {}
+      edges:
+        - to: bookshelf
+          completed:
+            - !type:SnapToGrid { }
+          steps:
+            - material: WoodPlank
+              amount: 5
+              doAfter: 4
+    - node: bookshelf
+      entity: Bookshelf
+      edges:
+        - to: start
+          completed:
+            - !type:SpawnPrototype
+              prototype: MaterialWoodPlank
+              amount: 5
+          steps:
+            - tool: Prying
+              doAfter: 4
index 02b7a26bb6a2cc585a7d32551a47b131d9e148fc..1c7afe46e090dd52b9dc9edf464c70f18cdba32a 100644 (file)
   canBuildInImpassable: false
   conditions:
     - !type:TileNotBlocked
+
+- type: construction
+  id: Bookshelf
+  name: bookshelf
+  description: Mostly filled with books.
+  graph: Bookshelf
+  startNode: start
+  targetNode: bookshelf
+  category: construction-category-furniture
+  icon:
+    sprite: Structures/Furniture/bookshelf.rsi
+    state: base
+  objectType: Structure
+  placementMode: SnapgridCenter
+  canBuildInImpassable: false
+  conditions:
+    - !type:TileNotBlocked
index def86ed2c1756616b234549463fc9b3a78b399fc..166526ef72fb2c4416ff85b80f636adfe0d02798 100644 (file)
 - type: Tag
   id: Syringe
 
+- type: Tag
+  id: Spellbook
+
 - type: Tag
   id: Taser
 
index 9711a18844e991111141bc5a38923565481ee500..070eb14ca8935e9a691e40d11678edbeee724038 100644 (file)
Binary files a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-1.png and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-1.png differ
diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-10.png b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-10.png
new file mode 100644 (file)
index 0000000..c2e5cba
Binary files /dev/null and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-10.png differ
diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-11.png b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-11.png
new file mode 100644 (file)
index 0000000..9cdbc86
Binary files /dev/null and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-11.png differ
diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-12.png b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-12.png
new file mode 100644 (file)
index 0000000..93adcaf
Binary files /dev/null and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-12.png differ
diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-13.png b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-13.png
new file mode 100644 (file)
index 0000000..a795f68
Binary files /dev/null and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-13.png differ
diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-14.png b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-14.png
new file mode 100644 (file)
index 0000000..266cd06
Binary files /dev/null and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-14.png differ
diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-15.png b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-15.png
new file mode 100644 (file)
index 0000000..53b6506
Binary files /dev/null and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-15.png differ
diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-16.png b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-16.png
new file mode 100644 (file)
index 0000000..0d31824
Binary files /dev/null and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-16.png differ
diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-17.png b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-17.png
new file mode 100644 (file)
index 0000000..a9a4fdc
Binary files /dev/null and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-17.png differ
diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-18.png b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-18.png
new file mode 100644 (file)
index 0000000..f867ecf
Binary files /dev/null and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-18.png differ
diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-19.png b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-19.png
new file mode 100644 (file)
index 0000000..1309539
Binary files /dev/null and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-19.png differ
index bfc97a5d80723bfbe76a247c6ccd7b01f973348c..e1988246b1c8ff27da051b9e3cb170e90a002ea8 100644 (file)
Binary files a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-2.png and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-2.png differ
index a509e70143e53ecfef6f1b068c2122b7383316b2..b75ab3368c4292eca3b48aebdbb043607b9132df 100644 (file)
Binary files a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-3.png and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-3.png differ
index d4554f065987582fd206739ea28b1bf4a6897857..4000078010afdfbadb403b2fd612df94907f7863 100644 (file)
Binary files a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-4.png and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-4.png differ
index b1751cc0d284b9480514a0346d0dfdb6af07ef97..9c861628b07da155943299d8b911119133775a80 100644 (file)
Binary files a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-5.png and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-5.png differ
diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-6.png b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-6.png
new file mode 100644 (file)
index 0000000..1d18d07
Binary files /dev/null and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-6.png differ
diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-7.png b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-7.png
new file mode 100644 (file)
index 0000000..f76fbb7
Binary files /dev/null and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-7.png differ
diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-8.png b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-8.png
new file mode 100644 (file)
index 0000000..0d97619
Binary files /dev/null and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-8.png differ
diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-9.png b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-9.png
new file mode 100644 (file)
index 0000000..e2d90a4
Binary files /dev/null and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-9.png differ
index a80f2a8141f0714edeec08f5eddc87dcb47a519d..cab257a5325d4b3aa44d6ff399c91f47efa72aaf 100644 (file)
@@ -1,7 +1,7 @@
 {
   "version": 1,
   "license": "CC-BY-SA-3.0",
-  "copyright": "Taken from cev-eris at commit https://github.com/discordia-space/CEV-Eris/commit/f777c8ddf7a529b002df17909566d5d93b8ad201",
+  "copyright": "Taken from cev-eris at commit https://github.com/discordia-space/CEV-Eris/commit/f777c8ddf7a529b002df17909566d5d93b8ad201 and edited by Kit0vras (github)",
   "size": {
     "x": 32,
     "y": 32
     },
     {
       "name": "book-5"
+    },
+    {
+      "name": "book-6"
+    },
+    {
+      "name": "book-7"
+    },
+    {
+      "name": "book-8"
+    },
+    {
+      "name": "book-9"
+    },
+    {
+      "name": "book-10"
+    },
+    {
+      "name": "book-11"
+    },
+    {
+      "name": "book-12"
+    },
+    {
+      "name": "book-13"
+    },
+    {
+      "name": "book-14"
+    },
+    {
+      "name": "book-15"
+    },
+    {
+      "name": "book-16"
+    },
+    {
+      "name": "book-17"
+    },
+    {
+      "name": "book-18"
+    },
+    {
+      "name": "book-19"
     }
   ]
 }