Commit Graph

302 Commits

Author SHA1 Message Date
Tim
7a32a4a8ee Automatically link maps multi-z up/down traits (#87029)
This autoloads the up/down traits for every map instead of having to
manually add those traits to the JSON.

More automation good. Also let's people experiment with larger maps like
a multi-z lavaland.

🆑
code: Automatically link maps multi-z up/down traits
/🆑
2024-11-11 00:41:53 -08:00
Majkl-J
e59d8ba64b Merge commit '179a607a90ad7ec62bdaff4e6fe72af60ee56442' of https://github.com/tgstation/tgstation into upstream-24-10b 2024-10-23 23:27:16 -07:00
Waterpig
bb70889f6e TG Upstream Part 1
3591 individual conflicts

Update build.js

Update install_node.sh

Update byond.js

oh my fucking god

hat

slow

huh

holy shit

we all fall down

2 more I missed

2900 individual conflicts

2700 Individual conflicts

replaces yarn file with tg version, bumping us down to 2200-ish

Down to 2000 individual conflicts

140 down

mmm

aaaaaaaaaaaaaaaaaaa

not yt

575

soon

900 individual conflicts

600 individual conflicts, 121 file conflicts

im not okay

160 across 19 files

29 in 4 files

0 conflicts, compiletime fix time

some minor incap stuff

missed ticks

weird dupe definition stuff

missed ticks 2

incap fixes

undefs and pie fix

Radio update and some extra minor stuff

returns a single override

no more dupe definitions, 175 compiletime errors

Unticked file fix

sound and emote stuff

honk and more radio stuff
2024-10-19 08:04:33 -07:00
Zephyr
0ef5c3d049 Persistent Map Vote Tallies (#86788)
## About The Pull Request

Changes map votes to be based on a persistent tally count.
Tallies for maps are cached between rounds and are added to by map
votes.
When a map is chosen, and it wasn't the only valid one, the tallies for
said chosen map will be reset.

Refactors map vote handling and moves it from SSmapping to SSmap_vote.
Rock the Vote has been removed as a result of this refactor.

## Why It's Good For The Game

Makes it more likely that all maps will be played over the course of a
server instead of always being truly random.
Removes some clutter off of SSmapping.

🆑
refactor: Map Votes are now carried over between rounds. When a map vote
is actually a contest, the winning map will have its votes reset.
/🆑
2024-09-30 13:09:08 +13:00
Waterpig
4c4930c71d Merge branch 'master' of https://github.com/tgstation/tgstation into pulls-tg-to-fix-shit 2024-09-08 00:59:39 +02:00
SkyratBot
e93c6c3199 [MIRROR] Block atmos processing on ReservedTurfs\™️ (#29368)
* Block atmos processing on ReservedTurfs\™️  (#84873)

## About The Pull Request

See title.

## Why It's Good For The Game

We get constant runtimes and issues from atmos processing on turfs we
are actively loading and/or reserving. I promised I would do something
about this months ago

---------

Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>

* Block atmos processing on ReservedTurfs\™️

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>
2024-08-16 20:07:12 +07:00
Zephyr
52f7f44215 Block atmos processing on ReservedTurfs\™️ (#84873)
## About The Pull Request

See title.

## Why It's Good For The Game

We get constant runtimes and issues from atmos processing on turfs we
are actively loading and/or reserving. I promised I would do something
about this months ago

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-08-15 18:45:59 +02:00
SpaceLoveSs13
fa2ab65f07 Missed mirrors (#28919)
Handful of missed mirrors (#3739)

* fix duplicate traits

* Adds a Contraband trait, and implements contraband as a mechanic to security bounties. (#84003)

This PR does a few things but centrally it's all centered around
mechanically enforcing what items are and are-not considered contraband
in-game.

Contraband items are visually indistinguishable from non-contraband. If
an item is Contraband, it can only be detected in two ways:
* After being scanned by an N-Spect scanner, which is a standard item
security item, assuming it still has a charge to do so.
* Via a scanner gate, which can now be upgraded with an N-spect scanner
to allow for it to scan a person and all their contents for contraband.

Contraband items are intended to be determined both logically and
through other relevant examine text. However, here's the short list of
items that are considered contraband, reserving the right to expand the
list.

<details>
  <summary>In hindsight it's kind of a long list.</summary>

* Items that have "contraband" or "illegal" in the name or description.
* Items that allow for the player to obtain other illegal items, that
are NOT particularly stealthy.
* This means that a syndicate uplink is NOT considered contraband, as
they're typically hidden on your person as something else.
* Stealth items under the syndicate uplink, the revolutionary flash, and
some mapped in dangerous items that can come from both syndicate and
company-aligned resources are not considered dangerous.
* Items that are purchased from cargo after emagging or switching to
extended cargo range.
* Items purchased FROM syndicate uplinks, the wizard knowledge scroll,
or other antagonist shops.
* Cursed artifacts/tools magically produced by cultists or heretics.
* Items purchased from the blackmarket.
* Items purchased from the contraband section of vending machines.
* Some drugs and overtly dangerous or criminal byproducts.

</details>

Well, primarily, this is an aid for in-game enforcement of space law.
Based on the length of the above list, we have a LONG, LONG list of
items in-game that are technically considered, in one way or another,
illegal to have on the station, and yet without either metaknowledge of
what those items are, or how they're used, security officers lack some
of the certainty of how to deal with these kinds of encounters.

Additionally to the knowledge aspect of this trait, security officers
may now receive a new civilian bounty to collect items that are
considered contraband, also giving them an incentive to look for and
confiscate contraband that's been found across the station while
upholding space law.

Security has a bounty for 3 different rechargers, and considering access
limitations, most security players aren't going to make this exchange,
so I've lowered the required amount down to 1.

Adjusted the N-spect scanner's description to match it's new
functionality.

The Civilian bounty TGUI now has an additional 1 point of padding to
make it feel less cramped.

https://github.com/tgstation/tgstation/assets/41715314/c3cd4752-b03a-4e0b-959e-1252fcc2369d

**Updated as of 6/19/2024:**
Additionally, some storage items will block the presence of contraband
when going through a contraband aligned scanning gate. These items
include the infiltrator modsuit core, storage implant, void cloak, the
aptly named smuggler's satchel, and the chameleon kit's backpack.

**Updated as of 6/23/2024:**
N-spect scanner now has contextual screentips.

**Updated as of 6/29/2024:**
Scanner gates are now available in all lathes that have a feature
specific to how scanner gates function. So, includes cargo (contraband),
security (weapons), and medbay (diseases).

Originally, this started out as a way to be able to provide more
in-character and in-flavor bounties for security officers, because they
suck! Most security bounties as they exist right now do the worst
possible things from all respective bounties:
* They detract away from a job's actual responsibilities as opposed to
working with them.
* They're best completed while sitting next to your lathe and running
items back to the bounty pad.
* They exist with such esoteric rarity of high quantity of items that
it's miserable to fulfil.

As a result, I started work on this as a framework to allow security
officers to be further incentivized to collect contraband across the
station, either as a result of the gamemode or just through routine
patrols across the station.

Implementing it as a learning tool for security as well just happened to
work out as an additional bonus, and having a function in-game allowing
newer or less experienced players to know if an item is considered
dangerous or conspicuous also works as a particularly good way to
provide information where a player may not know what they're up against.

If nothing else, this might be interesting to try, and if not, I'll just
snip out the QOL changes from it and we'll see how it goes.

Going forward, I am a bit hesitant about the contraband scanner gate
mode, and as such, will try working with the admin team to determine if
that's a good feature to keep around for game health, while hoping to
give it a chance in the fullness of time.

🆑
add: Items spawned via traitor uplinks or are known illegal contraband
on the station can now be scanned and identified as such by the N-spect
scanners in security. These only applies to overt traitor or antagonist
items, and "stealth" items will not be seen as such.
add: Scanner gates can now be upgraded by using an N-spect scanner on it
to unlock "contraband scanning" mode.
add: Security officers can now be offered a bounty to turn in pieces of
contraband.
add: Some stealthy storage items like storage implants, smuggler's
satchels, void cloaks, the infiltrator modsuit, and the chameleon
backpack will block the presence of contraband on your person when
placed inside.
qol: N-spect scanner contextual screentips.
balance: Recharger security bounties ask for a quantity of 1, down from
3.
qol: security, cargo, and medbay have access to scanner gate boards.
/🆑

---------



* Adds six new strange object powers! (#84775)

DESIGN CONCEPT: Strange Devices are at their best when they're odd tools
which can help a department out, with some strange drawbacks that make
them interesting and unique. Foam for the Janitor, Flashbang for
Security, Teleporter for tiders, Corgimaker for the chef. They're also
ambiguous enough that they can really be used by anyone for silly
hijinks.

Drink Dispenser: Creates a glass, then fills it up with a random drink.

Bioscrambler: After a noticeable warning, bioscrambles people nearby.
33% chance to be used up on use.

Recharger: Shocks you, but recharges one random item to max battery.

Hugger: Hugs everyone in range as if you had the friendly trait.

DImensional: Converts the surroundings to a random material-theme. Each
use increases cooldown by two seconds.

Disguiser: Drops your clothing to the ground and replaces it with a
delete-on-drop costume and a randomly assigned cardboard ID.

Removed an unused and unusable shock flag.

Removed an unused dumb ghost item.

Added a proc that returns a hex color with the # attached.

> DESIGN CONCEPT: Strange Devices are at their best when they're odd
tools which can help a department out, with some strange drawbacks that
make them interesting and unique. Foam for the Janitor, Flashbang for
Security, Teleporter for tiders, Corgimaker for the chef. They're also
ambiguous enough that they can really be used by anyone for silly
hijinks.

Request by ArcaneMusic! He wanted new abilities to go along with the new
sprites, and approved these.

> Removed an unused dumb ghost item.

please stop using costume subtypes for OP items. whats the damn point of
the subtype if youre just going to screw with it

> Added a proc that returns a hex color with the # attached.

idk why it didnt have this tbh

🆑
add: Adds six new strange object powers! Drink dispenser, bioscrambler,
recharger, hugger, dimensional, disguiser.
code: Removed some unused code and items, and added a proc that returns
a random #colorstring.
/🆑

* [NO GBP] the random spawner loot weight config is not an integer (#84814)

Sets `integer` to false.
Also a tidbit about the `skew_loot_weight` proc, though loot lists with
uneven weights all tend to add a value to all entries so it isn't an
issue.

The config isn't an integer.

N/A

* The techweb no longer erroneously refers to MODsuits as exosuits (#84800)

At some point, some of the techweb node descriptions were changed, so
that it referred to certain modsuits as exosuits. This just changes it
back.

The term "exosuit" is generally used for mechs, not modsuits. The
techweb descriptions should refer to modsuits as modsuits.
🆑
spellcheck: The techweb no longer erroneously refers to MODsuits as
exosuits.
/🆑

* Adds new hairstyle - Short Bangs 2 (#84804)

Adds a new hairstyle called Short Bangs 2.
The hairstyle is basically an edit of the existing double buns, except
the hair buns themselves are removed.

https://github.com/tgstation/tgstation/assets/66234359/38fe3b09-c42b-43e6-9e30-949428aab506

More customization, variety and character flavor is great. Double buns
itself is a good hairstyle but some may not like the hair buns out of
personal preference or that it can look weird on non-human species like
felinids.

🆑 Hardly3D
add: Added new hairstyle: Short Bangs 2
/🆑

* Offset render relays for non-offsetting planes to match highest matching render plane (#84184)

**Alternate title: "Fix blind people getting so blind they become deaf
when going down a flight of stairs"**

So 'bout half a week to a week ago I overheard a friend complaining
about blind people not seeing runechat on lower multi-z levels. Asked a
bit, apparently they'd reported this about half a year ago, and it's
still an issue.
So in my never-ending hubris I decided to just go and fix it!
Now, admittedly? I really _really_ do not get the rendering system we
use.
The simple options were right out: we can't allow the fullscreens plane
to be offset, as this causes issues with looking up/down, or disallow
runechat from being offset, which causes issues with runechat from other
levels.

After poking our very cool and smart rendering guy several times over
the course of the last week, this is what we got to:

We simply make the rendering relays for non-offsetting plane masters
point to the highest rendering plane that matches the target.
We do this by offsetting the rendering relays in place, by adjusting
their plane and layer values to match the new offset, with a new
`offset_relays_in_place(new_offset)` proc called in
`/datum/plane_master_group/proc/transform_lower_turfs(...)`.
Importantly, we compare the current layer values to what they should've
been, so we don't accidentally override relays with custom-set layers.

This fixes our issue (as tested on wawastation):
<details>
  <summary>Images</summary>

![image](https://github.com/tgstation/tgstation/assets/42909981/c6a10e04-dd08-4642-bc4d-d99ae5004a40)

![image](https://github.com/tgstation/tgstation/assets/42909981/740dc894-7495-4c35-b729-ffcc539ca928)

![image](https://github.com/tgstation/tgstation/assets/42909981/986433a7-e66e-408a-8e77-1f1eb89cb67c)

</details>

Fixes #80376.
🆑
fix: You can see runechat above fullscreen overlays on lower multi-z
levels again. Rejoice, blind players. Please report any weird rendering
layering issues.
/🆑

* illegal tech flag got changed

* Automatic changelog for PR #84003 [ci skip]

* Automatic changelog for PR #84775 [ci skip]

* Automatic changelog for PR #84800 [ci skip]

* Automatic changelog for PR #84804 [ci skip]

* Automatic changelog for PR #84184 [ci skip]

* Makes the smoking pipe sprite not give you a phantom stache. (#84898)

The smoking pipe currently gives you a phantom stache. Observe, note the
black background and know this character has no facial hair.

![image](https://github.com/tgstation/tgstation/assets/70115628/2939afa9-e4e4-4ee2-b38b-fc517e207d01)
I basically adjusted the pixels so it'd look better from different
directions.
This is the new look - approximately.

![image](https://github.com/tgstation/tgstation/assets/70115628/55e23d8e-2367-468a-94c2-9c5741f34762)
Smoking pipe is cool for RP but the sprite's fucked.
🆑
image: the smoking pipe's directional looks have been altered to make it
less ugly
/🆑

(cherry picked from commit c499c51bb3)

* Automatic changelog for PR #84898 [ci skip]

(cherry picked from commit 1e80a72dee)

* Revert "Automatic changelog for PR #84898 [ci skip]"

This reverts commit 1ddc7d43de30bb7ef029d1ddd39f86ded94e110c.

* Revert "Makes the smoking pipe sprite not give you a phantom stache. (#84898)"

This reverts commit b66b9d634e5f28e40e800586d4642468049767e6.

---------

Co-authored-by: FlufflesTheDog <piecopresident@gmail.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: carlarctg <53100513+carlarctg@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: GPeckman <21979502+GPeckman@users.noreply.github.com>
Co-authored-by: Hardly3D <66234359+Hardly3D@users.noreply.github.com>
Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
Co-authored-by: orange man <61334995+comfyorange@users.noreply.github.com>
Co-authored-by: NewyearnewmeUwu <70115628+NewyearnewmeUwu@users.noreply.github.com>
Co-authored-by: SomeRandomOwl <2568378+SomeRandomOwl@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2024-07-20 14:23:18 +05:30
_0Steven
5e753b6788 Offset render relays for non-offsetting planes to match highest matching render plane (#84184)
## About The Pull Request

**Alternate title: "Fix blind people getting so blind they become deaf
when going down a flight of stairs"**

So 'bout half a week to a week ago I overheard a friend complaining
about blind people not seeing runechat on lower multi-z levels. Asked a
bit, apparently they'd reported this about half a year ago, and it's
still an issue.
So in my never-ending hubris I decided to just go and fix it!
Now, admittedly? I really _really_ do not get the rendering system we
use.
The simple options were right out: we can't allow the fullscreens plane
to be offset, as this causes issues with looking up/down, or disallow
runechat from being offset, which causes issues with runechat from other
levels.

After poking our very cool and smart rendering guy several times over
the course of the last week, this is what we got to:

### The technical bits

We simply make the rendering relays for non-offsetting plane masters
point to the highest rendering plane that matches the target.
We do this by offsetting the rendering relays in place, by adjusting
their plane and layer values to match the new offset, with a new
`offset_relays_in_place(new_offset)` proc called in
`/datum/plane_master_group/proc/transform_lower_turfs(...)`.
Importantly, we compare the current layer values to what they should've
been, so we don't accidentally override relays with custom-set layers.

This fixes our issue (as tested on wawastation):
<details>
  <summary>Images</summary>
  

![image](https://github.com/tgstation/tgstation/assets/42909981/c6a10e04-dd08-4642-bc4d-d99ae5004a40)

![image](https://github.com/tgstation/tgstation/assets/42909981/740dc894-7495-4c35-b729-ffcc539ca928)

![image](https://github.com/tgstation/tgstation/assets/42909981/986433a7-e66e-408a-8e77-1f1eb89cb67c)
  
</details>

## Why It's Good For The Game

Fixes #80376.
## Changelog
🆑
fix: You can see runechat above fullscreen overlays on lower multi-z
levels again. Rejoice, blind players. Please report any weird rendering
layering issues.
/🆑
2024-07-11 01:05:07 -07:00
SpaceLoveSs13
a9ff046352 Administrator Cherrypick (#27405)
* Admin Verb Datums MkIII | Now with functional command bar (#82511)

* Modular stuffs

* Put some admin jump verbs back into the context menu | sorts area jump list again (#82647)

## About The Pull Request

See title.

## Why It's Good For The Game

Some admins wanted all the jump verbs back, aswell as making them not
AGhost you.
Also make the Jump To Area verb use a sorted list again

* Hey what if admins were allowed to use the player panel (#82682)

Re-adds the player panel verb to the verb panel.

* Controller Overview UI (#82739)

* Fixes a minor spelling mistake on the admin panel/verb list (#82747)

## About The Pull Request

Corrects `inisimin` to `invisimin`. This addresses #82728, but only
fixes one of the two issues mentioned

## Why It's Good For The Game

-1 spelling mistake

## Changelog
🆑
spellcheck: 'inisimin' verb corrected to 'invisimin'
/🆑

* Player Panel-age (#82757)

* Admin Forced Mob Rename and Preference Update (#82715)

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
Co-authored-by: chel <64568243+iliyaxox@users.noreply.github.com>
2024-04-23 20:43:45 +02:00
Zephyr
7f8752be14 Admin Verb Datums MkIII | Now with functional command bar (#82511) 2024-04-12 12:27:09 -07:00
SkyratBot
602ac52e9d [MIRROR] Fixes ore vents spawning without ores on icebox, sets up map specific ore configurations (#26375)
* Fixes ore vents spawning without ores on icebox, sets up map specific ore configurations (#81103)

## About The Pull Request

In short, we used a static list previously within the ore_generation
subsystem that held the amount of each ore that we expected a single map
to uniformly need. We held this number constant, since we were spawning
15 vents per map.

**Pros:** This worked flawlessly for Lavaland since 15 vents on a single
Z level makes it pretty densely packed map with a good amount of
map-based ore spawns, and it worked consistently.

**Cons:** 15 vents did not work well on Icebox however, even when split
so that the majority of the ores were spawning on the lower levels,
players did not feel like icebox spawned nearly enough ores and reported
the map spawning empty.

**Result:** As a result, we adjusted the ratio, so that we spawned
vastly more ores on the lower levels, now up to 4 vents on the upper
level, and 21 vents on the lower level. However, as we were still using
the ore distribution list based on lavaland, icebox vents were quickly
running out of ores to distribute between them, resulting in empty vents
-> which produced empty boulders -> which not only don't really let you
process them properly, but also just result in a metric ton of runtimes.

Icebox now has it's own list of ore distributions. These distributions
are now moved to a set of global lists as opposed to being saved on the
subsystem as a static list, which will make going and setting up new ore
distribution lists very very easy. Additionally, we've moved the setting
and getting of those ore_distributions over to the seedRuins proc, so
that we're actually setting the list of ores right before we actually
place them to make sure that the order that it's set is roughly as it's
needed, while still setting the list at the same time the
map-appropriate ruin placements are dropped in.

**Plus some misc cleanup fixes:**
`var/list/ore_vent_sizes` in SSore_generation wasn't being treated as a
similar budget list as `ore_vent_minerals`, since it `pick()`s off it's
own static size list. Which is honestly fine for this five seconds, I
can handle that later while we make sure the rest of the code code is
stable. In the meantime, I've just tweak it so that it's easy to see at
a glance how many of each random vent has spawned into the map.

Tweaked the description to not include anything about chemical
processing, as I'm planning on hitting on that in a part 2 PR that I'll
be picking back up after the freeze.

## Why It's Good For The Game

Cleans up the code a bit, but primarily fixes ores not spawning on
icebox as they should.
Should fix #81058.
Improves description to not mention mechanics that aren't in game.
Also, cleans up a piece of code that currently isn't serving much of a
purpose.

## Changelog

🆑
fix: Icebox should have it's ore distribution and it's ore vents fixed,
so that vents should now produce ore.
spellcheck: Boulder processing machines now don't mention things they
don't do.
/🆑

* Fixes ore vents spawning without ores on icebox, sets up map specific ore configurations

---------

Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
2024-02-07 13:26:08 -05:00
ArcaneMusic
ed31397cc4 Fixes ore vents spawning without ores on icebox, sets up map specific ore configurations (#81103)
## About The Pull Request

In short, we used a static list previously within the ore_generation
subsystem that held the amount of each ore that we expected a single map
to uniformly need. We held this number constant, since we were spawning
15 vents per map.

**Pros:** This worked flawlessly for Lavaland since 15 vents on a single
Z level makes it pretty densely packed map with a good amount of
map-based ore spawns, and it worked consistently.

**Cons:** 15 vents did not work well on Icebox however, even when split
so that the majority of the ores were spawning on the lower levels,
players did not feel like icebox spawned nearly enough ores and reported
the map spawning empty.

**Result:** As a result, we adjusted the ratio, so that we spawned
vastly more ores on the lower levels, now up to 4 vents on the upper
level, and 21 vents on the lower level. However, as we were still using
the ore distribution list based on lavaland, icebox vents were quickly
running out of ores to distribute between them, resulting in empty vents
-> which produced empty boulders -> which not only don't really let you
process them properly, but also just result in a metric ton of runtimes.

Icebox now has it's own list of ore distributions. These distributions
are now moved to a set of global lists as opposed to being saved on the
subsystem as a static list, which will make going and setting up new ore
distribution lists very very easy. Additionally, we've moved the setting
and getting of those ore_distributions over to the seedRuins proc, so
that we're actually setting the list of ores right before we actually
place them to make sure that the order that it's set is roughly as it's
needed, while still setting the list at the same time the
map-appropriate ruin placements are dropped in.

**Plus some misc cleanup fixes:**
`var/list/ore_vent_sizes` in SSore_generation wasn't being treated as a
similar budget list as `ore_vent_minerals`, since it `pick()`s off it's
own static size list. Which is honestly fine for this five seconds, I
can handle that later while we make sure the rest of the code code is
stable. In the meantime, I've just tweak it so that it's easy to see at
a glance how many of each random vent has spawned into the map.

Tweaked the description to not include anything about chemical
processing, as I'm planning on hitting on that in a part 2 PR that I'll
be picking back up after the freeze.

## Why It's Good For The Game

Cleans up the code a bit, but primarily fixes ores not spawning on
icebox as they should.
Should fix #81058.
Improves description to not mention mechanics that aren't in game.
Also, cleans up a piece of code that currently isn't serving much of a
purpose.

## Changelog

🆑
fix: Icebox should have it's ore distribution and it's ore vents fixed,
so that vents should now produce ore.
spellcheck: Boulder processing machines now don't mention things they
don't do.
/🆑
2024-02-07 05:20:25 +01:00
SkyratBot
5543a44882 [MIRROR] ArcMining Pr Beta: Version 1.2 (#26205)
ArcMining Pr Beta: Version 1.2 (#78524)

This one's not like the last one, so much so that I'm not even going to
outsource the PR description to a robot this time!
Basically, **You should read the PR body before assuming that everything
is the same as last time. It's not.**

Click the link below to see a video summary of the main features of this
pull request.
https://youtu.be/Aho2omR0mjY?feature=shared

This pull request serves as a large rework of minerals produced by
mining, and by extension mining itself. I'll try and list each change
and it's associated nuance here.

The biggest addition to the game with ArcMining is **Ore Vents**. Ore
vents spawn as a ruin on the map, placing a randomized ore vent onto map
generation. Ore vents spawn in 3 different sizes, **Small, Medium, and
Large**. These vents will pick from a pool of materials they can
generate, and will hang out across the map. A player can use a mining
scanner to discover an ore vent, granting a small quantity of **mining
points** to begin with. Once scanned, ore vents will show what minerals
that ore vent will generate after they're fully tapped.

Scanning the vent again will trigger the extraction process. A small
drone will fly down, called the NODE drone, and buckle onto the vent.
Your job during wave defense is to protect the drone and to defeat waves
of randomly spawning mobs (dependent on if you're on lavaland or on
icebox). The quantity, duration, and time between waves is scaled to the
size of the vent you're protecting. Starting by scanning and protecting
lower tier vents earlier in the shift is a safer bet than doing a large
vent in the first few minutes. The drone has 500 health, and can take a
good few hits, but leaving it alone will cause it to meet an unfortunate
end quite quickly.

Cooperation can be your best asset, as mining with allies can greatly
help with wave defense, and mineral points are granted to anyone who
helps with defending the ore vent equally (So 500 * size tier,
regardless of how much help you receive). Once complete, the ore vent
will have a mining machine constructed on top of it, and will start to
dredge up **Boulders** from the earth automatically. More on boulders
later.

Ore vents can be located based on your mining scanner, and will provide
an appropriate audio cue based on if the ore vent has been discovered or
not, and once processed will no longer alert you to it's presence.

**Each station comes with a free vent that produces exclusively iron and
glass, free of charge.** This is to help with shifts where the station
may not have shaft miners to produce minerals, and to provide the
station with a baseline amount of minerals where none may exist
otherwise.

Mineral generation has been completely reworked. Previously, Mineral
Generation had a flat 13% spawn rate in-game. Once minerals spawned,
they would also have a chance to propagate their minerals to nearby
tiles, resulting in a rather massive pool of minerals that could spawn
throughout lavaland on the whole.

This tweaks that, by making minerals in walls spawn based on their
proximity to ore vents on maps that use cave generation. Both the
probability, and quantity of ores spawning in walls is scaled based on
distance, with ore vents looking like large caches of ores found in
walls. This makes following ores found in walls and checking their
quantity of minerals spawned a good indicator of how close you are to a
nearby vent in-round.

This means you can collect some points form both discovering ore vents
first, as well as collecting their surrounding ores, turn those in for
mining points, and then trading them in for gear upgrades to more
effectively take on ore vents. As a result of tweaking the balance of
this, the total amount of ores spawned in walls overall has been
decreased. However, by making more of the process time based, we still
result in a mostly balanced finished product.

On station, there are now three new machines. These are the BRM, the
Refinery, and the Smelter.

- The BRM acts as a teleporter. Instead of needing to carry boulders
back to the station, you can activate the BRM, and it will automatically
pick boulders to teleport back to itself. You can use this to teleport
boulders dredged up from lavaland onto the station for processing. **The
BRM will only lock on to boulders that are resting on an ore vent.**
Moving boulders back by hand will mean you'll have to haul it back by
hand.
- The refinery processes the non-metallic materials out of boulders.
This process sends the materials straight to the ORM, and collects
mining points from the ores smelted in the machine. Swiping with an ID
card lets you withdraw those points for your own personal account, but
remember that these points are for your whole team to share from. The
**Mining points obtained from this process is only 75% of the amount an
equivalent amount of ores would provide.**
- The smelter works nearly identically, however the smelter produces
metallic materials out of boulders instead.
- Once a boulder has had all of it's materials extracted, it's broken
down and deleted from the line. Otherwise, the boulder is spat out for
the next machine to process it (either the refinery or smelter).
- Once there's no minerals left in a boulder of any type, the refinery
or smelter will break the boulder down.
- Boulders **do not stack onto tiles with each other**, so they'll block
each other when pulled or when moving on a conveyor belt.

Boulders can also be processed by hand. Using a mining tool on a boulder
with right click will allow you to break down a boulder into it's
composite ores, but limits you to a maximum of 10 ore per boulder, where
the full amount can be extracted using the proper processing machines.
Also, processing by hand does deal small amounts of stamina damage over
time, do breaking a full large boulder can be particularly taxing.

Additional Boulder Processing Machines can be built, with the BRM board
being obtained from the Protolathe, while the Smelter and Refinery
boards being obtainable from the Autolathe instead. A _boulder
processing beacon_ can also be obtained from the mining points vendor as
a reward to assist with boulder processing. Boulder processing beacons
can be used to spawn in a new BRM, refinery, and smelter on the tile the
user is standing on, however **you'll still need to link them to the
ORM**!

All three machines can be upgraded with Stock Parts, allowing for **more
boulders to be processed at a time**. It does not, however, increase the
amount of minerals received from boulders, or points earned.

Mining borgs have been given some minor adjustments to compensate for
the changes to mining. Their mineral scanner, which now has an active
component to gameplay, is now a module as opposed to built into the mob.
This module allows for the same ability to discover and start waves of
monsters to fight.

Mining modules will find that their PKA now has a total of 90% mod
capacity as compared to the 80% they had before, to allow for more
robust defense of ore vents.

In addition, all borgs and AIs can interact with the BRM for boulder
collection.

Mining Mechs have had their utility tweaked as a result of these changes
as well. Mineral scanners to be used on mining mechs now have a larger
radius by comparison to their handheld cousins. Similarly, it now has an
active scanning button, which will actively discovery nearby ore vents.
To begin wave defense, you will need to hop out and scan a second time
however, so that you can properly accept the risks of drawing a horde of
bloodthirsty wildlife towards you and your companions.

Mechs can also manually process boulders, similar to mining tools using
their drill.

Golems, being more gentle and less aggressive than humans, while being
made out of LITERAL ROCKS, have a greater need to secure access to ores
and minerals to eat. As such, they have adapted to be able to do two new
things:

- Golems may now right click ore vents to be able to manually haul a
boulder out of the vent. This costs a hefty amount of stamina, but it
allows for golems to avoid combat during regular gameplay.
- Golems may now left click a boulder with an open hand in order to
manually process a boulder like a pickaxe. While not faster, it is
consistent and prevents golems from starving if they have access to a
vent, but no ores, somehow.

The labor camp, being a camp for rehabilitation and ~~excessive manual
labor~~ has been tweaked. Boulders now replace the random minerals
located on their island, and to acquire their prizes inside, much be
excavated and then broken out of the rock. Now YOU TOO can excavate
minerals and become a true mineral hero by working your way to freedom.

As a result of fewer mining points being available across the map due to
the new ore spawning mechanics, and the shift in how and when ores will
be coming in, almost every progress based mining point cost has been
reduced by around 10-20%. Many numbers are still subject to change at
present, but the idea is that core progress unlocks should be made a bit
more available earlier in the round before players can start to solo or
duo larger or more difficult ore vents, after which they'll be rolling
in ores.

Every once in awhile, an unusual boulder will get hauled up from the
mineral rich depths of lavaland. These **Artifact boulders** can
occasionally produce rare items, but for now they've mostly just been
pulling up **Strange objects** for science. Nanotrasen Natural Sciences
department will reward you extra points to be collected by boulder
processing machines for successfully extracting one. In the future, this
opens up a passive reward space that mining can reward to the station,
like providing cytology DNA samples, ancient seeds, or other artifacts.

- Boulders can be stored in all varieties of ore boxes (ground, mech)
should you choose, however as mentioned it's best to leave them where
they spawn and teleport them to the station for convenience.
- Maps that are not subject to cave generation will find that they are
largely untouched in terms of mineral balance.
- Future or existing ruins can now be tweaked to have a mineral balance
cost, as the ore vent ruin does. This will allow us to spawn in more
interesting ruins for pre-made combat challenges.
- There are unique ore vents that spawn across the map, that will summon
a boss mob relevant to that map. If the boss mob is defeated, that vent
will spawn large boulders pulling from every possible ore type that can
spawn. Not for the faint of heart!
- Similarly, the number of ore vents and mineral budget is now
adjustable in the cave generation procs, so maps may spawn with more or
less ore vents as desired for balance.
- Artifact boulders opens up a LOT of room for possible future content
like archaeology, xenoarch, artisci, and other design spaces!
- Megafauna STILL SPAWN ON THE MAP. They just happen to spawn in
addition to boss ore vents.
- **I'll add more to this as I get asked questions and remember things,
this is a huge PR and I'm confident I've missed at least something**

I outlined a lot of this in #78040, so I'll try and keep this relatively
snappy this time, while noting that I've made some concessions to make
the whole system a lot more playable while not trying to break out
design decisions that are at the end of the day, better for the game and
the overall resource balance in round.

Minerals are a very poorly balanced system, and have been since their
inception many years ago. We heavily rely on mineral balance in round,
and yet we've really only balanced it by introducing so much supply that
there's no equivalent exchange for materials that doesn't just heavily
flood the exchanged material. For example, items printed from materials
that are otherwise considered "rare" on master exist in such quantities
and they'll never practically run out in our allotted 90 minute time
slot design. This PR adjusts how ores spawn to a point where we can
minimize the amount of ores that need to exist on the map for mining to
be able to progress, while still providing enough resources for the
station that it covers the needs of the station adequately.

Miners will need to be more strategic about what resources they've
collected, and be able to make decisions about which vents are worth the
risk of attempting to fight, how to prepare for a wave defense, and when
to head back up for upgrades, while finally giving them at least some
kind of incentive to work together and use different equipment.
Resonators make cleaning up the caves around vent easy, sandbags set up
easy defenses for your vent, mechs can serve as a wider range radar
while mining, all while still providing a new gameplay loop to mining.

By limiting the amount of ores that can enter the round from the
massive, massive amounts that were coming into the round beforehand (see

gameplay to the processing of minerals. I have some plans for that,
however this PR already got bloated really REALLY badly due to scope
creep and the number of intersecting systems that rammed into each other
to make this PR possible. So that'll be next. Plus, as I've mentioned,
we open up places for ore processing to find fossils, relics, and other
things that can implemented down the line.

Overall, I don't expect this PR to save or kill ore balance, but we gain
a LOT more control over it through the use of our mining defines
attached to this PR, and at the end of the day, that's a great place to
start off of.

🆑
add: Added ore vents. Scanning them with mining scanners shows what
minerals they contain. Scan again to fight off a horde of beasts as your
drone assistant excavates the vent, so the ore vent will produce mineral
boulders!
bal: Ores that spawn in walls now spawn based on their proximity to ore
vents, with their chance to spawn and their minerals contained scaling
from low to high.
add: Added the BRM, Refinery, and Smelter. These pieces of equipment are
used to process ore boulders into minerals for the station. Stock Part
upgrades allow more boulders to be processed at one time. They collect
mining points as well, to be redeemed with an ID card swipe.
add: Boulders are teleported to the station via the BRM if left
untouched. Boulders can also be cracked open for a reduced amount of ore
using pickaxes or golems hands.
add: All stations come equipt with a pre-excavated ore vent, which
produces a basic supply of iron and glass only. Scan other vents for
your critical resources!
add: Look there's a shit ton of changes on mining, for more detail check
out the Pull Request: https://github.com/tgstation/tgstation/pull/78524.
sound: New sounds and noises for your high octane factorio-like
gameplay!
image: All new boulder sprites for the new minerals and rocks added to
the mining gameplay loop, as well as mining machines!
image: Overlays appear over vents when scanned to let you know their
contents at a glance when actively scanned with any mining scanners.
/🆑

---------

Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-01-22 01:33:55 +01:00
ArcaneMusic
002051a3d5 ArcMining Pr Beta: Version 1.2 (#78524)
This one's not like the last one, so much so that I'm not even going to
outsource the PR description to a robot this time!
Basically, **You should read the PR body before assuming that everything
is the same as last time. It's not.**

## Video Summary
Click the link below to see a video summary of the main features of this
pull request.
https://youtu.be/Aho2omR0mjY?feature=shared

## About The Pull Request
This pull request serves as a large rework of minerals produced by
mining, and by extension mining itself. I'll try and list each change
and it's associated nuance here.

### Ore Vents
The biggest addition to the game with ArcMining is **Ore Vents**. Ore
vents spawn as a ruin on the map, placing a randomized ore vent onto map
generation. Ore vents spawn in 3 different sizes, **Small, Medium, and
Large**. These vents will pick from a pool of materials they can
generate, and will hang out across the map. A player can use a mining
scanner to discover an ore vent, granting a small quantity of **mining
points** to begin with. Once scanned, ore vents will show what minerals
that ore vent will generate after they're fully tapped.

Scanning the vent again will trigger the extraction process. A small
drone will fly down, called the NODE drone, and buckle onto the vent.
Your job during wave defense is to protect the drone and to defeat waves
of randomly spawning mobs (dependent on if you're on lavaland or on
icebox). The quantity, duration, and time between waves is scaled to the
size of the vent you're protecting. Starting by scanning and protecting
lower tier vents earlier in the shift is a safer bet than doing a large
vent in the first few minutes. The drone has 500 health, and can take a
good few hits, but leaving it alone will cause it to meet an unfortunate
end quite quickly.

Cooperation can be your best asset, as mining with allies can greatly
help with wave defense, and mineral points are granted to anyone who
helps with defending the ore vent equally (So 500 * size tier,
regardless of how much help you receive). Once complete, the ore vent
will have a mining machine constructed on top of it, and will start to
dredge up **Boulders** from the earth automatically. More on boulders
later.

Ore vents can be located based on your mining scanner, and will provide
an appropriate audio cue based on if the ore vent has been discovered or
not, and once processed will no longer alert you to it's presence.

**Each station comes with a free vent that produces exclusively iron and
glass, free of charge.** This is to help with shifts where the station
may not have shaft miners to produce minerals, and to provide the
station with a baseline amount of minerals where none may exist
otherwise.

### Mineral Generation
Mineral generation has been completely reworked. Previously, Mineral
Generation had a flat 13% spawn rate in-game. Once minerals spawned,
they would also have a chance to propagate their minerals to nearby
tiles, resulting in a rather massive pool of minerals that could spawn
throughout lavaland on the whole.

This tweaks that, by making minerals in walls spawn based on their
proximity to ore vents on maps that use cave generation. Both the
probability, and quantity of ores spawning in walls is scaled based on
distance, with ore vents looking like large caches of ores found in
walls. This makes following ores found in walls and checking their
quantity of minerals spawned a good indicator of how close you are to a
nearby vent in-round.

This means you can collect some points form both discovering ore vents
first, as well as collecting their surrounding ores, turn those in for
mining points, and then trading them in for gear upgrades to more
effectively take on ore vents. As a result of tweaking the balance of
this, the total amount of ores spawned in walls overall has been
decreased. However, by making more of the process time based, we still
result in a mostly balanced finished product.

### Boulder Processing
On station, there are now three new machines. These are the BRM, the
Refinery, and the Smelter.

- The BRM acts as a teleporter. Instead of needing to carry boulders
back to the station, you can activate the BRM, and it will automatically
pick boulders to teleport back to itself. You can use this to teleport
boulders dredged up from lavaland onto the station for processing. **The
BRM will only lock on to boulders that are resting on an ore vent.**
Moving boulders back by hand will mean you'll have to haul it back by
hand.
- The refinery processes the non-metallic materials out of boulders.
This process sends the materials straight to the ORM, and collects
mining points from the ores smelted in the machine. Swiping with an ID
card lets you withdraw those points for your own personal account, but
remember that these points are for your whole team to share from. The
**Mining points obtained from this process is only 75% of the amount an
equivalent amount of ores would provide.**
- The smelter works nearly identically, however the smelter produces
metallic materials out of boulders instead.
- Once a boulder has had all of it's materials extracted, it's broken
down and deleted from the line. Otherwise, the boulder is spat out for
the next machine to process it (either the refinery or smelter).
- Once there's no minerals left in a boulder of any type, the refinery
or smelter will break the boulder down.
- Boulders **do not stack onto tiles with each other**, so they'll block
each other when pulled or when moving on a conveyor belt.

Boulders can also be processed by hand. Using a mining tool on a boulder
with right click will allow you to break down a boulder into it's
composite ores, but limits you to a maximum of 10 ore per boulder, where
the full amount can be extracted using the proper processing machines.
Also, processing by hand does deal small amounts of stamina damage over
time, do breaking a full large boulder can be particularly taxing.

Additional Boulder Processing Machines can be built, with the BRM board
being obtained from the Protolathe, while the Smelter and Refinery
boards being obtainable from the Autolathe instead. A _boulder
processing beacon_ can also be obtained from the mining points vendor as
a reward to assist with boulder processing. Boulder processing beacons
can be used to spawn in a new BRM, refinery, and smelter on the tile the
user is standing on, however **you'll still need to link them to the
ORM**!

All three machines can be upgraded with Stock Parts, allowing for **more
boulders to be processed at a time**. It does not, however, increase the
amount of minerals received from boulders, or points earned.

### Mining Borg Tweaks
Mining borgs have been given some minor adjustments to compensate for
the changes to mining. Their mineral scanner, which now has an active
component to gameplay, is now a module as opposed to built into the mob.
This module allows for the same ability to discover and start waves of
monsters to fight.

Mining modules will find that their PKA now has a total of 90% mod
capacity as compared to the 80% they had before, to allow for more
robust defense of ore vents.

In addition, all borgs and AIs can interact with the BRM for boulder
collection.

### Mining Mech Tweaks
Mining Mechs have had their utility tweaked as a result of these changes
as well. Mineral scanners to be used on mining mechs now have a larger
radius by comparison to their handheld cousins. Similarly, it now has an
active scanning button, which will actively discovery nearby ore vents.
To begin wave defense, you will need to hop out and scan a second time
however, so that you can properly accept the risks of drawing a horde of
bloodthirsty wildlife towards you and your companions.

Mechs can also manually process boulders, similar to mining tools using
their drill.

### Golem Tweaks
Golems, being more gentle and less aggressive than humans, while being
made out of LITERAL ROCKS, have a greater need to secure access to ores
and minerals to eat. As such, they have adapted to be able to do two new
things:

- Golems may now right click ore vents to be able to manually haul a
boulder out of the vent. This costs a hefty amount of stamina, but it
allows for golems to avoid combat during regular gameplay.
- Golems may now left click a boulder with an open hand in order to
manually process a boulder like a pickaxe. While not faster, it is
consistent and prevents golems from starving if they have access to a
vent, but no ores, somehow.

### Gulag Tweaks
The labor camp, being a camp for rehabilitation and ~~excessive manual
labor~~ has been tweaked. Boulders now replace the random minerals
located on their island, and to acquire their prizes inside, much be
excavated and then broken out of the rock. Now YOU TOO can excavate
minerals and become a true mineral hero by working your way to freedom.

### Mining Point Changes
As a result of fewer mining points being available across the map due to
the new ore spawning mechanics, and the shift in how and when ores will
be coming in, almost every progress based mining point cost has been
reduced by around 10-20%. Many numbers are still subject to change at
present, but the idea is that core progress unlocks should be made a bit
more available earlier in the round before players can start to solo or
duo larger or more difficult ore vents, after which they'll be rolling
in ores.

### Rarities
Every once in awhile, an unusual boulder will get hauled up from the
mineral rich depths of lavaland. These **Artifact boulders** can
occasionally produce rare items, but for now they've mostly just been
pulling up **Strange objects** for science. Nanotrasen Natural Sciences
department will reward you extra points to be collected by boulder
processing machines for successfully extracting one. In the future, this
opens up a passive reward space that mining can reward to the station,
like providing cytology DNA samples, ancient seeds, or other artifacts.

### Misc notes

- Boulders can be stored in all varieties of ore boxes (ground, mech)
should you choose, however as mentioned it's best to leave them where
they spawn and teleport them to the station for convenience.
- Maps that are not subject to cave generation will find that they are
largely untouched in terms of mineral balance.
- Future or existing ruins can now be tweaked to have a mineral balance
cost, as the ore vent ruin does. This will allow us to spawn in more
interesting ruins for pre-made combat challenges.
- There are unique ore vents that spawn across the map, that will summon
a boss mob relevant to that map. If the boss mob is defeated, that vent
will spawn large boulders pulling from every possible ore type that can
spawn. Not for the faint of heart!
- Similarly, the number of ore vents and mineral budget is now
adjustable in the cave generation procs, so maps may spawn with more or
less ore vents as desired for balance.
- Artifact boulders opens up a LOT of room for possible future content
like archaeology, xenoarch, artisci, and other design spaces!
- Megafauna STILL SPAWN ON THE MAP. They just happen to spawn in
addition to boss ore vents.
- **I'll add more to this as I get asked questions and remember things,
this is a huge PR and I'm confident I've missed at least something**

## Why It's Good For The Game

I outlined a lot of this in #78040, so I'll try and keep this relatively
snappy this time, while noting that I've made some concessions to make
the whole system a lot more playable while not trying to break out
design decisions that are at the end of the day, better for the game and
the overall resource balance in round.

Minerals are a very poorly balanced system, and have been since their
inception many years ago. We heavily rely on mineral balance in round,
and yet we've really only balanced it by introducing so much supply that
there's no equivalent exchange for materials that doesn't just heavily
flood the exchanged material. For example, items printed from materials
that are otherwise considered "rare" on master exist in such quantities
and they'll never practically run out in our allotted 90 minute time
slot design. This PR adjusts how ores spawn to a point where we can
minimize the amount of ores that need to exist on the map for mining to
be able to progress, while still providing enough resources for the
station that it covers the needs of the station adequately.

Miners will need to be more strategic about what resources they've
collected, and be able to make decisions about which vents are worth the
risk of attempting to fight, how to prepare for a wave defense, and when
to head back up for upgrades, while finally giving them at least some
kind of incentive to work together and use different equipment.
Resonators make cleaning up the caves around vent easy, sandbags set up
easy defenses for your vent, mechs can serve as a wider range radar
while mining, all while still providing a new gameplay loop to mining.

By limiting the amount of ores that can enter the round from the
massive, massive amounts that were coming into the round beforehand (see
#78346 ), we can make ore processing more meaningful by adding more
gameplay to the processing of minerals. I have some plans for that,
however this PR already got bloated really REALLY badly due to scope
creep and the number of intersecting systems that rammed into each other
to make this PR possible. So that'll be next. Plus, as I've mentioned,
we open up places for ore processing to find fossils, relics, and other
things that can implemented down the line.

Overall, I don't expect this PR to save or kill ore balance, but we gain
a LOT more control over it through the use of our mining defines
attached to this PR, and at the end of the day, that's a great place to
start off of.

## Changelog

🆑
add: Added ore vents. Scanning them with mining scanners shows what
minerals they contain. Scan again to fight off a horde of beasts as your
drone assistant excavates the vent, so the ore vent will produce mineral
boulders!
bal: Ores that spawn in walls now spawn based on their proximity to ore
vents, with their chance to spawn and their minerals contained scaling
from low to high.
add: Added the BRM, Refinery, and Smelter. These pieces of equipment are
used to process ore boulders into minerals for the station. Stock Part
upgrades allow more boulders to be processed at one time. They collect
mining points as well, to be redeemed with an ID card swipe.
add: Boulders are teleported to the station via the BRM if left
untouched. Boulders can also be cracked open for a reduced amount of ore
using pickaxes or golems hands.
add: All stations come equipt with a pre-excavated ore vent, which
produces a basic supply of iron and glass only. Scan other vents for
your critical resources!
add: Look there's a shit ton of changes on mining, for more detail check
out the Pull Request: https://github.com/tgstation/tgstation/pull/78524.
sound: New sounds and noises for your high octane factorio-like
gameplay!
image: All new boulder sprites for the new minerals and rocks added to
the mining gameplay loop, as well as mining machines!
image: Overlays appear over vents when scanned to let you know their
contents at a glance when actively scanned with any mining scanners.
/🆑

---------

Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-01-21 11:32:05 -05:00
SkyratBot
ab5a4d0f99 [MIRROR] split area.contained_turfs up by zlevel, make init 10 seconds faster (#26161)
* split area.contained_turfs up by zlevel, make init 10 seconds faster (#80941)

## About The Pull Request

Situation: areas have a list of all turfs in their area.

Problem: `/area/space` is an area and has a 6 to 7 digit count of turfs
that has to be traversed for every turf we need to remove from it. This
can take multiple byond ticks just to preform this action for a single
space rune

Solution: split the list by zlevel, and only search the right zlevel
list when removing turfs from areas.

replaces `area.get_contained_turfs()` with a few new procs:

* `get_highest_zlevel()` - returns the highest zlevel the area contains
turfs in. useful for use with `get_turfs_by_zlevel`
* `get_turfs_by_zlevel(zlevel)` - returns a list of turfs in the area in
a given zlevel. Useful for code that only cares about a specific zlevel
or changes behavior based on zlevel like lighting init.
* `get_turfs_from_all_zlevels()` - the replacement for
`get_contained_turfs()`, renamed as such so anybody copying/cargo
culting code gets a hint that a zlevel specific version might exist.
Still used in for loops that type checked so byond would do that all at
once
* `get_zlevel_turf_lists()` - returns the area's zlevel lists of lists
but only for non-empty zlevels. very useful for for loops.

The area contents unit test has been rewritten to ensure any improper
data triggers failures or runtimes by not having it use the helpers
above (some of which ensure a list is always returned) and access the
lists directly.

* split area.contained_turfs up by zlevel, make init 10 seconds faster

* eeyes

* Update area_spawn_subsystem.dm

* Unshits turf contain code slightly (#81023)

Literally just implements my reviews from #80941 
I am frankly a smidge pissed that the pr was merged without them being
handled. No code is worth merging past known issues, and if the author
is just gonna dip then that's life.
I don't like privileging mso on stuff like this, especially because
frankly I'm kinda mad at him rn but also because when a pr is made the
onus on finishing it falls to the person who made it.

Should not need to clean up after someone as a maintainer, and shouldn't
normalize doing it. I'm not like mad at zypher directly mind he offered
to do this too, just the idea he was espousing here.

---------

Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2024-01-21 03:34:23 +00:00
Kyle Spier-Swenson
8703eac50d split area.contained_turfs up by zlevel, make init 10 seconds faster (#80941)
## About The Pull Request

Situation: areas have a list of all turfs in their area.

Problem: `/area/space` is an area and has a 6 to 7 digit count of turfs
that has to be traversed for every turf we need to remove from it. This
can take multiple byond ticks just to preform this action for a single
space rune

Solution: split the list by zlevel, and only search the right zlevel
list when removing turfs from areas.

replaces `area.get_contained_turfs()` with a few new procs:

* `get_highest_zlevel()` - returns the highest zlevel the area contains
turfs in. useful for use with `get_turfs_by_zlevel`
* `get_turfs_by_zlevel(zlevel)` - returns a list of turfs in the area in
a given zlevel. Useful for code that only cares about a specific zlevel
or changes behavior based on zlevel like lighting init.
* `get_turfs_from_all_zlevels()` - the replacement for
`get_contained_turfs()`, renamed as such so anybody copying/cargo
culting code gets a hint that a zlevel specific version might exist.
Still used in for loops that type checked so byond would do that all at
once
* `get_zlevel_turf_lists()` - returns the area's zlevel lists of lists
but only for non-empty zlevels. very useful for for loops.

The area contents unit test has been rewritten to ensure any improper
data triggers failures or runtimes by not having it use the helpers
above (some of which ensure a list is always returned) and access the
lists directly.
2024-01-18 12:16:12 -05:00
SkyratBot
17a7b8f2fb [MIRROR] Starlight Control (Aurora works now, space gas doesn't touch starlight, narsie ending effects) [MDB IGNORE] (#24406)
* Starlight Control (Aurora works now, space gas doesn't touch starlight, narsie ending effects) (#78877)

## About The Pull Request

[Implements a setter for starlight
variables](af34f06b41)

I want to start to modify starlight more, and that means I need a way to
hook into everything that uses it and update it, so we can modify it on
the fly.

This does that, alongside removing space overlays from nearspace (too
many false positives) and making the aurora modify all turfs projecting
starlight, rather then all turfs in an area.

Do still need to figure out handling for the starlight color usage in
turf underlays tho (I gave up, we just keep it static. I'll fix it
someday but the render_relay strategy just doesn't work with its masking
setup)

[Reworks how starlight overlays
work](9da4bc38e2)

Instead of setting color on the overlays directly, we instead store an
object with our current settings in every mob's screen, and
render_target it down onto our overlays.

This lets us update overlay colors VERY trivially. Just need to set
color on the overlay var. Makes modifying starlight a lot cheaper.

It doesn't work on area overlays, because suffering, and it MIGHT induce
extra cost on clients. if it does we can do something about that, we'll
play it by ear

[Removes parallax starlight
coloring.](5f701a1b13)

I'm sorta iffy on the color, the effect can be real oppressive in some
cases, and I'd like to use starlight color for more events in world, and
having it vary can make that looking nice hard.

[Adds some visual effects to narsie being
summoned](a423cfcb2b)

As the rune drawing progresses space (starlight and parallax) go from
normal to greyscale. Then, right about when narsie shows up, starlight
becomes vibrant red.

It's a nice effect. I wanna do more shit like this, I think it'll
improve vibes significantly.
## Why It's Good For The Game

Can't embed it because of github's upload limit, can show a
[link](https://cdn.discordapp.com/attachments/458452245256601615/1160821856358645860/2023-10-08_22-31-22.mp4?ex=65360e99&is=65239999&hm=680e33e4e0026b89e132afc50c04a648a24f869eb662f274a381a5de5c5a36f2&)
for the narsie stuff

Here's
[one](https://cdn.discordapp.com/attachments/326831214667235328/1160813747196141568/2023-10-08_22-34-10.mp4?ex=6536070c&is=6523920c&hm=f8d571d1013da89887f49f3fec99f632251eeeac83085aa7dde97009aee3922f&)
for the aurora too.

This gives us more pretty starlight shit, and the ABILITY to do more
pretty starlight shit. I'm pretty jazzed, and I hope people use this
proc more (keeping in mind that it's pretty hard on the lighting system,
and needs significant delay between changes)
## Changelog

🆑
add: Narsie summoning has had some effects added to space and starlight
del: Removes the link between spacegas color and starlight. It was a
slight bit too vibrant and I think impacted the vibe too wildly to be
incidental.
fix: The aurora event actually... works now. Space lights up and all
that
/🆑

* Starlight Control (Aurora works now, space gas doesn't touch starlight, narsie ending effects)

* Update space.dm

* Update shuttles.dm

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-10-18 01:23:18 -04:00
LemonInTheDark
b77fa8c2a2 Starlight Control (Aurora works now, space gas doesn't touch starlight, narsie ending effects) (#78877)
## About The Pull Request

[Implements a setter for starlight
variables](af34f06b41)

I want to start to modify starlight more, and that means I need a way to
hook into everything that uses it and update it, so we can modify it on
the fly.

This does that, alongside removing space overlays from nearspace (too
many false positives) and making the aurora modify all turfs projecting
starlight, rather then all turfs in an area.

Do still need to figure out handling for the starlight color usage in
turf underlays tho (I gave up, we just keep it static. I'll fix it
someday but the render_relay strategy just doesn't work with its masking
setup)

[Reworks how starlight overlays
work](9da4bc38e2)

Instead of setting color on the overlays directly, we instead store an
object with our current settings in every mob's screen, and
render_target it down onto our overlays.

This lets us update overlay colors VERY trivially. Just need to set
color on the overlay var. Makes modifying starlight a lot cheaper.

It doesn't work on area overlays, because suffering, and it MIGHT induce
extra cost on clients. if it does we can do something about that, we'll
play it by ear

[Removes parallax starlight
coloring.](5f701a1b13)

I'm sorta iffy on the color, the effect can be real oppressive in some
cases, and I'd like to use starlight color for more events in world, and
having it vary can make that looking nice hard.

[Adds some visual effects to narsie being
summoned](a423cfcb2b)

As the rune drawing progresses space (starlight and parallax) go from
normal to greyscale. Then, right about when narsie shows up, starlight
becomes vibrant red.

It's a nice effect. I wanna do more shit like this, I think it'll
improve vibes significantly.
## Why It's Good For The Game

Can't embed it because of github's upload limit, can show a
[link](https://cdn.discordapp.com/attachments/458452245256601615/1160821856358645860/2023-10-08_22-31-22.mp4?ex=65360e99&is=65239999&hm=680e33e4e0026b89e132afc50c04a648a24f869eb662f274a381a5de5c5a36f2&)
for the narsie stuff

Here's
[one](https://cdn.discordapp.com/attachments/326831214667235328/1160813747196141568/2023-10-08_22-34-10.mp4?ex=6536070c&is=6523920c&hm=f8d571d1013da89887f49f3fec99f632251eeeac83085aa7dde97009aee3922f&)
for the aurora too.

This gives us more pretty starlight shit, and the ABILITY to do more
pretty starlight shit. I'm pretty jazzed, and I hope people use this
proc more (keeping in mind that it's pretty hard on the lighting system,
and needs significant delay between changes)
## Changelog

🆑
add: Narsie summoning has had some effects added to space and starlight
del: Removes the link between spacegas color and starlight. It was a
slight bit too vibrant and I think impacted the vibe too wildly to be
incidental.
fix: The aurora event actually... works now. Space lights up and all
that
/🆑
2023-10-17 13:19:12 -06:00
SkyratBot
d9624bdf97 [MIRROR] Multi-Z Support for Lazy Templates | Cleans up some turf flag misuse [MDB IGNORE] (#23794)
* Multi-Z Support for Lazy Templates | Cleans up some turf flag misuse

* Update hilbertshotel.dm

* Modular proc ref

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-09-19 13:26:14 -04:00
Zephyr
1b96345e44 Multi-Z Support for Lazy Templates | Cleans up some turf flag misuse (#77786)
## About The Pull Request

Adds multi-z support for lazy templates
Also fixes some improper use and placement for turf flags
## Why It's Good For The Game

Shadow needs/wants this for bit runner maps.
Turf flags are also why lava has been generating in places it shouldnt.
(inside of ruins)
## Changelog
🆑
fix: Lava can no longer occasionally generate inside of previously
loaded templates and breach and/or destroy shit
/🆑

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-09-19 01:06:08 +00: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
Whoneedspacee
3692ad837b 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>
2023-09-03 06:45:56 +02: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
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
Time-Green
61abab479b Planetary station traits: Forever Storm and Forested (#76957)
Adds two new station traits for Icebox:
**Forever Storm**
The storm on icebox never stops and is more intense. You can wear a coat
and drink coffee and be fine

 **Forested**
Icebox top exterior has a different terrain generator, including way
more grass and trees. AND DEER. Natural chasms are replaced with plasma
rivers

<details>
  <summary>Outside</summary>
  

![image](https://github.com/tgstation/tgstation/assets/7501474/8f5cf57f-9323-473f-9c9b-33192a8777f2)

![image](https://github.com/tgstation/tgstation/assets/7501474/9114fcc5-89b0-46e8-9912-67ad9edf96b8)

![image](https://github.com/tgstation/tgstation/assets/7501474/a5d2cf03-a9a6-4ecf-bbcf-11c39fcacc7d)
(the emissives on the trees have been fixed)
  
</details>

## Why It's Good For The Game

There are no icebox specific station traits, so I added them! The
exterior is very static, samey and could honestly be a lot more
interesting. Having the outside area be varied is something that
freshens up icebox a little! (3x3 icebox is inevitable...)

Forever Storm: I think storms are pretty spooky and cool, and having a
permanent storm can change the ambience a bit and make everyone feel
more isolated. Exploration is not recommended, but you can totally still
go outside at increased risk. Pretty rare and can only happen on icebox

Forested: Forests are dope. It's pretty common for a station trait, but
factoring in that this only happens on icebox, I think it's fair

I've also had to split apart turf and object generation so stuff doesn't
spawn above rivers/chasms anymore. I tested it and I didn't seem to have
broken anything, so that's pretty cool

closes #75154

🆑
add: Adds a Forested planetary station trait! Icebox exterior is now a
forest!
add: Adds a Forever Storm planetary station trait! Sometimes, the storm
never stops. Stay inside or get some coffee and warm clothes
fix: fixes stuff spawning in rivers and above chasms
fix: emissive blockers on random flora not updating
code: Splits terrain generation and terrain population in SSmapping
/🆑
2023-07-29 07:59:34 +00:00
Bloop
b674e72ef1 [MISSED MIRROR] Macros multi-z code, removes the false premise of manual offsets (#76248) (#22531)
* Macros multi-z code, removes the false premise of manual offsets (#76248)

## About The Pull Request

[Removes the pretense of relative multiz
levels](0293fdc2bd)

Our multiz system does not support having a z level that is only
connected one way, or which goes down backwards or anything like that.

That's a fiction of the trait system, the actual backend has never
really supported this.

This pr removes the assumptions we were making backend around this, and
uses that to save cpu time.

I am also converting multiz_levels from an assoc list to a pure one,
which saves significantly on access times and cleans up the code
somewhat.

Also I'm making the get_below/get_above procs into macros, for the sake
of cpu time.

[Converts the starlight disease to use BYOND's directional defines
instead of our
own](7d698f02d9)

To some extent spurred on by
https://github.com/DaedalusDock/daedalusdock/pull/298, tho it was known
before

## Why It's Good For The Game

Faster multiz code, faster init, etc etc etc

* modular files how very dare you

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-07-18 02:28:15 +00:00
san7890
755fa4db6d Loads Away Missions for Unit Testing (#76245)
## About The Pull Request

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.
## Why It's Good For The Game

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.
## Changelog
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)
2023-07-05 19:40:24 -07:00
LemonInTheDark
4d1e34322f Macros multi-z code, removes the false premise of manual offsets (#76248)
## About The Pull Request

[Removes the pretense of relative multiz
levels](0293fdc2bd)

Our multiz system does not support having a z level that is only
connected one way, or which goes down backwards or anything like that.

That's a fiction of the trait system, the actual backend has never
really supported this.

This pr removes the assumptions we were making backend around this, and
uses that to save cpu time.

I am also converting multiz_levels from an assoc list to a pure one,
which saves significantly on access times and cleans up the code
somewhat.

Also I'm making the get_below/get_above procs into macros, for the sake
of cpu time.

[Converts the starlight disease to use BYOND's directional defines
instead of our
own](7d698f02d9)

To some extent spurred on by
https://github.com/DaedalusDock/daedalusdock/pull/298, tho it was known
before

## Why It's Good For The Game

Faster multiz code, faster init, etc etc etc
2023-07-05 18:31:27 -06:00
SkyratBot
4c6567976b [MIRROR] Removes per z level station relays, allows tcomms to reach across interconnected zs [MDB IGNORE] (#22111)
* Removes per z level station relays, allows tcomms to reach across interconnected zs (#76360)

## About The Pull Request

The second layer of tram does not need its own relay, it is like 10 feet
max above the first.
Feels wrong in game, mappers tend to just sneak these off in corners, it
sucks.
Shouldn't need to do it.

Instead, tcomms z levels will be filled based off the z stack, rather
then just the layer itself.

Adds a list/helper to make this more efficient/more easily duplicable

## Why It's Good For The Game

Matches what people expect better, removes redundant map bits, better
vibes.

## Changelog
🆑
balance: Tcomms now works across connected (vertically) zlevels. No more
hunting in maint for the relay.
/🆑

* Removes per z level station relays, allows tcomms to reach across interconnected zs

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: Jolly-66 <70232195+Jolly-66@users.noreply.github.com>
2023-07-04 13:49:01 +00:00
LemonInTheDark
63c365909e Removes per z level station relays, allows tcomms to reach across interconnected zs (#76360)
## About The Pull Request

The second layer of tram does not need its own relay, it is like 10 feet
max above the first.
Feels wrong in game, mappers tend to just sneak these off in corners, it
sucks.
Shouldn't need to do it.

Instead, tcomms z levels will be filled based off the z stack, rather
then just the layer itself.

Adds a list/helper to make this more efficient/more easily duplicable

## Why It's Good For The Game

Matches what people expect better, removes redundant map bits, better
vibes.

## Changelog
🆑
balance: Tcomms now works across connected (vertically) zlevels. No more
hunting in maint for the relay.
/🆑
2023-06-27 22:14:32 -06:00
SkyratBot
3d4b8e19ba [MIRROR] Fix further/MetaStation [MDB IGNORE] (#21944)
* Fix further/MetaStation (#76158)

## About The Pull Request

Typo fixes. Further and fixes MetaStation's default name to match the
JSON.

## Changelog

🆑 LT3
spellcheck: Fixed a few typos
/🆑

* Fix further/MetaStation

---------

Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
2023-06-20 09:32:47 -07:00
lessthanthree
8a8dd8f4b6 Fix further/MetaStation (#76158)
## About The Pull Request

Typo fixes. Further and fixes MetaStation's default name to match the
JSON.

## Changelog

🆑 LT3
spellcheck: Fixed a few typos
/🆑
2023-06-19 23:04:45 -07:00
SkyratBot
fd79c7c9d5 [MIRROR] Makes ruin budget proportional to amount of space ruin z-levels [MDB IGNORE] (#20725)
* Makes ruin budget proportional to amount of space ruin z-levels (#74841)

## About The Pull Request
Adds global define for DEFAULT_SPACE_RUIN_LEVELS and
DEFAULT_SPACE_EMPTY_LEVELS

### Proportional budget
Adds proportional budget to setup_ruins
The budget is multiplied by the current amount of ruin levels over the
default amount
Smaller amounts will have less ruins, while bigger maps will have more
ruins
Should maintain the same amount of ruins per z-level

### Z-levels spawning fix
Z-levels didn't seem to spawn their intended amount of ruins
This was because the for loop added the count variable before doing the
spawning. So for example if there was only 1 level, it would count to 1
and end the loop without spawning the level.
Also removed a loop that seemed to just make the process more complex
for no reason. It even had a note to remove it. However, if it has a use
then you should tell me.

## Why It's Good For The Game

Maps with a smaller amount of ruin levels won't be completely filled
The amount of ruins will be consistent per z-level
The creator of North Star won't allow space exploration unless there's a
way to proportionally reduce the space budget see #74719
## Changelog
🆑
fix: Maps now spawn the correct amount of space levels. The bug caused
them to spawn 1 less in each category
code: The space ruins budget is now proportional to the amount of ruin
levels. This has no effect on the current default maps, but added maps
with less than the default amount of ruin levels will see less ruins.
/🆑

* Makes ruin budget proportional to amount of space ruin z-levels

---------

Co-authored-by: BlueMemesauce <47338680+BlueMemesauce@users.noreply.github.com>
2023-04-23 21:48:37 -04:00
BlueMemesauce
20602ce519 Makes ruin budget proportional to amount of space ruin z-levels (#74841)
## About The Pull Request
Adds global define for DEFAULT_SPACE_RUIN_LEVELS and
DEFAULT_SPACE_EMPTY_LEVELS

### Proportional budget
Adds proportional budget to setup_ruins
The budget is multiplied by the current amount of ruin levels over the
default amount
Smaller amounts will have less ruins, while bigger maps will have more
ruins
Should maintain the same amount of ruins per z-level


### Z-levels spawning fix
Z-levels didn't seem to spawn their intended amount of ruins
This was because the for loop added the count variable before doing the
spawning. So for example if there was only 1 level, it would count to 1
and end the loop without spawning the level.
Also removed a loop that seemed to just make the process more complex
for no reason. It even had a note to remove it. However, if it has a use
then you should tell me.

## Why It's Good For The Game

Maps with a smaller amount of ruin levels won't be completely filled
The amount of ruins will be consistent per z-level
The creator of North Star won't allow space exploration unless there's a
way to proportionally reduce the space budget see #74719
## Changelog
🆑
fix: Maps now spawn the correct amount of space levels. The bug caused
them to spawn 1 less in each category
code: The space ruins budget is now proportional to the amount of ruin
levels. This has no effect on the current default maps, but added maps
with less than the default amount of ruin levels will see less ruins.
/🆑
2023-04-23 17:20:52 -06:00
SkyratBot
8dbb7f8a09 [MIRROR] Fixes lava river genertation (It was broken for 2 YEARS) [MDB IGNORE] (#20205)
* Fixes lava river genertation (It was broken for 2 YEARS) (#74359)

## About The Pull Request

Post 9ee4703133, river generation was
broken
It broke things by moving ruin loading to BEFORE world gen (river gen
happens w ruin loading for convienience), which, since rivers retain
their old area (and world gen is area based), meant that rivers just got
overriden.

I've fixed things by moving river generation to AFTER world gen, since
rivers rely on things like mineral walls existing

## Why It's Good For The Game

If we're gonna spend cpu time on these they should like, exist.
Closes #61371
## Changelog
🆑
fix: Lava and plasma rivers (openspace on icebox too) will generate now.
This was broken for 2 years wtf man
/🆑

* Fixes lava river genertation (It was broken for 2 YEARS)

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2023-03-30 21:56:24 -07:00
LemonInTheDark
1e58c1875d Fixes lava river genertation (It was broken for 2 YEARS) (#74359)
## About The Pull Request

Post 9ee4703133, river generation was
broken
It broke things by moving ruin loading to BEFORE world gen (river gen
happens w ruin loading for convienience), which, since rivers retain
their old area (and world gen is area based), meant that rivers just got
overriden.

I've fixed things by moving river generation to AFTER world gen, since
rivers rely on things like mineral walls existing

## Why It's Good For The Game

If we're gonna spend cpu time on these they should like, exist.
Closes #61371
## Changelog
🆑
fix: Lava and plasma rivers (openspace on icebox too) will generate now.
This was broken for 2 years wtf man
/🆑
2023-03-30 21:21:44 -06:00
SkyratBot
43fde4181e [MIRROR] Saves roughly 20% off living/Life(), makes gravity event based [MDB IGNORE] (#20074)
Saves roughly 20% off living/Life(), makes gravity event based

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-03-27 03:28:03 +01:00
LemonInTheDark
5aab9dd88a Saves roughly 20% off living/Life(), makes gravity event based (#74084)
## About The Pull Request

Right now, each time life processes we need to run has_gravity, and
check its output against a bunch of thresholds.
We could save off that second bit by caching the previous value, but
we'd still be only updating this every 2 seconds.

This potentially delayed updating leads to really janky feeling behavior
around transition points too (like when moving on/off the sand on tram
station)

So instead of doing this updating off life(), let's make it event based.
We'll decompose has_gravity, and take all the values it relies on, and
check for them changing ourselves.
That way we get instant response, and can save all the wasted
has_gravity calls.

This constant checking on movement adds a few signal registrations, a
connect_loc, and some logic on living/Moved

The Moved logic increases Moved's self by 50%, roughly 1 second a round
at worst.
Don't have concrete numbers for the connect_loc

(new self / old self)

![image](https://user-images.githubusercontent.com/58055496/226091990-8cbeef82-6a37-488c-a0b6-cf570156c2dc.png)

In constrast, handle_gravity is currently on average maybe 15 seconds.


![image](https://user-images.githubusercontent.com/58055496/226092056-5fc7fc59-46e2-4e01-a6ee-6867de30c1f0.png)

I could JUST save maybe 13 seconds and not spend the 1 by storing the
previous gravity value, but I think this is worth the ux changes. It
does add some extra resistance to change, but s much nice.

Moved some functions around too, and removed now redundant
update_gravity calls

## Why It's Good For The Game

Snappier gravity, faster Life()

## Changelog
🆑
qol: Human gravity will react to changes instantly, instead of waiting
for the next process tick. Hopefully this feels better and not worse
/🆑
2023-03-25 22:44:27 -06:00
SkyratBot
f141a04600 [MIRROR] Fix pre-round lobby map vote filter [MDB IGNORE] (#19759)
* Fix pre-round lobby map vote filter (#73820)

## About The Pull Request

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

## Changelog

🆑 LT3
fix: Map filter works properly in the pre-round lobby
fix: Map vote doesn't log 'not enough players' if the vote starts in the
pre-round lobby
/🆑

---------

Co-authored-by: tattle <66640614+dragomagol@ users.noreply.github.com>

* Fix pre-round lobby map vote filter

---------

Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: tattle <66640614+dragomagol@ users.noreply.github.com>
2023-03-10 17:47:17 +00:00
lessthanthree
331bc183b5 Fix pre-round lobby map vote filter (#73820)
## About The Pull Request

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

## Changelog

🆑 LT3
fix: Map filter works properly in the pre-round lobby
fix: Map vote doesn't log 'not enough players' if the vote starts in the
pre-round lobby
/🆑

---------

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
2023-03-10 12:49:24 +00:00
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
47839a787e [MIRROR] Meteor events won't try and run on icebox [MDB IGNORE] (#19185)
* Meteor events won't try and run on icebox

* Update mapping.dm

* Update _event.dm

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: lessthnthree <three@lessthanthree.dk>
2023-02-17 01:28:04 -08:00
SkyratBot
1365b9847d [MIRROR] Documents the_station_areas global list, fixes some things which read from it incorrectly [MDB IGNORE] (#19225)
Documents `the_station_areas` global list, fixes some things which read from it incorrectly

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2023-02-15 12:57:21 -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
MrMelbert
d8077e6b11 Documents the_station_areas global list, fixes some things which read from it incorrectly (#73279)
## About The Pull Request

At a glance this list may confuse people, so it should have
documentation.

It contains area typepaths, not area instances. 

Some things got this wrong, fixed those.

Perhaps this list can be changed to be associated `[type] to [area
instance]` - though that brings in some redundancies when it comes to
`areas_by_type`.

Fixes #73298

## Changelog

🆑 Melbert
fix: False alarm radiation leaks should be less obvious
fix: Fixes some traitor objectives from dropping in blacklisted areas,
like security.
/🆑
2023-02-07 16:40:18 -07:00
LemonInTheDark
f88edef0fb Space/Changeturf fixes and optimizations (#73261)
## About The Pull Request

We've got a few space related things that are busted, and shuttle
movement is slow.
I'd like to try to improve these things, if just a bit.

Long list of only tenuously related topics. Sorry for the shotgun blast

#### [Fixes lazyloaded stuff having bad
space](d4de176a63)

We need to handle area transferring in maploading code under niche
cases, and we also need to actually init reservation spaces we create.

It's also redundant and potentially dupe creating to do area lighting
handling in changeturf, because it gets touched in turf init anyway. Old
me is stupid.

#### [Adds some doc comments, yeets
ssmappping/transit](269717145d)

We had a reserved space for just shuttles to use, except it wasn't for
just shuttles.
So in theory if the space got clogged with other shit, the shuttles
could have nowhere to actually use.

It's better to just have the two groups share real estate. More sane

### The "Starlight is Slow" Block

#### [Starlight optimization part one (don't check config for each
individual turf you check for
activity)](7312a314be)

#### [Starlight optimization part two (infer
context)](be94c422ed)

Starlight was causing each space turf to cause itself and its neighbor
to constantly recheck if they had starlight off changeturf.

The exact same effect can be had by taking advantage of some
pre-existing information, namely if the space turf is gaining or losing
a source of starlight.
Essentially, instead of telling a turf to check all adjacent turfs to
see if it's got starlight, we tell the turf if WE are a source of
starlight, or if we might be taking something away from it.

There's a bit of wasted cpu here but not much, if it's worth doing a
register signal pattern for clearing depends on the case we're working
with.

Being intelligent about this makes things much faster, something in the
neighborhood of 4 to 3 fold.
I've also made openspace's starlight work better, cause the old pattern
was a bit silly.

### Changeturf is Annoying (Microops)

#### [Micro ops changeturf and turf deletion a
bit](386b3ab7fc)

Don't do work if the thing you're working on doesn't exist, don't check
every adjacent turf for firelocks on turf change (just have thefirelocks
manage that), don't check all atoms on the turf for decals on turf
change, similar.
Also moves visibility changes from camera code into changeturf, to avoid
unneeded work.

Needs some extra work to optimize the guts for this path but I can do
that!

#### [Micros camera vis
changes](ebab69e9ea)

We should only update vis when our opacity changes. 
In addition, we don't need all the camera handling fluff if we only want
to update our turf's static groups.

Also micros a camera net helper to be less crap for non multiz maps

#### [Micros some open space atmos cases, alongside avoiding a for(null)
in opacity
handling](72ae07ba1d)

#### [Ensures space_lit tiles never accidentially inherit lighting
objects](a99ff2265a)

S dumb, and leads to space turfs having two sources of lighting, which
looks wrong.
This was invisible when their lighting was fullbright, but it sucks now.


### Misc Stuff

#### [Cleans up stat tracking a bit to avoid
collisions](40fb8f21e2)

#### [Cleans up a turf helper to not be
stupid](bf4ee67100)

WHY ARE YOU USING THE RANGED TURF HELPER IF YOU GO ONE TILE

#### [Moves transit turf signal cleanup to destroy, I named this proc
wrong](c85c2cfc86)

I'm sorry @Time-Green 

#### [Adds better transit caching to
shuttles](35e85334c4)

Adds a max reserved transit size to the shuttle subsystem, to keep
things in bounds.
In addition, adds a soft cap under which existing transit space will get
hold onto, to make repeated non escape/arrive shuttle movements faster

Hopefully this makes common shuttle moves less bad.
## Why It's Good For The Game

Speed
2023-02-06 23:04:50 -05:00
Jacquerel
cfb2d9feb9 Meteor events won't try and run on icebox (#73241)
## About The Pull Request

While I was trying to improve changeling meteor spawning on Icebox I
noticed that several other meteor-like events don't seem to be blocked
on Icebox either even though they don't do anything.
I added a new capability to events which can prevent them being loaded
under certain map conditions (specifically: whether the map is in space
or not). Currently there's no events which _only_ run on a planet but,
now someone could add one I guess?

Now all of the events which spawn meteors are filtered out on icebox and
you can't absent-mindedly try to trigger them.

![image](https://user-images.githubusercontent.com/7483112/216799539-f843bdf6-c70f-4815-a355-0b297acad1a6.png)

Also a couple of dynamic options had this applied too, chiefly ones
which expect you to be able to fly a space ship to the space station.

## Why It's Good For The Game

These events shouldn't run on Icebox (or soon, Chilled) because they
don't do anything there.
AFAICT Meteors were getting as far as trying to spawn, then would retry
trying to find space tiles which didn't exist until they failed 10
times, then give up. Once per every meteor it tried to spawn. Gross.

## Changelog

🆑
fix: Meteors can't be triggered automatically or manually on Icebox,
where they do nothing.
fix: Hacking a comms console as a traitor won't try to summon meteors or
pirates to Icebox, where they do nothing.
/🆑
2023-02-05 19:19:28 -07:00
Mothblocks
d67555a0b5 the inevitable Revert "Refactors admin verbs from giant ass lists into datums" in case stuff breaks (#73206)
Reverts tgstation/tgstation#72407
2023-02-05 11:44:38 +13:00
Zephyr
fca90f5c78 Redoes the admin verb define to require passing in an Admin Visible Name, and restores the usage of '-' for the verb bar when you want to call verbs from the command bar. Also cleans up and organizes the backend for drawing verbs to make it easier in the future for me to make it look better (#73214)
## About The Pull Request

Damn that's a long title.

Admin Verbs can be used in the verb bar with hyphens instead of spaces
again.
## Why It's Good For The Game

Admin muscle memory
## Changelog
2023-02-04 01:20:18 -08:00