From f3d20ced796cd936a55bd402db1df06624890896 Mon Sep 17 00:00:00 2001 From: Doubleumc Date: Wed, 8 Nov 2023 05:58:44 -0500 Subject: [PATCH] minor reorganization --- code/modules/vehicles/apc/apc.dm | 6 +- .../vehicles/hardpoints/holder/tank_turret.dm | 59 ++----------------- .../vehicles/hardpoints/primary/autocannon.dm | 5 +- .../hardpoints/primary/dual_cannon.dm | 5 +- .../vehicles/hardpoints/primary/flamer.dm | 3 +- .../vehicles/hardpoints/primary/ltb.dm | 7 +-- .../vehicles/hardpoints/primary/minigun.dm | 5 +- .../vehicles/hardpoints/secondary/cupola.dm | 9 ++- .../vehicles/hardpoints/secondary/flamer.dm | 3 +- .../hardpoints/secondary/frontal_cannon.dm | 5 +- .../hardpoints/secondary/grenade_launcher.dm | 3 +- .../vehicles/hardpoints/secondary/tow.dm | 7 +-- .../hardpoints/special/firing_port_weapon.dm | 5 +- .../vehicles/hardpoints/support/flare.dm | 7 +-- 14 files changed, 26 insertions(+), 103 deletions(-) diff --git a/code/modules/vehicles/apc/apc.dm b/code/modules/vehicles/apc/apc.dm index 67d5c30fbf..f7f5f32105 100644 --- a/code/modules/vehicles/apc/apc.dm +++ b/code/modules/vehicles/apc/apc.dm @@ -110,7 +110,6 @@ GLOBAL_LIST_EMPTY(command_apc_list) /obj/vehicle/multitile/proc/activate_horn, /obj/vehicle/multitile/proc/switch_hardpoint, /obj/vehicle/multitile/proc/cycle_hardpoint, - ///obj/vehicle/multitile/proc/cycle_firemode, /obj/vehicle/multitile/proc/name_vehicle )) else if(seat == VEHICLE_GUNNER) @@ -140,15 +139,14 @@ GLOBAL_LIST_EMPTY(command_apc_list) /obj/vehicle/multitile/proc/activate_horn, /obj/vehicle/multitile/proc/switch_hardpoint, /obj/vehicle/multitile/proc/cycle_hardpoint, - ///obj/vehicle/multitile/proc/cycle_firemode, - /obj/vehicle/multitile/proc/name_vehicle + /obj/vehicle/multitile/proc/name_vehicle, )) else if(seat == VEHICLE_GUNNER) remove_verb(M.client, list( /obj/vehicle/multitile/proc/switch_hardpoint, /obj/vehicle/multitile/proc/cycle_hardpoint, /obj/vehicle/multitile/proc/toggle_shift_click, - /obj/vehicle/multitile/proc/name_vehicle + /obj/vehicle/multitile/proc/name_vehicle, )) else if(seat == VEHICLE_SUPPORT_GUNNER_ONE || seat == VEHICLE_SUPPORT_GUNNER_TWO) remove_verb(M.client, list( diff --git a/code/modules/vehicles/hardpoints/holder/tank_turret.dm b/code/modules/vehicles/hardpoints/holder/tank_turret.dm index 75118562e7..896628e609 100644 --- a/code/modules/vehicles/hardpoints/holder/tank_turret.dm +++ b/code/modules/vehicles/hardpoints/holder/tank_turret.dm @@ -13,7 +13,6 @@ density = TRUE //come on, it's huge activatable = TRUE - //accuracy = 0.8 ammo = new /obj/item/ammo_magazine/hardpoint/turret_smoke max_clips = 2 @@ -59,14 +58,14 @@ // Used during the windup var/rotating = FALSE - burst_amount = 2 - burst_delay = 1.0 SECONDS - extra_delay = 13.0 SECONDS + scatter = 4 gun_firemode = GUN_FIREMODE_BURSTFIRE gun_firemode_list = list( GUN_FIREMODE_BURSTFIRE, ) - scatter = 4 + burst_amount = 2 + burst_delay = 1.0 SECONDS + extra_delay = 13.0 SECONDS /obj/item/hardpoint/holder/tank_turret/update_icon() var/broken = (health <= 0) @@ -218,53 +217,3 @@ var/origin_turf = ..() origin_turf = get_step(get_step(origin_turf, owner.dir), owner.dir) //this should get us tile in front of tank to prevent grenade being stuck under us. return origin_turf - -/* -/obj/item/hardpoint/holder/tank_turret/fire(mob/user, atom/A) - if(ammo.current_rounds <= 0) - return - - next_use = world.time + cooldown - - var/turf/L - var/turf/R - switch(owner.dir) - if(NORTH) - L = locate(owner.x - 2, owner.y + 4, owner.z) - R = locate(owner.x + 2, owner.y + 4, owner.z) - if(SOUTH) - L = locate(owner.x + 2, owner.y - 4, owner.z) - R = locate(owner.x - 2, owner.y - 4, owner.z) - if(EAST) - L = locate(owner.x + 4, owner.y + 2, owner.z) - R = locate(owner.x + 4, owner.y - 2, owner.z) - else - L = locate(owner.x - 4, owner.y + 2, owner.z) - R = locate(owner.x - 4, owner.y - 2, owner.z) - - if(LAZYLEN(activation_sounds)) - playsound(get_turf(src), pick(activation_sounds), 60, 1) - fire_projectile(user, L) - - sleep(10) - - if(LAZYLEN(activation_sounds)) - playsound(get_turf(src), pick(activation_sounds), 60, 1) - fire_projectile(user, R) - - to_chat(user, SPAN_WARNING("Smoke Screen uses left: [SPAN_HELPFUL(ammo ? ammo.current_rounds / 2 : 0)]/[SPAN_HELPFUL(ammo ? ammo.max_rounds / 2 : 0)] | Mags: [SPAN_HELPFUL(LAZYLEN(backup_clips))]/[SPAN_HELPFUL(max_clips)]")) -*/ - -/* -/obj/item/hardpoint/holder/tank_turret/fire_projectile(mob/user, atom/A) - set waitfor = 0 - - var/turf/origin_turf = get_turf(src) - origin_turf = locate(origin_turf.x + origins[1], origin_turf.y + origins[2], origin_turf.z) - origin_turf = get_step(get_step(origin_turf, owner.dir), owner.dir) //this should get us tile in front of tank to prevent grenade being stuck under us. - - var/obj/projectile/P = generate_bullet(user, origin_turf) - SEND_SIGNAL(P, COMSIG_BULLET_USER_EFFECTS, owner.seats[VEHICLE_GUNNER]) - P.fire_at(A, owner.seats[VEHICLE_GUNNER], src, get_dist(origin_turf, A) + 1, P.ammo.shell_speed) - ammo.current_rounds-- -*/ diff --git a/code/modules/vehicles/hardpoints/primary/autocannon.dm b/code/modules/vehicles/hardpoints/primary/autocannon.dm index 2e74533e7a..b6dc2cedc6 100644 --- a/code/modules/vehicles/hardpoints/primary/autocannon.dm +++ b/code/modules/vehicles/hardpoints/primary/autocannon.dm @@ -8,7 +8,6 @@ activation_sounds = list('sound/weapons/vehicles/autocannon_fire.ogg') health = 500 - //accuracy = 0.98 firing_arc = 60 origins = list(0, -3) @@ -23,9 +22,9 @@ "8" = list(-32, 0) ) - fire_delay = 0.7 SECONDS + scatter = 1 gun_firemode = GUN_FIREMODE_AUTOMATIC gun_firemode_list = list( GUN_FIREMODE_AUTOMATIC, ) - scatter = 1 + fire_delay = 0.7 SECONDS diff --git a/code/modules/vehicles/hardpoints/primary/dual_cannon.dm b/code/modules/vehicles/hardpoints/primary/dual_cannon.dm index cdcc39a95f..b76e6ad5cf 100644 --- a/code/modules/vehicles/hardpoints/primary/dual_cannon.dm +++ b/code/modules/vehicles/hardpoints/primary/dual_cannon.dm @@ -12,7 +12,6 @@ damage_multiplier = 0.2 health = 500 - //accuracy = 0.98 firing_arc = 60 origins = list(0, -2) @@ -33,12 +32,12 @@ "8" = list(14, 9) ) - fire_delay = 0.3 SECONDS + scatter = 1 gun_firemode = GUN_FIREMODE_AUTOMATIC gun_firemode_list = list( GUN_FIREMODE_AUTOMATIC, ) - scatter = 1 + fire_delay = 0.3 SECONDS /obj/item/hardpoint/primary/dualcannon/set_bullet_traits() ..() diff --git a/code/modules/vehicles/hardpoints/primary/flamer.dm b/code/modules/vehicles/hardpoints/primary/flamer.dm index 6475a331ff..13beee9dd2 100644 --- a/code/modules/vehicles/hardpoints/primary/flamer.dm +++ b/code/modules/vehicles/hardpoints/primary/flamer.dm @@ -8,7 +8,6 @@ activation_sounds = list('sound/weapons/vehicles/flamethrower.ogg') health = 400 - //accuracy = 0.75 firing_arc = 90 origins = list(0, -3) @@ -25,8 +24,8 @@ use_muzzle_flash = FALSE - fire_delay = 2.0 SECONDS scatter = 5 + fire_delay = 2.0 SECONDS /obj/item/hardpoint/primary/flamer/set_bullet_traits() ..() diff --git a/code/modules/vehicles/hardpoints/primary/ltb.dm b/code/modules/vehicles/hardpoints/primary/ltb.dm index b31fe533d2..19b5c7e7b9 100644 --- a/code/modules/vehicles/hardpoints/primary/ltb.dm +++ b/code/modules/vehicles/hardpoints/primary/ltb.dm @@ -8,7 +8,6 @@ activation_sounds = list('sound/weapons/vehicles/cannon_fire1.ogg', 'sound/weapons/vehicles/cannon_fire2.ogg') health = 500 - //accuracy = 0.97 firing_arc = 60 origins = list(0, -3) @@ -30,9 +29,5 @@ "8" = list(-89, -4) ) - fire_delay = 20.0 SECONDS - gun_firemode = GUN_FIREMODE_SEMIAUTO - gun_firemode_list = list( - GUN_FIREMODE_SEMIAUTO, - ) scatter = 2 + fire_delay = 20.0 SECONDS diff --git a/code/modules/vehicles/hardpoints/primary/minigun.dm b/code/modules/vehicles/hardpoints/primary/minigun.dm index 5d89aea545..b4d4de4cf2 100644 --- a/code/modules/vehicles/hardpoints/primary/minigun.dm +++ b/code/modules/vehicles/hardpoints/primary/minigun.dm @@ -7,7 +7,6 @@ disp_icon_state = "ltaaap_minigun" health = 350 - //accuracy = 0.6 firing_arc = 90 origins = list(0, -3) @@ -29,12 +28,12 @@ "8" = list(-77, 0) ) - fire_delay = 0.8 SECONDS + scatter = 7 gun_firemode = GUN_FIREMODE_AUTOMATIC gun_firemode_list = list( GUN_FIREMODE_AUTOMATIC, ) - scatter = 7 + fire_delay = 0.8 SECONDS //var/start_sound = 'sound/weapons/vehicles/minigun_start.ogg' //var/loop_sound = 'sound/weapons/vehicles/minigun_loop.ogg' diff --git a/code/modules/vehicles/hardpoints/secondary/cupola.dm b/code/modules/vehicles/hardpoints/secondary/cupola.dm index 9fbc6b379d..f259d6ea26 100644 --- a/code/modules/vehicles/hardpoints/secondary/cupola.dm +++ b/code/modules/vehicles/hardpoints/secondary/cupola.dm @@ -8,7 +8,6 @@ activation_sounds = list('sound/weapons/gun_smartgun1.ogg', 'sound/weapons/gun_smartgun2.ogg', 'sound/weapons/gun_smartgun3.ogg', 'sound/weapons/gun_smartgun4.ogg') health = 350 - //accuracy = 0.9 firing_arc = 120 origins = list(0, -2) @@ -23,14 +22,14 @@ "8" = list(-5, 7) ) - burst_amount = 3 - burst_delay = 0.3 SECONDS - extra_delay = 0.6 SECONDS + scatter = 3 gun_firemode = GUN_FIREMODE_BURSTFIRE gun_firemode_list = list( GUN_FIREMODE_BURSTFIRE, ) - scatter = 3 + burst_amount = 3 + burst_delay = 0.3 SECONDS + extra_delay = 0.6 SECONDS /obj/item/hardpoint/secondary/m56cupola/set_bullet_traits() ..() diff --git a/code/modules/vehicles/hardpoints/secondary/flamer.dm b/code/modules/vehicles/hardpoints/secondary/flamer.dm index 1bc9f52b1e..5557cfb24e 100644 --- a/code/modules/vehicles/hardpoints/secondary/flamer.dm +++ b/code/modules/vehicles/hardpoints/secondary/flamer.dm @@ -8,7 +8,6 @@ activation_sounds = list('sound/weapons/vehicles/flamethrower.ogg') health = 300 - //accuracy = 0.68 firing_arc = 120 origins = list(0, -2) @@ -26,8 +25,8 @@ "4" = list(3, 0), "8" = list(-3, 18) ) - scatter = 6 + scatter = 6 fire_delay = 3.0 SECONDS /obj/item/hardpoint/secondary/small_flamer/handle_fire(atom/target, mob/living/user, params) diff --git a/code/modules/vehicles/hardpoints/secondary/frontal_cannon.dm b/code/modules/vehicles/hardpoints/secondary/frontal_cannon.dm index 706d609d7d..f80a1e81af 100644 --- a/code/modules/vehicles/hardpoints/secondary/frontal_cannon.dm +++ b/code/modules/vehicles/hardpoints/secondary/frontal_cannon.dm @@ -11,7 +11,6 @@ damage_multiplier = 0.11 health = 350 - //accuracy = 0.8 firing_arc = 120 origins = list(0, -2) @@ -32,12 +31,12 @@ "8" = list(-62, -26) ) - fire_delay = 0.3 SECONDS + scatter = 4 gun_firemode = GUN_FIREMODE_AUTOMATIC gun_firemode_list = list( GUN_FIREMODE_AUTOMATIC, ) - scatter = 4 + fire_delay = 0.3 SECONDS /obj/item/hardpoint/secondary/frontalcannon/set_bullet_traits() ..() diff --git a/code/modules/vehicles/hardpoints/secondary/grenade_launcher.dm b/code/modules/vehicles/hardpoints/secondary/grenade_launcher.dm index ca4915a40d..efd151e93c 100644 --- a/code/modules/vehicles/hardpoints/secondary/grenade_launcher.dm +++ b/code/modules/vehicles/hardpoints/secondary/grenade_launcher.dm @@ -8,7 +8,6 @@ activation_sounds = list('sound/weapons/gun_m92_attachable.ogg') health = 500 - //accuracy = 0.4 firing_arc = 90 var/max_range = 7 @@ -25,8 +24,8 @@ "4" = list(6, 0), "8" = list(-6, 17) ) - scatter = 10 + scatter = 10 fire_delay = 3.0 SECONDS /obj/item/hardpoint/secondary/grenade_launcher/set_bullet_traits() diff --git a/code/modules/vehicles/hardpoints/secondary/tow.dm b/code/modules/vehicles/hardpoints/secondary/tow.dm index f9697b9404..7c58f7970c 100644 --- a/code/modules/vehicles/hardpoints/secondary/tow.dm +++ b/code/modules/vehicles/hardpoints/secondary/tow.dm @@ -7,7 +7,6 @@ disp_icon_state = "towlauncher" health = 500 - //accuracy = 0.8 firing_arc = 60 origins = list(0, -2) @@ -29,10 +28,6 @@ "8" = list(-5, 10) ) - fire_delay = 15.0 SECONDS - gun_firemode = GUN_FIREMODE_SEMIAUTO - gun_firemode_list = list( - GUN_FIREMODE_SEMIAUTO, - ) scatter = 4 + fire_delay = 15.0 SECONDS diff --git a/code/modules/vehicles/hardpoints/special/firing_port_weapon.dm b/code/modules/vehicles/hardpoints/special/firing_port_weapon.dm index 4e333869bf..780c195f00 100644 --- a/code/modules/vehicles/hardpoints/special/firing_port_weapon.dm +++ b/code/modules/vehicles/hardpoints/special/firing_port_weapon.dm @@ -10,7 +10,6 @@ activation_sounds = list('sound/weapons/gun_smartgun1.ogg', 'sound/weapons/gun_smartgun2.ogg', 'sound/weapons/gun_smartgun3.ogg', 'sound/weapons/gun_smartgun4.ogg') health = 100 - //accuracy = 0.9 firing_arc = 120 //FPWs reload automatically var/reloading = FALSE @@ -28,12 +27,12 @@ underlayer_north_muzzleflash = TRUE - fire_delay = 0.3 SECONDS + scatter = 3 gun_firemode = GUN_FIREMODE_AUTOMATIC gun_firemode_list = list( GUN_FIREMODE_AUTOMATIC, ) - scatter = 3 + fire_delay = 0.3 SECONDS /obj/item/hardpoint/special/firing_port_weapon/set_bullet_traits() ..() diff --git a/code/modules/vehicles/hardpoints/support/flare.dm b/code/modules/vehicles/hardpoints/support/flare.dm index 20f3a0f16a..186b6bbaf5 100644 --- a/code/modules/vehicles/hardpoints/support/flare.dm +++ b/code/modules/vehicles/hardpoints/support/flare.dm @@ -13,7 +13,6 @@ activatable = TRUE health = 500 - //accuracy = 0.7 firing_arc = 120 origins = list(0, -2) @@ -34,12 +33,8 @@ "8" = list(14, -6) ) - fire_delay = 3.0 SECONDS - gun_firemode = GUN_FIREMODE_SEMIAUTO - gun_firemode_list = list( - GUN_FIREMODE_SEMIAUTO, - ) scatter = 6 + fire_delay = 3.0 SECONDS /obj/item/hardpoint/support/flare_launcher/set_bullet_traits() ..()