mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 01:49:19 +00:00
Refactors and fixes RPEDs
This commit is contained in:
committed by
CitadelStationBot
parent
ab3c55ab23
commit
4850230fc4
@@ -1,3 +1,4 @@
|
||||
<<<<<<< HEAD
|
||||
/datum/component/storage/concrete/rped
|
||||
collection_mode = COLLECT_EVERYTHING
|
||||
allow_quick_gather = TRUE
|
||||
@@ -29,3 +30,38 @@
|
||||
if(!I.get_part_rating() && !stop_messages)
|
||||
to_chat(M, "<span class='warning'>[parent] only accepts machine parts!</span>")
|
||||
return FALSE
|
||||
=======
|
||||
/datum/component/storage/concrete/rped
|
||||
collection_mode = COLLECT_EVERYTHING
|
||||
allow_quick_gather = TRUE
|
||||
allow_quick_empty = TRUE
|
||||
click_gather = TRUE
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
max_combined_w_class = 100
|
||||
max_items = 50
|
||||
display_numerical_stacking = TRUE
|
||||
|
||||
/datum/component/storage/concrete/rped/can_be_inserted(obj/item/I, stop_messages, mob/M)
|
||||
. = ..()
|
||||
if(!I.get_part_rating())
|
||||
if (!stop_messages)
|
||||
to_chat(M, "<span class='warning'>[parent] only accepts machine parts!</span>")
|
||||
return FALSE
|
||||
|
||||
/datum/component/storage/concrete/bluespace/rped
|
||||
collection_mode = COLLECT_EVERYTHING
|
||||
allow_quick_gather = TRUE
|
||||
allow_quick_empty = TRUE
|
||||
click_gather = TRUE
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
max_combined_w_class = 800
|
||||
max_items = 400
|
||||
display_numerical_stacking = TRUE
|
||||
|
||||
/datum/component/storage/concrete/bluespace/rped/can_be_inserted(obj/item/I, stop_messages, mob/M)
|
||||
. = ..()
|
||||
if(!I.get_part_rating())
|
||||
if (!stop_messages)
|
||||
to_chat(M, "<span class='warning'>[parent] only accepts machine par ts!</span>")
|
||||
return FALSE
|
||||
>>>>>>> 52a7ebc... Refactors and fixes RPEDs (#37380)
|
||||
|
||||
@@ -93,8 +93,6 @@
|
||||
return
|
||||
if(default_change_direction_wrench(user, I))
|
||||
return
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
if(default_pry_open(I))
|
||||
return
|
||||
if(default_deconstruction_crowbar(I))
|
||||
|
||||
@@ -93,9 +93,6 @@
|
||||
updateUsrDialog()
|
||||
return TRUE
|
||||
|
||||
if(exchange_parts(user, O))
|
||||
return TRUE
|
||||
|
||||
if(default_deconstruction_crowbar(O))
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -282,9 +282,6 @@
|
||||
if(default_deconstruction_screwdriver(user, "[icon_state]_maintenance", "[initial(icon_state)]",W))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, W))
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(W))
|
||||
return
|
||||
|
||||
|
||||
@@ -133,9 +133,6 @@
|
||||
update_icon()//..since we're updating the icon here, since the scanner can be unpowered when opened/closed
|
||||
return
|
||||
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
if(default_pry_open(I))
|
||||
return
|
||||
|
||||
|
||||
@@ -146,9 +146,6 @@ Possible to do for anyone motivated enough:
|
||||
if(default_deconstruction_screwdriver(user, "holopad_open", "holopad0", P))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, P))
|
||||
return
|
||||
|
||||
if(default_pry_open(P))
|
||||
return
|
||||
|
||||
|
||||
@@ -37,9 +37,6 @@
|
||||
to_chat(user, "<span class='notice'>You save the data in the [I.name]'s buffer.</span>")
|
||||
return 1
|
||||
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
|
||||
|
||||
@@ -70,9 +70,6 @@
|
||||
updateUsrDialog()
|
||||
return
|
||||
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
|
||||
if(panel_open && default_deconstruction_crowbar(O))
|
||||
return
|
||||
|
||||
|
||||
@@ -60,9 +60,6 @@
|
||||
to_chat(user, "<span class='notice'>You link [src] to the one in [I]'s buffer.</span>")
|
||||
return 1
|
||||
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
|
||||
|
||||
@@ -68,8 +68,6 @@
|
||||
default_deconstruction_crowbar(G)
|
||||
return
|
||||
|
||||
if(exchange_parts(user, G))
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/recharger/attack_hand(mob/user)
|
||||
|
||||
@@ -53,9 +53,6 @@
|
||||
if(default_deconstruction_screwdriver(user, "borgdecon2", "borgcharger0", P))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, P))
|
||||
return
|
||||
|
||||
if(default_pry_open(P))
|
||||
return
|
||||
|
||||
|
||||
@@ -55,9 +55,6 @@
|
||||
if(default_deconstruction_screwdriver(user, "grinder-oOpen", "grinder-o0", I))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
if(default_pry_open(I))
|
||||
return
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
update_icon()
|
||||
if(panel_open)
|
||||
interact(user)
|
||||
else if(exchange_parts(user, I) || default_deconstruction_crowbar(I))
|
||||
else if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -18,10 +18,6 @@
|
||||
|
||||
if(default_deconstruction_screwdriver(user, icon_open, icon_closed, P))
|
||||
return
|
||||
|
||||
else if(exchange_parts(user, P))
|
||||
return
|
||||
|
||||
// Using a multitool lets you access the receiver's interface
|
||||
else if(istype(P, /obj/item/device/multitool))
|
||||
attack_hand(user)
|
||||
|
||||
@@ -55,8 +55,6 @@
|
||||
power_station.engaged = 0 //hub with panel open is off, so the station must be informed.
|
||||
update_icon()
|
||||
return
|
||||
if(exchange_parts(user, W))
|
||||
return
|
||||
if(default_deconstruction_crowbar(W))
|
||||
return
|
||||
return ..()
|
||||
@@ -169,9 +167,6 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
else if(exchange_parts(user, W))
|
||||
return
|
||||
|
||||
else if(default_deconstruction_crowbar(W))
|
||||
return
|
||||
|
||||
|
||||
@@ -62,9 +62,6 @@
|
||||
recharging_turf = get_step(loc, dir)
|
||||
return
|
||||
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
return ..()
|
||||
|
||||
@@ -401,9 +401,6 @@
|
||||
if(default_deconstruction_screwdriver(user, "fab-o", "fab-idle", W))
|
||||
return TRUE
|
||||
|
||||
if(exchange_parts(user, W))
|
||||
return TRUE
|
||||
|
||||
if(default_deconstruction_crowbar(W))
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -298,7 +298,7 @@
|
||||
var/reagentlist = pretty_string_from_reagent_list(I.reagents.reagent_list)
|
||||
log_game("[key_name(user)] added an [I] to cyro containing [reagentlist]")
|
||||
return
|
||||
if(!on && !occupant && !state_open && (default_deconstruction_screwdriver(user, "pod-off", "pod-off", I) || exchange_parts(user, I)) \
|
||||
if(!on && !occupant && !state_open && (default_deconstruction_screwdriver(user, "pod-off", "pod-off", I)) \
|
||||
|| default_change_direction_wrench(user, I) \
|
||||
|| default_pry_open(I) \
|
||||
|| default_deconstruction_crowbar(I))
|
||||
|
||||
@@ -80,8 +80,6 @@
|
||||
return
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/components/unary/thermomachine/default_change_direction_wrench(mob/user, obj/item/I)
|
||||
|
||||
@@ -89,8 +89,6 @@ God bless America.
|
||||
return
|
||||
if(default_unfasten_wrench(user, I))
|
||||
return
|
||||
else if(exchange_parts(user, I))
|
||||
return
|
||||
else if(default_deconstruction_screwdriver(user, "fryer_off", "fryer_off" ,I)) //where's the open maint panel icon?!
|
||||
return
|
||||
else
|
||||
|
||||
@@ -99,10 +99,7 @@
|
||||
/obj/machinery/gibber/attackby(obj/item/P, mob/user, params)
|
||||
if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", P))
|
||||
return
|
||||
|
||||
else if(exchange_parts(user, P))
|
||||
return
|
||||
|
||||
|
||||
else if(default_pry_open(P))
|
||||
return
|
||||
|
||||
|
||||
@@ -50,8 +50,6 @@
|
||||
return
|
||||
if(default_unfasten_wrench(user, O))
|
||||
return
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(O))
|
||||
return
|
||||
|
||||
@@ -29,9 +29,6 @@
|
||||
if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", O))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
|
||||
if(default_pry_open(O))
|
||||
return
|
||||
|
||||
|
||||
@@ -46,9 +46,6 @@
|
||||
if(default_deconstruction_screwdriver(user, "processor", "processor1", O))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
|
||||
if(default_pry_open(O))
|
||||
return
|
||||
|
||||
|
||||
@@ -55,9 +55,6 @@
|
||||
if(default_deconstruction_screwdriver(user, "smartfridge_open", "smartfridge", O))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
|
||||
if(default_pry_open(O))
|
||||
return
|
||||
|
||||
|
||||
@@ -83,9 +83,6 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(O))
|
||||
return
|
||||
|
||||
|
||||
@@ -69,8 +69,6 @@
|
||||
if(default_deconstruction_screwdriver(user, "dnamod", "dnamod", I))
|
||||
update_icon()
|
||||
return
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
if(iscyborg(user))
|
||||
|
||||
@@ -59,9 +59,6 @@
|
||||
if(default_deconstruction_screwdriver(user, "hydrotray3", "hydrotray3", I))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
if(default_pry_open(I))
|
||||
return
|
||||
|
||||
|
||||
@@ -62,9 +62,6 @@
|
||||
if(default_deconstruction_screwdriver(user, "sextractor_open", "sextractor", O))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
|
||||
if(default_pry_open(O))
|
||||
return
|
||||
|
||||
|
||||
@@ -148,8 +148,6 @@
|
||||
send_console_message()
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/attackby(obj/item/W, mob/user, params)
|
||||
if(exchange_parts(user, W))
|
||||
return
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
if(default_pry_open(W))
|
||||
materials.retrieve_all()
|
||||
|
||||
@@ -173,9 +173,6 @@
|
||||
return
|
||||
else if(!active)
|
||||
|
||||
if(exchange_parts(user, O))
|
||||
return
|
||||
|
||||
if(istype(O, /obj/item/wrench))
|
||||
|
||||
if(!anchored && !isinspace())
|
||||
|
||||
@@ -38,9 +38,7 @@
|
||||
power_gen = initial(power_gen) * part_level
|
||||
|
||||
/obj/machinery/power/rtg/attackby(obj/item/I, mob/user, params)
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
else if(default_deconstruction_screwdriver(user, "[initial(icon_state)]-open", initial(icon_state), I))
|
||||
if(default_deconstruction_screwdriver(user, "[initial(icon_state)]-open", initial(icon_state), I))
|
||||
return
|
||||
else if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
|
||||
@@ -291,9 +291,6 @@
|
||||
wires.interact(user)
|
||||
return
|
||||
|
||||
else if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/machinery/power/emitter/emag_act(mob/user)
|
||||
|
||||
@@ -98,10 +98,6 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
//exchanging parts using the RPE
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
//building and linking a terminal
|
||||
if(istype(I, /obj/item/stack/cable_coil))
|
||||
var/dir = get_dir(user,src)
|
||||
|
||||
@@ -56,9 +56,6 @@
|
||||
if(default_deconstruction_screwdriver(user, "coil_open[anchored]", "coil[anchored]", W))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, W))
|
||||
return
|
||||
|
||||
if(default_unfasten_wrench(user, W))
|
||||
return
|
||||
|
||||
@@ -169,9 +166,6 @@
|
||||
if(default_deconstruction_screwdriver(user, "grounding_rod_open[anchored]", "grounding_rod[anchored]", W))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, W))
|
||||
return
|
||||
|
||||
if(default_unfasten_wrench(user, W))
|
||||
return
|
||||
|
||||
|
||||
@@ -112,9 +112,6 @@
|
||||
stat |= BROKEN
|
||||
return
|
||||
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
default_deconstruction_crowbar(I)
|
||||
|
||||
/obj/machinery/power/compressor/process()
|
||||
@@ -243,9 +240,6 @@
|
||||
stat |= BROKEN
|
||||
return
|
||||
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
default_deconstruction_crowbar(I)
|
||||
|
||||
/obj/machinery/power/turbine/ui_interact(mob/user)
|
||||
|
||||
@@ -292,9 +292,6 @@ obj/machinery/chem_dispenser/proc/work_animation()
|
||||
update_icon()
|
||||
return
|
||||
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
if(istype(I, /obj/item/reagent_containers) && !(I.flags_1 & ABSTRACT_1) && I.is_open_container())
|
||||
|
||||
@@ -60,9 +60,6 @@
|
||||
if(default_deconstruction_screwdriver(user, "mixer0b", "mixer0b", I))
|
||||
return
|
||||
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
|
||||
|
||||
@@ -79,8 +79,6 @@
|
||||
if(default_deconstruction_screwdriver(user, "mixer0_nopower", "mixer0", I))
|
||||
return
|
||||
|
||||
else if(exchange_parts(user, I))
|
||||
return
|
||||
else if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user