Commit Graph

800 Commits

Author SHA1 Message Date
StaringGasMask
0783e99c23 Changes the description of the Modular Console machine (#92109) 2025-07-15 21:09:01 -04:00
Lucy
a2a43e2851 Fix some new dreamchecker lints (#91844)
## About The Pull Request

https://github.com/SpaceManiac/SpacemanDMM/pull/435 added a new
dreamchecker lint, for SDMM `set` statements not at the top of the proc.

While this lint isn't in the current SDMM _release_, I was testing it
out earlier and saw these issues, so might as well fix them before they
even become an issue.

i also fixed a useless variable in moon heretic code that was right next
to the incorrectly placed `SIGNAL_HANDLER`

## Why It's Good For The Game


https://github.com/user-attachments/assets/5b063f41-32f3-490a-b0a3-199ca8147ec3

## Changelog

No player-facing changes.
2025-06-27 16:16:12 -06: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
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
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
SmArtKar
16d80d9be0 Fixes speed potions behaving super inconsistently on magboots, duffelbags and laptops (#91415)
## About The Pull Request

The issue was threefold, first speed potions sent the comsig before
actually applying which could be abused to make items not have a
slowdown without spending it or coloring them by using it on them in a
state when they don't have a slowdown (i.e. disabled magboots). Magboots
``initial()``'d their slowdown which could break them if they somehow
got it negative, but I believe that didn't happen in actual gameplay.
And I've made duffelbags and laptops have their open slowdown set to 0
similarly to magboots when a speed potion is applied to them. Last one
may be a balance change, depending on the original intent, but I'm going
off their pre-rework behavior here (and it generally feels weird to be
the case when they get unslowdowned and then it gets reapplied when you
close and open them)

- Closes #91381

## Changelog
🆑
fix: Fixed speed potions behaving super inconsistently on magboots,
duffelbags and laptops
/🆑
2025-06-01 22:30:32 +00:00
Bloop
cb51a652a9 Adds automatic GAGS icon generation for mapping and the loadout menu (#90940)
## About The Pull Request

Revival of https://github.com/tgstation/tgstation/pull/86482, which is
even more doable now that we have rustg iconforge generation.

What this PR does:

- Sets up every single GAGS icon in the game to have their own preview
icon autogenerated during compile. This is configurable to not run
during live. The icons are created in `icons/map_icons/..`
- This also has the side effect of providing accurate GAGS icons for
things like the loadout menu. No more having to create your own
previews.


![FOuGL6ofxC](https://github.com/user-attachments/assets/e5414971-7f13-4883-9f7f-a8a212b46fe8)

<details><summary>Mappers rejoice!</summary>


![StrongDMM_1oeMSoRHXT](https://github.com/user-attachments/assets/83dcfe4c-31be-4953-98f3-dff90268bbc4)


![StrongDMM_uyqu3CggPn](https://github.com/user-attachments/assets/7896f99e-2656-40e1-a9da-3a513882365a)

</details>

<details><summary>Uses iconforge so it does not take up much time during
init</summary>


![dreamdaemon_u4Md3Dqwge](https://github.com/user-attachments/assets/17baaff8-5d5e-4a4d-ba8f-9dd548024155)

</details>

---

### Copied from https://github.com/tgstation/tgstation/pull/86482 as
this still applies:

Note for Spriters:

After you've assigned the correct values to vars, you must run the game
through init on your local machine and commit the changes to the map
icon dmi files. Unit tests should catch all cases of forgetting to
assign the correct vars, or not running through init.

Note for Server Operators:

In order to not generate these icons on live I've added a new config
entry which should be disabled on live called GENERATE_ASSETS_IN_INIT in
the config.txt


## Why It's Good For The Game

No more error icons in SDMM and loadout.

## Changelog

🆑
refactor: preview icons for greyscale items are now automatically
generated, meaning you can see GAGS as they actually appear ingame while
mapping or viewing the loadout menu.
/🆑

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2025-05-24 15:21:02 -07:00
Aliceee2ch
ef26549017 Adding a few checks for machines that use disks (#91278)
## About The Pull Request

Fixes a bug(?) where you, being non-carbon, could teleport disks from
various machines to your location (for example, playing as an AI or
cyborg, carbons with telekinesis too)

## Why It's Good For The Game

teleporting disks is bad...

## Changelog

🆑
fix: Now if you are not near the console the disk will drop in its place
instead of your location
/🆑
2025-05-22 18:19:38 +00:00
MrMelbert
5261efb67f Re-refactors batons / Refactors attack chain force modifiers (#90809)
## About The Pull Request

Melee attack chain now has a list passed along with it,
`attack_modifiers`, which you can stick force modifiers to change the
resulting attack

This is basically a soft implementation of damage packets until a more
definitive pr, but one that only applies to item attack chain, and not
unarmed attacks.

This change was done to facilitate a baton refactor - batons no longer
hack together their own attack chain, and are now integrated straight
into the real attack chain. This refactor itself was done because batons
don't send any attack signals, which has been annoying in the past (for
swing combat).

## Changelog

🆑 Melbert
refactor: Batons have been refactored again. Baton stuns now properly
count as an attack, when before it was a nothing. Report any oddities,
particularly in regards to harmbatonning vs normal batonning.
refactor: The method of adjusting item damage mid-attack has been
refactored - some affected items include the Nullblade and knives.
Report any strange happenings with damage numbers.
refactor: A few objects have been moved to the new interaction chain -
records consoles, mawed crucible, alien weeds and space vines, hedges,
restaurant portals, and some mobs - to name a few.
fix: Spears only deal bonus damage against secure lockers, not all
closet types (including crates)
/🆑
2025-05-19 13:32:12 +10:00
Hardly3D
56c3cf8925 Adds sound when inserting paper into a computer (#90865)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
Adds a new sound that is played when a paper or a paper bin is inserted
into a computer's printer.



https://github.com/user-attachments/assets/58aebfd0-1c82-494e-9707-8745e2de1f23


<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game

<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->
Immersion, silent printers are a bit boring. It should also give off
some retro futuristic vibes that the game aims to have.

## Changelog

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

🆑 Hardly
sound: added new sounds for the computer printer when paper is inserted.
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
2025-05-03 02:50:30 +02:00
Ghom
339616ae78 You can now interact with held mobs beside wearing them (feat: "minor" melee attack chain cleanup) (#90080)
## About The Pull Request
People can now pet held mothroaches and pugs if they want to, or use
items on them, hopefully without causing many issues. After all, it only
took about a couple dozen lines of code to make...

...Oh, did the 527 files changed or the 850~ lines added/removed perhaps
catch your eye? Made you wonder if I accidentally pushed the wrong
branch? or skewed something up big time? Well, nuh uh. I just happen to
be fed up with the melee attack chain still using stringized params
instead of an array/list. It was frankly revolting to see how I'd have
had to otherwise call `list2params` for what I'm trying to accomplish
here, and make this PR another tessera to the immense stupidity of our
attack chain procs calling `params2list` over and over and over instead
of just using that one call instance from `ClickOn` as an argument. It's
2025, honey, wake up!

I also tried to replace some of those single letter vars/args but there
are just way too many of them.

## Why It's Good For The Game
Improving old code. And I want to be able to pet mobroaches while
holding them too.

## Changelog

🆑
qol: You can now interact with held mobs in more ways beside wearing
them.
/🆑
2025-04-23 20:18:26 +00:00
John Willard
b25d7cb2cb Adds a sports betting/polling app (#90421)
## About The Pull Request

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)

###### Code bounty of
https://forums.tgstation13.org/viewtopic.php?t=38278

## Why It's Good For The Game

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

## Changelog
🆑
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-09 22:27:28 -06:00
John Willard
5fc14ff4bb 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-08 21:41:47 +00:00
SmArtKar
090463ac3e Fixes constant modular computer runtimes (#90454)
## About The Pull Request

Caused constant runtimes because modular computers, be it PDAs, laptops,
or whatever, can not have an ID.

## Changelog
🆑
fix: Fixed constant runtimes caused by modular computers without IDs
/🆑
2025-04-07 18:01:53 +02:00
TiviPlus
88c2213f1e 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-01 22:08:15 +02:00
Waterpig
d3d3a12540 The big fix for pixel_x and pixel_y use cases. (#90124)
## About The Pull Request

516 requires float layered overlays to be using pixel_w and pixel_z
instead of pixel_x and pixel_y respectively, unless we want
visual/layering errors. This makes sense, as w,z are for visual effects
only. Sadly seems we were not entirely consistent in this, and many
things seem to have been using x,y incorrectly.

This hopefully fixes that, and thus also fixes layering issues. Complete
1:1 compatibility not guaranteed.

I did the lazy way suggested to me by SmArtKar to speed it up (Runtiming
inside apply_overlays), and this is still included in the PR to flash
out possible issues in a TM (Plus I will need someone to grep the
runtimes for me after the TM period to make sure nothing was missed).
After this is done I'll remove all these extra checks.

Lints will probably be failing for a bit, got to wait for [this
update](4b77cd487d)
to them to make it into release. Or just unlint the lines, though that's
probably gonna produce code debt

## Why It's Good For The Game

Fixes this massive 516 mess, hopefully.

closes #90281

## Changelog
🆑
refactor: Changed many of our use cases for pixel_x and pixel_y
correctly into pixel_w and pixel_z, fixing layering issues in the
process.
/🆑

---------

Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
Co-authored-by: SmArtKar <master.of.bagets@gmail.com>
2025-03-28 14:18:45 +00:00
Aylong
2df73da53e Fix ByondUI small map preview (#90277)
## About The Pull Request
This PR should fix the problem of small previews in TGUI once and for
all (I hope).

What was causing it? Because TGUI takes a long time to open, that's why
previews were generated broken (small).

On Byond 515 this problem was not so noticeable as the interfaces opened
faster, but with the release of 516 it became much worse.
Previews were generated inside a window that was not yet open, so the
scale was broken, sometimes the window would open before the preview was
done and sent, usually with small interfaces, or when reopening.

I'm not very good at working with signals, and to tell the truth this is
my second experience with them, so I hope I did it right.

## Why It's Good For The Game
No more small map previews

<details> <summary> Video </summary>


https://github.com/user-attachments/assets/834f3820-cc6a-4f65-90e5-d6bb2a118bcf

</details>

## Changelog

🆑
fix: Fixed small character preview, color matrix preview, mech preview,
and other previews with uses ByondUI map
/🆑

---------

Co-authored-by: Gaxeer <44334376+Gaxeer@users.noreply.github.com>
2025-03-28 05:26:48 +01:00
SmArtKar
431bf75d53 Color Code Audition: Human rendering hates me (#89702)
## About The Pull Request

This trainwreck of a PR is (hopefully) a final solution to all rendering
jank stemming from the new filter-based coloring system. I went over
every single instance of RESET_COLOR, either adding KEEP_APART or
rewriting them entirely so they render properly. I've also fixed blood
rendering issues by utilizing alpha filters and adding an abstract
"holder" appearance for worn items, which holds blood overlays on worn
clothing as to avoid coloring it. I've also fixed horrible
inconsistencies with atmos pipe coloring as a result (of getting sucked
down that rabbit hole) and converted all uses of COLOR_VERY_LIGHT_GRAY
in atmos code to ATMOS_COLOR_OMNI to avoid confusion.

MODsuit modules still get colored into MOD unit's color, need to
refactor their rendering for this.

Closes #88989
Closes #87526
Closes #89837

## Changelog
🆑
refactor: Audited all remaining coloring code - among noticeable
changes, blood should no longer get colored or "leak out" of item
bounds, atmos pipes no longer color weirdly and repairbots are white
again.
/🆑
2025-03-24 15:05:33 +01:00
zxaber
c370a1a0fa Robotact is now at the top of Borg PDA screens (#90171)
## About The Pull Request
Robotact is now at the top of borg PDAs' main screen. Same as Messenger
for crew PDAs.

![image](https://github.com/user-attachments/assets/8426371f-3d16-47f2-8ec3-52d7006158da)
## Why It's Good For The Game
Robotact is just as important to borgs as Messenger is to carbons, so we
should make it easier to find at a glance.
## Changelog
🆑
qol: Cyborg PDAs' home screens now have Robotact at the top of the
screen.
/🆑
2025-03-23 19:56:50 +01:00
MrMelbert
7e0838ca1c Fixes PDA / Bag actions (#90172)
## About The Pull Request

These have multiple slots you'd use them from

## Changelog

🆑 Melbert
fix: PDA flashlight action button is given in any slot
fix: Bag action button is given in any slot
/🆑
2025-03-23 17:45:40 +01:00
SmArtKar
a34e16db17 Cleans up gaming signals and arcade machine code (#90122) 2025-03-20 22:19:40 +02:00
ArrisFairburne
fe7363e5ee PDA Alert Level Readout (#89173)
## About The Pull Request
Adds an alert level notice on the main PDA screen.
The notice starts out as simple colored text when the user is not in any
danger or concern. If the user is in danger, it becomes black text on a
colored background. If the user is called to fix the problem relevant to
alert (ie. security to deal with red alert active threats) the notice
becomes blinking text on a colored background.
<!-- Please make sure to actually test your PRs. If you have not tested
your PR mention it. -->

## Why It's Good For The Game
The existing way to check current alert levels (look at a fire alarm)
doesn't really make much sense for new players. Also, this way is more
accessible because a player will usually always be able to intuit where
their PDA is on their person, while the fire alarm location will always
be dependant on what station is being played.
## Proof Of Testing

<!-- Compile and run your code locally. Make sure it works. This is the
place to show off your changes! We are not responsible for testing your
features. -->
<details>
<summary>Screenshots/Videos</summary>

![GIF 22-Jan-25 2-15-45
AM](https://github.com/user-attachments/assets/da9509ef-3ded-42f0-b9f7-42f8c687fabd)

</details>

## Changelog
🆑
qol: Added a widget to the main menu of the modular computer screen,
which will tell the user what the current alert level is and if they are
needed to fix the problem.
/🆑
<!-- By opening a pull request. You have read and understood the
repository rules located on the main README.md on this project. -->

---------

Co-authored-by: Ivory <distributivgesetz93@gmail.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2025-03-13 12:25:57 +01:00
DATA
e4682c04a4 Adds a new smite: Retcon, also refactors the temporary_atom component into an atom level proc (#90016)
## About The Pull Request

Adds a new Retcon smite, it makes the person fade out into nothingness
with a configurable timer, deletes their records and reopens their job
slot, as if they were never there at all.

I was also annoyed that to play around with temporary_atom I had to
slowy add a component, and it doesn't really have much of a reason to BE
a component, so I refactored it into an atom level proc called
fade_into_nothing

## Why It's Good For The Game

The smite is useful for when you wanna get rid of someone who had to
leave roundstart and whatnot, on top of just being funny. the refactor
is also good because i can now put that proc on build mode and go to
town.

## Changelog

🆑
add: Added new mechanics or gameplay changes
add: Added more things
del: Removed old things
qol: made something easier to use
balance: rebalanced something
fix: fixed a few things
sound: added/modified/removed audio or sound effects
image: added/modified/removed some icons or images
map: added/modified/removed map content
spellcheck: fixed a few typos
code: changed some code
refactor: refactored some code
config: changed some config setting
admin: messed with admin stuff
server: something server ops should know
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2025-03-12 22:26:06 -04:00
itsmeow
cc335e7e9e IconForge: rust-g Spritesheet Generation (#89478)
## About The Pull Request

Replaces the asset subsystem's spritesheet generator with a rust-based
implementation (https://github.com/tgstation/rust-g/pull/160).

This is a rough port of
https://github.com/BeeStation/BeeStation-Hornet/pull/10404, but it
includes fixes for some cases I didn't catch that apply on TG.

(FWIW we've been using this system on prod for over a year and
encountered no major issues.)

### TG MAINTAINER NOTE


![image](https://github.com/user-attachments/assets/53bd2b44-9bb5-42d2-b33f-093651edebc0)

### Batched Spritesheets

`/datum/asset/spritesheet_batched`: A version of the spritesheet system
that collects a list of `/datum/universal_icon`s and sends them off to
rustg asynchronously, and the generation also runs on another thread, so
the game doesn't block during realize_spritesheet. The rust generation
is about 10x faster when it comes to actual icon generation, but the
biggest perk of the batched spritesheets is the caching system.

This PR notably does not convert a few things to the new spritesheet
generator.

- Species and antagonist icons in the preferences view because they use
getFlatIcon ~~which can't be converted to universal icons~~.
- Yes, this is still a *massive* cost to init, unfortunately. On Bee, I
actually enabled the 'legacy' cache on prod and development, which you
can see in my PR. That's why I added the 'clear cache' verb and the
`unregister()` procs, because it can force a regeneration at runtime. I
decided not to port this, since I think it would be detrimental to the
large amount of contributors here.
- It is *technically* possible to port parts of this to the uni_icon
system by making a uni_icon version of getFlatIcon. However, some
overlays use runtime-generated icons which are ~~completely unparseable
to IconForge, since they're stored in the RSC and don't exist as files
anywhere~~. This is most noticeable with things like hair (which blend
additively with the hair mask on the server, thus making them invisible
to `get_flat_uni_icon`). It also doesn't help that species and antag
icons will still need to generate a bunch of dummies and delete them to
even verify cache validity.
- It is actually possible to write the RSC icons to the filesystem
(using fcopy) and reference them in IconForge. However, I'm going to
wait on doing this until I port my GAGS implementation because it
requires GAGS to exist on the filesystem as well.

#### Caching

IconForge generates a cache based on the set of icons used, all
transform operations applied, and the source DMIs of each icon used
within the spritesheet. It can compare the hashes and invalidate the
cache automatically if any of these change. This means we can enable
caching on development, and have absolutely no downsides, because if
anything changes, the cache invalidates itself.

The caching has a mean cost of ~5ms and saves a lot of time compared to
generating the spritesheet, even with rust's faster generation. The main
downside is that the cache still requires building the list of icons and
their transforms, then json encoding it to send to rustg.

Here's an abbreviated example of a cache JSON. All of these need to
match for the cache to be valid. `input_hash` contains the transform
definitions for all the sprites in the spritesheet, so if the input to
iconforge changes, that hash catches it. The `sizes` and `sprites` are
loaded into DM.

```json
{
	"input_hash": "99f1bc67d590e000",
	"dmi_hashes": {
		"icons/ui/achievements/achievements.dmi": "771200c75da11c62"
	},
	"sizes": [
		"76x76"
	],
	"sprites": {
		"achievement-rustascend": {
			"size_id": "76x76",
			"position": 1
		}
	},
	"rustg_version": "3.6.0",
	"dm_version": 1
}
```

### Universal Icons

Universal icons are just a collection of DMI, Icon State, and any icon
transformation procs you apply (blends, crops, scales). They can be
convered to DM icons via `to_icon()`. I've included an implementation of
GAGS that produces universal icons, allowing GAGS items to be converted
into them. IconForge can read universal icons and add them to
spritesheets. It's basically just a wrapper that reimplements BYOND icon
procs.

### Other Stuff

Converts some uses of md5asfile within legacy spritesheets to use
rustg_hash_file instead, improving the performance of their generation.

Fixes lizard body markings not showing in previews, and re-adds eyes to
the ethereal color preview. This is a side effect of IconForge having
*much* better error handling than DM icon procs. Invalid stuff that gets
passed around will error instead of silently doing nothing.

Changes the CSS used in legacy spritesheet generation to split
`background: url(...) no-repeat` into separate props. This is necessary
for WebView2, as IE treats these properties differently - adding
`background-color` to an icon object (as seen in the R&D console) won't
work if you don't split these out.

Deletes unused spritesheets and their associated icons (condiments
spritesheet, old PDA spritesheet)

## Why It's Good For The Game

If you press "Character Setup", the 10-13sec of lag is now approximately
0.5-2 seconds.

Tracy profile showing the time spent on get_asset_datum. I pressed the
preferences button during init on both branches. Do note that this was
ran with a smart cache HIT, so no generation occurred.


![image](https://github.com/user-attachments/assets/3efa71ab-972b-4f5a-acab-0892496ef999)

Much lower worst-case for /datum/asset/New (which includes
`create_spritesheets()` and `register()`)


![image](https://github.com/user-attachments/assets/9ad8ceee-7bd6-4c48-b5f3-006520f527ef)

Here's a look at the internal costs from rustg - as you can see
`generate_spritesheet()` is very fast:


![image](https://github.com/user-attachments/assets/e6892c28-8c31-4af5-96d4-501e966d0ce9)

### Comparison for a single spritesheet - chat spritesheet:

**Before**


![image](https://github.com/user-attachments/assets/cbd65787-42ba-4278-a45c-bd3d538da986)

**After**


![image](https://github.com/user-attachments/assets/d750899a-bd07-4b57-80fb-420fcc0ae416)

## Changelog

🆑
fix: Fixed lizard body markings and ethereal feature previews in the
preference menu missing some overlays.
refactor: Optimized spritesheet asset generation greatly using rustg
IconForge, greatly reducing post-initialization lag as well as reducing
init times and saving server computation.
config: Added 'smart' asset caching, for batched rustg IconForge
spritesheets. It is persistent and suitable for use on local, with
automatic invalidation.
add: Added admin verbs - Debug -> Clear Smart/Legacy Asset Cache for
spritesheets.
fix: Fixed R&D console icons breaking on WebView2/516
/🆑
2025-03-03 14:58:27 +01:00
Lucy
803589da07 SecurEye now properly follows moving cameras (#89507)
## About The Pull Request

Port of a fix from
https://github.com/Monkestation/Monkestation2.0/pull/4995

Due to how modular computers worked with the nested tgui stuff, the
SecurEye app wouldn't properly autoupdate whenever a camera it was
watching moved (when there's not any tracking going on)

This "fixes" that issue by adding a new var, `always_update_ui`, to
modular computer programs, which will make the modpc call the active
program's `ui_interact` even after the UI is opened.

## Why It's Good For The Game

bugfix good. if the whole "watch broadcast camera streams on PDA" thing
ever gets ported here, this is a needed fix for that.

## Changelog
🆑
fix: SecurEye now properly follows moving cameras.
/🆑
2025-02-17 11:54:45 +01:00
Archemagus
8a5898212b Automated Announcement System refactor (#89276)
## About The Pull Request

I standardized stuff in AASs code, and all current reference to it. Also
added interactions for bounty cubes, weather reports and request
consoles, all of it can be changed from AASs UI.
Also it's easier now to add new config entries for AAS to proceed, and
it's now downstream friendly.
## Why It's Good For The Game
Well, because kind of order in code and because it's funny to make
custom messages for... Almost everything?
BTW any entry can be blocked from ingame changes, by default you can't
change Broken Arrival shuttle and Security Officer arrival
announcements, how it was before. But may be we should allow it - it's
an open question.
## Changelog
🆑
add: Many things now handles via AAS: Bounty Cubes, Request Consoles,
Brig Cells, Vending Machines and Orion Trails alerts, Weather Reports,
Cargo Order Console
code: Now anyone can make their own entry for AAS
refactor: AAS internals, also cleanup
/🆑
2025-02-17 11:06:50 +01:00
SmArtKar
2c3e3b6e59 Fixes SiliConnect not being able to download logs (#89408)
## About The Pull Request

Closes #89329
Also added a balloon_alert

## Changelog
🆑
qol: SiliConnect now informs you that you're successfully downloading
logs
fix: Fixes SiliConnect not being able to download logs
/🆑
2025-02-17 00:59:24 +01:00
GwynCodes
a6e2b96ca7 Creates a "Secrets" panel button for debugging cargo orders (#89469)
## About The Pull Request

-Creates a new button in the "Secrets" menu that can override the
cooldown for ordering items from department consoles. It can be used to
make the cooldown longer, shorter or non-existent.
-Creates a new global var to manage this override on every console in
dept_order.dm

## Why It's Good For The Game
This tool assists in finding and fixing bugs related to cargo orders and
cargo crates. The wait time for these cooldowns can be ten minutes or
longer, and this speeds up the process significantly.

It could also be used by admins during play to make the cooldown lower,
or cause absolute mayhem on cargo by setting the cooldown duration to 0.

## Changelog
🆑
add: Added a button in the "Secrets" menu to alter the department
console order delay.
qol: Button makes it easier to find cargo related bugs.
code: Changed code in department_order.dm to allow for overriding the
order cooldown duration.
admin: Created an admin button in the "Secrets" panel.
/🆑

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2025-02-14 20:14:04 -05:00
Jacquerel
23ac16411d Removes Secondary & Final Objectives from Traitors (#89466)
## About The Pull Request


![image](https://github.com/user-attachments/assets/cb0bffb3-33be-4fb1-baec-a4d0f4a4cd57)
Pre-discussed with @Watermelon914, this PR removes Secondary & Final
Objectives from all Traitors, rather than just midround ones. It also
removes all of the surrounding supporting code.
Randomly assigned Primary Objectives still exist, I just used the
ability to rewrite mine to take the screenshot.

In terms of final objectives, the surrounding items that were available
still exist but don't necessarily have sources.
If anyone has good ideas for readding these in some other form it can be
done in future PRs.

It also allows all traitors to buy the Contractor kit, previously
limited to midround traitors which lacked secondary objectives, because
now all traitors lack secondary objectives.

This essentially limits all traitors to a maximum of 20 TC (16 if they
spawn with an uplink implant). Currently I don't foresee that they
strictly need any additional way of gaining TC during a round as 20 is
quite sufficient, but it may take some time to adjust and get used to it
after such a long time of having access to more. If we need to adjust
the starting value or add a slow drip of more points over time or
something, that can be done in followup PRs.

This also removes the ability to recreate your uplink added by my
beautiful wife in #74315
This was part of the progression traitor design document, but ultimately
probably a bad idea as it essentially made traitors impossible to
properly disarm. You will once more just need to carefully protect your
uplink.

**This does not remove the threat/progression system**. 
Like midround traitors, all Reputation requirements on gear are now
simple timelocks, most of which will have elapsed by the time 30 minutes
have passed.

**Finally** this PR also adds Romerol to the traitor uplink for 25 TC
and 30 minutes of reputation, as a treat (and because I removed the
final objective that previously granted it).

## Why It's Good For The Game

We've tried this system for a long time (3 years last month!) and while
I think it had a lot of promise, enabled some cool moments, and also
solved several of the problems it set out to solve, overall I think some
of the behaviours it has encouraged in players have been overall
negative for the game.
While the _game systems_ are fine, even quite fun and cool (especially
final objectives) I am of the opinion that having them in the game
creates a net negative purely in the way that they react with players'
_brains_, creating incentives towards behaviour we don't actually want
people to pursue.

While it's hard-to-impossible to prove any of this with hard data, there
has been a prevailing feeling for some time among many (though certainly
not all) people that the simple fact of _having_ a constant drip-feed of
objective available to players leads directly to less interesting
antagonist play. While certainly nobody is _forced_ to do secondary
objectives you are directly and quite strongly rewarded for doing so,
doing so efficiently, and doing so in a way which makes sure that nobody
(alive) sees you do it. This leads to a tendency to play defensively and
try to maximise the number of tasks you can complete in one round, which
also has a knock-on effect of generally minimising the number of people
you attempt to interact with in a round (unless you are killing them).

Even people who _intend_ on doing some more interesting gimmick can fall
into this trap, as "having more tools" is always useful for anyone who
is intending on any kind of plan at all, but then executing on the
secondary objectives again incentivises you to lay low, not interact
with anyone, be efficient, and then reduces the time you are spending
doing the thing that's your actual plan for the round. Removing the
ever-present temptation to fish for extra TC leaves "doing whatever your
actual plan is" as the sole thing to optimise.

Final Objectives too have created unfortunate psychological effects
between crewsided players and other antagonists. Because of the _threat_
(no matter how remote, Final Objectives have always been tuned to be
appropriately rare) that leaving any antagonist alone will cause them to
snowball by acquiring more power, it starts to feel foolish to respond
to any threat with less than the maximum possible level of force even if
they seem relatively innocuous in the moment. This even has an effect on
other non-progression antagonists, as traitors are the most common
antagonist type and how people treat them is going to be their default
level of reaction to most other station threats.

While there has always been the promise of expanding the system with
novel and exciting objectives that leverage appearing mid-round to do
something unique, we've taken very little advantage of that over time.
Most objectives we have added that didn't boil down to "kill someone,
with a twist" have been somewhat unsuccessful, serving either as ways to
get yourself arrested and killed for no reason or ways to get free
telecrystals by doing something the crew don't really care about
stopping you from doing. The option still exists to add more roundstart
objectives to traitors, if someone suddenly has a great idea that would
fit in this space.

The ideal outcome of making this change is a slight relaxation of crew
attitude towards feeling like their only option after catching an
antagonist that isn't sandbagging is to permanently remove them from the
round (although it's fine to do this still in many scenarios), and a
broadening of traitorous activity which is not purely focused on
collecting as many checkboxes as possible and might give people more
time to roleplay with other players, not worrying that this time could
have been more efficiently spent pursuing a different secondary goal.
I don't anticipate or desire that this will prevent traitors from
killing anyone (or even stop them from killing people they don't have a
specific objective to kill), I just want to remove the FOMO from
people's minds.

Also this gives us something to talk about at the coder townhall meeting
on the 22nd.

## Changelog

🆑
del: Misplaced or stolen traitor uplinks can no longer be recreated
using a radio code and special device, guard yours carefully or buy a
backup implant.
del: Roundstart traitors can no longer take on additional objectives in
order to earn additional Telecrystals and fast-forward any unlock timers
on items. They also cannot earn the ability to complete a Final
Objective.
balance: Roundstart traitors can now buy the Contractor Kit from their
traitor uplink, rather than only midround traitors.
add: Traitors can buy Romerol for 25 TC, after 30 minutes of time has
passed in a round.
/🆑
2025-02-14 12:46:56 +00:00
Gaxeer
f16b3279ca Cleanup supply packs contents (#89342)
## About The Pull Request

fix image display in `NT IRN` PDA app


<details>

<summary>
Images present!
</summary>


![image](https://github.com/user-attachments/assets/b9a5e733-9bc8-498e-bdaa-3531e0b142e5)
</details>





## Why It's Good For The Game

Bug fixes good

## Changelog

🆑
fix: fix image display in `NT IRN` PDA app for preview and contents
/🆑
2025-02-05 23:53:22 +01:00
Ben10Omintrix
09e8924876 [no gbp] fixes virtual pet app changing PDA's colors when open (#89333)
## About The Pull Request
PDAs no longer go white when the virtual pet app is opened

## Why It's Good For The Game
fixes virtual pet app changing PDA's colors when open

## Changelog
🆑
fix: fixes virtual pet app changing PDA's colors when open
/🆑
2025-02-05 19:17:57 +01:00
Bloop
fd1bc8f9d0 Fixes PAIs not being able to send messages or turn the GPS off (#89279)
## About The Pull Request

Fixes https://github.com/NovaSector/NovaSector/issues/4826

Since https://github.com/tgstation/tgstation/pull/88651 PAIs have been
blanket barred from being able to pass any `can_perform_action()` check.

From the pr:


![image](https://github.com/user-attachments/assets/67842da5-7208-4c43-b71f-4ba5c0c2f7af)

## Why It's Good For The Game

As it turns out there are a few things that it makes sense for them to
be able to interact with. Now you can again!

## Changelog

🆑
fix: fixed PAIs not being able to send or reply to messages using their
digital messenger app.
fix: fixed PAIs not being able to turn off the GPS tracking using their
gpa app.
/🆑
2025-01-30 13:41:09 +01:00
MrMelbert
fca806da0c Fix cyborg flash / Makes cyborgs use item interaction (#89274)
## About The Pull Request

Fixes #89272

- Adds an argument to `is_wire_tool` to fail if the item is secured,
which assemblies are by default. (They must be screwdriver'd to attach
to things)

Makes cyborg use item interaction

- Cleaner, non-deprecated attack chain. 
- Also changes to chats to balloon alerts.

## Changelog

🆑 Melbert
qol: Using items on cyborgs now use balloon alerts instead of chat
messages.
fix: You can flash cyborgs again
refactor: Refactored item interaction on cyborgs. 
/🆑
2025-01-30 13:07:15 +01:00
FlufflesTheDog
d429fd87ce Fixes not being able to adjust pda ringtones in-game (#89256)
## About The Pull Request
x = x is silly
## Why It's Good For The Game
fix
## Changelog
🆑
fix: PDA ringtones can be changed in-game
/🆑
2025-01-29 17:38:44 +01:00
Gaxeer
4e3b0c1750 replace bubble sort with timsort for cameralist, filter then sort, move global procs to cameranet datum (#89087)
## About The Pull Request

Replace bubble sort with timsort for cameralist
Move cameralist related global procs to `cameranet` datum
Other minor code cleanup things

## Why It's Good For The Game

Cameralist reads for UIs are now more performant

## Changelog

🆑
refactor: replace bubble sort with timsort for cameralist, move global
procs to `cameranet` datum
/🆑
2025-01-24 12:10:58 -08:00
Profakos
20d0d8827e Department orders credit reward and cooldown time now use a logarithmic scale (#88797)
## About The Pull Request

This PR makes the reward and cooldown for departmental orders scale with
crate cost using a logarithmic scaling, instead of comparing the price
to preset thresholds for time, or awarding the same amount as the
crate's cost.

Previously, to calculate the cooldown time, the code was calculated via
the following manner:

```
credits = clamp(credits, min, max)
time_y = 10 MINUTES * ((credits - min)/(max - min) + 1) 
```
Minimum was 320 credits, max was 3000, thus, all crates slid around
between 10 minutes to 20 minutes.

The reward for delivering the crates was the same as the crate's value.
This meant ordering egregiously expensive crates, far beyond 3000 was
way too desirable.

This PR changes both to use logarithmic scaling.

Cooldown time uses `60* log(price)^2.2`, and reward uses `140 *
log(price)^1.4`.

**Cooldown analysis**
At 320 it's 7.54 minutes, at 1400 it's 12.44 minutes, at 3000 (around
gun crates) it's 15.5 minutes, at 8000 (hat crate) 20 minutes, at 9000
(expensive atmos cans) it's 20.58 minutes, and at the 20k crate it's
24.76 minutes.

**Crate rewards analysis**
At 320 it's 475 credits, at 1400 it's 669 credits, at 3000 (around gun
crates) its 778, at 8000 (hat crate) it's 925 credits, at 9000
(expensive atmos cans) it's 943 credits, and at the 20k crate it's 1070
credits.

Up to 540 credits, you are actually getting a higher reward than what
the crate costs, but this is okay, as its a reward for delivering
simpler orders. A little surplus for you.

For the console UI, I have made items costing 3000 or more display
Moderate, and items costing 8000 or more, Long cooldowns.

## Why It's Good For The Game

Ordering really expensive crates should be a luxury, not a way to
generate money. The money is supposed to be a bonus, in addition to the
free crate to sell. Using a logarithmic scale, the credit bonus is
reigned in more evenly, making it more predictable for economy tweaking,
and avoids players double dipping credits in their free purchase.

Decreasing the rewards also give space for other new ways to generate
rewards in relation to departmental orders, such as stamping the
manifest with the correct head's stamp being worth more money and such.

<details>
  <summary>Old PR Text, which was using a price cap instead</summary>

## About The Pull Request

Departmental orders are a neat feature, but some of the available packs
had problems economywise. The cooldown of range from 10 to 20 minutes,
with 10 minutes being the base for anything costing less than 320
credits, and 20 minutes at 3000 credits. I have no problem with the
lower cap, but the upper cap has issues, as recently, a 20k crate was
added to cargo, which means it is possible to dump quite a large amount
of funds into cargo every 20 minutes.

Departmental orders probably need a bigger overhaul, and this solution
is imperfect, but I have talked with @ArcaneMusic about this as an
interim stop gap measure.

This PR also autodocs a proc, and moves some values to global defines,
for ease of balancing.

This PR affects the following crates, with the uncapped crate values in
brackets.

Armoury

- Combat Shotguns (3500 credits)
- Energy Guns (3600 credits)
- NT BR-38 Crate (20,000 credits)

Engineering

- BSA parts (6000 credits)
- DNA Vault Parts (4800 credits)

Engine Construction
- HFR Crate (4800)
- Supermatter Shard Crate (4000)

Materials

- BZ Crate (9000 credits)
- Nitrous Oxide (9000 credits)
- Water Vapor Crate (3010 credits)

Toys
- Collectible Hats Crate (8000 credits)

## Why It's Good For The Game

Instantly awarding 20k to cargo every 20 minute, in addition to 27k from
the other consoles (if both engineering and science orders BZ, service
orders collectible hats, and medical orders something around 1000), is a
bit too much. The money gained should be along a much more predictable
and expected value. With this chance, the most they can get is 13k every
20 minutes across all departments.
</details>

## Changelog

🆑
balance: Rewards from departmental orders use a logarithmic scale,
resulting in less rewards for high tier crates. The cooldown time is
also logarithmic now, which has slightly decreased cooldown values on
cheaper crates.
/🆑
2025-01-15 14:21:24 +01:00
zoomachina
83b7fc798d succesful -> successful (#88916) 2025-01-10 13:03:36 +01:00
Ben10Omintrix
ae9f121def virtual pets now auto-follow you on release (#88844)
## About The Pull Request
when you summon a virtual pet's hologram, itll automatically follow you
on release rather than u having to give it the command

## Why It's Good For The Game
adds some minor convenience to the minigame. 

## Changelog
🆑
qol: virtual pet holograms now automatically follow you when released
rather than having to give it the command post summon
/🆑
2025-01-04 18:10:35 +01:00
LemonInTheDark
91719a400a 516 Compile Compatibility (#88611)
Renames all uses of caller, as they (currently) shadow the new byond var
and will in future error
Ups our "wan if compiled after" experiement compile version to 516
Adds an alternate 516 unit test
2024-12-27 01:04:50 +00:00
John Willard
2e4d70afe5 Updates href uses for 516 (#88699)
## About The Pull Request

Was just scrolling through the Paradise github since they seem to have
more work done for 516 to see if there's anything I can port over, found
this and thought why not.

Ports parts of https://github.com/ParadiseSS13/Paradise/pull/25105
Specifically, updaing all hrefs to use the internal ``byond://``, and
adding it to grep.

## Why It's Good For The Game

More work towards 516.

## Changelog

Nothing player-facing.
2024-12-24 11:42:20 -08:00
Gaxeer
cdda52aba9 add laptop interact on RMB click, screentips (#88612)
## About The Pull Request

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

Modular computer laptops can now be interacted with RMB when open, or
opened with RMB when closed.
Also screentips for  this added.
It was inteded for laptops to be interactable when open. but didn't work
because old code was not adjusted for attack chains.


## Why It's Good For The Game

Laptop usage is more user friendly :D

<details>
<summary>Demonstration :D</summary>


![image](https://github.com/user-attachments/assets/59b125af-2c2a-4948-a0ba-1289005a03fa)

</details>

## Changelog

🆑
fix: modular computer laptops can now be interacted with RMB, instead of
picked up
qol: modular computer laptops can now be interacted with RMB when open,
or opened with RMB when closed. Also screentips for this added
/🆑

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
2024-12-21 22:32:57 +01:00
SmArtKar
a2d463cdd8 Guncode Agony 4.4: Armor as an argument (#88143)
## About The Pull Request
Lil cleanup/tweak I couldn't do in the main PR because it conflicted
before and i forgot after. Yes this works with overrides that don't have
the arg, yes I tested it.

## Why It's Good For The Game
Don't run armor code thrice please thank you

## Changelog
🆑
code: Projectile impacts no longer fetch mobs' armor values thrice
/🆑
2024-11-25 03:59:21 -08:00
Penelope Haze
b67a0901f2 Fix issues discovered via TypeMaker (#87596)
## About The Pull Request
Fixes issues with var typing and proc arguments, discovered using
OpenDream's WIP TypeMaker feature (using improvements I haven't PR'd
upstream yet).

## Why It's Good For The Game
Codebase maintenance.
2024-11-19 15:24:52 -05:00
Waterpig
7534273bb0 Fixes SSWardrobe stealing a camera from the camera app when on a dummy, causing a harddel (#87903)
## About The Pull Request

See name, if a dummy somehow gets hold of a PDA with the camera app
installed (This just so happens to be a default PDA program in the case
on Nova, Skyrat, and Bubber), and the delete_equipment proc is called,
the camera inside the PDA gets sent to the wardrobe because of
`/datum/outfit/job/assistant/gimmick/hall_monitor` having one, and then
qdelled with the PDA, leaving a hanging ref

This causes a harddel during tests that has caused me great pains to
locate. Turns out a single example holodisk with the clown holds a
magical key to trigger all this: a single PDA

## Why It's Good For The Game

Fixes a harddel. There might be other similar ones hiding in the dark
like cameras in other objects.

## Changelog

🆑
fix: Fixes SSWardrobe stealing a camera from the camera app when on a
dummy, causing a harddel
/🆑
2024-11-14 19:48:44 +01:00
_0Steven
1365e6079c Fix NTNRC duplicate message jank and new message header, makes program headers actually update when there's none. (#87610)
## About The Pull Request

As before, more fiddling with NTNRC, more bugs.
This time, the same user sending the same message within the same second
would cause this message to spawn a new copy each time the channel was
opened, until the UI was closed and re-opened.
Looking into it, this seemed to be because we would set the `Box`'s
`key` value to the message contents:

<b0d71024c0/tgui/packages/tgui/interfaces/NtosNetChat.jsx (L156)>
Which isn't actually unique.

To fix this, we instead make each channel keep track of an incrementing
`id` number to assign to each message, and convert the `messages` list
to an associative list using those numerical ids stringified.
We don't just use the list index as a key, as we later may want to
target specific messages, so a consistent unique key is important.

This fixes our primary issue.

In the process of making the rest of the code account for this, I
noticed that the NTNRC program header that's supposed to show new
messages in the active channel when the program is idle didn't actually
work.
Just at all.
So I rewrote the entire thing, and it now tracks the last read message's
id rather than the full message, and sets this when you actually
background the program. The rest still runs on process tick, where it
updates the header if there's a new message with a different id on top.

Finally, the header part of the UI wasn't actually updating if there
were no headers, so now it forwards a lack of headers change as well.
## Why It's Good For The Game

Reduces more NTNRC jank.
Good if shit like, actually works.
## Changelog
🆑
fix: NTNRC no longer endlessly duplicates messages with duplicate
contents upon switching channels.
fix: The new message header you get when NTNRC runs in the background
actually works.
fix: NtOS header actually updates if there are no program headers.
/🆑

---------

Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
2024-11-08 03:19:47 +01:00
zxaber
3cfde345be Removes SiliConnect from borg PDAs, expands their self-status app instead (#87350)
## About The Pull Request
- SiliConnect is no longer a default app for cyborgs.
- RoboTact, the borg self-status app now has a Network tab, which lists
other borgs' status.
- The Network tab will only list borgs connected to the same AI as you.
If your AI goes down, you lose connection to other borgs' status info.
- Your AI is also listed on the Network tab, with their own status in a
very binary good/bad form.
- Syndicate borgs are able to see other syndicate borgs on the Network
list, even though they lack an AI.
## Why It's Good For The Game
SiliConnect was recently added to the default borg apps list. But it has
a lot of features that borgs can't actually use, and so feels rather
messy. It was added with the goal of letting borgs see eachother's
status, and so I've ported that functionality into RoboTact. SiliConnect
is no longer a default borg app (though it *can* be installed if a borg
and human really want it to be).

Showing the AI's status is certainly a balance choice. But it's not
really that much of a secret when the AI dying already adjusts the
monitors across the station to a BSOD image. On the flip side, we get to
shut off borg status sharing when the AI goes offline, which is neat.
## Changelog
🆑
del: SiliConnect, a tool meant for Roboticists, is no longer included by
default on borgs.
add: RoboTact, the borg self-status app, now shows the status of other
borgs synced to the same AI. Syndicate borgs can likewise see
eachother's status, even without an AI.
balance: RoboTact also shows their synced AI's very basic status of
functional or offline.
/🆑
UI Pictures:

![image](https://github.com/user-attachments/assets/1a5b6cbc-daa6-43a7-8ff6-95119d84eb83)
Dead AI:

![image](https://github.com/user-attachments/assets/f9f1668c-ae5b-4867-8634-590b573a968c)
Syndicate borgs do not see station borg status, but can see eachother's

![image](https://github.com/user-attachments/assets/085a0745-4c18-4a45-bcb4-ef93fa5b799f)


~~Drafting because I need to do edge-case testing, and the AI box isn't
quite functioning correctly when the borg has no AI master.~~
2024-11-04 06:10:07 +00:00
SmArtKar
0b99107cc2 Guncode Agony 3: Projectile code cleanup (#87628)
## About The Pull Request

Massive cleanup/pseudo-refactor of projectile and projectile-adjacent
code. One letter variables, weird logic, some runtimes, all of that.
Atomized in a separate PR from the actual refactor so we don't end up
with a 5k line PR.

## Why It's Good For The Game

Makes the code possible to work with before I nuke pixel_move and kevinz
units™️
2024-11-03 21:46:13 +00:00
_0Steven
f49f52494a Fix NT Software Hub displaying >100% completion or NaN/Infinite% completion. (#87619)
## About The Pull Request

During all that fiddling with NTNRC I noticed that sometimes the
download percentage would shoot above 100%.
Looking into it, it seems that that's just because it isn't actually
capped at the downloaded file size.

So we cap it to the file size after adding our next download chunk, but
parallel to before don't complete it immediately so that we stay on 100%
for another cycle before finishing. For style reasons.

Then I noticed files with a size of 0 would sometimes display NaN% or
Infinite%, presumably because both of the progress percentage
calculations in the ui would be dividing by zero.
So to avoid this, we just skip the downloading cycle entirely for 0 size
programs, and go to download completion immediately on clicking.

This fixes our issues.
## Why It's Good For The Game

Fixes some jank.
## Changelog
🆑
fix: NT Software Hub no longer displays >100% completion on downloads
sometimes.
fix: NT Software Hub no longer displays NaN% or Infinite% completion on
files with a size of 0 sometimes.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
2024-11-02 13:20:29 +00:00
_0Steven
f107a56773 Fixes NTNRC username sorting, additionally makes subcategories sort alphabetically. (#87616)
## About The Pull Request

While looking into getting the NTNRC username list sorted, I found out
that it was _already_ supposed to be sorted by status, but just got
broken in a pr that removes the program status variable forwarded for
this reason.

In this pr we simply add a `get_numerical_status()` proc that converts
the new logic into a number we can sort by, then make the tgui sort
account for this.
Additionally, we make it sort alphabetically in its subcategories, for
sanity's sake.
It now sorts by operator perms first, then
online>away(background)>offline, then alphabetically.

While I dislike operators being at the top regardless of their status,
it seems like that is how it was intended to work, and doing so sanely
would requite rethinking how names are coloured entirely. On the other
end, I think it's potentially good to have operators be at the top and
thus easily pingable at all times.
## Why It's Good For The Game

Fixes broken status sorting.
Alphabetical sorting makes finding a specific user to mute or ping them
less of a pain.
## Changelog
🆑
fix: NTNRC channel user list is sorted by status again. It goes
operator>online>away>offline.
qol: NTNRC channel user list is now alphabetically sorted under its
status subcategories.
/🆑
2024-11-02 14:01:16 +01:00