diff --git a/code/modules/projectiles/guns/energy/stun.dm b/code/modules/projectiles/guns/energy/stun.dm index b41c1b090ba..41e8c9a53db 100644 --- a/code/modules/projectiles/guns/energy/stun.dm +++ b/code/modules/projectiles/guns/energy/stun.dm @@ -55,3 +55,14 @@ force = 10 matter = list(DEFAULT_WALL_MATERIAL = 200000) projectile_type = /obj/item/projectile/energy/bolt/large + +/obj/item/weapon/gun/energy/plasmastun + name = "plasma pulse projector" + desc = "The Mars Military Industries MA21 Selkie is a weapon that uses a laser pulse to ionise the local atmosphere, creating a disorienting pulse of plasma and deafening shockwave as the wave expands." + icon_state = "plasma_stun" + item_state = "plasma_stun" + fire_sound = 'sound/weapons/blaster.ogg' + origin_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 2, TECH_POWER = 3) + fire_delay = 20 + charge_cost = 600 + projectile_type = /obj/item/projectile/energy/plasmastun \ No newline at end of file diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 484c1e01636..750164a2602 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -65,6 +65,8 @@ var/tracer_type var/impact_type + var/vacuum_traversal = 1 //Determines if the projectile can exist in vacuum, if false, the projectile will be deleted if it enters vacuum. + var/datum/plot_vector/trajectory // used to plot the path of the projectile var/datum/vector_loc/location // current location of the projectile in pixel space var/matrix/effect_transform // matrix to rotate and scale projectile effects - putting it here so it doesn't @@ -300,6 +302,10 @@ qdel(src) // if it's left the world... kill it return + if (is_below_sound_pressure(get_turf(src)) && !vacuum_traversal) //Deletes projectiles that aren't supposed to bein vacuum if they leave pressurised areas + qdel(src) + return + before_move() Move(location.return_turf()) diff --git a/code/modules/projectiles/projectile/energy.dm b/code/modules/projectiles/projectile/energy.dm index 0d9d4ef5fa6..c45ea1917b6 100644 --- a/code/modules/projectiles/projectile/energy.dm +++ b/code/modules/projectiles/projectile/energy.dm @@ -133,3 +133,42 @@ light_range = 2 light_power = 0.5 light_color = "#33CC00" + +/obj/item/projectile/energy/plasmastun + name = "plasma pulse" + icon_state = "plasma_stun" + armor_penetration = 10 + kill_count = 4 + damage = 5 + agony = 70 + damage_type = BURN + vacuum_traversal = 0 //Projectile disappears in empty space + +/obj/item/projectile/energy/plasmastun/proc/bang(var/mob/living/carbon/M) + + to_chat(M, "You hear a loud roar.") + playsound(M.loc, 'sound/effects/bang.ogg', 50, 1) + var/ear_safety = 0 + ear_safety = M.get_ear_protection() + if(ear_safety == 1) + M.Weaken(2) + else if (ear_safety > 1) + M.Weaken(1) + else if (!ear_safety) + M.Stun(10) + M.Weaken(3) + M.ear_damage += rand(1, 10) + M.ear_deaf = max(M.ear_deaf,15) + if (M.ear_damage >= 15) + to_chat(M, "Your ears start to ring badly!") + if (prob(M.ear_damage - 5)) + to_chat(M, "You can't hear anything!") + M.sdisabilities |= DEAF + else + if (M.ear_damage >= 5) + to_chat(M, "Your ears start to ring!") + M.update_icons() + +/obj/item/projectile/energy/plasmastun/on_hit(var/atom/target) + bang(target) + . = ..() \ No newline at end of file diff --git a/icons/obj/gun.dmi b/icons/obj/gun.dmi index 996ab9699d0..6bf741b8afd 100644 Binary files a/icons/obj/gun.dmi and b/icons/obj/gun.dmi differ diff --git a/icons/obj/projectiles.dmi b/icons/obj/projectiles.dmi index 2e254cc5cb2..522d540bdbd 100644 Binary files a/icons/obj/projectiles.dmi and b/icons/obj/projectiles.dmi differ