Commit Graph

31 Commits

Author SHA1 Message Date
Leshana
2c13bee848 Replace global all_areas list with world.
It ends up having similar performance, so might as well not bother with all_areas.
2020-04-10 14:58:59 -04:00
Leshana
85d3cbfa12 Replaced "area" shuttles with "landmark" shuttles.
Largely ported from the work done at Baystation in Baystation12#17460 and later commits.

 - Shuttles no longer require a separate area for each location they jump to.
   Instead destinations are indicated by landmark objects, which are not necessarily exclusive to that shuttle.
   This means that more than one shuttle could use the same docking port (not at the same time of course).
 - Enhanced shuttle control computers to use nanoui if they didn't.
 - Organizes shuttle datum code a bit better so there is less re-inventing the wheel in subtypes.
 - Allows the possibility of shuttles (or destinations) that start on late-loaded maps.
 - Deprecate the "extra" shuttle areas that are no longer needed and update shuttle areas in unit tests

This all required a bit of infrastructure improvements.

 - ChangeArea proc, for changing the area of a turf.
 - Fixed lighting overlays actually being able to be destroyed.
 - Added a few utility macros and procs.
 - Added "turf translation" procs which are like move_contents_to but more flexible.

(cherry picked from commit c837078105)
2020-03-13 00:26:08 -04:00
Arokha Sieyes
5b15917d32 to_chat replacing stream operator 2020-02-17 13:14:08 -05:00
Verkister
eb3a9ac6d8 Update map_template.dm 2019-02-18 12:26:12 +02:00
Verkister
676ddf281a Fixes submap footprint miscalculations
Submap sanity checks will finally get properly oriented bounds to work with.
2019-02-17 14:22:45 +02:00
Neerti
b494f4a508 Merge pull request #5772 from Atermonera/rotate_wires
Refactors poi rotation to use degrees instead of dir
2019-01-12 04:26:23 -05:00
Neerti
dd558395ea Left something in while conflict-resolving.
Default argument is back to degrees.
2018-12-28 04:43:27 -05:00
Neerti
4993c52079 Merge branch 'master' into rotate_wires 2018-12-28 04:41:22 -05:00
Neerti
5a983ef9f5 Merge branch 'master' of https://github.com/PolarisSS13/Polaris into looping_sounds 2018-12-19 18:31:56 -05:00
Neerti
e8a94d915e Does more work, particularly on zlevel stuff. 2018-12-19 18:31:41 -05:00
Neerti
b60c9097e8 Uncomments a thing. 2018-12-12 20:31:54 -05:00
Neerti
60115154f7 Stops initialization from grinding to a halt when loading maps. 2018-12-12 20:10:23 -05:00
atermonera
a0c8891eb6 Refactors poi rotation to use degrees instead of dir
Fixes powernet rotation being totally non-functional
2018-12-09 22:56:45 -08:00
Neerti
07ad88b590 Adds ability to selectively disable submap rotation. 2018-12-01 07:40:47 -05:00
Arokha Sieyes
5bbec73b66 Fixes maploading
Imagine you're on the last iteration of this loop, you've done the final column of X coordinates and you're going to set maxx.
Would you want to set it to where you are now, the final X column... or would you want to add ONE MORE beyond the template size for some reason then set it to that?

This bug causes all templates that are the size of normal maps to fail to initialize any atoms if your template is the size of your normal maps, because it tries to obtain a square of size minx, miny, minz, maxx, maxy, maxz to initialize, however maxx is nonextant because it exists outside the bounds of the world. It also causes all submaps to initialize an additional column of atoms twice, or not initialize any if they spawn against the right edge of the map.
2018-10-13 01:32:16 -04:00
atermonera
7f5c747d79 Removes debug code (Yes, I'm an idiot) 2018-09-01 01:28:42 -07:00
atermonera
2f9cebd38d Submaps can now be rotated to any cardinal direction (South is default) 2018-08-31 01:32:26 -07:00
atermonera
a20085ccff PoIs can be rotated in increments of 90 degrees 2018-08-30 18:55:22 -07:00
Neerti
be73b8c36a for(var/bad_code in world)
Removes a very large amount of world loops.
Adds a macro to painlessly generate a global list, and the needed code to modify the list when an object is made or deleted automatically.
Cleans up some commented out code.
2018-04-29 17:55:04 -04:00
Neerti
f429a176e4 Adds Map Template Groups
Adds ability to have many different 'versions' of a PoI, yet only having one show up per round.
An example on how to do this is provided with Radio Free Sif (aka DJOutpost).
Just make sure all the different versions have the same 'template_group' value.
2018-03-30 05:34:11 -04:00
Leshana
2e683c7184 Fixes to runtime map loader
- Fix: Do not actually expand world.maxz when measureOnly = true
- Fix: Support var values of "list()"  (no contents)
2018-03-04 12:34:55 -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
44dc4b7286 Implement SSatoms
* Moves proc/initialize() from being on /atom/movable, /are and /turf/simulated to being on /atom - Now turfs can initialize too
* Added the SSatoms subsystem which controls initialization of atoms at roundstart and during normal conditions.
* Disabled the old auto_init = 0 behavior, ALL atoms should get initialized() called on them now.
* Refactored the way initialize() is called during /New() to utilize SSatoms instead of SScreation
* Removed SScreation, as it was only a stop-gap until SSatoms could be ported.
* Updated the maploader to inform SSatoms when it is loading maps instead of SScreation.
* Updated the template map loader to use SSatoms to perform initTemplateBounds
* Renamed 'initialized' var in seed_storage to deconflict.
* Removed usage of auto_init = 0, replaced with a no-op initialize() proc for atoms that don't need initialization.
2018-02-05 15:50:06 -05:00
Arokha Sieyes
9d0ffb96ee POLARIS: Tweak map-loading in some ways
Fixes loading of map templates, now loads it acutally in the center instead of to the upper-left of center.
Warns you if you try to load a submap which is larger than the current world size.
2018-02-03 22:30:24 -05:00
Neerti
6226d3d15c POI Tweaks (#4645)
* WOrk

* Changes more PoI stuff.
2018-01-29 23:42:57 -06:00
Leshana
9d08175078 Fixes #4522 - Make maploader correctly read lists of numbers, paths, etc.
* For non-assoc lists every value was being read as a string.   For vars like "access_req" this is bad - it doesn't work.  Therefore we add support for lists of numbers.
* While I'm here, might as well add support for non-string keys of associative lists too, since that's required by things like vending machines.
2018-01-12 19:45:34 -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
a1734c97e9 Moved makepowernets() into SSmachines initialization proc. 2017-12-29 15:32:06 -05:00
Neerti
fe33977812 Adds Submap (PoI) Seeding Procedure
Mostly ports /tg/'s method of seeding submaps into specific z-levels.
Due to the low number of submaps present, all of the PoIs are guaranteed to spawn. As more are added, this should fix itself.
2017-11-21 19:21:39 -05:00
Neerti
aa454c0e1d Adds Farm PoI
Also fixes various bugs with surface tiles, hopefully.
Adds some documentation to the map file system.
Adds a new 'plane' map, ideal for testing PoIs by loading them manually.
Makes space heaters glow orange.
Adds a new grille type for fancy surface windows.
Adds self planting hydro trays/dirts if a seed is on top of them when the map is loaded.
2017-09-26 01:44:06 -04:00
Neerti
1bc28c07c0 Port's TG's Maploader 2017-09-08 12:49:26 -04:00