Tesla Gun (#23175)
* add content * u cant pickup lightning * -5 heat damage * Update battery_guns.yml
@@ -23,7 +23,7 @@ public sealed class LightningArcShooterSystem : EntitySystem
|
||||
|
||||
private void OnShooterMapInit(EntityUid uid, LightningArcShooterComponent component, ref MapInitEvent args)
|
||||
{
|
||||
component.NextShootTime = _gameTiming.CurTime;
|
||||
component.NextShootTime = _gameTiming.CurTime + TimeSpan.FromSeconds(component.ShootMaxInterval);
|
||||
}
|
||||
|
||||
private void OnShooterUnpaused(EntityUid uid, LightningArcShooterComponent component, ref EntityUnpausedEvent args)
|
||||
|
||||
@@ -168,6 +168,35 @@
|
||||
maxCharge: 500
|
||||
startingCharge: 500
|
||||
|
||||
- type: entity
|
||||
name: tesla gun
|
||||
parent: BaseWeaponBattery
|
||||
id: WeaponTeslaGun
|
||||
description: The power of the primordial element of lightning in your hands.
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Weapons/Guns/Battery/tesla_gun.rsi
|
||||
layers:
|
||||
- state: base
|
||||
map: ["enum.GunVisualLayers.Base"]
|
||||
- state: mag-unshaded-4
|
||||
map: ["enum.GunVisualLayers.MagUnshaded"]
|
||||
shader: unshaded
|
||||
- type: Gun
|
||||
projectileSpeed: 10
|
||||
soundGunshot:
|
||||
path: /Audio/Effects/Lightning/lightningshock.ogg
|
||||
params:
|
||||
variation: 0.2
|
||||
- type: ProjectileBatteryAmmoProvider
|
||||
proto: TeslaGunBullet
|
||||
fireCost: 300
|
||||
- type: MagazineVisuals
|
||||
magState: mag
|
||||
steps: 5
|
||||
zeroVisible: true
|
||||
- type: Appearance
|
||||
|
||||
- type: entity
|
||||
name: laser rifle
|
||||
parent: BaseWeaponBattery
|
||||
|
||||
@@ -839,3 +839,36 @@
|
||||
soundHit:
|
||||
path: "/Audio/Weapons/tap.ogg"
|
||||
soundForce: true
|
||||
|
||||
- type: entity
|
||||
name: tesla gun lightning
|
||||
id: TeslaGunBullet
|
||||
parent: BaseBullet
|
||||
noSpawn: true
|
||||
components:
|
||||
- type: TimedDespawn
|
||||
lifetime: 5
|
||||
- type: Sprite
|
||||
sprite: Structures/Power/Generation/Tesla/energy_miniball.rsi
|
||||
layers:
|
||||
- state: tesla_projectile
|
||||
shader: unshaded
|
||||
- type: StaminaDamageOnCollide
|
||||
damage: 15
|
||||
- type: EmbeddableProjectile
|
||||
- type: Projectile
|
||||
deleteOnCollide: false
|
||||
soundHit:
|
||||
path: /Audio/Weapons/Guns/Hits/bullet_hit.ogg
|
||||
- type: LightningArcShooter
|
||||
arcDepth: 1
|
||||
maxLightningArc: 3
|
||||
shootMinInterval: 2.5
|
||||
shootMaxInterval: 4.5
|
||||
shootRange: 5
|
||||
lightningPrototype: Lightning
|
||||
- type: Electrified
|
||||
requirePower: false
|
||||
- type: Tag
|
||||
tags:
|
||||
- HideContextMenu
|
||||
|
||||
@@ -110,6 +110,9 @@
|
||||
- proto: WaterTankHighCapacity
|
||||
- proto: WeldingFuelTankHighCapacity
|
||||
cost: 3
|
||||
- proto: WeaponTeslaGun
|
||||
prob: 0.1
|
||||
cost: 2
|
||||
|
||||
# Mob loot table
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 569 B |
|
After Width: | Height: | Size: 666 B |
|
After Width: | Height: | Size: 660 B |
|
After Width: | Height: | Size: 139 B |
|
After Width: | Height: | Size: 205 B |
|
After Width: | Height: | Size: 202 B |
|
After Width: | Height: | Size: 196 B |
|
After Width: | Height: | Size: 199 B |
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"version": 1,
|
||||
"license": "CC-BY-SA-3.0",
|
||||
"copyright": "taken from TGStation on commit https://github.com/tgstation/tgstation/commit/26818af618762ff52319b3417be8cdc1279e99b7",
|
||||
"size": {
|
||||
"x": 32,
|
||||
"y": 32
|
||||
},
|
||||
"states": [
|
||||
{
|
||||
"name": "base"
|
||||
},
|
||||
{
|
||||
"name": "inhand-left",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "inhand-right",
|
||||
"directions": 4
|
||||
},
|
||||
{
|
||||
"name": "mag-unshaded-0",
|
||||
"delays": [
|
||||
[
|
||||
0.3,
|
||||
0.3
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "mag-unshaded-1"
|
||||
},
|
||||
{
|
||||
"name": "mag-unshaded-2"
|
||||
},
|
||||
{
|
||||
"name": "mag-unshaded-3"
|
||||
},
|
||||
{
|
||||
"name": "mag-unshaded-4"
|
||||
}
|
||||
]
|
||||
}
|
||||