From 5879f7325043f659d87cf8cf33cdeba6291ef209 Mon Sep 17 00:00:00 2001 From: Doubleumc Date: Sat, 28 Oct 2023 21:04:57 -0400 Subject: [PATCH] minor cleanup --- code/modules/vehicles/hardpoints/hardpoint.dm | 14 +++++++------- .../vehicles/hardpoints/primary/dual_cannon.dm | 5 ++--- .../hardpoints/secondary/frontal_cannon.dm | 6 ++---- .../hardpoints/special/firing_port_weapon.dm | 2 -- code/modules/vehicles/hardpoints/support/flare.dm | 8 +++----- code/modules/vehicles/multitile/multitile.dm | 1 - .../vehicles/multitile/multitile_interaction.dm | 5 ----- 7 files changed, 14 insertions(+), 27 deletions(-) diff --git a/code/modules/vehicles/hardpoints/hardpoint.dm b/code/modules/vehicles/hardpoints/hardpoint.dm index a5e5671fe2..66a4b6d79a 100644 --- a/code/modules/vehicles/hardpoints/hardpoint.dm +++ b/code/modules/vehicles/hardpoints/hardpoint.dm @@ -98,8 +98,8 @@ //maximum amount of spare mags var/max_clips = 0 - /** An assoc list in the format list(/datum/element/bullet_trait_to_give = list(...args)) - that will be given to a projectile with the current ammo datum**/ + /// An assoc list in the format list(/datum/element/bullet_trait_to_give = list(...args)) + /// that will be given to a projectile fired from the hardpoint var/list/list/traits_to_give //Firemodes. @@ -146,7 +146,7 @@ /obj/item/hardpoint/Initialize() . = ..() set_bullet_traits() - AddComponent(/datum/component/automatedfire/autofire, fire_delay, burst_delay, burst_amount, gun_firemode, autofire_slow_mult, CALLBACK(src, PROC_REF(set_burst_firing)), CALLBACK(src, PROC_REF(reset_fire)), CALLBACK(src, PROC_REF(continue_fire)), CALLBACK(src, PROC_REF(display_ammo)), CALLBACK(src, PROC_REF(set_auto_firing))) //This should go after handle_starting_attachment() and setup_firemodes() to get the proper values set. + AddComponent(/datum/component/automatedfire/autofire, fire_delay, burst_delay, burst_amount, gun_firemode, autofire_slow_mult, CALLBACK(src, PROC_REF(set_burst_firing)), CALLBACK(src, PROC_REF(reset_fire)), CALLBACK(src, PROC_REF(continue_fire)), CALLBACK(src, PROC_REF(display_ammo)), CALLBACK(src, PROC_REF(set_auto_firing))) /obj/item/hardpoint/Destroy() if(owner) @@ -319,14 +319,14 @@ continue // Make sure we can pass object from all directions - if(!CHECK_BITFIELD(O.pass_flags.flags_can_pass_all, PASS_OVER_THROW_ITEM)) - if(!CHECK_BITFIELD(O.flags_atom, ON_BORDER)) + if(!(O.pass_flags.flags_can_pass_all & PASS_OVER_THROW_ITEM)) + if(!(O.flags_atom & ON_BORDER)) return FALSE //If we're behind the object, check the behind pass flags - else if(dir == O.dir && !CHECK_BITFIELD(O.pass_flags.flags_can_pass_behind, PASS_OVER_THROW_ITEM)) + else if(dir == O.dir && !(O.pass_flags.flags_can_pass_behind & PASS_OVER_THROW_ITEM)) return FALSE //If we're in front, check front pass flags - else if(dir == turn(O.dir, 180) && !CHECK_BITFIELD(O.pass_flags.flags_can_pass_front, PASS_OVER_THROW_ITEM)) + else if(dir == turn(O.dir, 180) && !(O.pass_flags.flags_can_pass_front & PASS_OVER_THROW_ITEM)) return FALSE // Trace back towards the vehicle diff --git a/code/modules/vehicles/hardpoints/primary/dual_cannon.dm b/code/modules/vehicles/hardpoints/primary/dual_cannon.dm index db9c49ac56..921d0f1f4a 100644 --- a/code/modules/vehicles/hardpoints/primary/dual_cannon.dm +++ b/code/modules/vehicles/hardpoints/primary/dual_cannon.dm @@ -12,10 +12,9 @@ damage_multiplier = 0.2 health = 500 - //cooldown = 7 - //accuracy = 0.98 + cooldown = 7 + accuracy = 0.98 firing_arc = 60 - //var/burst_amount = 2 origins = list(0, -2) diff --git a/code/modules/vehicles/hardpoints/secondary/frontal_cannon.dm b/code/modules/vehicles/hardpoints/secondary/frontal_cannon.dm index ac4b486f9a..e33e8d9a14 100644 --- a/code/modules/vehicles/hardpoints/secondary/frontal_cannon.dm +++ b/code/modules/vehicles/hardpoints/secondary/frontal_cannon.dm @@ -11,10 +11,9 @@ damage_multiplier = 0.11 health = 350 - //cooldown = 16 - //accuracy = 0.8 + cooldown = 16 + accuracy = 0.8 firing_arc = 120 - //var/burst_amount = 4 origins = list(0, -2) @@ -40,7 +39,6 @@ extra_delay = 0.4 SECONDS gun_firemode = GUN_FIREMODE_BURSTFIRE gun_firemode_list = list( - GUN_FIREMODE_SEMIAUTO, GUN_FIREMODE_BURSTFIRE, GUN_FIREMODE_AUTOMATIC, ) diff --git a/code/modules/vehicles/hardpoints/special/firing_port_weapon.dm b/code/modules/vehicles/hardpoints/special/firing_port_weapon.dm index f6ae86f726..015b0b2151 100644 --- a/code/modules/vehicles/hardpoints/special/firing_port_weapon.dm +++ b/code/modules/vehicles/hardpoints/special/firing_port_weapon.dm @@ -13,7 +13,6 @@ cooldown = 10 accuracy = 0.9 firing_arc = 120 - //var/burst_amount = 3 //FPWs reload automatically var/reloading = FALSE var/reload_time = 10 SECONDS @@ -36,7 +35,6 @@ extra_delay = -0.2 SECONDS gun_firemode = GUN_FIREMODE_BURSTFIRE gun_firemode_list = list( - GUN_FIREMODE_SEMIAUTO, GUN_FIREMODE_BURSTFIRE, GUN_FIREMODE_AUTOMATIC, ) diff --git a/code/modules/vehicles/hardpoints/support/flare.dm b/code/modules/vehicles/hardpoints/support/flare.dm index facd938aa9..9838f42b1c 100644 --- a/code/modules/vehicles/hardpoints/support/flare.dm +++ b/code/modules/vehicles/hardpoints/support/flare.dm @@ -13,8 +13,8 @@ activatable = TRUE health = 500 - //cooldown = 30 - //accuracy = 0.7 + cooldown = 30 + accuracy = 0.7 firing_arc = 120 origins = list(0, -2) @@ -36,11 +36,9 @@ ) fire_delay = 3.0 SECONDS - gun_firemode = GUN_FIREMODE_BURSTFIRE + gun_firemode = GUN_FIREMODE_SEMIAUTO gun_firemode_list = list( GUN_FIREMODE_SEMIAUTO, - GUN_FIREMODE_BURSTFIRE, - GUN_FIREMODE_AUTOMATIC, ) /obj/item/hardpoint/support/flare_launcher/set_bullet_traits() diff --git a/code/modules/vehicles/multitile/multitile.dm b/code/modules/vehicles/multitile/multitile.dm index 82c9b70863..148af24e0d 100644 --- a/code/modules/vehicles/multitile/multitile.dm +++ b/code/modules/vehicles/multitile/multitile.dm @@ -336,7 +336,6 @@ return /obj/vehicle/multitile/set_seated_mob(seat, mob/living/M) - to_chat(M, "multitile set_seated_mob") // Give/remove verbs if(QDELETED(M)) var/mob/living/L = seats[seat] diff --git a/code/modules/vehicles/multitile/multitile_interaction.dm b/code/modules/vehicles/multitile/multitile_interaction.dm index df33fa5227..4eabaeb831 100644 --- a/code/modules/vehicles/multitile/multitile_interaction.dm +++ b/code/modules/vehicles/multitile/multitile_interaction.dm @@ -349,7 +349,6 @@ /obj/vehicle/multitile/proc/crew_mouseup(datum/source, atom/object, turf/location, control, params) SIGNAL_HANDLER - //to_chat(source, "multitile crew_mouseup [source] [object] [location] [control] [params]") var/seat = get_mob_seat(source) if(!seat) return @@ -363,8 +362,6 @@ /obj/vehicle/multitile/proc/crew_mousedrag(datum/source, atom/src_object, atom/over_object, turf/src_location, turf/over_location, src_control, over_control, params) SIGNAL_HANDLER - //to_chat(source, "multitile crew_mousedrag [source] [src_object] [over_object] [src_location] [over_location] [src_control] [over_control] [params]") - var/seat = get_mob_seat(source) if(!seat) return @@ -378,8 +375,6 @@ /obj/vehicle/multitile/proc/crew_mousedown(datum/source, atom/object, turf/location, control, params) SIGNAL_HANDLER - //to_chat(source, "multitile crew_mousedown [source] [object] [location] [control] [params]") - var/seat = get_mob_seat(source) if(!seat) return