diff --git a/_maps/RandomZLevels/SnowCabin.dmm b/_maps/RandomZLevels/SnowCabin.dmm index 9f7f9057af6..3dc485b2572 100644 --- a/_maps/RandomZLevels/SnowCabin.dmm +++ b/_maps/RandomZLevels/SnowCabin.dmm @@ -2392,7 +2392,7 @@ /area/awaymission/cabin/caves) "my" = ( /obj/effect/decal/cleanable/dirt, -/obj/item/gun/ballistic/automatic/sks/chekhov, +/obj/item/gun/ballistic/rifle/sks/chekhov, /turf/open/floor/mineral/plastitanium/red{ name = "soviet floor" }, diff --git a/code/datums/components/crafting/ranged_weapon.dm b/code/datums/components/crafting/ranged_weapon.dm index dc4a9b07ef8..3ce17b16b6f 100644 --- a/code/datums/components/crafting/ranged_weapon.dm +++ b/code/datums/components/crafting/ranged_weapon.dm @@ -430,7 +430,7 @@ /datum/crafting_recipe/sks name = "Sakhno SKS semi-automatic rifle" - result = /obj/item/gun/ballistic/automatic/sks/empty + result = /obj/item/gun/ballistic/rifle/sks/empty reqs = list( /obj/item/weaponcrafting/stock = 1, /obj/item/weaponcrafting/receiver = 1, diff --git a/code/modules/projectiles/guns/ballistic/automatic.dm b/code/modules/projectiles/guns/ballistic/automatic.dm index ae45e458cbe..2968e9052f8 100644 --- a/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/code/modules/projectiles/guns/ballistic/automatic.dm @@ -318,48 +318,6 @@ return ..() -// SKS semi-automatic rifle // - -/obj/item/gun/ballistic/automatic/sks - name = "\improper Sakhno SKS semi-automatic rifle" - desc = "A revival of the ancient SKS semi-automatic rifle, redesigned to utilize .310 Strilka rounds. Produced to celebrate the \ - establishment of the Third Soviet Union in the Spinward Sector. In the wake of the union's collapse, these weapons now hold a \ - unique place in history amongst the populace of the sector. However, they are strangely rarer than the Sakhno M2442 Army. \ - Frontier settlers are known for owning one of these for hunting purposes. Or fighting off annoying tax collectors." - icon = 'icons/obj/weapons/guns/wide_guns.dmi' - icon_state = "sks" - worn_icon_state = "sks" - inhand_icon_state = "sks" - burst_size = 1 - accepted_magazine_type = /obj/item/ammo_box/magazine/internal/sks - internal_magazine = TRUE - bolt_type = BOLT_TYPE_NO_BOLT - can_suppress = FALSE - tac_reloads = FALSE - w_class = WEIGHT_CLASS_BULKY - slot_flags = ITEM_SLOT_BACK - weapon_weight = WEAPON_HEAVY - projectile_damage_multiplier = 0.5 - fire_sound = 'sound/items/weapons/gun/rifle/shot_heavy.ogg' - fire_sound_volume = 90 - drop_sound = 'sound/items/handling/gun/ballistics/rifle/rifle_drop1.ogg' - pickup_sound = 'sound/items/handling/gun/ballistics/rifle/rifle_pickup1.ogg' - actions_types = list() - - SET_BASE_PIXEL(-8, 0) - -/obj/item/gun/ballistic/automatic/sks/add_bayonet_point() - AddComponent(/datum/component/bayonet_attachable, offset_x = 38, offset_y = 12) - -/obj/item/gun/ballistic/automatic/sks/chekhov - name = "\improper Chekhov's SKS semi-automatic rifle" - desc = "A revival of the ancient SKS semi-automatic rifle, redesigned to utilize .310 Strilka rounds. The name \ - 'Chekhov' is engraved in the side of the stock. You feel like this had some kind of significance at one point, \ - but you cannot be sure as to what that might have been. Or whether that true meaning has yet to reveal itself." - -/obj/item/gun/ballistic/automatic/sks/empty - spawn_magazine_type = /obj/item/ammo_box/magazine/internal/sks/empty - // Laser rifle (rechargeable magazine) // /obj/item/gun/ballistic/automatic/laser diff --git a/code/modules/projectiles/guns/ballistic/rifle.dm b/code/modules/projectiles/guns/ballistic/rifle.dm index 4fbd1e43d88..753ca5bbdc9 100644 --- a/code/modules/projectiles/guns/ballistic/rifle.dm +++ b/code/modules/projectiles/guns/ballistic/rifle.dm @@ -16,6 +16,8 @@ drop_sound = 'sound/items/handling/gun/ballistics/rifle/rifle_drop1.ogg' pickup_sound = 'sound/items/handling/gun/ballistics/rifle/rifle_pickup1.ogg' tac_reloads = FALSE + /// Does the bolt need to be open to interact with the gun (e.g. magazine interactions)? + var/need_bolt_lock_to_interact = FALSE /obj/item/gun/ballistic/rifle/rack(mob/user = null) if (bolt_locked == FALSE) @@ -28,6 +30,13 @@ drop_bolt(user) +/obj/item/gun/ballistic/rifle/item_interaction(mob/living/user, obj/item/tool, list/modifiers) + if(need_bolt_lock_to_interact && !bolt_locked && !istype(tool, /obj/item/knife)) + balloon_alert(user, "bolt closed!") + return + + return ..() + /obj/item/gun/ballistic/rifle/can_shoot() if (bolt_locked) return FALSE @@ -58,6 +67,7 @@ accepted_magazine_type = /obj/item/ammo_box/magazine/internal/boltaction can_be_sawn_off = TRUE weapon_weight = WEAPON_HEAVY + need_bolt_lock_to_interact = TRUE var/jamming_chance = 20 var/unjam_chance = 10 var/jamming_increment = 5 @@ -97,13 +107,6 @@ jamming_chance = clamp (jamming_chance, 0, 100) return ..() -/obj/item/gun/ballistic/rifle/boltaction/attackby(obj/item/item, mob/user, params) - if(!bolt_locked && !istype(item, /obj/item/knife)) - balloon_alert(user, "bolt closed!") - return - - . = ..() - /obj/item/gun/ballistic/rifle/boltaction/blow_up(mob/user) . = FALSE if(chambered?.loaded_projectile) @@ -406,7 +409,7 @@ name = "anti-materiel sniper rifle" desc = "A boltaction anti-materiel rifle, utilizing .50 BMG cartridges. While technically outdated in modern arms markets, it still works exceptionally well as \ an anti-personnel rifle. In particular, the employment of modern armored MODsuits utilizing advanced armor plating has given this weapon a new home on the battlefield. \ - It is also able to be suppressed....somehow." + It is also able to be suppressed... somehow." icon = 'icons/obj/weapons/guns/ballistic.dmi' icon_state = "sniper" lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi' @@ -452,6 +455,38 @@ /obj/item/gun/ballistic/rifle/sniper_rifle/syndicate desc = "A boltaction anti-materiel rifle, utilizing .50 BMG cartridges. While technically outdated in modern arms markets, it still works exceptionally well as \ an anti-personnel rifle. In particular, the employment of modern armored MODsuits utilizing advanced armor plating has given this weapon a new home on the battlefield. \ - It is also able to be suppressed....somehow. This one seems to have a little picture of someone in a blood-red MODsuit stenciled on it, pointing at a green floppy disk. \ + It is also able to be suppressed... somehow. This one seems to have a little picture of someone in a blood-red MODsuit stenciled on it, pointing at a green floppy disk. \ Who knows what that might mean." pin = /obj/item/firing_pin/implant/pindicate + +// SKS semi-automatic rifle // + +/obj/item/gun/ballistic/rifle/sks + name = "\improper Sakhno SKS semi-automatic rifle" + desc = "A revival of the ancient SKS semi-automatic rifle, redesigned to utilize .310 Strilka rounds. Produced to celebrate the \ + establishment of the Third Soviet Union in the Spinward Sector. In the wake of the union's collapse, these weapons now hold a \ + unique place in history amongst the populace of the sector. However, they are strangely rarer than the Sakhno M2442 Army. \ + Frontier settlers are known for owning one of these for hunting purposes. Or fighting off annoying tax collectors." + icon = 'icons/obj/weapons/guns/wide_guns.dmi' + icon_state = "sks" + worn_icon_state = "sks" + inhand_icon_state = "sks" + accepted_magazine_type = /obj/item/ammo_box/magazine/internal/sks + need_bolt_lock_to_interact = TRUE + semi_auto = TRUE + slot_flags = ITEM_SLOT_BACK + projectile_damage_multiplier = 0.5 + + SET_BASE_PIXEL(-8, 0) + +/obj/item/gun/ballistic/rifle/sks/add_bayonet_point() + AddComponent(/datum/component/bayonet_attachable, offset_x = 38, offset_y = 12) + +/obj/item/gun/ballistic/rifle/sks/chekhov + name = "\improper Chekhov's SKS semi-automatic rifle" + desc = "A revival of the ancient SKS semi-automatic rifle, redesigned to utilize .310 Strilka rounds. The name \ + 'Chekhov' is engraved in the side of the stock. You feel like this had some kind of significance at one point, \ + but you cannot be sure as to what that might have been. Or whether that true meaning has yet to reveal itself." + +/obj/item/gun/ballistic/rifle/sks/empty + spawn_magazine_type = /obj/item/ammo_box/magazine/internal/sks/empty diff --git a/icons/obj/weapons/guns/wide_guns.dmi b/icons/obj/weapons/guns/wide_guns.dmi index 8327c654420..74dc0cdae01 100644 Binary files a/icons/obj/weapons/guns/wide_guns.dmi and b/icons/obj/weapons/guns/wide_guns.dmi differ diff --git a/tools/UpdatePaths/Scripts/89780_sks_auto_to_sks_rifle.txt b/tools/UpdatePaths/Scripts/89780_sks_auto_to_sks_rifle.txt new file mode 100644 index 00000000000..215896d69c8 --- /dev/null +++ b/tools/UpdatePaths/Scripts/89780_sks_auto_to_sks_rifle.txt @@ -0,0 +1 @@ +/obj/item/gun/ballistic/automatic/sks/@SUBTYPES : /obj/item/gun/ballistic/rifle/sks/@SUBTYPES{@OLD}