mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
[MIRROR] Gives the chainsaw start/stop/loop SFX, makes the arm-mounted chainsaw a subtype of a regular chainsaw [MDB IGNORE] (#19950)
* Gives the chainsaw start/stop/loop SFX, makes the arm-mounted chainsaw a subtype of a regular chainsaw (#73996) ## About The Pull Request The chainsaw now has an audio loop, as well as SFX for starting and stopping. I'm pretty confident that I did the attribution stuff correctly. https://user-images.githubusercontent.com/28870487/225054900-4bf87ee7-9245-4004-b414-77d0e6e83a7c.mp4 I think this came out well. It may be a bit loud, but I wanted the volume to be about the same as how the chainsaw slash sound comes out. Audio stuff isn't really my forte, so let me know if anything sounds off, or if any adjustments should be made. To make this work for the mounted chainsaw (more specifically, the abstract object that enters your hand), it has been made into a chainsaw subtype. An updatepaths script has been included in the event that someone has a map where the former path was included (why??). ## Why It's Good For The Game Makes the chainsaw more menacing. It's one of the most powerful and beloved pieces of crew weaponry, in addition to being a fucking chainsaw. If you aren't keen on walking around the hallways with the chainsaw loop playing like the badass you are, you can always just keep it off until you get into a fight. Gives an extra bit of immersion for those special moments where you get to chainsaw someone to death. ## Changelog 🆑 soundadd: The chainsaw now has SFX for starting, stopping, and idling. /🆑 * Gives the chainsaw start/stop/loop SFX, makes the arm-mounted chainsaw a subtype of a regular chainsaw --------- Co-authored-by: Rhials <Datguy33456@gmail.com>
This commit is contained in:
@@ -23,17 +23,13 @@
|
||||
tool_behaviour = TOOL_SAW
|
||||
toolspeed = 1.5 //Turn it on first you dork
|
||||
var/on = FALSE
|
||||
///The looping sound for our chainsaw when running
|
||||
var/datum/looping_sound/chainsaw/chainsaw_loop
|
||||
|
||||
/obj/item/chainsaw/Initialize(mapload)
|
||||
. = ..()
|
||||
AddComponent(/datum/component/butchering, \
|
||||
speed = 3 SECONDS, \
|
||||
effectiveness = 100, \
|
||||
bonus_modifier = 0, \
|
||||
butcher_sound = 'sound/weapons/chainsawhit.ogg', \
|
||||
disabled = TRUE, \
|
||||
)
|
||||
AddComponent(/datum/component/two_handed, require_twohands=TRUE)
|
||||
chainsaw_loop = new(src)
|
||||
apply_components()
|
||||
|
||||
/obj/item/chainsaw/suicide_act(mob/living/carbon/user)
|
||||
if(on)
|
||||
@@ -58,14 +54,32 @@
|
||||
|
||||
if(on)
|
||||
hitsound = 'sound/weapons/chainsawhit.ogg'
|
||||
chainsaw_loop.start()
|
||||
else
|
||||
hitsound = SFX_SWING_HIT
|
||||
chainsaw_loop.stop()
|
||||
|
||||
toolspeed = on ? 0.5 : initial(toolspeed) //Turning it on halves the speed
|
||||
if(src == user.get_active_held_item()) //update inhands
|
||||
user.update_held_items()
|
||||
update_item_action_buttons()
|
||||
|
||||
/**
|
||||
* Handles adding components to the chainsaw. Added in Initialize()
|
||||
*
|
||||
* Applies components to the chainsaw. Added as a seperate proc to allow for
|
||||
* variance between subtypes
|
||||
*/
|
||||
/obj/item/chainsaw/proc/apply_components()
|
||||
AddComponent(/datum/component/butchering, \
|
||||
speed = 3 SECONDS, \
|
||||
effectiveness = 100, \
|
||||
bonus_modifier = 0, \
|
||||
butcher_sound = 'sound/weapons/chainsawhit.ogg', \
|
||||
disabled = TRUE, \
|
||||
)
|
||||
AddComponent(/datum/component/two_handed, require_twohands=TRUE)
|
||||
|
||||
/obj/item/chainsaw/doomslayer
|
||||
name = "THE GREAT COMMUNICATOR"
|
||||
desc = "<span class='warning'>VRRRRRRR!!!</span>"
|
||||
@@ -79,5 +93,40 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/chainsaw/mounted_chainsaw
|
||||
name = "mounted chainsaw"
|
||||
desc = "A chainsaw that has replaced your arm."
|
||||
inhand_icon_state = "mounted_chainsaw"
|
||||
item_flags = ABSTRACT | DROPDEL
|
||||
throwforce = 0
|
||||
throw_range = 0
|
||||
throw_speed = 0
|
||||
toolspeed = 1
|
||||
|
||||
/obj/item/chainsaw/mounted_chainsaw/Initialize(mapload)
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_NODROP, HAND_REPLACEMENT_TRAIT)
|
||||
|
||||
/obj/item/chainsaw/mounted_chainsaw/Destroy()
|
||||
var/obj/item/bodypart/part
|
||||
new /obj/item/chainsaw(get_turf(src))
|
||||
if(iscarbon(loc))
|
||||
var/mob/living/carbon/holder = loc
|
||||
var/index = holder.get_held_index_of_item(src)
|
||||
if(index)
|
||||
part = holder.hand_bodyparts[index]
|
||||
. = ..()
|
||||
if(part)
|
||||
part.drop_limb()
|
||||
|
||||
/obj/item/chainsaw/mounted_chainsaw/apply_components()
|
||||
AddComponent(/datum/component/butchering, \
|
||||
speed = 3 SECONDS, \
|
||||
effectiveness = 100, \
|
||||
bonus_modifier = 0, \
|
||||
butcher_sound = 'sound/weapons/chainsawhit.ogg', \
|
||||
disabled = TRUE, \
|
||||
)
|
||||
|
||||
/datum/action/item_action/startchainsaw
|
||||
name = "Pull The Starting Cord"
|
||||
|
||||
@@ -575,43 +575,6 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301
|
||||
/obj/item/ectoplasm/mystic
|
||||
icon_state = "mysticplasm"
|
||||
|
||||
|
||||
/obj/item/mounted_chainsaw
|
||||
name = "mounted chainsaw"
|
||||
desc = "A chainsaw that has replaced your arm."
|
||||
icon_state = "chainsaw_on"
|
||||
inhand_icon_state = "mounted_chainsaw"
|
||||
lefthand_file = 'icons/mob/inhands/weapons/chainsaw_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/chainsaw_righthand.dmi'
|
||||
item_flags = ABSTRACT | DROPDEL
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
force = 24
|
||||
throwforce = 0
|
||||
throw_range = 0
|
||||
throw_speed = 0
|
||||
sharpness = SHARP_EDGED
|
||||
attack_verb_continuous = list("saws", "tears", "lacerates", "cuts", "chops", "dices")
|
||||
attack_verb_simple = list("saw", "tear", "lacerate", "cut", "chop", "dice")
|
||||
hitsound = 'sound/weapons/chainsawhit.ogg'
|
||||
tool_behaviour = TOOL_SAW
|
||||
toolspeed = 1
|
||||
|
||||
/obj/item/mounted_chainsaw/Initialize(mapload)
|
||||
. = ..()
|
||||
ADD_TRAIT(src, TRAIT_NODROP, HAND_REPLACEMENT_TRAIT)
|
||||
|
||||
/obj/item/mounted_chainsaw/Destroy()
|
||||
var/obj/item/bodypart/part
|
||||
new /obj/item/chainsaw(get_turf(src))
|
||||
if(iscarbon(loc))
|
||||
var/mob/living/carbon/holder = loc
|
||||
var/index = holder.get_held_index_of_item(src)
|
||||
if(index)
|
||||
part = holder.hand_bodyparts[index]
|
||||
. = ..()
|
||||
if(part)
|
||||
part.drop_limb()
|
||||
|
||||
/obj/item/statuebust
|
||||
name = "bust"
|
||||
desc = "A priceless ancient marble bust, the kind that belongs in a museum." //or you can hit people with it
|
||||
|
||||
Reference in New Issue
Block a user