Repository: crystallpunk-14/crystall-punk-14
Pull request #1129: Adapted watchers
Author: login: Nimfar11
Labels: name: S: Needs Review
Created: 2025-04-03T11:04:23Z | Merged: 2025-04-04T14:30:26Z

## About the PR

Adds adapted observers for our build to the demiplanes. Two types - magma and ice.
Добавляет адаптированных наблюдателей под наш билд в демипланы. Два вида - магмовый и ледяной.

## Why / Balance

The survival rate of mobs in the lava demiplane has been increased by 100 per cent.
Выживаемость мобов в лавовом демиплане увеличена на 100 процентов.



Diff:
diff --git a/Resources/Locale/en-US/_CP14/demiplane/modifiers.ftl b/Resources/Locale/en-US/_CP14/demiplane/modifiers.ftl
index 45417f531e1..662b7a89d6c 100644
--- a/Resources/Locale/en-US/_CP14/demiplane/modifiers.ftl
+++ b/Resources/Locale/en-US/_CP14/demiplane/modifiers.ftl
@@ -16,6 +16,7 @@ cp14-modifier-slime = slimes
 cp14-modifier-skeleton = sentient skeletons
 cp14-modifier-dyno = prehistoric fauna
 cp14-modifier-mole = predatory moles
+cp14-modifier-watcher = watchers
 cp14-modifier-rabbits = rabbits
 cp14-modifier-boars = wild boars
 cp14-modifier-invisible-whistler = invisible whistlers
diff --git a/Resources/Locale/ru-RU/_CP14/demiplane/modifiers.ftl b/Resources/Locale/ru-RU/_CP14/demiplane/modifiers.ftl
index 177a91159e9..6fd0800c5ec 100644
--- a/Resources/Locale/ru-RU/_CP14/demiplane/modifiers.ftl
+++ b/Resources/Locale/ru-RU/_CP14/demiplane/modifiers.ftl
@@ -16,6 +16,7 @@ cp14-modifier-slime = слаймов
 cp14-modifier-skeleton = разумные скелеты
 cp14-modifier-dyno = доисторической фауны
 cp14-modifier-mole = хищных кротов
+cp14-modifier-watcher = наблюдателей
 cp14-modifier-rabbits = кроликов
 cp14-modifier-boars = диких кабанов
 cp14-modifier-sheeps = овец
diff --git a/Resources/Prototypes/_CP14/Damage/modifier_sets.yml b/Resources/Prototypes/_CP14/Damage/modifier_sets.yml
index 626e41d6bef..625eb361796 100644
--- a/Resources/Prototypes/_CP14/Damage/modifier_sets.yml
+++ b/Resources/Prototypes/_CP14/Damage/modifier_sets.yml
@@ -46,6 +46,18 @@
     Cold: 0.8
     Poison: 0.2
 
+- type: damageModifierSet
+  id: CP14WatcherIce
+  coefficients:
+    Heat: 1.4
+    Cold: 0.2
+
+- type: damageModifierSet
+  id: CP14WatcherFire
+  coefficients:
+    Heat: 0.2
+    Cold: 1.4
+
 # Species
 
 - type: damageModifierSet
diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/watcher.yml b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/watcher.yml
new file mode 100644
index 00000000000..937ad9e32ca
--- /dev/null
+++ b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/watcher.yml
@@ -0,0 +1,138 @@
+﻿- type: entity
+  name: watcher
+  id: CP14MobWatcherBase
+  parent: [ CP14SimpleMobNoLifeBase, FlyingMobBase ]
+  abstract: true
+  description: It's like it's staring right through you.
+  categories: [ ForkFiltered ]
+  components:
+  - type: NpcFactionMember
+    factions:
+    - CP14Monster
+  - type: HTN
+    rootTask:
+      task: SimpleRangedHostileCompound
+  - type: Sprite
+    drawdepth: Mobs
+    sprite: Mobs/Aliens/Lavaland/watcher.rsi
+    layers:
+    - map: [ "enum.DamageStateVisualLayers.Base" ]
+      state: base
+    - map: [ "enum.DamageStateVisualLayers.BaseUnshaded" ]
+      state: unshaded
+      shader: unshaded
+  - type: Fixtures
+    fixtures:
+      fix1:
+        shape:
+          !type:PhysShapeCircle
+          radius: 0.30
+        density: 80
+        mask:
+          - FlyingMobMask
+        layer:
+        - FlyingMobLayer
+  - type: DamageStateVisuals
+    states:
+      Alive:
+        Base: base
+        BaseUnshaded: unshaded
+      Dead:
+        Base: dead
+        BaseUnshaded: dead-unshaded
+  - type: MobThresholds
+    thresholds:
+      0: Alive
+      50: Dead
+  - type: MovementSpeedModifier
+    baseWalkSpeed: 5
+    baseSprintSpeed: 7
+  - type: ProjectileBatteryAmmoProvider
+    proto: WatcherBolt
+    fireCost: 50
+  - type: BatterySelfRecharger
+    autoRecharge: true
+    autoRechargeRate: 50
+  - type: Battery
+    maxCharge: 1000
+    startingCharge: 1000
+  - type: Gun
+    fireRate: 0.5
+    useKey: false
+    selectedMode: SemiAuto
+    availableModes:
+    - SemiAuto
+    soundGunshot: /Audio/Weapons/Guns/Gunshots/taser2.ogg
+  - type: CombatMode
+  - type: InteractionPopup
+    successChance: 0.3
+    interactSuccessString: petting-success-slimes
+    interactFailureString: petting-failure-generic
+    interactSuccessSound:
+      path: /Audio/Animals/lizard_happy.ogg
+  - type: CP14MagicEnergyContainer
+    magicAlert: CP14MagicEnergy
+    maxEnergy: 50
+    energy: 50
+  - type: CP14MagicEnergyDraw
+    energy: 2
+    delay: 4
+
+- type: entity
+  id: CP14MobWatcherIce
+  parent: CP14MobWatcherBase
+  name: ice watcher
+  components:
+  - type: Sprite
+    layers:
+    - map: [ "enum.DamageStateVisualLayers.Base" ]
+      state: base
+    - map: [ "enum.DamageStateVisualLayers.BaseUnshaded" ]
+      state: unshaded
+      shader: unshaded
+      color: deepskyblue
+  - type: PointLight
+    radius: 1.5
+    energy: 1
+    color: deepskyblue
+  - type: Damageable
+    damageContainer: CP14Biological
+    damageModifierSet: CP14WatcherIce
+  - type: Butcherable
+    spawned:
+    - id: CP14FoodMeatMole
+      amount: 1
+    - id: CP14ModularInlayQuartzWater
+      amount: 1
+      prob: 0.1
+
+- type: entity
+  id: CP14MobWatcherMagma
+  parent: CP14MobWatcherBase
+  name: magma watcher
+  components:
+  - type: Sprite
+    layers:
+    - map: [ "enum.DamageStateVisualLayers.Base" ]
+      state: base
+    - map: [ "enum.DamageStateVisualLayers.BaseUnshaded" ]
+      state: unshaded
+      shader: unshaded
+      color: orangered
+  - type: PointLight
+    radius: 1.5
+    energy: 1
+    color: orangered
+  - type: Damageable
+    damageContainer: CP14Biological
+    damageModifierSet: CP14WatcherFire
+  - type: ProjectileBatteryAmmoProvider
+    proto: WatcherBoltMagmawing
+    fireCost: 50
+  - type: Butcherable
+    spawned:
+    - id: CP14FoodMeatMole
+      amount: 1
+    - id: CP14ModularInlayQuartzFire
+      amount: 1
+      prob: 0.1
diff --git a/Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/Danger/mobs.yml b/Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/Danger/mobs.yml
index a8d813cd95e..f053f960fc6 100644
--- a/Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/Danger/mobs.yml
+++ b/Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/Danger/mobs.yml
@@ -203,3 +203,41 @@
       count: 3
       minGroupSize: 4
       maxGroupSize: 5
+
+- type: cp14DemiplaneModifier
+  id: MobWatcherIce
+  levels:
+    min: 1
+    max: 10
+  name: cp14-modifier-watcher
+  categories:
+    Danger: 0.3
+  requiredTags:
+  - CP14DemiplaneCold
+  blacklistTags:
+  - CP14DemiplaneHot
+  layers:
+    - !type:OreDunGen
+      entity: CP14MobSlimeBase
+      count: 2
+      minGroupSize: 2
+      maxGroupSize: 3
+
+- type: cp14DemiplaneModifier
+  id: MobWatcherMagma
+  levels:
+    min: 1
+    max: 10
+  name: cp14-modifier-watcher
+  categories:
+    Danger: 0.3
+  requiredTags:
+  - CP14DemiplaneHot
+  blacklistTags:
+  - CP14DemiplaneCold
+  layers:
+    - !type:OreDunGen
+      entity: CP14MobSlimeBase
+      count: 2
+      minGroupSize: 2
+      maxGroupSize: 3


Reviews:
user: login: copilot-pull-request-reviewer[bot]
body: ## Pull Request Overview

This PR adds adapted observers for the build in the demiplanes by introducing two new types of mob watchers—one for ice and one for magma—and their corresponding projectile and damage modifier definitions.  
- New mob watcher modifiers (ice and magma) in the demiplane modifiers file  
- New projectile entities for the ice and magma watcher bolts with distinct visual and damage properties  
- New mob watcher entities and associated damage modifier sets for both variants

### Reviewed Changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 1 comment.

| File | Description |
| ---- | ----------- |
| Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/Danger/mobs.yml | Added mob watcher modifiers for ice and magma with tag-based conditions and layer definitions. |
| Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/Projectile/projectiles.yml | Introduced projectile entities for ice and magma watcher bolts, reusing and overriding properties as needed. |
| Resources/Prototypes/_CP14/Entities/Mobs/NPC/watcher.yml | Created new base and specialized entities for mob watchers, including unique light and damage setups for ice and magma variants. |
| Resources/Prototypes/_CP14/Damage/modifier_sets.yml | Defined damage modifier sets for the ice and magma watchers to adjust damage type coefficients. |

<details>
<summary>Files not reviewed (2)</summary>

* **Resources/Locale/en-US/_CP14/demiplane/modifiers.ftl**: Language not supported
* **Resources/Locale/ru-RU/_CP14/demiplane/modifiers.ftl**: Language not supported
</details>

<details>
<summary>Comments suppressed due to low confidence (2)</summary>

**Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/Danger/mobs.yml:212**
* [nitpick] Consider using a more descriptive name (e.g. 'cp14-modifier-watcher-ice') for the ice watcher to clearly differentiate between the two types.
```
name: cp14-modifier-watcher
```
**Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/Danger/mobs.yml:231**
* [nitpick] Consider using a more descriptive name (e.g. 'cp14-modifier-watcher-magma') for the magma watcher to clearly differentiate between the two types.
```
name: cp14-modifier-watcher
```
</details>


state: COMMENTED
author_association: NONE
submitted_at: 2025-04-03T12:54:41Z
user: login: Nimfar11
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-03T14:02:56Z

Review comments:
diff_hunk: @@ -0,0 +1,59 @@
+- type: entity
+  name: ice watcher bolt
+  id: CP14WatcherBoltIce
+  parent: BaseBullet
+  categories: [ HideSpawnMenu ]
+  components:
+  - type: FlyBySound
+    sound:
+      collection: EnergyMiss
+      params:
+        volume: 5
+  - type: Sprite
+    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
+    layers:
+    - state: omnilaser
+      shader: unshaded
+  - type: Ammo
+    muzzleFlash: null
+  - type: Physics
+  - type: Fixtures
+    fixtures:
+      projectile:
+        shape:
+          !type:PhysShapeAabb
+          bounds: "-0.2,-0.2,0.2,0.2 "
path: Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/Projectile/projectiles.yml
user: login: Copilot
body: Remove the trailing whitespace in the bounds value to ensure consistent formatting and avoid potential parsing issues.
```suggestion
          bounds: "-0.2,-0.2,0.2,0.2"
```
created_at: 2025-04-03T12:54:41Z
author_association: NONE
diff_hunk: @@ -0,0 +1,59 @@
+- type: entity
+  name: ice watcher bolt
+  id: CP14WatcherBoltIce
+  parent: BaseBullet
+  categories: [ HideSpawnMenu ]
+  components:
+  - type: FlyBySound
+    sound:
+      collection: EnergyMiss
+      params:
+        volume: 5
+  - type: Sprite
+    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
+    layers:
+    - state: omnilaser
+      shader: unshaded
+  - type: Ammo
+    muzzleFlash: null
+  - type: Physics
+  - type: Fixtures
+    fixtures:
+      projectile:
+        shape:
+          !type:PhysShapeAabb
+          bounds: "-0.2,-0.2,0.2,0.2 "
path: Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/Projectile/projectiles.yml
user: login: Nimfar11
body: эх, не поможет. Этот пробел появился когда я двигал данные, думал там что-то ненравится.
created_at: 2025-04-03T14:02:56Z
author_association: CONTRIBUTOR

PR comments:
user: login: Nimfar11
created_at: 2025-04-03T11:10:18Z
body: Фикстура полная копия с оригинала, не понимаю как оно ломает. 
author_association: CONTRIBUTOR
user: login: Nimfar11
created_at: 2025-04-04T10:33:16Z
body: Заменил свой проджектайл на ванильный. В чем проблема не представляю, ведь они ПОЛНОСТЬЮ были одинаковые.
author_association: CONTRIBUTOR