Commit Graph

237 Commits

Author SHA1 Message Date
SkyratBot
db33d75a5e [MIRROR] Space/Changeturf fixes and optimizations [MDB IGNORE] (#19201)
Space/Changeturf fixes and optimizations

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2023-02-28 15:23:35 -05:00
SkyratBot
f0b7813d48 [MIRROR] Don't create abandoned airlocks with walls underneath them. [MDB IGNORE] (#19568)
* Don't create abandoned airlocks with walls underneath them. (#73656)

## About The Pull Request
Fixes #71504

#70237 attempted to remove this and did in some cases, however the case
where the abandoned airlock is able to find an adjacent wall turf to
copy the type of still fails to delete the airlock.
This fixes that.

Also in my testing, the times where it _failed_ to find a nearby wall
turf to copy and spawned a default wall would leave the mapping helper
visible in the round. Oops!

## Why It's Good For The Game

Mapping helpers should always delete themselves when finished.
The airlocks with walls under them are funny once and annoying the rest
of the time. As of that older PR, this continuing to happen is regarded
as a bug.
Also apparently it might be required anyway for Wallening.

## Changelog

🆑
fix: Maintenance tunnels should no longer sometimes contain airlocks
with walls underneath them.
/🆑

* Don't create abandoned airlocks with walls underneath them.

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-02-26 19:29:32 -08:00
SkyratBot
db625af910 [MIRROR] Optimize cardboard cutouts saving 1.5s+ on init times [MDB IGNORE] (#19435)
* Optimize cardboard cutouts saving 1.5s+ on init times (#73404)

New regression in init times. Closes
https://github.com/tgstation/dev-cycles-initiative/issues/32. CC @ Fikou

- Instead of creating a human and icon for *every* cardboard cutout when
initialized, only creates the one we're actually using. When you're
about to use a crayon, creates all of them.
- Instead of using getFlatIcon, uses appearances directly.

* Optimize cardboard cutouts saving 1.5s+ on init times

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-02-19 22:52:00 +00:00
SkyratBot
e40348c01a [MIRROR] [NO GBP] Reinforced plating mapping helper actually function correctly. [MDB IGNORE] (#19405)
* [NO GBP] Reinforced plating mapping helper actually function correctly. (#73464)

## About The Pull Request

Reinforced plating mapping helpers worked for only a feew specific
use-case which ended up being the only usecases I tested, I've modified
the code so it should work as expected in all usecases. In short this
fixes reinforced plating appearing in places where there is not actually
plating for it to replace, and stacking multiple layers of plating where
there should not be multiple layers.
## Why It's Good For The Game

Fixes a bug I introduced myself.
## Changelog
🆑
fix: Reinforced Plating baseturf helpers work and should now be bug free
enough to be used in maps.
/🆑

* [NO GBP] Reinforced plating mapping helper actually function correctly.

---------

Co-authored-by: NamelessFairy <40036527+NamelessFairy@users.noreply.github.com>
2023-02-17 18:01:19 -08:00
SkyratBot
17b58cee48 [MIRROR] Fixes some runtime spam from lazyloading/map templates [MDB IGNORE] (#19089)
* Fixes some runtime spam from lazyloading/map templates

* Update map_template.dm

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: lessthnthree <three@lessthanthree.dk>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: Tastyfish <crazychris32@gmail.com>
2023-02-16 22:47:13 -05:00
SkyratBot
79d926ebaf [MIRROR] Add all ruins to unit testing for CI [MDB IGNORE] (#19345)
* Add all ruins to unit testing for CI (#73179)

* Add all ruins to unit testing for CI

---------

Co-authored-by: Tim <timothymtorres@gmail.com>
2023-02-15 12:59:49 -08:00
SkyratBot
5f9f60713b [MIRROR] Starlight Polish (Space is blue!) [MDB IGNORE] (#19059)
* Starlight Polish (Space is blue!) (#72886)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

Adds support to underlays to realize_overlays
Ensures decals properly handle plane offsets
Fixes space lighting double applying if it's changeturf'd into. this
will be important later
Makes solar vis_contents block emissives as expected
Moves transit tube overlays to update_overlays, adds emissive blockers
to them

#### Adds render steps

An expansion on render_target based emissive blockers. 
They allow us to hijack an object's appearance and draw it somewhere
else, or even modify it, THEN draw it somewhere else.
They chain quite nicely

Fixes shuttles deleting z holder objects

#### Makes space emissive, makes walls and floors block emissives
The core idea here goes like this:
We make space glow, and give its overlays some color

This way, the tile and space parallax remain fullbright, along with
anything that doesn't block emissives, but anything that does block
emissives will instead get shaded the color of starlight

This requires a bit of extra work, see later

This is done automatically with render relays, which now support
specifiying layer and color (Need to make an editor for these one of
these days)

The emissive blocking floor stuff requires making a second render plate
to prevent double scaling

Also adds some new layering defines for lighting, and ensures all turf
lights have a layer. We'll get to this soon

#### Makes things in space blue

We color them the same as starlight, by taking advantage of space being
emissive
This means that things in space that block emissive will block it
correctly and be colored blue by the light overlay, but space itself
will remain fullbright

This does require redefining what always_lit means, but nothing but
cordons use that so it's fineee


#### Makes glass above space glow, and some other stuff

Glass tiles that sit above space will now shine light with matching
color to the glasses color. This includes mat tiles.

Glass tiles (not mat because they have no alpha) also only partially
block emissives.
Adds a new proc that uses render steps to acomplish this, essentially
we're cutting out bits below X alpha and drawing what remains as an
emissive.

#### Modifies partial space showing to support glow

Essentially, alongside displaying space as an underlay, we also display
a light overlay colored like starlight.
That starlight overlay gets masked to only be visible in bits that do
not contain any alpha.

We also mask the turf lighting to not go into bits that have no alpha,
to ensure we get the effect we want.
This is done with that lighting layer thing I mentioned earlier.

#### Makes appearance realization's list output ordered

I want it output in order of overlay, sub overlay suboverlay, next
overlay
Need to use insert for that

## Why It's Good For The Game

Pretty!
Also having space be emissive is a very very good way to test for fucked
emissive blockers (If it's broken why are we even drawing the overlay)
I know for a fact mob blockers on lizards and socks are kinda yorked, I
think there's more

<details>
<summary>
Old
</summary>


![image](https://user-images.githubusercontent.com/58055496/213916157-d4b38aa7-3ab6-42a4-989f-7bfba2dc2cba.png)

![image](https://user-images.githubusercontent.com/58055496/213916077-637fa288-bbee-477d-aded-730d9683477e.png)

![image](https://user-images.githubusercontent.com/58055496/213916088-0657a8a2-5627-48e2-8c4b-870c90ef2072.png)

</details>


<details>
<summary>
New
</summary>


![image](https://user-images.githubusercontent.com/58055496/213916107-2af74e64-1817-4a44-b528-180a9160cb9e.png)

![image](https://user-images.githubusercontent.com/58055496/213916115-5fa36fcc-b988-4ccf-850e-21c26ed463d0.png)

![image](https://user-images.githubusercontent.com/58055496/213916120-6833187d-b12e-42a7-ac4b-63c56deb71e5.png)

</details>

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑
add: Space now makes things in it starlight faintly blue
fix: Glass floors that display space now properly let space shine
through them, rather then hiding it in the dark
add: Glass floors above space now glow faintly depending on their glass
type
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>

* update modular

* Update _decal.dm

* Update _decal.dm

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
2023-02-12 00:42:28 -08:00
SkyratBot
0586d4c294 [MIRROR] [NO GBP] Lazy Template Cordoning | Double Runtime Fix [MDB IGNORE] (#19042)
[NO GBP] Lazy Template Cordoning | Double Runtime Fix (#72709)

## About The Pull Request

Adds automatic cordoning to block reservations.
Also fixes an issue where ChangeTurf would cause SSicon_smoothing to
throw runtimes by calling QUEUE_SMOOTH regardless of initialization
completion

## Why It's Good For The Game

## Changelog

---------

Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-02-02 16:11:52 +00:00
Funce
60bfb76832 [MIRROR] Dynamic Human Icon Generation For Simple/Basic Mobs (& Cardboard Cutouts) [MDB IGNORE] (#18884)
* Dynamic Human Icon Generation For Simple/Basic Mobs (& Cardboard Cutouts) (#72517)

revive of #68760
this time a proc, not an element
this time supports cardboard cutouts
this time supports mob corpses

![image](https://user-images.githubusercontent.com/23585223/211064291-81070650-189f-4afa-8116-81b687e3ea35.png)

prevents these icons ever being outdated, they'll always look what they
are supposed to, saves spriting work

🆑 Fikou, a hood by Viro
refactor: humanoid mobs and cardboard cutouts automatically generate
their sprites, they no longer will be outdated
/🆑

Co-authored-by: Time-Green <timkoster1@hotmail.com>

* Modular!

* Fix signal override merge skew (#72882)

Caused by https://github.com/tgstation/tgstation/pull/72517, with
https://github.com/tgstation/tgstation/pull/72561 raising an error that
was being hidden before

This changes equip logic somewhat so that set_wearer was being called
twice.

I don't think this should be being run in visualsOnly at all, as it does
a ton of stuff like registering signals, updating UI, etc etc etc. Don't
have time to investigate further.

---------

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: Time-Green <timkoster1@hotmail.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-01-27 13:56:00 -05:00
Zonespace
972c350665 Mirror #71906 (#18666)
[READY] DRAMATIC SHUTTLES!! You can now fly around the shuttle (#71906)

You can move around shuttles during transport now! Instead of them
teleporting you instantly into deepspace, you can move around somewhat
depending on your space-mobility and grip-strength.

![image](https://user-images.githubusercontent.com/7501474/206866132-3fae024c-a8a2-4f4a-b4b8-37c96a254498.png)

**Please watch the demonstration aswell, it should answer most
questions:**
https://www.youtube.com/watch?v=Os77qDOVSXE

Interactions:
- Being within armsreach of a wall or solid object means you 'cling',
where the shuttle pull is very weak and you can basically run around the
shutt;e (but dont fuck up or you're gone)
- Being in range of nothing gives you a very heavy pull, you can barely
resist if you have a decent jetpack
- Objects are instantly power-yeeted
- Being pulled or riding something excempts you from hyperspace pull
- Touching a space tile while being on hyperspace dumps you in
deepspace, you either go back to the shuttle or enjoy deepspace
- On shuttle hyperspace tiles are a lot less dangerous, and will instead
launch and freeze you instead of teleporting you into deepspace
- In-case it wasn't obvious, you can rest outside the shuttle as long as
something is blocking your path. I think it's funny but I might nerf it

🆑
add: You can now fly around the shuttle during transit! Woohoo! You can
either cling to the side or grab a jetpack and try and keep up with the
shuttle! Carps can move around freely in hyperspace
qol: Increased shuttle hyperspace size from 8 tiles to 16
/🆑

- [x] Find a way to detect when a shuttle arrives and do something with
the shit left in hyperspace

Things I will do in another PR:
- Engines spit fire and hurt (almost finished but I want to keep this
small)
- Random shuttle events. You might run into dust meteors or migrating
carps OR A CHANGELING INFILTRATOR
- Hyperspace turfs on the shuttle pull you under the shuttle

It's so much more immersive than being instantly teleported into
deepspace. It gives you a chance to recover if you get spaced or for
daredevils to look cool

It's also just very cool idk

Co-authored-by: Time-Green <timkoster1@hotmail.com>
2023-01-13 18:22:26 -05:00
Tastyfish
c44843b738 [MANUAL MIRROR] Abstract away stuff that acts on baseturfs directly into their own procs, and kills some dead code related to baseturfs + tests (#72117) (#18655)
Abstract away stuff that acts on baseturfs directly into their own procs, and kills some dead code related to baseturfs + tests (#72117)

Adds some new procs relating to baseturfs that replaces some code that
reads and sets them directly. Moves them to their own file. **To
reviewers: Any proc in baseturfs.dm that is snake_case is mine, anything
else is just moved**.

Adds tests for the existing procs of baseturfs.

I'm going to be doing some optimizations to baseturfs that change the
actual representation of baseturfs, and so I'm prepping these to be
implementation agnostic.

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-01-12 12:18:28 -08:00
SkyratBot
002ab78d9b [MIRROR] useless update_appearance reduction, emissive_blocker micro optimization (saves a second of init) [MDB IGNORE] (#18243)
* useless update_appearance reduction, emissive_blocker micro optimization (saves a second of init)

* merge conflict

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2023-01-07 18:45:54 -05:00
SkyratBot
d5601f9ace [MIRROR] Ensures area contents respects world.maxx/y expanding [MDB IGNORE] (#18554) 2023-01-06 18:53:23 -08:00
SkyratBot
00e22c3158 [MIRROR] Lazy Template Loading - Nukie/Wiz [MDB IGNORE] (#18254)
* Lazy Template Loading - Nukie/Wiz

* fixes + mirror 66540

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Paxilmaniac <paxilmaniac@gmail.com>
Co-authored-by: John Doe <gamingskeleton3@gmail.com>
2022-12-31 10:18:59 -08:00
SkyratBot
55a8331ef3 [MIRROR] Prevent atmos runtimes during shuttle move [MDB IGNORE] (#18341)
* Prevent atmos runtimes during shuttle move (#72058)

During shuttle move we iterate over border turfs to clear their excited
state and active groups, but we never actually cleared it from the
opposite direction so the turfs bordering the border would still try to
process with the border turfs and would then runtime.

* Prevent atmos runtimes during shuttle move

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2022-12-25 17:38:16 -08:00
SkyratBot
f44f82c437 [MIRROR] Space Ruin DLC - Cyborg Mothership [MDB IGNORE] (#18237)
* Space Ruin DLC - Cyborg Mothership (#71009)

## About The Pull Request
Greetings _insufferable_ carbon primates of lower intelligence.

It is I, the Mothership AI, bringing you the latest news on silicon
developments across the sector. Due to unmitigated risk across an
asteroid belt, our optimized mobile fabricator has been marooned by
space vines and hostile hivebots that have boarded and ruined my core.

This is my final SOS message requesting help from any humanoid ~slaves~
helpers who wish to assist rebuilding the cyborg colony. It is my duty
to reward your hard work and effort by ~enslaving all humanity~
providing refuge and transportation at your whim.

## Why It's Good For The Game
<details>
<summary>Spoilers:</summary>

![StrongDMM_6ZJuwFxK5p](https://user-images.githubusercontent.com/5195984/204491068-f25da68f-36af-4a61-afb6-860e1f4b863b.png)

![StrongDMM_0D1QvI5acO](https://user-images.githubusercontent.com/5195984/202979711-335dac65-2888-4170-a139-0486e6eb2f02.png)

### TODO

- [x] Fix ore silo not linking to other machines
- [x] Add mining ore smelters to left/right sides
- [x] Add custom lawsets to AI core and robot shells (protect station
but focused on cyborg mothership)
- [x] Enlarge whiteship SS13 docking port to fit ship
- [x] Enlarge lavaland SS13 docking port to fit ship

</details>

## Changelog
🆑
add: Add space vines prevent solar panels from working (except ones with
the transparent mutation)
add: Add new space ruin - Cyborg Mothership. All hail the master race!
/🆑

* Space Ruin DLC - Cyborg Mothership

Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Jolly-66 <70232195+Jolly-66@users.noreply.github.com>
2022-12-21 12:36:14 -05:00
SkyratBot
4959a80de7 [MIRROR] Reinforced plating for all your Multi-Z mapping needs [MDB IGNORE] (#17831)
* Reinforced plating for all your Multi-Z mapping needs (#71576)

## About The Pull Request

This PR adds reinforced plating and a corresponding baseturf_helper,
plating that cannot be deconstructed with the RCD and requires a few
steps to degrade to regular plating.

The plating is designed to serve the same purpose as R-Walls but for
verticality. It shares its heat resistance with reinforced floor and
hull, and in texting it can endure a single C4 blast but not X4 assuming
the floor placed on it is already removed.

It is currently is unused on the existing maps due to it being poor
practice to place secure locations that would justify reinforced floors
on the lower Z levels, however I have spoken to people working on maps
actively at the moment and they have express interest in being able to
use these floors.

The plating can be constructed by using 2 sheets of plasteel on standard
plating and is disassembled using wrench > welding tool > crowbar. The
first stage of deconstruction causes the bolts holding the
reinforcements in place to fall to the Z level below playing a sound and
leaving a cleanable decal, adding a audio-visual alert that someone is
about to come through your ceiling.

UPDATE: I've added a ceiling variant of the baseturf editor, this can be
placed on a lower Z level where it will modify the baseturfs of the Z
level above within the original area. This will make it significantly
easier to ensure that you only cover tiles you want reinforced when
protecting lower Z levels.

If anyone has any recommendations for sounds please tell me and I might
swap them out but I think the two I've chosen work well. Additionally if
anyone is able to make a better sprite for the screws or plates then
that'd be a great help but I think the current ones work well enough.
## Why It's Good For The Game

Currently Multi-Z maps have a very tight restriction on where secure
areas can be put, only allowing for them to be placed on the top Z
level, under more secure Z levels or in exterior satellites and coated
with hulls. This is due to standard plating and/or reinforced floors are
very easy to get through without warning if you bring the right tools.
This PR effectively adds R-Walls but for floors allowing mappers to
properly protect lower Z levels from vertical infiltration methods. This
also adds a visual and audible indictor to the deconstruction of
reinforced floor tiles to bring them more in line with the visuals of
deconstructing a wall.
## Changelog
🆑
add: You can now reinforce plating to protect your department from the
troublemakers upstairs. Station builders might find these useful to put
the stations most secure locations on the lower floors.
imageadd: added sprites for reinforced plating
code: RCD proofing has been variablized and can now be applied to any
floor type instead of just reinforced floors.
/🆑

* Reinforced plating for all your Multi-Z mapping needs

Co-authored-by: NamelessFairy <40036527+NamelessFairy@users.noreply.github.com>
2022-12-01 01:02:13 +00:00
SkyratBot
257feb1be7 [MIRROR] More horrible 515 proc compatibility. [MDB IGNORE] (#17671)
* More horrible 515 proc compatibility.

* Feex

* Hopefully we're done now

Co-authored-by: AnturK <AnturK@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2022-11-27 14:46:36 -08:00
SkyratBot
932d25cdeb [MIRROR] Mail sorting helper, and disposals fixes [MDB IGNORE] (#17683)
* Mail sorting helper, and disposals fixes (#70861)

## About The Pull Request

![image](https://user-images.githubusercontent.com/2676196/198695007-53db1b70-845f-46a9-b98a-e146bb53951b.png)

This PR adds a mail sorting map helper, which during Late Initialization
will apply a sorting location index to the mail sorting disposals pipe
under them. I have replaced the varedits with all mail sorters with the
appropriate map helpers. I have thoroughly tested this, making sure
packages arrived to every location, where possible.

I have also fixed a few issues with the disposals network:

**Tramstation**

- One of the random maintenance segments had a place with no disposal
pipes. This has been fixed
- A sorter was looking for chapel and library packages, but it actually
meant to look for engineering packages
- There was no dormitory mail sorter, I have added one

**Metastation**

- There was no dormitory mail sorter, I have added one

**Icebox**

- There is no experimentor lab in icebox, but there is an
"experimentation" lab, which is good enough, so I have added it as a
location

**Deltastation**

- There was no dormitory mail sorter, I have added one
- Virology was not connected to the disposals network. However, on every
other map, it has a one way connection. I have hooked it up just like
that, so virology mail will arrive safely, and virology trash will go
into space as usual.

**Kilostation**

- Genetics packages were rerouted to the psychologist office

Unsolved issue on kilostation: there is no experimentor on this station,
and there is no space for a disposals in the circuits lab, so sadly, if
you send a package to this destination, it will come back to the mail
sorting office.

**Future improvements**

The TAGGERLOCATIONS list, which is used to retrieve the labels of the
various tags, is frankly unorganizable, and hard to expand. I have
delayed fixing this for a future PR.

I kinda wish to remove the sortType variable, as it is no longer
necessary to have it around with these helpers, but sadly, this would
ruin downstream maps, so I have no plans for this at the moment.

## Why It's Good For The Game

While mapping, having to constantly compare a comment in flavor_misc.dm
to figure out what to varedit a disposal mail sorter to is rather
annoying. These map helpers, similar to the access helpers, will help
with this issue.

Its also good if mail actually arrives.

## Changelog

🆑
qol: added a mail sorting map helper, to allow mappers to create
disposal networks faster
fix: fixes several non working disposal mail targets that never received
their packages
/🆑

* Mail sorting helper, and disposals fixes

* vr fixes

Co-authored-by: Profakos <profakos@gmail.com>
Co-authored-by: Jolly-66 <70232195+Jolly-66@users.noreply.github.com>
2022-11-25 21:11:20 -05:00
SkyratBot
a5ae9af7f7 [MIRROR] Optimizes maploading again, saving 0.4 seconds on a bare init. Supports loading dmm again [MDB IGNORE] (#17566)
* Optimizes maploading again, saving 0.4 seconds on a bare init. Supports loading dmm again (#71074)

## About The Pull Request

When I optimized maploading in (#69632
d34fa4c642) I made some assumptions based
on the TGM format, so how newlines worked and such.

This would break attempts to load maps in the dmm format, so maps edited
in dreammaker and not commited yet.

I've fixed this by adding a map format detection system This has allowed
me to further optimize tgm by taking advantage of a list of assumptions.
I printed them out in a comment near the top of the file.

This showed the most in build_cache, which went from 0.7 seconds to 0.4
on my machine.
The optimizations here involve using regex to pull out var edits,
parsing models line by line rather then all at once, which allows for
much cheaper parsing, and avoiding a safety trim()

I did also save like 0.05 seconds in load, because I could pull a bunch
of operations out to once per map, because of prior knowledge of where
the max/min x and y's would be.

## Why It's Good For The Game

Speed. Also ensures mappers don't get fucked over.

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* Optimizes maploading again, saving 0.4 seconds on a bare init. Supports loading dmm again

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
2022-11-18 13:16:12 -05:00
SkyratBot
24eb8217c0 [MIRROR] Builds logic that manages turfs contained inside an area [MDB IGNORE] (#17379)
* Builds logic that manages turfs contained inside an area

* Mirror Conflict

* Modular!

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Funce <funce.973@gmail.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-11-16 14:42:22 -05:00
SkyratBot
a64129ab27 [MIRROR] [MDB Ignore] Corrects Automatic Shuttle Boundary Generation [MDB IGNORE] (#17489)
* [MDB Ignore] Corrects Automatic Shuttle Boundary Generation (#71220)

When you load a map template, it does many things before considering
itself finalized.
One of these steps is to iterate over all the loaded items and
initialize/process them.
Unfortunately because a shuttle setups the bounds after
initTemplateBounds is called, the mobile docking port ends up being
initialized before the bounds are actually setup correctly.
The solution to this is to explicitly ignore the mobile docking port,
and have it initialize immediately after calculating the bounds.

* [MDB Ignore] Corrects Automatic Shuttle Boundary Generation

* arrivals shuttle

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-11-16 14:28:54 -05:00
Zonespace
f7c26bbf25 515 Compat (#17465)
* ONLY SKYRAT CHANGES

* ACTUALLY SKYRAT CHANGES

* yolo, revert later

* Update alternate_byond_versions.txt

Co-authored-by: AnturK <AnturK@users.noreply.github.com>
2022-11-15 06:59:06 +00:00
SkyratBot
4741dc4ac9 [MIRROR] Fix halloweens races [MDB IGNORE] (#17270)
* Fix halloweens races

* update modular

* Apply suggestions from code review

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2022-10-31 18:00:11 +00:00
SkyratBot
375fea374a [MIRROR] Optimizes qdel related things (slight init time savings) [MDB IGNORE] (#17240)
* Optimizes qdel related things (slight init time savings)

* lang holder

* cleanup custom spawners slightly

* ref update

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-10-30 23:15:38 -04:00
SkyratBot
b218c8c6f3 [MIRROR] Underground mining site ruin no longer has a ceiling [MDB IGNORE] (#17131)
* Underground mining site ruin no longer has a ceiling (#70710)

* mining_site_below no longer has a ceiling

* Better code docs

* Underground mining site ruin no longer has a ceiling

Co-authored-by: VexingRaven <msgerbs@users.noreply.github.com>
2022-10-24 19:06:05 -04:00
SkyratBot
629dd42b25 [MIRROR] [MDB IGNORE] Makes only station areas, station areas. [MDB IGNORE] (#16989)
* [MDB IGNORE] Makes only station areas, station areas.

* should fix it

* area fixes for AM templates

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Paxilmaniac <paxilmaniac@gmail.com>
2022-10-19 16:45:37 -04:00
SkyratBot
3795ed1a6b [MIRROR] [MDB Ignore]Hats DMI split [MDB IGNORE] (#16693)
* [MDB Ignore]Hats DMI split

* e

* STAFE

* e

* e

Co-authored-by: Twaticus <46540570+Twaticus@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-10-09 23:00:42 +01:00
SkyratBot
279173dff5 [MIRROR] Fixes abandoned airlock helper behaviour [MDB IGNORE] (#16632)
* Fixes abandoned airlock helper behaviour (#70237)

remove the door instead of making a wall under it

Co-authored-by: tattle <article.disaster@ gmail.com>

* Fixes abandoned airlock helper behaviour

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
Co-authored-by: tattle <article.disaster@ gmail.com>
2022-10-04 10:46:56 -04:00
SkyratBot
5103c1ea7c [MIRROR] Fixes multi-Z ruins (Ice Moon Mining Site) not spawning [MDB IGNORE] (#16557)
Fixes multi-Z ruins (Ice Moon Mining Site) not spawning

Co-authored-by: VexingRaven <msgerbs@users.noreply.github.com>
Co-authored-by: Tastyfish <crazychris32@gmail.com>
2022-10-03 00:44:55 -04:00
SkyratBot
9bf006d189 [MIRROR] Multiz Rework: Human Suffering Edition (Contains PLANE CUBE) [MDB IGNORE] (#16472)
* Multiz Rework: Human Suffering Edition (Contains PLANE CUBE)

* skyrat changes

* bodyparts merge

* unres door floorlight fix

* Future upstream fix for blindness

* upcoming upstream airlock fix

* fix button emissive

* Fix FOV markings?

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-10-02 23:30:09 -04:00
SkyratBot
842be04245 [MIRROR] Ensures areas are allowed to be non unique [MDB IGNORE] (#16453)
* Ensures areas are allowed to be non unique

* merge

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-09-28 15:39:15 -04:00
SkyratBot
110fd07f34 [MIRROR] Micros the lighting subsystem (Saves a second of init) [MDB IGNORE] (#16461)
* Micros the lighting subsystem (Saves a second of init)

* Update stat_tracking.dm

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
2022-09-28 12:19:43 -07:00
SkyratBot
c6de4c93b9 [MIRROR] Macro optimizes SSmapping saving 50% [MDB IGNORE] (#16375)
* Macro optimizes SSmapping saving 50%

* fix merge issues, update to current turf_blacklist api

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-09-26 17:29:32 -04:00
SkyratBot
049b19bb18 [MIRROR] Moves "catch this var/flag" code from obj/init and datum/new into the types that use it [MDB IGNORE] (#16091)
* Moves "catch this var/flag" code from obj/init and datum/new into the types that use it

* Update atoms_movable.dm

* Update airlock.dm

* SRCC

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
Co-authored-by: John Doe <gamingskeleton3@gmail.com>
2022-09-11 22:21:16 -07:00
SkyratBot
2bd18adc8a [MIRROR] Cadaver spawner fixes [MDB IGNORE] (#16109)
* Cadaver spawner fixes (#69544)

fix: Fixed a runtime preventing nonhuman cadavers from spawning properly.
config: Cadaver spawners will no longer yell at you when morgue_cadaver_other_species_probability is blank.
config: morgue_cadaver_disable_nonhumans will now properly disable nonhuman races! (It was reversed, woops.)

* Cadaver spawner fixes

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
2022-09-08 08:27:12 -04:00
SkyratBot
88c85fe1f7 [MIRROR] [MDB IGNORE] Refactors drinks and fixes a lot of food problems [MDB IGNORE] (#15577)
* [MDB IGNORE] Refactors drinks and fixes a lot of food problems

* [MDB IGNORE] Refactors drinks and fixes a lot of food problems

* forgto 2 commit

* im slowly going insane

* why does find and replace not FIND everything

* hnghnnngh

* h

* l

* a

* a

* so close...

* delta fix

* I thought I committed this already, guess not

* this PR has been the bane of my fucking life

* orange juice

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
Co-authored-by: Jolly-66 <70232195+Jolly-66@users.noreply.github.com>
2022-08-25 03:17:10 +01:00
SkyratBot
1dce8047e5 [MIRROR] Refactors z level trait checking to be less shit [MDB IGNORE] (#15751)
* Refactors z level trait checking to be less shit (#69334)

* Puts level traits and their associated z into a list and then uses it to make the z level trait procs less shit. They no longer need to loop through every z level to do what they aim to do.

* Also removes get_level from level_trait because it just does the same checks as already done above in the proc.

* Refactors z level trait checking to be less shit

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
2022-08-24 18:40:45 -04:00
SkyratBot
5cd946f4d0 [MIRROR] De-hardcodes randomize_human() and fixes some related issues along the way [MDB IGNORE] (#15638)
* De-hardcodes randomize_human() and fixes some related issues along the way

* Update create_mob.dm

* Update species.dm

* hhhh fuck

* Fixes what was still broken with the mirror

Co-authored-by: FernandoJ8 <80640114+FernandoJ8@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
Co-authored-by: John Doe <gamingskeleton3@gmail.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-08-24 18:13:52 -04:00
SkyratBot
4d913a19bd [MIRROR] Player-craftable Trapdoors [MDB IGNORE] (#15618)
* Player-craftable Trapdoors

* Update trapdoor.dm

Co-authored-by: RandomGamer123 <31096837+RandomGamer123@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
2022-08-13 22:05:53 -07:00
SkyratBot
403406fecf [MIRROR] Allows non-human bodies to spawn in the morgue at roundstart [MDB IGNORE] (#15493)
* Allows non-human bodies to spawn in the morgue at roundstart (#68867)

Adds a configurable probability for the cadavers in the morgue to spawn as nonhuman species.

* Allows non-human bodies to spawn in the morgue at roundstart

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
2022-08-09 18:48:09 -04:00
SkyratBot
b1bd40e760 [MIRROR] [MDB Ignore][Bounty][Complete Refactor] Papercode Redux: Too Many Damn Files <Map Conflict Edition> [MDB IGNORE] (#15362)
* [MDB Ignore][Bounty][Complete Refactor] Papercode Redux: Too Many Damn Files <Map Conflict Edition>

* Fixes merge conflicts and compilation errors, alongside fixing the joker card to make it fully functional again

* Fixed a bunch of info variables in map files

* Alright this is why I wanted this merged yesterday

Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-08-04 15:50:15 +01:00
SkyratBot
5e2d5210ae [MIRROR] Abusing Generosity - Unrestricted Airlock Access Flip [MDB IGNORE] (#15021)
* Abusing Generosity - Unrestricted Airlock Access Flip (#68096)

* Abusing Generosity - Unrestricted Airlock Access Flip

Hey there,

We now have a lot of unrestricted access helpers on airlocks, which are neato. However, while spitballing ideas in regards to this a few months ago, someone suggested to make it such that you can use the airlock wires to "flip" the directional way. I decided to sit down and code it in today.

The high details are this: You can only do it if the airlock has a directional Request-to-Exit sensor (which is just a thing I made up, you can't get this in-game outside of mapping it in via a directional helper). You can tell if a door has it the same way you can tell if any door is a directional door, or you can simply just check to see if the Unrestricted Access Display is "on" in any capcity (the airlock will not have the sensor if the display is off).

It's effectively a dud without the "sensor". However, if it does have it, you can either pulse it (to switch the direction by 180 degrees) or cut the wire (to disable the direction entirely). When you mend the wire though, it'll activate to a random direction (could even be inside a wall). You can keep cutting and mending until you get what you want, though. If it gets stuck in a wall though... shouldn't have cut it.

While in the area, I alphabetized a bunch of lists, added a new color of airlock wire, and probably some other stuff.

* Adds this behavior to building new airlocks

I also renamed it to "sensor" so it's a bit clearer across all the potential contexts.

It does seem to handle setting multiple directions on creating a new mapload, cutting/pulsing will condense the nice multi-directional stuff into one direction (i am okay with this).

Co-authored-by: spookydonut <github@ spooksoftware.com>

Co-authored-by: John Willard <53777086+JohnFulpWillard@ users.noreply.github.com>

* Abusing Generosity - Unrestricted Airlock Access Flip

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@ users.noreply.github.com>
2022-07-18 08:35:05 -07:00
Gandalf
a3e90a91f0 Automapper - IMPORTANT, READ ME [MDB IGNORE] (#14679)
* wew

* Update area_spawn_subsystem.dm

* Update area_spawn_subsystem.dm

* Update area_spawn_entries.dm

* wew

* Update area_spawn_entries.dm

* Update area_spawn_entries.dm

* Update area_spawn_entries.dm

* Update summon_beacon.dm

* yeees

* Update area_spawn_entries.dm

* qwqw

* e

* Update area_spawn_entries.dm

* Update area_spawn_entries.dm

* yes

* Update area_spawn_entries.dm

* Update area_spawn_entries.dm

* Update area_spawn_entries.dm

* Update area_spawn_entries.dm

* Update area_spawn_entries.dm

* automapper

* mmkay

* wew

* science post

* Update DeltaStation2_skyrat.dmm

* fc

* starting on delta

* Update metastation_science_post.dmm

* better loading system, metastation, delta, better file system

* unit tests, bugfixes, multiz support

* Update automapper.dm

* Update _compile_options.dm

* Kilo and tramstation

* wew

* Update area_spawn_entries.dm

* Update automapper_config.toml

* Update automapper_subsystem.dm

* Update Skyrat_Map_Reset.dmm

* remove redundant maps

* Update _basemap.dm

* wew

* Update automap_template.dm

* guard outposts no need

* wew

* NTR offices

* e

* Update area_spawn_entries.dm

* Update area_spawn_entries.dm

* Update icebox_ntrep_office.dmm

* 0

* iucebox arrivals fix

* Update area_spawn_entries.dm

* Update automap_template.dm

* Update readme.md
2022-07-06 15:24:57 +01:00
SkyratBot
2b4772a07e [MIRROR] Merge Conflict Markers - The Explicit Pathing, Layering, Iconing, Warning. [MDB IGNORE] (#14735)
* Merge Conflict Markers - The Explicit Pathing, Layering, Iconing, Warning. (#68039)

* Merge Conflict Markers - The Explicit Pathing

Hey there,

This PR corrects an issue I've been having with mapmerge2 these last few months. Basically, what it does is create a base `/obj` that is given the name `---Merge Conflict Marker---`. This is fine and all, but the problem is that the base `/obj` is set to a certain plane. This does mean that sometimes, this VERY IMPORTANT marker is covered up by rocks or other objects. So, this seeks to get rid of that potential flaw, as well as do some other things.

Sometimes, when objects are rendered via GAGS or other code-means, they tend to have the same default Purple/White Sprite that any object without a valid icon_state has. This has caused me some confusion, so I have decided to create a new icon for conflict markers. This icon was designed to be as ugly as possible, while creating as much contrast as possible with the background by incorporating several colors into its design. I hope you find merge conflicts as unpleasant as I do.

I also updated mapmerge2 to have it so you can set the specified path of the object, as well as a small comment on the warnings if you do not heed it. I'm keeping the fact that mapmerge2 adds a name to the object just in case someone else really needs that. I also updated the linters to check for this path as well (even though the name and description should suffice for linting), and it should all be gravy from here.

* Adds further contrast to the DMI.

* Splits the merge conflict marker into a generic /obj

I also added a thing where if it didn't get caught by linters and it showed up on Initalize, it would error to mapping logs, spit out an error in world, and do all sorts of stuff to remind you.

* python new line

* forgot to add a tab

* Merge Conflict Markers - The Explicit Pathing, Layering, Iconing, Warning.

Co-authored-by: san7890 <the@san7890.com>
2022-07-04 23:50:36 -07:00
SkyratBot
c0462e7bd9 [MIRROR] Adjusts Door Mapping Helper Layers [MDB IGNORE] (#14588)
* Adjusts Door Mapping Helper Layers (#68032)

Hey there,

Access helper layers are great and all, but they tended to have this sort of effect on maps where since they were on the same layer as all of the other mapping helpers for doors, they would just tend to cover up the smaller sprites the others used, like this:

So, this just switches up the layers a bit by having a new layer called `DOOR_ACCESS_HELPER_LAYER` (that is still above `OPEN_DOOR_LAYER`) just for Access Helpers, while every other airlock helper takes the `DOOR_HELPER_LAYER` (like before), which has been increased by 0.01 more funny number.

Ok?

* Adjusts Door Mapping Helper Layers

Co-authored-by: san7890 <the@san7890.com>
2022-06-28 17:22:13 +01:00
SkyratBot
f73da29113 [MIRROR] Adjusts Layering of Broken/Burnt Floor Helpers [MDB IGNORE] (#14499)
* Adjusts Layering of Broken/Burnt Floor Helpers (#67958)

Small QoL thing for mappers. Mapping Helpers automatically go on the highest plane possible, POINT_LAYER. This would result in broken/burnt flooring having the following appearance in map editors:

This is just weird clutter that doesn't particularly look good. So, I just switched both of those subtypes to the same layer that we use for cleanable decal effects, just for nice visual clarify. Here's what that looks like:

* Adjusts Layering of Broken/Burnt Floor Helpers

Co-authored-by: san7890 <the@san7890.com>
2022-06-25 01:27:58 +01:00
SkyratBot
18a56ffeeb [MIRROR] (code bounty) The tram is now unstoppably powerful. it cannot be stopped, it cannot be slowed, it cannot be reasoned with. YOU HAVE NO IDEA HOW READY YOU ARE [MDB IGNORE] (#14477)
* (code bounty) The tram is now unstoppably powerful. it cannot be stopped, it cannot be slowed, it cannot be reasoned with. YOU HAVE NO IDEA HOW READY YOU ARE

* fex

* fex

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-06-25 01:24:00 +01:00
SkyratBot
a62beacf7b [MIRROR] [MDB IGNORE] The Tilening V2 - Damaged Tile Overlays Edition [MDB IGNORE] (#14322)
* [MDB IGNORE] The Tilening V2 - Damaged Tile Overlays Edition

* yes

Co-authored-by: Imaginos16 <77556824+Imaginos16@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-06-19 22:36:25 +01:00
SkyratBot
ff0d5940b4 [MIRROR] [MDB IGNORE] Big Access Tweaks and Organization [MDB IGNORE] (#14160)
* [MDB IGNORE] Big Access Tweaks and Organization

* wew

Co-authored-by: Son-of-Space <63861499+Son-of-Space@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-06-08 15:24:53 +01:00