Skip to content

Commit

Permalink
A Pellet Gun! A Recreational rifle for Civilians. (#6628)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## Civilian Shooting Made Easy!
Many characters on the server may be from societies where firearms are
restricted (after all not everyone has a military backstory) or
otherwise come from peaceful planets. Now living in the dangerous
frontier, they may want to learn to shoot. However, very reasonably the
environment of the station restricts access to firearms. A pellet gun
provides them the opportunity to learn the basics of ballistic firearms
operation without needing security to look over their shoulder. This PR
adds a simple pellet gun and an outdoor range to Atlas. Security can
hand out the pellet guns without worry they may be misused. Civilians
can freely use the pellet guns for recreational purposes or training.
The outdoor range also provides a no-access required public-use facility
for shooting.

The station starts with four pellet guns and four pellet boxes stored in
the security entrance checkpoint in plain-view locker. They simply need
someone with sec access to unlock it and hand it off to people. Single
ones can also be ordered from cargo.

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why Not Just Use Donk Soft Guns?
Mechanically not much different but aesthetically/in character they are.
In Character, most people see the brightly colored toy dart gun much
differently from a pellet shooter which resembles a real weapon, NT
probably thinks so too. Consider this, in terms of RP, the middle step
between a character learning to shoot a dart gun versus beginning to use
a real one.

<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

:cl:
add: a pellet gun and associated icons.
add: two new hangable targets that don't look like people
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
CharlesWedge authored Jul 28, 2024
1 parent 896f75f commit e4e31a0
Show file tree
Hide file tree
Showing 13 changed files with 513 additions and 205 deletions.
1 change: 1 addition & 0 deletions citadel.dme
Original file line number Diff line number Diff line change
Expand Up @@ -4332,6 +4332,7 @@
#include "code\modules\projectiles\guns\projectile\semiauto.dm"
#include "code\modules\projectiles\guns\projectile\shotgun.dm"
#include "code\modules\projectiles\guns\projectile\sniper.dm"
#include "code\modules\projectiles\guns\projectile\caseless\pellet.dm"
#include "code\modules\projectiles\guns\projectile\sniper\collapsible_sniper.dm"
#include "code\modules\projectiles\magazines\magazine.dm"
#include "code\modules\projectiles\magazines\smartmag.dm"
Expand Down
8 changes: 8 additions & 0 deletions code/game/objects/items/shooting_range.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@
icon_state = "target_q"
desc = "A shooting target with a threatening silhouette."
hp = 2350 // alium onest too kinda
/obj/item/target/basic
icon_state = "target_a"
desc = "A plain square shooting target."
hp = 1500 // i guess syndie targets are sturdier?
/obj/item/target/humanoid
icon_state = "target_b"
desc = "A shooting target that looks vaguely human shaped but not enough to cause controversy."
hp = 1800 // alium onest too kinda

/obj/item/target/bullet_act(var/obj/projectile/Proj)
var/p_x = Proj.p_x + pick(0,0,0,0,0,-1,1) // really ugly way of coding "sometimes offset Proj.p_x!"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -571,3 +571,12 @@ GLOBAL_LIST_BOILERPLATE(all_brig_closets, /obj/structure/closet/secure_closet/br
if(prob(75))
new /obj/item/storage/backpack/dufflebag/sec(src)
return ..()

/obj/structure/closet/secure_closet/pelletguns
name = "pellet gun lockers"
desc = "Contains some pellet guns and pellets for recreational shooting. Can be issued to civilians without worry."
closet_appearance = /singleton/closet_appearance/secure_closet/security
req_access = list(ACCESS_SECURITY_BRIG)
starts_with = list(
/obj/item/gun/ballistic/caseless/pellet = 4,
/obj/item/ammo_magazine/pellets = 4)
10 changes: 10 additions & 0 deletions code/modules/cargo/supplypacks/recreation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -218,3 +218,13 @@
cost = 20
container_type = /obj/structure/closet/crate
container_name = "DONKsoft Resupply crate"

//Civilian Pellet
/datum/supply_pack/recreation/pelletgun
name = "Recreational Pellet Gun"
contains = list(
/obj/item/gun/ballistic/caseless/pellet,
/obj/item/ammo_magazine/pellets
)
cost = 20
container_type = /obj/structure/closet/crate
10 changes: 10 additions & 0 deletions code/modules/projectiles/ammunition/rounds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,16 @@
projectile_type = /obj/projectile/bullet/organic/wax
materials_base = list("wax" = 100)

/obj/item/ammo_casing/p_pellet
name = "pellet"
desc = "Also know as a BB, it is shot from airguns for recreational shooting."
caliber = "pellet"
icon_state = "pellet"
projectile_type = /obj/projectile/bullet/practice
casing_flags = CASING_DELETE


//Musket Rounds
/obj/item/ammo_casing/musket
name = "musket ball"
desc = "A solid ball made of lead."
Expand Down
13 changes: 13 additions & 0 deletions code/modules/projectiles/guns/projectile/caseless.dm
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,16 @@
. = ..()
var/fluff_date = rand(2501,2543)
desc += "\nYou see a stamp on the side: GORLEX MARAUDERS, MANUFACTURED IN [fluff_date]."


/obj/item/gun/ballistic/caseless/pellet
name = "pellet gun"
desc = "An air powered rifle that shoots near harmless pellets. Used for recreation in enviroments where firearm ownership is restricted."
icon_state = "pellet"
item_state = "pellet"
wielded_item_state = "pellet-wielded"
caliber = "pellet"
fire_sound = 'sound/weapons/tap.ogg'
max_shells = 1
ammo_type = /obj/item/ammo_casing/p_pellet
load_method = SINGLE_CASING
40 changes: 40 additions & 0 deletions code/modules/projectiles/guns/projectile/caseless/pellet.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
///////////////////////////////////////
// Pellet Gun - For Recerational Use //
///////////////////////////////////////

#define DEFINE_CALIBER_PELLET 804

/obj/item/gun/ballistic/caseless/pellet
name = "pellet gun"
desc = "An air powered rifle that shoots near harmless plastic pellets. Used for recreation in enviroments where firearm ownership is restricted."
icon = 'icons/obj/gun/ballistic/caseless/pellet.dmi'
icon_state = "pellet"
item_state = "pellet"
wielded_item_state = "pellet-wielded"
caliber = "pellet"
fire_sound = 'sound/weapons/tap.ogg'
max_shells = 1
ammo_type = /obj/item/ammo_casing/p_pellet
load_method = SINGLE_CASING
item_icons = list("left_hand" = 'icons/mob/items/lefthand_guns.dmi', "right_hand" = 'icons/mob/items/righthand_guns.dmi')

/obj/item/ammo_casing/p_pellet
name = "pellet"
desc = "Also know as a BB, it is shot from airguns for recreational shooting."
icon = 'icons/obj/gun/ballistic/caseless/pellet.dmi'
caliber = "pellet"
icon_state = "pellet_single"
projectile_type = /obj/projectile/bullet/practice
casing_flags = CASING_DELETE

/obj/item/ammo_magazine/pellets
name = "box of pellets"
desc = "A box containing small pellets for a pellet gun."
icon = 'icons/obj/gun/ballistic/caseless/pellet.dmi'
icon_state = "pelletbox"
caliber = "pellet"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/p_pellet
materials_base = list(MAT_PLASTIC = 600)
max_ammo = 50
multiple_sprites = 1
11 changes: 11 additions & 0 deletions code/modules/projectiles/magazines/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,17 @@
max_ammo = 10
multiple_sprites = 1

/obj/item/ammo_magazine/pellets
name = "box of pellets"
desc = "A box containing small pellets for a pellet gun."
icon_state = "pelletbox"
caliber = "pellet"
mag_type = MAGAZINE
ammo_type = /obj/item/ammo_casing/p_pellet
materials_base = list(MAT_PLASTIC = 600)
max_ammo = 50
multiple_sprites = 1

/obj/item/ammo_magazine/mcompressedbio/compact
max_ammo = 10

Expand Down
Binary file modified icons/mob/items/lefthand_guns.dmi
Binary file not shown.
Binary file modified icons/mob/items/righthand_guns.dmi
Binary file not shown.
Binary file added icons/obj/gun/ballistic/caseless/pellet.dmi
Binary file not shown.
Binary file modified icons/obj/objects.dmi
Binary file not shown.
Loading

0 comments on commit e4e31a0

Please sign in to comment.