]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Newton cradle (#22914)
authorlzk <124214523+lzk228@users.noreply.github.com>
Thu, 1 Feb 2024 11:41:19 +0000 (12:41 +0100)
committerGitHub <noreply@github.com>
Thu, 1 Feb 2024 11:41:19 +0000 (22:41 +1100)
* comit

* comit2

* little more range

* review

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
Resources/Audio/Items/attributions.yml
Resources/Audio/Items/newton_cradle.ogg [new file with mode: 0644]
Resources/Prototypes/Entities/Objects/Fun/toys.yml
Resources/Textures/Objects/Fun/newton_cradle.rsi/icon-off.png [new file with mode: 0644]
Resources/Textures/Objects/Fun/newton_cradle.rsi/icon.png [new file with mode: 0644]
Resources/Textures/Objects/Fun/newton_cradle.rsi/meta.json [new file with mode: 0644]

index 13eff6e7025f88035f4ce15b48fc4a346ffb4186..51d8d9cf95a8dd5e5d9c60fd5c701e52b8b500f8 100644 (file)
@@ -67,7 +67,7 @@
   license: "CC-BY-3.0"
   copyright: "User jzdnvdoosj on freesound.org. Converted to ogg by mirrorcult"
   source: "https://freesound.org/people/jzdnvdoosj/sounds/626262/"
-  
+
 - files: ["candle_blowing.ogg"]
   license: "CC-BY-NC-3.0"
   copyright: "Created by Bee09, converted to OGG, cropped and converted to mono by TheShuEd"
   license: "CC-BY-SA-3.0"
   copyright: "Taken from /tg/station"
   source: "https://github.com/tgstation/tgstation/commit/c61c452d78425d89920b41ed5f95fd190e733a3c"
-  
+
 - files: ["scissors.ogg"]
   license: "CC0-1.0"
   copyright: "User Hanbaal on freesound.org. Converted to ogg by TheShuEd"
   source: "https://freesound.org/people/Hanbaal/sounds/178669/"
+
+- files: ["newton_cradle.ogg"]
+  license: "CC-BY-4.0"
+  copyright: "User LoafDV on freesound.org. Converted to ogg end edited by lzk228"
+  source: "https://freesound.org/people/LoafDV/sounds/131596/"
   
 - files: ["shovel_dig.ogg"]
   license: "CC-BY-SA-3.0"
   copyright: "Taken from tgstation, modified by themias (github) for ss14"
-  source: "https://github.com/tgstation/tgstation/tree/85a0925051bb00e7a950ee66cb7f87982cd22439/sound/effects/shovel_dig.ogg"
\ No newline at end of file
+  source: "https://github.com/tgstation/tgstation/tree/85a0925051bb00e7a950ee66cb7f87982cd22439/sound/effects/shovel_dig.ogg"
diff --git a/Resources/Audio/Items/newton_cradle.ogg b/Resources/Audio/Items/newton_cradle.ogg
new file mode 100644 (file)
index 0000000..6dfe528
Binary files /dev/null and b/Resources/Audio/Items/newton_cradle.ogg differ
index 6dee106e9f82299bde4037d25e7fa9aeac91d93d..981685bb929df6417aae8eb0ac21c54e8b9135db 100644 (file)
       path: /Audio/Voice/Human/malescream_3.ogg
   - type: MeleeWeapon
     soundHit:
-      path: /Audio/Voice/Human/malescream_4.ogg
\ No newline at end of file
+      path: /Audio/Voice/Human/malescream_4.ogg
+
+- type: entity
+  parent: BaseItem
+  id: NewtonCradle
+  name: newton cradle
+  description: A device bored paper pushers use to remind themselves that time did not stop yet. Contains gravity.
+  components:
+  - type: Sprite
+    sprite: Objects/Fun/newton_cradle.rsi
+    state: icon-off
+  - type: Item
+    sprite: Objects/Fun/newton_cradle.rsi
+    storedRotation: -90
+  - type: Appearance
+  - type: GenericVisualizer
+    visuals:
+      enum.ToggleVisuals.Toggled:
+        enum.ToggleVisuals.Layer:
+          True: { state: icon }
+          False: { state: icon-off }
+  - type: ItemToggle
+  - type: ItemToggleActiveSound
+    activeSound:
+      path: /Audio/Items/newton_cradle.ogg
+      params:
+        volume: -7
+        range: 5
+        sound:
+          path: /Audio/Items/newton_cradle.ogg
diff --git a/Resources/Textures/Objects/Fun/newton_cradle.rsi/icon-off.png b/Resources/Textures/Objects/Fun/newton_cradle.rsi/icon-off.png
new file mode 100644 (file)
index 0000000..6219636
Binary files /dev/null and b/Resources/Textures/Objects/Fun/newton_cradle.rsi/icon-off.png differ
diff --git a/Resources/Textures/Objects/Fun/newton_cradle.rsi/icon.png b/Resources/Textures/Objects/Fun/newton_cradle.rsi/icon.png
new file mode 100644 (file)
index 0000000..effd80c
Binary files /dev/null and b/Resources/Textures/Objects/Fun/newton_cradle.rsi/icon.png differ
diff --git a/Resources/Textures/Objects/Fun/newton_cradle.rsi/meta.json b/Resources/Textures/Objects/Fun/newton_cradle.rsi/meta.json
new file mode 100644 (file)
index 0000000..0ff9e80
--- /dev/null
@@ -0,0 +1,25 @@
+{
+  "version": 1,
+  "license": "CC-BY-SA-3.0",
+  "copyright": "Taken from https://github.com/ParadiseSS13/Paradise/commit/aa7a7b3cee09b313705343a6859658b928a3da03",
+  "size": {
+    "x": 32,
+    "y": 32
+  },
+  "states": [
+    {
+      "name": "icon-off"
+    },
+    {
+      "name": "icon",
+      "delays": [
+        [
+          0.3,
+          0.1,
+          0.3,
+          0.1
+        ]
+      ]
+    }
+  ]
+}