Commit Graph

2774 Commits

Author SHA1 Message Date
SkyratBot
e3f8dd884e [MIRROR] Better alert/announcment sounds and Status displays [MDB IGNORE] (#23481)
* Better alert/announcment sounds and Status displays

* skyrat edits

* Update status_display.dmi

* Update flavor_misc.dm

* Update communications.dm

* skyrat edits

* Update status_display.dmi

* Update _sm_delam.dm

* typo

* Update status_display.dmi

* Update status_display.dmi

---------

Co-authored-by: DrTuxedo <42353186+DrDiasyl@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
2023-09-03 00:43:12 -07:00
SkyratBot
e884af7b5b [MIRROR] Demonic Frost Miner can spawn again [MDB IGNORE] (#23484)
* Demonic Frost Miner can spawn again (#78067)

## About The Pull Request

Fixes #72943
Fixes #62901

This fixes specifically icebox multi-z ruins not spawning with their
counterpart below ruins because the area for the underground portion of
icebox was not whitelisted so there were no valid spawn positions.

## Why It's Good For The Game

Multi-z icebox ruins working is good.

## Changelog

🆑
fix: Multi-z Icebox ruins including the Demonic Frost Miner can now be
placed again
/🆑

---------

Co-authored-by: Changelogs <action@ github.com>

* Demonic Frost Miner can spawn again

---------

Co-authored-by: Whoneedspacee <yougotreallyowned@gmail.com>
Co-authored-by: Changelogs <action@ github.com>
2023-09-03 00:28:06 -07:00
SkyratBot
78e2efff88 [MIRROR] Emergency Profile Dumps [MDB IGNORE] (#22006)
* Emergency Profile Dumps (#75924)

## About The Pull Request

Adds some hooks to the MC that detect if something ate a ton of real
time last tick, and reacts by dumping our current profile into a file

It's really frustrating to see a spike in td in our performance logs,
but see no reason in the profile because it's only taken every 5
minutes. This resolves that

I'm throwing this up so mso can give it a look over, not sure if I want
to use defines or configs here, taking suggestions

🆑
server: Adds a system to emergency dump profiles if too much time passes
between ticks
config: Added configs that control how often emergency profiles are
allowed to dump, alongside the threshold for what counts as too much
time between ticks
/🆑

* Emergency Profile Dumps

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: Pinta <68373373+softcerv@users.noreply.github.com>
Co-authored-by: Bloop <vinylspiders@gmail.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-09-02 12:55:00 -04:00
SkyratBot
14b02a99d7 [MIRROR] Generate theft objective target list more consistently [MDB IGNORE] (#23453)
* Generate theft objective target list more consistently (#78045)

## About The Pull Request

Fixes #77943
Moves the generation of traitor theft objective targets from `new` of
`/datum/objective/steal` to `initialize` of
`/datum/controller/subsystem/traitor`

`/datum/objective/steal` we would generate the full list of possible
theft targets _only_ if the list was already empty.
A recent PR added a secondary "destroy item" objective which has no rep
prerequisite, as a result it is initialised as soon as a traitor datum
is assigned. Importantly this happens _before_ the traitor's theft
objective is assigned.
The "destroy item" objective generates its own item targets using the
"theft item" datum as it is a type of thievery, this pollutes the list
to contain more than 0 entries.
From this point on the only things people can be assigned to steal are
the items that traitors can be assigned to destroy early in a round,
which aren't valid for most kinds of theft objective.

Making the subsystem generate the list before traitor datums are
assigned resolves the race condition, the number of rounds where
_nobody_ has any kind of theft objective and this list is unused is
exceedingly small.

## Why It's Good For The Game

You can get primary theft objectives again.

## Changelog

🆑
fix: Traitors should generate with "free objective" less often, and will
once more be assigned to steal things.
/🆑

* Generate theft objective target list more consistently

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-09-01 17:10:50 -07:00
GoldenAlpharex
1b17b304f2 SQL-Based Player Ranks and Player Ranks Subsystem (#23099)
* Initial draft, most of the stuff is implemented, not really tested or cleaned up yet

* Refactors the handling into a datum-based approach, for more abstraction

* Added migration, properly hooked up the verb to the new system

* Removed some more dead code

* Fixes some missing stuff from the .dme because VSC is stupid sometimes with merge conflicts

* Fixes the schema

* Wow I was really getting tired huh

* A fool, I say, a fool!

* I hate lists of lists I hate lists of lists I hate lists of lists

* I somehow missed this one twice. TWICE!

* This won't actually work if it's defaulting to true, lmao

* Makes it not log stuff if the adding or removing of players is unsuccessful

* Adds a way to update all of the unlock_contents for preferences datums once the donator list is initialized

* Runs update_prefs_unlock_content on mob Login() (hopefully this helps)

* Fixes the bajillion of runtimes caused by my dumb ass trying to make some client calls on ckeys

* Man I was really tired that day

* I had this ready for three hours and forgot to push it
2023-08-29 16:12:01 +02:00
SkyratBot
7c5f61beba [MIRROR] makes mice not spawn on multiz cable hubs [MDB IGNORE] (#23351)
* makes mice not spawn on multiz cable hubs (#77753)

## About The Pull Request

makes them not spawn on multiz cable hubs

## Why It's Good For The Game

this is good because rats can no longer spawn on some isolated cable hub
in the middle of nowhere in maint and depower an entire floor

## Changelog
🆑
qol: rats no longer spawn on multiz cable hubs
/🆑

* makes mice not spawn on multiz cable hubs

---------

Co-authored-by: jimmyl <70376633+mc-oofert@users.noreply.github.com>
2023-08-26 23:50:10 -04:00
SkyratBot
f4ff22e017 [MIRROR] Achievements now show how many people have unlocked them. [MDB IGNORE] (#23344)
* Achievements now show how many people have unlocked them. (#77083)

## About The Pull Request
Checking the achievements UI now shows a line below the Unlocked/Locked
status for normal achievements, informing the user of how many players
have unlocked said achievement. It also contains a tooltip; within it is
a percentile comparison with the most unlocked achievement.

Beside that, I've added a check in the achievement unit test to
ascertain that all award categories are actually present in the UI, and
as well moved all `ui_data` to `static_ui_date` considering it is not
the sort of interface that has to be constantly updated like an air
alarm or an APC.

Here's a screenshot of the UI, with the tooltip where my cursor would be
(the hot damn! achievement was var-edited of course):
![Hot damn
th](https://github.com/tgstation/tgstation/assets/42542238/d80bfe3a-e755-4036-a360-276d5d3395dc)

## Why It's Good For The Game
This should provide some fundamental statistics for achievements, from
which contributors and players can deduct the rarity and bragging
rights.

## Changelog

🆑
qol: The Achievements UI now shows how many people have unlocked a given
achievement.
fix: The "Skills" Category for achievements should no longer be hidden.
/🆑

---------

Co-authored-by: san7890 <the@ san7890.com>
Co-authored-by: Jordie0608 <4343468+Jordie0608@ users.noreply.github.com>

* Achievements now show how many people have unlocked them.

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: san7890 <the@ san7890.com>
Co-authored-by: Jordie0608 <4343468+Jordie0608@ users.noreply.github.com>
2023-08-26 10:49:51 -07:00
SkyratBot
a9cabfabb6 [MIRROR] Fixes Define Sanity [MDB IGNORE] (#23331)
* Fixes Define Sanity (#77845)

## About The Pull Request

Hey there,

This was broken in an update from #74573
(3902973978), the RegEx was only catching
a fraction of the cases it was meant to be.

This is what we were finding on 74573 version of the RegEx:

![image](https://github.com/tgstation/tgstation/assets/34697715/a5040604-279f-4012-a5dd-3a1e9eea1b8e)

This is what we should be finding for all of the cases that
`define_sanity` will need to check for:

![image](https://github.com/tgstation/tgstation/assets/34697715/e33ad60e-fb36-448e-ae02-5494c916f450)

This is what was broken as a consequence:

![image](https://github.com/tgstation/tgstation/assets/34697715/567012db-a9c2-4118-aadf-f70996731af7)

As stated in the introductory PR #74333
(ccef887efe), it's not the end of the
world if we miss unmanaged local defines, but it's still useful to have
this as a maintainability tool to ensure that everything remains as
clean as it possibly can. I wish we could do the whole matching method
like the aforementioned PR supposed could happen, but it simply doesn't
appear to work the way we want it to.

## Changelog
Nothing player facing.

I tried to experiment with `UNLINT()` but I got absolutely ganked by
getting the regex to work, so the fix for the FA Icon file may not be
super duper great unfortunately. Let me know if you have a showstopper
idea, this is just a stopguard so this PR can get merged and I don't
have to keep talking about unmanaged local defines while reviewing PRs.

* Fixes Define Sanity

---------

Co-authored-by: san7890 <the@san7890.com>
2023-08-26 01:38:24 -04:00
SkyratBot
c529b754fb [MIRROR] Fixes a bunch of callbacks that were being qdeleted, and code cleanup [MDB IGNORE] (#23319)
* Fixes a bunch of callbacks that were being qdeleted, and code cleanup (#77904)

## About The Pull Request

![image](https://github.com/tgstation/tgstation/assets/13398309/559eb50a-461c-4220-b628-55412baaffc3)

Continuing the work of
https://github.com/tgstation/tgstation/pull/77850.

it started with finding one that was being missed and causing a
runtime...then I noticed a whole lot more. While I was doing this I
found callbacks that weren't being nulled in `Destroy()`, so I added
that wherever I found these spots as well as some general code cleanup.

There were a lot more of these than I initially hoped to encounter so
I'm labeling it as a refactor.

## Why It's Good For The Game

Fixes lots of runtimes, improves code resiliency.

## Changelog

🆑
refactor: fixed a bunch of instances of callbacks being qdeleted and
cleaned up related code
/🆑

* Fixes a bunch of callbacks that were being qdeleted, and code cleanup

---------

Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-08-25 19:06:07 -04:00
SkyratBot
8b79f07ce8 [MIRROR] Makes explosions consistently throw debris [MDB IGNORE] (#23308)
* Makes explosions consistently throw debris (#77880)

## About The Pull Request

It was possible for explosions to process throwing FIRST, then the
actual explosion. That's dumb, let's not do that.
Fixes a bug with SS explosions, it used SSair defines for its currentrun
default, which because of misordered defines lead to it running throwing
first for ONLY the first explosion. DUMB.
Changed how objects pick where they land. instead of using get_dir we
get the angle to the center, then invert it. Should lead to a nicer
picture

Unanchors broken disposal pipes so they'll get flung around Ups the
throw range for explosions. This needs more tweaking someday, but this
is ok for now

## Why It's Good For The Game

Throwing will happen consistently now, less fuckin floating shit sitting
in spac

* Makes explosions consistently throw debris

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-08-24 18:50:41 -07:00
SkyratBot
25fb2e098b [MIRROR] Adds error on qdeling callback, fixes errors this causes [MDB IGNORE] (#23271)
* Adds error on qdeling callback, fixes errors this causes (#77850)

## About The Pull Request

You shouldn't ever qdel a callback. If you don't want to own it free
your ref (remove it from a list/set it to null). When all refs are
cleared it'll get cleaned up by byond itself

* Adds error on qdeling callback, fixes errors this causes

* Update cell_component.dm

* Update acid.dm

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-08-23 04:43:34 -04:00
SkyratBot
b123605da2 [MIRROR] Implements byond_status() for harddel hunting [MDB IGNORE] (#23257)
* Implements byond_status() for harddel hunting (#77818)

## About The Pull Request

In addition, improves dump_harddel_deets usage to hopefully hit in unit
testing

byond_status() will dump as a part of find_references(). While I'd like
to expand that if we ever get a proper version, this is good for how we
have things setup rn.

* Implements byond_status() for harddel hunting

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-08-23 01:19:13 -04:00
Bloop
3569f9fd94 [MISSED MIRROR] Loads Away Missions for Unit Testing (#76245) (#22534)
* Loads Away Missions for Unit Testing (#76245)

Hey there,

A pretty bad bug (#76226) got through, but it was fixed pretty quickly
in #76241 (cf92862daf). I realized that if
we were testing all the away missions, that this could theoretically get
caught and not happen again. Regardless, unit testing gateway missions
has been on my to-do list for a while now, and I finally got it nailed
down.

Basically, we just have a really small "station" map with the bare bones
(_teeny_ bit of fluff, maploading is going to take 30 seconds tops
anyways let me have my kicks) with a JSON map datum flag that causes it
to load all away missions in the codebase (which are all in one folder).
Just in case some admins were planning on invoking the proc on
`SSmapping`, I also decided to gate a `tgui_alert()` behind it because
you never can be too sure of what people think is funny these days (it
really does lock up your game for a second or so at a time).

I also alphabetized the maps.txt config because that was annoying me.

Things that break on production could(?) be caught in unit testing? I
don't know if the linked issue I mentioned above would have been caught
in retrospect, but it's likely to catch more than a few upcoming bugs
(like the UO45 atmospherics thing at the very top) and ensure that these
gateway missions, which tend to be the most neglected part of mapping,
stay bug-free.

This is also helpful in case someone makes a new away mission and wants
to see if stuff's broken. Helps out maptainers a bit because very, very
technically broken mapping will throw up runtimes. Neato.
Nothing that players should be concerned about.

Let me know if there's a better way to approach this, but I really think
that having a super-duper light map with the bare basics to load up
gateway missions and then all nine-ish gateway missions can sequentially
load during init. I can't think of a better way to do it aside from some
really ugly `#ifdef` shit. Also also, it has the added benefit of being
a map that will always load your away mission without touching a single
shred of config (and it's not likely to break if you follow sane
practices such as making your own areas)

* Update gateway_test.json

* Map Reset

* Gets rid of an area that was in a space turf

* Attempting to fix some runtimes

* Map Reset

* Lets remains spawn in xen water

* and acid, too

* Update remains.dm

* Removes extra airlock helper

* Delete research2.dmm

Surely this was a mistake?

* Merge branch 'master' into pr/22534

* Map Reset

* Update snowdin.dmm

* Revert "Update snowdin.dmm"

This reverts commit c860c6f4fbb463954d5b8da1b494305a2f45b44b.

* Update snowdin.dmm

* Update snowdin.dmm

* Revert "Update snowdin.dmm"

This reverts commit 47e7916056a47e12adfcb8b94b9748b7e56f378d.

* Update snowdin.dmm

* Revert "Update snowdin.dmm"

This reverts commit c82576bee69e09eda649d3cbf63d96dddaeeb380.

* Update immerse.dm

* Revert "Update immerse.dm"

This reverts commit 2ad622f3029a3ed17a05f8269299d0f25e747d11.

* Update immerse.dm

* Update maps.txt

* Fix hard dels in area spawn

* Update gateway_test.json

* Actually we can just get away with keeping a list of types here, no refs needed.

* Update area_spawn_subsystem.dm

* Update automapper.dm

* Let's just test to see if getting rid of black mesa stops the segfaults...

* Let's try deleting astrum too

* Revert "Let's just test to see if getting rid of black mesa stops the segfaults..."

This reverts commit de9a05708d451abbb78a635a3e03b2f460004496.

* Revert "Let's try deleting astrum too"

This reverts commit 2121a6357a54faf5719a42a762ba8b4698c008fb.

* Update waypointstation.dmm

* Update blackmesa.dmm

* Update decaySS.dm

* Update gateway_test.json

* Revert "Update gateway_test.json"

This reverts commit 93adc08819f05aecc8599980385e3fb10d02a1d2.

* Testing

* Revert "Testing"

This reverts commit 1d476d236953daac6adf59b93e56f2fab218085b.

* Testing

* Revert "Testing"

This reverts commit de05a74636c1f43e50fb7ec9f24978d270db4b88.

* Now try and actually fix the stupid thing

* Update clockwork_research.dm

---------

Co-authored-by: san7890 <the@san7890.com>
2023-08-19 20:51:34 -07:00
SkyratBot
1aec547be9 [MIRROR] Use typepaths for the quirk blacklist [MDB IGNORE] (#23208)
* Use typepaths for the quirk blacklist

* Update quirks.dm

* Update quirks.dm

whoops

---------

Co-authored-by: spookydonut <github@spooksoftware.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-08-19 15:50:03 -04:00
SkyratBot
a0a9a43562 [MIRROR] Refactors Regal Rats into Basic Mobs (more titles edition) [MDB IGNORE] (#23188)
* Refactors Regal Rats into Basic Mobs (more titles edition) (#77681)

## About The Pull Request

I literally can't focus on anything nowadays, so I just did this to
break a never-ending chain of distress. Anyways, regal rats! These
fellas are mostly player controlled, but did have _some_ AI capabilities
(mainly tied to their actions), so that was incorporated too. Everything
should work as-expected (as well as look a shitload cleaner).

Instead of doing weird and awful conditional signals being sent out, I
made the `COMSIG_REGAL_RAT_INTERACT` (not the actual name) have a return
value so we can always rely on that working whenever we have that signal
registered on something we attack. I also cleaned up pretty much every
proc related to regal rats, gave them AIs to reflect their kingly nature
(and action capabilities (as well as move the action to
`mob_cooldown`)).

Since I thought they needed it, Regal Rats now get a special moniker!
This is stuff like "the Big Cheese" and what-not, like actual regents in
history. That's nice.
## Why It's Good For The Game

Two more off the list. Much better code to read. Way smarter rats with
spawning their army as part of a retaliatory assault (war). More sovl
with better regal rat names. The list goes on.
## Changelog
🆑
refactor: Regal Rats have been refactored into basic mobs. They should
be a bit smarter and retain their docility (until attacked, in which
case you should prepare to get rekt by summoned rats), and properly flee
when they can instead of just sit there as you beat them to death. The
framework for them interacting with stuff (i.e. opening doors while
slobbering on food) is a bit more unified too, now. They also have
cooler names too!
/🆑

FYI: Beyond a few code touchups, I haven't touched the actions at all. I
do not believe myself to be enthusiastic about fixing anything involving
the actions code as of this moment so that this PR is more overbloated
unless it's unbelievably stupid or easy to fix.

* Refactors Regal Rats into Basic Mobs (more titles edition)

---------

Co-authored-by: san7890 <the@san7890.com>
2023-08-18 19:28:25 -04:00
SkyratBot
0614285369 [MIRROR] Revert "Add the ability to use blips as your character's voice" [MDB IGNORE] (#23186)
* Revert "Add the ability to use blips as your character's voice" (#77715)

Reverts tgstation/tgstation#77640

![Discord_iPE1cmuUrY](https://github.com/tgstation/tgstation/assets/4081722/a54a8e7b-ef2b-4f32-9589-bde7b6b2b7d4)

This is causing big problems right now and we've agreed to a, at
minimum, temporary revert so that we can re-approach this at a later
date and do things properly

@ MrStonedOne pls i need that TTS repo im begging you pls

* Revert "Add the ability to use blips as your character's voice"

---------

Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
2023-08-18 19:25:06 -04:00
SkyratBot
cb1fdefdc0 [MIRROR] Move hot procs to CODEOWNERS for dev cycles initiative [MDB IGNORE] (#23170)
* Move hot procs to CODEOWNERS for dev cycles initiative

* Update .github/CODEOWNERS

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
2023-08-17 23:47:53 -04:00
SkyratBot
508b43d7b3 [MIRROR] Settler Quirk: Tame the Outdoors! Have trouble with tall shelves... [MDB IGNORE] (#23157)
* Settler Quirk: Tame the Outdoors! Have trouble with tall shelves...

* Update quirks.dm

---------

Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-08-17 17:46:43 -04:00
SkyratBot
7456c9be22 [MIRROR] Add the ability to use blips as your character's voice [MDB IGNORE] (#23109)
* Add the ability to use blips as your character's voice (#77640)

## About The Pull Request

- Adds the ability to force your TTS voice to always be blips, default
is still normal speech
- Probably fixes a bug with silicon voices not transferring properly?
There was an entire argument missing from tts_request/New
- Fixes problems I got from the Docker build not working at all. Only
thing interesting is `--no-cache-dir` which was to fix the container
running out of RAM even though I literally just got 64GB of RAM today

Got permission from @ optimumtact as alternative to being able to disable
your voice, CC @ Iamgoofball

## Why It's Good For The Game

I spent two hours trying to find a voice that didn't make me
uncomfortable to use and that was even in the realm of being the voice I
would actually want people to hear. Characters still have distinct
"voices" because the blips are chopped together from the voice itself

## Changelog

🆑
add: You can now set your voice to just blips.
/🆑

* Add the ability to use blips as your character's voice

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-08-16 00:12:33 -07:00
SkyratBot
171db94813 [MIRROR] Save 180ms on GetElement by avoiding more stringifying unless necessary [MDB IGNORE] (#23070)
* Save 180ms on GetElement by avoiding more stringifying unless necessary (#77604)

list2params does all this normally and faster. Also avoids going through
the ID generation proc at all if there's only one argument in the list,
which happens with every item description attachment, which happens
frequently.

* Save 180ms on GetElement by avoiding more stringifying unless necessary

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-08-14 08:16:37 -04:00
SkyratBot
30f436724b [MIRROR] More lua harddel fixes [MDB IGNORE] (#23064)
* More lua harddel fixes (#77556)

## About The Pull Request
Fixes some more lua harddel problems with lingering refs on the gc_guard
variable. This variable has been changed to a list instead and will get
cleared every time the SSlua subsystem fires so that lua instantiated
objects that are not tracked by the subsystem will essentially delete
themselves on the next tick, aka whenever the lua script sleeps.

Also removed the unnecessary and not completely functional
lua_reference_cleanup proc which wasn't even being called reliably
because the signal handler was the datum itself.

## Why It's Good For The Game
Fixes more harddel bugs, increases consistency.

Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>

* More lua harddel fixes

---------

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
2023-08-13 18:37:01 -04:00
SkyratBot
d2b4b475cb [MIRROR] Spiders don't automatically grant an antag datum [MDB IGNORE] (#23029)
* Spiders don't automatically grant an antag datum (#77523)

## About The Pull Request

Fixes #77501

Spider egg ghost role spawners grant the spider antag datum, rather than
the act of being a spider.
This means that gold core, mapstart, polymorph belt, and other spiders
will not have an antagonist datum.

While doing this I also made a new abstract `mob/living/basic/spider`
type which all three kinds of spider life stage (`spiderling`, `young`,
`giant`) extend from, because there was a gross amount of copied code.
Now there isn't.

Also the Flesh Spider and Event Midwife eggs now simply hatch adult
spiders instead of child ones.
This is because there is no reason for either of these to have a two
minute wait time before they get going. Midwife spiders spawned by the
event should just start spidering immediately, and Flesh Spiders are
made by changelings and shouldn't be effected by measures introduced to
balance the spider gamemode.
Eggs which are laid during a round and _can_ hatch into midwife spiders
still hatch baby spiders.

Also I swapped some white pixels on the animation of the ambush
spiderling for a different colour because they looked bad.

## Why It's Good For The Game

While the policy is always "if you turn yourself into something, you're
not an antagonist" the presence of the antag datum still confuses
people. Plus that code was gross and I didn't like it.

## Changelog

🆑
fix: Giant Spiders only have an antag datum if created by the round
event.
balance: Flesh spider eggs hatch into adult spiders instead of baby
spiders.
balance: The eggs spawned by the start of the spider infestation event
hatch into adult Midwife spiders instead of baby ones.
/🆑

* Spiders don't automatically grant an antag datum

* Modular paths

* Modular paths

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-08-12 00:17:56 -04:00
SkyratBot
599156acdd [MIRROR] Fix antimagic effect never expiring [MDB IGNORE] (#23009)
* Fix antimagic effect never expiring (#77500)

## About The Pull Request

Fixes #77499

I messed this up resolving merge conflicts.

## Changelog

🆑 Melbert
fix: Fix antimagic effect not expiring
/🆑

* Fix antimagic effect never expiring

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-08-11 02:25:47 -04:00
SkyratBot
f19eaf891c [MIRROR] Try waiting for db queries to finish during db shutdown [MDB IGNORE] (#22892)
* Wait for db queries to finish during db shutdown (#77311)

* Try waiting for db queries to finish during db shutdown

---------

Co-authored-by: oranges <email@oranges.net.nz>
2023-08-05 18:38:37 -04:00
SkyratBot
a4cf2e451c [MIRROR] Adds a system for logging metadata about hard deletes [MDB IGNORE] (#22878)
* Adds a system for logging metadata about hard deletes (#76956)

## About The Pull Request

I'm sick of the progress bar harddel, and I've ran into this problem in
the past, so I'm just gonna do something about it

If you want to provide an individual logged bit of info about a harddel,
you can override `/datum/proc/dump_harddel_info()` and return a string
containing "whatever"

Use of this should be limited, this could potentially clutter del logs,
especially if it's used on something that fails often, like pipes

I do think it's still useful tho. It's output ingame, in the logs, and
in unit test failures. Hopefully all nicely tho I'm only really 100%
sure about in game.

* Adds a system for logging metadata about hard deletes

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
2023-08-04 15:25:55 -07:00
SkyratBot
247d37c38a [MIRROR] Improved PDA Direct Messenger [MDB IGNORE] (#22865)
* Improved PDA Direct Messenger

* resolve conflicts

* Delete ntmessenger.dm

---------

Co-authored-by: distributivgesetz <distributivgesetz93@gmail.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-08-03 20:03:41 -04:00
SkyratBot
17e20e69b0 [MIRROR] Add "Hall of Fame" emergency shuttle [MDB IGNORE] (#22808)
* Add "Hall of Fame" emergency shuttle (#77074)

## About The Pull Request
This adds a new emergency shuttle called the **Hall of Fame**.

![2023-07-28 06 49
58](https://github.com/tgstation/tgstation/assets/5195984/d818058c-f031-472a-8314-8e4c9054c807)

It's designed around persistence. The goal is to have the shuttle store
memories, photos, and trophies for the crew to see!

## Why It's Good For The Game
Cool way for the crew to store and share memories.

## Changelog
🆑
add: Add a new 'Hall of Fame' emergency shuttle. It even comes with it's
own nifty photo album.
/🆑

* Add "Hall of Fame" emergency shuttle

---------

Co-authored-by: Tim <timothymtorres@gmail.com>
2023-07-31 21:50:56 -04:00
SkyratBot
b234fb6396 [MIRROR] [no gbp] Fixes runtime in SSstation [MDB IGNORE] (#22791)
* [no gbp] Fixes runtime in SSstation (#77231)

No excuse, just dumb. Random layer is the randomly generated parallax
layer, which is null 30% of the time, so this would runtime in SSstation
setup in 30% of rounds

Also another thing where I added extra params and didn't add them to the
proc, fucking parallax for some roundstart clients and latejoins

🆑
fix: fixes a runtime in SSstation setup
fix: fixes parallax not rendering correctly for latejoins
/🆑

![image](https://github.com/tgstation/tgstation/assets/7501474/650242f7-bc33-49eb-98d9-d8e3619ab808)

* [no gbp] Fixes runtime in SSstation

---------

Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
2023-07-31 20:05:46 -04:00
SkyratBot
72b1a979ff [MIRROR] Improves the RPG loot wizard event. [MDB IGNORE] (#22800)
* Improves the RPG loot wizard event. (#77218)

## About The Pull Request
As the title says. Adds a bunch more stat changes to various different
items and a somewhat simple way of modifying them whilst minimizing
side-effects as much as possible.
Added a new negative curse of polymorph suffix that can randomly
polymorph you once you pick up the item.
Curse of hunger items won't start on items that are not on a turf.
Curse of polymorph will only activate when equipped.

Bodyparts, two-handed melees, bags, guns and grenades, to name a few,
have a bunch of type-specific stat changes depending on their quality.

Some items won't gain fantasy suffixes during the RPG loot event, like
stacks, chairs and paper, to make gamifying the stats a bit harder.
I'm sure there'll still be other ways to game the event, but it's not
that big of a deal since these are the easiest ways to game it.
High level items also have a cool unusual effect aura

## Why It's Good For The Game
Makes the RPG item event cooler. Right now, it's a bit lame since
everything only gains force value and wound bonus on attack. This makes
the statistic increases more type-based and make it interesting to use

It's okay for some items to be powerful since this is a wizard event and
a very impactful one too. By making the curse of hunger items not spawn
on people, it'll also make it a less painful event too.

## Changelog
🆑
add: Expanded the RPG loot wizard event by giving various different
items their own statistic boost.
/🆑

---------

Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>

* Improves the RPG loot wizard event.

---------

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
2023-07-31 20:02:03 -04:00
SkyratBot
d64184b1b3 [MIRROR] Arconomy: Balance Update 2023 [MDB IGNORE] (#22766)
* Arconomy: Balance Update 2023

* Update market_crash.dm

* Update flypeople.dm

* Update market_crash.dm

---------

Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-07-29 21:36:28 -04:00
SkyratBot
c7e49e5fa3 [MIRROR] Doubles the time you can get the "Long shift" achievement, makes it not grant on admin restarts [MDB IGNORE] (#22771)
* Doubles the time you can get the "Long shift" achievement, makes it not grant on admin restarts (#77195)

## About The Pull Request

- "Long shift" can now be earned from sub 10 minute rounds rather than
sub 5 minute rounds

- Admin restarts no longer give out "Long shift"

## Why It's Good For The Game

I do not think this achievement can *possibly* be earned right now. Like
at all.

Nuke Ops and cult are the only antags that can possibly do it and it's
incredibly infeasible (requiring that they nuke the station or summon
Nar'sie in just 3 minutes!)

So I bumped up the timer to 10 minutes. This means that ops can get it
if they nuke the station in 8 minutes, cult can get it if they REALLY
speedrun, and revs can get it if they beeline the heads.

I checked the DB for stats on this achievement and it's only been earned
in 3 rounds across the last year - `208780` (admin restart due to a bug)
`192892` (admin restart due to a bug?) `186192` (admin restart).

So I also prevented admin forcing the round to end. (I don't know if it
catches admin reboots directly I'll have to check that.)

## Changelog

🆑 Melbert
balance: The "Long Shift" achievement is now feasibly obtainable, and
admins can no longer trigger it unknowingly
/🆑

* Doubles the time you can get the "Long shift" achievement, makes it not grant on admin restarts

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-07-29 16:02:36 -04:00
SkyratBot
0532392092 [MIRROR] Starlight colors with parallax, small parallax code clean-up [MDB IGNORE] (#22764)
* Starlight colors with parallax, small parallax code clean-up (#77020)

The space gas parallax now colors starlight in the color of the gas:

![image](https://github.com/tgstation/tgstation/assets/7501474/18b5554f-6357-473e-8f43-64aad1517be0)

<details>
  <summary>Others</summary>

![image](https://github.com/tgstation/tgstation/assets/7501474/1599795f-f76d-479d-a1c3-aa19390ad403)

![image](https://github.com/tgstation/tgstation/assets/7501474/fb992df0-ee85-4afc-a546-f28e739ea923)

![image](https://github.com/tgstation/tgstation/assets/7501474/ed64a01c-c104-4177-bf63-b82288251aa9)

</details>

I also cleaned up parallax random code a bit, making it easier to add
new parallaxes and add minor effects to them

The radioactive nebula parallax thing has also been moved to SSparallax
to make it easier and a bit more sane to change

🆑
add: Starlight will color with space gas parallax
code: Cleans up random parallax code / radioactive nebula parallax code
/🆑

## Why it's good for the game

We can change the starlight color now (mostly thanks to @ LemonInTheDark
making light code easier to work with), so I thought it'd be fun to
actually do! If people hate it, I'll turn it off and we can just call
this a code clean-up PR

* Starlight colors with parallax, small parallax code clean-up

---------

Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
2023-07-29 15:58:27 -04:00
SkyratBot
4f48be9809 [MIRROR] Planetary station traits: Forever Storm and Forested [MDB IGNORE] (#22763)
* Planetary station traits: Forever Storm and Forested

* Update CaveGenerator.dm

* Update CaveGenerator.dm

---------

Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-07-29 06:18:46 -04:00
SkyratBot
11d990c26e [MIRROR] Adds cliffs to icebox [MDB IGNORE] (#22744)
* Adds cliffs to icebox (#77062)

## About The Pull Request

Adds cliffs to the game! They're tiles usable for mapping to make
mountainy area's and cliffs! I don't have any sprites for them yet, so
just imagine it's a cliff really hard

![image](https://github.com/tgstation/tgstation/assets/7501474/ab0f31b6-93d7-4964-8b9c-4fb3c774647a)

THESE DO NOT REPLACE MULTI-Z AND NEVER WILL! They're just a neat way to
add more depth to the game. You can’t really add 10 different z’s for
one mountain, so this can be used to help map area’s with depth without
overusing z-levels

They've been mapped into the top part of the icebox outside. There's not
a good way to do sides of cliffs yet (will need some thinking), so
they're mapped in such a fashion where it doesn't matter much. Later,
this area above icebox can be expanded with properly done side-cliffs,
something like in stardew-valley would work for our grid-system:

![image](https://github.com/tgstation/tgstation/assets/7501474/007964cc-49d5-489c-9a43-2140f29239ce)

Longer demonstration: https://www.youtube.com/watch?v=Eig4jXNZZRQ

Eventually, I'll redo mapgen and add 3x3 icebox (definitely not coping)

## Why It's Good For The Game

The incredible flatness of icebox drives me insane. While multi-z is
great at giving it more depth, the actual terrain itself is still
completely flat. Adding cliffs let's us add 'soft-mountains', which does
wonders for making an area feel more alive

(And I absolutely adore snowy mountains)

## Changelog
🆑
add: Adds cliffs to the north of icebox. Try not to fall of of them!
/🆑
<details>
  <summary>Additional images (now outdated)</summary>

https://github.com/tgstation/tgstation/assets/7501474/572dc749-596c-4cab-9693-43c2270aca96

![image](https://github.com/tgstation/tgstation/assets/7501474/e12236d1-fda8-406a-858b-84a9fe5b4dc7)

![image](https://github.com/tgstation/tgstation/assets/7501474/264ae9d8-2f84-4133-8eb3-29e8df6c976e)

![image](https://github.com/tgstation/tgstation/assets/7501474/15a7f378-b595-4d7b-b948-d405916cb431)

![image](https://github.com/tgstation/tgstation/assets/7501474/b058a184-9fd5-4fa9-b0de-9f687bdf4e43)

</details>

---------

Co-authored-by: Jacquerel <hnevard@ gmail.com>

* Adds cliffs to icebox

---------

Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@ gmail.com>
2023-07-28 14:31:06 -04:00
SkyratBot
888801fd05 [MIRROR] Adds a unit test to stop elements from using identical lists for their arguments. [MDB IGNORE] (#22732)
* Adds a unit test to stop elements from using identical lists for their arguments. (#76322)

## About The Pull Request
Ok, so a few days ago I made an issue report about multiple instances of
identical elements being generated because of uncached lists.
ninjanomnom (the mind being the element datums) cleared it up and said
an implementation of GetIdFromArguments() that also checks the list
contents wouldn't be worth the performance cost, while adding that a
unit test should be written to check that it doesn't happen at least
during init, which should catch a good chunk of cases.

Also, i'm stopping RemoveElement() from initializing new elements
whenever a cached element is not found. Ideally, there should be a focus
only unit test for that too, but that's something we should tackle on a
different PR.

Some of the code comments may be a tad inaccurate, as much as I'd like
to blame drowsiness for it. Regardless, the unit test takes less than
0.2 seconds to complete on my potato so it's fairly lite.

## Why It's Good For The Game
This will close #76279.

## Changelog
No player-facing change to be logged.

* Adds a unit test to stop elements from using identical lists for their arguments.

* Fixes unit test

* seeing double

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-07-27 20:08:55 -04:00
SkyratBot
e0ab5a3328 [MIRROR] Converting crabs to basic mobs [MDB IGNORE] (#22710)
* Converting crabs to basic mobs (#77109)

## About The Pull Request
Exactly what it reads on the tin. As a bonus, they will flee from
attacking targets, hunt tiny critters (crabs are now small-sized) and
actually move sideways (it's an element that covers both client and
basic movement)

## Why It's Good For The Game
Another simple to basic mob refactor.

## Changelog

🆑
refactor: Crabs refactored into basic mobs. They now hunt tiny critters
and flee from attackers.
fix: Fixed crabs not crab-walking.
/🆑

* Converting crabs to basic mobs

* UpdatePaths

* More path changes

* Update simple_animal_freeze.dm

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-07-27 18:05:51 -04:00
SkyratBot
455cdf0236 [MIRROR] flame_range and flash_range autoset fix [MDB IGNORE] (#22723)
* flame_range and flash_range autoset fix (#77118)

## About The Pull Request
From #27184 flame_range and flash_range should automatically default to
light_impact_range and devastation_range

4abf35e4a7/code/controllers/subsystem/explosions.dm (L285-L288)

But it was broken, probably after moving to subsystem, because now
functions set arguments to 0.

Please note I don't play tg and haven't tested this change. Fix changes
default behavior and may cause unwanted effects.

* flame_range and flash_range autoset fix

---------

Co-authored-by: Alexander V <volas@ya.ru>
2023-07-27 16:25:29 -04:00
SkyratBot
0d09dd08c9 [MIRROR] Photophobia quirk [MDB IGNORE] (#22721)
* Photophobia quirk

* Update quirks.dm

---------

Co-authored-by: Alexis <catmc8565@gmail.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-07-27 19:24:44 +00:00
SkyratBot
af2bec389d [MIRROR] Sets a saner length limit to ID assignments and paintings' titles. [MDB IGNORE] (#22719)
* Sets a saner length limit to ID assignments and paintings' titles. (#76723)

* Sets a saner length limit to ID assignments and paintings' titles.

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-07-27 14:37:29 -04:00
SkyratBot
96dd9e338a [MIRROR] Adds a runtime protection check to play_tts [MDB IGNORE] (#22706)
* Adds a runtime protection check to play_tts (#77106)

## About The Pull Request
I see this stack trace on occasion
```
[2023-07-25 19:04:56.970] RUNTIME: runtime error: get_language_holder() called on a QDELing atom, this will try to re-instantiate the language holder that's about to be deleted, which is bad.
 - proc name: get language holder (/atom/movable/proc/get_language_holder)
 -   source file: code/game/atoms_movable.dm,1458
 -   usr: null
 -   src: AdipemDragon (/mob/dead/new_player)
 -   src.loc: null
 -   call stack:
 - AdipemDragon (/mob/dead/new_player): get language holder()
 - Text To Speech (/datum/controller/subsystem/tts): play tts(L.E.M.O.N. (/mob/living/silicon/robot), /list (/list), /sound (/sound), /sound (/sound), /datum/language/common (/datum/language/common), 7, 0)
 - Text To Speech (/datum/controller/subsystem/tts): fire(0)
 - Text To Speech (/datum/controller/subsystem/tts): ignite(0)
 - Master (/datum/controller/master): RunQueue()
 - Master (/datum/controller/master): Loop(2)
 - Master (/datum/controller/master): StartProcessing(0)
```

Evidently, the list of listeners is *somehow* getting new players or
observers that are being qdeleted (maybe hard deleting?)

That might be a little hard to track down so until then I figure it's
fine to throw in a stack trace and continue so it doesn't brick the
message for everyone else

## Why It's Good For The Game

Prevents the proc from runtiming and cancelling execution, ergo not
playing to everyone else

## Changelog

🆑 Melbert
fix: Fixes some occasions which result in TTS messages not playing
/🆑

* Adds a runtime protection check to play_tts

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-07-26 18:31:42 -07:00
SkyratBot
2c856ec215 [MIRROR] Fixes tgui_open_uis tracking [MDB IGNORE] (#22700)
* Fixes tgui_open_uis tracking (#77101)

Fixes https://github.com/tgstation/tgstation/issues/77097

This breaks uis for everyone with fancy-tgui off and in cases where the
window is closed by external action (byond closing it) which is pretty
bad.

* Fixes tgui_open_uis tracking

---------

Co-authored-by: AnturK <AnturK@users.noreply.github.com>
2023-07-26 13:36:31 -04:00
SkyratBot
f72839edc1 [MIRROR] Dehardcodes HR core blacklist [MDB IGNORE] (#22681)
* Dehardcodes HR core blacklist

* Merge conflicts

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-07-25 20:24:21 -04:00
lessthanthree
8dcd9bef1d Autotransfer subsystem uses REALTIMEOFDAY (#22397)
* autotransfer changes

* Update autotransfer.dm

* Update autotransfer.dm
2023-07-24 16:51:57 -04:00
SkyratBot
87458d1109 [MIRROR] Makes TTS blips/enabled into one pref [MDB IGNORE] (#22633)
* Makes TTS blips/enabled into one pref (#76558)

## About The Pull Request

![image](https://github.com/tgstation/tgstation/assets/53777086/6b06c212-060e-415f-b1fd-a6ac9f651627)

I actually do not know how to test this locally as I don't know how to
set TTS up, hope it works.

## Why It's Good For The Game

It's 2 buttons, one only works depending on the other, I don't think it
makes sense.

## Changelog

🆑
qol: The TTS and TTS Blips option is now one choiced preference.
/🆑

* Makes TTS blips/enabled into one pref

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2023-07-24 16:36:44 -04:00
SkyratBot
38dc811b6b [MIRROR] NEW STATION TRAIT: Radioactive Nebula [MDB IGNORE] (#22614)
* NEW STATION TRAIT: Radioactive Nebula

* Update job_boxes.dm

* Increase the intensity increment time so that shields will last longer

---------

Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-07-24 02:07:40 -04:00
SkyratBot
fea702d732 [MIRROR] Rename digital clock subsystem [MDB IGNORE] (#22651)
* Rename digital clock subsystem (#77028)

Renames digital clock subsystem to be better alongside other player
facing names

* Rename digital clock subsystem

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-07-24 00:36:51 -04:00
SkyratBot
c19c197b95 [MIRROR] Fix APC related issues [MDB IGNORE] (#22635)
* Fix APC related issues (#77005)

## About The Pull Request
Fixes a bunch of stuff broken by #76822, including APC control console,
malf blackout ability, shunted malf pinpointing, Admin APC recharge and
others.
## Why It's Good For The Game
Yes.
## Changelog
:cl:Thebleh
fix: Fixed several APC related issues.
/🆑

* Fix APC related issues

---------

Co-authored-by: thebleh <43266738+rdragan@users.noreply.github.com>
2023-07-22 22:41:06 -04:00
SkyratBot
032f45f939 [MIRROR] Adds a new positive quirk, "Spacer Born". [MDB IGNORE] (#22520)
* Adds a new positive quirk, "Spacer Born".

* Update quirks.dm

* Update quirks.dm

oops

* No combining with oversized quirk

* Update quirks.dm

this is why I don't edit in the web app

* Removes HUMAN_ONLY flag

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Bloop <vinylspiders@gmail.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-07-21 00:57:28 -04:00
SkyratBot
08c90f2116 [MIRROR] [MDB IGNORE] Angled Lights & Lighting Prototyping Tool [MDB IGNORE] (#22582)
* [MDB IGNORE] Angled Lights & Lighting Prototyping Tool  (#74365)

## About The Pull Request

Hello friends, I've been on a bit of a lighting kick recently, and I
decided I clearly do not have enough things to work on as it is.
This pr adds angle support to static lights, and a concepting/debug tool
for playing with lights on a map.

Let's start from first principles yeah?

### Why Angled Lights?

Mappers, since they can't actually see a light's effect in editor, tend
to go off gut.
That gut is based more off what "makes sense" then how things actually
work
This means they'll overplace light sources, and also they tend to treat
lights, particularly light "bars" (the bigger ones) as directional.
So you'll have two lights on either sides of a pillar, lights inside a
room with lights outside pointing out, etc.

![image](https://user-images.githubusercontent.com/58055496/228785032-63b86120-ea4c-4e52-b4e8-40a4b61e5bbc.png)

This has annoying side effects. A lot of our map is overlit, to the
point that knocking out a light does.... pretty much nothing.
I find this sad, and would like to work to prevent it. I think dark and
dim, while it does not suit the normal game, is amazing for vibes, and I
want it to be easier to see that.

Angled lights bring how lights work more in line with how mappers expect
lights work, and avoids bleedover into rooms that shouldn't be bled
into, working towards that goal of mine.

### How Angled Lights?

This is more complex then you'd first think so we'll go step by step

![image](https://user-images.githubusercontent.com/58055496/228786117-d937b408-9bc2-4066-9aee-aae21b047151.png)

Oh before we start, some catchup from the last time I touched lighting
code.
Instead of doing a lighting falloff calculation for each lighting corner
(a block that represents the resolution of our lights) in view we
instead generate cached lightsheets. These precalculate and store all
possible falloffs for x and y distances from a source.

This is very useful for angle work, since it makes it almost totally
free.

Atoms get 2 new values. light_angle and light_dir
Light angle is the angle the light uses, and light_dir is a cardinal
direction it displays in

We take these values, and inside sheetbuilding do some optional angle
work. getting the center angle, the angle of a pair of coords, and then
the delta between them.
This is then multiplied against the standard falloff formula, and job
done.

We do need some extra fenangling to make this all work nicely tho.

We currently use a pixel turf var stored on the light source to do
distance calculations.
This is the turf we pretend the light source is on for visuals, most
often used to make wall lights work nice.
The trouble is it's not very granular, and doesn't always have the
effect you might want.

So, instead of generating and storing a pixel turf to do our distance
calculations against, we store x and y offset variables.
We use them to expand our working range and sheet size to ensure things
visually make sense, and then offset any positions by them.

I've added a way for sources to have opinions on their offsets too, and
am using them for wall lights.
This ensures the angle calculations don't make the wall behind a light
fulldark, which would be silly.

### Debug Tool?

In the interest of helping with that core problem, lights being complex
to display, I've added a prototyping tool to the game.
It's locked behind mapping verbs, and works about like this.

Once the verb is activated, it iterates over all the sources in the
world (except turfs because those are kinda silly), outlining and
"freezing" them, preventing any future changes.
Then, it adds 3 buttons to the owners of a light source.

![image](https://user-images.githubusercontent.com/58055496/228776539-4b1d82af-1244-4ed6-8754-7f07e3e47cda.png)
The first button toggles the light on and off, as desired.
The third allows you to move the source around, with a little targeting
icon replacing your mouse
The second tho, that's more interesting.

The second button opens a debug menu for that light

![image](https://user-images.githubusercontent.com/58055496/228777811-ae620588-f08a-4b50-93a0-beea593aea77.png)
There's a lot here, let's go through it.

Bit on the left is a list of templates, which allow you to sample
existing light types (No I have no idea why the background is fullwhite,
need to work on that pre merge)
You can choose one by clicking it, and hitting the upload button.

This replaces your existing lighting values with the template's,
alongside replacing its icon and icon state so it looks right.
There are three types as of now, mostly for categorization. Bar, which
are the larger typically stronger lights, Bulb, which are well, bulbs,
and Misc which could be expanded, but currently just contains floor
lights.

Alongside that you can manually edit the power, range, color and angle
of the focused light.
I also have support for changing the direction of the light source,
since anything that uses directional lighting would also tie light dir
to it.
This isn't *always* done tho, so I should maybe find a way to edit light
dir too.

My hope is this tool will allow for better concepting of a room's
lights, and easier changing of individual object's light values to suit
the right visuals.

### Lemon No Why What

Ok so I applied angle lights to bars and bulbs, which means I am
changing the lighting of pretty much every map in the codebase.
I'm gonna uh, go check my work.

Alongside this I intend to give lighting some depth. So if there's room
to make a space warmer, or highlight light colors from other sources, I
will do that.

(Images as examples)

![image](https://user-images.githubusercontent.com/58055496/228786801-111b6493-c040-4199-ab99-ac1c914d034c.png)

I also want to work on that other goal of mine, making breaking lights
matter. So I'll be doing what I can to ensure you only need to break one
light to make a meaningful change in the scene.

This is semi complicated by one light source not ever actually reaching
fullbright on its own, but we do what we must because we can.

![image](https://user-images.githubusercontent.com/58055496/228786483-b7ad6ecd-874f-4d90-b5ca-6ef78cb70d2b.png)

I'm as I hope you know biased towards darker spaces, I think contrast
has vibes.
In particular I do not think strong lights really suit maintenance.

Most of what is used there are bulbs, so I'm planning on replacing most
uses with low power bulbs, to keep light impacts to rooms, alongside
reducing the amount of lights placed in the main tunnels

![image](https://user-images.githubusercontent.com/58055496/228786594-c6d7610c-611e-478b-bcba-173ebf4c4b12.png)

**If you take issue with this methodology please do so NOW**, I don't
want to have to do another pass over things.
Oh also I'm saving station maps for last since ruins are less likely to
get touched in mapping march and all.

### Misc + Finishing Thoughts

Light templates support mirroring vars off typepaths using a subtype,
which means all the templates added here do not require updating if the
source type changes somehow. I'd like to expand the template list at
some point, perhaps in future.

I've opened this as a draft to make my intentions to make my changes to
lights known, and to serve as motivation for all the map changes I need
to do.

### Farish Future

I'm unhappy with how we currently configure lights. I would like a
system that more directly matches the idea of drawing falloff curves,
along with allowing for different falloffs for different colors,
alongside extending the idea to angle falloff.
This would make out of engine lighting easier, allow for nicer looking
lights (red to pink, blue to purple, etc), and improve accessibility by
artists.

This is slightly far off, because I have other obligations and it's
kinda complicated, but I'd like to mention it cause it's one of my many
pipedreams.

## Changelog
🆑
add: Added angle lighting, applies it to most wall lights!
add: Adds a lighting prototyping tool, mappers go try it out (it's
locked behind the mapping verb)
/🆑

---------

Co-authored-by: MMMiracles <lolaccount1@ hotmail.com>

* [MDB IGNORE] Angled Lights & Lighting Prototyping Tool

* Update north_star.dmm

* Revert "Update north_star.dmm"

This reverts commit bb5b8b5a549f7edc3e23a369a147ed96bab41991.

* Updatepaths

* Update nukie_base.dmm

* Newer version of northstar with the penguins

* Update northstar_cryo.dmm

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: MMMiracles <lolaccount1@ hotmail.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-07-21 00:43:21 -04:00
Pinta
4d7ba6ebcb [MANUAL MIRROR] Reworks Duffel Bags (Zippers) (#22363)
* Reworks Duffel Bags (Zippers)

* Update backpack.dm

* Duiffel Spotfix

* error fixes

* Update backpack.dm

* Update code/modules/antagonists/cult/cult.dm

* Update backpack.dm

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
2023-07-20 23:12:57 -04:00