]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Space cobra 1.1 (#20298)
authorNim <128169402+Nimfar11@users.noreply.github.com>
Thu, 7 Dec 2023 01:25:57 +0000 (03:25 +0200)
committerGitHub <noreply@github.com>
Thu, 7 Dec 2023 01:25:57 +0000 (20:25 -0500)
* space cobra again

* didn't see

* fix

* Dirty

* space spider

* license

* component

* sprite update

* visibility

* fix

* fix visibility

26 files changed:
Content.Shared/Stealth/Components/StealthComponent.cs
Content.Shared/Stealth/SharedStealthSystem.cs
Resources/Audio/Effects/Footsteps/attributions.yml
Resources/Audio/Effects/Footsteps/snake1.ogg [new file with mode: 0644]
Resources/Audio/Effects/Footsteps/snake2.ogg [new file with mode: 0644]
Resources/Audio/Effects/Footsteps/snake3.ogg [new file with mode: 0644]
Resources/Locale/en-US/ghost/roles/ghost-role-component.ftl
Resources/Locale/en-US/interaction/interaction-popup-component.ftl
Resources/Prototypes/Entities/Clothing/Shoes/misc.yml
Resources/Prototypes/Entities/Markers/Spawners/Random/salvage.yml
Resources/Prototypes/Entities/Markers/Spawners/mobs.yml
Resources/Prototypes/Entities/Mobs/NPCs/space.yml
Resources/Prototypes/Entities/Mobs/NPCs/xeno.yml
Resources/Prototypes/Entities/Objects/Consumable/Food/meat.yml
Resources/Prototypes/SoundCollections/footsteps.yml
Resources/Textures/Clothing/Shoes/Misc/snakeskin.rsi/equipped-FEET.png [new file with mode: 0644]
Resources/Textures/Clothing/Shoes/Misc/snakeskin.rsi/icon.png [new file with mode: 0644]
Resources/Textures/Clothing/Shoes/Misc/snakeskin.rsi/inhand-left.png [new file with mode: 0644]
Resources/Textures/Clothing/Shoes/Misc/snakeskin.rsi/inhand-right.png [new file with mode: 0644]
Resources/Textures/Clothing/Shoes/Misc/snakeskin.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Mobs/Animals/spacecobra.rsi/dead_spacecobra.png [new file with mode: 0644]
Resources/Textures/Mobs/Animals/spacecobra.rsi/glow.png [new file with mode: 0644]
Resources/Textures/Mobs/Animals/spacecobra.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Mobs/Animals/spacecobra.rsi/spacecobra.png [new file with mode: 0644]
Resources/Textures/Objects/Consumable/Food/meat.rsi/meta.json
Resources/Textures/Objects/Consumable/Food/meat.rsi/snake.png [new file with mode: 0644]

index 58cf1cdde60314a8a0719b3e9b54fb42ab8b1b00..1a8a647768a8b5c290a8fa01ad62471838493887 100644 (file)
@@ -19,6 +19,12 @@ public sealed partial class StealthComponent : Component
     [DataField("enabled")]
     public bool Enabled = true;
 
+    /// <summary>
+    /// The creature will continue invisible at death.
+    /// </summary>
+    [DataField("enabledOnDeath")]
+    public bool EnabledOnDeath = true;
+
     /// <summary>
     /// Whether or not the entity previously had an interaction outline prior to cloaking.
     /// </summary>
index 67858c1942c24d579fb1879d6cf80146c2b9f911..aeb42453ca029293a24ad765a2837e3d95088cdd 100644 (file)
@@ -1,4 +1,6 @@
 using Content.Shared.Examine;
+using Content.Shared.Mobs;
+using Content.Shared.Mobs.Systems;
 using Content.Shared.Stealth.Components;
 using Robust.Shared.GameStates;
 using Robust.Shared.Timing;
@@ -8,6 +10,7 @@ namespace Content.Shared.Stealth;
 public abstract class SharedStealthSystem : EntitySystem
 {
     [Dependency] private readonly IGameTiming _timing = default!;
+    [Dependency] private readonly MobStateSystem _mobState = default!;
 
     public override void Initialize()
     {
@@ -22,6 +25,7 @@ public abstract class SharedStealthSystem : EntitySystem
         SubscribeLocalEvent<StealthComponent, ComponentInit>(OnInit);
         SubscribeLocalEvent<StealthComponent, ExamineAttemptEvent>(OnExamineAttempt);
         SubscribeLocalEvent<StealthComponent, ExaminedEvent>(OnExamined);
+        SubscribeLocalEvent<StealthComponent, MobStateChangedEvent>(OnMobStateChanged);
     }
 
     private void OnExamineAttempt(EntityUid uid, StealthComponent component, ExamineAttemptEvent args)
@@ -55,20 +59,34 @@ public abstract class SharedStealthSystem : EntitySystem
             return;
 
         component.Enabled = value;
-        Dirty(component);
+        Dirty(uid, component);
+    }
+
+    private void OnMobStateChanged(EntityUid uid, StealthComponent component, MobStateChangedEvent args)
+    {
+        if (args.NewMobState == MobState.Dead)
+        {
+            component.Enabled = component.EnabledOnDeath;
+        }
+        else
+        {
+            component.Enabled = true;
+        }
+
+        Dirty(uid, component);
     }
 
     private void OnPaused(EntityUid uid, StealthComponent component, ref EntityPausedEvent args)
     {
         component.LastVisibility = GetVisibility(uid, component);
         component.LastUpdated = null;
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     private void OnUnpaused(EntityUid uid, StealthComponent component, ref EntityUnpausedEvent args)
     {
         component.LastUpdated = _timing.CurTime;
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     protected virtual void OnInit(EntityUid uid, StealthComponent component, ComponentInit args)
@@ -128,7 +146,7 @@ public abstract class SharedStealthSystem : EntitySystem
         }
 
         component.LastVisibility = Math.Clamp(component.LastVisibility + delta, component.MinVisibility, component.MaxVisibility);
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     /// <summary>
@@ -144,7 +162,7 @@ public abstract class SharedStealthSystem : EntitySystem
         if (component.LastUpdated != null)
             component.LastUpdated = _timing.CurTime;
 
-        Dirty(component);
+        Dirty(uid, component);
     }
 
     /// <summary>
index 1718620864447eb46308da8f253ecc8c0d0e4044..ef91a34d365f825544a30e02b5437b7ae54a0743 100644 (file)
   copyright: "Taken and modified from tgstation (clownstep 1 and 2) by brainfood1183 (github)"
   source: "https://github.com/tgstation/tgstation/tree/f8ee37afc00bce1ad421615eaa0e4cbddd5eea90/sound/effects"
 
+- files:
+  - snake1.ogg
+  - snake2.ogg
+  - snake3.ogg
+  license: "Custom"
+  copyright: "Taken from https://zvukipro.com/"
+  source: "https://zvukipro.com/jivotnie/21-zvuki-zmej.html"
+
 - files:
   - bells1.ogg
   - bells2.ogg
diff --git a/Resources/Audio/Effects/Footsteps/snake1.ogg b/Resources/Audio/Effects/Footsteps/snake1.ogg
new file mode 100644 (file)
index 0000000..0304b35
Binary files /dev/null and b/Resources/Audio/Effects/Footsteps/snake1.ogg differ
diff --git a/Resources/Audio/Effects/Footsteps/snake2.ogg b/Resources/Audio/Effects/Footsteps/snake2.ogg
new file mode 100644 (file)
index 0000000..46f7ea5
Binary files /dev/null and b/Resources/Audio/Effects/Footsteps/snake2.ogg differ
diff --git a/Resources/Audio/Effects/Footsteps/snake3.ogg b/Resources/Audio/Effects/Footsteps/snake3.ogg
new file mode 100644 (file)
index 0000000..a1640b2
Binary files /dev/null and b/Resources/Audio/Effects/Footsteps/snake3.ogg differ
index c9caa79cc966cdf2020bf8e11c0f885b3fb4bf70..d3f447ae471a476a3b1455029d992567b1f8fff9 100644 (file)
@@ -103,6 +103,12 @@ ghost-role-information-space-spider-description =  Space spiders are just as agg
 ghost-role-information-salvage-spider-name = Space spider on salvage wreck
 ghost-role-information-salvage-spider-description = Space spiders are just as aggressive as regular spiders, feed.
 
+ghost-role-information-space-cobra-name = Space cobra
+ghost-role-information-space-cobra-description = Space cobras really don't like guests, and will always snack on a visitor.
+
+ghost-role-information-salvage-cobra-name = Space cobra on salvage wreck
+ghost-role-information-salvage-cobra-description = Space cobras really don't like guests, and will always snack on a visitor.
+
 ghost-role-information-guardian-name = Guardian
 ghost-role-information-guardian-description = Listen to your owner. Don't tank damage. Punch people hard.
 
index 383c0f58c8351d30a5f1ba70351ff7231dcb792a..3f2a23d30dc9da07d6b8fc0da4588db5ce33a952 100644 (file)
@@ -29,6 +29,7 @@ petting-success-dragon = Dodging teeth, claws, and flames, you pet {THE($target)
 petting-success-hamster = You pet {THE($target)} on {POSS-ADJ($target)} fluffy little head.
 petting-success-bear = You reluctantly pet {THE($target)} on {POSS-ADJ($target)} mystical head.
 petting-success-slimes = You pet {THE($target)} on {POSS-ADJ($target)} mucous surface.
+petting-success-snake = You pet {THE($target)} on {POSS-ADJ($target)} scaly large head.
 
 petting-failure-generic = You reach out to pet {THE($target)}, but {SUBJECT($target)} {CONJUGATE-BE($target)} aloof towards you.
 
index 4373f5076de39c86a8bfb75e8218bfbd8dce7485..ee1708caef6e80b2dd6b204e3d34db3c1e667bb3 100644 (file)
   - type: Clothing
     sprite: Clothing/Shoes/Misc/damedaneshoes.rsi
 
+- type: entity
+  parent: ClothingShoesBase
+  id: ClothingShoesSnakeskinBoots
+  name: snakeskin boots
+  description: Boots made of high-class snakeskin, everyone around you will be jealous.
+  components:
+  - type: Sprite
+    sprite: Clothing/Shoes/Misc/snakeskin.rsi
+  - type: Clothing
+    sprite: Clothing/Shoes/Misc/snakeskin.rsi
+  - type: NoSlip
+
 - type: entity
   parent: [ClothingShoesBase, PowerCellSlotSmallItem]
   id: ClothingShoesBootsSpeed
index 80e3aa94606d7a1d28887b44fcf079ed0aee8e9c..71f09021ce0ed2691728a99fb3c81739bad3f377 100644 (file)
   - type: Sprite
     layers:
     - state: green
+    - state: spacespider
+      sprite: Mobs/Animals/spacespider.rsi
   - type: ConditionalSpawner
     prototypes:
     - MobSpiderSpaceSalvage
+
+- type: entity
+  name: Salvage Space Cobra Spawner
+  id: SpawnMobCobraSalvage
+  parent: MarkerBase
+  components:
+  - type: Sprite
+    layers:
+      - state: green
+      - state: spacecobra
+        sprite: Mobs/Animals/spacecobra.rsi
+  - type: ConditionalSpawner
+    prototypes:
+    - MobCobraSpaceSalvage
index 542198fd2406066fa6ccc4564ed43355ea2c86dd..0766fc18d8670b2db2d8dad582416388e5782959 100644 (file)
   - type: Sprite
     layers:
       - state: green
-      - state: ai
+      - state: shiva
+        sprite: Mobs/Pets/shiva.rsi
   - type: ConditionalSpawner
     prototypes:
       - MobSpiderShiva
   - type: Sprite
     layers:
     - state: green
-    - state: ai
+    - state: spacespider
+      sprite: Mobs/Animals/spacespider.rsi
   - type: ConditionalSpawner
     prototypes:
     - MobSpiderSpace
 
+- type: entity
+  name: Space Cobra Spawner
+  id: SpawnMobSpaceCobra
+  parent: MarkerBase
+  components:
+  - type: Sprite
+    layers:
+    - state: green
+    - state: spacecobra
+      sprite: Mobs/Animals/spacecobra.rsi
+  - type: ConditionalSpawner
+    prototypes:
+    - MobCobraSpace
+
 - type: entity
   name: Slimes Spawner Blue
   id: SpawnMobAdultSlimesBlue
index d784f5c162f207a96420d2d3b0011aea5c8cbb45..9d63f4717103baf7024d6ec656eb41c74d349a96 100644 (file)
     damage:
       types:
         Piercing: 6
-        Poison: 2
+        Poison: 4
   - type: SolutionContainerManager
     solutions:
       melee:
         reagents:
         - ReagentId: ChloralHydrate
-          Quantity: 60
+          Quantity: 80
   - type: MeleeChemicalInjector
     solution: melee
-    transferAmount: 3
+    transferAmount: 4
   - type: ReplacementAccent
     accent: xeno
   - type: InteractionPopup
     name: ghost-role-information-salvage-spider-name
     description: ghost-role-information-salvage-spider-description
   - type: SalvageMobRestrictions
+
+- type: entity
+  name: space cobra
+  id: MobCobraSpace
+  parent: MobSpaceBasic
+  description: Long fangs and a glowing hood, and the alluring look begs to come closer.
+  components:
+    - type: Sprite
+      drawdepth: Mobs
+      sprite: Mobs/Animals/spacecobra.rsi
+      layers:
+        - map: [ "enum.DamageStateVisualLayers.Base" ]
+          state: spacecobra
+        - map: [ "enum.DamageStateVisualLayers.BaseUnshaded" ]
+          state: glow
+          shader: unshaded
+    - type: FootstepModifier
+      footstepSoundCollection:
+        collection: FootstepSnake
+    - type: MobThresholds
+      thresholds:
+        0: Alive
+        100: Dead
+    - type: Stamina
+      critThreshold: 150
+    - type: DamageStateVisuals
+      states:
+        Alive:
+          Base: spacecobra
+          BaseUnshaded: glow
+        Dead:
+          Base: dead_spacecobra
+    - type: Butcherable
+      spawned:
+        - id: FoodMeatSnake
+          amount: 2
+        - id: UraniumOre1
+          amount: 1
+        - id: ClothingShoesSnakeskinBoots
+          amount: 1
+          prob: 0.3
+    - type: Bloodstream
+      bloodMaxVolume: 200
+      bloodReagent: Cryoxadone
+    - type: Fixtures
+      fixtures:
+        fix1:
+          shape:
+            !type:PhysShapeCircle
+            radius: 0.40
+          density: 120
+          mask:
+          - MobMask
+          layer:
+          - MobLayer
+    - type: MeleeWeapon
+      hidden: true
+      soundHit:
+        path: /Audio/Effects/bite.ogg
+      angle: 0
+      animation: WeaponArcBite
+      damage:
+        types:
+          Piercing: 6
+          Poison: 4
+    - type: SolutionContainerManager
+      solutions:
+        melee:
+          reagents:
+          - ReagentId: NorepinephricAcid
+            Quantity: 90
+    - type: MeleeChemicalInjector
+      solution: melee
+      transferAmount: 6
+    - type: ReplacementAccent
+      accent: xeno
+    - type: InteractionPopup
+      successChance: 0.2
+      interactSuccessString: petting-success-snake
+      interactFailureString: petting-failure-generic
+    - type: PointLight
+      radius: 1.1
+      energy: 1.5
+      color: "#4faffb"
+    - type: GhostRole
+      prob: 0.25
+      name: ghost-role-information-space-cobra-name
+      description: ghost-role-information-space-cobra-description
+    - type: Stealth
+      enabledOnDeath: false
+      maxVisibility: 1.2
+    - type: StealthOnMove
+      passiveVisibilityRate: -0.25
+      movementVisibilityRate: 0.25
+
+- type: entity
+  id: MobCobraSpaceSalvage
+  parent: MobCobraSpace
+  suffix: "Salvage Ruleset"
+  components:
+    - type: GhostRole
+      prob: 0.25
+      name: ghost-role-information-salvage-cobra-name
+      description: ghost-role-information-salvage-cobra-description
+    - type: SalvageMobRestrictions
index 1626a1bc81aee095c84bd4376e9d34e53c6bf560..01ff22368913a94ed67e19c7783c143fe573e5e1 100644 (file)
         - MobMask
         layer:
         - MobLayer
-
+  - type: FootstepModifier
+    footstepSoundCollection:
+      collection: FootstepSnake
+  - type: Tag
+    tags:
+    - DoorBumpOpener
+    - FootstepSound
+    
 - type: entity
   name: space adder
   parent: MobPurpleSnake
index 2b7c9d6e16b3ccc4693529ce15d359e74a2660fb..c807263f84236eca605b37bca9487a41dca737da 100644 (file)
         - ReagentId: UncookedAnimalProteins
           Quantity: 1
 
+- type: entity
+  name: raw snake meat
+  parent: FoodMeatBase
+  id: FoodMeatSnake
+  description: A long piece of snake meat, hopefully not poisonous.
+  components:
+  - type: Tag
+    tags:
+    - Raw
+  - type: Sprite
+    state: snake
+  - type: SolutionContainerManager
+    solutions:
+      food:
+        reagents:
+        - ReagentId: UncookedAnimalProteins
+          Quantity: 10
+        - ReagentId: Toxin
+          Quantity: 2
+
 - type: entity
   name: raw xeno meat
   # not raw since acid kills bacteria or something, same as xeno
index f0a273ec3afe4a25345d7492bc2e35eb11befd3d..e5b721026201372e0352fc1a240fe8d528c71ee3 100644 (file)
   - /Audio/Effects/Footsteps/clownspiderstep1.ogg
   - /Audio/Effects/Footsteps/clownspiderstep2.ogg
 
+- type: soundCollection
+  id: FootstepSnake
+  files:
+  - /Audio/Effects/Footsteps/snake1.ogg
+  - /Audio/Effects/Footsteps/snake2.ogg
+  - /Audio/Effects/Footsteps/snake3.ogg
+
 - type: soundCollection
   id: FootstepBells
   files:
diff --git a/Resources/Textures/Clothing/Shoes/Misc/snakeskin.rsi/equipped-FEET.png b/Resources/Textures/Clothing/Shoes/Misc/snakeskin.rsi/equipped-FEET.png
new file mode 100644 (file)
index 0000000..7b2f287
Binary files /dev/null and b/Resources/Textures/Clothing/Shoes/Misc/snakeskin.rsi/equipped-FEET.png differ
diff --git a/Resources/Textures/Clothing/Shoes/Misc/snakeskin.rsi/icon.png b/Resources/Textures/Clothing/Shoes/Misc/snakeskin.rsi/icon.png
new file mode 100644 (file)
index 0000000..103c20e
Binary files /dev/null and b/Resources/Textures/Clothing/Shoes/Misc/snakeskin.rsi/icon.png differ
diff --git a/Resources/Textures/Clothing/Shoes/Misc/snakeskin.rsi/inhand-left.png b/Resources/Textures/Clothing/Shoes/Misc/snakeskin.rsi/inhand-left.png
new file mode 100644 (file)
index 0000000..14c6851
Binary files /dev/null and b/Resources/Textures/Clothing/Shoes/Misc/snakeskin.rsi/inhand-left.png differ
diff --git a/Resources/Textures/Clothing/Shoes/Misc/snakeskin.rsi/inhand-right.png b/Resources/Textures/Clothing/Shoes/Misc/snakeskin.rsi/inhand-right.png
new file mode 100644 (file)
index 0000000..fa94536
Binary files /dev/null and b/Resources/Textures/Clothing/Shoes/Misc/snakeskin.rsi/inhand-right.png differ
diff --git a/Resources/Textures/Clothing/Shoes/Misc/snakeskin.rsi/meta.json b/Resources/Textures/Clothing/Shoes/Misc/snakeskin.rsi/meta.json
new file mode 100644 (file)
index 0000000..f478e93
--- /dev/null
@@ -0,0 +1,26 @@
+{
+  "version": 1,
+  "license": "CC-BY-NC-3.0",
+  "copyright": "Made by Nimfar11 (GitHub) for Space Station 14",
+  "size": {
+    "x": 32,
+    "y": 32
+  },
+  "states": [
+    {
+      "name": "icon"
+    },
+    {
+      "name": "equipped-FEET",
+      "directions": 4
+    },
+    {
+      "name": "inhand-left",
+      "directions": 4
+    },
+    {
+      "name": "inhand-right",
+      "directions": 4
+    }
+  ]
+}
diff --git a/Resources/Textures/Mobs/Animals/spacecobra.rsi/dead_spacecobra.png b/Resources/Textures/Mobs/Animals/spacecobra.rsi/dead_spacecobra.png
new file mode 100644 (file)
index 0000000..a88564d
Binary files /dev/null and b/Resources/Textures/Mobs/Animals/spacecobra.rsi/dead_spacecobra.png differ
diff --git a/Resources/Textures/Mobs/Animals/spacecobra.rsi/glow.png b/Resources/Textures/Mobs/Animals/spacecobra.rsi/glow.png
new file mode 100644 (file)
index 0000000..950dc02
Binary files /dev/null and b/Resources/Textures/Mobs/Animals/spacecobra.rsi/glow.png differ
diff --git a/Resources/Textures/Mobs/Animals/spacecobra.rsi/meta.json b/Resources/Textures/Mobs/Animals/spacecobra.rsi/meta.json
new file mode 100644 (file)
index 0000000..86f542a
--- /dev/null
@@ -0,0 +1,34 @@
+{
+  "version": 1,
+  "license": "CC-BY-SA-3.0",
+  "copyright": "Sprited by Nimfar11 (Github) for Space Station 14",
+  "size": {
+    "x": 32,
+    "y": 32
+  },
+  "states": [
+    {
+        "name": "spacecobra",
+        "directions": 4,
+        "delays": [
+          [0.3,0.2,0.2,0.4,0.2,0.2,0.3],
+          [0.3,0.2,0.2,0.4,0.2,0.2,0.3],
+          [0.3,0.2,0.2,0.4,0.2,0.2,0.3],
+          [0.3,0.2,0.2,0.4,0.2,0.2,0.3]
+               ]
+    },
+       {
+        "name": "glow",
+        "directions": 4,
+        "delays": [
+          [0.3,0.2,0.2,0.4,0.2,0.2,0.3],
+          [0.3,0.2,0.2,0.4,0.2,0.2,0.3],
+          [0.3,0.2,0.2,0.4,0.2,0.2,0.3],
+          [0.3,0.2,0.2,0.4,0.2,0.2,0.3]
+               ]
+    },
+    {
+               "name": "dead_spacecobra"
+    }
+  ]
+}
diff --git a/Resources/Textures/Mobs/Animals/spacecobra.rsi/spacecobra.png b/Resources/Textures/Mobs/Animals/spacecobra.rsi/spacecobra.png
new file mode 100644 (file)
index 0000000..fdaec29
Binary files /dev/null and b/Resources/Textures/Mobs/Animals/spacecobra.rsi/spacecobra.png differ
index f1aa4d3446dd1a0c402c4f284906fe526eecef7e..2bb20f1eb521599b3169bcbf76a3b4356321c34f 100644 (file)
     {
       "name": "slime"
     },
+    {
+      "name": "snake"
+    },
     {
       "name": "spider"
     },
diff --git a/Resources/Textures/Objects/Consumable/Food/meat.rsi/snake.png b/Resources/Textures/Objects/Consumable/Food/meat.rsi/snake.png
new file mode 100644 (file)
index 0000000..a16189e
Binary files /dev/null and b/Resources/Textures/Objects/Consumable/Food/meat.rsi/snake.png differ