{{for data.mainmenu}}
- {{:helper.link(String(value.category), String(value.icon), {"mode": Number(value.mode)}, data.mode == Number(value.mode) ? "linkOn" : null)}}
+ {{:helper.link(value.category, value.icon, {mode: value.mode}, data.mode == value.mode ? "linkOn" : null)}}
{{/for}}
{{if data.mode == 1}}
{{for data.pipemenu}}
- {{:helper.link(String(value.pipecategory), null, {"pipetype": Number(value.pipemode)}, data.pipetype == Number(value.pipemode) ? "linkOn" : null)}}
+ {{:helper.link(value.category, null, {pipe_category: value.pipemode}, data.pipe_category == value.pipemode ? "linkOn" : null)}}
{{/for}}
{{for data.pipelist}}
- {{if value.category == data.pipetype}}
-
{{:helper.link(String(value.pipename), "arrow-right", {"whatpipe": Number(value.id)}, data.whatpipe == Number(value.id) ? "linkOn" : null)}}
+ {{if value.pipe_type == 1 && value.pipe_category == data.pipe_category}}
+
{{:helper.link(value.pipe_name, "arrow-right", {whatpipe: value.pipe_id}, data.whatpipe == value.pipe_id ? "linkOn" : null)}}
{{/if}}
{{/for}}
{{for data.pipelist}}
+ {{if value.pipe_type != 1 || value.pipe_id != data.whatpipe || value.orientations == 1}}
+ {{continue;}}
+ {{/if}}
- {{if value.id == data.whatpipe && value.orientations != 1}}
-
- {{:helper.link("Orient automatically", null, {"iconrotation": 0}, data.iconrotation == 0 ? "linkOn" : null)}}
-
- {{/if}}
- {{if value.id == data.whatpipe && value.orientations != 1 && value.bendy != 1}}
+
+ {{:helper.link("Orient automatically", null, {iconrotation: 0}, data.iconrotation == 0 ? "linkOn" : null)}}
+
+ {{if value.bendy}}
- {{:helper.link("", "arrow-right", {"iconrotation": 1}, data.iconrotation == 1 ? "linkOn" : null)}}
-

+ {{:helper.link("", "arrow-right", {iconrotation: 1}, data.iconrotation == 1 ? "linkOn" : null)}}
+
- {{:helper.link("", "arrow-right", {"iconrotation": 4}, data.iconrotation == 4 ? "linkOn" : null)}}
-

-
- {{/if}}
- {{if value.id == data.whatpipe && value.orientations == 4 && value.bendy != 1}}
-
- {{:helper.link("", "arrow-right", {"iconrotation": 2}, data.iconrotation == 2 ? "linkOn" : null)}}
-

+ {{:helper.link("", "arrow-right", {iconrotation: 4}, data.iconrotation == 4 ? "linkOn" : null)}}
+
- {{:helper.link("", "arrow-right", {"iconrotation": 8}, data.iconrotation == 8 ? "linkOn" : null)}}
-

-
- {{/if}}
- {{if value.id == data.whatpipe && value.bendy == 1}}
-
- {{:helper.link("", "arrow-right", {"iconrotation": 1}, data.iconrotation == 1 ? "linkOn" : null)}}
-

+ {{:helper.link("", "arrow-right", {iconrotation: 2}, data.iconrotation == 2 ? "linkOn" : null)}}
+
- {{:helper.link("", "arrow-right", {"iconrotation": 4}, data.iconrotation == 4 ? "linkOn" : null)}}
-

+ {{:helper.link("", "arrow-right", {iconrotation: 8}, data.iconrotation == 8 ? "linkOn" : null)}}
+

+
+ {{else}}
+
+ {{:helper.link("", "arrow-right", {iconrotation: 1}, data.iconrotation == 1 ? "linkOn" : null)}}
+
- {{:helper.link("", "arrow-right", {"iconrotation": 2}, data.iconrotation == 2 ? "linkOn" : null)}}
-

-
-
- {{:helper.link("", "arrow-right", {"iconrotation": 8}, data.iconrotation == 8 ? "linkOn" : null)}}
-

+ {{:helper.link("", "arrow-right", {iconrotation: 4}, data.iconrotation == 4 ? "linkOn" : null)}}
+
+ {{if value.orientations == 4}}
+
+ {{:helper.link("", "arrow-right", {iconrotation: 2}, data.iconrotation == 2 ? "linkOn" : null)}}
+

+
+
+ {{:helper.link("", "arrow-right", {iconrotation: 8}, data.iconrotation == 8 ? "linkOn" : null)}}
+

+
+ {{/if}}
{{/if}}
{{/for}}
{{else data.mode == 2}}
- {{for data.dpipelist}}
-
{{:helper.link(String(value.pipename), "arrow-right", {"whatdpipe": Number(value.id)}, data.whatdpipe == Number(value.id) ? "linkOn" : null)}}
+ {{for data.pipelist}}
+ {{if value.pipe_type == 2}}
+
{{:helper.link(value.pipe_name, "arrow-right", {whatdpipe: value.pipe_id}, data.whatdpipe == value.pipe_id ? "linkOn" : null)}}
+ {{/if}}
{{/for}}
- {{for data.dpipelist}}
+ {{for data.pipelist}}
+ {{if value.pipe_type != 2 || value.pipe_id != data.whatdpipe || value.orientations == 1}}
+ {{continue;}}
+ {{/if}}
- {{if value.id == data.whatdpipe && value.orientations != 1}}
-
- {{:helper.link("Orient automatically", null, {"iconrotation": 0}, data.iconrotation == 0 ? "linkOn" : null)}}
+
+ {{:helper.link("Orient automatically", null, {iconrotation: 0}, data.iconrotation == 0 ? "linkOn" : null)}}
+
+
+ {{:helper.link("", "arrow-right", {iconrotation: 1}, data.iconrotation == 1 ? "linkOn" : null)}}
+

+
+
+ {{:helper.link("", "arrow-right", {iconrotation: 4}, data.iconrotation == 4 ? "linkOn" : null)}}
+

+
+ {{if value.orientations == 4}}
+
+ {{:helper.link("", "arrow-right", {iconrotation: 2}, data.iconrotation == 2 ? "linkOn" : null)}}
+
- {{:helper.link("", "arrow-right", {"iconrotation": 1}, data.iconrotation == 1 ? "linkOn" : null)}}
-

-
-
- {{:helper.link("", "arrow-right", {"iconrotation": 4}, data.iconrotation == 4 ? "linkOn" : null)}}
-

-
- {{/if}}
- {{if value.id == data.whatdpipe && value.orientations == 4}}
-
- {{:helper.link("", "arrow-right", {"iconrotation": 2}, data.iconrotation == 2 ? "linkOn" : null)}}
-

-
-
- {{:helper.link("", "arrow-right", {"iconrotation": 8}, data.iconrotation == 8 ? "linkOn" : null)}}
-

+ {{:helper.link("", "arrow-right", {iconrotation: 8}, data.iconrotation == 8 ? "linkOn" : null)}}
+
{{/if}}
@@ -109,4 +112,4 @@ Used In File(s): /code/game/objects/items/weapons/rpd.dm
Device ready to flip loose pipes...
{{else data.mode == 5}}
Device ready to eat loose pipes...
-{{/if}}
+{{/if}}
\ No newline at end of file
diff --git a/paradise.dme b/paradise.dme
index 402b6bd167f..daa3e1c9b65 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -45,6 +45,7 @@
#include "code\__DEFINES\misc.dm"
#include "code\__DEFINES\mobs.dm"
#include "code\__DEFINES\pda.dm"
+#include "code\__DEFINES\pipes.dm"
#include "code\__DEFINES\preferences.dm"
#include "code\__DEFINES\process_scheduler.dm"
#include "code\__DEFINES\qdel.dm"
@@ -231,6 +232,7 @@
#include "code\datums\mixed.dm"
#include "code\datums\mutable_appearance.dm"
#include "code\datums\periodic_news.dm"
+#include "code\datums\pipe_datums.dm"
#include "code\datums\progressbar.dm"
#include "code\datums\recipe.dm"
#include "code\datums\ruins.dm"