Commit Graph

80 Commits

Author SHA1 Message Date
Ghom
f9957b0373 Integrated circuits for modular computers (#80530)
## About The Pull Request
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.

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

## Changelog

🆑
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.
/🆑
2024-01-20 21:21:42 +01:00
Ghom
971bc2611b The Spectre-Meter App, also a bootleg data disk item for the black market. (#80188)
## About The Pull Request
This PR adds in a new app that scans the nearby area for "spookiness"
(e.g. presence of ghosts, mobs with the spirit biotype, objects made
with hauntium or containing hauntium). A bit clunky by all means. It's a
maintenance app, and as such is more often found in the rare maintenance
computer disks, or downloadable from emagged PDAs (IIRC), or perhaps the
black market item which I've also added here as well, that might contain
it amongst other things.

Oh, if you also have the camera app, it'll let you take pictures of
ghosts like the 'camera obscura' does.

Oh, and there's also a maintenance version of the arcade program too;
just , like, lazier and easier.

## Why It's Good For The Game
Mostly a shower thought, 'cause I felt the idea maintenance disks to be
quite interesting yet lackluster, almost too niche. As for the remote
thought of using the app for validhunting, it isn't something you can
reliably get every and every other round, and if someone's got enough
ghosts circling them, chances are they're some big, loud antag or doing
something so cheeky, that they kinda deserve it.

Also, yeah, more black market stuff. Except for the misc section, it's
pretty lacking in uniqueness.

Screenshot of the UI, taken at the distance of one tile from a revenant:
![screenshot of the
UI](https://github.com/tgstation/tgstation/assets/42542238/402e2533-ae62-42c2-b90d-a3877940fb2c)

## Changelog

🆑
add: The Spectre-Meter modular computer app. A little, amatuerishly
coded app that, as the name implies, scan an area for spectral presence.
It can be found amongst other apps in maintenance computer disks.
add: An easier, lazier version of the Arcade app, also found in
maintenance.
add: Black market computer disks, which contains programs not readily
available to the average assistant.
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-12-18 17:32:00 +00:00
John Willard
edbc7c5622 PDA update (Messenger works while dead, Microwave works, etc). (#80069)
## About The Pull Request

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.

## Why It's Good For The Game

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.

## Changelog

🆑
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>
2023-12-09 13:05:13 +01:00
John Willard
ddd3f53943 PDA general maintenance (NTNet downloader rework) (#79741)
## About The Pull Request

I deleted the documentation file of ModPCs because it was barebones and
had no new information to give that autodoc couldn't. Just to make sure
this isn't a net-negative, I improved on much of the autodoc and
comments in general around ModPC code to help people understand easier
what's going on around it.
I also renamed vars that were too easily confused with other var names,
and reworked the ntnet downloader a little;
- it now has a search bar
- it now has more sections to scroll through, hopefully making it more
accurate and easy to find what you need.
- also organized the apps that were previously shoved in 'other'.
- i also upgraded it to a .tsx because why not

video demonstration


https://github.com/tgstation/tgstation/assets/53777086/cbba4c1c-b8a8-4ba4-8628-aea8389999fc

## Why It's Good For The Game

Adds in a lot of comments that were previously missing, clears up some
sources of confusion within ModPC code, and improves NTNet Downloader,
something I've procrastinated on doing for a very long time now.

## Changelog

🆑
qol: NTNet Downloader now has a search bar, and programs are now better
sorted.
/🆑
2023-11-19 19:00:18 -05:00
John Willard
6bb2175fa5 [BOUNTY] Re-adds Contractors (#79737)
## About The Pull Request

Adds Contractors back to the game as a kit that Infiltrators (Only
midround/latejoin Traitors, not roundstart) can buy. Buying this will
give you access to the new Contractor items in the uplink (which
replaces the Contractor shop).
I've also refactored things about contractor and how it's handled, such
as removed its sleep calls, swapping its UI to tsx, making it actually
functional within more modern TG code and the reworked Traitors as a
whole, among other things.

I also fixed the contractor guide paper (the text was broken) and made
contractor kit boxes no longer empty.

Contractor items only appear once the contractor kit is purchased, but
they can't be bought until you make an account.

Video demonstration

https://github.com/tgstation/tgstation/assets/53777086/c6aed4e8-bbd4-4ba0-b6a2-9f58fd308d09

Regular Traitors can't access it

![image](https://github.com/tgstation/tgstation/assets/53777086/539b8121-a1fa-4f2d-8e69-ec3d9708152c)

The Contractor UI (Modified to not have a shop anymore) - Ignore the
Invalid Targets, those appear when there's no possible targets

![image](https://github.com/tgstation/tgstation/assets/53777086/e128aecc-0795-4a6b-b8c5-e6f431401330)

Roundend report

![image](https://github.com/tgstation/tgstation/assets/53777086/71b88262-61de-4652-862b-79a7d5ded979)

## Why It's Good For The Game

Contractor was a fun way of playing Traitor that isn't relying on RNG
objectives to pop up, this is instead constant stream of content for the
contractor that encourages non-lethal play, and is now a viable
alternative now that Infiltrators don't have Reputation anymore.

Link to bounty: https://tgstation13.org/phpBB/viewtopic.php?f=5&t=35160

Relevant image from bounty

![image](https://github.com/tgstation/tgstation/assets/53777086/b26a17b0-2f10-4e53-b8fc-25cf8130584e)

## Changelog

🆑
add: Infiltrators (Latejoin/Midround traitors) can now buy and use
Contract kits again.
del: Contractor baton can now only be purchased once.
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-11-18 18:38:37 +00:00
John Willard
8803ea5132 Emagged PDAs won't log to wirecarp. (#79707)
## About The Pull Request

Currently, every time you open/close a program, that activity is logged
for the RD to see. This includes Nukies opening their disk tracking app.
Now, emagged PDAs will no longer log activities to Wirecarp, but I did
replace it with a log when the PDA is first emagged.
Basically, nukies are undetected, but Traitors can still be figured out.

## Why It's Good For The Game

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

I thought this would be better as it makes more sense to stop logging
when you're emagged, but as you are being emagged it will report the
modification instead.

## Changelog

🆑
fix: PDAs now log that they've been emagged, but will no longer log any
further programs they open beyond that. This means Nukies don't sell
themselves out by opening their disk tracking app.
/🆑
2023-11-14 13:57:43 +01:00
John Willard
78f04be9f8 Renames vars on pdas and removes ntnet_relays glob (#79595)
## About The Pull Request

- replaces the ntnet_relays global list with ``get_machines_by_type``
- renames ``transfer_access`` var on PDA to ``download_access`` &
``required_access`` to ``run_access`` to better describe what they do,
because on more than one ocassion I've confused myself with the two
terms and ended up doing something unintentional (see:
https://github.com/tgstation/tgstation/pull/74269)

## Why It's Good For The Game

Kills a useless global list and makes pda code a little less confusing.

## Changelog

Nothing player-facing.
2023-11-13 01:35:58 +01:00
John Willard
26e3ea1e0d Mafia can be played on your PDA (#78576)
## About The Pull Request

Mafia is now friggin playable from the PDA, I also changed other stuff
too

- You can't use abilities on dead people if you're not supposed to (cant
kill the same person over and over)
- Changelings cant kill other Changelings
- Changelings can now only talk to eachother at night, rather than using
:j
- Everyone starts spawned in the center of the map, since people playing
on PDA can't move their characters. This is so everyone can hear PDA
users in person, as I don't want the chat log to be mandatory.

To do this, all messages you are meant to be able to see, is now logged
for you to see in your Mafia panel. This essentially means that people
playing through the PDA get a downgraded version of it, but I don't know
how much larger I want this UI to be.

Playing Mafia through the PDA will not tell you of other players ahead
of time when signing up (as it shows ckeys + pdas), but they can see the
names in-game. Unfortunately this means we'll have to remove your
customization coming with you, to prevent using it to tell who is dead
in round.

Things I am missing
- Program overlays on PDA/Laptop/Computer
- Icon for the app's header while a game is active

I'm not a spriter and can't make either of these

This is the new UI

![image](https://github.com/tgstation/tgstation/assets/53777086/7cf503d9-b2e2-4127-874a-acad6425d649)

I also fixed alert calls for PDAs and stuff

![image](https://github.com/tgstation/tgstation/assets/53777086/e09b2e5e-b9e7-43ae-9273-c168e9c8e642)

and removed the X at the top on computers since they had no battery

![image](https://github.com/tgstation/tgstation/assets/53777086/d3dd8307-805c-4aba-be5e-4c24a0bdcb91)

Looks a little better now hopefully 👍 

## Why It's Good For The Game

- The current Arcade app sucks, and is a solo game. This is much more
entertaining and you can talk to others in it, which is swag as fuck.
- There's a larger potential playerbase for the Minigame making it more
likely to be played.
- Sets groundwork for a better version of
https://github.com/tgstation/tgstation/pull/75879
- Adds more suspense and teamwork in the minigame.

## Changelog

🆑 JohnFulpWillard, sprites by CoiledLamb
add: You can now play Mafia on your PDA.
balance: Mafia changelings can now only talk to eachother during the
night.
fix: Mafia abilities can't be repeatedly used on people.
/🆑
2023-10-21 16:55:35 +02:00
John Willard
aaff861c90 pdas now use their cells more (#78580)
## About The Pull Request

So one aspect of PDAs that I quite liked previously was managing and
upgrading your power.
This was lost when all cell parts got removed, mostly, and now I'd like
to re-add it.
PDAs and Tablets now use more power each second it's on
Programs being active/idle now take charge too.
And all this now takes ``seconds_per_tick`` into account.

Screenshots of APC use before and after having 6 programs open at once

![image](https://github.com/tgstation/tgstation/assets/53777086/14699ae7-19a7-4eb6-a211-5944cc1867d0)

![image](https://github.com/tgstation/tgstation/assets/53777086/804fedde-0d5a-43a9-9e61-34139257a16f)

PDA default power cells have a max charge of 1000, each cell use is
around ``1.00970340315`` power, which is ``1.01013789399`` w/ 2 programs
in idle and 1 active program (which is what PDAs are capable of). This
means it takes about 990 ticks to fully drain your power, or about 50
minutes, at max use.

This is completely blasted away the moment you put anything beyond a t1
cell inside of it, which is unfortunate but what can you do about tiered
parts being so poor.

The problem of no public PDA chargers are alleviated by
https://github.com/tgstation/tgstation/pull/78600

### Update

The PDA flashlight being on now also drains the battery 25% times
faster. PDA running out of charge now also turns the flashlight off.

## Why It's Good For The Game

You may or may not have to actually charge your PDA once in a round now,
maybe. I liked this part of tablets and would like to see it brought
back, managing your power to use your apps is important to ensure you're
not just using all apps 24/7

Because this also adds the functionality to add/remove power cells
again, it opens up to some minor little pranks/messing with people that
isn't completely destroying their tools, as well as some minor
upgradeability.

## Changelog

🆑
balance: You can now remove and replace power cells from PDAs (with
screwdriver).
balance: PDAs now drain their power cells harder, and also take into
account active programs & their flashlight being on.
balance: PDAs running out of charge now turn their flashlights off.
/🆑
2023-09-27 21:15:19 -04:00
John Willard
fe104cf8da pAIs control a PDA they're inserted into (#78103)
## About The Pull Request

This PR lets pAIs inserted into a PDA to control the PDA of their owner.
They can see their own pAI configurations but cannot edit any of it.
They also can't eject themselves from it.
This means they can receive and send PDA messages as their owner, acting
like a personal secretary

This also adds support for multiple people using a PDA and its UI
updating for all of them and PDA messages being received and responded
to from multiple people under the same PDA
It also removes pAI camera in favor of using siliconcamera, which is the
same thing; this just cuts down on some copy paste.

I also reverted PDA's ringer being off preventing messages from being
sent to your chat, silent mode was meant to prevent only the ringing
sound.

## Why It's Good For The Game

pAIs can now do a little bit more to help their owners on a personal
level, and adds support for more stuff like this in the future (an idea
I had was being able to hack into PDAs in the same way the CE can hack
into APCs remotely)

This is a re-PR of https://github.com/tgstation/tgstation/pull/76445 but
it's a little better this time and does not remove the PDA Messenger app
from pAIs.

## Changelog

🆑
fix: PDAs being on silent no longer prevents PDAs from being sent to
your chat, again.
add: pAIs inserted into a PDA can now control the PDA, and will receive
PDA messages sent to it (and can respond under the PDA's name).
/🆑
2023-09-04 17:32:52 +01:00
John Willard
17e16ad0c2 Replaces Camera bug with Camera tablet app (#77713)
## About The Pull Request

Replaces the Traitor's Camera Bug item with an application that allows
you to view camera apps.
The difference between this app and the Security one is that it does not
have an access requirement, does not make noise (it didn't previously
due to a bug, fixed in this PR), and can be installed on PDAs.
This can also be installed from syndienet, which means nukies now have a
way to see the station cameras while off the ship.

Adds Syndicate app disks, which are made of Gold. This is only used by
the Camera app as of right now.

I also fixed some issues along the way;
- Camera tablet app now properly shows cameras
- It now properly makes the noises it is supposed to
- It clears the viewers properly on the ui being closed or the app being
exited.

Syndicate app disks ddelete their apps upon being transferred over (like
maintenance disks), trying to remain consistent with previous behavior.

I also made this for a [personal project I am currently working
on](https://hackmd.io/XLt5MoRvRxuhFbwtk4VAUA). I could just make this UI
be TGUI, but I thought it could be worth trying to turn it into a better
item first.

Tracking people is much simpler now- You choose anyone from a list of
people found on cameras, and it will try to find a camera that sees
them. It follows them until you close the app or switch camera.

https://github.com/tgstation/tgstation/assets/53777086/1536ebb9-0c4f-45bb-b593-f98791ea6d23

## Why It's Good For The Game

The Camera Bug is one of the worst traitor items as of current. You can
remotely shut off a single camera, something that can be done with basic
tools you are likely carrying around anyways, and uses an HTML clunky UI
to flip through cameras.
This new Traitor item makes it much easier to use, since the camera
consoles are something you are likely already used to.
It also means emagging a tablet is slightly more useful, and golden data
disks are pretty cool.

Unfortunately this means that they no longer grant illegal tech, because
otherwise you can simply clone the app infinitely for personal use, and
deconstruct the disk itself for tech. This can be grinded into gold, but
I think if we want an illegal tech item, it'll have to find a new host.

Closes https://github.com/tgstation/tgstation/issues/74839
Closes https://github.com/tgstation/tgstation/issues/39975
Closes https://github.com/tgstation/tgstation/issues/53820

## Changelog

🆑
balance: The Traitor's Camera bug is now a tablet app that works like a
silent camera console with an extra ability to track people through
their nearby cameras.
/🆑
2023-08-23 21:09:28 +12:00
distributivgesetz
ebbc45b161 Improved PDA Direct Messenger (#75820)
## About The Pull Request

Fixes #76708, Closes #76729 (sorry Zephyr)

This PR expands the Direct Messenger UI, adding a chat screen for each
available messenger that you can find, and moving message sending over
to TGUI.

This chat screen includes a message log that displays messages sent by
you as well as messages received from the recipient. This gets rid of
the previous chat log, which just had all messages thrown together that
you received or have sent, in one big list.

Furthermore, all messaging is now done inside the UI. This kills all
TGUI popups you would ever need to send messages forever (except for
quick replies). Use the input bar on the bottom, press Enter or the Send
button, and it sends your message. Spam mode is now done in the UI too,
via a text field you can find in the contacts list.

Additionally, because I have a habit of blowing things massively out of
scope, I've also completely refactored how messages and chat logs are
stored in the PDA messenger. I plan on using this in a PR that merges
the chat client with the messenger, sometime in the future. Sorry this
took so long.

Stuff left to do before I open this PR for review:
- [x] Add "recent messages"
- [x] Add "unread messages"
- [x] Add message drafts
- [x] Make photo sending not shit
- [x] Implement the edge cases for automated and rigged messages
- [x] Make sure shit isn't fucked
- [x] Profit

<details>
  <summary>Screenshots</summary>
  

![dreamseeker_HIrEfrap5X](https://github.com/tgstation/tgstation/assets/47710522/97c713b7-dda3-44d3-a8f5-d0ec11c92668)

![qIOWhVld4l](https://github.com/tgstation/tgstation/assets/47710522/3ab4e2c1-a38f-4b20-8e9f-509ea14c0434)

![dreamseeker_LIqwi05i4O](https://github.com/tgstation/tgstation/assets/47710522/c051c791-b595-4166-a4d3-82cb7568411f)

![BIYxNVjGL7](https://github.com/tgstation/tgstation/assets/47710522/b9c97eab-52b5-449f-b00f-a0d8aa5f865c)

![dreamseeker_IWdoSsUinC](https://github.com/tgstation/tgstation/assets/47710522/2a4cd76a-2bdc-4283-b642-09e92476fef5)

![L9DxzFHDEF](https://github.com/tgstation/tgstation/assets/47710522/6a5b0e29-d535-4c7e-a88e-e9b71198719b)

![rAuDgqBLNE](https://github.com/tgstation/tgstation/assets/47710522/128a0291-91da-4f9e-9bc5-a65cf411ea6d)

![dreamseeker_voui6S8MUf](https://github.com/tgstation/tgstation/assets/47710522/6e3ba044-b8df-492d-b58d-6c73ab07233d)

![image](https://github.com/tgstation/tgstation/assets/47710522/522c1d85-b9cf-4e0e-9588-9d3993eea03f)

</details>

## Why It's Good For The Game

The UI has largely stayed the same since modular tablets were added a
year ago. Even better, direct messaging has been the same since PDAs
were first added *more than a decade ago*. Imagine that.

Now we finally actually (!) make use of those brand new features that we
got from the TGUI switch in this regard.
## Changelog
🆑 distributivgesetz
add: Updated Direct Messenger to v6.5.3. Now including brand new
individual chat rooms, proper image attachments and a revolutionary
message input field!
add: Added a "Reset Imprint" option to the PDA painter.
refactor: Refactored PDA imprinting code just a bit.
fix: PDAs should now properly respond to rigged messages.
/🆑

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
2023-08-03 14:43:31 -07:00
John Willard
4ffef6be6d Fixes issues with closing apps on tablets (#75117)
## About The Pull Request

- Fixes background apps not reloading the UI
- Standardizes opening/closing/backgrounding apps
- Simplifies the way apps are closed instead of having 2 procs, one on
the PC and one on the program, being named the same thing (wtf)
- Removes program states. They existed so computers can know to update
their UI every process tick, but since we now do this event based, this
is no longer needed, which is good.
- Replaces the 'forced' arg from kill_program as it was completely
unused, with ``reload_ui``, which is now used to open the UI on close,
and not to when we don't want it to.
- Closing background apps no longer reloads the entire UI
- Responding to an NT Message will no longer open the UI on your face.

## Why It's Good For The Game

Closes https://github.com/tgstation/tgstation/issues/75046
Closes https://github.com/tgstation/tgstation/issues/75108

Makes tablet UIs more responsive and lag less, not checking if a program
is closed every process to close it, and makes responding to messages
not a hassle every time.
Also makes the code easier to understand/read,

## Changelog

🆑
fix: Tablets' minimize apps feature works again.
/🆑
2023-05-06 01:56:14 -07:00
John Willard
1c4166c81c 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).
/🆑
2023-04-26 23:29:20 -06:00
oranges
4c48966ff8 Renames delta time to be a more obvious name (#74654)
This tracks the seconds per tick of a subsystem, however note that it is
not completely accurate, as subsystems can be delayed, however it's
useful to have this number as a multiplier or ratio, so that if in
future someone changes the subsystem wait time code correctly adjusts
how fast it applies effects

regexes used

git grep --files-with-matches --name-only 'DT_PROB' | xargs -l sed -i
's/DT_PROB/SPT_PROB/g'
git grep --files-with-matches --name-only 'delta_time' | xargs -l sed -i
's/delta_time/seconds_per_tick/g'
2023-04-11 21:31:07 -07:00
John Willard
4462f4d5be Removes more NTNet from Tablets and removes a ton of dead code (#74085)
## About The Pull Request

Removes NtNet softwaredownload/communication because they did nothing,
so this also removes the feature to shut them off from Wirecarp

I removed tablets from being added to networks, Tablets already generate
logs for actions they do, which is already enough for the effects it has
in-game (just being visible to Wirecarp), once NtNet is deleted from
everything else then we can move it to ModPCs and limit logging to only
ModPC actions.

Fixes shutting off ntnet relays from Wirecarp, now you can properly shut
off Ntnet, and the warning that it kicks you out of the program is now
true.

Gives the Holodeck it's own network root define and fixes Syndicate
network showing up on Wirecarp

Wirecarp's PDA logs now shows the source of an action

## Why It's Good For The Game

Moves ModPCs further from NTNet so we can move towards deleting it
entirely
Makes Wirecarp more responsible and trustworthy
Removes useless stuff that never gets used, simplifying a overthought
overcomplicated system.

## Changelog

🆑
balance: Wirecarp now properly shuts off NtNet remotely.
balance: Wirecarp now shows the source of a PDA that does an action.
fix: Wirecarp can no longer be used to see if Nukies exist through their
networks.
del: Removes Software downloading and communication Ntnet networks, as
they were pretty worthless.
/🆑
2023-03-21 09:50:47 +13:00
John Willard
5b63228b9a 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.
/🆑
2023-03-01 00:16:26 -07:00
John Willard
c58cbb4dfb Reworked PDA menu & NtOS themes (#73070)
## About The Pull Request

This is a port/rework of
https://github.com/yogstation13/Yogstation/pull/15735 - I changed a lot
of how it acted (some themes are locked behind maintenance apps).

The original author allowed this port to happen, and I really liked how
it looked there so I'd like to add it here.

### Applications

Removes the hardware configurator application, as all it did was show
you your space and battery now that all hardware was removed. These are
things your PC does by default, so it was just a waste of space.
Adds a Theme manager application instead, which allows you to change
your PDA's theme at will.
Adds a new Maintenance application that will give a new theme, however
it will also increase the size of the theme manager app itself as it's
bloatware.

### Menu

There's now a bar at the top of the menu showing 'special' tablet apps
which, for one reason or another, should stand out from the rest of the
apps. Currently this is PDA messenger and the Theme manager

Flashlight and Flashlight color is now only an icon, and is shown on the
same line as Updating you ID


https://cdn.discordapp.com/attachments/961874788706574386/1069621173693972551/2023-01-30_09-10-52.mov


![image](https://user-images.githubusercontent.com/53777086/215501361-5ea3086e-2ff5-4ab1-bde4-8a3d14014fce.png)

### Themes

Adds a lot of themes to choose from, although SOME are hidden behind
Maintenance applications, which will give you a random theme. These are
bloatware however, so they come with some extra cost to the app's
required space storage.

Themes are now supported on ALL APPLICATIONS! If you have a computer
theme, you will have that theme in EVERY app you enter, rather than just
a select few.
ALSO also, emagging the tablet will automatically set & unlock the
Syndicate theme, which makes your PDA obvious but you can disguise it if
you wish through just re-painting it to something else.


https://cdn.discordapp.com/attachments/828923843829432340/1069565383155122266/2023-01-30_05-29-53.mov

### Preferences

This also adds a pref for theme, reworking the ringtone code to work
with it as well. I also removed 2 entirely unused PDA prefs just 'cause.

Screenshot not up-to-date, they now have proper names.

![image](https://user-images.githubusercontent.com/53777086/215463669-0fe9951a-71f8-4b71-a97d-b79b5a2f945a.png)

### Other stuff

Made defines for device_themes
Added support for special app-side checks to download files
Fixed programs downloading themselves TWICE because defines all had the
same definition
Removes the Chemistry computer disk as it was empty due to chemistry
app's removal
Removes the 'run_emag' proc, since apps can directly refer to the
computer to check for emag status instead.
Moved over and added better documentation on data computer files, and
moved the ordnance ones to the same file as the others.

## Why It's Good For The Game

It makes PDAs a lot more customizable while adding more features to
maintenance applications. I think the themes look cool and it fits with
PDAs being "personal" anyways.

I also explained most of my other arguments in the about section, such
as the hardware configuration application.

## Changelog

🆑 Chubbygummibear & JohnFulpWillard
add: A ton of new NtOS themes, which are accessible by the new Themify
application that comes with all PCs.
add: Emagging a PC now defaults it to the Syndicate option (and adds it
to go back to it if you wish)
add: There's a new maintenance app that gives you rarer themes
qol: The NtOS Main menu was moved around, added "header" applications
that are shown where the Flashlight is, such as your Theme manager and
PDA messenger.
code: Made defines for device_themes
code: Added support for special app-side checks to download files
code: Removes the 'run_emag' proc, since apps can directly refer to the
computer to check for emag status instead.
fix: Programs no longer download twice.
del: Removes the Chemistry computer disk as it was empty due to
chemistry app's removal
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-02-17 01:14:24 +00:00
John Willard
af98c74f4a Adds maintenance tablet apps (Health analyzer is one now too) (#71738)
About The Pull Request

Sprites were generously made by https://github.com/Tramzz

This was a branch I've been putting off for months because my hatred for tablet apps brought me to removing computer parts, tablets, and ntnet, however I've now returned (after a lot more procrastination).

Adds Maintenance tablet applications to the game, so far there's only three of them, for proof of concept;

    The health analyzer app (the chem analyzer part is removed entirely) move away from being given to medical/geneticists/detectives/RD.

There is on exception, which is the CMO, who gets to have the application on their tablet roundstart. Maybe it could be given to their role disk as well?

    A camera application:

image
image

    MODsuit control application:

image
image

image

Maintenance applications stand out from normal tablet apps because they can't be downloaded off the App store, and instead can only be found in maintenance, with a one-use download, cloning the application from a disk to a computer, or vice versa, will delete the old one, meaning you can only have one application at once.
Why It's Good For The Game

This is more as a proof of concept for maintenance applications, but I also think that the analyzer application wasn't really that good as an app, you should either use a health analyzer or the wand in front of medbay, you shouldn't just have one in your tablet at all times because it makes it lame if your analyzer is stolen.
Changelog

cl JohnFulpWillard, sprites by Tramzz
add: Added Maintenance tablet applications, applications that can't be cloned or downloaded from the store, instead you can find one app in maintenance.
balance: The Analyzer tablet application is also a maintenance tablet application now.
/cl
2023-01-19 10:43:32 +13:00
ShizCalev
07e5c402e0 fixes computers spamming fingers are too big warning. also fixes exploit when using programs w/ fingers that are too big. (#72698)
Fixes #72153

🆑 ShizCalev
fix: You'll no longer constantly be spammed with messages if your
fingers are too big to interact with a computer's keyboard.
fix: You can no longer interact with programs that were previously
opened on a computer if your fingers are too big to use the keyboard.
fix: You can now look at computer screens even if your fingers are too
big to use the keyboard.
/🆑
2023-01-14 23:52:01 -08:00
John Willard
f00ca62d08 Adds a modular computer subsystem to shift modPCs away from radios (#71732)
## About The Pull Request

Adds the modular computer subsystem which is meant to replace mod PC's
reliance on networks and radios, specifically the network subsystem, the
ntnet interface, and /datum/ntnet. This PR removes station_root ntnets
entirely, but I tried to keep it small.

This PR also removes a ton of unused vars and defines, such as NTNet
channels that were unused (peer2peer and systemcontrol), atmos networks
(as they were removed a while ago) and NTNet var on relays (its stated
purpose is so admins can see it through varedits, but that's useless now
that it's a subsystem)

I also removed ``setting_disabled`` as a thing the RD can do, it turned
off ALL ntnet systems. However, this was when there were 4 different
ones, now that there's only 2 I thought it was redundant and he could
just click 2 buttons to close them.

## Why It's Good For The Game

``/datum/ntnet``, ``/datum/component/ntnet_interface``, and
``/datum/controller/subsystem/networks`` are all old-code messes that
depend on eachother and is hard for people to understand what exactly it
adds to the game. 90% of its features is allowing the Wirecarp app to
see all the ruins that spawned in-game, which I don't think is something
that we even WANT (why does the RD need to know that oldstation spawned?
Why should they know this anyway??)

This hopefully starts to simplify networks/ntnet to make it easier to
remove in the future, because surely there are better alternatives than
**this**

## Changelog

🆑
refactor: Modular computers NTnet and applications run on its own
subsystem, please report any new bugs you may find.
/🆑
2022-12-06 00:29:31 -08:00
John Willard
b8d86849c8 Removes ID computer parts (Removes computer hardware) (#71320)
## About The Pull Request

Removes the last computer part in the game: ID parts
Because this is removed, I also removed all computer hardware in the
game, and removed mentions of it in the game.
There is still 'hardware', as in Computer, Tablet, or Laptop.

Computers now all hold one ID slot by default, the only time a second ID
was needed was to use the access of both at once, and for the ID
modification application. This was now replaced with a new UI that only
has one tab, one ID slot:


https://user-images.githubusercontent.com/53777086/202801939-151b783f-75c8-46bf-a6c5-1b57b0d0da8e.mp4

## Why It's Good For The Game

Computer hardware is finally dead 🦀 

## Changelog

🆑
balance: All modular computers now only have one ID slot, and cannot be
upgraded.
qol: The HoP's access application now only has one app, logging in will
directly modify the ID that's in it, making it less confusing to swap
back and forth.
/🆑
2022-11-20 23:04:45 -08:00
John Willard
f1f46275f0 Removes tablet hard drives entirely (HDD & SSD) (#70678)
* Removes HDD's entirely

HDDs have been removed, though the code for it is still currently lingering as it's required for portable disks. I'll have to find a solution to this one day, but as I am going to sleep, this is a problem for future me.

* starts on removing SSD

* updatepaths and kills off SSD

* update path :D

* Fixes to programs and icons

* Ready for review now

I read over everything I did and tried to fix anything I saw wasn't done right. Hopefully better comments now.

* merge conflict  fix

* can't win them all

* takes viruses into account in paths, fixes it in snowcabin

* Renames the updatepaths

* removes the qdel loop

* accidentally new'ed programs twice

* Fix program's computer var

* destroy pen and disk, dont run kill program on something killed

* more fixes for pens and idle threads

* Fixes PDAs installing apps twice.

* simplifies inserted disk & PDA disk

* fuck's sake

* Use istype instead

* revert

* Revert "revert"

This reverts commit 9ede628c6fef9c7c86417234f6d8ada1ff9e2fef.

* why did that happen

* Update code/modules/modular_computers/computers/item/tablet.dm

* MC_SSD added to master lol

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
2022-10-26 00:29:50 +00:00
John Willard
9bf96c7763 Misc PDA code improvements (#70555)
* How to conflict with PRs: A guide

* Removes unnecessary support for the now-removed job disks from Tablet's TGUI menu, and tablet's ui_act.
* Adds autodoc comments to computer files
* Removes the unused 'unsendable' var on computer files
* Generally improves code on tablets, now process isn't looping through every idle thread twice!
* Moves the check for program in idle_threads above checking if supported by hardware, because it's already running, so there's no need to check.

* eh

* revert a scipaper change
2022-10-19 22:16:57 -04:00
John Willard
7c990173e0 Removes network cards and printers from tablets (#70110) 2022-09-26 11:18:58 -07:00
VexingRaven
d59c41613b Fixes Signal Commander program breaking all signalers on default frequency (#69773)
* Fixes signalcommander program breaking all signalers on default frequency
2022-09-11 20:27:34 -04:00
distributivgesetz
9c0ac84ba6 PDAs open their messenger when replying to messages through chat (#68355)
* Clicking Reply in PDA messages now opens your PDA messenger app.

* Additionally does a ton of PDA code improvement.
2022-07-17 23:53:33 -04:00
vincentiusvin
4a1eb42930 Reimplements breathedeep's scan into atmozphere. (#67438)
* AtmoZphere tablet app now has the previous functionality of the BreatheDeep cartridge's scanning ability, meaning you can swap to analyzer mode to analyze with right-click.
2022-06-03 04:45:35 -04:00
John Willard
c61d6dc3cb Removes CPU, Sensors and Identify ModPC parts. (#66924)
Removes CPU, Sensors and Identify parts from modulra computers.
This is in effort to simplify how tablets and tablet apps are, while removing barriers to download specific apps. Limiting apps needed for your job, through hardware, is a terrible idea, and just limits departmental stuff to being there roundstart/latejoin, punishing people who job change through the in-game HoP system, devaluing the job as a whole.
2022-05-13 14:50:35 -04:00
John Willard
cc57407c79 [MDB IGNORE] Removes tablet cartridges + reworks a ton more (#66505)
- All tablets who previously had apps in a cartridge now has them built-into their tablet instead. This means it costs space for it.
- Rebalances the sizes of several apps to help them fit on Command tablets (Cargo ordering costed 20!!)
- Removes tablet cartridges, they've been reworked into a regular old portable disk (the same you use for toxins/borgs)
- Removes Signaller (the module required to run the signaller app) from tablets (likely will remove more in the future)
- Refactors the health/chem scanning app to not be as bad
- Dehardcodes detomatix resistance
- Ability to send PDA's to all is now tied to your access rather than a cartridge
- Moves 'eject disk' button to the very top of the UI
2022-05-11 12:04:11 -04:00
zxaber
e55d72680b The Science Hub app for research is now available for science employees in addition to heads of staff. (#65035) 2022-03-05 17:41:22 -08:00
Watermelon914
375a20e49b Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs.
Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines.

Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing.
Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc.

(Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
2021-06-14 13:03:53 -07:00
tralezab
fa83a686c4 Add #cargobus and gauntlets (also modernizes ntchat) (#58609)
* cargobus, start of gloves

* basics of the HAUL gauntlets

* fully mapped in

* almost forgot the gauntlets

* ntnet improvements

* cargo gaunts, tablet cargobus

* excludes body bags

* dmis and map back

* readd icons
2021-05-05 05:56:39 +03:00
zxaber
11367dda89 Adds the ability to download a borg's logs using SiliConnect. (#57300)
About The Pull Request

Adds a function to Siliconnect in which you can tap a borg using a mobile device that is currently running the software, and it will download the borg's logs. These logs list events such as being locked or unlocked, taken offline and being restored, and the process of being emagged. Borg logs will now list the emag user's name as a new user.

Downloading the logs is done by right-clicking the borg while the software is open and active. This will "tap" the borg with the device, initiating the log transfer automatically. The transfer will take eight seconds to complete, requiring you and the borg to stay adjacent the entire time, and the borg will get a large red text alert about the upload when it starts. The logs are also not stored permanently on the device, and will be lost if the app is closed.

This PR also introduces the tap() proc for modular computer programs, and adds functionality the the computers to call it when right-clicking with the tablet as a tool. Should the app use the tap in a meaningful way (such as starting a borg log download), it will return TRUE, and the computer will end the secondary attack chain.

Currently, this requires using a tablet or laptop with Siliconnect, as you cannot tap with a console. Someday I hope to add an additional hardware option for consoles in the form of a wireless hand scanner to replicate tapping.
Why It's Good For The Game

Adds a neat way to "diagnose" a borg acting oddly, assuming you have a way to keep them still. Allows one to view if the borg has been emagged, by whom, what SiliConnect messages the borg has received, the number of law changes that have been made, as well as some other (somewhat fluff) information relating to taking damage and getting upgrades.
Changelog

🆑
add: You can now download a cyborg's internal logs by right-clicking them with a mobile device running SiliConnect. Take a look if one is acting a bit strange, you might find something interesting.
add: Borg integrity (health) is now roughly shown in SiliConnect, under "Condition".
/🆑

To Do:

Fix the to_chat not being sent to the borg when a log transfer breaks due to distance
Add some sort of text feedback when tapping an atom with a device, or viewing one being tapped.
Possibly restrict syndicate borgs from having their logs viewed by SiliConnect (and likewise with station borgs and Roboverlord) Changed my mind on this, will implement later if we find it's needed.

    Change the log area of the window to expand naturally rather than use a fixed height

image

I'm not super deadset on the emag user's name being listed. It seems like a neat function unique to having a tablet running Siliconnect (as most of the other info is already available through other means), and one can always pop the brain out for a re-borg and demand the name anyway.
2021-03-20 11:53:45 +13:00
TemporalOroboros
e4079c87b8 update_appearance (#55468)
Creates update_name and update_desc
Creates the wrapper proc update_appearance to batch update_name, update_desc, and update_icon together
Less non-icon handling code in update_icon and friends
Signal hooks for things that want to change names and descriptions
99%+ of the changes in this are just from switching everything over to update_appearance from update_icon
2021-02-19 12:06:18 -03:00
Mothblocks
0f435d5dff Remove hideous inline tab indentation, and bans it in contributing guidelines (#56912)
Done using this command sed -Ei 's/(\s*\S+)\s*\t+/\1 /g' code/**/*.dm

We have countless examples in the codebase with this style gone wrong, and defines and such being on hideously different levels of indentation. Fixing this to keep the alignment involves tainting the blames of code your PR doesn't need to be touching at all. And ultimately, it's hideous.

There are some files that this sed makes uglier. I can fix these when they are pointed out, but I believe this is ultimately for the greater good of readability. I'm more concerned with if any strings relied on this.

Hi codeowners!

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-14 16:53:29 -08:00
Andrew
1ff541b829 NTDownloader UI revamp (#56704)
Revamp of the software downloader program for modular computers.

Changes:

- Programs are now sorted alphabetically with incompatible ones in the end of the list.
- Installed programs are now displayed in the list.
- Added program icons.
- Moved the error messages in place of the download button.
- Only the most important error message is displayed now. Priority: compatibility, access, free space.
- Syndicate programs are now displayed in the same list, but have a warning message from NT (There are no warning messages on syndicate OS).
- Added program categories to improve navigation. The default option "All" contains items from all categories.
- Download progress bar moved in place of the Disk usage bar. Disk usage is updated only after the download is complete, so the information was inaccurate during download. And the download bar now always visible regardless of selected category.
- The old download progress bar (next to the corresponding program) is replaced with "Downloading" indicator with a spinner.

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2021-02-10 00:24:38 +02:00
TiviPlus
0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00
zxaber
185e85f32b Notification support in modular computer apps and CIMS (#54724)
Allows modPC programs to send alerts, and adds a proc in the computer object to handle playing the sound effect and sending a message to visible users. These notifications can be muted on a per-program basis. Programs can also set themselves to highlighted in the NTOS Main menu; this is intended to be used along side alerts, but really can be used any time a program wishes to tell the user there is new information.

NT CIMS (SM monitor) now plays an alert during SM delaminations if the app is closed. The app must have had an SM selected before closing, or it will not send alerts. Notifications are sent when the SM makes a radio alert. If the app is currently the active program, the app will instead send a notification just once, when the SM begins delamination, so as to not annoy engineers that are already aware of the issue.
2020-11-18 09:43:19 +02:00
TiviPlus
9fb0c73f63 Grep for proc(var/bad) (#54848) 2020-11-09 08:44:35 -03:00
zxaber
c03c4f364c Unhardcodes Modular PC icons (#54158)
* Changes modPC program icons to not be hardcoded

* icons

* tgui.bundle.js, we meet again
2020-10-04 14:38:07 +03:00
Timberpoes
1f23cc281d Enforce preserving parent proc return values across ui_act call stacks (#53964)
All ui_act procs should call parent by default. All procs should preserve the value of the parent proc when it's TRUTHY and pass it down the call stack. No UI should be interactible when its flags or state indicate it should not be, except when explicity overriden by child procs intentionally disregarding parent return values to achieve a specific goal.
2020-09-26 11:52:39 -03:00
Timberpoes
29e8852428 Fix runtime with NTOS apps and improve code involved (#53779)
There exists a specific state where ui.open() can be called yet the 
result would be a null window and such behaviour would be intentional. 
The following CRASH in ui.send_asset() would thus be misleading, 
because send_asset() was called after open().

This PR adds more information to the CRASH about when the failure state 
can occur, makes open() return a value based on whether it actually 
opened a new pooled window or not, and makes sure modular computer apps 
don't send_assets unless a new pooled window was created.
2020-09-17 17:46:33 -07:00
Donkie
53b212ddf2 Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#52981)
* Process procs now properly use deltatime when implementing rates, timers and probabilities

* Review fixes

* Geiger counters cleanup

Made hardsuit geiger code more similar to geiger counter code
Geiger counters are more responsive now

* Moved SS*_DT defines to subsystems.dm

* Rebase fix

* Redefined the SS*_DT defines to use the subsystem wait vars

* Implemented suggested changes by @AnturK

* Commented /datum/proc/process about the deltatime stuff

* Send delta_time as a process parameter instead of the defines

Also DTfied acid_processing

* Dtfied new acid component
2020-09-08 10:24:05 +02:00
TiviPlus
ca366c3ea1 Bools and returns super-pr (#53221)
Replaces like 70-80% of 0 and such, as a side effect cleaned up a bunch of returns
Edit: Most left out ones are in mecha which should be done in mecha refactor already
Oh my look how clean it is

Co-authored-by: TiviPlus <TiviPlus>
Co-authored-by: Couls <coul422@gmail.com>
2020-08-28 14:26:37 -07:00
zxaber
94c4367ede Support for expansion-class modPC hardware (#52644)
* Support for expansion-class modPC hardware

* end of the line

* As requested

Did anyone know that the tablet vendor was attaching the wrong ModPC printer? I bet no one knew that.

* update
2020-08-11 13:40:05 +03:00
zxaber
a4b97193be Updates modular PC program names to have some flavor (#52492)
* Better program names

* Forgot a few things.

* oops
2020-08-06 12:48:18 -03:00
Aleksej Komarov
8a12f15f40 tgui: Fixes assets, CDN support (#52321)
* tgui: Better asset code, CDN support

* Rebuild tgui

* µ-fix
2020-07-19 00:28:00 -07:00
Ryll-Ryll
1f31064c3e Merge remote-tracking branch 'tgstation/master' into who-named-this-damned-proc 2020-07-16 21:43:14 -04:00
Aleksej Komarov
0cf00a2645 tgui 4.0 (#52085)
* tgui 4.0 hyper squash

* Upgrade dependencies
2020-07-16 20:13:04 +02:00