Commit Graph

35 Commits

Author SHA1 Message Date
Anewbe
729ce71aa0 Converts most istype(thing,tool) procs into an appropriate thing.is_tool() format 2018-08-02 21:45:15 -05: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
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
Cyantime
aaef8163be Fixes upgrading capacitors in unary freezers doing nothing. 2017-08-16 17:34:13 -04:00
SinTwo
045c393683 Revert "Revert "Frame Cleanup""
This reverts commit 82722ba42f.
2016-08-13 19:55:57 -04:00
Yoshax
82722ba42f Revert "Frame Cleanup" 2016-08-06 00:27:03 +01:00
SinTwo
66c3a007a9 frame cleanup fixes 2016-07-23 23:45:24 -04:00
SinTwo
5d25d72593 Frame Fixes 2016-06-01 14:32:56 -04:00
SinTwo
5ae20ceb8b Buildables v1.2 (#1517)
* Removes text2path, adds constructability to a few things, adds a locker_painter.dm, and several fixes.

* Fixes Maps due to working on ancient versions.

* Path error.

* Adds a missing ..()
2016-05-03 22:18:12 +01:00
SinTwo
b356f5cf21 Construction Update 2016-03-25 16:02:36 -04:00
mwerezak
176e4232ca Fixes #9155
Heaters and freezers now check if there are other machines in their turf that have the same connection dirs.
2015-08-15 18:28:09 -04:00
mwerezak
6d15809768 Corrects return values for the Topic procs of several computers and some other machines as well. 2015-02-25 21:32:35 -05:00
Kelenius
e6dc9d36fd Update for machine upgrades and some science
Also adds RPED and makes biogenerator and borg charger constructible .
2015-02-08 15:39:11 +03:00
mwerezak
f9344a5a2d Atmos machine update
Takes a pass at updating ATMOSPHERICS to take advantage of the new powernet changes.

Also removes var/on definitions from many atmos machines. Machines generally shouldn't
be doing "on" things if they aren't using power, and most players don't expect a machine
to use power if it isn't "on," so I guess this is fair game.

Also, further refactoring.
2015-01-02 01:46:18 -05:00
PsiOmega
ffbbf2b858 Merge remote-tracking branch 'upstream/dev' into APC
Conflicts:
	code/ATMOSPHERICS/components/unary/heat_source.dm
2014-11-16 10:38:01 +01:00
Zuhayr
90d65aed57 Removed attack_paw, attack_animal and attack_slime. 2014-11-13 17:15:29 +10:30
PsiOmega
0468f12e91 Merge remote-tracking branch 'upstream/dev' into APC
Conflicts:
	code/game/gamemodes/events/power_failure.dm
	code/modules/power/smes.dm
2014-11-11 14:13:02 +01:00
PsiOmega
bc438e21ad All the relevant examine changes. 2014-11-05 12:44:23 +01:00
PsiOmega
a1c19b78be Ports more of /tg/'s powernet code.
Among other things this fixes a a bug where SMES would draw excess power from the powergrid they were outputting to, rather than drawing from.
2014-10-29 14:01:35 +01:00
mwerezak
764ca0874d Heaters/Freezers, Cryo 2014-09-13 02:18:48 -04:00
Zuhayr
9932fae963 Several quickfixes for atmos cooling issues. 2014-09-13 12:56:28 +09:30
Zuhayr
620a790110 Reducing freezer power draw. 2014-09-13 11:31:23 +09:30
mwerezak
11bdf6f568 Fixes map-set power setting not taking effect 2014-09-12 01:17:34 -04:00
mwerezak
b4751e8161 Adds variable power setting to heaters and freezers 2014-09-10 21:14:39 -04:00
mwerezak
ee56453ca3 Allows heater/freezer construction dir to be set 2014-09-07 17:07:53 -04:00
mwerezak
ce970eacd2 Adds atmos/supermatter debug messages 2014-09-06 15:36:35 -04:00
mwerezak
36a772903b Fixes critical gas freezer bug 2014-09-06 15:16:18 -04:00
mwerezak
4ba903565a Fixes heater/freezer icon updating if power cut 2014-09-05 10:07:46 -04:00
mwerezak
3cd0cdf27f Fixes freezers never quite reaching their thermostat temperature 2014-08-23 10:52:57 -04:00
mwerezak
c9f16ec665 Fixes freezer UI bug 2014-08-04 14:48:47 -04:00
mwerezak
8d04a83e97 Updates gas coolers, upgrading of coolers/heaters 2014-08-03 14:34:31 -04: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
sieve32@gmail.com
459c558898 -Make holodeck eswords a child of obj/item/weapon/holo instead of regular eswords, clumsy check removed as a result, and you can no longer do things like cutting through walls or doors or what have you. (Fixes Issue 665)
-Redid icons to be more optimized at compile by setting icon = 'icons/folder/icon.dmi' instead of just icon = 'icon.dmi', meaning that Dream Maker doesn't have to search through every single file for every single .dmi. This shouldn't lead to any errors because of how I went about it, plus the fact that Dream Maker would have freaked out if I screwed something up. Also moved around 2 icons that weren't sorted well.

r4146 compile time: 1 minute, 40 seconds
r4147 compile time: 45 seconds

[VGTG]

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4147 316c924e-a436-60f5-8080-3fe189b3f50e
2012-07-23 00:48:51 +00:00
rastaf.zero@gmail.com
ad6a6e42aa Penlight fits in medical belt.
Fixed several runtime errors.
Monkeys and aliens won't stack dozens of blood stains.
Fixed crash in FEA code related to melting floors.
When screwdrived destructive analyzer unlink from RD console protolate instead of itself.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1443 316c924e-a436-60f5-8080-3fe189b3f50e
2011-04-14 03:52:09 +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