Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disposals fix #714

Merged
merged 7 commits into from
Apr 6, 2017
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions code/__defines/machinery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,25 @@ var/list/restricted_camera_networks = list(NETWORK_MERCENARY,"Secret")
#define ATMOS_DEFAULT_VOLUME_FILTER 200 // L.
#define ATMOS_DEFAULT_VOLUME_MIXER 200 // L.
#define ATMOS_DEFAULT_VOLUME_PIPE 70 // L.

//Disposal pipes
#define PIPE_TYPE_STRAIGHT 0
#define PIPE_TYPE_BENT 1
#define PIPE_TYPE_JUNC 2
#define PIPE_TYPE_JUNC_FLIP 3
#define PIPE_TYPE_JUNC_Y 4
#define PIPE_TYPE_TRUNK 5
#define PIPE_TYPE_BIN 6
#define PIPE_TYPE_OUTLET 7
#define PIPE_TYPE_INTAKE 8
#define PIPE_TYPE_JUNC_SORT 9
#define PIPE_TYPE_JUNC_SORT_FLIP 10
#define PIPE_TYPE_UP 11
#define PIPE_TYPE_DOWN 12
#define PIPE_TYPE_TAGGER 13
#define PIPE_TYPE_TAGGER_PART 14

#define SORT_TYPE_NORMAL 0
#define SORT_TYPE_WILDCARD 1
#define SORT_TYPE_UNTAGGED 2

36 changes: 18 additions & 18 deletions code/game/machinery/pipe/pipe_dispenser.dm
Original file line number Diff line number Diff line change
Expand Up @@ -207,42 +207,42 @@ Nah
var/obj/structure/disposalconstruct/C = new (src.loc)
switch(p_type)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename p_type variable in its definition and in switch operator.

if(0)
C.ptype = 0
C.pipe_type = PIPE_TYPE_STRAIGHT
if(1)
C.ptype = 1
C.pipe_type = PIPE_TYPE_BENT
if(2)
C.ptype = 2
C.pipe_type = PIPE_TYPE_JUNC
if(3)
C.ptype = 4
C.pipe_type = PIPE_TYPE_JUNC_Y
if(4)
C.ptype = 5
C.pipe_type = PIPE_TYPE_TRUNK
if(5)
C.ptype = 6
C.pipe_type = PIPE_TYPE_BIN
C.density = 1
if(6)
C.ptype = 7
C.pipe_type = PIPE_TYPE_OUTLET
C.density = 1
if(7)
C.ptype = 8
C.pipe_type = PIPE_TYPE_INTAKE
C.density = 1
if(8)
C.ptype = 9
C.subtype = 0
C.pipe_type = PIPE_TYPE_JUNC_SORT
C.sort_type = SORT_TYPE_NORMAL
if(9)
C.ptype = 9
C.subtype = 1
C.pipe_type = PIPE_TYPE_JUNC_SORT
C.sort_type = SORT_TYPE_WILDCARD
if(10)
C.ptype = 9
C.subtype = 2
C.pipe_type = PIPE_TYPE_JUNC_SORT
C.sort_type = SORT_TYPE_UNTAGGED
if(11)
C.ptype = 13
C.pipe_type = PIPE_TYPE_TAGGER
if(12)
C.ptype = 14
C.pipe_type = PIPE_TYPE_TAGGER_PART
///// Z-Level stuff
if(21)
C.ptype = 11
C.pipe_type = PIPE_TYPE_UP
if(22)
C.ptype = 12
C.pipe_type = PIPE_TYPE_DOWN
///// Z-Level stuff
C.add_fingerprint(usr)
C.update()
Expand Down
Loading