Comments out the automatic firemode code (#4748)

This commit is contained in:
Anewbe
2018-02-07 11:59:42 -06:00
committed by Atermonera
parent 54d7537f9c
commit 442b5cbdf6
4 changed files with 36 additions and 10 deletions

View File

@@ -180,6 +180,11 @@
user << "<span class='warning'>You refrain from firing your [src] as your intent is set to help.</span>"
return
else
Fire(A, user, params) //Otherwise, fire normally.
return
/* //Commented out for quality control and testing
if(automatic == 1)//Are we are going to be using automatic shooting
//We check to make sure they can fire
if(!special_check(user))
@@ -195,6 +200,7 @@
to_chat(user, "<span class='notice'>You ready \the [src]! Click and drag the target around to shoot.</span>")
return
Fire(A,user,params) //Otherwise, fire normally.
*/
/obj/item/weapon/gun/attack(atom/A, mob/living/user, def_zone)
if (A == user && user.zone_sel.selecting == O_MOUTH && !mouthshoot)
@@ -294,8 +300,11 @@
return
var/shoot_time = (burst - 1)* burst_delay
//user.setClickCooldown(shoot_time) //no clicking on things while shooting //These are currently disabled to allow for the automatic system to function without causing near-permanant paralysis.
//user.setMoveCooldown(shoot_time) //no moving while shooting either
//These should apparently be disabled to allow for the automatic system to function without causing near-permanant paralysis. Re-enabling them while we sort that out.
user.setClickCooldown(shoot_time) //no clicking on things while shooting
user.setMoveCooldown(shoot_time) //no moving while shooting either
next_fire_time = world.time + shoot_time
var/held_acc_mod = 0
@@ -307,14 +316,17 @@
//actually attempt to shoot
var/turf/targloc = get_turf(target) //cache this in case target gets deleted during shooting, e.g. if it was a securitron that got destroyed.
/* // Commented out for quality control and testing.
shooting = 1
if(automatic == 1 && auto_target && auto_target.active)//When we are going to shoot and have an auto_target AND its active meaning we clicked on it we tell it to burstfire 1000 rounds
burst = 1000//Yes its not EXACTLY full auto but when are we shooting more than 1000 normally and it can easily be made higher
*/
for(var/i in 1 to burst)
/* // Commented out for quality control and testing.
if(!reflex && automatic)//If we are shooting automatic then check our target, however if we are shooting reflex we dont use automatic
//extra sanity checking.
if(user.paralysis >= 1)
if(user.incapacitated())
return
if(user.get_active_hand() != src)
break
@@ -324,6 +336,7 @@
//Lastly just update our dir if needed
if(user.dir != get_dir(user, auto_target))
user.face_atom(auto_target)
*/
var/obj/projectile = consume_next_projectile(user)
if(!projectile)
handle_click_empty(user)
@@ -348,7 +361,10 @@
pointblank = 0
last_shot = world.time
/* // Commented out for quality control and testing.
shooting = 0
*/
// We do this down here, so we don't get the message if we fire an empty gun.
if(requires_two_hands)
if(user.item_is_in_hands(src) && user.hands_are_full())

View File

@@ -1,3 +1,6 @@
//This entire file is unticked for quality control and testing
//True automagic gun modes. Dakka dakka.
//A significant portion of this code was donated by Mport from SS:CM
@@ -35,7 +38,7 @@
autodel()
return
if(gun.shooting == 0)
del(src)
qdel(src)
else
autodel()//Yes in theory this could hit the inf loop
return
@@ -55,15 +58,15 @@
if(over_location != loc)//This updates the loc to our new location when we drag it to a new turf
loc = over_location
if((usr.get_active_hand() != gun))
del(src)
qdel(src)
//This gets rid of us when they let go of the click, but only after they actually drag the target to a new turf which is why the below also has to exist
/obj/screen/auto_target/MouseDrop(over_object,src_location,over_location,src_control,over_control,params)
del(src)
qdel(src)
return
//This is needed so if they just MouseDown and then let go it will stop shooting, otherwise we stick around till they run out of bullets
/obj/screen/auto_target/MouseUp(object,location,control,params)
del(src)
qdel(src)
return
//This pseudo code is being left in place to serve as references to the modifications to gun.dm, the Fire() proc, and the afterattack() proc. -k22

View File

@@ -190,14 +190,22 @@
one_handed_penalty = 6
var/cover_open = 0
/* Commented out for quality control and testing.
firemodes = list(
list(mode_name="semiauto", burst=1, fire_delay=0, move_delay=null, burst_accuracy=null, dispersion=null, automatic = 0),
list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 1.0), automatic = 0),
list(mode_name="short bursts", burst=5, move_delay=6, burst_accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.6, 1.0, 1.0, 1.0, 1.2), automatic = 0),
list(mode_name="automatic", burst=1, fire_delay=-1, move_delay=null, burst_accuracy=null, dispersion=null, automatic = 1),
)
*/
var/cover_open = 0
firemodes = list(
list(mode_name="semiauto", burst=1, fire_delay=0, move_delay=null, burst_accuracy=null, dispersion=null),
list(mode_name="3-round bursts", burst=3, fire_delay=null, move_delay=4, burst_accuracy=list(0,-1,-1), dispersion=list(0.0, 0.6, 1.0)),
list(mode_name="short bursts", burst=5, move_delay=6, burst_accuracy = list(0,-1,-1,-2,-2), dispersion = list(0.6, 1.0, 1.0, 1.0, 1.2)),
)
/obj/item/weapon/gun/projectile/automatic/l6_saw/special_check(mob/user)
if(cover_open)