Rapid Part Exchange Device resprite + animations (#92360)

This commit is contained in:
MelokG
2025-07-30 17:41:37 +03:00
committed by GitHub
parent 155d471342
commit 51c2c9a6e7
8 changed files with 13 additions and 9 deletions

View File

@@ -1123,7 +1123,7 @@
RefreshParts()
if(shouldplaysound)
replacer_tool.play_rped_sound()
replacer_tool.play_rped_effect()
return TRUE
/obj/machinery/proc/display_parts(mob/user)

View File

@@ -124,7 +124,7 @@
if(add_cabling(user, cable, time = 0))
if(!no_sound)
replacer.play_rped_sound()
replacer.play_rped_effect()
no_sound = TRUE
return install_parts_from_part_replacer(user, replacer, no_sound = no_sound) // Recursive call to handle the next part
@@ -137,7 +137,7 @@
if(add_glass(user, glass_sheets, time = 0))
if(!no_sound)
replacer.play_rped_sound()
replacer.play_rped_effect()
return TRUE
return FALSE

View File

@@ -196,7 +196,7 @@
// After installing, attempts to follow up by inserting parts
install_parts_from_part_replacer(user, replacer, no_sound = TRUE)
if(!no_sound)
replacer.play_rped_sound()
replacer.play_rped_effect()
return TRUE
return FALSE

View File

@@ -258,7 +258,7 @@
play_sound = TRUE
if(play_sound && !no_sound)
replacer.play_rped_sound()
replacer.play_rped_effect()
return TRUE

View File

@@ -24,9 +24,10 @@
return attacked_machinery.exchange_parts(user, src) ? ITEM_INTERACT_SUCCESS : ITEM_INTERACT_FAILURE
///Plays the sound for RPED exhanging or installing parts.
/obj/item/storage/part_replacer/proc/play_rped_sound()
///Plays the sound & flick animation for RPED exhanging or installing parts.
/obj/item/storage/part_replacer/proc/play_rped_effect()
playsound(src, 'sound/items/tools/rped.ogg', 40, TRUE)
flick("[icon_state]_active", src)
/**
* Gets parts sorted in order of their tier
@@ -53,6 +54,7 @@
/obj/item/storage/part_replacer/bluespace
name = "bluespace rapid part exchange device"
desc = "A version of the RPED that allows for replacement of parts and scanning from a distance, along with higher capacity for parts."
icon = 'icons/obj/storage/storage_wide.dmi'
icon_state = "BS_RPED"
inhand_icon_state = "BS_RPED"
w_class = WEIGHT_CLASS_NORMAL
@@ -72,11 +74,13 @@
/obj/item/storage/part_replacer/bluespace/ranged_interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers)
return interact_with_atom(interacting_with, user, modifiers)
/obj/item/storage/part_replacer/bluespace/play_rped_sound()
/obj/item/storage/part_replacer/bluespace/play_rped_effect()
if(prob(1))
playsound(src, 'sound/items/pshoom/pshoom_2.ogg', 40, TRUE)
flick("[icon_state]_old", src)
return
playsound(src, 'sound/items/pshoom/pshoom.ogg', 40, TRUE)
flick("[icon_state]_active", src)
/**
* Signal handler for when a part has been inserted into the BRPED.

View File

@@ -1172,7 +1172,7 @@ GLOBAL_LIST_EMPTY(vending_machines_to_restock)
restocked += restock(replacer_item)
post_restock(user, restocked)
if(restocked > 0)
replacer.play_rped_sound()
replacer.play_rped_effect()
return TRUE
/obj/machinery/vending/on_deconstruction(disassembled)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB