Fixing Charging bugs and Breeder bugs (#1296)

Breeders now need to breathe again.
Sanity check for any gun that requires charging has been added. It's not been added to the master special_check and firing procs yet because weapons that need to charge remain fairly edge case.
This commit is contained in:
LordFowl
2016-12-25 20:50:12 +02:00
committed by skull132
parent 93600f51b5
commit f1897e2ffb
5 changed files with 43 additions and 21 deletions
+1
View File
@@ -64,6 +64,7 @@
var/list/burst_accuracy = list(0) //allows for different accuracies for each shot in a burst. Applied on top of accuracy
var/list/dispersion = list(0)
var/next_fire_time = 0
var/sel_mode = 1 //index of the currently selected mode
@@ -22,7 +22,7 @@
item_state = "ionrifle-empty"
else
item_state = initial(item_state)
/obj/item/weapon/gun/energy/ionrifle/mounted
name = "mounted ion rifle"
self_recharge = 1
@@ -170,6 +170,7 @@
/obj/item/weapon/gun/energy/vaurca
name = "Alien Firearm"
desc = "Vaurcae weapons tend to be specialized and highly lethal. This one doesn't do much"
var/is_charging = 0 //special var for sanity checks in the three guns that currently use charging as a special_check
/obj/item/weapon/gun/energy/vaurca/bfg
name = "BFG 9000"
@@ -232,6 +233,9 @@
/obj/item/weapon/gun/energy/vaurca/gatlinglaser/special_check(var/mob/user)
..()
if(is_charging)
user << "<span class='danger'>\The [src] is already spinning!</span>"
return 0
if(!wielded)
user << "<span class='danger'>You cannot fire this weapon with just one hand!</span>"
return 0
@@ -241,7 +245,11 @@
"<span class='danger'>You begin spinning [src]'s barrels!</span>",
"<span class='danger'>You hear the spin of a rotary gun!</span>"
)
is_charging = 1
sleep(30)
is_charging = 0
if(!istype(user.get_active_hand(), src))
return
msg_admin_attack("[key_name_admin(user)] shot with \a [src.type] [key_name_admin(src)]'s target (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
return 1
@@ -319,6 +327,9 @@
/obj/item/weapon/gun/energy/vaurca/typec/special_check(var/mob/user)
..()
if(is_charging)
user << "<span class='danger'>\The [src] is already charging!</span>"
return 0
if(!wielded)
user << "<span class='danger'>You could never fire this weapon with merely one hand!</span>"
return 0
@@ -328,7 +339,11 @@
"<span class='danger'>You begin charging the [src]!</span>",
"<span class='danger'>You hear a low pulsing roar!</span>"
)
is_charging = 1
sleep(90)
is_charging = 0
if(!istype(user.get_active_hand(), src))
return
msg_admin_attack("[key_name_admin(user)] shot with \a [src.type] [key_name_admin(src)]'s target (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
return 1
@@ -402,6 +417,9 @@
/obj/item/weapon/gun/energy/vaurca/thermaldrill/special_check(var/mob/user)
..()
if(is_charging)
user << "<span class='danger'>\The [src] is already charging!</span>"
return 0
if(!wielded)
user << "<span class='danger'>You cannot fire this weapon with just one hand!</span>"
return 0
@@ -411,7 +429,11 @@
"<span class='danger'>You begin charging the [src]!</span>",
"<span class='danger'>You hear a low pulsing roar!</span>"
)
is_charging = 1
sleep(90)
is_charging = 0
if(!istype(user.get_active_hand(), src))
return
msg_admin_attack("[key_name_admin(user)] shot with \a [src.type] [key_name_admin(src)]'s target (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)")
return 1