[MIRROR] Plumbing teleporters (#321)

* Plumbing teleporters (#51881)

* Makes the plumbing RCD accept every object

* Adds simple plumbing teleporter

* Polishes plumbing teleporters

* Fixes runtime

* this to src

* circuitboard doesnt need anchoring

* Fixes overlay flickering being weird

* Makes the Chemical Recipient's positioning less awkward

* Comments and documentation

* uh

* Fixes dme

* Revert "uh"

This reverts commit af6f30089f9f31d527f6ab3e2b1c72cf6ab6d60d.

* Update code/_globalvars/lists/construction.dm

Co-authored-by: girl <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com>

* Update code/game/objects/items/RCD.dm

Co-authored-by: girl <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com>

* Update code/modules/plumbing/plumbers/_plumb_machinery.dm

Co-authored-by: girl <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com>

* uncasts loop

* update icons

Co-authored-by: girl <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com>

* Plumbing teleporters

Co-authored-by: Time-Green <timkoster1@hotmail.com>
Co-authored-by: girl <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-08-13 00:20:00 +02:00
committed by GitHub
co-authored by girl Time-Green
parent 4d953ab00d
commit 56f65770e2
18 changed files with 189 additions and 35 deletions
+10 -9
View File
@@ -906,6 +906,7 @@ RLD
max_matter = 100
matter_divisor = 20
///The plumbing RCD. All the blueprints are located in _globalvars > lists > construction.dm
/obj/item/construction/plumbing
name = "Plumbing Constructor"
desc = "An expertly modified RCD outfitted to construct plumbing machinery."
@@ -922,19 +923,18 @@ RLD
var/list/choices = list()
///index, used in the attack self to get the type. stored here since it doesnt change
var/list/name_to_type = list()
///
var/list/machinery_data = list("cost" = list(), "delay" = list())
///All info for construction
var/list/machinery_data = list("cost" = list())
/obj/item/construction/plumbing/attack_self(mob/user)
..()
if(!choices.len)
for(var/A in subtypesof(/obj/machinery/plumbing))
for(var/A in GLOB.plumbing_constructables)
var/obj/machinery/plumbing/M = A
if(initial(M.rcd_constructable))
choices += list(initial(M.name) = image(icon = initial(M.icon), icon_state = initial(M.icon_state)))
name_to_type[initial(M.name)] = M
machinery_data["cost"][A] = initial(M.rcd_cost)
machinery_data["delay"][A] = initial(M.rcd_delay)
choices += list(initial(M.name) = image(icon = initial(M.icon), icon_state = initial(M.icon_state)))
name_to_type[initial(M.name)] = M
machinery_data["cost"][A] = GLOB.plumbing_constructables[A]
var/choice = show_radial_menu(user, src, choices, custom_check = CALLBACK(src, .proc/check_menu, user), require_near = TRUE, tooltips = TRUE)
if(!check_menu(user))
@@ -950,7 +950,8 @@ RLD
return FALSE
if(checkResource(machinery_data["cost"][blueprint], user) && blueprint)
if(do_after(user, machinery_data["delay"][blueprint], target = A))
//"cost" is relative to delay at a rate of 10 matter/second (1matter/decisecond) rather than playing with 2 different variables since everyone set it to this rate anyways.
if(do_after(user, machinery_data["cost"][blueprint], target = A))
if(checkResource(machinery_data["cost"][blueprint], user) && canPlace(A))
useResource(machinery_data["cost"][blueprint], user)
activate()
@@ -1198,6 +1198,17 @@
/obj/item/stock_parts/scanning_module = 2
)
/obj/item/circuitboard/machine/plumbing_receiver
name = "Chemical Recipient (Machine Board)"
icon_state = "medical"
build_path = /obj/machinery/plumbing/receiver
req_components = list(
/obj/item/stack/ore/bluespace_crystal = 1,
/obj/item/stock_parts/capacitor = 2,
/obj/item/stack/sheet/glass = 1)
def_components = list(/obj/item/stack/ore/bluespace_crystal = /obj/item/stack/ore/bluespace_crystal/artificial)
needs_anchored = FALSE
/obj/item/circuitboard/machine/skill_station
name = "Skill Station (Machine Board)"
build_path = /obj/machinery/skill_station
@@ -1206,3 +1217,4 @@
/obj/item/stock_parts/micro_laser = 2,
/obj/item/stock_parts/scanning_module = 2
)