diff --git a/modular_ss220/objects/code/weapons.dm b/modular_ss220/objects/code/weapons.dm index cea71b18c5ed..b7f83ad946cc 100644 --- a/modular_ss220/objects/code/weapons.dm +++ b/modular_ss220/objects/code/weapons.dm @@ -1,6 +1,36 @@ +// Base heavy revolver +/obj/item/gun/projectile/revolver/reclinable + var/snapback_sound = 'modular_ss220/objects/sound/weapons/cylinder/snapback_rsh12.ogg' + var/reclined_sound = 'modular_ss220/objects/sound/weapons/cylinder/reclined_rsh12.ogg' + var/dry_fire_sound = 'sound/weapons/empty.ogg' + var/reclined = FALSE + +/obj/item/gun/projectile/revolver/reclinable/attack_self(mob/living/user) + reclined = !reclined + playsound(user, reclined ? reclined_sound : snapback_sound, 50, 1) + update_icon() + + if(reclined) + return ..() + +/obj/item/gun/projectile/revolver/reclinable/update_icon_state() + icon_state = initial(icon_state) + (reclined ? "_reclined" : "") + +/obj/item/gun/projectile/revolver/reclinable/attackby(obj/item/A, mob/user, params) + if(!reclined) + return + return ..() + +/obj/item/gun/projectile/revolver/reclinable/process_fire(atom/target, mob/living/user, message, params, zone_override, bonus_spread) + if (!reclined) + return ..() + + to_chat(user, "*click*") + playsound(user, dry_fire_sound, 100, 1) + // Colt Anaconda .44 -/obj/item/gun/projectile/revolver/anaconda +/obj/item/gun/projectile/revolver/reclinable/anaconda name = "Анаконда" desc = "Крупнокалиберный револьвер двадцатого века. Несмотря на то, что оружие хранилось в хороших условиях, старина даёт о себе знать." mag_type = /obj/item/ammo_box/magazine/internal/cylinder/d44 @@ -9,16 +39,13 @@ icon = 'modular_ss220/objects/icons/guns.dmi' icon_state = "anaconda" item_state = "anaconda" + fire_sound = 'modular_ss220/objects/sound/weapons/gunshots/gunshot_anaconda.ogg' -/obj/item/gun/projectile/revolver/anaconda/attackby(obj/item/A, mob/user, params) +/obj/item/gun/projectile/revolver/reclinable/anaconda/attackby(obj/item/A, mob/user, params) if(istype(A, /obj/item/ammo_box/box_d44)) return return ..() -/obj/item/gun/projectile/revolver/anaconda/process_fire(atom/target, mob/living/user, message, params, zone_override, bonus_spread) - bonus_spread += 30 - . = ..() - /obj/item/ammo_box/magazine/internal/cylinder/d44 name = ".44 revolver cylinder" ammo_type = /obj/item/ammo_casing/d44 @@ -42,6 +69,7 @@ flag = "bullet" hitsound_wall = "ricochet" impact_effect_type = /obj/effect/temp_visual/impact_effect + spread = 20 /obj/item/ammo_box/speed_loader_d44 name = "speed loader (.44)" @@ -63,12 +91,12 @@ /obj/structure/displaycase/hos alert = TRUE - start_showpiece_type = /obj/item/gun/projectile/revolver/anaconda + start_showpiece_type = /obj/item/gun/projectile/revolver/reclinable/anaconda req_access = list(ACCESS_HOS) // RSH-12 12.7 -/obj/item/gun/projectile/revolver/rsh12 +/obj/item/gun/projectile/revolver/reclinable/rsh12 name = "РШ-12" desc = "Тяжёлый револьвер винтовочного калибра с откидным стволом. По слухам, всё ещё находится на вооружении у СССП." mag_type = /obj/item/ammo_box/magazine/internal/cylinder/rsh12 @@ -78,26 +106,10 @@ icon_state = "rsh12" item_state = "rsh12" fire_sound = 'modular_ss220/objects/sound/weapons/gunshots/gunshot_rsh12.ogg' - var/snapback_sound = 'modular_ss220/objects/sound/weapons/cylinder/snapback_rsh12.ogg' - var/reclined_sound = 'modular_ss220/objects/sound/weapons/cylinder/reclined_rsh12.ogg' - var/reclined = FALSE - -/obj/item/gun/projectile/revolver/rsh12/attack_self(mob/living/user) - reclined = !reclined - playsound(user, snapback_sound, 50, 1) - update_icon() - if(reclined) - playsound(user, reclined_sound, 50, 1) - return ..() -/obj/item/gun/projectile/revolver/rsh12/update_icon_state() - icon_state = initial(icon_state) + (reclined ? "_reclined" : "") - -/obj/item/gun/projectile/revolver/rsh12/attackby(obj/item/A, mob/user, params) +/obj/item/gun/projectile/revolver/reclinable/rsh12/attackby(obj/item/A, mob/user, params) if(istype(A, /obj/item/ammo_box/box_mm127)) return - if(!reclined) - return return ..() /obj/item/ammo_box/magazine/internal/cylinder/rsh12 diff --git a/modular_ss220/objects/icons/guns.dmi b/modular_ss220/objects/icons/guns.dmi index 3d64d40c0389..10eebc3d9b5e 100644 Binary files a/modular_ss220/objects/icons/guns.dmi and b/modular_ss220/objects/icons/guns.dmi differ diff --git a/modular_ss220/objects/sound/weapons/gunshots/gunshot_anaconda.ogg b/modular_ss220/objects/sound/weapons/gunshots/gunshot_anaconda.ogg new file mode 100644 index 000000000000..bca062190f94 Binary files /dev/null and b/modular_ss220/objects/sound/weapons/gunshots/gunshot_anaconda.ogg differ diff --git a/modular_ss220/objects/sound/weapons/gunshots/gunshot_rsh12.ogg b/modular_ss220/objects/sound/weapons/gunshots/gunshot_rsh12.ogg index bca062190f94..0e200cf97395 100644 Binary files a/modular_ss220/objects/sound/weapons/gunshots/gunshot_rsh12.ogg and b/modular_ss220/objects/sound/weapons/gunshots/gunshot_rsh12.ogg differ diff --git a/modular_ss220/outfits/code/outfits.dm b/modular_ss220/outfits/code/outfits.dm index b70cf4ed4d0f..b35fc68b6dd6 100644 --- a/modular_ss220/outfits/code/outfits.dm +++ b/modular_ss220/outfits/code/outfits.dm @@ -50,14 +50,14 @@ backpack_contents = list( /obj/item/storage/box/soviet = 1, - /obj/item/gun/projectile/revolver/anaconda = 1, + /obj/item/gun/projectile/revolver/reclinable/anaconda = 1, /obj/item/ammo_box/speed_loader_d44 = 2, /obj/item/storage/fancy/cigarettes/cigpack_syndicate = 1, /obj/item/lighter/zippo/engraved = 1 ) /datum/outfit/admin/soviet/officer - belt = /obj/item/gun/projectile/revolver/rsh12 + belt = /obj/item/gun/projectile/revolver/reclinable/rsh12 backpack_contents = list( /obj/item/storage/box/soviet = 1, @@ -67,7 +67,7 @@ ) /datum/outfit/admin/soviet/admiral - belt = /obj/item/gun/projectile/revolver/rsh12 + belt = /obj/item/gun/projectile/revolver/reclinable/rsh12 backpack_contents = list( /obj/item/storage/box/soviet = 1,