Files
Bubberstation/code/modules/projectiles/projectile/beams.dm
CRITAWAKETS 63d6c2e962 Adds in the smoothbore disablers. (#76773)
## About The Pull Request

This PR adds in a craftable smoothbore disabler, a pistol companion to
the lethal laser musket. Unlike the musket, it fires a disabler shot.
Singular. Weak in armor too. After you fire it, you've gotta crank it,
but only one crank.

The good thing about it is that you can simply add more smoothbores to
your inventory, and use 4 of them to take down a target.

The bad thing is that it's a smoothbore (which for an energy weapon,
means no lens is installed). It has 22.5 degrees of inaccuracy. Have
fun.

Militia Men start with a holster containing two of these, fitting with
their equipment. But of course, the Militia General has an upgraded
laser musket, so... He needs a better smoothbore too.

**INTRODUCING THE ELITE SMOOTHBORE DISABLER**
Using ANCIENT TECHNOLOGIES and PURE BLING, you can fire TWO shots, not
be weak against armour AND have actual accuracy (and a +5 damage boost
because i figured why the hell not). This is the strongest upgraded
variant of the shitty maint guns, so the tome to craft it is currently
unavailable. I want someone to figure out a creative way to put it
somewhere that isn't just a random spawn in maintenance.


![image](https://github.com/tgstation/tgstation/assets/13697285/02c396b8-4b72-45f8-b471-a006df132aff)

The Militia General only has one elite smoothbore. It's too rare and
powerful to simply have two. Even though a regular disabler is better in
every way.

Smoothbore Disabler Recipe:
1x Weapon Stock
5x Cable Coil
1x Pipe
1x Micro-Laser
1x Power Cell
1x Mouse Trap
Needs: Screwdriver, Wrench. Takes 10 seconds to make.

Elite Smoothbore Disabler Recipe:
1x Smoothbore Disabler
5x Gold Ingots/Sheets
1x Hyper-Capacity Power Cell
10u Tempomyocin
Needs: Screwdriver. Takes 20 seconds to make.
Recipe requires recipe book.

## Why It's Good For The Game

Having a sidearm to go with your laser musket is neat, alongside the
fact that it just allows following up on someone. I don't have much to
say honestly, I just think it's neat. Also the idea of an assistant
going FULL BLACKBEARD, carrying 4 pistols and having to toss them away
in order to shoot again cracks me up.

Oh and this is the part for coders: I've de-spaghettified some code with
the maint gun recipe granters, and the gun crank is now a component.
It's likely you could use it on any item that sends the proper signal,
so I kind of overbuilt it on purpose.

Also the attack_self on guns now returns parent. This should allow it to
send a signal alongside putting your grubby fingerprints on the weapon
when you switch modes. There could be bugs but they should be easy to
fix if they pop up, mode switching on guns works without a fuss.

## Changelog

🆑
add: Added the smoothbore disabler and it's prime variant. You can now
craft a disabler with only one shot and terrible accuracy.
code: Gun cranking has been made a component and could theoretically be
used on more than guns.
/🆑
2023-07-17 12:23:31 +01:00

250 lines
7.2 KiB
Plaintext

/obj/projectile/beam
name = "laser"
icon_state = "laser"
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE
damage = 20
damage_type = BURN
hitsound = 'sound/weapons/sear.ogg'
hitsound_wall = 'sound/weapons/effects/searwall.ogg'
armor_flag = LASER
eyeblur = 2
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser
light_system = MOVABLE_LIGHT
light_range = 1
light_power = 1
light_color = COLOR_SOFT_RED
ricochets_max = 50 //Honk!
ricochet_chance = 80
reflectable = REFLECT_NORMAL
wound_bonus = -20
bare_wound_bonus = 10
/obj/projectile/beam/laser
tracer_type = /obj/effect/projectile/tracer/laser
muzzle_type = /obj/effect/projectile/muzzle/laser
impact_type = /obj/effect/projectile/impact/laser
wound_bonus = -20
damage = 25
bare_wound_bonus = 40
//overclocked laser, does a bit more damage but has much higher wound power (-0 vs -20)
/obj/projectile/beam/laser/hellfire
name = "hellfire laser"
wound_bonus = 0
damage = 30
speed = 0.6 // higher power = faster, that's how light works right
/obj/projectile/beam/laser/hellfire/Initialize(mapload)
. = ..()
transform *= 2
/obj/projectile/beam/laser/heavylaser
name = "heavy laser"
icon_state = "heavylaser"
damage = 40
tracer_type = /obj/effect/projectile/tracer/heavy_laser
muzzle_type = /obj/effect/projectile/muzzle/heavy_laser
impact_type = /obj/effect/projectile/impact/heavy_laser
/obj/projectile/beam/laser/on_hit(atom/target, blocked = FALSE)
. = ..()
if(iscarbon(target))
var/mob/living/carbon/M = target
M.ignite_mob()
else if(isturf(target))
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser/wall
/obj/projectile/beam/laser/musket
name = "low-power laser"
icon_state = "laser_musket"
impact_effect_type = /obj/effect/temp_visual/impact_effect/purple_laser
damage = 25
stamina = 40
light_color = COLOR_STRONG_VIOLET
weak_against_armour = TRUE
/obj/projectile/beam/laser/musket/prime
name = "mid-power laser"
damage = 30
stamina = 45
weak_against_armour = FALSE
/obj/projectile/beam/weak
damage = 15
/obj/projectile/beam/weak/penetrator
armour_penetration = 50
/obj/projectile/beam/practice
name = "practice laser"
damage = 0
/obj/projectile/beam/scatter
name = "laser pellet"
icon_state = "scatterlaser"
damage = 5
/obj/projectile/beam/xray
name = "\improper X-ray beam"
icon_state = "xray"
damage = 15
range = 15
armour_penetration = 100
pass_flags = PASSTABLE | PASSGLASS | PASSGRILLE | PASSCLOSEDTURF | PASSMACHINE | PASSSTRUCTURE | PASSDOORS
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
light_color = LIGHT_COLOR_GREEN
tracer_type = /obj/effect/projectile/tracer/xray
muzzle_type = /obj/effect/projectile/muzzle/xray
impact_type = /obj/effect/projectile/impact/xray
/obj/projectile/beam/disabler
name = "disabler beam"
icon_state = "omnilaser"
damage = 30
damage_type = STAMINA
armor_flag = ENERGY
hitsound = 'sound/weapons/sear_disabler.ogg'
eyeblur = 0
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
light_color = LIGHT_COLOR_BLUE
tracer_type = /obj/effect/projectile/tracer/disabler
muzzle_type = /obj/effect/projectile/muzzle/disabler
impact_type = /obj/effect/projectile/impact/disabler
/obj/projectile/beam/disabler/weak
damage = 15
/obj/projectile/beam/disabler/smoothbore
name = "unfocused disabler beam"
weak_against_armour = TRUE
/obj/projectile/beam/disabler/smoothbore/prime
name = "focused disabler beam"
weak_against_armour = FALSE
damage = 35 //slight increase in damage just for the hell of it
/obj/projectile/beam/pulse
name = "pulse"
icon_state = "u_laser"
damage = 50
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
light_color = LIGHT_COLOR_BLUE
tracer_type = /obj/effect/projectile/tracer/pulse
muzzle_type = /obj/effect/projectile/muzzle/pulse
impact_type = /obj/effect/projectile/impact/pulse
wound_bonus = 10
/obj/projectile/beam/pulse/on_hit(atom/target, blocked = FALSE)
. = ..()
if (!QDELETED(target) && (isturf(target) || isstructure(target)))
if(isobj(target))
SSexplosions.med_mov_atom += target
else
SSexplosions.medturf += target
/obj/projectile/beam/pulse/shotgun
damage = 30
/obj/projectile/beam/pulse/heavy
name = "heavy pulse laser"
icon_state = "pulse1_bl"
projectile_piercing = ALL
var/pierce_hits = 2
/obj/projectile/beam/pulse/heavy/on_hit(atom/target, blocked = FALSE)
if(pierce_hits <= 0)
projectile_piercing = NONE
pierce_hits -= 1
..()
/obj/projectile/beam/emitter
name = "emitter beam"
icon_state = "emitter"
damage = 30
impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser
light_color = LIGHT_COLOR_GREEN
wound_bonus = -40
bare_wound_bonus = 70
/obj/projectile/beam/emitter/singularity_pull()
return //don't want the emitters to miss
/obj/projectile/beam/emitter/hitscan
hitscan = TRUE
muzzle_type = /obj/effect/projectile/muzzle/laser/emitter
tracer_type = /obj/effect/projectile/tracer/laser/emitter
impact_type = /obj/effect/projectile/impact/laser/emitter
impact_effect_type = null
hitscan_light_intensity = 3
hitscan_light_range = 0.75
hitscan_light_color_override = COLOR_LIME
muzzle_flash_intensity = 6
muzzle_flash_range = 2
muzzle_flash_color_override = COLOR_LIME
impact_light_intensity = 7
impact_light_range = 2.5
impact_light_color_override = COLOR_LIME
/obj/projectile/beam/lasertag
name = "laser tag beam"
icon_state = "omnilaser"
hitsound = null
damage = 0
damage_type = STAMINA
var/suit_types = list(/obj/item/clothing/suit/redtag, /obj/item/clothing/suit/bluetag)
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
light_color = LIGHT_COLOR_BLUE
/obj/projectile/beam/lasertag/on_hit(atom/target, blocked = FALSE)
. = ..()
if(ishuman(target))
var/mob/living/carbon/human/M = target
if(istype(M.wear_suit))
if(M.wear_suit.type in suit_types)
M.adjustStaminaLoss(34)
/obj/projectile/beam/lasertag/redtag
icon_state = "laser"
suit_types = list(/obj/item/clothing/suit/bluetag)
impact_effect_type = /obj/effect/temp_visual/impact_effect/red_laser
light_color = COLOR_SOFT_RED
tracer_type = /obj/effect/projectile/tracer/laser
muzzle_type = /obj/effect/projectile/muzzle/laser
impact_type = /obj/effect/projectile/impact/laser
/obj/projectile/beam/lasertag/redtag/hitscan
hitscan = TRUE
/obj/projectile/beam/lasertag/bluetag
icon_state = "bluelaser"
suit_types = list(/obj/item/clothing/suit/redtag)
tracer_type = /obj/effect/projectile/tracer/laser/blue
muzzle_type = /obj/effect/projectile/muzzle/laser/blue
impact_type = /obj/effect/projectile/impact/laser/blue
/obj/projectile/beam/lasertag/bluetag/hitscan
hitscan = TRUE
//a shrink ray that shrinks stuff, which grows back after a short while.
/obj/projectile/beam/shrink
name = "shrink ray"
icon_state = "blue_laser"
hitsound = 'sound/weapons/shrink_hit.ogg'
damage = 0
damage_type = STAMINA
armor_flag = ENERGY
impact_effect_type = /obj/effect/temp_visual/impact_effect/shrink
light_color = LIGHT_COLOR_BLUE
var/shrink_time = 90
/obj/projectile/beam/shrink/on_hit(atom/target, blocked = FALSE)
. = ..()
if(isopenturf(target) || isindestructiblewall(target))//shrunk floors wouldnt do anything except look weird, i-walls shouldn't be bypassable
return
target.AddComponent(/datum/component/shrink, shrink_time)
/obj/projectile/beam/shrink/is_hostile_projectile()
return TRUE