diff --git a/modular_skyrat/master_files/code/modules/clothing/head/_head.dm b/modular_skyrat/master_files/code/modules/clothing/head/_head.dm index 8ff16570822..259ea9c9fed 100644 --- a/modular_skyrat/master_files/code/modules/clothing/head/_head.dm +++ b/modular_skyrat/master_files/code/modules/clothing/head/_head.dm @@ -4,7 +4,7 @@ /// Also handles hiding the ear slot properly after equipping a hat /obj/item/clothing/head/visual_equipped(mob/living/carbon/human/user, slot) . = ..() - if(!ishuman(user)) + if(!istype(user)) return if(slot & ITEM_SLOT_HEAD) if(user.ears && (flags_inv & HIDEEARS)) @@ -20,13 +20,13 @@ /obj/item/clothing/head/dropped(mob/living/carbon/human/user) . = ..() alternate_worn_layer = initial(alternate_worn_layer) - if(user.ears && (flags_inv & HIDEEARS)) + if(istype(user) && user.ears && (flags_inv & HIDEEARS)) RegisterSignal(user, COMSIG_CARBON_UNEQUIP_HAT, PROC_REF(update_on_removed)) - + /// After the hat has actually been removed from the mob, we can update what needs to be updated here /obj/item/clothing/head/proc/update_on_removed(mob/living/carbon/user, obj/item/hat) SIGNAL_HANDLER - if(ishuman(user) && user.ears) + if(istype(user) && user.ears) user.update_inv_ears() UnregisterSignal(user, COMSIG_CARBON_UNEQUIP_HAT) diff --git a/modular_skyrat/master_files/icons/mob/clothing/head.dmi b/modular_skyrat/master_files/icons/mob/clothing/head.dmi index 2b75f083b7c..f3193ea5ac3 100644 Binary files a/modular_skyrat/master_files/icons/mob/clothing/head.dmi and b/modular_skyrat/master_files/icons/mob/clothing/head.dmi differ diff --git a/modular_skyrat/modules/aesthetics/guns/code/guns.dm b/modular_skyrat/modules/aesthetics/guns/code/guns.dm index 60e2bf23903..aefdba75fd6 100644 --- a/modular_skyrat/modules/aesthetics/guns/code/guns.dm +++ b/modular_skyrat/modules/aesthetics/guns/code/guns.dm @@ -196,15 +196,51 @@ fire_sound = 'modular_skyrat/modules/aesthetics/guns/sound/laser_cannon_fire.ogg' /obj/item/gun/ballistic/automatic/sniper_rifle + name = "sniper rifle" + desc = "A long ranged weapon that does significant damage. No, you can't quickscope." icon = 'modular_skyrat/modules/aesthetics/guns/icons/guns_gubman2.dmi' icon_state = "sniper" + w_class = WEIGHT_CLASS_BULKY + inhand_icon_state = "sniper" + worn_icon_state = null + fire_sound = 'sound/weapons/gun/sniper/shot.ogg' + fire_sound_volume = 90 + load_sound = 'sound/weapons/gun/sniper/mag_insert.ogg' + rack_sound = 'sound/weapons/gun/sniper/rack.ogg' + suppressed_sound = 'sound/weapons/gun/general/heavy_shot_suppressed.ogg' + recoil = 2 + weapon_weight = WEAPON_HEAVY + mag_type = /obj/item/ammo_box/magazine/sniper_rounds fire_delay = 6 SECONDS + burst_size = 1 + w_class = WEIGHT_CLASS_NORMAL + slot_flags = ITEM_SLOT_BACK + actions_types = list() + mag_display = TRUE + suppressor_x_offset = 3 + suppressor_y_offset = 3 + +/obj/item/gun/ballistic/automatic/sniper_rifle/Initialize(mapload) + . = ..() + AddComponent(/datum/component/scope, range_modifier = 2) + +/obj/item/gun/ballistic/automatic/sniper_rifle/reset_semicd() + . = ..() + if(suppressed) + playsound(src, 'sound/machines/eject.ogg', 25, TRUE, ignore_walls = FALSE, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_distance = 0) + else + playsound(src, 'sound/machines/eject.ogg', 50, TRUE) /obj/item/gun/ballistic/automatic/sniper_rifle/syndicate + name = "syndicate sniper rifle" + desc = "An illegally modified .50 cal sniper rifle with suppression compatibility. Quickscoping still doesn't work." icon = 'modular_skyrat/modules/aesthetics/guns/icons/guns_gubman2.dmi' icon_state = "sniper2" worn_icon_state = "sniper" fire_delay = 5.5 SECONDS + can_suppress = TRUE + can_unsuppress = TRUE + pin = /obj/item/firing_pin/implant/pindicate /obj/item/gun/ballistic/automatic/sniper_rifle/modular name = "AUS-107 anti-materiel rifle"