Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Underbarrel Gun Attachments #3825

Open
wants to merge 50 commits into
base: master
Choose a base branch
from

Conversation

Gristlebee
Copy link
Contributor

@Gristlebee Gristlebee commented Nov 22, 2024

About The Pull Request

Adds underbarrel gun attachments. Current roster is the underbarrel shotgun, e-gun, flamethrower, flaregun, riot grenade launcher, and 40mm grenade launcher. The first five can be bought from the outpost cargo.

Underbarrel guns can be fired/reloaded/interacted with by swapping the fire select to underbarrel.

Cleans up the riot grenade launcher code a bit.

Underbarrel gun sprites are recolors of Rye-rice's underbarrel grenade launcher.

Why It's Good For The Game

Adds some more customization and personalization options to a players loadout, and I think it's neat.

Changelog

🆑 Gristlebee, Rye-rice
add: Underbarrel guns
fix: Grenade launcher code
/:cl:

@github-actions github-actions bot added DME Edit Sprites A bikeshed full of soulless bikes. Code change Watch something violently break. labels Nov 22, 2024
@Gristlebee Gristlebee marked this pull request as ready for review November 22, 2024 22:43
@Gristlebee Gristlebee requested a review from a team as a code owner November 22, 2024 22:43
Copy link
Member

@MarkSuckerberg MarkSuckerberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now when are we adding killstreaks

Comment on lines +91 to +92
#define COMSIG_ATTACHMENT_WEILD "attach-weild"
#define COMSIG_ATTACHMENT_UNWEILD "attach-unwield"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define COMSIG_ATTACHMENT_WEILD "attach-weild"
#define COMSIG_ATTACHMENT_UNWEILD "attach-unwield"
#define COMSIG_ATTACHMENT_WIELD "attach-wield"
#define COMSIG_ATTACHMENT_UNWIELD "attach-unwield"

Comment on lines +17 to +19
///Called on the parents weild
var/datum/callback/on_wield
///Called on the parents unweild
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
///Called on the parents weild
var/datum/callback/on_wield
///Called on the parents unweild
///Called on the parents wield
var/datum/callback/on_wield
///Called on the parents unwield

Comment on lines +71 to +72
RegisterSignal(parent, COMSIG_ATTACHMENT_WEILD, PROC_REF(try_wield))
RegisterSignal(parent, COMSIG_ATTACHMENT_UNWEILD, PROC_REF(try_unwield))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
RegisterSignal(parent, COMSIG_ATTACHMENT_WEILD, PROC_REF(try_wield))
RegisterSignal(parent, COMSIG_ATTACHMENT_UNWEILD, PROC_REF(try_unwield))
RegisterSignal(parent, COMSIG_ATTACHMENT_WIELD, PROC_REF(try_wield))
RegisterSignal(parent, COMSIG_ATTACHMENT_UNWIELD, PROC_REF(try_unwield))

@@ -114,7 +125,7 @@
/datum/component/attachment_holder/proc/do_attach(obj/item/attachment, mob/user, bypass_checks)
var/slot = SEND_SIGNAL(attachment, COMSIG_ATTACHMENT_GET_SLOT)
slot = attachment_slot_from_bflag(slot)
if(!(attachment.type in valid_types))
if(!(is_type_in_list(attachment,valid_types)))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps make valid_types a typecache?


/obj/item/reagent_containers/glass/beaker/flamethrower_underbarrel
name = "internal fuel tank"
desc = "An internal fuel tank for a flamethrower. You shouldnt have been able to pull this out."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
desc = "An internal fuel tank for a flamethrower. You shouldnt have been able to pull this out."
desc = "An internal fuel tank for a flamethrower. You shouldn't have been able to pull this out."


/obj/item/gun/grenadelauncher/underbarrel
name = "underbarrel riot grenade launcher"
desc = "An even terribler thing. Just despicable really. You shouldnt be seeing this."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
desc = "An even terribler thing. Just despicable really. You shouldnt be seeing this."
desc = "An even more terrible thing. Just despicable, really. You shouldn't be seeing this."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code change Watch something violently break. DME Edit Sprites A bikeshed full of soulless bikes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants