]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
New solar sprites, new solar panel upgrades, and some solar panel fixes. (#29224)
authorCaasGit <87243814+CaasGit@users.noreply.github.com>
Sun, 26 Jan 2025 14:01:34 +0000 (06:01 -0800)
committerGitHub <noreply@github.com>
Sun, 26 Jan 2025 14:01:34 +0000 (15:01 +0100)
* New solar sprites, new solar panel upgrades, and some solar panel fixes.

This adds and changes a few things for solar panels!

* New sprites for all solar panels and all related states.
* Move from xform.WorldRotation to _xformSystem.SetWorldRotation within
  the solar code.
* Few random fixes that Rider suggested as warnings.
* Solar Tracker Electronics was using what looks like to be the airlock
  controller electronics, so that's now updated to something a bit more
  realistic. It also uses the engineering circuit sprite instead of the
  generic
* New Solar Panels! Adds Plasma and Uranium Glass solar panels. These
  can be constructed by adding the respective glass to the panel. Plasma
  is a slight increase of power and health, and uranium is double the
  power and health of glass. Thus giving engineers something to update
  if they want to use solar panels and possibly giving small outposts
  a way to make a bit more power without a large and complex power
  setup.

* Add in solar sprites that were not in the meta file.

* Updated sprites based on feedback.

* Fix the rotation of the solar panel sprites.

24 files changed:
Resources/Prototypes/Entities/Objects/Devices/Electronics/power_electronics.yml
Resources/Prototypes/Entities/Structures/Power/Generation/solar.yml
Resources/Prototypes/Recipes/Construction/Graphs/utilities/solarpanel.yml
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/broken.png [deleted file]
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/meta.json
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/normal.png [deleted file]
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_assembly.png
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_assembly_tracker_circuit.png [new file with mode: 0644]
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_assembly_tracker_circuit_uncabled.png [new file with mode: 0644]
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_assembly_uncabled.png [new file with mode: 0644]
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_glass.png [new file with mode: 0644]
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_glass_broken.png [new file with mode: 0644]
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_glass_uncabled.png [new file with mode: 0644]
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_plasma.png [new file with mode: 0644]
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_plasma_broken.png [new file with mode: 0644]
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_plasma_uncabled.png [new file with mode: 0644]
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_uranium.png [new file with mode: 0644]
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_uranium_broken.png [new file with mode: 0644]
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_uranium_uncabled.png [new file with mode: 0644]
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_tracker.png
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_tracker_broken.png [new file with mode: 0644]
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_tracker_broken_uncabled.png [new file with mode: 0644]
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_tracker_uncabled.png [new file with mode: 0644]
Resources/Textures/Structures/Power/Generation/solar_panel.rsi/static.png [deleted file]

index e15d1a22a5c0803f93765fa5dcece472d4662854..c1ef5f497f984d4366e0ce4858fd37da0dd8e010 100644 (file)
@@ -77,7 +77,7 @@
   components:
     - type: Sprite
       sprite: Objects/Misc/module.rsi
-      state: generic
+      state: engineering
     - type: StaticPrice
       price: 85
     - type: Tag
index e43ee9adca41d9cb5660d4feb771e3463edfa248..5663cbdf2fe07e38c1e638cf46f5854cde1c1232 100644 (file)
@@ -28,7 +28,7 @@
         - MidImpassable, LowImpassable, BulletImpassable
   - type: Sprite
     sprite: Structures/Power/Generation/solar_panel.rsi
-    state: normal
+    state: solar_panel_glass
   - type: NodeContainer
     examinable: true
     nodes:
@@ -39,7 +39,7 @@
     group: Generator
     loadNode: output
     sprite: Structures/Power/Generation/solar_panel.rsi
-    state: static
+    state: solar_panel_glass
     collectionName: SolarPanel
   - type: Anchorable
   - type: Pullable
     highVoltageNode: output
   - type: RequireProjectileTarget
 
+- type: entity
+  id: SolarPanelPlasma
+  parent: SolarPanelBasePhysSprite
+  name: solar panel plasma
+  description: A plasma solar panel that generates power.
+  components:
+  - type: PowerSupplier
+    supplyRampTolerance: 500
+    supplyRampRate: 500
+  - type: SolarPanel
+    maxSupply: 1000
+  - type: Sprite
+    sprite: Structures/Power/Generation/solar_panel.rsi
+    state: solar_panel_plasma
+  - type: Damageable
+    damageContainer: Inorganic
+    damageModifierSet: Metallic
+  - type: Destructible
+    thresholds:
+    - trigger:
+        !type:DamageTrigger
+        damage: 150
+      behaviors:
+      - !type:PlaySoundBehavior
+        sound:
+          collection: GlassBreak
+      - !type:ChangeConstructionNodeBehavior
+        node: solarpanelplasma_broken
+      - !type:DoActsBehavior
+        acts: ["Breakage"]
+  - type: Construction
+    graph: SolarPanel
+    node: solarpanelplasma
+
+- type: entity
+  id: SolarPanelUranium
+  parent: SolarPanelBasePhysSprite
+  name: solar panel uranium
+  description: A uranium solar panel that generates power.
+  components:
+  - type: PowerSupplier
+    supplyRampTolerance: 500
+    supplyRampRate: 500
+  - type: SolarPanel
+    maxSupply: 1500
+  - type: Sprite
+    sprite: Structures/Power/Generation/solar_panel.rsi
+    state: solar_panel_uranium
+  - type: Damageable
+    damageContainer: Inorganic
+    damageModifierSet: Metallic
+  - type: Destructible
+    thresholds:
+    - trigger:
+        !type:DamageTrigger
+        damage: 200
+      behaviors:
+      - !type:PlaySoundBehavior
+        sound:
+          collection: GlassBreak
+      - !type:ChangeConstructionNodeBehavior
+        node: solarpaneluranium_broken
+      - !type:DoActsBehavior
+        acts: ["Breakage"]
+  - type: Construction
+    graph: SolarPanel
+    node: solarpaneluranium
+
 - type: entity
   id: SolarPanel
   parent: SolarPanelBasePhysSprite
   suffix: Broken
   components:
   - type: Sprite
-    state: broken
+    state: solar_panel_glass_broken
   - type: Damageable
     damageContainer: StructuralInorganic
     damageModifierSet: Metallic
     graph: SolarPanel
     node: solarpanel_broken
 
+- type: entity
+  id: SolarPanelPlasmaBroken
+  parent: SolarPanelBasePhysSprite
+  name: plasma solar panel
+  description: A broken plasma solar panel.
+  suffix: Broken
+  components:
+  - type: Sprite
+    state: solar_panel_plasma_broken
+  - type: Damageable
+    damageContainer: Inorganic
+    damageModifierSet: Metallic
+  - type: Destructible
+    thresholds:
+    - trigger:
+        !type:DamageTrigger
+        damage: 50
+      behaviors:
+      - !type:PlaySoundBehavior
+        sound:
+          collection: GlassBreak
+      - !type:SpawnEntitiesBehavior
+        spawn:
+          ShardGlassPlasma:
+            min: 1
+            max: 2
+      - !type:DoActsBehavior
+        acts: [ "Destruction" ]
+  - type: Construction
+    graph: SolarPanel
+    node: solarpanelplasma_broken
+
+- type: entity
+  id: SolarPanelUraniumBroken
+  parent: SolarPanelBasePhysSprite
+  name: uranium solar panel
+  description: A broken uranium solar panel.
+  suffix: Broken
+  components:
+  - type: Sprite
+    state: solar_panel_uranium_broken
+  - type: Damageable
+    damageContainer: Inorganic
+    damageModifierSet: Metallic
+  - type: Destructible
+    thresholds:
+    - trigger:
+        !type:DamageTrigger
+        damage: 50
+      behaviors:
+      - !type:PlaySoundBehavior
+        sound:
+          collection: GlassBreak
+      - !type:SpawnEntitiesBehavior
+        spawn:
+          ShardGlassUranium:
+            min: 1
+            max: 2
+      - !type:DoActsBehavior
+        acts: [ "Destruction" ]
+  - type: Construction
+    graph: SolarPanel
+    node: solarpaneluranium_broken
+
 - type: entity
   id: SolarAssembly
   name: solar assembly
index f27b751572bb3a6c71ed3f74105c87722bd1615e..8dee23d0217d5d2c29a2c1a3e63672f28f1277f4 100644 (file)
           steps:
             - tool: Screwing
               doAfter: 2
+        - to: solarpanelplasma
+          conditions:
+            - !type:EntityAnchored
+          steps:
+            - material: PlasmaGlass
+              amount: 2
+              doAfter: 0.5
+          completed:
+            - !type:SnapToGrid
+        - to: solarpaneluranium
+          conditions:
+            - !type:EntityAnchored
+          steps:
+            - material: UraniumGlass
+              amount: 2
+              doAfter: 0.5
+          completed:
+            - !type:SnapToGrid
         - to: solarpanel
           conditions:
             - !type:EntityAnchored
@@ -42,7 +60,7 @@
               name: solar tracker electronics
               icon:
                 sprite: Objects/Misc/module.rsi
-                state: id_mod
+                state: engineering
               doAfter: 1
             - material: Glass
               amount: 2
           completed:
             - !type:SnapToGrid
 
+    - node: solarpanelplasma
+      entity: SolarPanelPlasma
+      edges:
+        - to: solarassembly
+          completed:
+            - !type:SnapToGrid
+              southRotation: true
+            - !type:SpawnPrototype
+              prototype: SheetPGlass1
+              amount: 2
+          conditions:
+            - !type:EntityAnchored
+              anchored: true
+          steps:
+            - tool: Prying
+              doAfter: 0.5
+
+    - node: solarpaneluranium
+      entity: SolarPanelUranium
+      edges:
+        - to: solarassembly
+          completed:
+            - !type:SnapToGrid
+              southRotation: true
+            - !type:SpawnPrototype
+              prototype: SheetUGlass1
+              amount: 2
+          conditions:
+            - !type:EntityAnchored
+              anchored: true
+          steps:
+            - tool: Prying
+              doAfter: 0.5
+
     - node: solarpanel
       entity: SolarPanel
       edges:
             - tool: Prying
               doAfter: 0.5
 
+    - node: solarpanelplasma_broken
+      entity: SolarPanelPlasmaBroken
+      edges:
+      - to: solarassembly
+        completed:
+        - !type:SnapToGrid
+          southRotation: true
+        - !type:SpawnPrototype
+          prototype: ShardGlassPlasma
+          amount: 2
+        conditions:
+        - !type:EntityAnchored
+          anchored: true
+        steps:
+        - tool: Prying
+          doAfter: 0.5
+
+    - node: solarpaneluranium_broken
+      entity: SolarPanelUraniumBroken
+      edges:
+      - to: solarassembly
+        completed:
+        - !type:SnapToGrid
+          southRotation: true
+        - !type:SpawnPrototype
+          prototype: ShardGlassUranium
+          amount: 2
+        conditions:
+        - !type:EntityAnchored
+          anchored: true
+        steps:
+        - tool: Prying
+          doAfter: 0.5
+
     - node: solartracker
       entity: SolarTracker
       edges:
diff --git a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/broken.png b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/broken.png
deleted file mode 100644 (file)
index ded81ca..0000000
Binary files a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/broken.png and /dev/null differ
index 0046666656022fd42ade5a3afae675f4a71ac46e..7fa89a8ca15b64248141f5fda34c351fea38df4a 100644 (file)
@@ -1,30 +1,60 @@
 {
        "version":1,
-       "license":"CC-BY-SA-3.0",
-       "copyright":"Taken from https://github.com/discordia-space/CEV-Eris/blob/d1e0161af146835f4fb79d21a6200caa9cc842d0/icons/obj/power.dmi and modified.",
+       "license":"CC-BY-SA-4.0",
+       "copyright":"KalimbaMachine (github) & CaasGit (github) for Space Station 14",
        "size":{"x":32,"y":32},
        "states":
        [
                {
-                       "name": "normal",
-                       "select": [],
-                       "flags": {},
-                       "directions": 8
+                       "name": "solar_assembly"
                },
                {
-                       "name": "broken",
-                       "select": [],
-                       "flags": {},
-                       "directions": 1
+                       "name": "solar_assembly_tracker_circuit"
                },
                {
-                       "name": "static"
+                       "name": "solar_panel_glass_broken"
                },
                {
-                       "name": "solar_assembly"
+                       "name": "solar_panel_plasma_broken"
+               },
+               {
+                       "name": "solar_panel_uranium_broken"
+               },
+               {
+                       "name": "solar_panel_glass"
+               },
+               {
+                       "name": "solar_panel_plasma"
+               },
+               {
+                       "name": "solar_panel_uranium"
                },
                {
                        "name": "solar_tracker"
+               },
+               {
+                       "name": "solar_tracker_broken"
+               },
+               {
+                       "name": "solar_assembly_uncabled"
+               },
+               {
+                       "name": "solar_assembly_tracker_circuit_uncabled"
+               },
+               {
+                       "name": "solar_panel_glass_uncabled"
+               },
+               {
+                       "name": "solar_panel_plasma_uncabled"
+               },
+               {
+                       "name": "solar_panel_uranium_uncabled"
+               },
+               {
+                       "name": "solar_tracker_uncabled"
+               },
+               {
+                       "name": "solar_tracker_broken_uncabled"
                }
        ]
 }
diff --git a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/normal.png b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/normal.png
deleted file mode 100644 (file)
index 1e1c620..0000000
Binary files a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/normal.png and /dev/null differ
index 6714f199e4fc177c295a1474baea2b4035a9fdab..191ebeaaa32998592487311b08cf97c79996b465 100644 (file)
Binary files a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_assembly.png and b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_assembly.png differ
diff --git a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_assembly_tracker_circuit.png b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_assembly_tracker_circuit.png
new file mode 100644 (file)
index 0000000..e83efe0
Binary files /dev/null and b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_assembly_tracker_circuit.png differ
diff --git a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_assembly_tracker_circuit_uncabled.png b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_assembly_tracker_circuit_uncabled.png
new file mode 100644 (file)
index 0000000..52db0ee
Binary files /dev/null and b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_assembly_tracker_circuit_uncabled.png differ
diff --git a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_assembly_uncabled.png b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_assembly_uncabled.png
new file mode 100644 (file)
index 0000000..d1fc51c
Binary files /dev/null and b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_assembly_uncabled.png differ
diff --git a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_glass.png b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_glass.png
new file mode 100644 (file)
index 0000000..ae84f90
Binary files /dev/null and b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_glass.png differ
diff --git a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_glass_broken.png b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_glass_broken.png
new file mode 100644 (file)
index 0000000..13eeac9
Binary files /dev/null and b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_glass_broken.png differ
diff --git a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_glass_uncabled.png b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_glass_uncabled.png
new file mode 100644 (file)
index 0000000..9e4bfbc
Binary files /dev/null and b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_glass_uncabled.png differ
diff --git a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_plasma.png b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_plasma.png
new file mode 100644 (file)
index 0000000..a3777f3
Binary files /dev/null and b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_plasma.png differ
diff --git a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_plasma_broken.png b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_plasma_broken.png
new file mode 100644 (file)
index 0000000..465a932
Binary files /dev/null and b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_plasma_broken.png differ
diff --git a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_plasma_uncabled.png b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_plasma_uncabled.png
new file mode 100644 (file)
index 0000000..c1e181e
Binary files /dev/null and b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_plasma_uncabled.png differ
diff --git a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_uranium.png b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_uranium.png
new file mode 100644 (file)
index 0000000..ae41622
Binary files /dev/null and b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_uranium.png differ
diff --git a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_uranium_broken.png b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_uranium_broken.png
new file mode 100644 (file)
index 0000000..c2feca3
Binary files /dev/null and b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_uranium_broken.png differ
diff --git a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_uranium_uncabled.png b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_uranium_uncabled.png
new file mode 100644 (file)
index 0000000..fab9dd3
Binary files /dev/null and b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_panel_uranium_uncabled.png differ
index 17abc02d28a69509465967b823b0e8a9db658a07..a36865c79abab84325a78f73a7e12da9594dcb66 100644 (file)
Binary files a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_tracker.png and b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_tracker.png differ
diff --git a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_tracker_broken.png b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_tracker_broken.png
new file mode 100644 (file)
index 0000000..99bdb06
Binary files /dev/null and b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_tracker_broken.png differ
diff --git a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_tracker_broken_uncabled.png b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_tracker_broken_uncabled.png
new file mode 100644 (file)
index 0000000..2c8a3ec
Binary files /dev/null and b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_tracker_broken_uncabled.png differ
diff --git a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_tracker_uncabled.png b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_tracker_uncabled.png
new file mode 100644 (file)
index 0000000..d0684fe
Binary files /dev/null and b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/solar_tracker_uncabled.png differ
diff --git a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/static.png b/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/static.png
deleted file mode 100644 (file)
index 455a061..0000000
Binary files a/Resources/Textures/Structures/Power/Generation/solar_panel.rsi/static.png and /dev/null differ