BRPD Auto-wrenching (#26855)

* Modified the RPD auto-wrenching behaviour
* Removed tool requirement for auto-wrenching
* Allowed the BRPD to auto-wrench remotely
* Added a TGUI toggle for auto-wrenching

* Added a Line of Sight check for the BRPD
* Readded missing UI buttons

* Tweaked disposals construction
* Disposals objects can't be anchored if there's floor tiles
* Bins, chutes and outlets now need a constructed trunk to be anchored.

* Changed LoS check, added sounds, stopped station auto-wrench.

* Final touches for the RPD
* Added sounds when wrenching occurs

* tgui bundle

* Consolidated all RPD related sounds to the RPD code

* removed some redundant things I forgot about

* tguibundle

* span classes and tgui bundle

* Applying lewcc's suggestion

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: Toastical <vnndvp@gmail.com>

* applying lewcc's 2nd suggestion

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: Toastical <vnndvp@gmail.com>

* Applying contrabang's suggestions + added marks in pipe.dm

* typos n stuff

* tgui bundle

* Update code/modules/recycling/disposal-construction.dm

Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>

---------

Signed-off-by: Toastical <vnndvp@gmail.com>
Signed-off-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com>
This commit is contained in:
Toastical
2024-11-03 13:47:20 +00:00
committed by GitHub
co-authored by Luc DGamerL
parent ba2c42280b
commit 08b74db517
7 changed files with 147 additions and 108 deletions
@@ -9,6 +9,7 @@
var/installed_type = null
var/installed_type_flipped = null
var/flipped = FALSE
var/is_station = FALSE
/obj/structure/transit_tube_construction/proc/rotate()
setDir(turn(dir, -90))
@@ -43,20 +44,25 @@
. = TRUE
var/turf/T = get_turf(src)
if(!isfloorturf(T) && !isspaceturf(T))
to_chat(user, "<span class='notice'>You cannot install [src] here.</span>")
to_chat(user, "<span class='warning'>You cannot install [src] here.</span>")
return
for(var/obj/turf_contents in T)
// It's okay for tube parts to be installed over existing pods.
if(!istype(turf_contents, /obj/structure/transit_tube_pod) && turf_contents.density)
to_chat(user, "<span class='notice'>There is not enough space to install [src] here.</span>")
to_chat(user, "<span class='warning'>There is not enough space to install [src] here.</span>")
return
if(is_station && !user.can_reach(src))
to_chat(user, "<span class='warning'>[src] must be installed manually.</span>")
return
var/install_type = flipped ? installed_type_flipped : installed_type
var/atom/installed = new install_type(T)
installed.dir = dir
user.visible_message("<span class='notice'>[user] installs [src].</span>")
I.play_tool_sound(src, I.tool_volume)
qdel(src)
. |= RPD_TOOL_SUCCESS
/obj/structure/transit_tube_construction/wrench_act(mob/living/user, obj/item/I)
. = TRUE
@@ -93,7 +99,7 @@
qdel(src)
to_chat(user, "<span class='notice'>[src] can only be installed in a transit tube!</span>")
to_chat(user, "<span class='warning'>[src] can only be installed in a transit tube!</span>")
/obj/structure/transit_tube_construction/straight
installed_type = /obj/structure/transit_tube
@@ -121,14 +127,17 @@
installed_type = /obj/structure/transit_tube/station
base_icon_state = "transit_station"
icon_state = "transit_station"
is_station = TRUE
/obj/structure/transit_tube_construction/terminus/dispenser
installed_type = /obj/structure/transit_tube/station/dispenser/reverse
installed_type_flipped = /obj/structure/transit_tube/station/dispenser/reverse/flipped
base_icon_state = "transit_dispenser_terminus"
icon_state = "transit_dispenser_terminus"
is_station = TRUE
/obj/structure/transit_tube_construction/station/dispenser
installed_type = /obj/structure/transit_tube/station/dispenser
base_icon_state = "transit_dispenser_station"
icon_state = "transit_dispenser_station"
is_station = TRUE