Using a gun whilst cloaked will decloak you. (#8317)

This commit is contained in:
mikomyazaki
2020-02-23 05:45:02 +00:00
committed by GitHub
parent ba57a51843
commit 1f30e4675d
3 changed files with 28 additions and 10 deletions

View File

@@ -83,16 +83,21 @@
A.visible_message("[user] sprays [A] with [src].")
reagents.splash(A, amount_per_transfer_from_this)
else
spawn(0)
var/obj/effect/effect/water/chempuff/D = new/obj/effect/effect/water/chempuff(get_turf(src))
var/turf/my_target = get_turf(A)
D.create_reagents(amount_per_transfer_from_this)
if(!src)
return
reagents.trans_to_obj(D, amount_per_transfer_from_this)
D.set_color()
D.set_up(my_target, spray_size, 10)
return
var/obj/effect/effect/water/chempuff/D = new/obj/effect/effect/water/chempuff(get_turf(src))
var/turf/my_target = get_turf(A)
D.create_reagents(amount_per_transfer_from_this)
if(!src)
return
reagents.trans_to_obj(D, amount_per_transfer_from_this)
D.set_color()
D.set_up(my_target, spray_size, 10)
if(ishuman(user) && user.invisibility == INVISIBILITY_LEVEL_TWO) //shooting will disable a rig cloaking device
var/mob/living/carbon/human/H = user
if(istype(H.back,/obj/item/rig))
var/obj/item/rig/R = H.back
for(var/obj/item/rig_module/stealth_field/S in R.installed_modules)
S.deactivate()
/obj/item/reagent_containers/spray/attack_self(var/mob/user)
if(!possible_transfer_amounts)