[MIRROR] Piano broken sprite, helper, and hit sound [MDB IGNORE] (#14560)

* Piano broken sprite, helper, and hit sound (#68003)

* Does the PR

* fixes playsound locations

* Piano broken sprite, helper, and hit sound

Co-authored-by: Coffee <CoffeeDragon16@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-06-28 17:21:56 +01:00
committed by GitHub
co-authored by Coffee Gandalf
parent c3598ba344
commit e3bfba5c88
9 changed files with 36 additions and 25 deletions
+23 -12
View File
@@ -2,6 +2,7 @@
name = "Not A Piano"
desc = "Something broke, contact coderbus."
interaction_flags_atom = INTERACT_ATOM_ATTACK_HAND | INTERACT_ATOM_UI_INTERACT | INTERACT_ATOM_REQUIRES_DEXTERITY
integrity_failure = 0.25
var/can_play_unanchored = FALSE
var/list/allowed_instrument_ids = list("r3grand","r3harpsi","crharpsi","crgrand1","crbright1", "crichugan", "crihamgan","piano")
var/datum/song/song
@@ -32,22 +33,32 @@
return TOOL_ACT_TOOLTYPE_SUCCESS
/obj/structure/musician/piano
name = "space minimoog"
name = "space piano"
desc = "This is a space piano, like a regular piano, but always in tune! Even if the musician isn't."
icon = 'icons/obj/musician.dmi'
icon_state = "minimoog"
icon_state = "piano"
anchored = TRUE
density = TRUE
var/broken_icon_state = "pianobroken"
/obj/structure/musician/piano/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
if(BRUTE)
playsound(src, 'sound/effects/piano_hit.ogg', 100, TRUE)
if(BURN)
playsound(src, 'sound/items/welder.ogg', 100, TRUE)
/obj/structure/musician/piano/atom_break(damage_flag)
. = ..()
if(!broken)
broken = TRUE
icon_state = broken_icon_state
/obj/structure/musician/piano/unanchored
anchored = FALSE
/obj/structure/musician/piano/Initialize(mapload)
. = ..()
if(prob(50) && icon_state == initial(icon_state))
name = "space minimoog"
desc = "This is a minimoog, like a space piano, but more spacey!"
icon_state = "minimoog"
else
name = "space piano"
desc = "This is a space piano, like a regular piano, but always in tune! Even if the musician isn't."
icon_state = "piano"
/obj/structure/musician/piano/minimoog
name = "space minimoog"
desc = "This is a minimoog, like a space piano, but more spacey!"
icon_state = "minimoog"
broken_icon_state = "minimoogbroken"