Commit Graph

854 Commits

Author SHA1 Message Date
nevimer baf3837ae8 Merge remote-tracking branch 'tgstation/master' into upstream-2025-11-29
# Conflicts:
#	_maps/RandomRuins/SpaceRuins/derelict_sulaco.dmm
#	_maps/RandomRuins/SpaceRuins/garbagetruck2.dmm
#	_maps/map_files/CatwalkStation/CatwalkStation_2023.dmm
#	_maps/map_files/tramstation/tramstation.dmm
#	code/_onclick/hud/new_player.dm
#	code/datums/components/squashable.dm
#	code/datums/diseases/advance/symptoms/heal.dm
#	code/datums/diseases/chronic_illness.dm
#	code/datums/status_effects/buffs.dm
#	code/datums/status_effects/debuffs/drunk.dm
#	code/datums/status_effects/debuffs/stamcrit.dm
#	code/game/machinery/computer/crew.dm
#	code/game/objects/items/devices/scanners/health_analyzer.dm
#	code/game/objects/items/wall_mounted.dm
#	code/game/turfs/closed/indestructible.dm
#	code/modules/admin/view_variables/filterrific.dm
#	code/modules/antagonists/heretic/influences.dm
#	code/modules/cargo/orderconsole.dm
#	code/modules/client/preferences.dm
#	code/modules/events/space_vines/vine_mutations.dm
#	code/modules/mob/dead/new_player/new_player.dm
#	code/modules/mob/living/carbon/human/death.dm
#	code/modules/mob/living/carbon/human/species_types/jellypeople.dm
#	code/modules/mob/living/damage_procs.dm
#	code/modules/mob/living/living.dm
#	code/modules/mob_spawn/ghost_roles/mining_roles.dm
#	code/modules/mob_spawn/mob_spawn.dm
#	code/modules/projectiles/ammunition/energy/laser.dm
#	code/modules/projectiles/guns/ballistic/launchers.dm
#	code/modules/projectiles/guns/energy/laser.dm
#	code/modules/reagents/chemistry/machinery/chem_dispenser.dm
#	code/modules/reagents/chemistry/reagents/cat2_medicine_reagents.dm
#	code/modules/reagents/chemistry/reagents/drinks/alcohol_reagents.dm
#	code/modules/reagents/chemistry/reagents/medicine_reagents.dm
#	code/modules/surgery/healing.dm
#	code/modules/unit_tests/designs.dm
#	icons/mob/inhands/items_lefthand.dmi
#	icons/mob/inhands/items_righthand.dmi
#	tgui/packages/tgui/interfaces/ChemDispenser.tsx
2025-11-29 22:49:21 -05:00
Joshua Kidder 7a3ad79506 All camelCase (Brute|Burn|Fire|Tox|Oxy|Organ|Stamina)(Loss) procs now use snake_case. UNDERSCORES RULE! (#94111)
## About The Pull Request
It's just a partial cleanup of
anti-[STYLE](https://github.com/tgstation/tgstation/blob/master/.github/guides/STYLE.md)
code from /tg/'s ancient history. I compiled & tested with my helpful
assistant and damage is still working.

<img width="1920" height="1040" alt="image"
src="https://github.com/user-attachments/assets/26dabc17-088f-4008-b299-3ff4c27142c3"
/>


I'll upload the .cs script I used to do it shortly.

## Why It's Good For The Game
Just minor code cleanup.

Script used is located at https://metek.tech/camelTo-Snake.7z

EDIT 11/23/25: Updated the script to use multithreading and sequential
scan so it works a hell of a lot faster
```
/*
//
Copyright 2025 Joshua 'Joan Metekillot' Kidder

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
//
*/
using System.Text.RegularExpressions;
class Program
{
    static async Task Main(string[] args)
    {
        var readFile = new FileStreamOptions
        {
            Access = FileAccess.Read,
            Share = FileShare.ReadWrite,
            Options = FileOptions.Asynchronous | FileOptions.SequentialScan
        };
        FileStreamOptions writeFile = new FileStreamOptions
        {
            Share = FileShare.ReadWrite,
            Access = FileAccess.ReadWrite,
            Mode = FileMode.Truncate,
            Options = FileOptions.Asynchronous
        };
        RegexOptions regexOptions = RegexOptions.Multiline | RegexOptions.Compiled;
        Dictionary<string, int> changedProcs = new();
        string regexPattern = @"(?<=\P{L})([a-z]+)([A-Z]{1,2}[a-z]+)*(Brute|Burn|Fire|Tox|Oxy|Organ|Stamina)(Loss)([A-Z]{1,2}[a-z]+)*";
        Regex camelCaseProcRegex = new(regexPattern, regexOptions);

        string snakeify(Match matchingRegex)
        {
            var vals =
            matchingRegex.Groups.Cast<Group>().SelectMany(_ => _.Captures).Select(_ => _.Value).ToArray();
            var newVal = string.Join("_", vals.Skip(1).ToArray()).ToLower();
            string logString = $"{vals[0]} => {newVal}";
            if (changedProcs.TryGetValue(logString, out int value))
            {
                changedProcs[logString] = value + 1;
            }
            else
            {
                changedProcs.Add(logString, 1);
            }
            return newVal;
        }
        var dmFiles = Directory.EnumerateFiles(".", "*.dm", SearchOption.AllDirectories).ToAsyncEnumerable<string>();

        // uses default ParallelOptions
        // https://learn.microsoft.com/en-us/dotnet/api/system.threading.tasks.paralleloptions?view=net-10.0#main
        await Parallel.ForEachAsync(dmFiles, async (filePath, UnusedCancellationToken) =>
        {
            var reader = new StreamReader(filePath, readFile);
            string oldContent = await reader.ReadToEndAsync();
            string newContent = camelCaseProcRegex.Replace(oldContent, new MatchEvaluator((Func<Match, string>)snakeify));
            if (oldContent != newContent)
            {
                var writer = new StreamWriter(filePath, writeFile);
                await writer.WriteAsync(newContent);
                await writer.DisposeAsync();
            }
            reader.Dispose();
        });
        var logToList = changedProcs.Cast<KeyValuePair<string, int>>().ToList();
        foreach (var pair in logToList)
        {
            Console.WriteLine($"{pair.Key}: {pair.Value} locations");
        }
    }
}

```

## Changelog
🆑 Bisar
code: All (Brute|Burn|Fire|Tox|Oxy|Organ|Stamina)(Loss) procs now use
snake_case, in-line with the STYLE guide. Underscores rule!
/🆑
2025-11-27 15:50:23 -05:00
Bloop 183c5af2e4 Adds flag for virtual areas, fixes being able to send funds from virtualspace to real accounts (#94071)
## About The Pull Request

Fixes https://github.com/tgstation/tgstation/issues/90641
Fixes https://github.com/tgstation/tgstation/issues/88366

Eliminates worries over virtualspace currency being sent to real
accounts.

When I was looking into why there were no flags for bitrunning areas.
Then I saw this mess:

<img width="929" height="889" alt="Code_2we2QjDyFp"
src="https://github.com/user-attachments/assets/8a807bfe-b566-4057-a8ea-2b306325687d"
/>

Not having enough space / being too lazy to refactor this is a silly
reason to not include flags for something like these virtual areas where
it can be quite helpful. Fortunately I am not too lazy ~~in this
moment~~ so here we go:

It was fairly logical to move over some of these to a separate flag,
which I've called `area_flags_mapping` since they pertain to maploading
things and terrain generation mostly. `area_flags` stays reserved for
general properties and now has more room than it did before for you
people to fill it with.

In doing this it's also neatened up the code quit a bit, as UNIQUE_AREA
was kind of everywhere and now that it's implied by default less areas
need to have it defined (or explicitly un-defined).

<details> <summary> Working as intended </summary>

<img width="787" height="448" alt="dreamseeker_p0Qts36tG1"
src="https://github.com/user-attachments/assets/25056f34-8d43-4be2-a293-e53df7a7d1db"
/>

<img width="383" height="59" alt="dreamseeker_Ek7TXCcpbA"
src="https://github.com/user-attachments/assets/89622974-9467-4cdb-8345-d684f7c9004b"
/>

</details>

## Why It's Good For The Game

Fixes an exploit, improves the area flags situation slightly.

## Changelog

🆑
fix: you can no longer send money from virtualspace to a real account
code: adds a flag for virtual areas so they can easily be checked, as
well as an easy helper proc, 'is_area_virtual(your_area)'
/🆑
2025-11-22 12:24:41 -07:00
Fghj240 302b241be2 NT Frontier lets you refund researched nodes (#94074)
## About The Pull Request

If you research a node you can still buy it from NT Frontier, and when
you do it refunds the research points you spent. It's like how
experi-scanners work.

Also cytology gives you an 80 point discount instead of a 120 point
discount. This doesn't change anything because it only costs 80 points
and NT Frontier boosts can't make costs go negative.

## Why It's Good For The Game

Right now it's most efficient to delay research until ordnance gets
finished and then grab all the free stuff, and any head of staff
researching stuff for their own deparment or robo that wants to make
cool mechs can fuck things up. That's not great, because it's
unrealistic to expect everyone to be coordinated and delaying research
never gets tried in practice.

Also, doing ordnance after the round has been going on for a while is
way less effective because all of the nodes you would've discounted were
already researched.

## Changelog
🆑
balance: NT Frontier can purchase and refund researched techweb nodes.
/🆑

---------

Co-authored-by: Fghj240 <fakeemail@notrealemail.com>
2025-11-22 17:29:02 +01:00
John Willard 392dabc356 Fixes some issues with orders showing up as private. (#93986)
## About The Pull Request

Applies the fixes from https://github.com/tgstation/tgstation/pull/93417
to budget ordering console
Also fixes budget ordering improperly setting cargo as the paying
department, as we check for "null" payer to see whether something is
privately paid.

## Why It's Good For The Game

I really hope one of these days this will just get merged so we don't
need this annoying copy paste. How different is the app to the console
anyway?

## Changelog

🆑 SyncIt21, JohnFulpWillard
fix: budget ordering console correctly differentiates between private &
department orders.
fix: budget ordering console checkout cart displays correct
Private/Department order text amounts.
/🆑
2025-11-18 11:03:30 -05:00
Roxy 71faa643bf Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-2025-11-12 2025-11-12 16:44:13 -05:00
MrMelbert 5146cfd403 Moves camera update handling to background subsystem, (maybe) fixing lag (#92208)
## About The Pull Request

When a camera update is triggered, it is instead added to a queue on a
background subsystem

An AI entering a camera chunk which is queued to update will force the
update immediately (bypassing the queue)

While the root problem of this is, ultimately, not addressed...

<img width="554" height="58"
alt="467828777-eff3f0e5-49d6-4997-b4d7-05eff6432155"
src="https://github.com/user-attachments/assets/c2d6a5f5-d958-463e-959f-116bd0dab475"
/>

...the change will ultimately prevent update spam from consuming all of
the server's resources - instead allocating updates to the backburner in
times of high server stress (or on multi-z maps)

## Changelog

🆑 Melbert
refactor: Refactored the way camera updates are handled to hopefully
reduce some lag. Report any oddities
/🆑
2025-11-08 01:43:48 +01:00
Roxy 4c0b617752 Fix PDA RaptorDex being unclosable (#93818)
## About The Pull Request

PDA apps use `<NtosWindow>` instead of `<Window>` because the former
adds a header with an X button and system info, moves all the content of
the RaptorDex component to a new RaptorDexContent component, converts
`<RaptorDex>` to be just the `<Window>` tag and adds a NtosRaptorDex
component for PDAs that uses `<NtosWindow>` instead

## Why It's Good For The Game

Fixes #93761 

## Changelog
🆑
fix: fixed RaptorDex PDA app having no close button
/🆑
2025-11-08 00:36:41 +01:00
Roxy d0ca474789 Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-2025-11-05 2025-11-05 19:43:07 -05:00
tonty 14d2514aa9 [MDB IGNORE] Refactors away /area/station/ai_monitored and its subtypes (with bonus neat repathing) (#93704)
## About The Pull Request

/area/station/ai_monitored's behaviour was isolated into a component,
`/datum/component/monitored_area`, which itself uses
`/datum/motion_group`s to query cameras. Functionally, it (should) work
identically to the old implementation. I'm sure that behaviour could
have been further cleaned up, camera code is quite dreadful, but it's
better to focus on isolating the behaviour first. Baby steps.

Areas that want to opt into monitoring can set `var/motion_monitored` to
TRUE (this approach was taken to make subtyping easier).

The following non-AI areas were changed:
- /area/station/ai_monitored/security/armory ->
/area/station/security/armory
- /area/station/ai_monitored/command/nuke_storage ->
/area/station/command/vault
- /area/station/ai_monitored/command/storage/eva ->
/area/station/command/eva

All other `/area/station/ai_monitored` subtypes were repathed into
`/area/station/ai` and cleaned up in a way that I thought made logical
sense. It is **much** more readable now. For example:

- /area/station/ai_monitored/turret_protected/aisat ->
/area/station/ai/satellite
- /area/station/ai_monitored/command/storage/satellite ->
/area/station/ai/satellite/maintenance/storage
- /area/station/ai_monitored/turret_protected/ai ->
/area/station/ai/satellite/chamber
2025-11-03 11:27:14 -06:00
SmArtKar 1c6c506936 Raptor Rework - Ranching and Companionship (#93564) 2025-11-01 22:13:29 +11:00
OrbisAnima 54cb66c7be [Fix] Corrects exploit that allowed to use departamental budget to buy goodie items (#93668)
## About The Pull Request
Adds a check on wherever its self paid or not when buying stuff as self
paid on the budgetering pda program, so it works like a regular cargo
console

## Why It's Good For The Game
Well, behaviors should be consistent, and this looks more like an
oversight. Its also the only way to order goodies with departamental
budgets atm, and the comments on the goodies flag seem to heavily imply
the intent is for this not to happen.

## Proof of work

### Before

<img width="800" height="506" alt="image"
src="https://github.com/user-attachments/assets/6305531c-0b0e-4a25-bff8-7c20c8a72472"
/>


<img width="901" height="551" alt="image"
src="https://github.com/user-attachments/assets/c45e70a1-be6c-4513-b00a-87f2c098c577"
/>

### After

<img width="924" height="734" alt="image"
src="https://github.com/user-attachments/assets/e9862bf9-5ae7-4945-912c-08c509e18058"
/>

<img width="831" height="616" alt="image"
src="https://github.com/user-attachments/assets/4b66aa64-03cd-4724-913f-2fee5489d09f"
/>


## Changelog
🆑
fix: solves an exploit that allowed users to buy goodie packs with the
pda budget program
/🆑
2025-10-29 16:34:13 +01:00
Roxy e28e9fbdba Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-23-10-2025 2025-10-23 17:38:23 -04:00
SyncIt21 4c930567d8 Fixes pda internal cam app lagging the server (#93509)
- Fixes #93508

Does 2 things
- Makes the operation asynchronous so it does not interfere with the
server
- Ensures we don't click multiple photos while the single photo is still
processing. Displays a balloon alert for the same
2025-10-22 04:55:39 -04:00
Roxy d14e538393 Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-15-10-2025 2025-10-15 19:34:41 -04:00
ArcaneMusic bf4cc3e415 Cargo requests for other departments may now request they come out of the department budget. (#93152)
## About The Pull Request

When placing a cargo request as a non-cargo staff, you may now specify
which department you are requesting this for, which if approved will
bill that department from their budget. Requests placed this way will
need to be approved by cargo staff by default.

Originally I was going to tie this to my proposed rolling permission
system (Think an email chain where if things don't get approved, it goes
up a PDA Message chain until someone approves the thing), however I've
quite stalled on that and I wanted to at least get the baseline
functionality into people's hands.

Cargo, as per usual, has a right to refusal to reject the request as
well.

<img width="797" height="199" alt="image"
src="https://github.com/user-attachments/assets/19889b0a-8af5-4347-b91a-91cc39ab2bee"
/>
_WIP Photos, names/departments only show here as undefined due to being
admin spawned and not naturally spawned players_

## Why It's Good For The Game

Heads of staff can already order crates using their departmental
ordering apps and utilizing their funds, without needing QM approval.
This will allow for crewmembers within a department to request to
requisition supplies using their budget's funds as well.

As it stands, ordering from budget is already quite clunky, and being
able to go to cargo to place a request for your department should at
least elicit a conversation between heads of staff to see if it makes
sense. Keeping in mind, spending too much of a budget's funds can result
in failure to complete paychecks, so there is some conflict that can
arise from interacting with this mechanic too aggressively.

**I'll be real, there's a pretty good chance this may be too easy to use
and too powerful in it's current state.** If it needs something like the
additional rolling permissions system in place in the future, we may
want to re-assess at a later point.

## Changelog

🆑
qol: When placing cargo requests, you can now request that a crate be
obtained using your department's funds as opposed to the cargo budget.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2025-10-09 21:16:15 +02:00
xPokee 5e629dff04 Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-sync 2025-10-03 07:05:54 -04:00
Archemagus 6f834fb418 AAS code cleanup (#93158)
## About The Pull Request

- Added full support for RETA system
- Categorized all configs for search purposes
- Added channel check for most usages of get_announcement_system() calls
## Why It's Good For The Game
## Changelog
🆑
code: Little AAS code cleanup. Added full RETA support. Grouped configs
for search purposes.
/🆑
2025-10-02 18:17:38 +00:00
xPokee b308ee9d78 Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-sync 2025-09-24 10:13:01 -04:00
MrMelbert 750ca9d2ec Two as anything greps (and some other cleanup) (#92974) 2025-09-20 13:44:28 -04:00
xPokee 9b282a850e Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-sync 2025-09-17 11:45:44 -04:00
John Willard 76600a8f52 Adds a new default PDA theme and 3 new maint ones (#92968)
## About The Pull Request

Was looking at tgui core and found some themes that looked cool, so I
added them

New default theme, Bird
<img width="602" height="602" alt="image"
src="https://github.com/user-attachments/assets/5864a50b-efa8-4464-93eb-a124ba651b98"
/>

#### The rest are maint themes

Hackerman
<img width="601" height="598" alt="image"
src="https://github.com/user-attachments/assets/f1e68ace-eaee-4a1b-9574-7705a8d1be18"
/>

Roulette table
<img width="599" height="601" alt="image"
src="https://github.com/user-attachments/assets/12985c4d-a3d8-4f76-b212-d10fb92293c3"
/>

Alien
<img width="604" height="602" alt="image"
src="https://github.com/user-attachments/assets/d8933c03-47b4-4c04-932d-0649d3506c16"
/>

As always these are all available to the clear PDA by default.

## Why It's Good For The Game

They just looked nice, so why not

## Changelog

🆑
add: Added a new PDA theme and 3 secret ones you may find in
maintenance.
/🆑
2025-09-14 14:06:42 +02:00
nevimer b348b617a3 Merge branch 'master' of https://github.com/tgstation/tgstation into pupstream-2025-09-07
# Conflicts:
#	README.md
#	code/__DEFINES/admin.dm
#	code/__DEFINES/melee.dm
#	code/_globalvars/traits/_traits.dm
#	code/controllers/subsystem/economy.dm
#	code/datums/components/crafting/crafting.dm
#	code/datums/elements/crusher_loot.dm
#	code/modules/antagonists/pirate/pirate_shuttle_equipment.dm
#	code/modules/clothing/suits/_suits.dm
#	code/modules/escape_menu/leave_body.dm
#	code/modules/jobs/job_types/_job.dm
#	code/modules/mining/equipment/mineral_scanner.dm
#	code/modules/mob/living/living.dm
#	code/modules/plumbing/plumbers/pill_press.dm
#	tgui/packages/tgui/interfaces/Vending.tsx
2025-09-07 00:37:52 -04:00
Ghom c4f99f9370 The art gallery app can now be downloaded on PDAs and laptops (no printing) (#92615) 2025-08-26 22:53:55 -06:00
Lucy 9193a99c74 Pre-sort PDA messengers by name/job instead of sorting every time we list them (#92613)
## About The Pull Request

this gets rid of the `get_messengers_sorted_by_name` and
`get_messengers_sorted_by_job` procs, instead replacing them with two
new global lists: `GLOB.pda_messengers_by_name` and
`GLOB.pda_messengers_by_job`

those two lists are updated in the `add_messenger` proc, which uses the
binary insert macros to insert it into the properly sorted place.

why? bc sorts suck for performance and all inserts/removals to this list
go thru a single proc anyways, so we can just ensure it's sorted like
this once, instead of re-sorting each time.

thanks to @LemonInTheDark for helping me with this

<details>
<summary><h3>Testing Proof</h3></summary>

<img width="1708" height="1349" alt="2025-08-16 (1755391989) ~
dreamseeker"
src="https://github.com/user-attachments/assets/1e2dc99a-1863-4a35-8032-8ae64706fdaa"
/>

<img width="1708" height="1349" alt="2025-08-16 (1755392002) ~
dreamseeker"
src="https://github.com/user-attachments/assets/4d9b3bd0-7f3a-410b-a073-1bf2bd69690b"
/>

</details>

## Why It's Good For The Game

because doing a sort repeatedly whenever someone has their PDA messenger
open is stupid and sucks

## Changelog

no player-facing changes
2025-08-19 22:42:58 -04:00
tonyhawq d1afe39c0c Fixes an issue where called shuttles would say "1 minutes" instead of "1 minute" (#92539)
## About The Pull Request
<img width="397" height="190" alt="image"
src="https://github.com/user-attachments/assets/41e915bc-6d8c-4180-83f1-12380c76554c"
/>

<img width="220" height="112" alt="image"
src="https://github.com/user-attachments/assets/ef3aa542-e6e3-4983-8917-66009d4f843e"
/>

## Why It's Good For The Game
It. is good 👍 

## Changelog

🆑
spellcheck: shuttles will now say "arriving in 1 minute" instead of "1
minutes"
/🆑
2025-08-19 22:40:45 -04:00
MrMelbert f1234d1d3f Fix master skew (#92568)
Yippee
2025-08-19 22:39:36 -04:00
plsleavemealon de8695acf8 bounty app for PDA (#91802)
## About The Pull Request

This PR adds a brand new app to the PDA allowing you to view your
current bounties and even generate new ones.

You can even select a bounty remotely and it will seemlessly work.

The program is not without its own drawbacks. Choosing to reroll your
bounties from the app will always trigger a 5 minute cooldown, and this
cannot be reduced. Meaning that rerolling directly from the bounty
terminal (assuming it has been upgraded) is preferable as an upgraded
bounty pad will give the terminal a shorter cooldown. The cooldown is
shared between the app and the terminal, and depends on where you
initially rerolled it. So if you rerolled it from the app, it will
always be 5 minutes, but if you rerolled it from the terminal, it may be
as low as 2 minutes.

Otherwise it is identical to the way the bounty terminal functions,
minus the fact you cannot actually turn in the bounty using your PDA,
you still have to go to a terminal with connected bounty pad for that!

And in addition to that, in order for the app to work you must have your
ID inside your PDA, the app will not function without it (the top button
will be greyed out, and trying to push one of the options will just give
you a minor error sound)

Size is 5 GQ since that seemed like a good enough size for it.

## Why It's Good For The Game

It always annoyed me that I had to run all the way back to cargo to
check on what my bounties are, and this solves that. It also lets you
reroll your bounties remotely with a punishment of it always having the
default (5 min) waiting period between rerolls.

## Changelog

🆑
add: Adds a new bounty app to the PDA allowing you to remotely check
your bounties
/🆑

![image](https://github.com/user-attachments/assets/b0a10106-1c6d-4f9e-91b1-f95f8cc377cb)

![image](https://github.com/user-attachments/assets/c2cc8075-7314-48b1-a668-e7f8a44bc217)

![image](https://github.com/user-attachments/assets/9536b8cb-8c95-47ed-ba42-2a8d162123c7)

![image](https://github.com/user-attachments/assets/eb254331-35f0-413a-9b74-77c5f9ad6ccb)

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2025-08-19 22:39:35 -04:00
_0Steven 1718c70f2f Fixes newscaster channels having a random chance of breaking upon creation of a new channel, refactors how channels are tracked in the first place (#92371)
## About The Pull Request

So in a recent round I noticed the newscaster UI was acting kind of
funky, where two channels seemed to overlap and weirdly pick between the
two in unpredictable ways. Looking into it, it seemed that somehow the
channels had managed to get their unique IDs to overlap-
Oh.

https://github.com/tgstation/tgstation/blob/5d3353e7af2b88ab9379d5fb567b24afd8776acd/code/game/machinery/newscaster/newscaster_data.dm#L109-L131
I see.

...I think that code speaks for itself, in how this could've gone wrong.

Anyhow, in this pr we entirely ditch this system, and instead make it
use an incremental and thus guaranteed to be unique ID.
This fixes our issues.

While we're here, we also remove the unused `channel_IDs` list, and
replace it with the associative lists `network_channels_by_id` and
`network_channels_by_name`. This allows us to also stop iterating over
every network channel until we find the one with the right name or ID.
We also rename some confusing, wrong, or non-standard vars while we're
here.
2025-08-19 22:35:51 -04:00
MrMelbert 5f35bdee00 [MDB Ignore] Re-add hop console second ID slot (#92157)
## About The Pull Request

<img width="491" height="301" alt="image"
src="https://github.com/user-attachments/assets/a3b5b19f-edf5-4de9-9201-9cbfab9e8827"
/>

Mod computers with the access changing software installed have a
secondary ID slot once again. This ID slot doesn't contribute to access.
You can insert IDs into the slot with right click and remove them with
alt-right click.

Also removes the "New IDs and you" memo paper.

Also tweaks PDA on_deconstruct so contents are dropped on when they're
deconstructed with assembly.

Fixes #92151

## Why It's Good For The Game

Changing IDs is very unnecessarily clunky with the one slot. Insert hop
id, log in, remove hop id, insert crew id, change access, remove crew
id, log out.

We had it right back when we had two slots. Insert hop ID, insert crew
id, log in. It just works.

This also allows for mobile HoPs to change access without necessitating
removing their ID from their PDA.

Other changes:

The "New IDs and you" memo is very old. They haven't been new for 4
years now. I don't think anyone reads it and they served their purpose.

I found it odd that, if your PDA was melted or blown up, it would delete
your ID. If this is a hold-over from old PDA behavior feel free to let
me know but otherwise it seems sensible that it'd spit out the contents
as you would expect.

## Changelog

🆑 Melbert
qol: The access changing software (the HoP console) now has ID two slots
again (one for the HoP's id and one for the ID being changed). You can
insert IDs in the secondary slot via the UI or right click, and remove
them via the UI or alt-right click.
qol: If your PDA is destroyed via acid or bombs, your ID (and similar
contents such as disks) are spit out instead of being deleted
del: Deletes the "New IDs and you" memo in the HoP's office. They
haven't been new for 4 years.
fix: Engineering sub-tab in the access changing software no longer looks
messed up
fix: Fix reversed alt-click logic for mod pcs
/🆑
# Conflicts:
#	code/modules/modular_computers/computers/item/computer.dm
2025-08-19 22:32:57 -04:00
SyncIt21 8b0d22d14b General maintenance for vending machines (#91987)
## About The Pull Request
**1. Code Improvements**
- Removed unused vars `coin`, `bill` & other stuff
- Removed duplicate definition of `on_deconstruction()`
- Autodoc for a lot of procs
- Merged smaller procs into larger ones to avoid scrolling in the code
editor & reduced overhead
- Split the vending machine file into several smaller files for easy
code management

**2. Qol**
- Implemented vending machine ads. They now display random stuff on the
UI

https://github.com/user-attachments/assets/9720ea60-f268-4ca2-940d-243e3d0ac75f
- More error messages for custom & normal vendors as to why an item
could not be loaded
- Custom vending machines can be deconstructed safely via crowbar
without any explosion only after unlinking your account from the machine
else you get the same explosion. Upon deconstruction all loaded items
are moved into its restock canister meaning the machine can be safely
moved with all its products just like a regular vending machine to a new
location

**3. Fixes**
- Fixes #81917. Any returned items in the vending machine now show up as
free in the UI & won't cost credits to buy them
- Fixes #87416. Custom & normal vendors now keep track of products
removed via `Exited()` so the UI gets always updated
- Fixes #83151. Items with different names & custom prices now show up
in unique rows
- Fixes #92170 Custom vendors now show the correct icon for inserted
items
- Closes #80010. From the above fix this situation is impossible so it's
safe to close this as a duplicate
- Closes #78016 same problem as above with `Exited()` duplicate
- Custom vendors can now actually be used by players who are not the
owner instead of locking down the UI
- Vending machines keep track of `max_amount` of stocked items by hand
as well & not just RPED

**4. Refactor**
- Separates custom vending machine code from normal vending machine
code. This prime Marely focus on the `vending_machine_input` list which
now only exists inside the custom vending machine
- Compressed the UI code for vending machine so both custom & normal
vending machines can send the same data instead of separating the 2.
Overall less code
- Moved attack chain from `attackby()` to `item_interaction()` for
loading items

## Changelog
🆑
code: cleaned up vending machine code
qol: vending machines now have more product slogans you never heard
before
qol: custom & normal vending machines now have more feedback on why an
item could not be loaded
qol: vending machines now display random ads on the UI
qol: custom vending machines can be deconstructed via crowbar safely
only after unlinking your account from the machine.
qol: upon deconstructing a custom vendor all its products are moved into
its refill canister & it will be restored when reconstructing the
machine elsewhere
fix: Returned items to the vending machine now show up as free in the UI
and won't be greyed out if you don't have credits to get them back
fix: items that leave the vending machine by any means will update the
UI in all cases
fix: loading items by hand to the vending machine now respects the
max_amount for that category
fix: custom vendors can now actually be used by players who are not the
owner thus enabling them to transfer credits to the owner during
purchases & basically they do their job again
fix: custom vendors now show the correct icon for inserted items
fix: Items with different names & custom prices now show up in unique
rows in custom vendors
refactor: separated custom & normal vending machine code. Reduced UI
code & improved attack chain
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
# Conflicts:
#	code/modules/vending/_vending.dm
#	tgui/packages/tgui/interfaces/Vending.tsx
2025-08-19 22:28:01 -04:00
Lucy 5d8bddfcf4 Pre-sort PDA messengers by name/job instead of sorting every time we list them (#92613)
## About The Pull Request

this gets rid of the `get_messengers_sorted_by_name` and
`get_messengers_sorted_by_job` procs, instead replacing them with two
new global lists: `GLOB.pda_messengers_by_name` and
`GLOB.pda_messengers_by_job`

those two lists are updated in the `add_messenger` proc, which uses the
binary insert macros to insert it into the properly sorted place.

why? bc sorts suck for performance and all inserts/removals to this list
go thru a single proc anyways, so we can just ensure it's sorted like
this once, instead of re-sorting each time.

thanks to @LemonInTheDark for helping me with this

<details>
<summary><h3>Testing Proof</h3></summary>

<img width="1708" height="1349" alt="2025-08-16 (1755391989) ~
dreamseeker"
src="https://github.com/user-attachments/assets/1e2dc99a-1863-4a35-8032-8ae64706fdaa"
/>

<img width="1708" height="1349" alt="2025-08-16 (1755392002) ~
dreamseeker"
src="https://github.com/user-attachments/assets/4d9b3bd0-7f3a-410b-a073-1bf2bd69690b"
/>

</details>

## Why It's Good For The Game

because doing a sort repeatedly whenever someone has their PDA messenger
open is stupid and sucks

## Changelog

no player-facing changes
2025-08-18 00:15:18 +02:00
tonyhawq 48fc67f7bb Fixes an issue where called shuttles would say "1 minutes" instead of "1 minute" (#92539)
## About The Pull Request
<img width="397" height="190" alt="image"
src="https://github.com/user-attachments/assets/41e915bc-6d8c-4180-83f1-12380c76554c"
/>

<img width="220" height="112" alt="image"
src="https://github.com/user-attachments/assets/ef3aa542-e6e3-4983-8917-66009d4f843e"
/>

## Why It's Good For The Game
It. is good 👍 

## Changelog

🆑
spellcheck: shuttles will now say "arriving in 1 minute" instead of "1
minutes"
/🆑
2025-08-15 04:22:08 +02:00
MrMelbert f1234ac5d0 Fix master skew (#92568)
Yippee
2025-08-14 11:03:33 +12:00
plsleavemealon 574595529f bounty app for PDA (#91802)
## About The Pull Request

This PR adds a brand new app to the PDA allowing you to view your
current bounties and even generate new ones.

You can even select a bounty remotely and it will seemlessly work.

The program is not without its own drawbacks. Choosing to reroll your
bounties from the app will always trigger a 5 minute cooldown, and this
cannot be reduced. Meaning that rerolling directly from the bounty
terminal (assuming it has been upgraded) is preferable as an upgraded
bounty pad will give the terminal a shorter cooldown. The cooldown is
shared between the app and the terminal, and depends on where you
initially rerolled it. So if you rerolled it from the app, it will
always be 5 minutes, but if you rerolled it from the terminal, it may be
as low as 2 minutes.

Otherwise it is identical to the way the bounty terminal functions,
minus the fact you cannot actually turn in the bounty using your PDA,
you still have to go to a terminal with connected bounty pad for that!

And in addition to that, in order for the app to work you must have your
ID inside your PDA, the app will not function without it (the top button
will be greyed out, and trying to push one of the options will just give
you a minor error sound)

Size is 5 GQ since that seemed like a good enough size for it.

## Why It's Good For The Game

It always annoyed me that I had to run all the way back to cargo to
check on what my bounties are, and this solves that. It also lets you
reroll your bounties remotely with a punishment of it always having the
default (5 min) waiting period between rerolls.

## Changelog

🆑
add: Adds a new bounty app to the PDA allowing you to remotely check
your bounties
/🆑

![image](https://github.com/user-attachments/assets/b0a10106-1c6d-4f9e-91b1-f95f8cc377cb)

![image](https://github.com/user-attachments/assets/c2cc8075-7314-48b1-a668-e7f8a44bc217)

![image](https://github.com/user-attachments/assets/9536b8cb-8c95-47ed-ba42-2a8d162123c7)

![image](https://github.com/user-attachments/assets/eb254331-35f0-413a-9b74-77c5f9ad6ccb)

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2025-08-13 15:08:48 -04:00
_0Steven 69bd91b2f4 Fixes newscaster channels having a random chance of breaking upon creation of a new channel, refactors how channels are tracked in the first place (#92371)
## About The Pull Request

So in a recent round I noticed the newscaster UI was acting kind of
funky, where two channels seemed to overlap and weirdly pick between the
two in unpredictable ways. Looking into it, it seemed that somehow the
channels had managed to get their unique IDs to overlap-
Oh.

https://github.com/tgstation/tgstation/blob/5d3353e7af2b88ab9379d5fb567b24afd8776acd/code/game/machinery/newscaster/newscaster_data.dm#L109-L131
I see.

...I think that code speaks for itself, in how this could've gone wrong.

Anyhow, in this pr we entirely ditch this system, and instead make it
use an incremental and thus guaranteed to be unique ID.
This fixes our issues.

While we're here, we also remove the unused `channel_IDs` list, and
replace it with the associative lists `network_channels_by_id` and
`network_channels_by_name`. This allows us to also stop iterating over
every network channel until we find the one with the right name or ID.
We also rename some confusing, wrong, or non-standard vars while we're
here.
2025-08-12 16:22:35 -05:00
MrMelbert 5df4de3f71 [MDB Ignore] Re-add hop console second ID slot (#92157)
## About The Pull Request

<img width="491" height="301" alt="image"
src="https://github.com/user-attachments/assets/a3b5b19f-edf5-4de9-9201-9cbfab9e8827"
/>

Mod computers with the access changing software installed have a
secondary ID slot once again. This ID slot doesn't contribute to access.
You can insert IDs into the slot with right click and remove them with
alt-right click.

Also removes the "New IDs and you" memo paper. 

Also tweaks PDA on_deconstruct so contents are dropped on when they're
deconstructed with assembly.

Fixes #92151

## Why It's Good For The Game

Changing IDs is very unnecessarily clunky with the one slot. Insert hop
id, log in, remove hop id, insert crew id, change access, remove crew
id, log out.

We had it right back when we had two slots. Insert hop ID, insert crew
id, log in. It just works.

This also allows for mobile HoPs to change access without necessitating
removing their ID from their PDA.

Other changes: 

The "New IDs and you" memo is very old. They haven't been new for 4
years now. I don't think anyone reads it and they served their purpose.

I found it odd that, if your PDA was melted or blown up, it would delete
your ID. If this is a hold-over from old PDA behavior feel free to let
me know but otherwise it seems sensible that it'd spit out the contents
as you would expect.

## Changelog

🆑 Melbert
qol: The access changing software (the HoP console) now has ID two slots
again (one for the HoP's id and one for the ID being changed). You can
insert IDs in the secondary slot via the UI or right click, and remove
them via the UI or alt-right click.
qol: If your PDA is destroyed via acid or bombs, your ID (and similar
contents such as disks) are spit out instead of being deleted
del: Deletes the "New IDs and you" memo in the HoP's office. They
haven't been new for 4 years.
fix: Engineering sub-tab in the access changing software no longer looks
messed up
fix: Fix reversed alt-click logic for mod pcs
/🆑
2025-08-11 19:08:18 +00:00
SyncIt21 0b6101a37e General maintenance for vending machines (#91987)
## About The Pull Request
**1. Code Improvements**
- Removed unused vars `coin`, `bill` & other stuff
- Removed duplicate definition of `on_deconstruction()`
- Autodoc for a lot of procs
- Merged smaller procs into larger ones to avoid scrolling in the code
editor & reduced overhead
- Split the vending machine file into several smaller files for easy
code management

**2. Qol**
- Implemented vending machine ads. They now display random stuff on the
UI


https://github.com/user-attachments/assets/9720ea60-f268-4ca2-940d-243e3d0ac75f
- More error messages for custom & normal vendors as to why an item
could not be loaded
- Custom vending machines can be deconstructed safely via crowbar
without any explosion only after unlinking your account from the machine
else you get the same explosion. Upon deconstruction all loaded items
are moved into its restock canister meaning the machine can be safely
moved with all its products just like a regular vending machine to a new
location

**3. Fixes**
- Fixes #81917. Any returned items in the vending machine now show up as
free in the UI & won't cost credits to buy them
- Fixes #87416. Custom & normal vendors now keep track of products
removed via `Exited()` so the UI gets always updated
- Fixes #83151. Items with different names & custom prices now show up
in unique rows
- Fixes #92170 Custom vendors now show the correct icon for inserted
items
- Closes #80010. From the above fix this situation is impossible so it's
safe to close this as a duplicate
- Closes #78016 same problem as above with `Exited()` duplicate
- Custom vendors can now actually be used by players who are not the
owner instead of locking down the UI
- Vending machines keep track of `max_amount` of stocked items by hand
as well & not just RPED

**4. Refactor**
- Separates custom vending machine code from normal vending machine
code. This prime Marely focus on the `vending_machine_input` list which
now only exists inside the custom vending machine
- Compressed the UI code for vending machine so both custom & normal
vending machines can send the same data instead of separating the 2.
Overall less code
- Moved attack chain from `attackby()` to `item_interaction()` for
loading items

## Changelog
🆑
code: cleaned up vending machine code
qol: vending machines now have more product slogans you never heard
before
qol: custom & normal vending machines now have more feedback on why an
item could not be loaded
qol: vending machines now display random ads on the UI
qol: custom vending machines can be deconstructed via crowbar safely
only after unlinking your account from the machine.
qol: upon deconstructing a custom vendor all its products are moved into
its refill canister & it will be restored when reconstructing the
machine elsewhere
fix: Returned items to the vending machine now show up as free in the UI
and won't be greyed out if you don't have credits to get them back
fix: items that leave the vending machine by any means will update the
UI in all cases
fix: loading items by hand to the vending machine now respects the
max_amount for that category
fix: custom vendors can now actually be used by players who are not the
owner thus enabling them to transfer credits to the owner during
purchases & basically they do their job again
fix: custom vendors now show the correct icon for inserted items
fix: Items with different names & custom prices now show up in unique
rows in custom vendors
refactor: separated custom & normal vending machine code. Reduced UI
code & improved attack chain
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2025-08-11 14:37:13 +02:00
MrMelbert e0bdfc3f5f Dynamic Rework (#91290)
Implements https://hackmd.io/@tgstation/SkeUS7lSp , rewriting Dynamic
from the ground-up

- Dynamic configuration is now vastly streamlined, making it far far far
easier to understand and edit

- Threat is gone entirely; round chaos is now determined by dynamic
tiers
   - There's 5 dynamic tiers, 0 to 4.
      - 0 is a pure greenshift.
- Tiers are just picked via weight - "16% chance of getting a high chaos
round".
- Tiers have min pop ranges. "Tier 4 (high chaos) requires 25 pop to be
selected".
- Tier determines how much of every ruleset is picked. "Tier 4 (High
Chaos) will pick 3-4 roundstart[1], 1-2 light, 1-2 heavy, and 2-3
latejoins".
- The number of rulesets picked depends on how many people are in the
server - this is also configurable[2]. As an example, a tier that
demands "1-3" rulesets will not spawn 3 rulesets if population <= 40 and
will not spawn 2 rulesets if population <= 25.
- Tiers also determine time before light, heavy, and latejoin rulesets
are picked, as well as the cooldown range between spawns. More chaotic
tiers may send midrounds sooner or wait less time between sending them.

- On the ruleset side of things, "requirements", "scaling", and
"enemies" is gone.
- You can configure a ruleset's min pop and weight flat, or per tier.
- For example a ruleset like Obsession is weighted higher for tiers 1-2
and lower for tiers 3-4.
- Rather than scaling up, roundstart rulesets can just be selected
multiple times.
- Rulesets also have `min_antag_cap` and `max_antag_cap`.
`min_antag_cap` determines how many candidates are needed for it to run,
and `max_antag_cap` determines how many candidates are selected.

- Rulesets attempt to run every 2.5 minutes. [3]

- Light rulesets will ALWAYS be picked before heavy rulesets. [4]

- Light injection chance is no longer 100%, heavy injection chance
formula has been simplified.
- Chance simply scales based on number of dead players / total number
off players, with a flag 50% chance if no antags exist. [5]

[1] This does not guarantee you will actually GET 3-4 roundstart
rulesets. If a roundstart ruleset is picked, and it ends up being unable
to execute (such as "not enough candidates", that slot is effectively a
wash.) This might be revisited.

[2] Currently, this is a hard limit - below X pop, you WILL get a
quarter or a half of the rulesets. This might be revisited to just be
weighted - you are just MORE LIKELY to get a quarter or a half.

[3] Little worried about accidentally frontloading everything so we'll
see about this

[4] This may be revisited but in most contexts it seems sensible.

[5] This may also be revisited, I'm not 100% sure what the best / most
simple way to tackle midround chances is.

Other implementation details

- The process of making rulesets has been streamlined as well. Many
rulesets only amount to a definition and `assign_role`.

- Dynamic.json -> Dynamic.toml

- Dynamic event hijacked was ripped out entirely.
- Most midround antag random events are now dynamic rulesets. Fugitives,
Morphs, Slaughter Demons, etc.
      - The 1 weight slaughter demon event is gone. RIP in peace.
- There is now a hidden midround event that simply adds +1 latejoin, +1
light, or +1 heavy ruleset.

- `mind.special_role` is dead. Minds have a lazylist of special roles
now but it's essentially only used for traitor panel.

- Revs refactored almost entirely. Revs can now exist without a dynamic
ruleset.

- Cult refactored a tiny bit.

- Antag datums cleaned up.

- Pre round setup is less centralized on Dynamic.

- Admins have a whole panel for interfacing with dynamic. It's pretty
slapdash I'm sure someone could make a nicer looking one.

![image](https://github.com/user-attachments/assets/e99ca607-20b0-4d30-ab4a-f602babe7ac7)

![image](https://github.com/user-attachments/assets/470c3c20-c354-4ee6-b63b-a8f36dda4b5c)

- Maybe some other things.

See readme for more info.

Will you see a massive change in how rounds play out? My hunch says
rounds will spawn less rulesets on average, but it's ultimately to how
it's configured

🆑 Melbert
refactor: Dynamic rewritten entirely, report any strange rounds
config: Dynamic config reworked, it's now a TOML file
refactor: Refactored antag roles somewhat, report any oddities
refactor: Refactored Revolution entirely, report any oddities
del: Deleted most midround events that spawn antags - they use dynamic
rulesets now
add: Dynamic rulesets can now be false alarms
add: Adds a random event that gives dynamic the ability to run another
ruleset later
admin: Adds a panel for messing around with dynamic
admin: Adds a panel for chance for every dynamic ruleset to be selected
admin: You can spawn revs without using dynamic now
fix: Nuke team leaders get their fun title back
/🆑

(cherry picked from commit 4c277dc572)
2025-06-26 20:12:17 -04:00
MrMelbert 4c277dc572 Dynamic Rework (#91290)
## About The Pull Request

Implements https://hackmd.io/@tgstation/SkeUS7lSp , rewriting Dynamic
from the ground-up

- Dynamic configuration is now vastly streamlined, making it far far far
easier to understand and edit

- Threat is gone entirely; round chaos is now determined by dynamic
tiers
   - There's 5 dynamic tiers, 0 to 4.
      - 0 is a pure greenshift.
- Tiers are just picked via weight - "16% chance of getting a high chaos
round".
- Tiers have min pop ranges. "Tier 4 (high chaos) requires 25 pop to be
selected".
- Tier determines how much of every ruleset is picked. "Tier 4 (High
Chaos) will pick 3-4 roundstart[1], 1-2 light, 1-2 heavy, and 2-3
latejoins".
- The number of rulesets picked depends on how many people are in the
server - this is also configurable[2]. As an example, a tier that
demands "1-3" rulesets will not spawn 3 rulesets if population <= 40 and
will not spawn 2 rulesets if population <= 25.
- Tiers also determine time before light, heavy, and latejoin rulesets
are picked, as well as the cooldown range between spawns. More chaotic
tiers may send midrounds sooner or wait less time between sending them.

- On the ruleset side of things, "requirements", "scaling", and
"enemies" is gone.
- You can configure a ruleset's min pop and weight flat, or per tier.
- For example a ruleset like Obsession is weighted higher for tiers 1-2
and lower for tiers 3-4.
- Rather than scaling up, roundstart rulesets can just be selected
multiple times.
- Rulesets also have `min_antag_cap` and `max_antag_cap`.
`min_antag_cap` determines how many candidates are needed for it to run,
and `max_antag_cap` determines how many candidates are selected.

- Rulesets attempt to run every 2.5 minutes. [3]

- Light rulesets will ALWAYS be picked before heavy rulesets. [4]

- Light injection chance is no longer 100%, heavy injection chance
formula has been simplified.
- Chance simply scales based on number of dead players / total number
off players, with a flag 50% chance if no antags exist. [5]

[1] This does not guarantee you will actually GET 3-4 roundstart
rulesets. If a roundstart ruleset is picked, and it ends up being unable
to execute (such as "not enough candidates", that slot is effectively a
wash.) This might be revisited.

[2] Currently, this is a hard limit - below X pop, you WILL get a
quarter or a half of the rulesets. This might be revisited to just be
weighted - you are just MORE LIKELY to get a quarter or a half.

[3] Little worried about accidentally frontloading everything so we'll
see about this

[4] This may be revisited but in most contexts it seems sensible. 

[5] This may also be revisited, I'm not 100% sure what the best / most
simple way to tackle midround chances is.

Other implementation details

- The process of making rulesets has been streamlined as well. Many
rulesets only amount to a definition and `assign_role`.

- Dynamic.json -> Dynamic.toml

- Dynamic event hijacked was ripped out entirely.
- Most midround antag random events are now dynamic rulesets. Fugitives,
Morphs, Slaughter Demons, etc.
      - The 1 weight slaughter demon event is gone. RIP in peace. 
- There is now a hidden midround event that simply adds +1 latejoin, +1
light, or +1 heavy ruleset.

- `mind.special_role` is dead. Minds have a lazylist of special roles
now but it's essentially only used for traitor panel.

- Revs refactored almost entirely. Revs can now exist without a dynamic
ruleset.

- Cult refactored a tiny bit. 

- Antag datums cleaned up.

- Pre round setup is less centralized on Dynamic.

- Admins have a whole panel for interfacing with dynamic. It's pretty
slapdash I'm sure someone could make a nicer looking one.


![image](https://github.com/user-attachments/assets/e99ca607-20b0-4d30-ab4a-f602babe7ac7)


![image](https://github.com/user-attachments/assets/470c3c20-c354-4ee6-b63b-a8f36dda4b5c)

- Maybe some other things.

## Why It's Good For The Game

See readme for more info.

Will you see a massive change in how rounds play out? My hunch says
rounds will spawn less rulesets on average, but it's ultimately to how
it's configured

## Changelog

🆑 Melbert
refactor: Dynamic rewritten entirely, report any strange rounds
config: Dynamic config reworked, it's now a TOML file
refactor: Refactored antag roles somewhat, report any oddities
refactor: Refactored Revolution entirely, report any oddities
del: Deleted most midround events that spawn antags - they use dynamic
rulesets now
add: Dynamic rulesets can now be false alarms
add: Adds a random event that gives dynamic the ability to run another
ruleset later
admin: Adds a panel for messing around with dynamic
admin: Adds a panel for chance for every dynamic ruleset to be selected
admin: You can spawn revs without using dynamic now
fix: Nuke team leaders get their fun title back
/🆑
2025-06-25 17:36:10 -07:00
SyncIt21 ef5b60a920 Stacks check for invalid amounts (#91656)
## About The Pull Request
Alleviates #91603

As in it does not fix it because i have not been able to reproduce it.
It now checks for invalid values and defaults to `amount`(which is 1)
during `Initialize()` and not null so we don't have to pass the number
`1` when creating a single sheet.
 
A stack trace is thrown for <= 0 sheet amounts so we can debug & fix
stuff

## Changelog
🆑
code: stacks error on invalid amounts, removed manual passing of number
`1` when creating a single stack in many cases
/🆑
2025-06-21 22:21:56 -04:00
SyncIt21 ff13dcadab Stacks check for invalid amounts (#91656)
## About The Pull Request
Alleviates #91603

As in it does not fix it because i have not been able to reproduce it.
It now checks for invalid values and defaults to `amount`(which is 1)
during `Initialize()` and not null so we don't have to pass the number
`1` when creating a single sheet.
 
A stack trace is thrown for <= 0 sheet amounts so we can debug & fix
stuff

## Changelog
🆑
code: stacks error on invalid amounts, removed manual passing of number
`1` when creating a single stack in many cases
/🆑
2025-06-18 15:28:35 +02:00
Roxy da09e8627b Infinite credit dupe trick patch [100% working] [June 2025] [No download] [Link in video description] (#91455)
So it turns out the spacebet app verifies that the user has the money to
make a bet only if they already have an active bet and they're
increasing the amount of money it is, with a fresh bet this is never
checked. This means someone can bet 10k credits on an option, it will
place the bet with no regard for their account balance, then they can
set their bet back to zero and the app will happily refund them 10k. Now
they have 10k. They can do this as fast as they can type the numbers
2025-06-05 20:05:20 -04:00
Bloop c906b85d30 Audits wash/cleaning signals + refactors wash() to ensure no needless mob updates occur (#91259)
## About The Pull Request

This has the potential to create a lot of needless mob updates which is
not great. Now should only update a mob's clothing if it was actually
washed.

This PR

1) ensures that all wash() procs return a bitflag.
2) ensures that `wash()` proccalls which result in expensive operations
like icon updates only do so when it is necessary

## Why It's Good For The Game

Updating mob sprites is expensive, and doing it when nothing has been
changed is bad.

## Changelog

Nothing really player facing
2025-06-05 20:05:19 -04:00
Roxy 0cac77b7cc Infinite credit dupe trick patch [100% working] [June 2025] [No download] [Link in video description] (#91455)
So it turns out the spacebet app verifies that the user has the money to
make a bet only if they already have an active bet and they're
increasing the amount of money it is, with a fresh bet this is never
checked. This means someone can bet 10k credits on an option, it will
place the bet with no regard for their account balance, then they can
set their bet back to zero and the app will happily refund them 10k. Now
they have 10k. They can do this as fast as they can type the numbers
2025-06-04 14:02:51 -04:00
Bloop 2bae025bfe Audits wash/cleaning signals + refactors wash() to ensure no needless mob updates occur (#91259)
## About The Pull Request

This has the potential to create a lot of needless mob updates which is
not great. Now should only update a mob's clothing if it was actually
washed.

This PR

1) ensures that all wash() procs return a bitflag.
2) ensures that `wash()` proccalls which result in expensive operations
like icon updates only do so when it is necessary

## Why It's Good For The Game

Updating mob sprites is expensive, and doing it when nothing has been
changed is bad.

## Changelog

Nothing really player facing
2025-06-02 18:54:53 +00:00
John Willard 0ed79656bf Adds a sports betting/polling app (#90421)
Adds a new PDA app that allows you to create polls that people can bet
on with credits, the owner can then lock the bets, decide what the
answer is (up to the player for whatever poll they made), and send it
off, giving the money the losers bet into the accounts of the winners.

It's a small PDA app that currently doesn't make any announcements or
come preinstalled in anything, but that's subject to change. PDA screen
sprite is codersprited.

Video demonstration

https://github.com/user-attachments/assets/449e1f0b-7fd3-4948-bff8-2793af831360

Not shown (as I added later), it now uses newscasters as well.

![image](https://github.com/user-attachments/assets/d3defa60-03cc-4557-98b7-b4088b158b3d)

https://forums.tgstation13.org/viewtopic.php?t=38278

Allows people to host polls for station events, allowing for the SS13
version of sports betting.

🆑
add: Adds a new sports betting app on your PDA, you can now host and
vote on polls using in-game credits.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2025-04-29 17:49:24 -06:00
John Willard 0f9343bbe3 Adds a notification to silicon/drones being watched (#90471)
## About The Pull Request

Cyborgs now have an alert that shows when someone is watching their
internal camera through a security camera console. SyndEye is excluded
from this as it's spying instead.
Made as an alternative to
https://github.com/tgstation/tgstation/pull/90410 but they also aren't
mutually exclusive, though I have the same fix for borg camera cutting
in this one too.


https://github.com/user-attachments/assets/5dfe92f8-8948-4a80-bb64-cbeaca4f80e0

##### This is part of the same code bounty as
https://github.com/tgstation/tgstation/pull/90410

## Why It's Good For The Game

Pretty much the same reason this PR is an alternative to, it's hard for
borgs to get away with doing antagonist stuff when people are able to
silently watch them at any point from any console or laptop laying
around the station, of which there are many. This hopefully lets borgs
know if someone is watching, to avoid doing anything in front of the
cameras, and to encourage them to get said cameras cut if they plan on
doing anything.

## Changelog

🆑
add: Drones now have internal cameras that shows up on camera consoles
(like Cyborgs)
balance: Cyborgs (and drones) now get a notification when someone is
watching them through a security camera console.
fix: Cutting a Cyborg's camera wire now properly disables it, and
mending it now properly re-enables it.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2025-04-29 17:45:29 -06:00
TiviPlus f1f611e500 Force UTC±0 for time2text logging and IC times (#90347)
## About The Pull Request
This won't actually do anything on live, since those are all set to
UTC±0 currently

Pins logging and IC uses of time2text to UTC±0 instead of using the
system timezone (byond default)
Timezones not being set to utc0 caused issues before (and is again)

All timezones are now passed explicitly to make it more likely it's
cargo culted properly at least

Deletes worldtime2text cus it was gameTimestamp default args

## Why It's Good For The Game
Server timezone changes probably shouldn't affect logging, round times,
file hashes, IC time, when you caught fish, etc

## Changelog
🆑
refactor: Logging and IC timestamps will now always use UTC±0 and not be
affected by server system timezone changes
fix: Station and round times will not longer be incorrect if the system
timezone is not UTC±0
/🆑

---------

Co-authored-by: TiviPlus <572233640+TiviPlus@users.noreply.com>
2025-04-29 17:08:34 -06:00
ArrisFairburne e1ad1df2cb Synth brain messenger notif (#3510)
## About The Pull Request

Getting a message to your brain PDA, as a synth, will now show the
detailed messenger app chat message (instead of the notification sound
only).
## Why It's Good For The Game

Convenience, so synth crew know more easily when they get a message on
their brain PDAs.
## Proof Of Testing
<details>
<summary>Screenshots/Videos</summary>
Did this with the roundstart RD PDA and a synthetic character's brain
PDA. The message with the positronic brain icon (it is fuckin small)
indicates it comes from the synth brain.


![image](https://github.com/user-attachments/assets/4e894b8e-e825-49dc-8a66-cc15a2ad3d2b)

</details>

## Changelog
🆑
qol: synth brain PDAs now have the detailed NTOS messenger notification
to their brain owners
/🆑
2025-04-22 14:07:33 -04:00