-
-
Notifications
You must be signed in to change notification settings - Fork 544
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## About The Pull Request saw this in the attachments sprite file. implemented it. Scarborough guns can use it right now. ## Changelog :cl: add: Energy Bayonets /: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. --> --------- Co-authored-by: Bjarl <94164348+Bjarl@users.noreply.github.com>
- Loading branch information
Showing
4 changed files
with
73 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/obj/item/attachment/energy_bayonet | ||
name = "energy bayonet" | ||
desc = "Stabby-Stabby" | ||
icon_state = "ebayonet" | ||
force = 3 | ||
throwforce = 2 | ||
pickup_sound = 'sound/items/handling/knife1_pickup.ogg' | ||
drop_sound = 'sound/items/handling/knife3_drop.ogg' | ||
hitsound = 'sound/weapons/bladeslice.ogg' | ||
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") | ||
sharpness = IS_BLUNT | ||
slot = ATTACHMENT_SLOT_MUZZLE | ||
attach_features_flags = ATTACH_TOGGLE | ||
|
||
light_range = 2 | ||
light_power = 0.6 | ||
light_on = FALSE | ||
light_color = COLOR_MOSTLY_PURE_RED | ||
light_system = MOVABLE_LIGHT | ||
|
||
toggle_on_sound = 'sound/weapons/saberon.ogg' | ||
toggle_off_sound = 'sound/weapons/saberoff.ogg' | ||
|
||
pixel_shift_x = 1 | ||
pixel_shift_y = 4 | ||
spread_mod = 1 | ||
wield_delay = 0.2 SECONDS | ||
|
||
/obj/item/attachment/energy_bayonet/on_preattack(obj/item/gun/gun, atom/target, mob/living/user, list/params) | ||
if(user.a_intent == INTENT_HARM && user.CanReach(target, src, TRUE) && toggled != 0) | ||
melee_attack_chain(user, target, params) | ||
return COMPONENT_NO_ATTACK | ||
|
||
|
||
/obj/item/attachment/energy_bayonet/toggle_attachment(obj/item/gun/gun, mob/user) | ||
. = ..() | ||
set_light_on(toggled) | ||
update_icon() | ||
sharpness = toggled ? IS_SHARP_ACCURATE : IS_BLUNT | ||
force = toggled ? 19 : 3 | ||
throwforce = toggled ? 14 : 2 | ||
|
||
/obj/item/attachment/energy_bayonet/attack_self(mob/user) | ||
toggle_attachment() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
code/modules/projectiles/guns/manufacturer/scarborough/ballistics.dm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters