* Fix some copy paste UI errors (#81325)
## About The Pull Request
One day we will have opendream lint to catch this. (WYCI I guess)
* Fix some copy paste UI errors
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
* [NO GBP] Fixing issues with modular computer and circuits. (#81076)
## About The Pull Request
It turns out the messenger circuit wasn't working as intended, because
list components tend to convert datum keys into weakrefs, creating
incoherence between composite datum/atom and simple datum/atom
datatypes, which at least just spares us from the headache of clearing
the refs on del from lists too.
So, taking the shortest path, I decided to adapt the messenger to the
weak ref usage.
Another thing, instead of refusing altogether to send message that
trigger the pda filter regexes, the messenger circuit will instead
replace the matches with grawlix, since we have no way to inform
whoever's responsible for said message about the filters in an orthodox
way.
Beside that, I've noticed several of the circuits from my PR were
lacking trigger outputs or similar when needed, pretty making them only
as half as functional, at least to a noob like me.
And another small issue with missing ports from the status display
circuit.
One more suggestion from moocow is to add a cooldown to the ringtone
trigger for the messenger circuit, because he said it's pretty spammy
and some admins are fickle.
## Why It's Good For The Game
Bugfixing and improvements.
## Changelog
🆑
fix: Fixed the messenger circuit not sending messages.
fix: Added several ports to modpc circuits that were missing or needing
them.
fix: Fixes ever-expanding ports whenever circuits are re-inserted in a
modular computer.
/🆑
* [NO GBP] Fixing issues with modular computer and circuits.
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Integrated circuits for modular computers (#80530)
This PR integrates circuits for modular computers and a good bits of
their programs.
The peculiarity here is that modular computers have no fixed amount of
unremovable components (except the base one with just a couple ports for
now), instead, they're added and removed along with programs. With a few
exceptions (such as the messenger and signaler), for these program
circuits to work, their associated program has to be either open or in
the background.
For a reason or another, not all programs have a circuit associated to
them, still, however the programs with a circuit are still a handful.
They are:
- Nanotrasen Pay System
- Notepad
- SiliConnect
- WireCarp
- MODsuit Control
- Spectre Meter
- Direct Messenger*
- LifeConnect
- Custodial Locator
- Fission360
- Camera
- Status Display
- SignalCommander
*By the by, sending messages has a cooldown, so it shouldn't be as
spammy. If it turns out to not be enough, I can make it so messages from
circuit will be ignored by other messenger circuits.
The PR is no longer WIP.
I believe modular computers could make for some interesting setups with
circuits, since they're fairly flexible and stocked with features unlike
many other appliances, therefore also a speck more abusable, though
limits, cooldowns, logging and sanitization have been implemented to
keep it in check.
🆑
add: Modular Computers now support integrated circuits. What can be done
with them depends on the programs installed and whether they're running
(open or background).
add: Modular Consoles (the machinery) now have a small backup cell they
draw power from if the power goes out.
/🆑
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* PDA update (Messenger works while dead, Microwave works, etc). (#80069)
This is an update that touches many more things all at once (compared to
my other PRs) meant to make PDAs in general feel more consistent and not
take away from one of the experiences we want to encourage: interaction
between players.
1. Replaced all checks of a 'pda' with a 'modular pc'. This means
technically (though not done in-game currently) other modpcs can hold an
uplink, and microwaves can charge laptops.
2. Speaking of microwave, they now don't break and require
deconstruction if the cell is removed mid-charge.
3. When a Mod PC is out of power, it will now allow the Messenger to
work (which now also doesn't consume any additional power), if the app
exists on the PC. Here's a video demonstration
https://github.com/tgstation/tgstation/assets/53777086/7ae12f81-a271-49b8-95fa-2ba54d2e2d1f
4. Flashlights can't be turned on while the cell is dead
5. I replaced a bunch of program vars with ``program_flags`` and renamed
``usage_flags`` to ``can_run_on_flags``.
6. Added a debug modPC that has every app installed by default. Mafia
had some issues in the past that were unknown because Mafia wasn't
preinstalled with any tablet so was never in create & destroy nor in any
other unit test. This was just an easy solution I had, but PDAs should
get more in-depth unit tests in the future for running apps n stuff- I
just wanted to make sure no other apps were broken/harddeling.
Currently when a PDA dies, its only use is to reply to PDA messages sent
to you, since you can still reply to them. Instead of just fixing it and
telling players to cope, I thought it would be nice to allow PDA
Messenger to still work, as it is a vital app.
You can call it some emergency power mode or whatever, I don't really
mind the reason behind why it is this way.
When I made cells used more on PDAs, my main goal was to encourage
upgrading your PDA and/or limiting how many apps you use at once, I did
not want this to hit on players who use it as a form of interaction.
This is the best of both worlds, I think.
The rest of the changes is just for modularity, if some downstream wants
to add tablets, phone computers, or whatever the hell else, they can
still get just as far as PDAs should be able to get to, hopefully.
🆑
add: PDAs with a dead power cell are now limited to using their
Messenger app.
fix: Microwaves now stop charging PDAs if the cell was removed
mid-charge.
fix: Microwaves can now charge laptops.
fix: PDA Flashlights can't be turned on while the PDA is dead.
fix: You can now hold a laptop up to a camera (if it has a notekeeper
app installed) like PDAs already could.
/🆑
---------
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
* ok
---------
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
* Makes notepad available for laptops and consoles (#79475)
## About The Pull Request
Makes it so that notepad can be used on consoles and laptops
## Why It's Good For The Game
Now everyone have more places to write important information. Also
someone who doesn't have PDA (ghost-role for example) will be able to
use laptop's notepad.
## Proof of Testing
<details>
<summary>Screenshots/Videos</summary>

</details>
## Changelog
🆑
qol: Make notepad available for everyone, who has only laptop or
console.
/🆑
* Makes notepad available for laptops and consoles
---------
Co-authored-by: NeonNik2245 <106491639+NeonNik2245@users.noreply.github.com>
* The notepad app now includes basic nautical directions in its default message. (#78241)
## About The Pull Request
Based on an old PR from citadel:
Citadel-Station-13/Citadel-Station-13/pull/7690
It also comes with a tip.
Screenshot of what it looks like more or less (a smidge outdated):

## Why It's Good For The Game
This should help new players and not learn and memorize these five
simple terms often used in station area names.
## Changelog
🆑 Ghommie (Based on an old PR by Trilbyspaceclone from Citadel)
qol: The notepad app now includes basic nautical directions in its
default message.
qol: A tip about nautical directions, too.
/🆑
* The notepad app now includes basic nautical directions in its default message.
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Tablet UI update (mostly fixes) (#74844)
## About The Pull Request
Tablet UIs are now changed when opening/closing an app, instead of
constantly checking for a UI change every ui update.
Program UI acts no longer call parent, as it was unnecessary, Computers
are the ones that should be calling it.
Fixes a ton of problems with static data not updating, such as in
Messenger, ID management, Siliconnect, and Chat client
Chat Client's Admin mode also works again, which was broken when
accesses to check was turned into a list.
Turns a few lists in Robocontrol into static ones when we aren't
changing anything, and makes it actually scan your ID's access.
Fixes budget ordering being unable to show the cart/call the cargo
shuttle.
## Why It's Good For The Game
While I can't seem to find a single issue report on any of the above,
these are still problems that should be fixed.
## Changelog
🆑
fix: SiliConnect can download borg logs again.
fix: The RD can once again enable Admin mode on Wirecarp
fix: NT IRN can once again see the shopping cart and call the cargo
shuttle.
fix: Chat Client, ID Management and Messenger should now update their
UIs properly.
code: PDAs will hopefully not lag as much when clicking on buttons (such
as in ID management).
/🆑
* Tablet UI update (mostly fixes)
---------
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
* Tablets don't close their UI when changing program (and some fixes) (#73635)
## About The Pull Request
- Tablets now refresh their page when changing programs, this means the
UI will no longer close and reopen itself several times (or even have
several UIs open if shit broke hard enough).
- Removed tablet's attack self because interact already does everything
it had to do.
- Header programs now close when minimized (as there's no button to
close them in the main menu.
- Removed a lot of program UI stuff, it's now handled by the PC itself,
such as header data and ui host.
- Cut off asset sending from TGUI into it's own proc so I can re-send
assets when changing programs
- Added an ejection button for machine computers
- Fixed ID not ejecting into the user's hand when using 'Eject ID'
- Fixes a minor runtime when opening the MODsuit application without a
MODsuit already connected.
## Why It's Good For The Game
Fixes some bugs that I found with tablets
UIS now won't be flickering as bad in front of them, or have
inconsistent placement (like when you move your main menu UI, go to
Messenger, then it's back to the center of the screen).
Video of it in action
https://user-images.githubusercontent.com/53777086/221301417-78321149-0c10-475e-bd29-79f5a4ba0597.mp4
## Changelog
🆑
fix: Being in an application now properly uses the tablet's battery.
fix: Messenger and Themify apps now close when minimized, so don't count
towards the running app limit.
fix: Tablet UIs will now no longer spam open/close the UI when changing
applications
fix: Using the Eject ID button on tablets now ejects into your hand.
fix: Computers now have an Eject ID button
refactor: Cut down a lot of copy paste in tablet & program code, now
it's mostly done by the tablet.
/🆑
* Tablets don't close their UI when changing program (and some fixes)
* Update contractor_tablet.dm
* wew
---------
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* Removes AI and Charge parts from tablets, adds support for more later.
* merge conflict
* remove modular tablet loadout item
* fix SR maps referencing tablets, add clear PDA instead of modular tablet loadout
* remove pda loadout item
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>