Skip to content

Commit

Permalink
Aim mode 2 (#51)
Browse files Browse the repository at this point in the history
* b7

* SKILL ISSUE
  • Loading branch information
homexp13 authored Jul 29, 2024
1 parent 6a98e16 commit 38c8c94
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 12 deletions.
9 changes: 0 additions & 9 deletions code/datums/actions/item_action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,3 @@
/datum/action/item_action/aim_mode/action_activate()
var/obj/item/weapon/gun/I = target
I.toggle_auto_aim_mode(owner)

/datum/action/item_action/reddot_aim_mode
name = "Take Aim"
action_icon_state = "aim_mode"
action_type = ACTION_TOGGLE
keybinding_signals = list(
KEYBINDING_NORMAL = COMSIG_KB_AIMMODE,
)
use_obj_appeareance = FALSE
3 changes: 3 additions & 0 deletions code/game/objects/machinery/vending/marine_vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
/obj/item/attachable/flashlight/under = -1,
/obj/item/attachable/magnetic_harness = -1,
/obj/item/attachable/reddot = -1,
/obj/item/attachable/b7_scope = -1,
/obj/item/attachable/motiondetector = -1,
/obj/item/attachable/scope/marine = -1,
/obj/item/attachable/scope/mini = -1,
Expand Down Expand Up @@ -374,6 +375,7 @@
/obj/item/attachable/flashlight/under = -1,
/obj/item/attachable/magnetic_harness = -1,
/obj/item/attachable/reddot = -1,
/obj/item/attachable/b7_scope = -1,
/obj/item/attachable/motiondetector = -1,
/obj/item/attachable/scope/marine = -1,
/obj/item/attachable/scope/mini = -1,
Expand Down Expand Up @@ -617,6 +619,7 @@
/obj/item/attachable/flashlight/under = -1,
/obj/item/attachable/magnetic_harness = -1,
/obj/item/attachable/reddot = -1,
/obj/item/attachable/b7_scope = -1,
/obj/item/attachable/motiondetector = -1,
/obj/item/attachable/scope/marine = -1,
/obj/item/attachable/scope/mini = -1,
Expand Down
9 changes: 6 additions & 3 deletions code/modules/projectiles/attachables/rail.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@
accuracy_mod = 0.15
accuracy_unwielded_mod = 0.1
aim_mode_delay_mod = -0.5
attachment_action_type = /datum/action/item_action/reddot_aim_mode
variants_by_parent_type = list(/obj/item/weapon/gun/rifle/som = "", /obj/item/weapon/gun/shotgun/som = "")

/obj/item/attachable/reddot/activate(mob/living/user, turn_off)
master_gun.toggle_auto_aim_mode(user)
/obj/item/attachable/b7_scope
name = "B7 smart scope"
desc = "A B7 smart scope. Does not have a zoom feature, but allows you to take aim and fire through allies. \nNo drawbacks."
icon_state = "b7"
slot = ATTACHMENT_SLOT_RAIL
add_aim_mode = TRUE

/obj/item/attachable/m16sight
name = "M16 iron sights"
Expand Down
1 change: 1 addition & 0 deletions code/modules/projectiles/guns/revolvers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
attachable_allowed = list(
/obj/item/attachable/bayonet,
/obj/item/attachable/reddot,
/obj/item/attachable/b7_scope,
/obj/item/attachable/flashlight,
/obj/item/attachable/heavy_barrel,
/obj/item/attachable/gyro,
Expand Down
13 changes: 13 additions & 0 deletions code/modules/projectiles/guns/rifles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
attachable_allowed = list(
/obj/item/attachable/stock/t18stock,
/obj/item/attachable/reddot,
/obj/item/attachable/b7_scope,
/obj/item/attachable/verticalgrip,
/obj/item/attachable/angledgrip,
/obj/item/attachable/lasersight,
Expand Down Expand Up @@ -145,6 +146,7 @@
attachable_allowed = list(
/obj/item/attachable/stock/t12stock,
/obj/item/attachable/reddot,
/obj/item/attachable/b7_scope,
/obj/item/attachable/verticalgrip,
/obj/item/attachable/lasersight,
/obj/item/attachable/gyro,
Expand Down Expand Up @@ -778,6 +780,7 @@
/obj/item/attachable/bayonetknife,
/obj/item/attachable/bayonetknife/som,
/obj/item/attachable/reddot,
/obj/item/attachable/b7_scope,
/obj/item/attachable/verticalgrip,
/obj/item/attachable/angledgrip,
/obj/item/attachable/gyro,
Expand Down Expand Up @@ -912,6 +915,7 @@
attachable_allowed = list(
/obj/item/attachable/stock/t42stock,
/obj/item/attachable/reddot,
/obj/item/attachable/b7_scope,
/obj/item/attachable/verticalgrip,
/obj/item/attachable/flashlight,
/obj/item/attachable/flashlight/under,
Expand Down Expand Up @@ -990,6 +994,7 @@
allowed_ammo_types = list(/obj/item/ammo_magazine/standard_gpmg)
attachable_allowed = list(
/obj/item/attachable/reddot,
/obj/item/attachable/b7_scope,
/obj/item/attachable/flashlight,
/obj/item/attachable/lasersight,
/obj/item/attachable/flashlight/under,
Expand Down Expand Up @@ -1054,6 +1059,7 @@
attachable_allowed = list(
/obj/item/attachable/extended_barrel,
/obj/item/attachable/reddot,
/obj/item/attachable/b7_scope,
/obj/item/attachable/verticalgrip,
/obj/item/attachable/flashlight/under,
/obj/item/attachable/angledgrip,
Expand Down Expand Up @@ -1120,6 +1126,7 @@
wield_delay = 0.7 SECONDS
attachable_allowed = list(
/obj/item/attachable/reddot,
/obj/item/attachable/b7_scope,
/obj/item/attachable/verticalgrip,
/obj/item/attachable/lasersight,
/obj/item/attachable/gyro,
Expand Down Expand Up @@ -1623,6 +1630,7 @@
)
attachable_allowed = list(
/obj/item/attachable/reddot,
/obj/item/attachable/b7_scope,
/obj/item/attachable/flashlight,
/obj/item/attachable/lasersight,
/obj/item/attachable/bayonet,
Expand Down Expand Up @@ -1697,6 +1705,7 @@
)
attachable_allowed = list(
/obj/item/attachable/reddot,
/obj/item/attachable/b7_scope,
/obj/item/attachable/verticalgrip,
/obj/item/attachable/lasersight,
/obj/item/attachable/gyro,
Expand Down Expand Up @@ -1864,6 +1873,7 @@
attachable_allowed = list(
/obj/item/attachable/scope/optical,
/obj/item/attachable/reddot,
/obj/item/attachable/b7_scope,
/obj/item/attachable/lasersight,
/obj/item/attachable/flashlight,
/obj/item/attachable/foldable/bipod,
Expand Down Expand Up @@ -1941,6 +1951,7 @@
/obj/item/attachable/scope/optical,
/obj/item/weapon/gun/rifle/tx54/mini,
/obj/item/attachable/reddot,
/obj/item/attachable/b7_scope,
/obj/item/attachable/verticalgrip,
/obj/item/attachable/lasersight,
/obj/item/attachable/gyro,
Expand Down Expand Up @@ -2081,6 +2092,7 @@
attachable_allowed = list(
/obj/item/weapon/gun/shotgun/micro_grenade,
/obj/item/attachable/reddot,
/obj/item/attachable/b7_scope,
/obj/item/attachable/verticalgrip,
/obj/item/attachable/lasersight,
/obj/item/attachable/gyro,
Expand Down Expand Up @@ -2260,6 +2272,7 @@
allowed_ammo_types = list(/obj/item/ammo_magazine/som_mg)
attachable_allowed = list(
/obj/item/attachable/reddot,
/obj/item/attachable/b7_scope,
/obj/item/attachable/flashlight,
/obj/item/attachable/lasersight,
/obj/item/attachable/flashlight/under,
Expand Down
3 changes: 3 additions & 0 deletions code/modules/projectiles/guns/smgs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
attachable_allowed = list(
/obj/item/attachable/suppressor,
/obj/item/attachable/reddot,
/obj/item/attachable/b7_scope,
/obj/item/attachable/compensator,
/obj/item/attachable/lasersight,
/obj/item/attachable/flashlight,
Expand Down Expand Up @@ -566,6 +567,7 @@
/obj/item/attachable/foldable/icc_machinepistol,
/obj/item/attachable/suppressor,
/obj/item/attachable/reddot,
/obj/item/attachable/b7_scope,
/obj/item/attachable/verticalgrip,
/obj/item/attachable/foldable/t19stock,
/obj/item/attachable/compensator,
Expand Down Expand Up @@ -698,6 +700,7 @@
attachable_allowed = list(
/obj/item/attachable/suppressor,
/obj/item/attachable/reddot,
/obj/item/attachable/b7_scope,
/obj/item/attachable/compensator,
/obj/item/attachable/lasersight,
/obj/item/attachable/verticalgrip,
Expand Down
Binary file modified icons/Marine/marine-weapons.dmi
Binary file not shown.

0 comments on commit 38c8c94

Please sign in to comment.