]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add debug hitscan weapon (#41658)
authorslarticodefast <161409025+slarticodefast@users.noreply.github.com>
Mon, 1 Dec 2025 18:03:39 +0000 (19:03 +0100)
committerGitHub <noreply@github.com>
Mon, 1 Dec 2025 18:03:39 +0000 (18:03 +0000)
* debug gun

* predict

Resources/Prototypes/Entities/Debugging/debug_sweps.yml
Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/hitscan.yml
Resources/Textures/Objects/Weapons/Guns/Projectiles/projectiles.rsi/debug.png [new file with mode: 0644]
Resources/Textures/Objects/Weapons/Guns/Projectiles/projectiles.rsi/impact_debug.png [new file with mode: 0644]
Resources/Textures/Objects/Weapons/Guns/Projectiles/projectiles.rsi/meta.json
Resources/Textures/Objects/Weapons/Guns/Projectiles/projectiles.rsi/muzzle_debug.png [new file with mode: 0644]

index a71548ebee49989a4062ae0bdd1b0b8ff6b77626..6a8c8a5d0250f66c787cb23de6a24bef6c451385 100644 (file)
@@ -1,3 +1,34 @@
+- type: entity
+  name: bang hitscan 1dmg
+  parent: BaseWeaponBatterySmall
+  id: WeaponHitscanDebug
+  description: pew pew!
+  suffix: DEBUG
+  components:
+  - type: Sprite
+    sprite: Objects/Weapons/Guns/Pistols/debug.rsi
+    state: icon
+  - type: Clothing
+    sprite: Objects/Weapons/Guns/Pistols/debug.rsi
+  - type: Gun
+    fireRate: 10
+    availableModes:
+    - SemiAuto
+    - FullAuto
+  - type: BatteryAmmoProvider
+    proto: DebugLaser
+    fireCost: 1
+  - type: PredictedBatterySelfRecharger
+    autoRechargeRate: 1000
+
+- type: entity
+  name: bang hitscan gibber
+  parent: WeaponHitscanDebug
+  id: WeaponHitscanDebugGib
+  components:
+  - type: BatteryAmmoProvider
+    proto: DebugLaserGib
+
 - type: entity
   name: bang, ded
   parent: BaseWeaponPistol
index bc3e8f383c5556bce571f8bcff7ac6c37f937d55..ef5ee8ea82cf20a66e1652c54257190de07a1c60 100644 (file)
     impactFlash:
       sprite: Objects/Weapons/Guns/Projectiles/projectiles.rsi
       state: impact_beam_heavy2
+
+- type: entity
+  parent: BasicHitscan
+  id: DebugLaser
+  suffix: DEBUG
+  categories: [ HideSpawnMenu ]
+  components:
+  - type: HitscanBasicDamage
+    damage:
+      types:
+        Heat: 1
+  - type: HitscanBasicVisuals
+    muzzleFlash:
+      sprite: Objects/Weapons/Guns/Projectiles/projectiles.rsi
+      state: muzzle_debug
+    travelFlash:
+      sprite: Objects/Weapons/Guns/Projectiles/projectiles.rsi
+      state: debug
+    impactFlash:
+      sprite: Objects/Weapons/Guns/Projectiles/projectiles.rsi
+      state: impact_debug
+
+- type: entity
+  parent: DebugLaser
+  id: DebugLaserGib
+  suffix: DEBUG
+  categories: [ HideSpawnMenu ]
+  components:
+  - type: HitscanBasicDamage
+    damage:
+      types:
+        Blunt: 20000
diff --git a/Resources/Textures/Objects/Weapons/Guns/Projectiles/projectiles.rsi/debug.png b/Resources/Textures/Objects/Weapons/Guns/Projectiles/projectiles.rsi/debug.png
new file mode 100644 (file)
index 0000000..6ffc146
Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Projectiles/projectiles.rsi/debug.png differ
diff --git a/Resources/Textures/Objects/Weapons/Guns/Projectiles/projectiles.rsi/impact_debug.png b/Resources/Textures/Objects/Weapons/Guns/Projectiles/projectiles.rsi/impact_debug.png
new file mode 100644 (file)
index 0000000..94efda5
Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Projectiles/projectiles.rsi/impact_debug.png differ
index 0a835a14d76d16f0c4a17a607bbcaff732d70d7f..2c1c23dec927222cb8a1c2345ac367ae02ff9476 100644 (file)
@@ -1,7 +1,7 @@
 {
   "version": 1,
   "license": "CC-BY-SA-3.0",
-  "copyright": "Taken and modified from cev-eris at https://github.com/discordia-space/CEV-Eris/tree/7ff8f28ea4de734f3cc3cb70f2d4e4b4263a988d",
+  "copyright": "Taken and modified from cev-eris at https://github.com/discordia-space/CEV-Eris/tree/7ff8f28ea4de734f3cc3cb70f2d4e4b4263a988d, debug sprites by slarticodefast(GitHub)",
   "size": {
     "x": 32,
     "y": 32
     {
       "name": "bolt"
     },
+    {
+      "name": "muzzle_debug"
+    },
+    {
+      "name": "debug"
+    },
+    {
+      "name": "impact_debug"
+    },
     {
       "name": "muzzle_bullet"
     },
diff --git a/Resources/Textures/Objects/Weapons/Guns/Projectiles/projectiles.rsi/muzzle_debug.png b/Resources/Textures/Objects/Weapons/Guns/Projectiles/projectiles.rsi/muzzle_debug.png
new file mode 100644 (file)
index 0000000..3a5ebd7
Binary files /dev/null and b/Resources/Textures/Objects/Weapons/Guns/Projectiles/projectiles.rsi/muzzle_debug.png differ