Merge pull request #6546 from Citadel-Station-13/upstream-merge-37380

[MIRROR] Refactors and fixes RPEDs
This commit is contained in:
deathride58
2018-04-29 22:45:28 +00:00
committed by GitHub
41 changed files with 50 additions and 148 deletions
-2
View File
@@ -43,8 +43,6 @@
if(linked_console)
disconnect_console()
return
if(exchange_parts(user, O))
return
if(default_deconstruction_crowbar(O))
return
if(is_refillable() && O.is_drainable())
+13 -2
View File
@@ -14,13 +14,24 @@ If you create T5+ please take a pass at gene_modder.dm [L40]. Max_values MUST fi
var/pshoom_or_beepboopblorpzingshadashwoosh = 'sound/items/rped.ogg'
var/alt_sound = null
/obj/item/storage/part_replacer/afterattack(obj/machinery/T, mob/living/carbon/human/user, flag, params)
/obj/item/storage/part_replacer/pre_attack(obj/machinery/T, mob/living/user, params)
if(!istype(T) || !T.component_parts)
return ..()
if(works_from_distance || user.Adjacent(T))
if(user.Adjacent(T)) // no TK upgrading.
if(works_from_distance)
user.Beam(T, icon_state = "rped_upgrade", time = 5)
T.exchange_parts(user, src)
return FALSE
return ..()
/obj/item/storage/part_replacer/afterattack(obj/machinery/T, mob/living/user, adjacent, params)
if(adjacent || !istype(T) || !T.component_parts)
return ..()
if(works_from_distance)
user.Beam(T, icon_state = "rped_upgrade", time = 5)
T.exchange_parts(user, src)
return
return ..()
/obj/item/storage/part_replacer/proc/play_rped_sound()
//Plays the sound for RPED exhanging or installing parts.