Continues the journey of #61730. This time, all map templates will see their area lighting objects created upon getting loaded if they have static_lighting = TRUE. This means that places like Hilbert's hotel, as well as any map placed by an admin during the round, will now be able to properly have dynamic lights without any need for VV shenanigans.
Tested and working, I tested with Hilbert's hotel and by spawning a couple of other map templates to confirm.
Fixes#61558, closes#61340 (kinda not, but it's already fixed anyway, and loosely related to this) and should be the final nail in the coffin of #61349.
Courtesy ping to @TiviPlus, just in case you had anything to say about it.
Basically makes the code less dumb, took a long time. I worked hard to make sure there were no unintended effects (minus the fact you can no longer get spoons from the experimentor). No player-facing effects
I thought it looked weird that all cultist and combat knives were subtypes of the kitchen knives
Bring _HELPERS/_lists.dm to latest standards by:
-Adding proper documentation and fixing existing one
-Giving vars proper names
-Procs now use snake case as per standard (many files that use those procs will be affected)
admins are now notified about a secret gateway load failing, also logs this
secret z levels are protected from incorporeal movement
fixes unpowered ruin areas being powered
adds a bunch of new areas for secret gateways, since var edited areas probably arent a good idea its good to have a few presets
adds cordon turfs and areas, ingame they just look like the z level border, they are completely indestructible, you cant pass them, and if you somehow do, the cordon area kills you (idea from goon but the code and sprites are mine)
adds a z level injector mapping trait, injects a z level trait into the z level its placed on, if you want to add something like ash storms or whatever to your map
adds an anti xray z level trait, you can optionally add this with the z level injector to protect your map against any xray or whatever
bring code up to latest standards, move many procs to named files inside _HELPERS
no idea where to put some of these procs, help is appreciated
made more files to contain some unique code, deleted unsorted.dm, we can rest now
## About The Pull Request
stop forgetting to include mapload, if you don't include it then every single subtype past it by default doesn't include it
for example, `obj/item` didn't include mapload so every single item by default didn't fill in mapload

## Regex used:
procs without args, not even regex
`/Initialize()`
procs with args
`\/Initialize\((?!mapload)((.)*\w)?`
cleanup of things i didn't want to mapload:
`\/datum\/(.)*\/Initialize\(mapload`
currently cycle helpers only work in straight lines, this limits mapping design for airlocks, i now present to you a new mapping helper where all you do is set a var for the helper, and paste it over airlocks, and those airlocks will now all sync up so only one of them can be open at a time (as of now clicking an airlock to open them wont cycle, but the current cycle helpers dont do it either so its consistent)
* Adds in a set of datums to support sending, listening and storing alerts
In contrast to the old system, we now store a list of send alerts on the listener, rather then the area itself.
This makes clearing "our" alerts on destroy not a massive headache.
In addition, we now use a direct ref to the area's cameras list and signals to prevent camera hard deletes. This, combined with the aformentioned ability to clear, virtually eliminates hard deletes
sourced from alerts caused by strange senarios like the alert source moving its tile.
* Converts areas to the system, of note is the fact that areas no longer store a bool that determins if an alert
for power or atmos has been sent, that's instead handled by the alert sender datum. This means the sources list
on alert listeners actually means something
additionally, in order to prevent dumbassery with fire alarms since they're area based, fire alerts are sent by
an alert handler on the area itself
As described in issue #56733, there is a possibility of a race condition in SSmapping.add_new_zlevel - either during Z level incrementing, or the proc itself, as it only expands the amount of registered z-levels after being finished.
While the first hopefully shouldn't happen, it can still manifest because of the CHECK_TICK within. A practical result is that two concurrent calls to this proc will both create a new Z-level, but actually report having made the same first one.
This is problematic for map_templates that will then load blindly to the reported Z-level when using load_new_z, overwriting each other. We sometimes encounter that end result on CM13 codebase because of a map load that can be triggered by an user topic - if two people click at the same time, it's not unlikely for the first call to sleep in CHECK_TICK and let the second run, causing double-loading.
How these new pipes work.
-Smart pipes autoconnect to nearby smart pipes
-They are now color coded, so they only connect to the same colored pipe, the GREY pipe is the wildcard and can connect to every other color, so be aware of this
-ALL components spawned by the RPD can be colored (from pumps to connectors, from pipes to manifolds), if you leave them GREY they can connect to every other color. Color adapters can be colored, but they'll still connect two pipes with different colors. BUILDABLE machines are GREY (thermomachines, cryo, HFR) so be aware of this
-Trying to go across another smart pipe will now build a bridge pipe automatically already colored of the color you choose, so you don't have to place it yourself anymore (is still available in the RPD tho)
-ALL binary components, layer manifolds, color adapters and bridge pipe can be put ONTOP of a smart pipe, but not on another of these. Smart pipes can't be placed on top of these pipes, so you have to build them first.
-Lcrossings can't be made anymore (sorry y'all i tryed, if someone have a way of doing them ping me on discord)
-REMEMBER you still have 5 layers to go, these rules apply to the same layer pipes, so if you do a crossing on different layers you won't see a bridge pipe appear.
## About The Pull Request
Changes up some layer and plane defines for no particular reason lol
## Why It's Good For The Game
Planes actually override layers, and layers control ordering within planes. A lot of the usage of plane and layer was wholly unnecessary. This refactor helps future maintainability while also being needed staging for _future features._
About The Pull Request
Fixes#57446
yeah not my best moment, holodeck currently sets SSatoms to add every call to InitAtom() to a list and then give it back to the holodeck console (it actually goes through map_template/holodeck to do it but whatever). However it turns out atom/New() calls InitAtom too, so if an atom is created while SSatoms is still creating the list to give to the holodeck then that atom is added to the list regardless of whether or not its actually from the holodeck template.
Now theres an extra argument to InitAtom that tells it whether its spawned directly from a map template (ie, its part of the input list of uninitialized atoms that InitializeAtoms was given) or otherwise the output list that the holodeck uses is populated by calling GetAllContents on all atom/movables spawned directly from the template.
also renamed some vars in initTemplateBounds because it was hard to reason what it was doing and made it use as anything
also note that loading a map template with returns_created_atoms = TRUE will no longer track atoms that arent in the map file but are spawned directly onto a turf, currently nothing does this with the holodeck (which is the only map template that has this feature)
by the way this bug is my fault
Why It's Good For The Game
incredibly incredibly unlucky new players dont deserve to be deleted just because they didnt spawn in the holodeck
Changelog
🆑
fix: the holodeck is no longer so powerful that it can destroy anything and everything that dares to start existing while it's busy loading programs
/🆑
Doing the fetches asynchronously both made cache irrelevant and caused mixup with icon use.
Also semi-related fix, where chasms could delete mapping helpers.
Creates update_name and update_desc
Creates the wrapper proc update_appearance to batch update_name, update_desc, and update_icon together
Less non-icon handling code in update_icon and friends
Signal hooks for things that want to change names and descriptions
99%+ of the changes in this are just from switching everything over to update_appearance from update_icon
Done using this command sed -Ei 's/(\s*\S+)\s*\t+/\1 /g' code/**/*.dm
We have countless examples in the codebase with this style gone wrong, and defines and such being on hideously different levels of indentation. Fixing this to keep the alignment involves tainting the blames of code your PR doesn't need to be touching at all. And ultimately, it's hideous.
There are some files that this sed makes uglier. I can fix these when they are pointed out, but I believe this is ultimately for the greater good of readability. I'm more concerned with if any strings relied on this.
Hi codeowners!
Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
Refactors the holodeck to use map templates instead of copy_contents_to, which every maintainer seems to have complaints about.
Fixes#41485 because the matches become part of the spawned list created by ssatoms
Fixes#54789 because the holodeck area no longer has the NO_TELEPORT flag
Fixes#55676 because the map templates cant be changed midround unlike the program copies in the centcom z level
Fixes#49318 because the holodeck no longer creates new areas like the original did
This pr also changes initTemplateBounds to be a /datum/map_template proc instead of a parsed_map proc. This was mainly so I wouldn't have to duplicate vars between map_template and parsed_map. It's also nice because there's no longer a parsed_map proc inside the map_template file, especially when it didn't need to be a parsed_map proc.
The holodeck sims wont take up space in the centcom z level any more (which allows for more possible programs in the future), and map templates are more heavily tested. This is also a chance to future proof the holodeck against bugs. Holodeck also seems more responsive. This should allow for a second custom holodeck in some future ruin as well, although that of course will not be in play for the near future because of the offstation content ban. Also I documented the fuck out of the holodeck
Allows embedding icon edits in your maps by fetching them from external host.
This is intended for use with live-loaded away/event maps not standard ones.
Also updates rustg defines to expose the additional options arguments. (https://github.com/tgstation/rust-g/pull/59)
Speeds up gas movement significantly
Documents the intent and finer details of the atmos system (Thanks dunc)
Fixes excited groups constantly rebuilding, this broke 4 years ago
Fixes superconductors just straight up not working
Allows turfs to sleep while inside an excited group
Adds a new subprocess to SSAir to support rebuilding in this state
Most heat based behavior no longer relies on being inside a fire
Adds a new element to support doing this cleanly
Adds a new subprocess to SSAir to support doing this while a turf is asleep
Refactors air_update_turf to allow for finer control
Makes apcs take damage in heat to prevent infinite plasma fire diffs
Cleans up immutable gas mixtures to make them work properly when the mix has gas in it
Planetary turfs no longer create a new copy of themselves each time they process. We instead use a global
immutable mix
Cleans up a typed for loop in reactions
Canisters will take damage from outside heat now
Speeds up excited group dismantle
Increases the superconductor threshold by 200k
Cleans up some roundstart ATs on some ruins
Uses /turf/open/var/excited to track if a turf is actively processing, preventing a |=
Prevents openspace from trying to melt
Tweaks a canister examine line
Makes planetary turfs reset to base when broken down as part of an excited group
Makes it impossible for planetary turfs to rebuild, just like space tiles
Fixes closed turfs not activating their replacement when destroyed by moving closed -> open turf activation to
the adjacent air subsystem. They were activating and then going back to sleep before adjacent air got a chance
to tick.
Fire alarms will trigger when the area gets too cold for humans
Stops silicons from interacting with the Space Pirate Shuttle's airlocks by cutting the AI wires on the airlocks of the shuttle by default using a new "cut ai wire" helper. Borgs are able to regain control by physically mending the wire of the airlocks.
Note that this does not stop borgs from interacting with other machinery on the pirate shuttle.
The meta to deal with space pirates is for a single borg to cuck pirates by shocking and bolting all of the doors on the pirate ship. This does not entirely get rid of the meta, as any smart borg can simply mend the wires back, but it means borgs will not longer be able to magically shock doors from windows.
I've converted baseturfs into a string list, I had to add a helper proc for baseturf stringlistifying, as the system expects single length baseturfs to not be a list, and I needed to support that. I added a length check of 100 to the helper proc, to help prevent more stuff like what got us into this mess in the first place, the kilo oom bug.
Makes ChangeTurf a lot faster in some cases, as it should be, and saves a lot of memory with cached lists.
I've been pulling my hair out on this one. Ever since I started my ntnet project, I could never get LateInitalize to work right. Apparently it has never worked right. How it was set up before on server start
Station map loads, Does NOT run Initialize(mapload = TRUE)
Generates space, lavaland/icebox ruins
Loads a ruin, DOES run Initialize(mapload = TRUE) EXCEPT on areas
End of mapping system
Atom system Initialized and it checks and runs Initialize(mapload = TRUE) on world
You see the issue? Initialize and by extension LateInitialize is run in blocks. Worst, LateInitialize is run on turfs FIRST in ruins BEFORE Initialize is ever run on the other atoms. While there isn't much in Area, there is map_generator so I am sure it caused some grief for map creators.
The NEW order now is
Station map loads, Does NOT run Initialize(mapload = TRUE)
Generates space, lavaland/icebox ruins
Loads a ruin, Does NOT run Initialize(mapload = TRUE)
End of mapping system
Atom system Initialized and it checks and runs Initialize(mapload = TRUE) on world
Also if you dynamicly load a map, like snowdin or such, it will Initialize all atoms at once and then run LateInitialize properly
* add replace button to shuttle panel
load button now only load new shuttle
* shuttle teplate loads as shuttle
* new shuttle console connects to shuttle
* new navigation computer connect to shurrle
* docking_port id now unique
add count to id if id already in work
* many docks from one base tenplate
* up
* fix unregister
* up
* up
* up
* block multiple shuttle loading
* return preview button
* up id generation
Due to how byond maps start at 1,1 and not 0,0 when loading a map that
is the same size as the world the map will start loading at 0,0 in the
world which is outside the map. load_map defaults the x and y offsets
to 1 for a reason!
Though you can load a map that is larger (257 x 257) than the world as
a band aid for issue.
- Backtick-escape code samples which contain `[]` syntax.
- Fix all crosslinks to nonexistent symbols.
- Somewhat improve docs for qdel defines, research defines, dynamic mode, and others.
- Remove unused bloodcrawling defines.
Some crosslinks to defined but undocumented symbols remain. For BYOND builtins, a future dmdoc version may link those symbols to their entries in the DM reference. Other symbols could be documented by a future PR.
New "file" crosslinks as used in `research.dm` are slated for release in a future dmdoc version.
Adds a mapping helper for piping, it works on all layers, works on all colors, and it autoconnects to other pipe devices. making it extremely useful.
Making mapping less of a massive fucking clusterfuck of burnout is always good.
Mappers can now use Smart Pipes, pipes that autoconnect to other pipes, like redstone! MAPPERS ONLY!
Changes the bounds size proc from async to not. We need to make sure
the bounds on map templates are correct before they are spawned or
weird issues can happen. Fixes#53542. Fixes#53562.
* there was an attempt
* adds ice moon map
adds config options for choosing mining maps
areas now have options that affect random generation on them
weather now has an option to not target indoor areas
adds base for icemoon ruins
turns many 1's into booleans
adds ice chasms
adds ztraits for weather stuff
* fixes up ice ruins to be ice moon compatible
adds lower z level to the ice moon mine
ice chasms now have a smoothed icon
megafauna only spawn in the underground portion of ice moon now
* openspace fixes
* adds new areas and underground specific ruins
* Adds the abandoned village ruin for Ice Moon
* adds abandoned village ruin and fixes some area and tile stuff to work with ice moon
* random mining maps are no longer picked in the config
you can no longer change the mining map before setup is complete
* adds above and below ground ruin as a test
* adds debug functionality for ice moon ruins
fixes a bug where multiz was impossible unless there were shared areas because of whitelisted areas
adds multiple whitelist areas for ruin placement in a list
all underground areas are now outdoors
underground plasma lava rivers are now only spawned in unexplored areas so ruins don't get destroyed by them
* adds unique spawners to icemoon to replace tendrils
adds 2 new mobs to icemoon the polar bear and wolf
adds a clothing flag for shoes that dont slip on ice
modifies mining site to be ready except for the boss
adds the ability for tunnel width to be a specification, ice moon can have 1 tile wide tunnels and rarely 2 wide tunnels
adds a no caves mineral for ice moon ruins
* wolves no longer run into lava or chasms
bears now enrage sooner
bear spawners can now actually be created
adds base for ice moon atmospherics
adds base for a new boss and achievements / score
really bad coder icon for ice boots added
* ice moon now has it's own planetary atmos! (thank god)
* new frost miner stuff
megafauna recovery time can now be tailored to have different cooldowns to ranged or melee attacks
by default sets both of them, with two arguments the first is ranged cooldown and the second is melee cooldown
* converts a bunch of lavaland maps to be compatible with ice moon
adds tendrils from lavaland to the bottom of ice moon with the other megafauna
* updates mob drops for ice moon mobs
updates config entry default value for ice moon
updates ice moon map to have new gulag
* updates station parallax for icemoon
removes extra lavaland ported ruins
updates to demonic frost miner
adds ladder to icemoon map near station
* updates ice moon map to have the ladder inside the mining base
plant flora dont spawn on the lower z level of ice moon now
you get sand from mining rocks now
buncha demonic frost miner changes holy cow
* adds the buried library
* improves map, fixes comment
* make this crap work with the station cause i have to lol it is pretty cool though and now i understand the mapping crap better
* updates ice ruin blacklist
* ice moon stop being too cold thanks
icebox changes, now actually has its own z level that can spawn ruins and such instead of just being openspace
tunnel width is now not stupid
* fixes a demonic frost miner bug where orbs werent exploding after death
atmosphere temp is now correct
fixes library ruin for icemoon
polar bear range is now fixed, only aggros in a short range and follows further than 3 tiles
reverts necropolis chest change
* Adds a new ruin: bathouse, barebones edition
* adds many new ruins
fixes a bug with tunnel creation that caused it to enter no tunnel allowed areas
finishes the frost miner and adds loot to him
you can now force a wabbajack option
* main z level now always has gravity for ice box
* hopefully the hot springs arent the buggiest thing in the world anymore
protects areas near the station from having openspace
* icebox takes less players
fixes the ladder positioning on every icemoon map
* snowstorms now only occur on the station level
fixes some issues with the icebox z level having openspace over the lower level mining base
* Update code/datums/map_config.dm
Co-Authored-By: spookydonut <github@spooksoftware.com>
* Update code/datums/ruins/lavaland.dm
Co-Authored-By: spookydonut <github@spooksoftware.com>
* Update code/game/objects/structures/lavaland/necropolis_tendril.dm
Co-Authored-By: spookydonut <github@spooksoftware.com>
* Update code/game/turfs/closed/minerals.dm
Co-Authored-By: spookydonut <github@spooksoftware.com>
* Update code/game/turfs/open/chasm.dm
Co-Authored-By: spookydonut <github@spooksoftware.com>
* Update code/game/turfs/open/floor/plating/asteroid.dm
Co-Authored-By: spookydonut <github@spooksoftware.com>
* Update code/modules/mob/living/simple_animal/hostile/megafauna/demonic_frost_miner.dm
Co-Authored-By: spookydonut <github@spooksoftware.com>
* Update code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm
Co-Authored-By: spookydonut <github@spooksoftware.com>
* Update code/modules/mob/living/simple_animal/hostile/mining_mobs/polarbear.dm
Co-Authored-By: spookydonut <github@spooksoftware.com>
* Update code/modules/mob/living/simple_animal/hostile/mining_mobs/wolf.dm
Co-Authored-By: spookydonut <github@spooksoftware.com>
* Update code/modules/ruins/icemoonruin_code/hotsprings.dm
Co-Authored-By: spookydonut <github@spooksoftware.com>
* fixes areas on the lust ruin
polar bears now drop a goliath plate equivalent
wolfs now drop a watcher sinew equivalent
adds snow legions
adds a crusher trophy for the demonic frost miner that prevents movement
fixes a bug with asteroid mobs where the aggro icon would never show
adds ice to the snow cave tunnel generation
* starts work on the wendigo megafauna
* replaces snowball machine gun with more miner useful content
adds gentle var for knockback to prevent stunning on hit
polar bears move slower now
new icon for phase 2 demonic miner now
* fixes lust ruin areas
fixes whitespace
fixes nesting issues
adds underground specific mobs
* name / location fixes
demonic frost miner doesnt stun on knockback now
ice demons move faster
* fixes icebox having the wrong baseturf
* adds achievement defines to the wendigo
snowstorm for the lower z level again
adds a new helper for ranged target turfs
theres now a specific subtype for rivers
fixes a bug where ice and spawners spawned with rocks and other flora on top of them
adds indestructible ice rock turf
fixes a bug with ice demons teleport distance being incorrect
adds the start of wendigos attacks
* Apply suggestions from code review
Co-Authored-By: Rohesie <rohesie@gmail.com>
* Update code/modules/mapping/ruins.dm
Co-Authored-By: Rohesie <rohesie@gmail.com>
* Fixes a dumb bug with ruins from a webedit review
The syndicate shuttle can now land on mineral turfs
* the final commit, all that im going to change after this is documentation for procs lol
makes both ice moon z levels below the station underground, and makes it so they generate rivers of their baseturf
* adds nice animation to wendigo scream
* small fixes
* finishes autodoccing everything i could find
* ok im done for real now
* adds anywhere ruins
does review stuff
* review stuff
* ok it removes the stuff now
* fix removal
* fixes from the git
* adds surroundings to the asteroid and lavaland sites
adds butchering gloves to wrath ruins
the lower icebox levels are no longer station levels
fixes capitals on blood drunk and frost miner boss medals
adds engineering outpost ruin by trollbreeder
adds boxstation job changes to icebox
polar bear transformation no longer has immunity to lavaland mobs
fixes ice whelp spelling mistake
* fixes engi outpost atmospherics
fixes missing plating on solar panels
changes slowdown for icemoon turfs
* fixes ruins areas so tunnels can spawn into some of them
adds lights to icebox below area
openspace turfs mine the thing below them now
* fixes wall boundings on asteroid and lavaland domes
* ur lame armhulen
* adds public mining area to icebox
adds computer vendors to icebox
* minor fixes
* fixes map type error
* removes slowdown entirely
increases ore chances
fixes openspace on main map
fixes a ton of active turfs at roundstart
modifies demonic frost miner loot to be cooler and more useful since the boss was hardly killed during tests
tunnels are wider underground now
openspace now deletes itself if it spawns above a ruin
* improve da ruins
* tries to fix multiple atmos issues with ruins
removes bz from the planetary atmos since it could cause unstoppable chain reactions which would cause massive lag
demonic frost miner drill now automatically scans everywhere around you
fixes tunnel generation issue
makes it so randomly generated turfs inherit their no_ruins flags
Co-authored-by: Jonathan Church <jchurch093@gmail.com>
Co-authored-by: s <wesoda24@gmail.com>
Co-authored-by: spookydonut <github@spooksoftware.com>
Co-authored-by: Rohesie <rohesie@gmail.com>
* Build SpacemanDMM from source
* oops
* Fix new unreachables/dumb code
* ooops cache conflict
* bugfix
* oops
* lint
* ninjanomnom held me down and forced me to delete this