From: Kit0vras <123590995+Kit0vras@users.noreply.github.com> Date: Sat, 6 May 2023 02:20:02 +0000 (+0300) Subject: usable bookshelf (#15333) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=140aa89ba4d0a0ab25d14a6ce342aa418b19e4b0;p=space-station-14.git usable bookshelf (#15333) Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com> Co-authored-by: metalgearsloth --- diff --git a/Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml b/Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml new file mode 100644 index 0000000000..af363cf374 --- /dev/null +++ b/Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml @@ -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 diff --git a/Resources/Prototypes/Entities/Objects/Magic/books.yml b/Resources/Prototypes/Entities/Objects/Magic/books.yml index b9208dc669..1961348cd5 100644 --- a/Resources/Prototypes/Entities/Objects/Magic/books.yml +++ b/Resources/Prototypes/Entities/Objects/Magic/books.yml @@ -10,6 +10,9 @@ layers: - state: book_demonomicon - type: Spellbook + - type: Tag + tags: + - Spellbook - type: entity id: SpawnSpellbook diff --git a/Resources/Prototypes/Entities/Structures/Furniture/bookshelf.yml b/Resources/Prototypes/Entities/Structures/Furniture/bookshelf.yml index 461e1b5bda..7274ec391b 100644 --- a/Resources/Prototypes/Entities/Structures/Furniture/bookshelf.yml +++ b/Resources/Prototypes/Entities/Structures/Furniture/bookshelf.yml @@ -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 @@ -11,21 +11,11 @@ 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 @@ -55,3 +45,23 @@ 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 index 0000000000..7f3b59337b --- /dev/null +++ b/Resources/Prototypes/Recipes/Construction/Graphs/furniture/bookshelf.yml @@ -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 diff --git a/Resources/Prototypes/Recipes/Construction/furniture.yml b/Resources/Prototypes/Recipes/Construction/furniture.yml index 02b7a26bb6..1c7afe46e0 100644 --- a/Resources/Prototypes/Recipes/Construction/furniture.yml +++ b/Resources/Prototypes/Recipes/Construction/furniture.yml @@ -444,3 +444,20 @@ 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 diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index def86ed2c1..166526ef72 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -673,6 +673,9 @@ - type: Tag id: Syringe +- type: Tag + id: Spellbook + - type: Tag id: Taser diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-1.png b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-1.png index 9711a18844..070eb14ca8 100644 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 index 0000000000..c2e5cbab0d 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 index 0000000000..9cdbc861f6 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 index 0000000000..93adcaf1e3 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 index 0000000000..a795f68798 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 index 0000000000..266cd0658e 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 index 0000000000..53b6506f91 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 index 0000000000..0d318246df 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 index 0000000000..a9a4fdc90d 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 index 0000000000..f867ecfd89 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 index 0000000000..1309539794 Binary files /dev/null and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-19.png differ diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-2.png b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-2.png index bfc97a5d80..e1988246b1 100644 Binary files a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-2.png and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-2.png differ diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-3.png b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-3.png index a509e70143..b75ab3368c 100644 Binary files a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-3.png and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-3.png differ diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-4.png b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-4.png index d4554f0659..4000078010 100644 Binary files a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-4.png and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-4.png differ diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-5.png b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-5.png index b1751cc0d2..9c861628b0 100644 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 index 0000000000..1d18d07ec0 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 index 0000000000..f76fbb7208 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 index 0000000000..0d97619d84 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 index 0000000000..e2d90a4261 Binary files /dev/null and b/Resources/Textures/Structures/Furniture/bookshelf.rsi/book-9.png differ diff --git a/Resources/Textures/Structures/Furniture/bookshelf.rsi/meta.json b/Resources/Textures/Structures/Furniture/bookshelf.rsi/meta.json index a80f2a8141..cab257a532 100644 --- a/Resources/Textures/Structures/Furniture/bookshelf.rsi/meta.json +++ b/Resources/Textures/Structures/Furniture/bookshelf.rsi/meta.json @@ -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 @@ -34,6 +34,48 @@ }, { "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" } ] }