Fixes the pipe dispenser dispending random pipes. (#15557)

This commit is contained in:
Matt Atlas
2023-01-10 18:53:55 +01:00
committed by GitHub
parent 13516eaba3
commit e20c309494
3 changed files with 110 additions and 69 deletions
+37 -37
View File
@@ -13,44 +13,44 @@ Buildable meters
#define PIPE_MVALVE 8
#define PIPE_PUMP 9
#define PIPE_SCRUBBER 10
#define PIPE_GAS_FILTER 13
#define PIPE_GAS_MIXER 14
#define PIPE_PASSIVE_GATE 15
#define PIPE_VOLUME_PUMP 16
#define PIPE_HEAT_EXCHANGE 17
#define PIPE_MTVALVE 18
#define PIPE_MANIFOLD4W 19
#define PIPE_CAP 20
#define PIPE_GAS_FILTER 11
#define PIPE_GAS_MIXER 12
#define PIPE_PASSIVE_GATE 13
#define PIPE_VOLUME_PUMP 14
#define PIPE_HEAT_EXCHANGE 15
#define PIPE_MTVALVE 16
#define PIPE_MANIFOLD4W 17
#define PIPE_CAP 18
///// Z-Level stuff
#define PIPE_UP 21
#define PIPE_DOWN 22
#define PIPE_UP 19
#define PIPE_DOWN 20
///// Z-Level stuff
#define PIPE_GAS_FILTER_M 23
#define PIPE_GAS_MIXER_T 24
#define PIPE_GAS_MIXER_M 25
#define PIPE_OMNI_MIXER 26
#define PIPE_OMNI_FILTER 27
#define PIPE_GAS_FILTER_M 21
#define PIPE_GAS_MIXER_T 22
#define PIPE_GAS_MIXER_M 23
#define PIPE_OMNI_MIXER 24
#define PIPE_OMNI_FILTER 25
///// Supply, scrubbers and universal pipes
#define PIPE_UNIVERSAL 28
#define PIPE_SUPPLY_STRAIGHT 29
#define PIPE_SUPPLY_BENT 30
#define PIPE_SCRUBBERS_STRAIGHT 31
#define PIPE_SCRUBBERS_BENT 32
#define PIPE_SUPPLY_MANIFOLD 33
#define PIPE_SCRUBBERS_MANIFOLD 34
#define PIPE_SUPPLY_MANIFOLD4W 35
#define PIPE_SCRUBBERS_MANIFOLD4W 36
#define PIPE_SUPPLY_UP 37
#define PIPE_SCRUBBERS_UP 38
#define PIPE_SUPPLY_DOWN 39
#define PIPE_SCRUBBERS_DOWN 40
#define PIPE_SUPPLY_CAP 41
#define PIPE_SCRUBBERS_CAP 42
#define PIPE_UNIVERSAL 26
#define PIPE_SUPPLY_STRAIGHT 27
#define PIPE_SUPPLY_BENT 28
#define PIPE_SCRUBBERS_STRAIGHT 29
#define PIPE_SCRUBBERS_BENT 30
#define PIPE_SUPPLY_MANIFOLD 31
#define PIPE_SCRUBBERS_MANIFOLD 32
#define PIPE_SUPPLY_MANIFOLD4W 33
#define PIPE_SCRUBBERS_MANIFOLD4W 34
#define PIPE_SUPPLY_UP 35
#define PIPE_SCRUBBERS_UP 36
#define PIPE_SUPPLY_DOWN 37
#define PIPE_SCRUBBERS_DOWN 38
#define PIPE_SUPPLY_CAP 39
#define PIPE_SCRUBBERS_CAP 40
///// Mirrored T-valve ~ because I couldn't be bothered re-sorting all of the defines
#define PIPE_MTVALVEM 43
#define PIPE_MTVALVEM 41
#define PIPE_PASSIVE_GATE_SCRUBBER 44
#define PIPE_PASSIVE_GATE_SUPPLY 45
#define PIPE_PASSIVE_GATE_SCRUBBER 42
#define PIPE_PASSIVE_GATE_SUPPLY 43
/obj/item/pipe
name = "pipe"
@@ -68,7 +68,7 @@ Buildable meters
level = 2
obj_flags = OBJ_FLAG_ROTATABLE
/obj/item/pipe/New(var/loc, var/pipe_type as num, var/dir as num, var/obj/machinery/atmospherics/make_from = null)
/obj/item/pipe/New(var/loc, var/pipe_type, var/dir, var/obj/machinery/atmospherics/make_from)
..()
if (make_from)
src.set_dir(make_from.dir)
@@ -183,17 +183,17 @@ Buildable meters
else
src.pipe_type = pipe_type
src.set_dir(dir)
if (pipe_type == 29 || pipe_type == 30 || pipe_type == 33 || pipe_type == 35 || pipe_type == 37 || pipe_type == 39 || pipe_type == 41)
if (pipe_type == 27 || pipe_type == 28 || pipe_type == 31 || pipe_type == 33 || pipe_type == 35 || pipe_type == 37 || pipe_type == 39)
connect_types = CONNECT_TYPE_SUPPLY
src.color = PIPE_COLOR_BLUE
else if (pipe_type == 31 || pipe_type == 32 || pipe_type == 34 || pipe_type == 36 || pipe_type == 38 || pipe_type == 40 || pipe_type == 42)
else if (pipe_type == 29 || pipe_type == 30 || pipe_type == 32 || pipe_type == 34 || pipe_type == 36 || pipe_type == 38 || pipe_type == 40)
connect_types = CONNECT_TYPE_SCRUBBER
src.color = PIPE_COLOR_RED
else if (pipe_type == 2 || pipe_type == 3)
connect_types = CONNECT_TYPE_HE
else if (pipe_type == 6)
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_HE
else if (pipe_type == 28)
else if (pipe_type == 26)
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY|CONNECT_TYPE_SCRUBBER
//src.pipe_dir = get_pipe_dir()
update()
+32 -32
View File
@@ -21,51 +21,51 @@
<A href='?src=\ref[src];make=1;dir=5'>Bent Pipe</A><BR>
<A href='?src=\ref[src];make=5;dir=1'>Manifold</A><BR>
<A href='?src=\ref[src];make=8;dir=1'>Manual Valve</A><BR>
<A href='?src=\ref[src];make=20;dir=1'>Pipe Cap</A><BR>
<A href='?src=\ref[src];make=19;dir=1'>4-Way Manifold</A><BR>
<A href='?src=\ref[src];make=18;dir=1'>Manual T-Valve</A><BR>
<A href='?src=\ref[src];make=43;dir=1'>Manual T-Valve - Mirrored</A><BR>
<A href='?src=\ref[src];make=21;dir=1'>Upward Pipe</A><BR>
<A href='?src=\ref[src];make=22;dir=1'>Downward Pipe</A><BR>
<A href='?src=\ref[src];make=18;dir=1'>Pipe Cap</A><BR>
<A href='?src=\ref[src];make=17;dir=1'>4-Way Manifold</A><BR>
<A href='?src=\ref[src];make=16;dir=1'>Manual T-Valve</A><BR>
<A href='?src=\ref[src];make=41;dir=1'>Manual T-Valve - Mirrored</A><BR>
<A href='?src=\ref[src];make=19;dir=1'>Upward Pipe</A><BR>
<A href='?src=\ref[src];make=20;dir=1'>Downward Pipe</A><BR>
<b>Supply pipes:</b><BR>
<A href='?src=\ref[src];make=27;dir=1'>Pipe</A><BR>
<A href='?src=\ref[src];make=28;dir=5'>Bent Pipe</A><BR>
<A href='?src=\ref[src];make=31;dir=1'>Manifold</A><BR>
<A href='?src=\ref[src];make=39;dir=1'>Pipe Cap</A><BR>
<A href='?src=\ref[src];make=33;dir=1'>4-Way Manifold</A><BR>
<A href='?src=\ref[src];make=35;dir=1'>Upward Pipe</A><BR>
<A href='?src=\ref[src];make=37;dir=1'>Downward Pipe</A><BR>
<b>Scrubbers pipes:</b><BR>
<A href='?src=\ref[src];make=29;dir=1'>Pipe</A><BR>
<A href='?src=\ref[src];make=30;dir=5'>Bent Pipe</A><BR>
<A href='?src=\ref[src];make=33;dir=1'>Manifold</A><BR>
<A href='?src=\ref[src];make=41;dir=1'>Pipe Cap</A><BR>
<A href='?src=\ref[src];make=35;dir=1'>4-Way Manifold</A><BR>
<A href='?src=\ref[src];make=37;dir=1'>Upward Pipe</A><BR>
<A href='?src=\ref[src];make=39;dir=1'>Downward Pipe</A><BR>
<b>Scrubbers pipes:</b><BR>
<A href='?src=\ref[src];make=31;dir=1'>Pipe</A><BR>
<A href='?src=\ref[src];make=32;dir=5'>Bent Pipe</A><BR>
<A href='?src=\ref[src];make=34;dir=1'>Manifold</A><BR>
<A href='?src=\ref[src];make=42;dir=1'>Pipe Cap</A><BR>
<A href='?src=\ref[src];make=36;dir=1'>4-Way Manifold</A><BR>
<A href='?src=\ref[src];make=38;dir=1'>Upward Pipe</A><BR>
<A href='?src=\ref[src];make=40;dir=1'>Downward Pipe</A><BR>
<A href='?src=\ref[src];make=32;dir=1'>Manifold</A><BR>
<A href='?src=\ref[src];make=40;dir=1'>Pipe Cap</A><BR>
<A href='?src=\ref[src];make=34;dir=1'>4-Way Manifold</A><BR>
<A href='?src=\ref[src];make=36;dir=1'>Upward Pipe</A><BR>
<A href='?src=\ref[src];make=38;dir=1'>Downward Pipe</A><BR>
<b>Devices:</b><BR>
<A href='?src=\ref[src];make=28;dir=1'>Universal pipe adapter</A><BR>
<A href='?src=\ref[src];make=26;dir=1'>Universal pipe adapter</A><BR>
<A href='?src=\ref[src];make=4;dir=1'>Connector</A><BR>
<A href='?src=\ref[src];make=7;dir=1'>Unary Vent</A><BR>
<A href='?src=\ref[src];make=9;dir=1'>Gas Pump</A><BR>
<A href='?src=\ref[src];make=15;dir=1'>Pressure Regulator</A><BR>
<A href='?src=\ref[src];make=44;dir=1'>Scrubbers Pressure Regulator</A><BR>
<A href='?src=\ref[src];make=45;dir=1'>Supply Pressure Regulator</A><BR>
<A href='?src=\ref[src];make=16;dir=1'>High Power Gas Pump</A><BR>
<A href='?src=\ref[src];make=13;dir=1'>Pressure Regulator</A><BR>
<A href='?src=\ref[src];make=42;dir=1'>Scrubbers Pressure Regulator</A><BR>
<A href='?src=\ref[src];make=43;dir=1'>Supply Pressure Regulator</A><BR>
<A href='?src=\ref[src];make=14;dir=1'>High Power Gas Pump</A><BR>
<A href='?src=\ref[src];make=10;dir=1'>Scrubber</A><BR>
<A href='?src=\ref[src];makemeter=1'>Meter</A><BR>
<A href='?src=\ref[src];make=13;dir=1'>Gas Filter</A><BR>
<A href='?src=\ref[src];make=23;dir=1'>Gas Filter - Mirrored</A><BR>
<A href='?src=\ref[src];make=14;dir=1'>Gas Mixer</A><BR>
<A href='?src=\ref[src];make=25;dir=1'>Gas Mixer - Mirrored</A><BR>
<A href='?src=\ref[src];make=24;dir=1'>Gas Mixer - T</A><BR>
<A href='?src=\ref[src];make=26;dir=1'>Omni Gas Mixer</A><BR>
<A href='?src=\ref[src];make=27;dir=1'>Omni Gas Filter</A><BR>
<A href='?src=\ref[src];make=11;dir=1'>Gas Filter</A><BR>
<A href='?src=\ref[src];make=21;dir=1'>Gas Filter - Mirrored</A><BR>
<A href='?src=\ref[src];make=12;dir=1'>Gas Mixer</A><BR>
<A href='?src=\ref[src];make=23;dir=1'>Gas Mixer - Mirrored</A><BR>
<A href='?src=\ref[src];make=22;dir=1'>Gas Mixer - T</A><BR>
<A href='?src=\ref[src];make=24;dir=1'>Omni Gas Mixer</A><BR>
<A href='?src=\ref[src];make=25;dir=1'>Omni Gas Filter</A><BR>
<b>Heat exchange:</b><BR>
<A href='?src=\ref[src];make=2;dir=1'>Pipe</A><BR>
<A href='?src=\ref[src];make=3;dir=5'>Bent Pipe</A><BR>
<A href='?src=\ref[src];make=6;dir=1'>Junction</A><BR>
<A href='?src=\ref[src];make=17;dir=1'>Heat Exchanger</A><BR>
<A href='?src=\ref[src];make=15;dir=1'>Heat Exchanger</A><BR>
"}
//What number the make points to is in the define # at the top of construction.dm in same folder
@@ -0,0 +1,41 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: MattAtlas
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- bugfix: "Fixed the pipe dispenser dispensing the wrong pipes."