From 72104c572979726fa46308f243b4696d1dcd6de8 Mon Sep 17 00:00:00 2001 From: Mothblocks <35135081+Mothblocks@users.noreply.github.com> Date: Thu, 18 Nov 2021 16:51:47 -0800 Subject: [PATCH] Move conveyor belts to their own system, rename conveyor2 (#62911) Renames conveyor2.dm to conveyor.dm, and removes the historical comment about "new conveyor belts". As a reminder, comments should be about what the code is now, not what it used to be. (Muh history -Lemon) Moves conveyor belts to their own SS with an identical wait. It is very common, as an admin, for me to want to adjust conveyor belt processing, either to make it faster (for laughs) or to disable it when it is causing heavy lag. It is very difficult to do this (especially the former) because it just uses fast process. --- code/controllers/subsystem/processing/conveyors.dm | 3 +++ code/modules/recycling/{conveyor2.dm => conveyor.dm} | 4 +--- tgstation.dme | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 code/controllers/subsystem/processing/conveyors.dm rename code/modules/recycling/{conveyor2.dm => conveyor.dm} (98%) diff --git a/code/controllers/subsystem/processing/conveyors.dm b/code/controllers/subsystem/processing/conveyors.dm new file mode 100644 index 00000000000..51df126071a --- /dev/null +++ b/code/controllers/subsystem/processing/conveyors.dm @@ -0,0 +1,3 @@ +PROCESSING_SUBSYSTEM_DEF(conveyors) + name = "Conveyor Belts" + wait = 0.2 SECONDS diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor.dm similarity index 98% rename from code/modules/recycling/conveyor2.dm rename to code/modules/recycling/conveyor.dm index 424eb8eed6a..b7052a97571 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor.dm @@ -1,5 +1,3 @@ -//conveyor2 is pretty much like the original, except it supports corners, but not diverters. -//note that corner pieces transfer stuff clockwise when running forward, and anti-clockwise backwards. #define MAX_CONVEYOR_ITEMS_MOVE 30 GLOBAL_LIST_EMPTY(conveyors_by_id) @@ -11,7 +9,7 @@ GLOBAL_LIST_EMPTY(conveyors_by_id) desc = "A conveyor belt." layer = BELOW_OPEN_DOOR_LAYER processing_flags = START_PROCESSING_MANUALLY - subsystem_type = /datum/controller/subsystem/processing/fastprocess + subsystem_type = /datum/controller/subsystem/processing/conveyors var/operating = 0 // 1 if running forward, -1 if backwards, 0 if off var/operable = 1 // true if can operate (no broken segments in this belt run) var/forwards // this is the default (forward) direction, set by the map dir diff --git a/tgstation.dme b/tgstation.dme index f52c4484013..d4cec7d1b60 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -422,6 +422,7 @@ #include "code\controllers\subsystem\processing\antag_hud.dm" #include "code\controllers\subsystem\processing\aura_healing.dm" #include "code\controllers\subsystem\processing\clock_component.dm" +#include "code\controllers\subsystem\processing\conveyors.dm" #include "code\controllers\subsystem\processing\fastprocess.dm" #include "code\controllers\subsystem\processing\fields.dm" #include "code\controllers\subsystem\processing\fluids.dm" @@ -3497,7 +3498,7 @@ #include "code\modules\reagents\reagent_containers\syringes.dm" #include "code\modules\reagents\withdrawal\_addiction.dm" #include "code\modules\reagents\withdrawal\generic_addictions.dm" -#include "code\modules\recycling\conveyor2.dm" +#include "code\modules\recycling\conveyor.dm" #include "code\modules\recycling\sortingmachinery.dm" #include "code\modules\recycling\disposal\bin.dm" #include "code\modules\recycling\disposal\construction.dm"