From da2c61d28b2ba12664ac3e65b4714c99eff062ec Mon Sep 17 00:00:00 2001 From: Vile Beggar Date: Fri, 8 Nov 2024 12:08:12 +0100 Subject: [PATCH 1/4] adds weapon crosshairs --- code/modules/projectiles/gun.dm | 12 ++++++++ code/modules/projectiles/guns/boltaction.dm | 3 ++ .../modules/projectiles/guns/flamer/flamer.dm | 3 ++ code/modules/projectiles/guns/lever_action.dm | 28 ++++-------------- code/modules/projectiles/guns/misc.dm | 6 ++++ code/modules/projectiles/guns/pistols.dm | 2 ++ code/modules/projectiles/guns/revolvers.dm | 3 ++ code/modules/projectiles/guns/rifles.dm | 11 +++++++ code/modules/projectiles/guns/shotguns.dm | 3 ++ code/modules/projectiles/guns/smartgun.dm | 3 ++ code/modules/projectiles/guns/smgs.dm | 3 ++ .../guns/specialist/launcher/launcher.dm | 3 ++ .../projectiles/guns/specialist/scout.dm | 3 ++ .../projectiles/guns/specialist/sniper.dm | 3 ++ .../effects/mouse_pointer/explosive_mouse.dmi | Bin 0 -> 343 bytes icons/effects/mouse_pointer/flamer_mouse.dmi | Bin 0 -> 313 bytes icons/effects/mouse_pointer/lmg_mouse.dmi | Bin 0 -> 374 bytes icons/effects/mouse_pointer/pistol_mouse.dmi | Bin 0 -> 376 bytes icons/effects/mouse_pointer/rifle_mouse.dmi | Bin 0 -> 293 bytes .../mouse_pointer/rifle_mouse_fired.dmi | Bin 0 -> 385 bytes .../mouse_pointer/rifle_mouse_reset.dmi | Bin 0 -> 471 bytes icons/effects/mouse_pointer/shotgun_mouse.dmi | Bin 0 -> 358 bytes .../effects/mouse_pointer/smartgun_mouse.dmi | Bin 0 -> 442 bytes icons/effects/mouse_pointer/sniper_mouse.dmi | Bin 0 -> 368 bytes 24 files changed, 64 insertions(+), 22 deletions(-) create mode 100644 icons/effects/mouse_pointer/explosive_mouse.dmi create mode 100644 icons/effects/mouse_pointer/flamer_mouse.dmi create mode 100644 icons/effects/mouse_pointer/lmg_mouse.dmi create mode 100644 icons/effects/mouse_pointer/pistol_mouse.dmi create mode 100644 icons/effects/mouse_pointer/rifle_mouse.dmi create mode 100644 icons/effects/mouse_pointer/rifle_mouse_fired.dmi create mode 100644 icons/effects/mouse_pointer/rifle_mouse_reset.dmi create mode 100644 icons/effects/mouse_pointer/shotgun_mouse.dmi create mode 100644 icons/effects/mouse_pointer/smartgun_mouse.dmi create mode 100644 icons/effects/mouse_pointer/sniper_mouse.dmi diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index e23f5ab9b20e..aa0a0623d7ff 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -766,13 +766,25 @@ As sniper rifles have both and weapon mods can change them as well. ..() deals w else wield_time -= 2*user.skills.get_skill_level(SKILL_FIREARMS) + update_mouse_pointer(user, TRUE) + return 1 /obj/item/weapon/gun/unwield(mob/user) . = ..() if(.) + update_mouse_pointer(user, FALSE) slowdown = initial(slowdown) +/obj/item/weapon/gun/proc/update_mouse_pointer(mob/user, new_cursor) + if(!user.client?.prefs.custom_cursors) + return + + user.client?.mouse_pointer_icon = new_cursor ? get_mouse_pointer() : initial(user.client?.mouse_pointer_icon) + +/obj/item/weapon/gun/proc/get_mouse_pointer() + return 'icons/effects/mouse_pointer/rifle_mouse.dmi' + //---------------------------------------------------------- // \\ // LOADING, RELOADING, AND CASINGS \\ diff --git a/code/modules/projectiles/guns/boltaction.dm b/code/modules/projectiles/guns/boltaction.dm index e4004858d661..76b2912cdfb2 100644 --- a/code/modules/projectiles/guns/boltaction.dm +++ b/code/modules/projectiles/guns/boltaction.dm @@ -41,6 +41,9 @@ /// If this gun should change icon states when the bolt is open var/has_openbolt_icon = TRUE +/obj/item/weapon/gun/boltaction/get_mouse_pointer() + return 'icons/effects/mouse_pointer/sniper_mouse.dmi' + /obj/item/weapon/gun/boltaction/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 32, "muzzle_y" = 17,"rail_x" = 5, "rail_y" = 18, "under_x" = 25, "under_y" = 14, "stock_x" = 20, "stock_y" = 9) diff --git a/code/modules/projectiles/guns/flamer/flamer.dm b/code/modules/projectiles/guns/flamer/flamer.dm index 64592044006f..578bb50110c6 100644 --- a/code/modules/projectiles/guns/flamer/flamer.dm +++ b/code/modules/projectiles/guns/flamer/flamer.dm @@ -34,6 +34,9 @@ . = ..() update_icon() +/obj/item/weapon/gun/flamer/get_mouse_pointer() + return 'icons/effects/mouse_pointer/flamer_mouse.dmi' + /obj/item/weapon/gun/flamer/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 0, "muzzle_y" = 0, "rail_x" = 11, "rail_y" = 20, "under_x" = 21, "under_y" = 14, "stock_x" = 0, "stock_y" = 0) diff --git a/code/modules/projectiles/guns/lever_action.dm b/code/modules/projectiles/guns/lever_action.dm index 179ce8d787d0..18c7ee0a52ea 100644 --- a/code/modules/projectiles/guns/lever_action.dm +++ b/code/modules/projectiles/guns/lever_action.dm @@ -406,26 +406,11 @@ their unique feature is that a direct hit will buff your damage and firerate /obj/item/weapon/gun/lever_action/xm88/wield(mob/user) . = ..() if(.) - RegisterSignal(src, COMSIG_ITEM_ZOOM, PROC_REF(scope_on)) - RegisterSignal(src, COMSIG_ITEM_UNZOOM, PROC_REF(scope_off)) - -/obj/item/weapon/gun/lever_action/xm88/proc/scope_on(atom/source, mob/current_user) - SIGNAL_HANDLER - - RegisterSignal(current_user, COMSIG_MOB_FIRED_GUN, PROC_REF(update_fired_mouse_pointer)) - update_mouse_pointer(current_user) - -/obj/item/weapon/gun/lever_action/xm88/proc/scope_off(atom/source, mob/current_user) - SIGNAL_HANDLER - - UnregisterSignal(current_user, COMSIG_MOB_FIRED_GUN) - current_user.client?.mouse_pointer_icon = null + RegisterSignal(user, COMSIG_MOB_FIRED_GUN, PROC_REF(update_fired_mouse_pointer)) /obj/item/weapon/gun/lever_action/xm88/unwield(mob/user) . = ..() - - user.client?.mouse_pointer_icon = null - UnregisterSignal(src, list(COMSIG_ITEM_ZOOM, COMSIG_ITEM_UNZOOM)) + UnregisterSignal(user, COMSIG_MOB_FIRED_GUN) /obj/item/weapon/gun/lever_action/xm88/proc/update_fired_mouse_pointer(mob/user) SIGNAL_HANDLER @@ -434,13 +419,13 @@ their unique feature is that a direct hit will buff your damage and firerate return user.client?.mouse_pointer_icon = get_fired_mouse_pointer(floating_penetration) - addtimer(CALLBACK(src, PROC_REF(update_mouse_pointer), user), 0.4 SECONDS, TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_CLIENT_TIME) + addtimer(CALLBACK(src, PROC_REF(update_mouse_pointer), user, TRUE), 0.4 SECONDS, TIMER_UNIQUE|TIMER_OVERRIDE|TIMER_CLIENT_TIME) -/obj/item/weapon/gun/lever_action/xm88/proc/update_mouse_pointer(mob/user) +/obj/item/weapon/gun/lever_action/xm88/update_mouse_pointer(mob/user, new_cursor) if(user.client?.prefs.custom_cursors) - user.client?.mouse_pointer_icon = get_mouse_pointer(floating_penetration) + user.client?.mouse_pointer_icon = new_cursor ? get_scaling_mouse_pointer(floating_penetration) : initial(user.client?.mouse_pointer_icon) -/obj/item/weapon/gun/lever_action/xm88/proc/get_mouse_pointer(level) +/obj/item/weapon/gun/lever_action/xm88/proc/get_scaling_mouse_pointer(level) switch(level) if(FLOATING_PENETRATION_TIER_0) return 'icons/effects/mouse_pointer/xm88/xm88-0.dmi' @@ -455,7 +440,6 @@ their unique feature is that a direct hit will buff your damage and firerate else return 'icons/effects/mouse_pointer/xm88/xm88-0.dmi' - /obj/item/weapon/gun/lever_action/xm88/proc/get_fired_mouse_pointer(level) switch(level) if(FLOATING_PENETRATION_TIER_0) diff --git a/code/modules/projectiles/guns/misc.dm b/code/modules/projectiles/guns/misc.dm index f61c0735ade9..9721a63d0690 100644 --- a/code/modules/projectiles/guns/misc.dm +++ b/code/modules/projectiles/guns/misc.dm @@ -22,6 +22,9 @@ . = ..() if(current_mag && current_mag.current_rounds > 0) load_into_chamber() +/obj/item/weapon/gun/minigun/get_mouse_pointer() + return 'icons/effects/mouse_pointer/lmg_mouse.dmi' + /obj/item/weapon/gun/minigun/set_gun_config_values() ..() set_fire_delay(FIRE_DELAY_TIER_12) @@ -95,6 +98,9 @@ if(current_mag && current_mag.current_rounds > 0) load_into_chamber() +/obj/item/weapon/gun/m60/get_mouse_pointer() + return 'icons/effects/mouse_pointer/lmg_mouse.dmi' + /obj/item/weapon/gun/m60/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 37, "muzzle_y" = 16, "rail_x" = 0, "rail_y" = 0, "under_x" = 27, "under_y" = 12, "stock_x" = 10, "stock_y" = 14) diff --git a/code/modules/projectiles/guns/pistols.dm b/code/modules/projectiles/guns/pistols.dm index e7d9174a6984..6c9a38652f63 100644 --- a/code/modules/projectiles/guns/pistols.dm +++ b/code/modules/projectiles/guns/pistols.dm @@ -38,6 +38,8 @@ /obj/item/weapon/gun/pistol/unique_action(mob/user) cock(user) +/obj/item/weapon/gun/pistol/get_mouse_pointer() + return 'icons/effects/mouse_pointer/pistol_mouse.dmi' /obj/item/weapon/gun/pistol/set_gun_config_values() ..() diff --git a/code/modules/projectiles/guns/revolvers.dm b/code/modules/projectiles/guns/revolvers.dm index 2f762cc7aac8..a2fe55c4b8b1 100644 --- a/code/modules/projectiles/guns/revolvers.dm +++ b/code/modules/projectiles/guns/revolvers.dm @@ -31,6 +31,9 @@ if(current_mag) replace_cylinder(current_mag.current_rounds) +/obj/item/weapon/gun/revolver/get_mouse_pointer() + return 'icons/effects/mouse_pointer/pistol_mouse.dmi' + /obj/item/weapon/gun/revolver/set_gun_config_values() ..() set_fire_delay(FIRE_DELAY_TIER_5) diff --git a/code/modules/projectiles/guns/rifles.dm b/code/modules/projectiles/guns/rifles.dm index ff7cfbf21c8b..7fba1dd75026 100644 --- a/code/modules/projectiles/guns/rifles.dm +++ b/code/modules/projectiles/guns/rifles.dm @@ -853,6 +853,9 @@ flags_gun_features = GUN_CAN_POINTBLANK|GUN_WIELDED_FIRING_ONLY +/obj/item/weapon/gun/rifle/mar40/lmg/get_mouse_pointer() + return 'icons/effects/mouse_pointer/lmg_mouse.dmi' + /obj/item/weapon/gun/rifle/mar40/lmg/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 32, "muzzle_y" = 16,"rail_x" = 16, "rail_y" = 20, "under_x" = 26, "under_y" = 16, "stock_x" = 24, "stock_y" = 13) @@ -1250,6 +1253,8 @@ /obj/item/weapon/gun/rifle/lmg/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 33, "muzzle_y" = 19,"rail_x" = 10, "rail_y" = 23, "under_x" = 23, "under_y" = 12, "stock_x" = 24, "stock_y" = 12) +/obj/item/weapon/gun/rifle/lmg/get_mouse_pointer() + return 'icons/effects/mouse_pointer/lmg_mouse.dmi' /obj/item/weapon/gun/rifle/lmg/set_gun_config_values() ..() @@ -1573,6 +1578,9 @@ /obj/item/weapon/gun/rifle/m4ra/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 43, "muzzle_y" = 17,"rail_x" = 22, "rail_y" = 21, "under_x" = 30, "under_y" = 13, "stock_x" = 24, "stock_y" = 13, "special_x" = 37, "special_y" = 16) +/obj/item/weapon/gun/rifle/m4ra/get_mouse_pointer() + return 'icons/effects/mouse_pointer/sniper_mouse.dmi' + /obj/item/weapon/gun/rifle/m4ra/set_gun_config_values() ..() set_fire_delay(FIRE_DELAY_TIER_9) @@ -1922,6 +1930,9 @@ COOLDOWN_DECLARE(allow_message) COOLDOWN_DECLARE(allow_pump) +/obj/item/weapon/gun/rifle/xm51/get_mouse_pointer() + return 'icons/effects/mouse_pointer/shotgun_mouse.dmi' + /obj/item/weapon/gun/rifle/xm51/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 34, "muzzle_y" = 18, "rail_x" = 12, "rail_y" = 20, "under_x" = 24, "under_y" = 13, "stock_x" = 15, "stock_y" = 16) diff --git a/code/modules/projectiles/guns/shotguns.dm b/code/modules/projectiles/guns/shotguns.dm index f568f2657dc8..9e367b3e6a47 100644 --- a/code/modules/projectiles/guns/shotguns.dm +++ b/code/modules/projectiles/guns/shotguns.dm @@ -45,6 +45,9 @@ can cause issues with ammo types getting mixed up during the burst. recoil = RECOIL_AMOUNT_TIER_4 recoil_unwielded = RECOIL_AMOUNT_TIER_2 +/obj/item/weapon/gun/shotgun/get_mouse_pointer() + return 'icons/effects/mouse_pointer/shotgun_mouse.dmi' + /obj/item/weapon/gun/shotgun/proc/replace_tube(number_to_replace) if(!current_mag) return diff --git a/code/modules/projectiles/guns/smartgun.dm b/code/modules/projectiles/guns/smartgun.dm index 6cf6eeead45b..0210d5d3d394 100644 --- a/code/modules/projectiles/guns/smartgun.dm +++ b/code/modules/projectiles/guns/smartgun.dm @@ -82,6 +82,9 @@ QDEL_NULL(battery) . = ..() +/obj/item/weapon/gun/smartgun/get_mouse_pointer() + return 'icons/effects/mouse_pointer/smartgun_mouse.dmi' + /obj/item/weapon/gun/smartgun/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 33, "muzzle_y" = 16,"rail_x" = 17, "rail_y" = 18, "under_x" = 22, "under_y" = 14, "stock_x" = 22, "stock_y" = 14) diff --git a/code/modules/projectiles/guns/smgs.dm b/code/modules/projectiles/guns/smgs.dm index 6be0f979c7ad..980c8bb28892 100644 --- a/code/modules/projectiles/guns/smgs.dm +++ b/code/modules/projectiles/guns/smgs.dm @@ -30,6 +30,9 @@ /obj/item/weapon/gun/smg/unique_action(mob/user) cock(user) +/obj/item/weapon/gun/smg/get_mouse_pointer() + return 'icons/effects/mouse_pointer/pistol_mouse.dmi' + /obj/item/weapon/gun/smg/set_gun_config_values() ..() movement_onehanded_acc_penalty_mult = 4 diff --git a/code/modules/projectiles/guns/specialist/launcher/launcher.dm b/code/modules/projectiles/guns/specialist/launcher/launcher.dm index d0731b2d43bc..d942e61e5b2a 100644 --- a/code/modules/projectiles/guns/specialist/launcher/launcher.dm +++ b/code/modules/projectiles/guns/specialist/launcher/launcher.dm @@ -38,6 +38,9 @@ new preload(cylinder) update_icon() +/obj/item/weapon/gun/launcher/get_mouse_pointer() + return 'icons/effects/mouse_pointer/explosive_mouse.dmi' + /obj/item/weapon/gun/launcher/Destroy(force) QDEL_NULL(cylinder) return ..() diff --git a/code/modules/projectiles/guns/specialist/scout.dm b/code/modules/projectiles/guns/specialist/scout.dm index fa324e7dba18..8635b52d4dea 100644 --- a/code/modules/projectiles/guns/specialist/scout.dm +++ b/code/modules/projectiles/guns/specialist/scout.dm @@ -60,6 +60,9 @@ update_attachable(integrated.slot) +/obj/item/weapon/gun/rifle/m4ra_custom/get_mouse_pointer() + return 'icons/effects/mouse_pointer/sniper_mouse.dmi' + /obj/item/weapon/gun/rifle/m4ra_custom/set_gun_attachment_offsets() attachable_offset = list("muzzle_x" = 43, "muzzle_y" = 17,"rail_x" = 23, "rail_y" = 21, "under_x" = 30, "under_y" = 11, "stock_x" = 24, "stock_y" = 13, "special_x" = 37, "special_y" = 16) diff --git a/code/modules/projectiles/guns/specialist/sniper.dm b/code/modules/projectiles/guns/specialist/sniper.dm index 88bf5c62a205..e42c3958d7e8 100644 --- a/code/modules/projectiles/guns/specialist/sniper.dm +++ b/code/modules/projectiles/guns/specialist/sniper.dm @@ -25,6 +25,9 @@ var/sniper_beam_icon_max = "laser_beam_intense" +/obj/item/weapon/gun/rifle/sniper/get_mouse_pointer() + return 'icons/effects/mouse_pointer/sniper_mouse.dmi' + /obj/item/weapon/gun/rifle/sniper/get_examine_text(mob/user) . = ..() if(!has_aimed_shot) diff --git a/icons/effects/mouse_pointer/explosive_mouse.dmi b/icons/effects/mouse_pointer/explosive_mouse.dmi new file mode 100644 index 0000000000000000000000000000000000000000..506d35029bd5a3b56b4b7c9f17f9d5b3fb4f40db GIT binary patch literal 343 zcmV-d0jU0oP)V=-0C=2J zR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex6#a*U0*I5Sc+(=$pSoZ^zil2jm5 zDKRHUiHkEOv#1!zGvwk-D@x2wg|L+sT>V_Yh5`Wg-5Err*40)3004tYL_t(2k)4s- z4S*mFMQg$UR$V~i0;CL}$o?}4mWSF8h&Lo9C$zM;04zj!Yceh1Y`tU9=uxmq_^_6*bkJ;EjYnB@I|Fca0HL?$-Al?h|>BBe*7u^+=p pgM@`&lf@c%jK`uluesZjegP-58*?Uhh*L*Fo;$&6mDgh{+~f- zQMOj`1fUdSNswPKgTu2MX+TbTRY*jMOKNd)QD#9&W_}(6L&conu!5q}?_YuoK7M_o z<*loA?#%h%4WR}XjUPPHIq#!+lA)-lcZY>>knv?>FNHaeCLNg+q7bZUsP5j`ZLGR^ zg~SQtCy#uzz0UZyZkQ?>^Ec)|8xzB~yOJ(Tu3ZfSTAAwU;uxYaF*%`u!O@W|L?Ok) z(&FKm2mUgogKAxz4VWr}YC*AxXNuK?9^ZUN>N zj#CVrL>s1ZFlZ_&?@*pQMbuGi3QGc0fLf5r;^P)TYjlNp^Z8-n{ literal 0 HcmV?d00001 diff --git a/icons/effects/mouse_pointer/lmg_mouse.dmi b/icons/effects/mouse_pointer/lmg_mouse.dmi new file mode 100644 index 0000000000000000000000000000000000000000..74c2178a9ee0b48062ff228ed6d96ec17a7ebdb4 GIT binary patch literal 374 zcmV-+0g3*JP)V=-0C=2J zR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex6#a*U0*I5Sc+(=$pSoZ^zil2jm5 zDKRHUiHkEOv#1!zGvwk-D@x2wg|L+sT>V_Yh5`Wg-5Err*40)3005#%L_t(2k!@1j z5yK!1bM6=*xLp7;0Wkwm@cuKEK%hxfK76)L@)M%|tfl+oa0~6qVYzS?zvfuYj9F5S zM%+Mniw974cM>*9lp`70JB3B*07#`%xcX#LHN|yB9NA0L)DiV=-0C=2J zR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex6#a*U0*I5Sc+(=$pSoZ^zil2jm5 zDKRHUiHkEOv#1!zGvwk-D@x2wg|L+sT>V_Yh5`Wg-5Err*40)3005*(L_t(2k!_NJ z4a6V_MKN)J>ITIPgaI0L|CtJMo=xdbYTzZG3J5TjM6eZ7Mm*E;2N?@d#dGDU5I62r zf3AQuuEuc?nkf?lH2FGBQz(2Hh`k;YNIn6?2{LV<9&x||pdNETv~vTK0xPkA6v_N( z3c7+ZhGh~cAdywnNI*qI0}_-ki!1v6t-ILA)nCoI_Wgj|2;GqV8r-7%D*dvb&*27x WFDL$7(1gwa0000L*Fo;$&6mDgh{+~f- zQMOj`1fUdSNswPKgTu2MX+TbTRY*jMOKNd)QD#9&W_}(6L&conu!5q}?_YuoK7M_o z<*loA?#%h%4WR}XjUPPHIq#!+lA)-lcZY>>knv?>FNHaeCLNg+q7bZUsP5j`ZLGR^ zg~SQtCy#uzz0UZyZkQ?>^Ec)|8xzB~yOJ(Tu3ZfSS{dl+;uxYaF*%`u!O@W|L?Ok) z%wI?v8AU$qEGt1!jo}j2n3*Tc$J|XguiI+Q@n&=*Sf( ly8{Kk7+4h_?r2qKXPDeBSbllyWp$w844$rjF6*2UngGKgXz&04 literal 0 HcmV?d00001 diff --git a/icons/effects/mouse_pointer/rifle_mouse_fired.dmi b/icons/effects/mouse_pointer/rifle_mouse_fired.dmi new file mode 100644 index 0000000000000000000000000000000000000000..877cbc27d18d9554f29607904609ddb51690c0f0 GIT binary patch literal 385 zcmV-{0e=38P)V=-0C=2J zR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex6#a?DJ)I5Sc+(=$pSoZ^zil2jm5 zDKRHUiHkEOv#1!zGvwk-D@x2w1+k5QqNzEFl^~{$Aqa9QE4cc(fNcQ)(;yu;$&NJK z0001>NklE+E_N|F8sgSg^2i0XLeT#h zWCuQ!h)VqU4LWPd4^&dnO$-ESh5*$l1nA5qPpG88dV=-0C=2J zR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex6#a?DJ)I5Sc+(=$pSoZ^zil2jm5 zDKRHUiHkEOv#1!zGvwk-D@x2w1+jq|Qc`mgD}hWS9U~oM9TP5P1y?^8uq^=7svSR_ zkx~l)008qzL_t(&f$f-43d0}}L=EHsHSGmja)HtuAWgjgnd-ENh{6_D36gnVSqDZ; zqPSxWA*6)0N`vXCoIo;=bh9mu4J4fgH4Mg8X&@m@K#s)ToO5{ieI{SLlaphxerOH) z=nH#E46ZK^v>iXnh$`9m14fph@2FCP>EVIFHp2kbJu$$@9P|xUYM@>M=?e9M(*8_5 z{#ZYOLHip@^GlY9`kqJ#A%s+g2}Tchq%#;W!8nr8eScq4)_ce98+x(#4gmu4fjmBl z0Rr?wd=LW!V=-0C=2J zR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex6#a*U0*I5Sc+(=$pSoZ^zil2jm5 zDKRHUiHkEOv#1!zGvwk-D@x2wg|L+sT>V_Yh5`Wg-5Err*40)3005FnL_t(2k%f}M z4a6V}1dT)ifevD>0!#tup#PeV;7hRBNBm>ZEMP-4D~zI5E=1-t91n<`L^7ZEIwUE* zH_3m?vGhvhyRb@8itaR-l1rs3@GTz`)H}>i5M_bO8OFNMV=-0C=2J zR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex6#a?DJ)I5Sc+(=$pSoZ^zil2jm5 zDKRHUiHkEOv#1!zGvwk-D@x2wg|L+sT>V_Yh5`Wj1Q|{|dwkUZ008DmL_t(YiS3k8 z4#FS|hD*W$pq>Em0uBza2=_meHJb`_P+wjAUpBfgZGWHx`0KQ?q{(Mx(R*jj5I`Sd zT)Z152r-qC<1$QfDJy_3w_yprJ=RH^V=;4GKt(eTC~s7~HWcVHVii%2*Hj^W7I?4~ zDy-Ez18f6eBA}^3J!5OV07*qoM6N<$g7(+5=l}o! literal 0 HcmV?d00001 diff --git a/icons/effects/mouse_pointer/sniper_mouse.dmi b/icons/effects/mouse_pointer/sniper_mouse.dmi new file mode 100644 index 0000000000000000000000000000000000000000..93572998a9c6c774ea378064f4198a076bc3396a GIT binary patch literal 368 zcmV-$0gwKPP)V=-0C=2J zR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex6#a*U0*I5Sc+(=$pSoZ^zil2jm5 zDKRHUiHkEOv#1!zGvwk-D@x2wg|L+sT>V_Yh5`Wg-5Err*40)3005jxL_t(2k%f|h z4Fe$vMKN)J!%k4_0*V7%l>KL_9JalNrbl9;&wS*A02YYw9jW{W0aL;4d{0#A{yAgj z8TFkv5KC{u^b#d*&>IY1qLACJAdb2%u!91K3nZQ(>N3q#fB`Vgp|FTQ0b&+8P!y@t z^i7LwnsVr_OdFZ#p`e=~C%Jyb7v@U$=A3=kAm2jQWIqN!sO#CDzQYp(2O;3qIaC_} O0000 Date: Fri, 8 Nov 2024 12:10:14 +0100 Subject: [PATCH 2/4] remove leftover icons --- icons/effects/mouse_pointer/rifle_mouse_fired.dmi | Bin 385 -> 0 bytes icons/effects/mouse_pointer/rifle_mouse_reset.dmi | Bin 471 -> 0 bytes 2 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 icons/effects/mouse_pointer/rifle_mouse_fired.dmi delete mode 100644 icons/effects/mouse_pointer/rifle_mouse_reset.dmi diff --git a/icons/effects/mouse_pointer/rifle_mouse_fired.dmi b/icons/effects/mouse_pointer/rifle_mouse_fired.dmi deleted file mode 100644 index 877cbc27d18d9554f29607904609ddb51690c0f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 385 zcmV-{0e=38P)V=-0C=2J zR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex6#a?DJ)I5Sc+(=$pSoZ^zil2jm5 zDKRHUiHkEOv#1!zGvwk-D@x2w1+k5QqNzEFl^~{$Aqa9QE4cc(fNcQ)(;yu;$&NJK z0001>NklE+E_N|F8sgSg^2i0XLeT#h zWCuQ!h)VqU4LWPd4^&dnO$-ESh5*$l1nA5qPpG88dV=-0C=2J zR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex6#a?DJ)I5Sc+(=$pSoZ^zil2jm5 zDKRHUiHkEOv#1!zGvwk-D@x2w1+jq|Qc`mgD}hWS9U~oM9TP5P1y?^8uq^=7svSR_ zkx~l)008qzL_t(&f$f-43d0}}L=EHsHSGmja)HtuAWgjgnd-ENh{6_D36gnVSqDZ; zqPSxWA*6)0N`vXCoIo;=bh9mu4J4fgH4Mg8X&@m@K#s)ToO5{ieI{SLlaphxerOH) z=nH#E46ZK^v>iXnh$`9m14fph@2FCP>EVIFHp2kbJu$$@9P|xUYM@>M=?e9M(*8_5 z{#ZYOLHip@^GlY9`kqJ#A%s+g2}Tchq%#;W!8nr8eScq4)_ce98+x(#4gmu4fjmBl z0Rr?wd=LW! Date: Fri, 8 Nov 2024 20:31:36 +0100 Subject: [PATCH 3/4] pred mouse --- code/modules/cm_preds/yaut_bracers.dm | 2 ++ code/modules/cm_preds/yaut_weapons.dm | 2 +- .../effects/mouse_pointer/plasma_caster_mouse.dmi | Bin 0 -> 458 bytes 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 icons/effects/mouse_pointer/plasma_caster_mouse.dmi diff --git a/code/modules/cm_preds/yaut_bracers.dm b/code/modules/cm_preds/yaut_bracers.dm index 4150120f0f9d..9b955140f52d 100644 --- a/code/modules/cm_preds/yaut_bracers.dm +++ b/code/modules/cm_preds/yaut_bracers.dm @@ -853,6 +853,8 @@ return caller.put_in_active_hand(caster) caster_deployed = TRUE + if(caller.client?.prefs.custom_cursors) + caller.client?.mouse_pointer_icon = 'icons/effects/mouse_pointer/plasma_caster_mouse.dmi' to_chat(caller, SPAN_NOTICE("You activate your plasma caster. It is in [caster.mode] mode.")) playsound(src, 'sound/weapons/pred_plasmacaster_on.ogg', 15, TRUE) diff --git a/code/modules/cm_preds/yaut_weapons.dm b/code/modules/cm_preds/yaut_weapons.dm index c66263ba96f8..620c00564d29 100644 --- a/code/modules/cm_preds/yaut_weapons.dm +++ b/code/modules/cm_preds/yaut_weapons.dm @@ -1256,7 +1256,6 @@ . = ..() source = null - /obj/item/weapon/gun/energy/yautja/plasma_caster/set_gun_config_values() ..() set_fire_delay(FIRE_DELAY_TIER_6) @@ -1343,6 +1342,7 @@ /obj/item/weapon/gun/energy/yautja/plasma_caster/dropped(mob/living/carbon/human/M) playsound(M, 'sound/weapons/pred_plasmacaster_off.ogg', 15, 1) to_chat(M, SPAN_NOTICE("You deactivate your plasma caster.")) + update_mouse_pointer(M, FALSE) var/datum/action/predator_action/bracer/caster/caster_action for(caster_action as anything in M.actions) diff --git a/icons/effects/mouse_pointer/plasma_caster_mouse.dmi b/icons/effects/mouse_pointer/plasma_caster_mouse.dmi new file mode 100644 index 0000000000000000000000000000000000000000..4d09fdc94ead4e5c626a371e7ac26a1697ce57a4 GIT binary patch literal 458 zcmV;*0X6=KP)V=-0C=1w$Gr-GAQT4B+4~e9x<`MjOBmsx?;vO?Sb<8tenZ zE}1O=00A0FL_t(og=0K$-~a=upx(jL4V!r5f$h6UHH(Q{%jFnYl#nq#hv5T^q=W#n z<(&*7(~;%M8Qx?*V)%29fq}G;Ald=QmM@alpN>sU+|!FBJA#EccR~Qn=g*%$#VX&) zATk{}B&hBH1_lNONoi^P3ZA|p$vl!BfXnyff}s@xj~M>ki+g%86FmpO0IBiMz(7GZ zM9&H2R#fUWrB^y$! zkRin!xC5xw+9A~(#sdcqP_4B?jydo&K&{pespg<0LTc6Zq?m)^0BW^%NHJ&dgaEZ# zJEWR}H5*dW+9B1P!BY^SYeoljDT)UI40vq_09yqS Date: Wed, 4 Dec 2024 13:53:13 +0100 Subject: [PATCH 4/4] adds crosshairs to hmgs --- code/modules/cm_marines/smartgun_mount.dm | 13 +++++++++++++ code/modules/projectiles/gun.dm | 2 ++ 2 files changed, 15 insertions(+) diff --git a/code/modules/cm_marines/smartgun_mount.dm b/code/modules/cm_marines/smartgun_mount.dm index ce1a25b98c73..6d22139511cc 100644 --- a/code/modules/cm_marines/smartgun_mount.dm +++ b/code/modules/cm_marines/smartgun_mount.dm @@ -518,6 +518,17 @@ if (PF) PF.flags_can_pass_all = PASS_AROUND|PASS_OVER_THROW_ITEM|PASS_OVER_THROW_MOB +///Turns the mouse cursor into a crosshair if new_cursor is set to TRUE. If set to FALSE, returns the cursor to its initial icon. +/obj/structure/machinery/m56d_hmg/proc/update_mouse_pointer(mob/user, new_cursor) + if(!user.client?.prefs.custom_cursors) + return + + user.client?.mouse_pointer_icon = new_cursor ? get_mouse_pointer() : initial(user.client?.mouse_pointer_icon) + +///Getter proc. Returns the weapon's crosshair icon. +/obj/structure/machinery/m56d_hmg/proc/get_mouse_pointer() + return 'icons/effects/mouse_pointer/lmg_mouse.dmi' + //Making so rockets don't hit M56D /obj/structure/machinery/m56d_hmg/calculate_cover_hit_boolean(obj/projectile/P, distance = 0, cade_direction_correct = FALSE) var/ammo_flags = P.ammo.flags_ammo_behavior | P.projectile_override_flags @@ -676,6 +687,7 @@ /obj/structure/machinery/m56d_hmg/proc/exit_interaction() SIGNAL_HANDLER + update_mouse_pointer(operator, FALSE) operator.unset_interaction() /obj/structure/machinery/m56d_hmg/proc/update_damage_state() @@ -917,6 +929,7 @@ RegisterSignal(user, COMSIG_MOB_MOUSEUP, PROC_REF(stop_fire)) operator = user + update_mouse_pointer(operator, TRUE) flags_atom |= RELAY_CLICK /obj/structure/machinery/m56d_hmg/on_unset_interaction(mob/user) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index aa0a0623d7ff..c05821353283 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -776,12 +776,14 @@ As sniper rifles have both and weapon mods can change them as well. ..() deals w update_mouse_pointer(user, FALSE) slowdown = initial(slowdown) +///Turns the mouse cursor into a crosshair if new_cursor is set to TRUE. If set to FALSE, returns the cursor to its initial icon. /obj/item/weapon/gun/proc/update_mouse_pointer(mob/user, new_cursor) if(!user.client?.prefs.custom_cursors) return user.client?.mouse_pointer_icon = new_cursor ? get_mouse_pointer() : initial(user.client?.mouse_pointer_icon) +///Getter proc. Returns the weapon's crosshair icon. /obj/item/weapon/gun/proc/get_mouse_pointer() return 'icons/effects/mouse_pointer/rifle_mouse.dmi'