fix catwalk cabling placement when clicking on space (#28117)

This commit is contained in:
warriorstar-orion
2025-01-25 22:16:45 -05:00
committed by GitHub
parent 521413f643
commit a9134fa643
2 changed files with 12 additions and 10 deletions
+2
View File
@@ -117,6 +117,8 @@
to_chat(user, "<span class='warning'>The plating is going to need some support! Place metal rods first.</span>")
return ITEM_INTERACT_COMPLETE
return ..()
/turf/space/Entered(atom/movable/A as mob|obj, atom/OL, ignoreRest = 0)
..()
if((!(A) || !(src in A.locs)))
+10 -10
View File
@@ -478,28 +478,28 @@
if(SSticker)
GLOB.cameranet.update_visibility(src)
/turf/attack_by(obj/item/attacking, mob/user, params)
if(..())
return TRUE
/turf/item_interaction(mob/living/user, obj/item/used, list/modifiers)
if(can_lay_cable())
if(istype(attacking, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = attacking
if(istype(used, /obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/C = used
for(var/obj/structure/cable/LC in src)
if(LC.d1 == 0 || LC.d2 == 0)
LC.attackby__legacy__attackchain(C, user)
return TRUE
return ITEM_INTERACT_COMPLETE
C.place_turf(src, user)
return TRUE
else if(istype(attacking, /obj/item/rcl))
var/obj/item/rcl/R = attacking
return ITEM_INTERACT_COMPLETE
else if(istype(used, /obj/item/rcl))
var/obj/item/rcl/R = used
if(R.loaded)
for(var/obj/structure/cable/LC in src)
if(LC.d1 == 0 || LC.d2 == 0)
LC.attackby__legacy__attackchain(R, user)
return TRUE
return ITEM_INTERACT_COMPLETE
R.loaded.place_turf(src, user)
R.is_empty(user)
return ITEM_INTERACT_COMPLETE
/turf/proc/can_have_cabling()
return TRUE