mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Fixes a Bunch of RCL Bugs (#31698)
* RCL cable migration * e * Pain and death * merge master fixes * e * aaaaaa * Update RCL.dm * AaaaAAAAA * Update cable_coil.dm * Update cable_coil.dm * returns throwforce * removes color feature --------- Signed-off-by: CRUNCH <143041327+CRUNCH-Borg@users.noreply.github.com>
This commit is contained in:
@@ -470,7 +470,7 @@
|
||||
/obj/item/stack/rods/cyborg,
|
||||
/obj/item/stack/tile/plasteel/cyborg,
|
||||
/obj/item/stack/tile/catwalk/cyborg,
|
||||
/obj/item/rcl/robot,
|
||||
/obj/item/stack/cable_coil/rcl/robot,
|
||||
/obj/item/stack/sheet/glass/cyborg,
|
||||
/obj/item/stack/sheet/rglass/cyborg,
|
||||
/obj/item/inflatable/cyborg,
|
||||
@@ -766,7 +766,7 @@
|
||||
/obj/item/stack/rods/cyborg,
|
||||
/obj/item/stack/tile/plasteel/cyborg,
|
||||
/obj/item/stack/tile/catwalk/cyborg,
|
||||
/obj/item/rcl/robot,
|
||||
/obj/item/stack/cable_coil/rcl/robot,
|
||||
/obj/item/stack/sheet/glass/cyborg/drone,
|
||||
/obj/item/stack/sheet/rglass/cyborg/drone,
|
||||
/obj/item/stack/sheet/wood/cyborg,
|
||||
@@ -876,7 +876,7 @@
|
||||
/obj/item/stack/sheet/metal/cyborg,
|
||||
/obj/item/stack/rods/cyborg,
|
||||
/obj/item/stack/tile/plasteel/cyborg,
|
||||
/obj/item/rcl/robot,
|
||||
/obj/item/stack/cable_coil/rcl/robot,
|
||||
/obj/item/stack/sheet/glass/cyborg,
|
||||
/obj/item/stack/sheet/rglass/cyborg
|
||||
)
|
||||
@@ -1121,3 +1121,9 @@
|
||||
statpanel_name = "Metal"
|
||||
stack = /obj/item/stack/sheet/metal
|
||||
add_to_storage = TRUE
|
||||
|
||||
/datum/robot_storage/material/cable
|
||||
name = "Cable Storage"
|
||||
statpanel_name = "Cable"
|
||||
max_amount = 90
|
||||
stack = /obj/item/stack/cable_coil/rcl
|
||||
|
||||
@@ -105,10 +105,10 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
return
|
||||
coil.cable_join(src, user)
|
||||
|
||||
else if(istype(W, /obj/item/rcl))
|
||||
var/obj/item/rcl/R = W
|
||||
if(R.loaded)
|
||||
R.loaded.cable_join(src, user)
|
||||
else if(istype(W, /obj/item/stack/cable_coil/rcl))
|
||||
var/obj/item/stack/cable_coil/rcl/R = W
|
||||
if(R.amount)
|
||||
R.cable_join(src, user)
|
||||
R.is_empty(user)
|
||||
|
||||
else if(istype(W, /obj/item/toy/crayon))
|
||||
|
||||
@@ -8,6 +8,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe/cable_restrain
|
||||
|
||||
/obj/item/stack/cable_coil
|
||||
name = "cable coil"
|
||||
desc = "A low-cost superconducting cable."
|
||||
singular_name = "cable"
|
||||
icon = 'icons/obj/power.dmi'
|
||||
icon_state = "coil"
|
||||
@@ -46,6 +47,10 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe/cable_restrain
|
||||
new_stack.color = color
|
||||
return new_stack
|
||||
|
||||
/// Used to decouple the physical color of the cable from the logical color. Used by RCL to stop its spool holder from being colored in.
|
||||
/obj/item/stack/cable_coil/proc/get_cable_color()
|
||||
return color
|
||||
|
||||
/obj/item/stack/cable_coil/update_name()
|
||||
. = ..()
|
||||
if(amount > 2)
|
||||
@@ -67,17 +72,6 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe/cable_restrain
|
||||
else
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
/obj/item/stack/cable_coil/examine(mob/user)
|
||||
. = ..()
|
||||
if(!in_range(user, src))
|
||||
return
|
||||
if(get_amount() == 1)
|
||||
. += "A short piece of power cable."
|
||||
else if(get_amount() == 2)
|
||||
. += "A piece of power cable."
|
||||
else
|
||||
. += "A coil of power cables."
|
||||
|
||||
/obj/item/stack/cable_coil/can_merge(obj/item/stack/check, inhand = FALSE)
|
||||
. = FALSE
|
||||
if(istype(check, merge_type))
|
||||
@@ -145,27 +139,24 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe/cable_restrain
|
||||
C.color = color
|
||||
return C
|
||||
|
||||
// Items usable on a cable coil :
|
||||
// - Wirecutters : cut them duh !
|
||||
// - Cable coil : merge cables
|
||||
/obj/item/stack/cable_coil/item_interaction(mob/living/user, obj/item/used, list/modifiers)
|
||||
if(istype(used, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = used
|
||||
// Cable merging is handled by parent proc
|
||||
if(C.cable_merge_id != cable_merge_id)
|
||||
to_chat(user, "These coils are of different types.")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if(C.get_amount() >= MAXCOIL)
|
||||
if(C.get_amount() >= C.max_amount)
|
||||
to_chat(user, "The coil is as long as it will get.")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
|
||||
if((C.get_amount() + get_amount() <= MAXCOIL))
|
||||
// Cable merging is handled by parent proc.
|
||||
if((C.get_amount() + get_amount() <= C.max_amount))
|
||||
to_chat(user, "You join the cable coils together.")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
return ..()
|
||||
|
||||
to_chat(user, "You transfer [get_amount_transferred()] length\s of cable from one coil to the other.")
|
||||
return ITEM_INTERACT_COMPLETE
|
||||
return ..()
|
||||
|
||||
if(istype(used, /obj/item/toy/crayon))
|
||||
var/obj/item/toy/crayon/C = used
|
||||
@@ -180,8 +171,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe/cable_restrain
|
||||
|
||||
/obj/item/stack/cable_coil/proc/get_new_cable(location)
|
||||
var/obj/structure/cable/C = new cable_type(location)
|
||||
C.cable_color(color)
|
||||
|
||||
C.cable_color(get_cable_color())
|
||||
return C
|
||||
|
||||
/// called when cable_coil is clicked on a turf/simulated/floor
|
||||
@@ -319,9 +309,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe/cable_restrain
|
||||
to_chat(user, SPAN_WARNING("There's already a cable at that position!"))
|
||||
return
|
||||
|
||||
|
||||
C.cable_color(color)
|
||||
|
||||
C.cable_color(get_cable_color())
|
||||
C.d1 = nd1
|
||||
C.d2 = nd2
|
||||
|
||||
@@ -382,30 +370,30 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe/cable_restrain
|
||||
/obj/item/stack/cable_coil/ten
|
||||
amount = 10
|
||||
|
||||
/obj/item/stack/cable_coil/yellow
|
||||
color = COLOR_YELLOW
|
||||
|
||||
/obj/item/stack/cable_coil/blue
|
||||
color = COLOR_BLUE
|
||||
|
||||
/obj/item/stack/cable_coil/green
|
||||
color = COLOR_GREEN
|
||||
|
||||
/obj/item/stack/cable_coil/pink
|
||||
color = COLOR_PINK
|
||||
|
||||
/obj/item/stack/cable_coil/yellow
|
||||
color = COLOR_YELLOW
|
||||
|
||||
/obj/item/stack/cable_coil/orange
|
||||
color = COLOR_ORANGE
|
||||
|
||||
/obj/item/stack/cable_coil/green
|
||||
color = COLOR_GREEN
|
||||
|
||||
/obj/item/stack/cable_coil/cyan
|
||||
color = COLOR_CYAN
|
||||
|
||||
/obj/item/stack/cable_coil/blue
|
||||
color = COLOR_BLUE
|
||||
|
||||
/obj/item/stack/cable_coil/white
|
||||
color = COLOR_WHITE
|
||||
|
||||
/obj/item/stack/cable_coil/random/Initialize(mapload)
|
||||
. = ..()
|
||||
color = pick(COLOR_RED, COLOR_BLUE, COLOR_GREEN, COLOR_WHITE, COLOR_PINK, COLOR_YELLOW, COLOR_CYAN, COLOR_ORANGE)
|
||||
color = pick(COLOR_RED, COLOR_PINK, COLOR_ORANGE, COLOR_YELLOW, COLOR_GREEN, COLOR_CYAN, COLOR_BLUE, COLOR_WHITE)
|
||||
|
||||
/obj/item/stack/cable_coil/extra_insulated
|
||||
name = "heavy duty cable coil"
|
||||
|
||||
@@ -830,7 +830,7 @@
|
||||
id = "rcl"
|
||||
build_type = AUTOLATHE
|
||||
materials = list(MAT_METAL = 5000)
|
||||
build_path = /obj/item/rcl/empty
|
||||
build_path = /obj/item/stack/cable_coil/rcl/empty
|
||||
category = list("initial", "Construction")
|
||||
|
||||
//hacked autolathe recipes
|
||||
|
||||
@@ -280,10 +280,10 @@
|
||||
if(C.get_amount() < 3)
|
||||
to_chat(user, SPAN_WARNING("You need three or more cable pieces to repair this damage."))
|
||||
return SURGERY_BEGINSTEP_SKIP
|
||||
C.use(3)
|
||||
C.use(3, C.destroy_upon_empty)
|
||||
user.visible_message(
|
||||
"[user] begins to splice new cabling into [target]'s [affected.name].",
|
||||
"You begin to splice new cabling into [target]'s [affected.name].",
|
||||
SPAN_NOTICE("[user] begins to splice new cabling into [target]'s [affected.name]."),
|
||||
SPAN_NOTICE("You begin to splice new cabling into [target]'s [affected.name]."),
|
||||
chat_message_type = MESSAGE_TYPE_COMBAT
|
||||
)
|
||||
return ..()
|
||||
@@ -294,7 +294,7 @@
|
||||
var/obj/item/organ/external/affected = target.get_organ(target_zone)
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("[user] finishes splicing cable into [target]'s [affected.name]."),
|
||||
SPAN_NOTICE("You finishes splicing new cable into [target]'s [affected.name]."),
|
||||
SPAN_NOTICE("You finish splicing new cable into [target]'s [affected.name]."),
|
||||
chat_message_type = MESSAGE_TYPE_COMBAT
|
||||
)
|
||||
affected.heal_damage(0, rand(30, 50), 1, 1)
|
||||
|
||||
Reference in New Issue
Block a user