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)
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
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
- proto: WaterTankHighCapacity
- proto: WeldingFuelTankHighCapacity
cost: 3
+ - proto: WeaponTeslaGun
+ prob: 0.1
+ cost: 2
# Mob loot table
--- /dev/null
+{
+ "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"
+ }
+ ]
+}
\ No newline at end of file