Commit Graph

19 Commits

Author SHA1 Message Date
CHOMPStation2StaffMirrorBot
ad0915a957 [MIRROR] some more new to init (#10270)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
2025-03-02 02:31:24 +01:00
CHOMPStation2StaffMirrorBot
244d055d39 [MIRROR] Atmospherics/Initialize (#9387)
Co-authored-by: ShadowLarkens <shadowlarkens@gmail.com>
2024-11-02 17:34:40 +01:00
Drathek
3995338290 Moar whitespace normalization [MDB IGNORE] (#7750)
Co-authored-by: Raeschen <rycoop29@gmail.com>
2024-02-16 10:54:47 +01:00
Atermonera
cbb40196fc Machinery: Always use update_use_power() 2020-03-23 23:21:10 -04:00
Leshana
63a1dd0143 - 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-04 14:49:33 -05:00
Leshana
224fe42e77 Prepare Atmospherics Machinery for SSatoms (#4501)
* to_chat() replacement.

* Revert calling target.init_dir() before connecting.

* This change was added in https://github.com/PolarisSS13/Polaris/pull/3775 to counteract `dir` not being set prior to New() for dynamically loaded maps.  The root cause was /atom/New() not calling _preloader.load().  Undoing the change now that /atom/New() is fixed.
* The addition of the init_dir() proc itself however, is useful, because there ARE other times some atmos machinery will want to re-initialize its dir, specifically whenever it is rotated.
* init_dir() must be called in the constructor of all atmospherics machines capable of connecting to another.   Since it has to happen for ALL machines, lets move that call to /obj/machinery/atmospherics/New()

* Rename /obj/machinery/atmospherics initialize() to atmos_init()

* These days `initialize()` is used to handle general object initialization that is moved outside of New().  The node connection discovery of atmos machinery needs to happen after all that, and so needs to be in a separate proc.
* Make sure to actually call atmos_init during system startup.
2018-01-06 10:52:56 -06:00
Neerti
1bc28c07c0 Port's TG's Maploader 2017-09-08 12:49:26 -04:00
Leshana
8752999a14 Atmospherics Destroy() cleanup - return qdel hints. 2017-06-05 23:01:39 -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
PsiOmega
1ae0ad6d92 Updates the atom_pool, now datum_pool, to handle any datum object.
Makes the garbage collector similarly robust. Continues the whole Destroy/qdel porting.
2015-04-24 09:59:05 +02:00
mwerezak
d4a193808b Replaces awful connect type system with bitflags 2014-12-23 18:59:54 -05:00
Mloc
83f2a5ba5a fix some misplaced set_dir()s
fixes part of #7284
fixes #7288
fixes one of #7287

Signed-off-by: Mloc <colmohici@gmail.com>
2014-12-08 10:09:09 +00:00
Mloc-Argent
117ca6a135 refactor 'dir = ' into 'set_dir()'
This should have little/no gameplay effect right now, just paving the
 way for directional lights.
Replaced handle_rotation() on buckly things with this.

Signed-off-by: Mloc-Argent <colmohici@gmail.com>
2014-12-01 13:44:02 +00:00
RavingManiac
9801dfa9a9 NewPipe
-Supply and scrubber pipes can be run in parallel without connecting to each other
-Supply pipes will only connect to supply pipes, vents and Universal Pipe Adapters(UPAs)
-Scrubber pipes will only connect to scrubber pipes, scrubbers and UPAs
-Supply and scrubber pipes are offset along the x and y axes to prevent sprite overlap
-UPAs will connect to regular, scrubber and supply pipes, as well as anything else that connects to a regular pipe. UPAs will be used to interface between the supply/scrubber loops and atmos
2014-09-05 00:18:33 +08:00
Loganbacca
e05b5c0bfb Pipe rendering rewrite
- Complete rewrite of pipe rendering code. It now selects icons from a shared cache.
- Manifolds and other devices (pumps, filters, etc.) now match the color of the connected pipes.
- Updated omni devices to use the shared cache.
- Set separate pipe color definitions.
- Cleaned up a lot of pipe code, converting it to absolute paths and removing old commented out code.
- Tweaked t-ray rendering code.
- Tweaked pipe painter.
- Enhanced pipe checking debug command.
- Expanded tank capacity and resprited them.
2014-07-18 13:39:39 +00:00
giacomand@gmail.com
b9bb759cd8 -Multiple fixes for machinery not correctly updating their icons when depowered.
-Gave request consoles an off sprite.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5421 316c924e-a436-60f5-8080-3fe189b3f50e
2012-12-30 02:20:03 +00:00
only.lurking
662c08272a git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2 316c924e-a436-60f5-8080-3fe189b3f50e 2010-08-23 14:29:20 +00:00