mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-14 04:02:31 +00:00
Merge pull request #9069 from RavingManiac/dev
Muzzle-flash lighting effect for guns
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
var/fire_sound_text = "gunshot"
|
||||
var/recoil = 0 //screen shake
|
||||
var/silenced = 0
|
||||
var/muzzle_flash = 3
|
||||
var/accuracy = 0 //accuracy is measured in tiles. +1 accuracy means that everything is effectively one tile closer for the purpose of miss chance, -1 means the opposite. launchers are not supported, at the moment.
|
||||
var/scoped_accuracy = null
|
||||
|
||||
@@ -245,6 +246,12 @@
|
||||
"You hear a [fire_sound_text]!"
|
||||
)
|
||||
|
||||
if(muzzle_flash)
|
||||
var/turf/T_user = get_turf(user)
|
||||
var/turf/T_target = get_turf(target)
|
||||
var/obj/effect/effect/smoke/illumination/I = new /obj/effect/effect/smoke/illumination(get_step(T_user, get_dir(T_user,T_target)), brightness=muzzle_flash, lifetime=8)
|
||||
I.alpha = 0
|
||||
|
||||
if(recoil)
|
||||
spawn()
|
||||
shake_camera(user, recoil+1, recoil)
|
||||
|
||||
@@ -93,6 +93,12 @@
|
||||
return suit.cell
|
||||
return null
|
||||
|
||||
/obj/item/weapon/gun/energy/examine(mob/user)
|
||||
..(user)
|
||||
var/shots_remaining = round(power_supply.charge / charge_cost)
|
||||
user << "Has [shots_remaining] shot\s remaining."
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/update_icon()
|
||||
if(charge_meter)
|
||||
var/ratio = power_supply.charge / power_supply.maxcharge
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
var/release_force = 0
|
||||
var/throw_distance = 10
|
||||
muzzle_flash = 0
|
||||
fire_sound_text = "a launcher firing"
|
||||
|
||||
//This normally uses a proc on projectiles and our ammo is not strictly speaking a projectile.
|
||||
|
||||
5
html/changelogs/RavingManiac-dev.yml
Normal file
5
html/changelogs/RavingManiac-dev.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
author: RavingManiac
|
||||
delete-after: true
|
||||
changes:
|
||||
- rscadd: "Muzzle-flash lighting effect for guns"
|
||||
- rscadd: "Energy guns now display shots remaining on examine"
|
||||
Reference in New Issue
Block a user