And thus begins my attempt to salvage the quest for Arctic Station 13
Created by: dylanstrategie
I was the first person to try a serious implementation of snow maps, although at the time I didn't have either the coding knowledge nor the tools (for example base turf) to do it properly
Now that Celt has tried a thing, I'll just pick it up and see how far I can bring it
This is obviously not even close to feature complete, but I have reached some blockers, notably with the inner workings of relativewall and breathing code, that will need me to make separate PRs with major changes before I can continue on this
The only two functional changes this PR will have on any snow spawned in is that trees won't spawn randomly for now (generator implementation not done yet) and I tweaked the climate conditions a bit
Minor changes and additions :
- Added two new unsorted helpers. Has_contents() checks a turf for contents that aren't lighting overlays (because yes, that's in the contents) and clear_contents() which clears up all contents on a tile that aren't the lighting overlays
- Added a simple layer tweak system to prevent tree Z-fighting when multiple are spawned next to eachother. This might look a bit shabby but it actually works without any problems
- Added or converted a few new snow vegetation types, notably snow grass and snow rocks
- Snow turfs were moved to their own file instead of being part of the unsimulated floor file
- Deleted the old code/structure folder. It wasn't used for anything and the flora.dm file was already moved and massively improved on in the obj/structures folder
- Added a new away mission. IT IS A COMPLETELY EMPTY EXPANSE OF SNOW FOR NOW. Here will be -eventually- an actual arctic map
Major changes :
- Added the first prototype for a radial generator system, as part of a wider "universal generator system"
- In short, you spawn in a "seed", and using spiral_block() and a ton of variables you can set and tweak it produces a randomly generated mix of any obj, mob or turf types with both a weighted list and a random change of planting that is distance dependent, in a circle (hence why it's a radial generator)
- Even more clearly, you spawn a marker and it spawns a bunch of shit depending on what variables you set, the code should be explicit
- It's not too laggy, even with all the added checks, although mass replacing turfs in a 15 to 30 radius causes a one second hang, because that is a lot of turfs
- Some changes down to snow tiles along the way. Notably, the atmosphere was changed and uses define, added messages and changed the amount of snowballs dug up and per tile, etc
The two issues I plan to tackle with further PRs is visual oddities with permafrost smoothing and suffocating when breathing in arctic air (needs breath percentages instead of thresholds). Otherwise, this is fully functional and has been tested thoroughly over the course of two days
Example of generated terrain :