diff --git a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm index c9d0529e2c2..fab5d5607b4 100644 --- a/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm +++ b/code/game/machinery/vending/vendor_types/squad_prep/squad_prep.dm @@ -548,6 +548,8 @@ list("Spare PDT/L Battle Buddy Kit", round(scale * 3), /obj/item/storage/box/pdt_kit/advanced, VENDOR_ITEM_REGULAR), list("Rail Flashlight", round(scale * 5), /obj/item/attachable/flashlight, VENDOR_ITEM_REGULAR), list("Type 80 Bayonet", round(scale * 5), /obj/item/attachable/bayonet/upp, null, VENDOR_ITEM_REGULAR), + list("Type 83 Grenade Launcher", 1, /obj/item/attachable/attached_gun/grenade/upp, null, VENDOR_ITEM_REGULAR), + list("VOG-73 HE Grenade Packet", 2, /obj/item/storage/box/packet/high_explosive/upp/impact, null, VENDOR_ITEM_REGULAR), list("CLOTHING", -1, null, null), list("Cap", round(scale * 5), /obj/item/clothing/head/uppcap, VENDOR_ITEM_REGULAR), diff --git a/code/game/objects/items/explosives/grenades/grenade.dm b/code/game/objects/items/explosives/grenades/grenade.dm index e5c991ddd9a..2401c45d4ec 100644 --- a/code/game/objects/items/explosives/grenades/grenade.dm +++ b/code/game/objects/items/explosives/grenades/grenade.dm @@ -18,7 +18,7 @@ var/det_time = 40 var/dangerous = FALSE //Make an danger overlay for humans? var/arm_sound = 'sound/weapons/armbomb.ogg' - var/has_arm_sound = FALSE + var/has_arm_sound = TRUE var/underslug_launchable = FALSE var/hand_throwable = TRUE harmful = TRUE //Is it harmful? Are they banned for synths? @@ -85,15 +85,6 @@ SPAN_WARNING("You prime \a [name]!")) msg_admin_attack("[key_name(user)] primed \a grenade ([name]) in [get_area(src)] ([src.loc.x],[src.loc.y],[src.loc.z]).", src.loc.x, src.loc.y, src.loc.z) user.attack_log += text("\[[time_stamp()]\] [key_name(user)] primed \a grenade ([name]) at ([src.loc.x],[src.loc.y],[src.loc.z])") - if(initial(dangerous)) - var/nade_sound - if(has_species(user, "Human")) - nade_sound = get_sfx("sound/weapons/grenade.ogg") ///In a perfect world, we'd make the M40 style grenades use this sound and the rest retain the old callout - //nade_sound = user.gender == FEMALE ? get_sfx("female_fragout") : get_sfx("male_fragout") ///But this is not a perfect world. Keeping this here in case someone wants to do that - else if(ismonkey(user)) - nade_sound = sound('sound/voice/monkey_scream.ogg') - if(nade_sound) - playsound(user, nade_sound, 35) var/mob/living/carbon/C = user if(istype(C) && !C.throw_mode) diff --git a/code/game/objects/items/explosives/grenades/marines.dm b/code/game/objects/items/explosives/grenades/marines.dm index 20b5ee6af3b..49eacaa02a8 100644 --- a/code/game/objects/items/explosives/grenades/marines.dm +++ b/code/game/objects/items/explosives/grenades/marines.dm @@ -23,6 +23,7 @@ var/shrapnel_type = /datum/ammo/bullet/shrapnel var/fire_resistance = 15 //to prevent highly controlled massive explosions falloff_mode = EXPLOSION_FALLOFF_SHAPE_EXPONENTIAL_HALF + arm_sound = "sound/weapons/grenade.ogg" /obj/item/explosive/grenade/high_explosive/New() @@ -106,6 +107,8 @@ shrapnel_count = 0 dual_purpose = FALSE falloff_mode = EXPLOSION_FALLOFF_SHAPE_LINEAR + has_arm_sound = TRUE + arm_sound = 'sound/weapons/pinpull.ogg' /obj/item/explosive/grenade/high_explosive/upp name = "\improper Type 6 grenade" @@ -119,6 +122,7 @@ shrapnel_count = 48 dual_purpose = FALSE falloff_mode = EXPLOSION_FALLOFF_SHAPE_LINEAR + arm_sound = 'sound/weapons/pinpull.ogg' /* //================================================ @@ -291,6 +295,7 @@ flameshape = FLAMESHAPE_DEFAULT radius = 2 fire_type = FIRE_VARIANT_DEFAULT + has_arm_sound = FALSE /obj/item/explosive/grenade/incendiary/impact/prime() return @@ -328,6 +333,7 @@ explosion_power = 100 //hedp shrapnel_count = 0 falloff_mode = EXPLOSION_FALLOFF_SHAPE_LINEAR + has_arm_sound = FALSE /obj/item/explosive/grenade/high_explosive/impact/prime() // We don't prime, we use launch_impact. @@ -344,6 +350,12 @@ cell_explosion(loc, explosion_power, explosion_falloff, falloff_mode, last_move_dir, cause_data) qdel(src) +/obj/item/explosive/grenade/high_explosive/impact/upp + name = "\improper VOG-73 HE grenade" + desc = "This is a 40mm grenade, designed to be launched by a grenade launcher and detonate on impact. This one bears markings of the UPP." + icon_state = "grenade_40mm_upp" + item_state = "grenade_hedp" + /obj/item/explosive/grenade/high_explosive/airburst/buckshot name = "\improper 40mm Buckshot Shell" desc = "A classic of grenade launchers everywhere, this is a 40mm shell loaded with buckshot; very dangerous, watch your fire." @@ -453,6 +465,7 @@ radius = 2 var/shrapnel_count = 5 var/shrapnel_type = /datum/ammo/bullet/shrapnel/incendiary + has_arm_sound = FALSE /obj/item/explosive/grenade/incendiary/airburst/prime() @@ -497,6 +510,8 @@ var/datum/effect_system/smoke_spread/bad/smoke var/smoke_radius = 3 dual_purpose = TRUE + has_arm_sound = TRUE + arm_sound = "sound/weapons/grenade.ogg" /obj/item/explosive/grenade/smokebomb/New() ..() @@ -531,6 +546,12 @@ smoke.start() qdel(src) +/obj/item/explosive/grenade/smokebomb/upp + name = "RDG-17 smoke grenade" + desc = "Handgrenade, smoke, model 17. Simple, old and efficient design, these grenades are produced basically everywhere for use in the UPP Armed Collective." + icon_state = "grenade_upp_smoke" + arm_sound = 'sound/weapons/pinpull.ogg' + /obj/item/explosive/grenade/phosphorus name = "\improper M60 WPSI grenade" desc = "The M60 WPSI is a small, but powerful chemical compound grenade, designated as such with a white cap. Usable for both smoke-screen purposes and as an incendiary device. Two second fuse." @@ -573,6 +594,7 @@ desc = "A deadly gas grenade found within the ranks of the UPP. Designed to spill white phosphorus on the target. It explodes 2 seconds after the pin has been pulled." icon_state = "grenade_upp_wp" item_state = "grenade_upp_wp" + arm_sound = 'sound/weapons/pinpull.ogg' /obj/item/explosive/grenade/phosphorus/clf name = "\improper improvised phosphorus bomb" @@ -847,6 +869,7 @@ det_time = 0 // Unused, because we don't use prime. hand_throwable = FALSE smoke_radius = 2 + has_arm_sound = FALSE /obj/item/explosive/grenade/smokebomb/airburst/New() ..() @@ -997,6 +1020,7 @@ explosion_power = 0 shrapnel_type = /datum/ammo/bullet/shrapnel/rubber antigrief_protection = FALSE + arm_sound = 'sound/weapons/pinpull.ogg' /// Baton slugs /obj/item/explosive/grenade/baton @@ -1006,6 +1030,7 @@ item_state = "rubber_grenade" hand_throwable = FALSE antigrief_protection = FALSE + has_arm_sound = FALSE /obj/item/explosive/grenade/baton/flamer_fire_act() @@ -1030,6 +1055,7 @@ explosion_power = 300 det_time = 50 unacidable = TRUE + arm_sound = 'sound/voice/holy_chorus.ogg'//https://www.youtube.com/watch?v=hNV5sPZFuGg falloff_mode = EXPLOSION_FALLOFF_SHAPE_LINEAR @@ -1042,6 +1068,7 @@ underslug_launchable = TRUE harmful = FALSE var/foam_metal_type = FOAM_METAL_TYPE_IRON + arm_sound = "sound/weapons/grenade.ogg" /obj/item/explosive/grenade/metal_foam/prime() var/datum/effect_system/foam_spread/s = new() @@ -1055,6 +1082,7 @@ name = "bursting pipe" alpha = 0 mouse_opacity = MOUSE_OPACITY_TRANSPARENT + has_arm_sound = FALSE /obj/item/explosive/grenade/incendiary/bursting_pipe name = "bursting pipe" @@ -1065,6 +1093,7 @@ burn_level = BURN_LEVEL_TIER_3 radius = 2 fire_type = FIRE_VARIANT_DEFAULT + has_arm_sound = FALSE //Royal marine grenades @@ -1085,3 +1114,4 @@ burn_level = BURN_LEVEL_TIER_8 radius = 3 fire_type = FIRE_VARIANT_DEFAULT + arm_sound = "sound/weapons/grenade.ogg" diff --git a/code/modules/projectiles/ammo_boxes/grenade_packets.dm b/code/modules/projectiles/ammo_boxes/grenade_packets.dm index 74274d9fe88..75217726c25 100644 --- a/code/modules/projectiles/ammo_boxes/grenade_packets.dm +++ b/code/modules/projectiles/ammo_boxes/grenade_packets.dm @@ -50,12 +50,22 @@ GLOBAL_LIST_INIT(grenade_packets, list( /obj/item/storage/box/packet/high_explosive/upp name = "\improper Type 6 fragmentation grenade packet" - desc = "It contains three Type 6 fragmentation grenades." + desc = "It contains six Type 6 fragmentation grenades." icon = 'icons/obj/items/storage/kits.dmi' - icon_state = "woodbox" - + icon_state = "nadeboxupp" + storage_slots = 6 content_type = /obj/item/explosive/grenade/high_explosive/upp +/obj/item/storage/box/packet/high_explosive/upp/smoke + name = "\improper RDG-17 smoke grenade packet" + desc = "It contains six RDG-17 smoke grenades." + content_type = /obj/item/explosive/grenade/smokebomb/upp + +/obj/item/storage/box/packet/high_explosive/upp/impact + name = "\improper VOG-73 fragmentation grenade packet" + desc = "It contains six VOG-73 fragmentation grenades." + content_type = /obj/item/explosive/grenade/high_explosive/impact/upp + /obj/item/storage/box/packet/baton_slug name = "\improper HIRR baton slug packet" desc = "It contains three HIRR (High Impact Rubber Rounds) Baton Slugs." diff --git a/code/modules/projectiles/gun_attachables.dm b/code/modules/projectiles/gun_attachables.dm index 96d5bd31954..45ad14cd860 100644 --- a/code/modules/projectiles/gun_attachables.dm +++ b/code/modules/projectiles/gun_attachables.dm @@ -2839,6 +2839,7 @@ Defined in conflicts.dm of the #defines folder. var/cocked = TRUE // has the UGL been cocked via opening and closing the breech? var/open_sound = 'sound/weapons/handling/ugl_open.ogg' var/close_sound = 'sound/weapons/handling/ugl_close.ogg' + var/has_breech = TRUE /obj/item/attachable/attached_gun/grenade/Initialize() . = ..() @@ -2855,6 +2856,8 @@ Defined in conflicts.dm of the #defines folder. else . += "It's empty." /obj/item/attachable/attached_gun/grenade/unique_action(mob/user) + if(!has_breech) + return if(!ishuman(usr)) return if(user.is_mob_incapacitated() || !isturf(usr.loc)) @@ -2897,7 +2900,7 @@ Defined in conflicts.dm of the #defines folder. update_icon() /obj/item/attachable/attached_gun/grenade/reload_attachment(obj/item/explosive/grenade/G, mob/user) - if(!breech_open) + if(!breech_open && has_breech) to_chat(user, SPAN_WARNING("\The [src]'s breech must be open to load grenades! (use unique-action)")) return if(!istype(G) || istype(G, /obj/item/explosive/grenade/spawnergrenade/)) @@ -2918,7 +2921,7 @@ Defined in conflicts.dm of the #defines folder. /obj/item/attachable/attached_gun/grenade/unload_attachment(mob/user, reload_override = FALSE, drop_override = FALSE, loc_override = FALSE) . = TRUE //Always uses special unloading. - if(!breech_open) + if(!breech_open && has_breech) to_chat(user, SPAN_WARNING("\The [src] is closed! You must open it to take out grenades!")) return if(!current_rounds) @@ -2943,12 +2946,12 @@ Defined in conflicts.dm of the #defines folder. if(user) to_chat(user, SPAN_WARNING("You must hold [gun] with two hands to use \the [src].")) return - if(breech_open) + if(breech_open && has_breech) if(user) to_chat(user, SPAN_WARNING("You must close the breech to fire \the [src]!")) playsound(user, 'sound/weapons/gun_empty.ogg', 50, TRUE, 5) return - if(!cocked) + if(!cocked && has_breech) if(user) to_chat(user, SPAN_WARNING("You must cock \the [src] to fire it! (open and close the breech)")) playsound(user, 'sound/weapons/gun_empty.ogg', 50, TRUE, 5) @@ -3033,6 +3036,20 @@ Defined in conflicts.dm of the #defines folder. . = ..() grenade_pass_flags = NO_FLAGS +/obj/item/attachable/attached_gun/grenade/upp + name = "\improper Type 83 overslung grenade launcher" + desc = "Unorthodox design, this single-round grenade launchers was made specifically for use with Type 71 pulse rifles. It can be quickly connected to electronic firing mechanism of the rifle, albeit wiring is prone to failures." + icon_state = "type83" + attach_icon = "type83_a" + current_rounds = 0 + max_rounds = 1 + max_range = 14 + attachment_firing_delay = 5 + slot = "special" + pixel_shift_x = 0 + pixel_shift_y = 0 + has_breech = FALSE + //"ammo/flamethrower" is a bullet, but the actual process is handled through fire_attachment, linked through Fire(). /obj/item/attachable/attached_gun/flamer name = "mini flamethrower" diff --git a/code/modules/projectiles/guns/rifles.dm b/code/modules/projectiles/guns/rifles.dm index 04004aeb6f1..f0fcd946c06 100644 --- a/code/modules/projectiles/guns/rifles.dm +++ b/code/modules/projectiles/guns/rifles.dm @@ -1354,6 +1354,7 @@ /obj/item/attachable/attached_gun/flamer, /obj/item/attachable/attached_gun/flamer/advanced, /obj/item/attachable/attached_gun/extinguisher, + /obj/item/attachable/attached_gun/grenade/upp, ) flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_AMMO_COUNTER @@ -1361,7 +1362,7 @@ start_automatic = TRUE /obj/item/weapon/gun/rifle/type71/set_gun_attachment_offsets() - attachable_offset = list("muzzle_x" = 33, "muzzle_y" = 17,"rail_x" = 10, "rail_y" = 23, "under_x" = 20, "under_y" = 13, "stock_x" = 11, "stock_y" = 13) + attachable_offset = list("muzzle_x" = 33, "muzzle_y" = 17,"rail_x" = 10, "rail_y" = 23, "under_x" = 20, "under_y" = 13, "stock_x" = 11, "stock_y" = 13, "special_x" = 0, "special_y" = 0) /obj/item/weapon/gun/rifle/type71/set_gun_config_values() ..() diff --git a/icons/obj/items/storage/kits.dmi b/icons/obj/items/storage/kits.dmi index 98d671ffdc4..0cf8af4f937 100644 Binary files a/icons/obj/items/storage/kits.dmi and b/icons/obj/items/storage/kits.dmi differ diff --git a/icons/obj/items/weapons/grenade.dmi b/icons/obj/items/weapons/grenade.dmi index 08334684bce..4e079295034 100644 Binary files a/icons/obj/items/weapons/grenade.dmi and b/icons/obj/items/weapons/grenade.dmi differ diff --git a/icons/obj/items/weapons/guns/attachments/under.dmi b/icons/obj/items/weapons/guns/attachments/under.dmi index 8d42d0ee014..924d089960c 100644 Binary files a/icons/obj/items/weapons/guns/attachments/under.dmi and b/icons/obj/items/weapons/guns/attachments/under.dmi differ diff --git a/maps/map_files/chapaev/chapaev.dmm b/maps/map_files/chapaev/chapaev.dmm index 441443772fd..3520c9d11c1 100644 --- a/maps/map_files/chapaev/chapaev.dmm +++ b/maps/map_files/chapaev/chapaev.dmm @@ -1895,21 +1895,13 @@ icon_state = "N"; pixel_y = 1 }, +/obj/item/storage/box/packet/high_explosive/upp, /obj/item/storage/box/packet/high_explosive/upp{ - color = "#8B795C" - }, -/obj/item/storage/box/packet/high_explosive/upp{ - color = "#8B795C"; pixel_y = -5 }, +/obj/item/storage/box/packet/high_explosive/upp, +/obj/item/storage/box/packet/high_explosive/upp, /obj/item/storage/box/packet/high_explosive/upp{ - color = "#8B795C" - }, -/obj/item/storage/box/packet/high_explosive/upp{ - color = "#8B795C" - }, -/obj/item/storage/box/packet/high_explosive/upp{ - color = "#8B795C"; pixel_y = 6 }, /obj/structure/closet/crate/secure/ammo{ @@ -2535,6 +2527,12 @@ name = "wooden cargo crate"; anchored = 1 }, +/obj/item/storage/box/packet/high_explosive/upp/smoke{ + pixel_y = 15 + }, +/obj/item/storage/box/packet/high_explosive/upp/smoke{ + pixel_y = 21 + }, /turf/open/floor/strata/floor3/east, /area/golden_arrow/supply) "vC" = ( @@ -4018,21 +4016,13 @@ icon_state = "N"; pixel_y = 1 }, +/obj/item/storage/box/packet/high_explosive/upp, /obj/item/storage/box/packet/high_explosive/upp{ - color = "#8B795C" - }, -/obj/item/storage/box/packet/high_explosive/upp{ - color = "#8B795C"; pixel_y = -5 }, +/obj/item/storage/box/packet/high_explosive/upp, +/obj/item/storage/box/packet/high_explosive/upp, /obj/item/storage/box/packet/high_explosive/upp{ - color = "#8B795C" - }, -/obj/item/storage/box/packet/high_explosive/upp{ - color = "#8B795C" - }, -/obj/item/storage/box/packet/high_explosive/upp{ - color = "#8B795C"; pixel_y = 6 }, /obj/structure/closet/crate/secure/ammo{