Commit Graph

14 Commits

Author SHA1 Message Date
Aronai Sieyes
09074eaabb Alter playsound paradigm 2020-05-18 23:42:15 -04:00
Arokha Sieyes
f0bc46cc49 Add 2 new pipe types 2020-04-05 23:05:33 -04:00
Neerti
fee131b612 Merge pull request #6093 from Heroman3003/zpipe-fix
Fixes newly constructed vertical pipes being invisible
2019-04-16 22:00:31 -04:00
Leshana
7da46a6dcc Switch cables and pipes to use define constants instead of literals for layers.
Also fix a few things to be on the correct plane.  Basically the under-floor stuff is supposed to be on PLATING_PLANE.
Portable atmospherics go on object layer so they are above stationary machinery, given that they move around.
Fixed wires to be on top of pipes like they used to be, otherwise they'd be obscured too often.
2018-04-02 21:50:03 -04:00
Leshana
131636c6b5 Fix pipe construction conflicting with existing pipes too much.
Bug in the init_dirs_cache was not setting direction of pipes, making all cached dirs be for south.
Because mapped in pipes didn't have piping layer set, mapped in pipes conflicted.
The full-tile check for unary machines forgot to exclude *itself*
2018-03-20 23:30:05 -04:00
Leshana
776b221828 Rewrite pipe construction
- Moved pipe construction defines into __defines/construction.dm
- Unified pipe *unwrenching* by creating a standard proc along with the `construction_type` var.
- Eliminated the pipe fitting name & icon_state lookup tables by adding `pipe_state` var on atmos machinery and referencing that.
    - Each pipe which can be made from a fitting object should override `pipe_state` with the icon state to be used on the pipe fitting object.
- Eliminated the giant switch statement of doom in pipe construction by delegating that work to `on_construction` proc.
    - To make this work, every pipe must implement `get_neighbor_nodes_for_init` which returns a list of nodes which should be re-initialized on that pipe's construction.
- Combined the SCRUBBERS, SUPPLY and REGULAR pipe fitting classes together by storing the `piping_layer` variable and using the `setPipingLayer` procs
- Standardized the code for searching for node neighbors into the `can_be_node` proc.
    - This proc is also improved in that is a mutual check, `check_connectable` is called on BOTH objects, so they have to mutually agree to connect as nodes. Eliminates lots of special edge case logic.
    - Updated all the `amos_init` procs to use `can_be_node`.  In the most common cases, even that boilerplate code is consolidated into the `STANDARD_ATMOS_CHOOSE_NODE` macro.
- Implemented `pipe_flags` which lets pipes declare (or override) certain requirements.
- Adds a "pipe_recipe" datum to help out things that construct pipes.  By taking it out of the dispenser, we open the road for multiple dispenser types.  No, no RPD yet.  Soon.
    - Enhances the pipe dispenser to operate on pipe recipe datums instead of hard coded lists of pipes it can construct.   These datums are also (partially) initialized from the pipe machine types themselves, reducing having to define stuff in multiple places.
    - Switched pipe dispenser UI to use browse().   Not a NanoUI, but makes it a bit prettier with low effort.
    - Changed pipe dispenser to use a button selector to switch between Regular/Scrubbers/Supply instead of having separate list items.
- Added icon states to HE pipes to support the "connected on neither side" state.
2018-03-20 23:29:27 -04:00
Leshana
7cb2555dc7 Updates misc atmospherics machinery init and destroy.
Fixes Destroy() proc on zpipes and cryo cells gets rid of a `loc = X`
Updates remaining atmos machinery to use atmos_init
Fixes area atmos computer to use initialize() instead of spawn-in-New
2018-01-09 15:23:17 -05:00
Leshana
25718bfa7b Fix zpipes losing color in-game.
* Colored zpipes (like scrubbers or supply for example) would always lose color in game becuase atmospherics machinery sets color = null since most pipes use overlays and the icon cache.  For better or worse, zpipes don't, they just use a normal icon_state, so they need color set.
2017-04-26 20:07:00 -04:00
Leshana
23bcfbe28c Fix typo in zpipe proc name.
* The proc obj/machinery/atmospherics/pipe/up/process was supposed to be obj/machinery/atmospherics/pipe/zpipe/process.
* Also changed hard coded integers to use constants while I was editing the file anyway.
2017-04-22 17:05:20 -04:00
Leshana
95b9dde94a Multi-Z code formatting and utilities.
* Global procs should start with /proc
* Use to_chat() macro
* Added utility to find all z-levels are connected (transitively adjacent) and utility to test if two levels are connected.
2017-04-17 11:57:49 -04:00
Zuhayr
18c2f33eab Ported ventcrawling from vg. 2016-09-21 17:16:03 +01:00
Neerti
0a389a418b Revert "Ported ventcrawling from vg." 2016-09-20 17:21:58 -04:00
Zuhayr
843c48a9ee Ported ventcrawling from vg. 2016-09-16 04:05:49 +01:00
Joseph Heinemeyer
8c61c3ab6f Fixes multi-z things. 2015-08-30 18:58:37 -07:00