Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Doubleumc committed Oct 29, 2023
1 parent de8e091 commit 5879f73
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 27 deletions.
14 changes: 7 additions & 7 deletions code/modules/vehicles/hardpoints/hardpoint.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions code/modules/vehicles/hardpoints/primary/dual_cannon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 2 additions & 4 deletions code/modules/vehicles/hardpoints/secondary/frontal_cannon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
)
Expand Down
8 changes: 3 additions & 5 deletions code/modules/vehicles/hardpoints/support/flare.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
Expand Down
1 change: 0 additions & 1 deletion code/modules/vehicles/multitile/multitile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
5 changes: 0 additions & 5 deletions code/modules/vehicles/multitile/multitile_interaction.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5879f73

Please sign in to comment.