Skip to content

Commit

Permalink
Adds a CL-exclusive pistol, the ES-4. (#3583)
Browse files Browse the repository at this point in the history
# About the pull request
This PR adds a CL- and therefore WY - exclusive pistol. The ES-4 is a
Weyland Corp manufactures less-lethal pistol that's essentially a reskin
of the 88 mod 4 that only fires less-lethal projectiles. Sprites by the
fantastic @thwompa
<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game
The pistol uses distinct blue muzzle flashes for its firing so that it's
easier to distinguish it from normal guns, and it comes straight from
the Aliens RPG. It also looks cool and makes it harder for the CL to get
a lethal firearm straight off the bat.
# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
add: Added the ES-4 electrostatic pistol to the CL's safe.
/:cl:

---------

Co-authored-by: Drathek <[email protected]>
  • Loading branch information
NewyearnewmeUwu and Drulikar committed Jul 18, 2023
1 parent 4b34582 commit a86a9e2
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 4 deletions.
5 changes: 5 additions & 0 deletions code/modules/projectiles/ammo_datums.dm
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,11 @@
stamina_damage = 25
shrapnel_chance = 0

// Reskinned rubber bullet used for the ES-4 CL pistol.
/datum/ammo/bullet/pistol/rubber/stun
name = "stun pistol bullet"
sound_override = null

// Used by M1911, Deagle and KT-42
/datum/ammo/bullet/pistol/heavy
name = "heavy pistol bullet"
Expand Down
37 changes: 37 additions & 0 deletions code/modules/projectiles/guns/pistols.dm
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,43 @@
flashlight.Attach(src)
update_attachable(flashlight.slot)

//-------------------------------------------------------
// ES-4 - Basically a CL-exclusive reskin of the 88 mod 4 that only uses less-lethal ammo.

/obj/item/weapon/gun/pistol/es4
name = "\improper ES-4 electrostatic pistol"
desc = "A Weyland Corp manufactured less-than-lethal pistol. Originally manufactured in the 2080s, the ES-4 electrostatic pistol fires electrically-charged bullets with high accuracy, though its cost and constant need for cleaning makes it a rare sight."
icon = 'icons/obj/items/weapons/guns/guns_by_faction/wy.dmi'
icon_state = "es4"
item_state = "es4"
fire_sound = 'sound/weapons/gun_es4.ogg'
firesound_volume = 20
reload_sound = 'sound/weapons/gun_88m4_reload.ogg'
unload_sound = 'sound/weapons/gun_88m4_unload.ogg'
current_mag = /obj/item/ammo_magazine/pistol/es4
force = 8
muzzle_flash = "muzzle_flash_blue"
flags_gun_features = GUN_AUTO_EJECTOR|GUN_CAN_POINTBLANK|GUN_ONE_HAND_WIELDED|GUN_AMMO_COUNTER
attachable_allowed = list(
/obj/item/attachable/flashlight,
/obj/item/attachable/reflex,
/obj/item/attachable/reddot,
/obj/item/attachable/lasersight,
)

/obj/item/weapon/gun/pistol/es4/set_gun_attachment_offsets()
attachable_offset = list("muzzle_x" = 27, "muzzle_y" = 21, "rail_x" = 10, "rail_y" = 22, "under_x" = 25, "under_y" = 18, "stock_x" = 18, "stock_y" = 15)


/obj/item/weapon/gun/pistol/es4/set_gun_config_values()
..()
fire_delay = FIRE_DELAY_TIER_9
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_7
scatter_unwielded = SCATTER_AMOUNT_TIER_7
damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_4

//-------------------------------------------------------
//VP78 - the only pistol viable as a primary.

Expand Down
13 changes: 13 additions & 0 deletions code/modules/projectiles/magazines/pistols.dm
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,19 @@
default_ammo = /datum/ammo/bullet/pistol/rubber
ammo_band_color = AMMO_BAND_COLOR_RUBBER

//-------------------------------------------------------
//ES-4

/obj/item/ammo_magazine/pistol/es4
name = "\improper ES-4 stun magazine (9mm)"
default_ammo = /datum/ammo/bullet/pistol/rubber/stun
caliber = "9mm"
desc = "Holds 19 rounds of specialized Conductive 9mm. Electrostatic propulsion in the ES-4 functions by propelling an cV9mm round, at a proportionally slower velocity to maintain a higher kinetic energy transfer rate. All this turns a penetrative round into a less-than-lethal round."
icon = 'icons/obj/items/weapons/guns/ammo_by_faction/wy.dmi'
icon_state = "es4"
max_rounds = 19
gun_type = /obj/item/weapon/gun/pistol/es4

//-------------------------------------------------------
//VP78

Expand Down
Binary file modified icons/mob/humans/onmob/items_lefthand_1.dmi
Binary file not shown.
Binary file modified icons/mob/humans/onmob/items_righthand_1.dmi
Binary file not shown.
Binary file modified icons/obj/items/weapons/guns/ammo_by_faction/wy.dmi
Binary file not shown.
Binary file modified icons/obj/items/weapons/guns/guns_by_faction/wy.dmi
Binary file not shown.
Binary file modified icons/obj/items/weapons/projectiles.dmi
Binary file not shown.
7 changes: 3 additions & 4 deletions maps/map_files/USS_Almayer/USS_Almayer.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -15802,13 +15802,12 @@
"bhM" = (
/obj/structure/safe,
/obj/item/coin/platinum,
/obj/item/attachable/suppressor,
/obj/item/spacecash/c1000/counterfeit,
/obj/item/spacecash/c1000/counterfeit,
/obj/item/clothing/accessory/storage/holster,
/obj/item/weapon/gun/pistol/mod88,
/obj/item/ammo_magazine/pistol/mod88/rubber,
/obj/item/ammo_magazine/pistol/mod88/rubber,
/obj/item/weapon/gun/pistol/es4,
/obj/item/ammo_magazine/pistol/es4,
/obj/item/ammo_magazine/pistol/es4,
/obj/item/clothing/suit/armor/bulletproof,
/turf/open/floor/wood/ship,
/area/almayer/command/corporateliason)
Expand Down
Binary file added sound/weapons/gun_es4.ogg
Binary file not shown.

0 comments on commit a86a9e2

Please sign in to comment.