Fixes pipe construction. (#15978)

Co-authored-by: Andrew Cooper <mikomyazaki@gmail.com>
This commit is contained in:
mikomyazaki
2023-03-08 02:59:19 +00:00
committed by GitHub
co-authored by Andrew Cooper
parent 173684e0c7
commit 9fbe22d262
5 changed files with 125 additions and 119 deletions
+1
View File
@@ -59,6 +59,7 @@
#include "code\__defines\organs.dm"
#include "code\__defines\origin_traits.dm"
#include "code\__defines\overmap.dm"
#include "code\__defines\pipes.dm"
#include "code\__defines\projectiles.dm"
#include "code\__defines\psi.dm"
#include "code\__defines\qdel.dm"
+49
View File
@@ -0,0 +1,49 @@
#define PIPE_SIMPLE_STRAIGHT 0
#define PIPE_SIMPLE_BENT 1
#define PIPE_HE_STRAIGHT 2
#define PIPE_HE_BENT 3
#define PIPE_CONNECTOR 4
#define PIPE_MANIFOLD 5
#define PIPE_JUNCTION 6
#define PIPE_UVENT 7
#define PIPE_MVALVE 8
#define PIPE_PUMP 9
#define PIPE_SCRUBBER 10
#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 19
#define PIPE_DOWN 20
///// Z-Level stuff
#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 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 41
#define PIPE_PASSIVE_GATE_SCRUBBER 42
#define PIPE_PASSIVE_GATE_SUPPLY 43
-85
View File
@@ -1,57 +1,3 @@
/*CONTENTS
Buildable pipes
Buildable meters
*/
#define PIPE_SIMPLE_STRAIGHT 0
#define PIPE_SIMPLE_BENT 1
#define PIPE_HE_STRAIGHT 2
#define PIPE_HE_BENT 3
#define PIPE_CONNECTOR 4
#define PIPE_MANIFOLD 5
#define PIPE_JUNCTION 6
#define PIPE_UVENT 7
#define PIPE_MVALVE 8
#define PIPE_PUMP 9
#define PIPE_SCRUBBER 10
#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 19
#define PIPE_DOWN 20
///// Z-Level stuff
#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 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 41
#define PIPE_PASSIVE_GATE_SCRUBBER 42
#define PIPE_PASSIVE_GATE_SUPPLY 43
/obj/item/pipe
name = "pipe"
desc = "A pipe"
@@ -1120,34 +1066,3 @@ Buildable meters
qdel(src)
return TRUE
return ..()
//not sure why these are necessary
#undef PIPE_SIMPLE_STRAIGHT
#undef PIPE_SIMPLE_BENT
#undef PIPE_HE_STRAIGHT
#undef PIPE_HE_BENT
#undef PIPE_CONNECTOR
#undef PIPE_MANIFOLD
#undef PIPE_JUNCTION
#undef PIPE_UVENT
#undef PIPE_MVALVE
#undef PIPE_PUMP
#undef PIPE_SCRUBBER
#undef PIPE_GAS_FILTER
#undef PIPE_GAS_MIXER
#undef PIPE_PASSIVE_GATE
#undef PIPE_VOLUME_PUMP
#undef PIPE_MTVALVE
#undef PIPE_MTVALVEM
#undef PIPE_GAS_FILTER_M
#undef PIPE_GAS_MIXER_T
#undef PIPE_GAS_MIXER_M
#undef PIPE_SUPPLY_STRAIGHT
#undef PIPE_SUPPLY_BENT
#undef PIPE_SCRUBBERS_STRAIGHT
#undef PIPE_SCRUBBERS_BENT
#undef PIPE_SUPPLY_MANIFOLD
#undef PIPE_SCRUBBERS_MANIFOLD
#undef PIPE_UNIVERSAL
#undef PIPE_PASSIVE_GATE_SCRUBBER
#undef PIPE_PASSIVE_GATE_SUPPLY
//#undef PIPE_MANIFOLD4W
+34 -34
View File
@@ -609,44 +609,44 @@
// The numbers below refer to the numberized designator for each pipe, which is used in obj/item/pipe's new
// Take a look at code\game\machinery\pipe\construction.dm line 69 for more information. - Geeves
var/list/standard_pipes = list(
"Pipe" = 0,
"Bent Pipe" = 1,
"Manifold" = 5,
"Manual Valve" = 8,
"4-Way Manifold" = 19,
"Manual T-Valve" = 18,
"Upward Pipe" = 21,
"Downward Pipe" = 22
"Pipe" = PIPE_SIMPLE_STRAIGHT,
"Bent Pipe" = PIPE_SIMPLE_BENT,
"Manifold" = PIPE_MANIFOLD,
"Manual Valve" = PIPE_MVALVE,
"4-Way Manifold" = PIPE_MANIFOLD4W,
"Manual T-Valve" = PIPE_MTVALVE,
"Upward Pipe" = PIPE_UP,
"Downward Pipe" = PIPE_DOWN
)
var/list/supply_pipes = list(
"Pipe" = 29,
"Bent Pipe" = 30,
"Manifold" = 33,
"4-Way Manifold" = 35,
"Upward Pipe" = 37,
"Downward Pipe" = 39
"Pipe" = PIPE_SUPPLY_STRAIGHT,
"Bent Pipe" = PIPE_SUPPLY_BENT,
"Manifold" = PIPE_SUPPLY_MANIFOLD,
"4-Way Manifold" = PIPE_SUPPLY_MANIFOLD4W,
"Upward Pipe" = PIPE_SUPPLY_UP,
"Downward Pipe" = PIPE_SUPPLY_DOWN
)
var/list/scrubber_pipes = list(
"Pipe" = 31,
"Bent Pipe" = 32,
"Manifold" = 34,
"4-Way Manifold" = 36,
"Upward Pipe" = 38,
"Downward Pipe" = 40
"Pipe" = PIPE_SCRUBBERS_STRAIGHT,
"Bent Pipe" = PIPE_SCRUBBERS_BENT,
"Manifold" = PIPE_SCRUBBERS_MANIFOLD,
"4-Way Manifold" = PIPE_SCRUBBERS_MANIFOLD4W,
"Upward Pipe" = PIPE_SCRUBBERS_UP,
"Downward Pipe" = PIPE_SCRUBBERS_DOWN
)
var/list/devices = list(
"Universal Pipe Adapter" = 28,
"Connector" = 4,
"Unary Vent" = 7,
"Scrubber" = 10,
"Gas Pump" = 9,
"Pressure Regulator" = 15,
"High Power Gas Pump" = 16,
"Gas Filter" = 13,
"Omni Gas Filter" = 27
"Universal Pipe Adapter" = PIPE_UNIVERSAL,
"Connector" = PIPE_CONNECTOR,
"Unary Vent" = PIPE_UVENT,
"Scrubber" = PIPE_SCRUBBER,
"Gas Pump" = PIPE_PUMP,
"Pressure Regulator" = PIPE_PASSIVE_GATE,
"High Power Gas Pump" = PIPE_VOLUME_PUMP,
"Gas Filter" = PIPE_GAS_FILTER_M,
"Omni Gas Filter" = PIPE_OMNI_FILTER
)
/obj/item/rfd/piping/examine(mob/user)
@@ -692,7 +692,7 @@
// Special case handling for bent pipes. They require a non-cardinal direction
var/pipe_dir = NORTH
if(selected_pipe in list(1, 30, 32))
if(selected_pipe in list(PIPE_SIMPLE_BENT, PIPE_SUPPLY_BENT, PIPE_SCRUBBERS_BENT))
pipe_dir = NORTHEAST
new /obj/item/pipe(T, selected_pipe, pipe_dir)
@@ -720,16 +720,16 @@
switch(selected_mode)
if(STANDARD_PIPE)
pipe_examine = "Pipe"
selected_pipe = 0
selected_pipe = PIPE_SIMPLE_STRAIGHT
if(SUPPLY_PIPE)
pipe_examine = "Pipe"
selected_pipe = 29
selected_pipe = PIPE_SUPPLY_STRAIGHT
if(SCRUBBER_PIPE)
pipe_examine = "Pipe"
selected_pipe = 31
selected_pipe = PIPE_SCRUBBERS_STRAIGHT
if(DEVICES)
pipe_examine = "Universal Pipe Adapter"
selected_pipe = 28
selected_pipe = PIPE_UNIVERSAL
/obj/item/rfd/piping/borg/useResource(var/amount, var/mob/user)
if(isrobot(user))
+41
View File
@@ -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: mikomyazaki
# 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: "Handheld pipe dispensers will now dispense the correct pipes."