Commit Graph

618 Commits

Author SHA1 Message Date
Leshana
b70451cda6 Eliminated duplicate code in trinary components.
- Consolidate common functions into trinary_base
- The only real difference in atmos_init was which direction each node would connect in.  Delegated that to an overridable proc, and the rest can be consolidated. Same story for update_underlays()
- Used similar patterns on tvalves which also are trinary even tho they are not subtyes of trinary (for some reason)
2018-02-22 15:10:29 -05:00
Leshana
086d7f9d3e Consolidated digital t-valves type paths.
- Because mirroring is now *much* easier to setup than digital remote control, we reverse the order of inheritance to de-duplicate all the radio code from digital t-valves!
- This requires changing the following type paths:
    /obj/machinery/atmospherics/tvalve/mirrored/digital  -> /obj/machinery/atmospherics/tvalve/digital/mirrored
    /obj/machinery/atmospherics/tvalve/mirrored/digital/bypass -> /obj/machinery/atmospherics/tvalve/digital/mirrored/bypass
- Change made on all maps.

- We can eliminate any overriden methods at all on flipped trinary devices by making a `mirrored` and `tee` variable!  This allows us to do things like flip them without delete/spawning.
- T-Valves are also basically trinary.  Sadly they are not a subtype, so to share code with them I have to put it into an outside proc.  But still worth it.
2018-02-22 15:00:32 -05:00
Leshana
fefbcf6ba2 Went even farther in consolidation of trinary atmospherics.
- We can eliminate any overridden methods at all on flipped trinary devices by making a `mirrored` and `tee` variable!  This allows us to do things like flip them without delete/spawning.
- T-Valves are also basically trinary.  Sadly they are not a subtype, so to share code with them I have to put it into an outside proc.  But still worth it.
2018-02-22 14:58:28 -05:00
Aronai Sieyes
46e63af4b0 Merge pull request #3093 from VOREStation/exp-atmos-trinary
Eliminated duplicate code in trinary components.
2018-02-22 12:32:52 -05:00
Leshana
edd1cfd316 Eliminated duplicate code in trinary components.
- Consolidate common functions into trinary_base
- The only real difference in atmos_init was which direction each node would connect in.  Delegated that to an overridable proc, and the rest can be consolidated. Same story for update_underlays()
- Used similar patterns on tvalves which also are trinary even tho they are not subtyes of trinary (for some reason)
2018-02-21 20:43:40 -05:00
Leshana
8371af79c5 Allow mapped in pipes on openspace turfs with catwalks etc.
- Pipes have been deleting themselves in update_icons()  This is crazy, don't do it.
- The only real reason they have been doing this is to prevent pipes from disconnected on both ends because no icon states existed for it.  So I just made icon states.
2018-02-19 20:51:20 -05:00
Leshana
0a241e779e Allow mapped in pipes on openspace turfs with catwalks etc.
- Pipes have been deleting themselves in update_icons()  This is crazy, don't do it.
- The only real reason they have been doing this is to prevent pipes from disconnected on both ends because no icon states existed for it.  So I just made icon states.
2018-02-19 20:44:48 -05:00
Leshana
5847319443 Update every initialize() proc to return an initialize hint.
* Yes, all of them.
* Also did a few corrections to redundant New() and broken Destroy() along the way
* Renamed the turf_initializer.initialize() proc to InitializeTurf to avoid confusion.
* Subsumed /area/proc/initialize into /atom/proc/initialize() - Made /area's LateInitialize to get same behavior as before.
2018-02-05 15:50:13 -05:00
Leshana
17cfeaa518 Add "shuttle" vent pump.
Adds an exterior vent pump that pumps air to/from the turf *front* of it, so it can be mounted on a shuttle but exchange air outside the shuttle.
2018-02-04 18:54:19 -05:00
Leshana
cef001bf2a Update every initialize() proc to return an initialize hint.
* Yes, all of them.
* Also did a few corrections to redundant New() and broken Destroy() along the way
* Renamed the turf_initializer.initialize() proc to InitializeTurf to avoid confusion.
* Subsumed /area/proc/initialize into /atom/proc/initialize() - Made /area's LateInitialize to get same behavior as before.
2018-02-03 01:00:57 -05:00
Leshana
27c3272821 Merge remote-tracking branch 'upstream-polaris/master' into polaris-sync-2018-01-27
# Conflicts:
#	code/ZAS/_docs.dm
#	code/__defines/mobs.dm
#	code/game/turfs/flooring/flooring_decals.dm
#	code/game/turfs/simulated/walls.dm
#	code/modules/client/preference_setup/loadout/loadout_utility.dm
#	code/modules/lore_codex/codex.dm
#	code/modules/mob/living/life.dm
#	code/modules/mob/living/living_defines.dm
#	maps/southern_cross/southern_cross-1.dmm
#	maps/southern_cross/southern_cross-3.dmm
#	maps/southern_cross/southern_cross-6.dmm
#	maps/southern_cross/southern_cross-7.dmm
#	maps/southern_cross/southern_cross_jobs.dm
#	vorestation.dme
2018-01-27 23:08:53 -05:00
Leshana
972acdaf2c Even more GC fixes
* Fixes /obj/machinery/atmospherics/omni mixer and filter's being GC-able
* Fixes /obj/machinery/power/sensor being GC-able
2018-01-23 13:24:31 -05:00
Leshana
440141c054 Fixes #2820 - Vent pumps shutting down after some template loads
Specific situation happens when power_change() is called before atmos_init is called for the first time()
update_icons has no business modifying variables like use_power.  Just update the icon!
2018-01-23 13:24:31 -05:00
Leshana
cba712992a Fixes #2820 - Vent pumps shutting down after some template loads
Specific situation happens when power_change() is called before atmos_init is called for the first time()
update_icons has no business modifying variables like use_power.  Just update the icon!
2018-01-22 19:21:56 -05:00
Leshana
ab87edeae9 Fix construction of HE pipes, Vents, and Scrubbers Plus qdel issues.
The initialize() routines of HE pipes, vents an scrubbers need to be atmos_init() after all.
If you register yourself with radio controller you need to de-register yourself too.
2018-01-19 23:45:40 -05:00
Leshana
e49d87bc2a Fix construction of HE pipes, Vents, and Scrubbers Plus qdel issues.
The initialize() routines of HE pipes, vents an scrubbers need to be atmos_init() after all.
If you register yourself with radio controller you need to de-register yourself too.
2018-01-19 23:21:55 -05:00
Arokha Sieyes
ff228754b3 Merge polaris sync 01 17 2018
Planes, layers, human/update_icon()
2018-01-17 17:56:51 -05:00
Leshana
6310c1da78 Eliminate duplicate code in pipes hide & process procs.
* These procs were repeated verbatim on the different subtypes of /obj/machinery/atmospherics/pipe.  Consolidated them in the parent.
* Added little comment headers over the different types of pipes to make the file easier to read.
2018-01-15 14:26:19 -05:00
Neerti
96d3d361d0 Adds Boats, Ports /TG/ Buckling (#4527)
* Adds Boats, Ports /TG/ Buckling

* Travis Appeasement

* Changelog
2018-01-14 14:58:15 -06:00
Leshana
807f1c7b4b Merge remote-tracking branch 'polaris-upstream/master' into polaris-sync-2018-01-09
# Conflicts:
#	code/game/objects/items/devices/communicator/UI.dm
#	code/game/objects/structures/flora.dm
#
2018-01-09 14:40:09 -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
Leshana
28c193cbdb Merge remote-tracking branch 'refs/remotes/polaris-upstream/master' into polaris-sync-2018-01-04
# Conflicts:
#       code/game/objects/items/devices/communicator/communicator.dm
#       code/modules/client/preference_setup/occupation/occupation.dm
#       code/modules/mob/living/simple_animal/animals/cat.dm
#       code/modules/mob/mob_helpers.dm
#       code/unit_tests/zas_tests.dm
#       maps/southern_cross/southern_cross-1.dmm
#       maps/southern_cross/southern_cross-3.dmm
#       maps/southern_cross/southern_cross-6.dmm
#       vorestation.dme
2018-01-04 22:44:04 -05:00
Leshana
a97a574278 Transformed the machinery processor into an StonedMC subsystem
* This is PHASE 1 of a multi-phase conversion.  In this first phase we implement the subsystem, but leave it processing the existing global list variables.  In the next phase we will switch to use datum variables in the subsystem.  The main reason for splitting into two phases is ease of code review; change the meaningful code without the hundreds of machines -> SSmachines.machinery substitutions.
* We did declare macros for adding/removing things to the processing lists, and convert everywhere to use the macros.
* Added var/is_processing to /datum to keep track of whether an instance is already in a processing list (prevents it being in the list twice!) and also debugging, making sure its not in two lists etc.
* NOTE: The global machines list is **no longer sorted** for performance reasons.  As far as I know, the only module that actually ever cared was cameras.   Our camera system already handles its own sorting in the cameranets anyway, so it should no longer be needed.
2017-12-29 15:31:59 -05:00
Cyantime
6e24c453eb Merge branch 'master' into algaegen 2017-12-01 19:14:56 -05:00
Cyantime
ee435ef63f Unfix 2017-11-29 01:13:18 -05:00
Cyantime
9147613dbb Just the fixes 2017-11-29 01:09:01 -05:00
Cyantime
1dad838505 Build farms are unfilled by default 2017-11-28 22:51:43 -05:00
Cyantime
2c31da4064 Oxygen Generator improvements 2017-11-28 22:05:28 -05:00
killer653
1bb71ef429 Polaris Sync 2017-10-16 22:16:24 -04:00
killer653
fb8ba69ada Fixes all the other stuff 2017-10-15 20:56:13 -04:00
killer653
0080539924 More fixes 2017-10-15 19:54:50 -04:00
killer653
0f20177c5f Some more fixes 2017-10-15 19:02:26 -04:00
killer653
3cd3054811 Fixes filter being used, which prevented compiling 2017-10-15 19:01:55 -04:00
Cyantime
ede7f79dfe Forgot this. 2017-09-30 00:28:33 -04:00
Cyantime
36e78b48f1 Adds plasma research outpost. 2017-09-29 02:28:43 -04:00
Cyantime
56afe20d39 Fixes some trinary device direction initializations 2017-09-28 17:39:46 -04:00
killer653
bddfa16f82 Polaris sync 2017-09-15 21:17:34 -04:00
Neerti
194188fe8d Fixes Radiator Pipes 2017-09-13 16:08:13 -04:00
Gearshy
302d6d62f6 Makes nitrogen tanks bigger 2017-09-13 21:32:44 +02:00
Anewbe
f3b989f33e Merge pull request #3809 from Cyantime/unwrench
Fixes pipe caps to always be removable
2017-09-11 17:21:10 -04:00
Anewbe
6ffebcef6e Merge pull request #3775 from Neerti/9/8/2017_tg_maploader_port
Port's TG's Maploader
2017-09-11 17:17:23 -04:00
Cyantime
82626c6936 Removes pipe pressure check copypaste. Fixes pipe caps to always be removable. 2017-09-09 21:24:52 -04:00
Neerti
1bc28c07c0 Port's TG's Maploader 2017-09-08 12:49:26 -04:00
Cyantime
c246d701b1 Makes passive vents constructable 2017-09-07 16:56:34 -04:00
killer653
cafac8efae Polaris Sync 2017-08-28 20:52:11 -04:00
Cyantime
aaef8163be Fixes upgrading capacitors in unary freezers doing nothing. 2017-08-16 17:34:13 -04:00
killer653
468e73c7f3 Polaris sync 2017-08-06 19:07:17 -04:00
Neerti
99eb6f9404 Updates Tools
Adds toolspeed var, which is a multiplier on how 'fast' the tool works.  0.5 means it goes twice as fast.
Adds usesound var, which determines what sound is used when a tool is being used.
Changes a lot of code to use those two vars instead.
Adds 'ayyy' tools, which are ported from /tg/'s abductor gamemode.  They're currently admin only but I might make them obtainable by xenoarch later.
Adds powertools, also from /tg/.  CE starts with them in a new toolbelt that spawns in their locker, ported from (you guessed it) /tg/.
Changes welder sprites to look nicer, ported yet again from /tg/.  Modified the blue welder slightly so it can be the electric welder sprite.
Adds various sounds from /tg/, for tools and welders.
2017-08-03 04:49:23 -04:00
silveryferret
de8619bb11 Lets scrubbers scrub volatile fuel 2017-07-29 21:54:49 -04:00
Cyantime
ad0c5be5f6 fixes "aglae" 2017-06-24 23:20:33 -04:00