Commit Graph

3628 Commits

Author SHA1 Message Date
san7890
c403a6eccc Wraps lowertext() to ensure proper stringification. (#82442)
## About The Pull Request

Fixes #82440

This PR just creates a new macro, `LOWER_TEXT()` (yes the irony is not
lost on me) to wrap around all calls of `lowertext()` and ensure that
whatever we input into that proc will be stringified using the `"[]"`
(or `tostring()` for the nerds) operator. very simple.

I also added a linter to enforce this (and prevent all forms of
regression) because I think that machines should do the menial work and
we shouldn't expect maintainers to remember this, let me know if you
disagree. if there is a time when it should be opted out for some
reason, the linter does respect it if you wrap your input with the
`UNLINT()` function.
2024-04-10 12:19:43 -07:00
Thunder12345
920f2c6442 Explosions Part I - Directional Explosions (#82429)
## About The Pull Request

Adds the ability for explosions to be directional. This is achieved by
adding an angle check to `prepare_explosion_turfs()` to drop any turfs
outside the cone of the explosion. If the arc covers a full 360 degrees,
as is the default, it will accept all the turfs without performing the
angle check.

Uses this functionality to rework both rocket launcher backblast and X4
explosions. Rocket launcher backblast has been changed from a shotgun of
indendiary bullets to a directional explosion of similar length. X4 now
uses a directional explosion to "ensure user safety".

Apparently the old method of moving the explosion one tile away didn't
even work, as it blew up `target` before trying to check its density for
the directional behaviour.

https://youtu.be/Mzdt7d7Le2Y

## Why It's Good For The Game

Directional explosions - Useful functionality for a range of potential
use cases, which can be implemented with minimal extra processing cost
(Worst case scenario being very large directional explosions)

Backblast - Looks way cooler than a bunch of projectiles, and should be
significantly more functional in high-lag situations where projectile
code tends to get fucky

X4 - More predictable for players wanting to use it as a breaching
charge, you can actually stand near the charge and not have to worry
about being hoist upon your own petard.

## Changelog
🆑
add: Added support for directional explosions.
add: Rocket launcher backblast is now 271% more explosive, check your
six for friendlies!
add: X4 charges now explode in a cone away from the user when placed on
a sufficiently solid object.
fix: X4 charges will now behave correctly when placed on dense atoms
(note: don't try to read a variable from an atom you just blew up)
/🆑
2024-04-09 20:26:08 +02:00
John Willard
5e9ce5ab99 New Battle Arcade (#81810)
## About The Pull Request

Remakes Battle Arcade from just about the ground up, with exceptions
taken for emagged stuff since I didn't really want to touch its
behavior.

The Battle Arcade now has stages that players can go through, unlocking
a stage by beating 2 enemies and the boss of the previous one, but this
must all be done in a row. You can choose to take a break between each
battle and there's a good chance you'll sleep just fine but there's also
a chance it can go wrong either through an ambush or robbery.

The Inn lets you restore everything for 15 gold and you can buy a sword
and armor, each level you unlock is a new sword and armor pair you can
buy that's better than the last, it's 30 gold each but scales up as you
progress through levels. They are really worth getting so it's best to
try to not lose your money early in.

The battle system is nearly the same as how it was before but I removed
the poor combo system that plagued the old arcade as one big knowledge
lock, now it's more just turn based. The game is built on permadeath so
dying means you restart from the beginning, but if you are going to lose
you can try to escape instead which costs you half of your gold.

Getting to higher levels increases the difficulty of enemies but also
increases the gaming exp rewards which could make this a better way to
get exp if you can get good at it.

Gaming EXP is used to increase chances of counterattacking but doesn't
give any extra health to the player.

I also removed the exploit of being able to screwdriver arcade cabinets
because people would do that if they thought they were on the verge of
losing to bypass the effects of loss. I instead replaced it with a new
interaction that the Curator's display case key can be used to reset
arcade cabinets (there's several keys on the chain so it made sense to
me), which I added solely because I thought Curators would be the type
of person to have run an actual arcade.

This is some gameplay

https://github.com/tgstation/tgstation/assets/53777086/499083f5-75cc-43b5-b457-017a012beede

As a misc sidenote, I also split up the arcade file just like how Orion
Trail was before, just for neat code organization.
The Inn keeper is straight up just a photo of my localhost dude, he's
not a player reference or anything it's not my actual character.
I also have no idea how well balanced this is cause I suck at it lol.

## Why It's Good For The Game

Battle Arcade is one of 3 last machines in my hackmd here to turn into
TGUI https://hackmd.io/XLt5MoRvRxuhFbwtk4VAUA?view
I've always thought the current version of battle arcade is quite lame
and lacks any progression, like Orion Trail I thought that since I was
moving this to TGUI, it would also be a perfect opportunity to revamp it
and try to improve on where it failed before, especially since the
alternative (NTOS Arcade) is also lame as hell and is even lamer than
HTML battle arcade (spam mana, then spam health, then just spam attack,
rinse and repeat).
This will hopefully be more entertaining and give players sense that
they are getting through a series of tasks rather than doing one same
one again and again.

## Changelog

🆑 JohnFulpWillard, Zeek the Rat
add: Battle Arcade has been completely overhauled in a new progression
system, this time using TGUI.
add: The Curator's keys can now reset arcade cabinets.
balance: You now need to be literate to play arcade games, except for
Mediborg's Amputation Adventure.
fix: You can no longer screwdriver emagged arcade consoles. Accept your
fate.
fix: Silicons can no longer play Mediborg's Amputation Adventure.
/🆑

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
2024-04-08 23:24:27 +00:00
Jacquerel
f47733d0e3 Final Objective: Battle Royale (#82258)
## About The Pull Request

Adds a new final objective option with a classic premise; the forced
battle to the death.
The concept is that the Syndicate will provide you with an implanter
tool you can use on an arbitrary number of crew members. Once you have
at least 6 (though there is no ceiling) you can activate the implants to
start the Battle Royale and broadcast the perspectives of everyone you
implanted live to the entertainment monitor.

After activation these implants cause you to explode upon death. If at
the end of 10 minutes, more than one person remains unexploded then all
of the remaining implants will detonate simultaneously.
Additionally, one of the station's departments (Medbay, Cargo, Science,
or Engineering) will be chosen as the arena. If after 5 minutes pass
you're not within that department (or if you leave it after that time
has passed) then you will be killed.

The Syndicate plan on both using the recorded footage to study
Nanotrasen technology, and also to sell it as an underground blood
sport, and so have employed a pirate broadcasting station to provide
colour commentary.

The implantation is silent, however it requires you and your target to
be adjacent and stood still for one and a half seconds.
Once implanted, it will occasionally itch and eventually signal to the
implantee that something is up, so once you start implanting someone
you're on a soft timer until you are given away. You can also implant
yourself if you want to do that for some reason.

Removing an implant from someone has a 70% chance of setting it off
instantly, but it _is_ possible. If the implant is exposed to EMP, this
value is randomised between 0 and 100%. You could also try doing surgery
while the patient is wearing a bomb suit or something, that puzzle is
for you to solve and I'm not going to tell you the answers. I'm sure
you'll think of ones I haven't.

## Why It's Good For The Game

Adds a somewhat more down-to-earth but still hopefully exciting and
threatening option which should let people mess around with the sandbox.
The mutual death element provides some roleplaying prompts; nothing
actually _forces_ you to fight apart from fear of death and it may be
possible to find other ways to survive, or perform some kind of
solidarity behaviour with your fellow contestants. Maybe you'll try that
but one of your fellow contestants just wants to be the last survivor
anyway. Maybe you'll pretend you're setting up some kind of mutual
survivorship thing in order to make sure you're the sole survivor.
Gives some people to watch on the bar TV channel.
The crew apparently love playing Deathmatch while dead so we might as
well enable doing it while alive.

Also I'm going to follow this up with a separate PR to remove the Space
Dragon objective and it felt like it'd be a good idea to do one out one
in

## Changelog

🆑
add: Adds a new Final Objective where you force your fellow crew to
fight to the death on pain of... death.
/🆑
2024-04-07 16:37:40 -07:00
Jeremiah
9723b4b317 Replaces even more deciseconds with SECONDS (#82438)
## About The Pull Request
Using these search regexes:

Ending in 0:
`addtimer\((.*),\s?(\d{1,3})0\b\)`
replacement:
`addtimer($1, $2 SECONDS)`

Two digit ending in odd:
`addtimer\((.*), (\d)([1-9])\)$`
replacement:
`addtimer($1, $2.$3 SECONDS)`

Single digit ending odd:
`addtimer\((.*), ([1-9])\)$`
replacement:
`addtimer($1, 0.$2 SECONDS)`

## Why It's Good For The Game
Code readability

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-04-06 15:18:49 -06:00
John Willard
a15a1b88ed Basic mobs now use z-level turnoff instead of simple (#82469)
## About The Pull Request

On one compile of MetaStation, I saw that there's 45 basic mobs on the
station, 256 on lavaland (the number growing from tendrils), and 59 in
all other z levels combined.

While we do expect Lavaland to be visited every round, at least it won't
be running during the times when no one is there, but even more
importantly, space exploration is something not done every round, so we
don't have any reason to waste our resources on AIs that will never be
interacted with.

Simple animals had an easy solution to this:
If no one is on the Z level, their AI turns off
If someone is on the Z level, they are idle unless needed.

The last simple animals that exists right now are bots, megafauna,
geese, gondolas, and some minor ones like mimic, zombie, dark wizard,
soulscythe, etc.
Point is, we're very much nearly done going through all simple animals,
so this code is being wasted just to ensure things like cleanbots won't
work if no one is on the z level, something I doubt happens often, so I
took their code and made it work for basic mobs instead. I could've done
both but I thought it would look very bad, and maybe this is a good
incentivize to get more basic mob conversions.

There's one major change here and it's that we're missing the "Idle"
mode, some basic mobs like the Lavaland village seems to be made with
intent that they'll be running even if players aren't around, so this
sets up a future PR that makes idle AI easier to add, and I want to make
sure those cases are taken into account.

## Why It's Good For The Game

We don't need to always be processing these basic mobs, and sets us in
the future to hopefully also implement idle AIs.

## Changelog

🆑
balance: Basic mob AIs with no mobs on the Z level now stop.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2024-04-06 15:17:53 -06:00
SyncIt21
c4adbf877e Clamps material market quantities & prices during cargo operations (#82338)
## About The Pull Request
- Fixes #82329

Cargo operations means buying & selling materials on the market. Now
both their prices & quantities are clamped during these operations

Also increased the width of materials market UI so large numbers don't
overflow to the next line.

## Changelog
🆑
fix: buying & selling huge quantities of materials on the market won't
cause their prices & quantities to go beyond bounds.
/🆑
2024-04-02 19:38:59 +02:00
san7890
0bb6a27955 Give Error Messages On Subsystem Initialization Failure CI (#82139)
## About The Pull Request

Noticed during #82138

Basically, the unit test that makes sure that all of the subsystems that
had to initialize properly initialized is good with the Notice
annotation, but it had a flaw - it didn't tell you _why_ the subsystem
failed to initialize:


![image](https://github.com/tgstation/tgstation/assets/34697715/3cd719d2-2f1f-42a9-8c36-d5c37b8a330c)

Basically this PR just adds a variable, `initialization_failure_message`
(i have it on good authority that variables that don't get changed from
their compile time variable don't take up extra memory), and we just
append the failure message to this notice should it occur so all of the
information is available in one spot, rather than have the coder dig
through the CI Run Log to figure out what the specific error was should
it occur on something that isn't SSlua.

also small cute code cleanup :3
2024-04-02 05:32:46 -04:00
Kyle Spier-Swenson
8628cbc54e Refactored admin backup saving. No longer at round end, more data backed up (#81891)
Admin verified connections now cache all verified connections for all
admins. (Rather then just the last connection data of the currently
connected admins)

Sync with the db now happens at admin load time, not at round end. (this
was causing annoyances because servers with long rounds could override
the admin db with old/stale data overwritting the fresher data that was
written by a server with a shorter round)

Fix backup verification not working if the db thinks it still connected
but its not actually still connected.

@Mothblocks @Jordie0608

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2024-04-02 05:50:12 +00:00
Profakos
b20c982404 Converts slimes to basic mobs (#82176)
## About The Pull Request

After months of preparation, and further months of work, I am finally
done. Please bear with me, as this is a massive refactor, but I have
already atomized everything I could. This is now ready for review.

General

- 	The hilbert hotel slimes are now a subtype instead of a varedit.
- The `use_mob_ability` subtree now also accepts non cooldown abilities.
If set_behaviours is set up properly, mobs won't keep continously
triggering it as if it were a 0 second cooldown action. The alternative
would have been turning the slime abilities into cooldown abilities.
- Wrestling off a slime now signs up to the `COMSIG_ATOM_ATTACK_HAND`
signal, instead of being part of attack_hand.
- Adds datum/ai_controller/controller as a fourth, optional argument to
`/datum/ai_behavior/find_hunt_target/valid_dinner()` to make it possible
to access blackboard keys.
- Slimes no longer attack windows if they would accidentally move into
them (when the conditions are met), since random walk behaviour ignores
tiles they can't go in. It was also not worth to keep. Did you know this
was the sole override of `ObjBump()`?
- Examine was made less snowflaky/bespoke. Also added a new element:
`/datum/element/basic_health_examine`, which is a simple bespoke element
that prints out a custom message based on how damaged the basic mob it
is attached to is.
- Slimes only perform knockdown instead of paralysis, as they can attack
more often now, and paralysis is not that fun.
- LAssailant has been removed due being archaic code. To befriend a
slime, you have to spawn a monkey with the slime console, or feed them a
sheet of plasma. Simple grabbing the monkey or stuffing them in
disposals do not work anymore. Slime console spawned monkeys will have a
visible status effect, with pheromones coming off them to make this
clearer.

Actions
- 	Feeding, reproduction and evolution is no longer a verb.
- Slime feeding is no longer an action button. You have to use right
click, or as previously, mousedrop. Slimes can always unbuckle from mobs
they are attached to.

Hunger 

- Instead randomly changing the starvation and max nutrition values
while growing up, evolution costs 200 nutrion. This makes the code more
readable, and behaviour more predictable, while still giving the
intended time between evolving and splitting. As a result, I could also
turn these into defines.
- Added a component that handles doing an effect over time while buckled
to a mob, until the mob dies or you get unbuckled.
- Slimes gained nutrition is no longer randomly multiplied by the damage
config value, but rather gain nutrition equal to twice the damage dealt.
You'll have to eat one monkey to evolve, just as before.
- Slimes do not heal passively. They only heal from eating. It was a
rather miniscule value that did not have much effect.
- Slimes generate electricity from hunger threshold, instead of the
random amount of hunger threshold + 100.

Environment

- Slimes take 15 damage from cold every second, instead of using a
complex formula (that also decreased the damage up to a point?).
- Slimes still heal from burn damage, but this is now set on the damage
coefficient list.
- Slimes instead of getting stunned by the cold, freeze in an ice cube.
BZ instead of setting them unconscious, calls the stasis status effect,
allowing you to safely stash your hungry slimes for later. They also no
longer slow down from the cold, as they are already slowed down by the
damage they get. Conversely they no longer get a speed up from a random
amount of temperature. I could be convinced to readd this either as part
of the basic sensitive component, or a similar one.

AI
- Removed the attacked_stacks system. Slimes will just perform regular
retaliation if you hit them in a harmful manner.
- Slimes now use the pet orders component. They will interrupt their
feeding when given a command by their master.
- Slimes have their own subtrees. I tried to replicate as much as I
could from the old code, dividing ancient code artifacts and intentional
stuff, so there might be some weirdness.
- Slime speech has been almost fully reduced to basic blorbing, as you
can not even understand them anymore, and most of them require the slime
to loop through all of their surroundings.
- Discipline does not have stacks either. Disciplined baby slimes have a
chance to clear their attack and hunt blackboard keys. All slimes will
stop feeding on the target otherwise.
- Since discipline is not a stack, rabidity instead gets removed at a
10% chance per disciplining.
- 	Slimes faces are a bit more randomly picked now.

## Why It's Good For The Game

- We want to convert all simple animals to basic mobs. Old slime code
was also very strange, and had some systems that have been replicated by
components.
- Slimes fully paralyzing you is not fun at all. Knockdown should give
you a fighting chance when a slime would like to eat you.
- Slimes slow down from the heavy damage they get from the cold, so I
don't think they need extra slowdown, nor do they need to speed up from
warmth, as they are already fast.
- Slimes turning into an icecube instead of becoming paralyzed from the
cold is more fun for the slimes, as they can break out for a few
moments. It is also funny.
- Slimes entering proper stasis from BZ is not just a visual indicator
of a slime that is safe to approach, but also keeps the slimes's hunger
value in check, allowing it to not starve while stopped. They can also
look around and blorble, instead of staring at a black screen, if player
controlled.
- The attack_stack and discipline_stack behaviours were rather
overcomplicated, and the xenobio mains I talked with didn't even know it
was a thing, so I argue it needed simplification.
- The bespoke friendship system of slimes was also too complicated.
Slimes slowly gained levels of trust, and at certain levels commands
costed friendship, and other levels, they did not. The binary friend/not
friend system that everything else in the game uses is much more
sensible.
- Using right click for feeding is much more sensible than using an
action, and then picking someone from a dropdown.
- Slime speech was very soulful but not only did it loop through
everything in sight, you couldn't even understand it unless you spoke
slime. Maybe it can be readded later in a different form.
- Slime's passive healing was miniscule, and having them rely on feeding
is more interesting.

also
fixes #81463

## Changelog

🆑
refactor: Slimes are now basic mobs. Please report any strange
behaviours!
balance: Slimes only stun you for two seconds when they shock you, the
rest of the duration is a knockdown.
balance: Slimes are not stunned from the cold, but rather, get frozen in
a freon icecube. BZ also puts them in complete stasis, instead of making
them unconscious. Their speed is likewise unchanged by temperatures.
balance: Slimes do not passively heal, they instead rely on feeding.
fix: Slimes can use the buckling screen alert to unbuckle and stop
feeding, along with clicking on the mob they are riding
/🆑
2024-03-27 16:40:52 -06:00
Ghom
95b7fa1fb7 Add a unit test to check that maploaded simple/basic mobs are in an environment they can survive in. (#82180)
## About The Pull Request
I've recently noticed that the maploaded penguins from the snowdin away
mission were dying from unsafe atmos/temperature. This sparked the idea
of making a (focus only) unit test that would prevent this sort of
issues from happening.

This PR also implements the usage of the `atmos_requirements` and
`body_temp_sensitive` elements for simple animals too, cutting down the
copypaste.

## Why It's Good For The Game
More unit tests to make sure things are done correctly.

## Changelog

🆑
fix: Made sure that mapped critters (i.e. penguins on the snow cabin
away mission) can survive in the environment they're spawned in.
/🆑
2024-03-27 16:01:56 -06:00
John Willard
762779f3f2 Adds a photobooth (#82105)
## About The Pull Request

Adds a photobooth machine to the HoP line which can be used to update
your security records photo.
It updates the records of the person's name, which means hiding your
identity and wearing an ID will let you change other people's photos. If
you aren't hiding your identity and are wearing someone else's ID, it
won't update at all because it will be unable to find your record.
There's 2 variants of this machine, one at the HoP line that's tied
behind Law Office access (so Lawyers have an extra thing they can help
out with if no one's available, but maybe it would be better behind
Library access since Curators are our "photographer" role?), and the
Security one that requires Security access.
The Security one has a special feature that it adds a height chart
behind the player.

![image](https://github.com/tgstation/tgstation/assets/53777086/c4eb0661-d752-4052-8006-2898af78c528)

This machine is used by either right-clicking on it or by pressing a
button, so the HoP can do it remotely from their line (except on Tram
where it's in the library), and after a few delays it'll update your
records automatically to how you look like.

Emagging the machine will remove its access restrictions but every time
it updates your photos it will spam camera flashing and blind you.

Sprites

Open

![image](https://github.com/tgstation/tgstation/assets/53777086/d5e97d84-46d8-40b5-995f-c0ef5c7f18ac)
Closed

![image](https://github.com/tgstation/tgstation/assets/53777086/520e88ed-4630-40d8-9039-4c6dd85a9872)
Security version on the left, has a red tint on it

![image](https://github.com/tgstation/tgstation/assets/53777086/ef71a092-8d1b-4776-bdb4-6718308967c7)

Video demonstration (old sprites):


https://github.com/tgstation/tgstation/assets/53777086/a2e59f08-2d58-4f5b-b081-e137c7606d35

## Why It's Good For The Game

Current security records has no way to change your photo ID, something
that was a feature before it was moved to TGUI. The only alternative is
to fully delete your record and make a new one with a photo and the same
name, but this shares a major issue with the HTML UI: You're immediately
sold out by the fact you have a background. No matter how well you try
to cover your tracks, any security officer looking at records will see
you are the only photo on the manifest that has a background and even a
camera in your hand, which makes it impossible to get away with it
unless security essentially takes pity on you.
This opens up the ability to fully mask yourself in records, finally.

This is also better even for non antagonists because you can now
properly update your photos to match what you look like in the event of
an appearance change or even just a job change, which makes it a benefit
for HoPs who likes to keep records as up-to-date as possible.

## Changelog

🆑 JohnFulpWillard, Twox
add: Added a new photobooth machine to the HoP's line.
fix: Things checking for access now checks your off hand, too.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-03-27 17:58:01 +13:00
Rhials
a066fd3be4 Adds dynamic blob/obsession to ghost popups, removes third rail popup, tweaks supply pod popup (#82234)
## About The Pull Request

Three changes to ghost orbit popups. Let's check them one-by-one.

First off -- The obsession awakening and blob host midrounds now have a
ghost popup when summoned via Dynamic. They already have them when
summoned by a random event roll, so this is mostly just bringing the two
different spawn methods in line with each other. None of the other
midround dynamic picks (autotraitor, revs, etc) have had this added,
because they're less focused on spectacle and require more mystery to
function properly.

Second -- The electrified railings on the tram no longer notify ghosts
every time someone gets shocked. Electrocute_act is called on anything
that passes by it, and the popup would be thrown regardless of whether
or not they've "fallen in the path of an oncoming tram" or not. Making
it check if the electrocute_act actually successfully stunned a player,
and that they're about to be hit, would probably require an unwieldy
rewrite to the behavior that I'd rather not resort to. I brought this
helper call into this world, and now I'm taking it out.

Lastly -- The supply pod random event can now be properly jumped to.
Originally, it would track the landing indicator, which would delete
almost immediately and leave an un-orbitable popup on your screen. Now
you jump to the landing zone, regardless of when you click the toast
popup.

This is really long PR body for such tiny changes please don't think
this is anything more than it actually is.
## Why It's Good For The Game

Minor improvements to some ghost orbit popups, because Observers are
players too!
## Changelog
🆑
qol: Dynamic midrounds "Obsession Awakening" and "Blob Host" now have
ghost orbit popups, so you can see them happening in real time.
qol: There is no longer a ghost orbit popup for players being shocked by
an electrified tram rail.
qol: The Stray Cargo orbit popup no longer has a half-second window to
orbit before it becomes useless.
/🆑
2024-03-26 20:03:06 -06:00
Pickle-Coding
c1f11f26ce Converts arbitrary energy units to the joule. Fixes conservation of energy issues relating to charging cells. (#81579)
## About The Pull Request
Removes all arbitrary energy and power units in the codebase. Everything
is replaced with the joule and watt, with 1 = 1 joule, or 1 watt if you
are going to multiply by time. This is a visible change, where all
arbitrary energy units you see in the game will get proper prefixed
units of energy.

With power cells being converted to the joule, charging one joule of a
power cell will require one joule of energy.

The grid will now store energy, instead of power. When an energy usage
is described as using the watt, a power to energy conversion based on
the relevant subsystem's timing (usually multiplying by seconds_per_tick
or applying power_to_energy()) is needed before adding or removing from
the grid. Power usages that are described as the watt is really anything
you would scale by time before applying the load. If it's described as a
joule, no time conversion is needed. Players will still read the grid as
power, having no visible change.

Machines that dynamically use power with the use_power() proc will
directly drain from the grid (and apc cell if there isn't enough)
instead of just tallying it up on the dynamic power usages for the area.
This should be more robust at conserving energy as the surplus is
updated on the go, preventing charging cells from nothing.

APCs no longer consume power for the dynamic power usage channels. APCs
will consume power for static power usages. Because static power usages
are added up without checking surplus, static power consumption will be
applied before any machine processes. This will give a more truthful
surplus for dynamic power consumers.

APCs will display how much power it is using for charging the cell. APC
cell charging applies power in its own channel, which gets added up to
the total. This will prevent invisible power usage you see when looking
at the power monitoring console.

After testing in MetaStation, I found roundstart power consumption to be
around 406kW after all APCs get fully charged. During the roundstart APC
charge rush, the power consumption can get as high as over 2MW (up to
25kW per roundstart APC charging) as long as there's that much
available.

Because of the absurd potential power consumption of charging APCs near
roundstart, I have changed how APCs decide to charge. APCs will now
charge only after all other machines have processed in the machines
processing subsystem. This will make sure APC charging won't disrupt
machines taking from the grid, and should stop APCs getting their power
drained due to others demanding too much power while charging. I have
removed the delays for APC charging too, so they start charging
immediately whenever there's excess power. It also stops them turning
red when a small amount of cell gets drained (airlocks opening and shit
during APC charge rush), as they immediately become fully charged
(unless too much energy got drained somehow) before changing icon.

Engineering SMES now start at 100% charge instead of 75%. I noticed
cells were draining earlier than usual after these changes, so I am
making them start maxed to try and combat that.

These changes will fix all conservation of energy issues relating to
charging powercells.
## Why It's Good For The Game
Closes #73438
Closes #75789
Closes #80634
Closes #82031

Makes it much easier to interface with the power system in the codebase.
It's more intuitive. Removes a bunch of conservation of energy issues,
making energy and power much more meaningful. It will help the
simulation remain immersive as players won't encounter energy
duplication so easily. Arbitrary energy units getting replaced with the
joule will also tell people more meaningful information when reading it.
APC charging will feel more snappy.
## Changelog
🆑
fix: Fixes conservation of energy issues relating to charging
powercells.
qol: APCs will display how much power they are using to charge their
cell. This is accounted for in the power monitoring console.
qol: All arbitrary power cell energy units you see are replaced with
prefixed joules.
balance: As a consequence of the conservation of energy issues getting
fixed, the power consumption for charging cells is now very significant.
balance: APCs only use surplus power from the grid after every machine
processes when charging, preventing APCs from causing others to
discharge while charging.
balance: Engineering SMES start at max charge to combat the increased
energy loss due to conservation of energy fixes.
/🆑

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-03-23 16:58:56 +01:00
Ghom
4a3942677a [NO GBP] Fix curators not getting a cut from patronized paintings in a better way (#82159)
## About The Pull Request
I'm giving all the credits of this PR to the creator of #82153. The
reason I'm making this PR is because, while the other fix work too, I
believe this one is perhaps better so that we won't have to call
`SSjob.GetJobType(jobtype)` everytime we want to access or make use of
the `bank_accounts_by_job` variable.

## Why It's Good For The Game
See title, also the other PR if you want a more indepth explaination of
relatively simple stuff.

## Changelog
🆑 00-Steven
fix: Fixed patronizing paintings not giving a cut to the curators.
/🆑
2024-03-22 21:12:59 -06:00
Ghom
5fb0088983 Fixes the LTSRBT
I borked it in the blackmarket refactor. It was constantly on cooldown
when idle. Also, some logic mistakes.
2024-03-22 22:03:54 +00:00
Watermelon914
fe3c2edddd Moves lua off of the timer subsystem and onto its own internal scheduler. (#82131)
## About The Pull Request
Lua uses the timer subsystem, which can end up holding the entire timer
subsystem if lua is creating a lot of timers.
The solution to this is to use an internal scheduler instead so that the
load gets placed onto the lua subsystem.

## Why It's Good For The Game
Performance improvement when using lua scripts.

## Changelog
🆑
refactor: Auxlua no longer uses the timer subsystem to get stuff done,
lua scripts shouldn't slow down timers anymore.
/🆑

---------

Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2024-03-22 10:59:16 +13:00
Bilbo367
9fa40f4f1d DeathMatch Rolling Antag Fix (#82030)
## About The Pull Request

Gives Deathmatch players the TRAIT_TEMPORARY_BODY which is checked
during antag rolls while trimming candidates.

## Why It's Good For The Game

Closes https://github.com/tgstation/tgstation/issues/81725

## Changelog

🆑
fix: Deathmatch players should no longer be able to roll any midround
antagonist.
/🆑

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2024-03-17 21:49:11 +01:00
MrMelbert
c7b2e2be50 Fix polling mutating its target's plane and layer (#82009)
## About The Pull Request
This PR fixes polling for an atom causing its plane and layer to mutate

```dm
		var/mutable_appearance/picture_source = alert_pic
		poll_image = picture_source
```
```dm
		poll_image.layer = FLOAT_LAYER
		poll_image.plane = poll_alert_button.plane
```
See the issue?

Passing an atom as an `alert_pic` would set `poll_image = alert_pic`
which would in turn change `poll_image`'s plane and layer

This is supposed to be `new(alert_pic)`, to make a mutable appearance
*based on* the atom's appearance.

I also did a minor bit of cleanup

## Changelog

🆑 Melbert
fix: Fixes polling for things causing said things to have their planes
and layers screwed up (causing random objects or mobs to appear above
runechat and blindness, for example)
/🆑
2024-03-15 14:01:21 -06:00
ArcaneMusic
9802508ab9 Adds logging to SSore_generation on subsystem initialize (#81488)
This PR adds a new logging category and a logging message specific to
SSore_generation's initialize, logging the number of vents of each size,
as well as the number of random and proximity based ore spawns due to
cave generation and map generation.

Currently drafted as I could use some feedback as to why I'm not seeing
the logger.log() messages not appearing on any of the current in-game
log files 👍

Useful for data logging to determine how many of each type of ore is
spawned on the map, for the purposes of determining how much ore is
being spawned manually over the automatic amounts based on the vents,
with the quantity of ores spawning being a product of the ore vent sizes
being logged as well.
2024-03-14 21:25:50 +00:00
John Willard
bd8c1aebff Instrument editor now uses TGUI (#81923)
## About The Pull Request

Instruments now use TGUI as their editor which is pretty cool.
It's mostly a 1:1 remake of the HTML UI except I did make a change to
make the playback options a little more compact, leaving some more space
for the editor before you have to scroll, and some other minor things
that were made to make the UI hopefully nicer to look at and mess with.

When there's a song to play - While playing, Repeat section can't be
edited

![image](https://github.com/tgstation/tgstation/assets/53777086/33f21ca3-98d8-4147-83e7-74e7611463e6)

Help section and UI when there's no song put in

![image](https://github.com/tgstation/tgstation/assets/53777086/babd30ab-9551-448b-9fe6-24e0b0535caf)

## Why It's Good For The Game

It is yet another step in finishing up
https://hackmd.io/XLt5MoRvRxuhFbwtk4VAUA?view
Instruments especially were in a poor spot because they didn't respect
things like ``IN_USE`` to not refresh if it's not the "UI" you are on,
and such.

## Changelog

🆑
refactor: Instruments now use TGUI.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-03-14 18:43:05 +01:00
Ghom
18d734ef7e Closet Anomaly station trait. (#81393)
## About The Pull Request
Well, it's a station trait that makes a small number of (non-secure)
closets function as if splashed with eigenstatium (which turns them into
teleportation cabins of some sort). However, they're subtler, they lack
the transparency and blueish tint, and don't make sparks.

This PR also demotes the Eigenstate subsystem to a singleton global
datum. It doesn't fire, it doesn't init, it plain doesn't belong amongst
the big boys.

## Why It's Good For The Game
This should be a mildly interesting station trait.

## Changelog

🆑
add: Added a 'Closet Anomaly' station trait, which links and turns a
portion of the roundstart closets into impromptu teleporters.
/🆑
2024-03-14 00:45:42 +00:00
Ghom
737822398a Blackmarket refactor and balance, fixing spy bounties, plus a new category for people captured by pirates/tots/contractors. (#81818)
## About The Pull Request
This PR aims to take care of a few potential hard dels and fix the
fenced goods category first and foremost.

The PR also adds a new one that enables you to buy mobs captured by
antags in advance, before they're sent back to the station. Unlike other
categories, it doesn't have "Launch" and "Teleport" as delivery methods,
instead it uses a special "Supply Pod" delivery method that ships the
chattel directly to your location. This method costs 400 credits,
however, if you've built the LTSRBT, shipment will be free.

Another thing, I always felt LTSRBT to be pretty fucking dumb as is. Way
too overpriced for the benefits it offers: a slighty cheaper delivery
method that, while definitely better than the other two, doesn't really
pay off or honestly even remotely compensate the 4000 credits you just
spent to get it, especially if you're only buying a couple items at
most. So I decided to remove it from cargo and add it to the blackmarket
as a 500 to 750 creds item, available every round.

Human mobs sold by the pirate bounty pad are no longer deleted, instead
they're properly ransomed and sent to the holding facility, much like
for contractors and tots. This means they're also added to the black
market.

## Why It's Good For The Game
The blackmarket system has some issues to it that need to be fixed
(otherwise the "Fenced Goods" and "Hostages" categories wouldn't work).
The Pirate Pad deleting "ransomed" mobs instead of actually ransoming
them is lame. The LTSRBT shouldn't suck as much. Also more market stuff.

This will fix #81809.

## Changelog

🆑
fix: Fixed the "Fenced Goods" black market category.
balance: Removed the LTSRBT from cargo and added it to the blackmarket,
reduced the price from 4000 to 625 on average.
balance: The time it takes for captured mobs to be automatically sent
back to the station from the holding facility has been increased from
3-4 minutes to 6.
add: You can buy mobs captured by contractors, traitors and pirates from
the black market and have them sent back to the station in advance. For
safety, they'll also be handcuffed (not always) upon delivery.
add: Human mobs sold by pirates are not deleted anymore. Instead,
they're now captured and sent to the holding facility.
/🆑
2024-03-13 15:22:01 -04:00
moocowswag
b44f7e16fe Explosion Block (A hidden stat on things like reinforced walls) is more effective against heavy and light tiers of explosions (#81603)
## About The Pull Request

As of right now if a 5/10/20 bomb goes through a reinforced wall it has
its ranges subtracted by a flat value of 2 (explosion block is a flat
subtraction to each tier) and essentially gets turned into a 3/8/18.

This pr just buffs the effect of explosion block against heavy and
light. The modifier is 1.5x against heavy and 2.5x against light (I
might nerf 2.5x down to 2x) I dont want to nullify shockwaves because
they should always be impactful at weakening the station.

In the same situation a 5/10/20 bomb goes through a reinforced wall, it
has its ranged subtracted and ends up 3/7/15


Here is an image of a max cap (5/10/20, do note that currently tg server
config is like 8/16/32 or something crazy) in tram sci, notice there is
roughly 2 layers of reinforced walls on the right and it makes it
through the first layer and hits the second, it would likely destroy the
entire first layer of reinforced walls and remove several tiles from the
second making a second explosion able to go into genetics entirely
unmitigated.

![image](https://github.com/tgstation/tgstation/assets/62126254/dbbcb834-e734-43c8-a50a-6b13d850d941)


In practice the 2nd layer of walls remains miraculously unscathed due to
light explosions having an rng diceroll on destroying reinforced walls


![image](https://github.com/tgstation/tgstation/assets/62126254/42c5ab23-9d72-4b49-be83-04d9e160a9a3)

A second blast still gets through since the 1st layer is no longer there
to protect it.


![image](https://github.com/tgstation/tgstation/assets/62126254/e86e36b6-f9ea-42b8-8918-23d2e72a7416)


Do note on live servers it would be much bigger due to max cap being
8/16/32 , going through 1 reinforced walls would result in 6/13/27 which
is still far larger than the 5/10/20 shown.

## Why It's Good For The Game

Its probably not the best approach to fixing the problem and I probably
made it too good at mitigating light but..

As of right now reinforced walls are so weak at stopping or mitigating
explosions that they are spammed alittle bit more than they should be on
a lot of maps and the nukie ship has a laughably silly explosion block
of 20!!! Just to be able to make it somewhat safe.

Every once in awhile atmos becomes a hot topic for debate because of
some new form of spammable explosive that is getting nerfed because of
the way they can easily wipe the station but we never took a look at how
explosions are done, if this pr is merged it won't kill those types of
gimmicks but it will necessitate actually thinking about how you plan to
bomb the station since now you will need to repeatedly bomb to get
through hardpoints (remember even if a reinforced wall mitigates an
explosion it can be dismantled by it and let subsequent explosions
through) or simply position those bombs directly inside of areas of
interest

Another important note is that rooms that map makers intend to be
explosive resistant should be able to better contain 1 explosion so less
situations of everyone in sci getting cucked by toxins messing up
(unless its so bad that they bomb themselves twice)


If this pr is merged I would suggest keeping an eye on heavy firelocks,
they are more expensive than reinforced walls but allow movement through
them which means they are a lot more practical for spamming explosive
block.

I personally wanted to make foam and other materials good at uniquely
blocking different tiers of explosions but I recall being told that was
a little bit too complicated, if this pr doesn't go well I might try
that.
## Changelog
🆑

balance: Reinforced sections of station hull have gotten better at
mitigating explosive shockwaves.
/🆑
2024-03-10 12:45:33 +01:00
John Willard
9ac81e1a64 New station trait job: Human AI (#81681)
## About The Pull Request

This PR does many things, I'll try to explain the basic/background stuff
to the main thing first:

1. Adds a new remote that allows a human to function like an AI. It
controls a fly that will fly around the station slowly, and when it
reaches a machine then the person can interact with it as if they were
an AI. This required changing a lot of silicon/AI checks with one that
also checks for this remote, and some messing with shared ui state.
2. Moves req_access from the obj and bot to ``/atom/movable`` which lets
it be shared between the two, no more copy-paste and one side lacking
features/checks/signals the other has.
3. Adds a check for AI config for AI-related station traits, which was
lacking prior

Now for the good part...
Adds a new station trait that replaces the AI with a Human.
This person is equipped with an AI headset (including Binary), an
advanced camera console, an omni door wand, the machine controller, and
their laws.
They are immune to the SAT's turrets (even if set to target borgs) and
are slow outside of the SAT, mimicing the actions of the AI.

They interact with the world through their advanced camera console,
which allows them to do most AI stuff needed, and the holopad they can
connect to without having to ring first (like Command can).

They are given a paper with the laws they must follow, but since they
are human they are able to bend it. Cyborgs that run the default lawset
are "slaved" to them via an unremovable law 0, so the Human AI can bend
the laws if they really need to (for their own survival n such), and
make the cyborgs obey their commands above laws, but in general this
shouldn't be a frequent occurrence. This does take into account the
unique AI trait, so it's not guaranteed Asimov.

When this station trait rolls, all Intellicards, AI uploads, and AI core
boards are destroyed and are unresearchable. They can be spawned by
admins in-game if necessary. Maybe in the future we can also exclude
Oldstation from this but I haven't really decided.

Extra perks:

Human AI spawns with a Robotic voicebox (unless they are a body purist)
and teleport blocking implant, so they can't use teleporters to bypass
their on-station slowdown.
They also have an infinite laser pointer that can be used to blind
through their camera console. This is unfortunately nerfed from the
recent borg balance PR that removed its stun. This was meant to be the
alternative to no longer being able to permanently lock borgs down like
AIs can (or more than one, for that matter).
They aren't affected by Roburgers, Acid, and Fuel's toxicity.
Bots salute them like they do Beepsky (which is now a trait)
They spawn with SyndEye to replace the AI's tracking ability
They do not have a bank account

### The machine remote

The machine remote has a little fly in it that flies to the machines it
is pointed to, working as the arms and legs of the Human AI. It scans
the machine and punches in the action the AI does, and is how the AI
accesses basically anything. This fly slowly moves from one machine to
the next, and can be recalled with Alt Click.
It works on machines and bots.

### Video (Low quality to fit Github)


https://github.com/tgstation/tgstation/assets/53777086/e16509f8-8bed-42b5-9fbf-7e37165a11e8

## Why It's Good For The Game

I've seen a funny screenshot one day of a person replacing the AI by
using a bunch of door remotes, camera console, crew monitoring console,
and a few other things. I've been thinking about that for a few years
and really wanted to make it official if not easier to make possible,
because it is an incredibly funny interaction.
This makes it a reality, and while they aren't as powerful as regular
AIs, I think it makes for better and funnier in-game moments. With the
same weight as Cargorilla (1), I hope this wouldn't be rolling too often
and ruin rounds, but instead show off the different capabilities that
Humans and AIs can do, to do the job of an AI. You win some you lose
some.

## Changelog

🆑 JohnFulpWillard, Tattax
add: Adds a new station trait job: The Human AI.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-03-09 23:48:39 +01:00
Thunder12345
058cb039eb Bitrunning 1.5: Secondary Objectives (#81828)
## About The Pull Request

Added secondary objective lockboxes to bitrunning. These pull from a
list of secondary objective loot on the domain, with a limited quantity
of items. Once there are no items left to pull, the secondary objective
disappears. If multiple secondary objective markers are placed, they
will be placed until all markers have been used, or all the items in the
loot pool are already spoken for.

To support this functionality, adds SSbitrunning, which stores all
domains as instances, instead of checking the hardcoded types as
previously. SSbitrunning manages listing domains for the quantum
console, and rolling secondary loot.

As an example of this functionality, added a side path to Glacier Grind
with a polar bear and some loot.

## Why It's Good For The Game

Secondary objectives give mappers ways to encourage players to venture
into a wider range of domains by offering non-trivial loot beyond the
fluff items given in the main caches. The absolute limit on the number
of items available ensures these items can't be farmed.

As well as supporting secondary objectives, SSbitrunning allows for
future support of features relying on mid-round modification of domains,
for instance adding custom domains.

## Changelog
🆑
add: Added secondary objectives to bitrunning!
add: Pick up encrypted curiosities and return them to the safehouse to
claim their contents.
add: Glacier Grind has been given a secondary objective, look out for
the limited edition hat.
add: Bitrunning domains can now be modified during the round by admins.
/🆑
2024-03-09 22:42:23 +01:00
MrMelbert
5f2f9e67ad Add compile option for compiling in MAP_TEST mode, which disables common annoyances when testing new maps (#81697)
## About The Pull Request

Adds `MAP_TEST` compile flag. 

This compile flag blocks common things which make it difficult to test a
map.

Things this applies to: 

- Rats no longer spawn. 
- Rat spawning will (obviously) break up the powernet, which is
INCREDIBLY annoying when trying to test if all the rooms of the station
are wired correctly (or testing which rooms lose power first, etc)

- Light tubes no longer break on initialize. 
- Random light breakages can easily cause mappers to accidentally over
light a room.

- Roundstart command report is not printed. 
- Might be a personal preference, but it's kinda annoying to hear the
alert over and over again.

- Random events do not trigger. 
- Some events such as gravity generator outage can trigger with 0
population.
   - Random camera breakage event can cause over-placement of cameras. 
   - Other stuff tends to just get in the way. 

- Station traits do not trigger. 
- Probably the biggest annoyance. Many traits modify the map in some way
which disrupts testing.

- Roundstart landmarks don't self deletes. 
   - Allows mappers to use sdql to find them. 

- Mapping verbs start enabled. 

Obviously more things can be added if they come up.
2024-03-07 16:57:47 -05:00
ArcaneMusic
3a76cb27fe Arcargo: Balance Pass v2 on the Stock Market (#81580)
## About The Pull Request

Picking up where I left off on #81216. 

* Stock market stocks have had their market quantity drastically
reduced, as on both the more common and more rare material sides of
things these materials traditionally have been traded in quantities that
it would prevent bicycle like quantities of materials entering the game
while still allowing for access to rare materials at rare material rates
of credits.

* The stock market subsystem now fires once every 60 seconds, as opposed
to once every 20 seconds. To compensate for this, the subsystem now
makes much wider price changes every update, to disincentivize players
from just camping out at the stock market console all game, as this is
behavior we typically discourage (genetics/virology/etc). Material
tending times are similarly decreased to make up for that, while noting
that stock market events will still enable for a material to change
directions at any point as well.

* Material prices can drop below their minimum trading threshold,
resulting in them gaining protected purchasing status, and resulting in
them being unavailable for purchase. This means if you're watching a
price drop, and it's still trending lower, there's a distinct chance you
might want to buy before it drops below the threshold, or risk it, buy
later, and avoid the material getting locked out for another minute or
more.

* Adds 2 new stock market events to help add additional variety to the
stock market's variability, while adjusting the probability of a market
event occurring per stock market event. This should average to ~4 events
every minute, keeping things somewhat interesting if you're watching the
prices of items, but without requiring second to second updates to keep
things engaging.
* These two events include one that blocks off all material quantity
from a material for the duration of the event and resets prices when
complete, and another one that maximizes the profitability of a
material, but leaves it's market quantity up in the air.

* Stock blocks have had their freeze timer decreased from 5 minutes,
down to 3, with the warning now at 1.5 minutes. This is to encourage
players not to sit on their resources for longer periods of time if
their goal is just to sell at a specific price point and to keep items
going through the shuttle, which _also_ encourages players to receive
mail/receive regular orders from the rest of the crew.

* The UI has a number of improvements, those being:
* The time until the next stock market update is listed on the UI as an
active timer.
* The materials listed in the UI are now sorted by the value of that
resource per unit.
* The instructions are now kept within a collapsible component to cut
down on wasted space within the UI.
* A few elements are moved over to % width as opposed to a hardset x
pixels width for screen size compatibility purposes.


![image](https://github.com/tgstation/tgstation/assets/41715314/b8c7b00a-947e-421b-aa18-2b77f0b9bb50)

## Why It's Good For The Game

Stock market has been known to create bike levels of wealth with near
negligible amounts of effort and was going to need a balance pass
eventually. This is being accomplished by slowing down the system, but
also making it more unpredictable by expanding on the stock market event
system a bit further. Naturally, it could use a few more wacky events to
keep the system fresh and active, but for now this helps to keep the
system from being a screen simulator while also making game-health
changes like lowering material quantities that were capable of allowing
the player to double, quadruple, octuple, etc. their wealth every few
minutes by just buying low and selling high.

Makes a few QOL changes to the UI to compensate for a few of these
changes, like the new update timer on the UI in the case we change the
time per update any further, as well as to give incentive to players to
not just camp the console for new updates, just to glance at how their
investments are doing.

These tweaks also keep cargo moving as opposed to just trying to power
game iron and glass for maximum returns, while giving them extra
opportunities to send the shuttle to keep packages flowing for other
purchases/getting mail.

This has a chance to stop #79978, but I'll edit this appropriately after
a TM has confirmed if it was effective or not.

## Changelog

🆑
balance: The stock market now fires slower, has stock market events
occur more often, and the stock market has fewer minerals that are
available to buy in a single purchase before restocking.
balance: Materials sold on the stock market may be protected from being
bought if their prices drop too low, so make sure you watch your prices
before they run the risk of getting shut out!
balance: Stock blocks now freeze the price of materials for 3 minutes,
down from 5.
qol: Tweaks to the Galactic Material Market UI, with materials sorted
based on their rarity and a timer to show how long until it updates.
add: New Stock market events, one locks a material from being purchased,
the other maximizes the value and quantity of a material for sale.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-03-06 23:54:37 +00:00
Kyle Spier-Swenson
3086ed4f8c refactor db connection timeouts (#81816)
Give it exponential back off and smerter logic.
2024-03-07 12:25:01 +13:00
13spacemen
357799c8a5 Removes Orbit Polling Component, SSpolling improvement (#81748)
When I made SSpolling, jlsnow gave me his blessing to delete the orbit
polling component [where you orbit something for 20 seconds before it
chooses a ghost from the orbiters]
It's only used in a few places like soulstones replacing
jobbanned/inactive players, etc.

Also upgraded SSpolling; you can now place a little icon on the sides in
the chat message, chat message looks a lot nicer, the alert pic and the
jump target don't have to be the same anymore, and I made it be able to
pre-pick candidates since 90% of the use cases would just want 1
candidate

Also prints to chat who the chosen one was

Also made slime intelligence potions ask the user for a reason, which
will be displayed in the alert poll
2024-03-06 08:24:36 +00:00
_0Steven
16f6200b65 Alternate job titles such as chef and department security get injected to the manifest normally, and show up as the right department. (#81634)
## About The Pull Request

Previously injecting to the manifest would use solely the mind's
assigned role, thus injecting player with alternate job titles such as
chef and department security as the job they're based off rather than
their actual ID trim.
Then if the manifest were to be updated later on, they would show up as
being departmentless because getting the manifest checks for an assigned
job, which these don't have as they're just alternate titles for an
existing job.

This resolves the first part by checking if it's possible to get a trim
from a held ID and using that before attempting to default to the mind's
assigned role. As building/updating the manifest is done after
equipping, this lets alternate job titles be assigned as their actual
job.
Then the second part is resolved by adding a list of alternate titles
for the job subsystem to register as being that job, so that a job can
have multiple titles which refer to it.
## Why It's Good For The Game

It's annoying to not be able to find these in the right spot on the
manifest, if at all in the first place.
2024-03-05 22:37:00 -06:00
Ghom
88bdabe53b Adds a small cafeteria behind the right wing shutters of the museum. (#81465)
## About The Pull Request
I was thinking to contribute something to the new away mission map to
make it better. Mapping and all takes too much time for me, so I could
do little. Though it comes with its own unique gimmicks.

To reach the cafeteria, one has to complete a couple puzzles.
The first set is opened by inputing the correct PIN on the password
panel beside it. There're several clues to help you guess this fairly
easy puzzle, in the form of several number graffitis, a scrapped piece
of paper full of numbers, and a board filled with colored dots also
found just beside the panel.
The second one is opened by a keycard, and is generally lazier. To find
it, you'll need to do a bit of (toilet) searching.

As for the unique things this PR adds:
- A fire extinguisher... that actually contains welding fuel
- A (dirt-cheap) hotdog vending machine*
- A completely ornamental maneki-neko (that's the name of the
luck-bringing, paw-waving cat figurine)
- A piggy bank that carries money between rounds. It has a cap of 10k
credits worth of holochips, cash and coins, which is pretty high, but
I'm confident people will just destroy it for its contents the moment
they find it. His name is Pigston Swinelord VI.
- More, totally legit and not actually fake bombable walls :^)

*By the by, you can also find it during the national hotdog day.

Screenshots of the new location:
![museum
cafe](https://github.com/tgstation/tgstation/assets/42542238/1c0d93b7-90d5-4459-a48d-81430f0d3613)
![museum
restrooms](https://github.com/tgstation/tgstation/assets/42542238/5a9e049d-6acc-464b-998d-901e43154bae)


## Why It's Good For The Game
You know how most away missions are not that special at all? Yeah,
@mc-oofert set an example of a pretty decent one actually, if not a tad
small. I thought it could use a touch of another mind actually
contributing to it too, because it deserves it.

Also, this sets the basis for other persistent piggy banks. I don't
think they should all have that 10k cap like this one, perhaps 1k is
enough. Beside, the code that mothblocks did for json database datum is
pretty good, so there is not a whole lot of shitcode here.

## Changelog

🆑
add: Added a cafeteria to the museum away mission, with a few special
things to it. To reach it, you'll have to complete a couple puzzles
however.
map: The museum away mission now has a couple restrooms.
add: Hotdog vending machines may spawn during the National Hot Dog Day.
/🆑
2024-03-05 18:19:39 -07:00
Kyle Spier-Swenson
a88013783a Fix shutdown hanging if the db went away. gives shutdowns a time out. improves db shutdown logging (#81813)
terry right now:
```
[20:11:31] Runtime in code/controllers/subsystem/dbcore.dm,353: Attempting to create a new db query during the world shutdown
...
[21:25:29] Runtime in code/controllers/subsystem/dbcore.dm,353: Attempting to create a new db query during the world shutdown
```
2024-03-04 19:00:42 -07:00
MrMelbert
977799a2e7 A red spy has entered the base: Adds Spies, a roundstart antagonist inspired by Goonstation's Spy-Thief (#81231)
# Disclaimer: No Goon code was referenced or used in the making of this
PR

## About The Pull Request

[Design Document (Read this for more
information)](https://hackmd.io/@L9JPMsZhRO2wI25rNI6GYg/rkYKM9Yc6)

This PR adds Spies as a new roundstart antagonist type, inspired by
Spy-Thiefs from Goonstation.

Spies are tasked with stealing various objects around the station, from
insulated gloves to the black box, from the clown's left leg to the
bridge's communications console.

For every item stolen, the Spy is rewarded with a random item from the
Syndicate Uplink, plus some items uniquely available to the Spy. Stolen
items are then shipped off and sold on the Black Market Uplink, allowing
the crew - or maybe some other evil-doers - to get their hands on them.


![image](https://github.com/tgstation/tgstation/assets/51863163/f057d480-4545-44da-b8fe-a8d09a5d2dcf)

More ideas for theft items and bounties are welcome. 

## Why It's Good For The Game

See the design document for more information. 

In short: Adds a solo antagonist which has less impact than your
Traitors and Heretics, but more impact than Paradox Clones and Thieves.
In other words: On the same tier as old traitors.

Seeks to embrace the sandbox aspect of antagonists more by having no
precise greentext objective, and instead some suggestions for chaos you
can embark in. Have fun with it!

## Changelog

🆑 Melbert
add: Spies may now roam the halls of Space Station 13. Watch your
belongings closely.
/🆑
2024-03-01 04:41:57 +00:00
Jacquerel
b0fd97dafe Allow voting statistics to be hidden (#81686)
## About The Pull Request

Allows polls to hide the voting statistics, both while the poll is
running and when it completes, so that people vote in isolation of
knowing what other people are voting for.
It looks like this:


![image](https://github.com/tgstation/tgstation/assets/7483112/d17a1784-ecfa-4c7b-8cb2-88aef7f7dcdb)

![image](https://github.com/tgstation/tgstation/assets/7483112/c83db170-7338-48dd-8ab6-cfbc20414abe)

This functionality is also available for custom votes triggered by
admins, if they want it.

## Why It's Good For The Game

Put simply, if likely to be controversially, sometimes people get upset
that an event with a 5% chance of happening occurs 5% of the time. Now
they really won't know what the chance was, only that it was picked by a
weighted choice.

Lack of knowledge about what other people are currently voting for
should also curb "meme votes" where people pile onto something they see
other people voting for, your vote in a poll with hidden stats can only
be influenced by your own opinion because you can't see what the crowd
is doing in order to join their bandwagon.

## Changelog

🆑
add: Displaying the voting statistics is now optional on a per-poll
basis, and is disabled for map voting.
/🆑
2024-02-27 18:41:44 +13:00
Ghom
871cec76aa Adds a multi-dimensional bomb payload to the black market. (#81562)
## About The Pull Request
This PR adds a !!!FUN!!! bomb payload to the blackmarket, which, upon
detonation, transmutates all terrain in a range like the dimensional
anomaly would. You can also select the dimensional theme to use by using
it in your hand.

I believe however, this thing should cost a fuckton to get and only show
up occasionally. 8k to 10k was my original idea, but I think that's
perhaps not high enough given its flagrant potential. Perhaps I should
also make it so the more dangerous themes yield a shorter range than
others. Suggestions are welcome.

Screenshot of what happens when you don't set the theme:

![chaotic_mess](https://github.com/tgstation/tgstation/assets/42542238/e4c3264d-17e0-45b6-90c2-3c30a592ae2d)

This PR also turns dimension themes into singletons so we access them
more easily. Nothing to write home about.

## Why It's Good For The Game
The black market could always use some extra thingy or two anyway, and
this thing could either be a source of emergent gameplay, or a recipe
for a disaster. Perhaps second to the Big Slappy for how funny it could
be.

## Changelog

🆑
add: Added a multi-dimensional bomb payload to the black market. It's
very expensive.
/🆑
2024-02-26 19:48:57 -06:00
Ghom
717209899b Paintings update: Curators get a cut on patronage + zoom in/out buttons on UI (#81500)
## About The Pull Request
(Roundstart) Curators now get a 22.5% cut on credits spent on painting
patronages (divided by the number of curators). The service department
also gets another, 12.5% cut.

This PR also adds zoom in/out buttons to the painting canvas UI. So you
don't have to stare at a blob of such enormous squares while the UI is
open, which is only good when drawing.

Screenshot copypaste in paint:

## Why It's Good For The Game
The painting feature is mostly an end in itself, which is totally fine.
I've put quite a few quality-of-life changes into it through the years,
and I still want to kick in some stuff. However, I think the curator
should actually benefit from them in a more "mechanical" way.
Furthermore, I personally prefer them over the random written crap that
players make.

Also, as I said above, the canvas UI can feel a tad too big at times.
2024-02-19 11:49:03 -06:00
MrMelbert
2b5486359e Valentines Day Rework (Better Late Than Never) (#81499)
## About The Pull Request

Big changes:

- Participation is Valentines day requires consent, as consent is
important.
- When the event triggers, all valid players are automatically signed up
to get a random date. However if you're uninterested, you can opt out of
getting a date.
- This uses the same system as ghost role polling, so it's a
non-obstrusive screen alert + chat box entry.

- AIs are now given a zeroth law to protect their date. 
   - This does not override existing zeroth laws (for malf ais). 
- This zeroth is law is worded in a way such that they are not
effectively malf AIs. Their other laws still apply, but not for
situations pertaining to their date.

- Cyborgs are desynced from AIs and are given similar zeroth laws to
protect their date.


![image](https://github.com/tgstation/tgstation/assets/51863163/0d1cca3e-f483-484c-90a8-9bb5492e2c69)

Small changes: 

- Valentines cards are now paper. Meaning you can write on them, stamp
them, or yes, burn them.

- Third wheeling is more codified than before. Third wheels get their
own antag datum type.

- The antag panel listing in roundend takes up significantly less room
for each date. Additionally, dates are now paired up with each other.

- Adds implementations for getting pronouns from mind datums. 


![image](https://github.com/tgstation/tgstation/assets/51863163/2107e7d2-6197-4f64-9245-54037ca6c0ec)

## Why It's Good For The Game

It's 2024 and our Valentines day is sooo 2012. 

I'm a big fan of Valentines Day, personally - it gives me the
opportunity to mess around with another player that I probably would not
otherwise mess around with, getting into shenanigans I would not
otherwise.

But as the years have gone by it's gotten pretty lackluster. Some people
like it as much as I do, but others ditch it entirely and ignore the
objectives.

And if you get paired with someone ignoring it, well, now you're out of
luck!

This is something I'm aiming to rectify by making it opt-in when it
triggers rather than forced. All the people participating will be
guaranteed to get someone who cares about the event as much, which makes
it more fun.

As for the silicon changes, there's been lots of confusion around
silicons and their dates, so I thought I'd fix it here as well.

Also, better late than never? 

## Changelog

🆑 Melbert
add: Valentines Day now polls all players for candidates when it
triggers rather than forcing all players to be a Valentine. Consent is
important.
add: Valentine silicons now gain special laws pertaining to their date. 
qol: Valentines Cards are now paper, so you can write on them, stamp
them, or burn them.
qol: Valentine's roundend report no longer takes up a massive amount of
space and also no longer sound so, so weird.
/🆑
2024-02-18 17:30:48 +01:00
SyncIt21
df2ce692ee General maintenance for all things boulder related. (#81358)
## About The Pull Request
**1. Qol**
- Adds screen tips & examines for screwdriver & crowbar acts on BRM,
Refinery & Smelter
- Adds examines to display number of boulders stored inside a refinery &
maximum number of boulders it can hold. Right click screentip to remove
boulders
- Adds examines to display maximum number of boulders than can be
teleported by a BRM & screentips for interacting with wires
- More audio & visual feedback for refinery processing. If a boulder
requires multiple steps you will get a balloon alert saying "crushing"
for refineries & "smelting" for smelters along with a sound per process
tick(which is every 2 seconds so no need for cooldown) giving you a
better idea of what's happening in the pipeline
- BRM now will display all lights when the "Automatic boulder retrieval"
is on & turn off the lights when disabled along with examines giving you
a visual indicator of its state

**2. Code Improvements**
- Splits types of boulders into its own file `boulder_types.dm` for easy
maintainability
- Moves beacon for refinery machines into its own file
`boulder_processing/beacon.dm` for easy maintainability
- Moves the cooldown for processing a boulder `processing_cooldown` into
the refinery machine itself. Since 100's of boulders can be created per
round this var can take up memory quickly so by moving them into the
refinery machine it gives us some savings
- Compressed & merged procs such as `create_mineral_contents()` ,
`flavour_boulder()` etc with the vent code. These procs were only used
by the vent 1 time & by merging the code we removed if conditions to
check if a parent vent was passed or not(since now that's always the
case). Helped in removing boilder plate code

**3. Fixes**
- **Fixes vents always spawning "Small size boulders" & not medium, nor
large boulders.**
 Once a vent generates a boulder it calls  `flavour_boulder()`

084f56938c/code/game/objects/structures/lavaland/ore_vent.dm (L385)
however this proc also accepts 2 more params `size` which would always
default to `BOULDER_SIZE_SMALL` and `is_artifact` which is simply unused
in the proc

fb83617ff9/code/modules/mining/boulder_processing/boulder.dm (L219)
Therefore vents would always generate small boulders giving us no
varity. Now the boulder size is set depending on the vent size &
durability for each boulder is set to a random value between 2 & the
boulder max size giving us the flavour we actually wanted

- **Fixes "Expanded Gulag boulders" using "normal gulag material list"
when setting its custom materials.**
If you look at the `add_gulag_minerals()` proc it always picks from the
`gulag_minerals` list & accepts no params

fb83617ff9/code/modules/mining/boulder_processing/boulder.dm (L235-L236)
So when we try to pass params to this proc which in reality doesn't
accept any we were wasting our time doing this

fb83617ff9/code/modules/mining/boulder_processing/boulder.dm (L274)
And for our case `expanded_gulag_minerals` list was simply unused
because our proc doesn't care about it and it went back to just using
`gulag_minerals` list thus ignoring our list

fb83617ff9/code/modules/mining/boulder_processing/boulder.dm (L282)
As i said in the "Code Improvement` section when i moved boulder types
into it's own unique file this was fixed & now expanded gulag boulders
actually has a chance to spawn with bluespace crystals inside them

- **Fixes manual tapping of ore vents by hand not using a cooldown**
`produce_boulder()` accepts a cooldown var for when you need to manually
tap the vent by hand.

e8b5b52d54/code/game/objects/structures/lavaland/ore_vent.dm (L374)
This var was always set to FALSE because we never passed `TRUE` into it.
Not once here

e8b5b52d54/code/game/objects/structures/lavaland/ore_vent.dm (L124)
Nor here

e8b5b52d54/code/game/objects/structures/lavaland/ore_vent.dm (L131)
Now we just pass `TRUE` so tapping these vents by hand have a cooldown

- **Fixes BRM off icon state never being used**
When the room ran out of power it would still look on. Now we use that
state correctly

- **Fixes Automatic Boulder Retrieval by the BRM not actually being
automatic**
You must have noticed that once you do "Right click" and wait for all
the boulders it can teleport (determined by `boulder_processing_max`) to
be teleported it stops permanently after that. Even if more boulders get
generated it won't do anything, You have to again "Right click" &
retoggle automatic boulder retrieval on again, thus forcing someone to
stand there & monitor the BRM

Now once you set Automatic Boulder Retrieval on you can leave & forget.
It will teleport boulders as & when available thus enabling automation
properly.

- **Fixes boulders ejected from refineries via right click from getting
teleported back into the machines loc**
Fixes
https://github.com/tgstation/tgstation/pull/78524#issuecomment-1911666995.
The problem is refinery machines & the BRM keep track of all the
boulders that entered into it via the `boulders_contained` list.

Now we directly check `contents` for boulders so we don't have to
maintain 2 seperate lists to keep track of boulders. It also now uses
`processed_by` var of boulders to ensure refinerries don't retake in the
same boulder it just processed. Not sure where exactly the problem got
fixed but implementing these 2 measures fixed it regardless.

- **Fixes boulders with 0 durability[a.k.a steps] from getting ejected
out**
Fixes
https://github.com/tgstation/tgstation/pull/78524#issuecomment-1914551952.
So inside `process()` we constantly decrease the durability of the
boulder till it becomes 0.

0a496f180c/code/modules/mining/boulder_processing/_boulder_processing.dm (L159)

  When it reaches 0 it calls `breakdown_boulder()`

0a496f180c/code/modules/mining/boulder_processing/_boulder_processing.dm (L164-L165)

This proc has a chance to reject the boulder if it could not process any
materials

0a496f180c/code/modules/mining/boulder_processing/_boulder_processing.dm (L219-L222)
  
  **"Without resetting its durability"** over here

0a496f180c/code/modules/mining/boulder_processing/_boulder_processing.dm (L241)

So it ends up rejecting a "0" or worse -1 durability boulder. Now we set
the durability in `remove_boulder()` so regardless of what circumstances
the boulder is ejected it always gets a positive durability

- **Fixes BRM & Refinery from rapidly spitting out boulders in their loc
which causes lag in the long terms**
Fixes #81404. Basically even if there is 1 boulder sitting at a BRM's
loc or an refineries loc. Operations are haulted i.e. the BRM will not
teleport any more boulders & the refinery will keep their already
processed boulders inside till their locs are cleared from boulders.
This prevents large number of boulders from pilling up in long rounds

- **[Priority : High] Fixes refineries incorrectly removing materials
from processed boulders**
Fixes #81109. This bug is quite serious because it can't literarily
affect any random item with custom materials in game. This one line of
code over here can break the entire material economy as we know it

0a496f180c/code/modules/mining/boulder_processing/_boulder_processing.dm (L217)
  
**"DONT DO THIS"**. The `custom_materials` list is a **"read only"**
list & if you ever want to change it call the `set_custom_materials()`
proc with your new values but do not edit this list manually as it is
done here.
  
All lists related to materials are cached by the `SSmaterials`
subsystem. List values are cached & shared across multiple objects so
when you edit those values like here, you might end up effecting an
item/multiple items in some random corner of the map that shares this
list.

This also causes boulders with empty list of materials to get spawned at
random so yeah again plzz don't do this

**4. Refactors**
- Repathes `obj/machinery/boulder_processing/brm` -> just
`obj/machinery/brm`.
Even though semantically it looks nice that the brm is a subtype of
`obj/machinery/boulder_processing` from a code & operation perspective
they have 0 similarities.

1) The BRM does not accept boulders feed into it from a conveyer belt
unlike a refinery but instead picks boulders from `SSore` subsystem &
put it on the conveyer belt. This means procs for accepting boulders
such `CanAllowThrough()`, `breakdown_boulder()`, `accept_boulder()` etc
have no use in the BRM. Their just code clutter at this point
2) The BRM overrides `process()` & does not call its parent proc making
that code wasted
3) It has no use for silo materials & mining points making those vars go
to waste

With so much wasted code its better to just let go off all of it & just
make it a basic instance of `obj/machinery` making maintainence easy

- BRM now teleports boulders in a batch (batch size determined by
`boulders_processing_max` max value from upgraded parts is 7) with a
boulder appearing every 1.5 seconds rather than spawning all at once.
After a batch is processed it has a cooldown of 3 seconds before
repeating the process if automatic boulder retrieval is on. This stops
the conveyer belt from getting crowded with boulders and makes the
refining process more efficient.

With this BRM wires are removed because only it had only 1 wire
responsible for toggling boulder retrieval but now since this process is
automatic, we have true control over the timing of boulders spawned &
don't want to leave it in the hands of players

## Changelog
🆑
qol: adds examines & screentips for crowbar, screwdriver acts to BRM &
refinery machines
qol: adds examines about the number of boulders stored & processed to
BRM & refinery machines
qol: BRM now has its lights turn on/off depending on wether automatic
boulder retrieval is on/off for visual clarity along with examines
qol: refinery machines now display ballon alerts & plays sounds more
frequently when processing boulders for better feedback
fix: vents now spawn boulders of all sizes & not just small ones
fix: expanded gulag boulders now have correct materials in them.
fix: manual tapping of vents now has a cooldown applied as intended.
fix: BRM has its light turned off when area power goes off
fix: boulders ejected from refineries by hand no longer teleport all
over the place occasionally.
fix: refineries no longer eject boulders with 0 durability
fix: Boulders & refineries no longer pile up on top of BRM's &
refineries in long rounds. Their locs have to be clear of boulders
before they spit out more boulders to prevent a large pile of boulders
from causing lag
fix: sheets ejected from lathes no longer get rejected when inserted
back which could happen at random, no more boulders with empty materials
code: splits boulder types into its own file along with other items
code: merges & autodocs procs, vars related to boulders
refactor: repaths BRM to a simpler subtype
refactor: BRM now spawns boulders in batches(batch size can be increased
with upgraded parts) with a boulder appearing every second. After a
batch is processed a 3 second cooldown is applied to stop the conveyer
belt from clogging up, With this BRM wires are removed as there is no
need for timers to be attached to wires which intefers without our batch
processing timings.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-02-18 03:40:57 +01:00
LemonInTheDark
1e420947b1 Fixes smoothing breaking if a map is loaded post init (#81526)
## About The Pull Request

We'd finish a set of atom creation, then try and smooth those atoms The
problem is they might try and smooth with an uninitialized neighbor,
which wouldn't have its smoothing vars parsed.

This fixes that by pooling "to be smoothed" things into a list based off
the source of the init stoppage, which we then release when we're done.

Also fixes things staying in mapload, even during a sleep. This can
cause massive headaches so it's good to avoid.

This has a cost but it's minuscule (on the order of like 0.006s (6ms
over all of init), so I'm happy with it.

## Why It's Good For The Game

Closes #77040

## Changelog
🆑
fix: Maps loaded in after roundstart will no longer have broken
smoothing
/🆑
2024-02-18 02:08:53 +01:00
Kylerace
9fb2a54c30 Adds Subsystem Profile Focusing (#81461)
## About The Pull Request
adds a var to /subsystem that when toggled to true by an admin makes
/subsystem/ignite() start the profiler before calling fire() and then
stop the profiler after, this allows us to audit any individual
subsystems synchronous call chain.
## Why It's Good For The Game

![Screenshot_3275](https://github.com/tgstation/tgstation/assets/15794172/27d5e4b0-ab06-451f-b4b4-97d31fd06385)
when SSInput is focused

![Screenshot_3274](https://github.com/tgstation/tgstation/assets/15794172/55572861-3f71-4b6c-bb63-f1dfbbe2ab26)
when SSair is focused

some subsystems are hard to profile performance issues for because
theres a billion procs downstream of them in the profiler and some of
them arent even unique to them (if a subsystem is spending half of its
time in some procs downstream of /_SendSignal() how could you tell). now
we can just do it. starting (and stopping?) the profiler itself is
expensive and this messes with the full round profiler but this is worth
it.

also this doesnt help with sleeping procs / timers created downstream of
that subsystem.
## Changelog
🆑
admin: admins/maintainers can now make the profiler focus on specific
subsystems by setting the subsystem var profile_focused to TRUE
/🆑
2024-02-15 03:15:55 -08:00
Rhials
708b293134 Reduces chat/audio spam when multiple ghost polls are being called (#81441)
## About The Pull Request

This slightly modifies the polling subsystem. The sound/chat popup for a
new role is now only given on the first "stack" of a role signup.

Let's say 3 loneops roll at once (ty admins), you'll still get the toast
popup for 3x loneop rolls, but you'll only get one text highlight in the
chat, and only one audio stinger.

Even if the first 2 loneops don't have anyone sign up for it, using the
text or toast signup options will still sign you up for the last roll as
it completes. This shouldn't make signing up any harder, just quieter.
## Why It's Good For The Game

Less spam in chat. Less headset-blasting audio bleeps. Cool!

Closes #80998.
## Changelog
🆑 Rhials
fix: Ghost role polls should spam you less when multiple of the same
roll occur in succession.
/🆑
2024-02-13 23:21:00 +01:00
Kyle Spier-Swenson
9ddfd4a289 Moves inter-round caches to cache/. Deletes tmp/ between rounds. Keeps tts from killing servers. (#81433) 2024-02-13 10:09:12 -07:00
John Willard
a210563de0 Adds a Touchy quirk (#81387)
## About The Pull Request

Adds a new quirk for -2 points that requires you to be next to something
to examine them, like blindness but without the timer or actual
blindness itself.

## Why It's Good For The Game

For the player using the quirk, it's 2 points for losing the ability to
simply examine everything around you, making it harder to tell what
someone has in their hands when they are charging at you, for example.
You need to get up and close to things to see what they are.
For people being examined, it's just another possible excuse to be near
them, opening up plausible deniability for actions such as sleepy pens,
changeling stings, etc.

## Changelog

🆑 Atlasle, JohnFulpWillard
add: Adds the Touchy quirk, you need to be next to something to examine
it, for 2 extra quirk points.
/🆑
2024-02-11 03:17:23 +01:00
Rhials
33d5987739 [NO GBP] Fixes raw ectoplasmic anomaly refining (#81377)
## About The Pull Request

This adds a proper cap for raw ectoplasmic cores, so they can actually
be refined now. Cool!
## Why It's Good For The Game

Broken thing need fix oops argh.

Closes #81369.
## Changelog
🆑 Rhials
fix: You can now refine ectoplasmic raw cores at the implosion machine
thing.
/🆑
2024-02-10 17:29:26 +01:00
John Willard
233fdcdea7 Makes point_types not be dumb (#81202)
## About The Pull Request

We currently have a list of point types that is meant to be
list(``DEFINE`` = name) but it's completely useless since the define is
just the name anyways. It's not used for anything, it has no purpose to
be this way. It seems more like a holdover from when there were multiple
types of research points (it was made for that purpose, even before
nanite points were a thing) but even for that, it serves no purpose.

I reworked it now to be the abbreviated name of the research point type,
de-hardcoding techwebs a little bit and removing the need for
downstreams to edit the techweb UI.

## Why It's Good For The Game

This at least looks better and makes more sense at people just looking
over it.

## Changelog

No player-facing changes.
2024-02-07 05:22:13 +01: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
John Willard
4dba3f75f3 Gives paradox clone their own ghost polling icon (#81229)
## About The Pull Request

Currently all ghost roles, when polling for players, shows a syndicate
poster. This is lame as hell, especially since most of the roles aren't
even Syndicate aligned.
This adds support to have your own icons for it, and adds one for the
Paradox clone since I already had an idea for it.

## Why It's Good For The Game

Paradox clones are not syndicate aligned and it does not make sense to
portray that to players, this looks much better, and hopefully soon
other antags will follow suite.

![image](https://github.com/tgstation/tgstation/assets/53777086/b6016ff1-9914-42a8-bd9f-e72ba5539e11)

## Changelog

🆑
add: Paradox clones now have a bluespace stream instead of a syndicate
poster as their ghost poll icon.
/🆑
2024-02-07 05:15:44 +01:00
Zephyr
c76df7f37a Station Goals are now handled by SSstation instead of a global list (#81177)
## About The Pull Request

You can now get station goals in a slightly better way over using a
`locate() in` call on a global list.
The Meteor Satellite goal no longer stores a giant list of ALL OBJECTS
in view. And now correctly only counts turfs.
## Changelog
🆑
fix: Meteor Satellites no longer erroneously count every piece of paper
as a protected turf.
fix: As a result the station goal is slightly more difficult
/🆑

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2024-01-31 20:47:09 +01:00
John Willard
850ace7a84 Fixes Cult voting for a leader (#81169)
## About The Pull Request

With the recent changes to polling, it seems like it didn't properly
poll cultists, I fixed that and fixed other issues with it (such as it
telling players that they are signing up to BE a cult leader, when they
arent).

Also fixed the button to put yourself forward as cult leader, it
properly removes and gives itself when necessary.

## Why It's Good For The Game

Cult button works again how cool is that

Closes https://github.com/tgstation/tgstation/issues/80620

## Changelog

🆑
fix: Cultists can now vote for a Cult leader again.
/🆑
2024-01-31 20:12:20 +01:00