Commit Graph

105 Commits

Author SHA1 Message Date
Ghom
38bebeaf47 Prosthetic Item arms no longer prevent ventcrawling: the remake (#93499)
## About The Pull Request
This is me picking up #93077 but with code changes relative to the two
new flags that Krysonism added in his PR, which unfortunately he never
finished.

## Why It's Good For The Game
Monkeys should be able to ventcrawl even if their left or right arm is
actually a chainsaw or armblade or whatever. See #93077

## Changelog
🆑 Krysonism
balance: prosthetic item limbs are no longer considered equipped items
for some purposes such as ventcrawling.
/🆑

---------

Co-authored-by: Krysonism <robustness13@hotmail.com>
2025-10-23 11:13:18 -04:00
SyncIt21
978e662314 Fixes circuit multitool revealing special items (#93419)
## About The Pull Request
- Fixes #93409

Code copied from strip menu so the same principles apply

## Changelog
🆑
fix: circuit multitool won't reveal special items on mobs
/🆑
2025-10-12 23:54:09 +02:00
MrMelbert
750ca9d2ec Two as anything greps (and some other cleanup) (#92974) 2025-09-20 13:44:28 -04:00
Joshua Kidder
4453412fe2 [NO GBP] Another fix for ore silo logging interface (#92610)
## About The Pull Request
This adds null-checking in the Typescript itself to create values if
there are some missing, specifically with values that indicate that this
is replacing a value that was null as a result of an error. It also
updates another place where I forgot to correctly set user_data.

## Why It's Good For The Game
Fixes more bugs.

## Changelog
🆑 Bisar
fix: The .tsx code for Ore Silo logs will now catch nulls instead of
TBing.
fix: Fixed ANOTHER place where user_data for an ore silo log wasn't set
correctly.
/🆑
2025-09-08 15:38:28 -07:00
mcbalaam
ab1136909c Improves the ore silo UI (#92460)
## About The Pull Request

Improves the ore silo UI, continuing
https://github.com/tgstation/tgstation/pull/91142

Before:

<img width="760" height="336" alt="image"
src="https://github.com/user-attachments/assets/06c2f628-ea05-49be-88ed-9947ffc55254"
/>

After:

<img width="626" height="604" alt="image"
src="https://github.com/user-attachments/assets/d6a501be-425f-44ba-b75a-c238e20b06fe"
/>

All sources of silo material withdrawal are now consistent with naming
to get properly color coded, which helps with looking for stuff.

## Why It's Good For The Game

Better UI readability, more consistent logs

## Changelog


🆑
qol: Color coded and consistent material silo logs
/🆑

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
2025-09-02 18:55:12 -07:00
Joshua Kidder
68b83c5188 [NO GBP] Ore silo logging fix 3: Error-catching for bad logs, adding logging to another couple calls (#92353) 2025-07-30 13:10:21 +02:00
Joshua Kidder
988ca0b482 Ore silo logging & access refactor; UI updates, single-target bans, more robust logging information, more robust access control (#91142)
## About The Pull Request

# More robust logging
## Ore silo logs have now been refactored in the UI to display:
- Number of sheets is now the relative unit when displaying a given log.
- Instead of `100 iron` being displayed when removing one sheet, it just
says `1 iron`
- Instead of `25 iron` being displayed when using a quarter sheet, it
just says `0.25 iron`
- All information from ID_DATA(log_user) now sent to tgui backend
    - The items rendered to ore silo users are:
	- Name on ID, job on ID
- If the ID's bank account (if one is registered) is one of the ore
silo's banned users
- If the user for a given entry was wearing a chameleon card, they will
always appear unbanned
- NOTE: The bank account ID # is (currently) not shown to players using
the ore silo.
- Full log information is rendered within a dropdown; the dropdown
one-liner shows
  - Action (deposit, eject, item created)
- Amount (deposit/eject? amount of material used. item created? number
of items created.)
- Either name of material (if deposit/eject) or the name of items
crafted
- The name of the user who performed a given operation (if wearing an
unbanned ID) or ID_READ_FAILURE (if ore silo ID requirement has been
disabled and the person is not wearing an ID)
  - As name, but instead, the job of the ID (or ID_READ_FAILURE)


![image](https://github.com/user-attachments/assets/bb992a81-8db3-4a92-ad3a-917239fc407a)


# Access control improvements
## Single-user bans
- Anyone with QM access (not silicons) can now ban/unban a user from a
given log from using the ore silo
    - Bans are associated to bank account IDs.
        - Wearers of chameleon cards bypass any ban restrictions.
	- Anyone with QM access on their worn card bypasses ban restrictions.
	- Silicons bypass ban restrictions.
- QM access requirement is removed if the ore silo is emagged.
- Silicons can ban/unban people if the ore silo is emagged.
## Worn ID requirement
- Enabled at roundstart, can be disabled by anyone with QM access (not
silicons)
- If enabled, you must be wearing an ID with a bank account associated
to it to use ore silo materials.
- Wearers of chameleon cards bypass this restriction (so-called ID
requirement free thinkers wearing chameleon ID cards)
- QM access requirement to toggle removed if emagged.
- Silicons can toggle this on/off if the ore silo is emagged.
# Access control radio notifications
## Access control operations reported on the radio
- Any operations for access control are reported on radio channels.
    - Currently, the policy is always the default.
- In the future, the ore silo UI will allow the quartermaster to modify
what operations are reported on what channels (petty QM broadcasting ban
reports on Common)
- Current default policy:
    - Reported on COMMON channel:
- Anyone but the Captain attempts to ban someone with QM access from the
ore silo (nice try dumbass)
	    - Ore silo ID requirement toggling
	- Reported on COMMAND channel:
	    - Common channel reports.
		- Per-user banning/unbanning.
		- Anyone without QM access attempts to ban/unban someone.
		- Anyone without QM access attempts to toggle the restriction for ID.
		- Silicons attempting to tamper with the ID requirement restriction
		- Silicons attempting to tamper with the ban/unbanned user list
- A ban attempt failing because a given log entry had a user with no
bank ID.
	- Reported on SECURITY channel:
	    - Common channel reports.
		- Per-user banning/unbanning.
		- Anyone without QM access tampering with the silo.
	- Reported on SUPPLY channel:
	    - Command channel reports.
- Reporting to the radio is disabled if the ore silo is emagged.
## Modifications to the remote_materials component
- Strictly encompass the behavior for connecting/disconnecting ore silos
to material receptacles (RCDs, machines, etc) into procs on the
component, instead of handling it all over the place

## Why It's Good For The Game

Gives people with ore silo access more fine grained control over ore
silo use without having to resort to heavy-handed fabricator lockouts

Makes the logging on the ore silo more robust so we can make sure we
kill the right Roboticist for using all the materials

Offers an avenue for sidestepping all of this with a chameleon card or
emag if a given traitor (organic or otherwise) is particularly opposed
to DRM mats.



https://github.com/user-attachments/assets/effd2c63-509c-4d33-992f-837a0d62b935



## Changelog
🆑 Bisar
add: The ore silo has had a significant expansion to its logging
capabilities.
add: The ore silo now allows any ID with Quartermaster access (NOT
SILICONS!) to ban/unban specific users from the silo.
add: The ore silo now has a toggle (on by default) that a user of ore
silo materials has an ID with an associated bank account. This can be
toggled by anyone with Quartermaster access (NOT SILICONS!)
add: NanoTrasen discounts any reports that Syndicate contraband
(cryptographic sequencer, agent card) can be used to circumvent any
protocols instituted on the ore silo access control routines.
add: The ore silo now announces operations to ban/unban users and
enable/disable ID requirements on radio channels (check the Github for
actions reported to what channels.)
add: The tgui interface for ore silo log entries has been reworked.
refactor: The code for logging a given access to ore silo materials has
been significantly refactored.
qol: Ore silo log entries now display materials spent in terms of sheets
rather than the obfuscated absolute-units previously display (1 iron
ejected instead of -100 iron, 0.25 used in a craft instead of -25 iron)
/🆑
2025-07-26 22:17:51 -07:00
Jeremiah
4f422e5d5c Fixes debug component printer (#92025)
## About The Pull Request
Seems this went under my radar. The backend was sending the wrong data.
I also tuned up the UI a little bit to signify that it's the debug
component printer.

It will print anything listed, free.

<details>
<summary>Screenshots</summary>

![Screenshot 2025-07-07
162543](https://github.com/user-attachments/assets/de9b490d-66ee-4c67-8453-485769fd2ebd)

![Screenshot 2025-07-07
162550](https://github.com/user-attachments/assets/2a5a7cfd-3cd3-42af-aeea-3d83bb51ce9c)

</details>

## Why It's Good For The Game
Fixes #71511
## Changelog
🆑
admin: The admin spawned component printer UI functions again
/🆑
2025-07-09 12:16:54 +12: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
Y0SH1M4S73R
80ec197457 Fixes USB ports/cables erroneously detaching when shuttles move (#91043)
## About The Pull Request

When a shuttle moves, usb ports now wait for the shuttle to finish
moving all of its contents to determine whether they should detach from
whatever they are connected to.

This PR also adds a new signal whose registered handlers can affect what
gets moved when part of a shuttle moves, but until a handler for that
signal actually needs to do so, that behavior only really matters in the
sense that it is now exposed to lua scripting.
2025-05-16 21:49:57 -05: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
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
MichiRecRoom
f7bc2fa47e Fix the component printer not showing item icons in its UI (#89762)
## About The Pull Request
Whilst testing a PR for Monkestation, I found out the component printer
wasn't showing icons for the items in its UI. This PR fixes that.

In fairness, the icons don't really do much here - most of the component
printer designs are the same icon (screenshot taken from monkestation):


![image](https://github.com/user-attachments/assets/af81ce46-4351-467b-bc72-3ec95cd60ca1)

But they're already in the asset datum, and it makes this UI look a
little nicer, so why not use them?

## Why It's Good For The Game
Makes this UI more consistent with other UIs that look like it (i.e. the
protolathe).

## Changelog

:cl:MichiRecRoom
fix: The component printer now shows icons for the items in its UI.
/🆑
2025-03-03 00:04:23 -05:00
Lucy
d656f0f4ec Refactor GLOB.admin/debug/fun_state into cached /datum/ui_state/admin_state instances (#89417)
## About The Pull Request

So, some admin verbs/tools that used tguis, i.e edit/debug planes, were
available to admins with +DEBUG... but the ui_state used
`GLOB.admin_state`, which checks for +ADMIN - meaning that if they
_only_ had +DEBUG, they would have the verb... but it would do nothing
when they used it.

I've refactored `GLOB.admin_state`, `GLOB.debug_state`, and
`GLOB.fun_state` into a merged `/datum/ui_state/admin_state`, with a var
for which specific permissions are being checked for.

You now use the `ADMIN_STATE(perms)` macro to get the UI state for those
specific perms, i.e `admin_state(R_ADMIN)` or `admin_state(R_DEBUG)`,
and the resulting UI state will check for _those specific perms_.

These are initialized and cached in `GLOB.admin_states` (which should
never be directly accessed).

So, I've went thru every single usage of `GLOB.admin_state`,
`GLOB.fun_state`, and `GLOB.debug_state`, and made them all use
`ADMIN_STATE()` with the actual permission flags needed to use said UI
in the first place.

## Why It's Good For The Game

Kinda dumb for specific admin permissions to be granted verbs that don't
let them use it anyways.

## Changelog
🆑
admin: Certain UI-based tools (plane debugger, filter editor, etc) that
were given to admins with only +VAREDIT or +DEBUG, but refused to open
without +ADMIN, now actually work for admins that have the needed
permission.
/🆑
2025-02-17 00:54:00 +01:00
leaKsi
917b68cba9 A bunch of sanitization fixes (#89477)
## About The Pull Request

- Adds sanitization to windoor names and circuit shells.
- Fixes a (mostly useless) href exploit with wizard's contracts.

## Why It's Good For The Game
Sanitizing input is probably good.

## Changelog
🆑
fix: Fixed a few sanitization issues.
/🆑
2025-02-15 10:42:08 +01:00
Wallem
bf61287cdb Makes integrated circuit nodes more colorful (#89360)
## About The Pull Request
Makes it so nodes in an integrated circuit are colored depending on
their category in the component menu.

Before:

![1212121212121212](https://github.com/user-attachments/assets/aec4602f-c837-415f-8f42-0dcfb9e0e4aa)

After:

![452345235345](https://github.com/user-attachments/assets/2a28f471-f0c1-4fda-9727-41db18894cb1)

All categories (BCI has been changed to solid black since this for
contrast purposes)

![e](https://private-user-images.githubusercontent.com/66052067/410190943-b66d26b0-29b5-4b3f-8e65-35e6a44b74d1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg3OTU0OTIsIm5iZiI6MTczODc5NTE5MiwicGF0aCI6Ii82NjA1MjA2Ny80MTAxOTA5NDMtYjY2ZDI2YjAtMjliNS00YjNmLThlNjUtMzVlNmE0NGI3NGQxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA1VDIyMzk1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI5MzMxOWUyMzUxMmRkZTQwMThkOTNiNTk3OTEyOTExNWY4NjNkODE0YWJjZjE0MTQwYzM2YTZjYjY0ZGQ4ZDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.uRa_SkIjdhzEbedzzLI1hDzOK-vpgC2ZNoQtvxo4ijE)

If I was some sort of tgui magician I'd try to implement a way to add
comment fields, but since I'm nowhere near that, I figured this was the
least I could do.

## Why It's Good For The Game
This makes it far easier to read integrated circuits and remember what
they do. While there's still inherently some amount of confusion due to
the nature of how node-based programming visually works, hopefully
having it so nodes aren't all the same color helps a bit.
## Changelog
🆑 Wallem
qol: Integrated Circuit nodes are now colored depending on their type.
/🆑
2025-02-07 10:54:21 -08:00
Y0SH1M4S73R
a54009fd67 Circuit Wirenet Components + Assembly Shell Tweaks (#88593)
## About The Pull Request

Assembly shells now use power from whatever machine/borg/mech/modsuit
they are attached to the wires of, instead of their own power cell, when
appropriate.

As for the meat of this PR, circuit wirenet components function like
NTnet and NFC components, but their signals are transmitted across
whatever cable network the shell (or in the case of assembly shells, the
machine or button it's inserted into) is connected to. These components
are available with roundstart tech.

## Why It's Good For The Game

Provides a somewhat intuitive way to make circuit networks that aren't
dependent on external factors to continue functioning.

NTnet components require a functional NTnet relay, which usually means
they need telecomms to be working. NFC components have a range limit,
and you need to provide a specific reference to the circuit being
communicated with. Wirenet components, on the other hand, just need the
shell to be anchored (or for assembly circuits, the thing whose wire it
is attached to), and for the shell to have a cable under it.

Also might indirectly provide a reason to use cable layers other than
the default one.

## Changelog

🆑
add: Adds circuit wirenet components, allowing data to be transmitted
and received over cable networks.
qol: When attached to a machine, mech, modsuit, or borg, assembly
circuit shells will use power from those instead of the circuit's own
cell.
/🆑
2025-01-13 16:16:12 +00:00
SyncIt21
26343e0e24 Improves code for recycling circuits in component printer (#87787) 2024-11-10 15:06:40 +01:00
grungussuss
58501dce77 Reorganizes the sound folder (#86726)
## About The Pull Request

<details>

- renamed ai folder to announcer

-- announcer --
- moved vox_fem to announcer
- moved approachingTG to announcer

- separated the ambience folder into ambience and instrumental
-- ambience --

- created holy folder moved all related sounds there
- created engineering folder and moved all related sounds there
- created security folder and moved ambidet there
- created general folder and moved ambigen there
- created icemoon folder and moved all icebox-related ambience there
- created medical folder and moved all medbay-related ambi there
- created ruin folder and moves all ruins ambi there
- created beach folder and moved seag and shore there
- created lavaland folder and moved related ambi there
- created aurora_caelus folder and placed its ambi there
- created misc folder and moved the rest of the files that don't have a
specific category into it

-- instrumental --

- moved traitor folder here
- created lobby_music folder and placed our songs there (title0 not used
anywhere? - server-side modification?)

-- items --

- moved secdeath to hailer
- moved surgery to handling

-- effects --

- moved chemistry into effects
- moved hallucinations into effects
- moved health into effects
- moved magic into effects

-- vehicles --

- moved mecha into vehicles


created mobs folder

-- mobs --

- moved creatures folder into mobs
- moved voice into mobs

renamed creatures to non-humanoids
renamed voice to humanoids

-- non-humanoids--

created cyborg folder
created hiss folder
moved harmalarm.ogg to cyborg

-- humanoids --




-- misc --

moved ghostwhisper to misc
moved insane_low_laugh to misc

I give up trying to document this.

</details>

- [X] ambience
- [x] announcer
- [x] effects
- [X] instrumental
- [x] items
- [x] machines
- [x] misc 
- [X] mobs
- [X] runtime
- [X] vehicles

- [ ] attributions

## Why It's Good For The Game

This folder is so disorganized that it's vomit inducing, will make it
easier to find and add new sounds, providng a minor structure to the
sound folder.

## Changelog
🆑 grungussuss
refactor: the sound folder in the source code has been reorganized,
please report any oddities with sounds playing or not playing
server: lobby music has been repathed to sound/music/lobby_music
/🆑
2024-09-23 22:24:50 -07:00
Joshua Kidder
3690bd3d8a Add distance output to direction circuit component, resizes several shells (#86577)
## About The Pull Request

The direction component outputs the direction of an entity if it's
within 7 tiles of the circuit. Since it already checks the distance, I
added distance as one of its outputs.

Besides that, I did a pass over the generics and shells and resized many
of them. Most I resized to be small or tiny, except for the airlock
shell, which I set to be bulky because it's a whole ass door. The shells
I didn't touch remain at 'normal' size.

1) All handheld shells set to small, compact remote set to tiny 
2) all components and the generic of the circuit set to tiny
3) drone shell set to small
4) airlock shell set to bulky
## Why It's Good For The Game

Returning the distance spares any would be circuiteers from having to do
a labyrinthine set of calculations to determine distance themselves.

Making most circuits more portable makes them more attractive for people
to tote around.
## Changelog
🆑 Bisar
qol: The 'direction' circuit component now also returns the distance of
its target.
balance: Most circuit shells and the generic component and generic
circuit have had their size reduced.
balance: The airlock circuit shell has had its size increased.
/🆑

---------

Co-authored-by: Metekillot <ubuntu@ip-172-26-7-23.us-east-2.compute.internal>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-09-14 22:54:07 +00:00
John Willard
1880003270 Reworks silicon/ai access checking & fixes some ui_act's (#84964)
## About The Pull Request

Currently to check for Silicon access, we do:
``if is silicon or is admin ghost or has unlimited silicon privileges or
has machine remote in hand``
What has unlimited silicon privileges? Bots, Drones, and admin ghosts.
To check for AI access, it just checks for AI instead of silicon, and
doesnt check for unlimited silicon privileges.

This was kinda silly, so I thought I should make this a little easier to
understand.
Now all silicon/ai traits come from ``AI_ACCESS_TRAIT`` or
``SILICON_ACCESS_TRAIT``. I made a single exception to keep Admin ghost,
since now instead of being a var on the client, we moved it to using the
same trait but giving it to the client instead, but since we have to
keep parity with previous functionality (admins can spawn in and not
have this on, it only works while as a ghost), I kept previous checks as
well.

No more type checks, removes a silly var on the mob level and another on
the client.

Now while I was doing this, I found a lot of tgui's ``ui_act`` still
uses ``usr`` and the wrong args, so I fixed those wherever I saw them,
and used a mass replace for the args.

Other changes:

- machinery's ``ui_act`` from
https://github.com/tgstation/tgstation/pull/81250 had ``isAI`` replaced
with ``HAS_AI_ACCESS``, this has been reverted. Machine wands and admin
ghosts no longer get kicked off things not on cameras. This was my
fault, I overlooked this when adding Human AI.
- Human AI's wand gives AI control as long as it's in your hand, you can
swap to your offhand. I hope this doesn't end up going horribly,
otherwise I'll revert this part. It should let human AIs not have their
UI closed on them when swapping to eat food or use their door wand or
whatnot.
- Bots previously had special checks to scan reagents and be
unobservant, I replaced this with giving them the trait. I also fixed an
instance of unobservant not being used, so now statues don't affect the
basic creature, whatever that is.

## Why It's Good For The Game

This is an easier to understand way of handling silicon access and makes
these mobs more consistent between eachother.
Other than what I've mentioned above, this should have no impact on
gameplay itself.

## Changelog

🆑
fix: Statues don't count as eyes to creatures.
fix: Human AIs and Admin ghosts no longer get kicked off of machines
that aren't on cameranets.
/🆑
2024-08-19 10:43:45 +00:00
SmArtKar
d598d4ff3b Integrated circuit modules now can be linked to component printers (#85519)
## About The Pull Request
Title. They've been missing quick component addition functionality due
to an oversight and were rather annoying to use.

## Why It's Good For The Game

Simple QOL, you no longer need to add every piece manually and can
develop circuits as actually intended (fully from their UI, as you can
do with primary circuits themselves)

## Changelog
🆑
qol: Integrated circuit modules now can be linked to component printers
/🆑
2024-08-14 13:21:30 +02:00
SmArtKar
f985856a09 Circuit components can now be recycles in circuit printers, and automatically do so upon being removed if a circuit has a linked printer (#85648)
## About The Pull Request

Added support for remote material insertion type whitelists and utilized
it to allow circuit printers to recycle components. Removing a component
from UI while the circuit has a linked printer will automatically
recycle it.

Also fixed a rogue space appearing when recycling a single item

## Why It's Good For The Game

You literally cannot do anything with components you remove/do not need
anymore so usually they end up littering circuit lab's floors. This
should make developing circuits slightly less annoying.

## Changelog
🆑
qol: Circuit components can now be recycles in circuit printers, and
automatically do so upon being removed if a circuit has a linked printer
spellcheck: Recycling a single item no longer outputs a line with a
rogue space infront of it
/🆑
2024-08-14 13:12:57 +02:00
carlarctg
fec5d96d09 Using a multitool inhand tells you where the area APC is (#84738)
## About The Pull Request

Using a multitool inhand tells you where the area APC is

## Why It's Good For The Game

Sometimes it's a bit of a pain to find it. No need to keep it sikret
when map knowledge is a thing.

## Changelog

🆑
qol: Using a multitool inhand tells you where the area APC is
/🆑
2024-07-08 20:14:31 +00:00
Watermelon914
0db2a23faf Adds a new power storage type: The Megacell. Drastically reduces power cell consumption/storage. [MDB Ignore] (#84079)
## About The Pull Request
As the title says. A standard power cell now only stores 10 KJ and
drains power similar to how it did before the refactor to all power
appliances.

The new standard megacell stock part stores 1 MJ (what cells store right
now). APCs and SMESs have had their power cells replaced with these
megacell stock parts instead. Megacells can only be used in APCs and
SMESs. It shouldn't be possible to use megacells in any typical
appliance.

This shouldn't change anything about how much 'use' you can get out of a
power cell in regular practice. Most should operate the same and you
should still get the same amount of shots out of a laser gun, and we can
look at expanding what can be switched over to megacells, e.g. if we
want mechs to require significantly more power than a typical appliance.

Thanks to Meyhazah for the megacell icon sprites.

## Why It's Good For The Game
Power cell consumption is way too high ever since the power appliance
refactor that converted most things to be in joules. It's a bit
ridiculous for most of our machinery to drain the station's power supply
this early on.

The reason it's like this is because regular appliances (laser guns,
borgs, lights) all have a cell type that is identical to the APC/SMES
cell type. And it means that if we want to provide an easy way to charge
these appliances without making it easy to charge APCs/SMESs through a
power bug exploit, we need to introduce a new cell type to differentiate
between what supplies power and regular appliances that use power. This
is primarily what the megacell stock part does.

This moves us back to what it was originally like before the power
refactor, where recharging power cells wouldn't drain an exorbitant
amount of energy. However, it maintains the goal of the original
refactor which was to prevent people from cheesing power generation to
produce an infinite amount of power, as the power that APCs and SMESs
operate at is drastically different from the power that a regular
appliance uses.

## Changelog
🆑 Watermelon, Mayhazah
balance: Drastically reduces the power consumption and max charge of
power cells
balance: Added a new stock part called the battery, used primarily in
the construction of APCs and SMESs.
add: Suiciding with a cell/battery will shock you and potentially dust
you/shock the people around you if the charge is great enough.
/🆑

---------

Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com>
2024-06-25 00:32:19 +00:00
Afevis
53a8ba74c8 grep's for "recieve" typos (#83369)
Just spellchecking some common mistakes.
2024-05-23 00:41:05 -04:00
tmyqlfpir
53518e043b Circuit editor QoL and new circuit components (#82969)
## About The Pull Request

This PR introduces a number of minor quality of life improvements to
already existing circuit components, and adds three new components.

<img width="600" alt="preview"
src="https://github.com/tgstation/tgstation/assets/80724828/85d39b6d-b055-430e-8996-0da088616887">

## Why It's Good For The Game

This improves the overall experience for circuits.

### UI changes

<img width="550" alt="grid aligned"
src="https://github.com/tgstation/tgstation/assets/80724828/cc7b43b5-292f-4643-beab-e01ae675fb19">

Grid align is now an option for circuit designers. It will round objects
to the nearest 10px units internally, and can be toggled on/off by the
new additional button beside the component menu button. This makes
circuits easier on the eyes as things are pixel perfect aligned.

<img width="814" alt="tooltips"
src="https://github.com/tgstation/tgstation/assets/80724828/0d31c98f-3be9-46e0-ab37-20bac3799112">

All three buttons have been given tool tips.

### Tweaked Components

<img width="136" alt="voice activator"
src="https://github.com/tgstation/tgstation/assets/80724828/21dd0f65-cb98-4bd5-aeb0-63315e842cb6">

* Adds a on/off flag to the voice activator component
-- This saves power for circuits as you're not forced to use a compare
flag check to turn off voice activation

<img width="136" alt="speech"
src="https://github.com/tgstation/tgstation/assets/80724828/9137b76c-3077-4597-8411-2d9694b39e9e">

* Adds a quiet mode flag to speech component
-- This is ideal when you want a device to speak, but don't want other
people to hear. A good example would be a handheld translator that you
only want to hear yourself.

### New Components

<img width="136" alt="ntnet list literal"
src="https://github.com/tgstation/tgstation/assets/80724828/657c851b-d442-4a63-8650-410cb8e76089">

* An NTNet Send component that allows everything to be input much like
the list literal component
-- This makes sending stuff over NTNet easier for the user, and use less
power as it won't require an additional list literal component

<img width="136" alt="compare health state"
src="https://github.com/tgstation/tgstation/assets/80724828/0bed076c-3aa1-4931-af90-2b9eb8e1ae9a">

* A health comparison component that checks the entity's health state,
and can return true or false depending if the entity is alive, sleeping,
unconscious, critical or dead
-- This could be achieved by using a health sensor and a compare
component, however it lacks the ability to know when a entity is
unconscious or sleeping

<img width="136" alt="toggle"
src="https://github.com/tgstation/tgstation/assets/80724828/7017b6bf-937a-42ad-87f3-4f1134853ac3">

* A quick toggle component to allow the switching between a true and
false state
-- This could be achieved by using a logic component and self linking,
however this makes it far easier for newcomers to make something as
simple as an on/off switch (such as a handheld translator which uses the
front button to turn on/off)

## Changelog
🆑
qol: Add tooltips to circuit editor buttons
qol: Add grid alignment mode to circuit editor
add: Added new compare health state component
add: Added new NTNet send list literal component
add: Added new toggle component
qol: Added activity toggle to voice activator component
qol: Added quiet mode to speech component
qol: NTNet send component will not use power/trigger if NTNet is offline
/🆑
2024-05-15 19:31:18 +00:00
Zephyr
7f8752be14 Admin Verb Datums MkIII | Now with functional command bar (#82511) 2024-04-12 12:27:09 -07:00
san7890
c403a6eccc Wraps lowertext() to ensure proper stringification. (#82442)
## About The Pull Request

Fixes #82440

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

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

I've seen a few cases in the past where LateInitialize is done cause of
the init return value being set to do so for no real reason, I thought I
should try to avoid that by ensuring LateInitialize isn't ever called
without overriding.

This fixes a ton of machine's LateInitialize not calling parent
(mechpad, door buttons, message monitor, a lot of tram machines,
abductor console, holodeck computer & disposal bin), avoiding having to
set itself up to be connected to power. If they were intended to not
connect to power, they should be using ``NO_POWER_USE`` instead.

Also removes a ton of returns to LateInit when it's already getting it
from parent regardless (many cases of that in machine code).

## Why It's Good For The Game

I think this is better for coding standard reasons as well as just
making sure we're not calling this proc on things that does absolutely
nothing with them. A machine not using power can be seen evidently not
using power with ``NO_POWER_USE``, not so much if it's LateInitialize
not calling parent.

## Changelog

🆑
fix: Mech pads, door buttons, message monitors, tram machines, abductor
consoles & holodeck computers now use power.
/🆑
2024-04-08 22:15:07 -06:00
moocowswag
c7f4dd2d8c Fixes Circuit Multi-Tools to work on Carbons holding / wearing anything at all (#82262)
## About The Pull Request
Ever since https://github.com/tgstation/tgstation/pull/81215 I havent
been able to scan anyone that was wearing or holding anything with a
circuit multi tool because the options never popped up, the click was
just unresponsive and nothing would happen.

Then I remembered that Ghommie posted a picture of it working when the
pr was first made and went to look at any changes made in the commits
afterwards

For some reason uniqueid set to true was what made the list not appear,
and I cant find any side effects from removing that bit of code.
## Why It's Good For The Game

This works as intended.



https://github.com/tgstation/tgstation/assets/62126254/61a5435c-9d51-462b-927a-9b1fc1cffb0e
## Changelog
🆑

fix: Circuit multitools can now correctly scan carbons who are wearing
clothes or holding objects again.

/🆑
2024-03-27 22:47:47 -06:00
Watermelon914
ece026703d Makes lua file upload work with bigger files and standardizes a few file|null (#82202)
## About The Pull Request
My lua scripts were hitting the topic byte limit, so this makes file
upload of lua scripts able to bypass the topic limit.

## Why It's Good For The Game
Removes arbitrary restriction on how big a lua file can be in bytes.

## Changelog
🆑
admin: Admins can now run lua files bigger than 36 KB by importing them
directly.
/🆑

Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2024-03-26 20:03:44 -04:00
Pickle-Coding
c1f11f26ce Converts arbitrary energy units to the joule. Fixes conservation of energy issues relating to charging cells. (#81579)
## About The Pull Request
Removes all arbitrary energy and power units in the codebase. Everything
is replaced with the joule and watt, with 1 = 1 joule, or 1 watt if you
are going to multiply by time. This is a visible change, where all
arbitrary energy units you see in the game will get proper prefixed
units of energy.

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

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

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

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

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

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

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

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

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

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

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-03-23 16:58:56 +01:00
John Willard
aace5f46f4 You can do more things while floored (#81641)
## About The Pull Request

While on the floor, you can:
- Use the UIs of Atmos machinery (except thermomachine and bluespace gas
vendor), Holopads, Crayons (spray cans too), radios, and Disposal bins
- Close extinguisher cabinets with Right-Click
- Click and drag yourself onto a photocopier to climb onto it.

I also changed all instances of ``ui_status`` to have all the args it's
being passed, I was messing with it a bit but it's gonna be for a later
PR.

## Why It's Good For The Game

It's an extra layer of harmless realism, also nice QoL for people who do
not have functional legs and do not have a wheelchair.

## Changelog

🆑
qol: You can use atmos machines, holopads, crayons, spray cans, and
disposal bins while floored.
fix: You can close extinguisher cabinets while floored.
fix: You can climb onto a photocopier from the floor.
/🆑
2024-02-26 18:34:20 +01:00
Ghom
32b2989d06 Circuit multitools can now mark (visible) items worn/held by a mob (#81215)
## About The Pull Request
Title. This includes a small change to the get_visible_items proc, only
used by phobias until now, to include worn accessories. Not really worth
of a changelog entry itself.

## Why It's Good For The Game
This makes the process of scanning oft worn equipment a bit easier,
perhaps weavering the need of consent for some pranks and shenanigans.


![immagine](https://github.com/tgstation/tgstation/assets/42542238/a0d62488-2ee1-4051-9737-62c9247a6137)

I've added a bit of contrast to the icon for the "mob" option since
then.

## Changelog

🆑
qol: Circuit multitools can now mark (visible) items worn/held by a mob.
/🆑
2024-02-18 13:08:54 -05:00
SyncIt21
e4b23f2b4b General maintenance for Lathes (#81244)
## About The Pull Request
1. **Qol Stuff**
- Screentips & examines for screwdriver, crowbar acts, multiool &
wirecutter Also for Alt click
- Techfabs can now also use the Mouse drag functionality to set drop
target for items
- Lathe printing animation now plays on loop instead of just flicking
once till printing is finished for more visual feedback

2. **Code Improvements**
- Merged `start_making()` with `do_make_item()`. That proc was like only
3 lines long and used only in 1 place so let's just move that code to
`ui_act()`
- Merged `user_print_item_id()` with `ui_act()`. Again was used only in
1 place so let's just move that code in to save some proc overhead
- Sets `processing_flags` for autolathe to `NONE` cause we don't use
`process()`
    - Autodocs vars such as `hacked` , `shocked` etc & procs
- `maxmult` is now computed client side saving backend bandwidth,
`construction_time` is removed from lathes which did not use it
- Removed all usages of lathe taxes and their related vars, removed
engineering lathe no tax from ice moon, replaced with normal engineering
lathe

3. **Fixes**
- Lathe sheet insertion animations are now linked & work again for all
material types inserted via remote silo/local storage,
silver/titanium/plastic all play the same animation(that is
`protolathe_shiny` overlay). Other materials have their own respective
overlays
- Fixes #81243. Calling `update_static_data_for_all_viewers()` is too
expensive for the UI. We should instead use `SStgui.update_uis(src)`
which will report the `busy` status to the UI more immediatly
- Fixes #81236. Some problems with the params passed to the timer
callback. It should now print the correct number of requested items
- Fixes #81192. `design.materials` would runtime for custom material
items as they were list of texts not materials. We have to pass our
manually parsed list of materials for an specific item to ensure they
are set & used correctly. Same fixes apply for techfabs as well


## Changelog
🆑
qol: adds screentips & examines for screwdriver & crowbar acts & alt
click.
qol: techfabs can now use the mouse drop functionality to set drop
target.
qol: lathe printing animation plays on loop while printing rather than
flicking once for more visual feedback
fix: lathe sheet insertion animations are now linked & work again for
all material types inserted via remote silo/local storage
fix: printing custom materials items from autolathe works again.
fix: printing multiple items from lathes will actually print that
correct quantity of items requested.
fix: printing items the 2nd time around from lathes won't cause the UI
to reload each time.
code: autodoc for some vars & procs, merges procs.
refactor: Optimized code for autolathe & techfabs in general. Report
bugs on github
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-02-08 13:34:03 +01:00
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
SyncIt21
d36a5af64f Removes material breakdown flags, traits & miscellaneous fixes. (#80389)
## About The Pull Request
1. Removes material breakdown flags i.e. all flags with the format
`BREAKDOWN_XXX`. These flags do nothing, there are no special checks to
transform materials based on these flags, they are passed around just
because certain procs require them for syntax purposes only.

Apparently there were plans to make these flags do something special
from the comment

302247c0d1/code/__DEFINES/construction/material.dm (L43)
But nobody got any ideas for years now. The only special thing we can do
with them now is remove them and reduce code clutter, so let's do that
    
The only flag that ever did something was the
`BREAKDOWN_INCLUDE_ALCHEMY` flag. This only worked when coupled together
with `TRAIT_MAT_TRANSMUTED` trait(which is only used by the reagent
metalgen) and when both this trait & flag are combined together... they
still do nothing

302247c0d1/code/game/atom/atom_materials.dm (L41-L42)
Yup they cancel out each other to prevent returning an empty list, the
traits only job was to prevent materials from being recycled (like why?
what's the benefit of that? nothing) and the flag was meant to bypass
this restriction so both the trait & the flag cancel out each other
therefore doing nothing meaningful. Best remove them both and call it a
day.

2. Fixes an error in displaying number of sheets inserted into a mat
container when that sheet is made up of alloy materials. it would count
as 2 or more because it would take the sum of total material amount
inserted and not the actual sheets. That's fixed now.

3. Remote materials now properly respect the `MATCONTAINER_NO_INSERT`
flag

4. Adds helper proc to insert materials via the remote material
component with proper context

## Changelog
🆑
fix: mat container displays correct number of sheets inserted for alloy
materials.
fix: remote materials now properly respect the `MATCONTAINER_NO_INSERT`
flag.
code: removes material breakdown flags and related traits.
code: adds helper proc to insert materials via the remote material
component with proper context.
/🆑
2023-12-25 02:29:26 +01:00
YesterdaysPromise
71a1fee2f1 Explodes device.dmi (#80025)
## About The Pull Request

I woke up today and thought 'what would be easy thing to do today so I
can say I've done something?'. Then I remembered I saw several gangtool
usages the time I split radio up, and I could remedy those. 7 hours
later, device.dmi is split in a folder of its own, and I've also given
unique sprites to door remotes and landing desginators.


## Why It's Good For The Game

The device.dmi was kind of a mess.

## Changelog

🆑
/🆑
2023-12-09 13:31:50 +01:00
YesterdaysPromise
f4535255c0 Nukes radio.dmi, adds inhands for somewhat relevant items. (#79792)
## About The Pull Request

Third /icon/ cleansing splinter 1. Comments on commits say all it does
pretty much.


![image](https://github.com/tgstation/tgstation/assets/122572637/6540e588-bed8-4e98-81f5-2a6f449c53c3)


## Why It's Good For The Game

Inhand for walkietalkie was requested in the project, gets rid of some
usecases of old 'gangtool', headset splitoff requested by Fazzie.
Inhands reflecting the items they are supposed to represent is nice.

## Changelog

🆑
image: Following now have unique item sprites: syndicate war declaration
radio, curator and chief beacon's, chaplain beacon.
image: Following now have unique inhand sprites: radio, export scanner,
walkie-talkie, syndicate war declaration radio, curator and chief
beacon's, chaplain beacon.
/🆑
2023-11-20 14:22:07 +01:00
John Willard
aa820c08fe Oldstation now has their own RND (#78132)
## About The Pull Request

This PR does many things and I expect to be asked to atomize some stuff.

### Oldstation Additions

Oldstation now has their own research server, generating their own
points. To help alleviate major concerns, they have a few stuff to help
with this:
- They now have a pre-built operating computer
- They now have an Autopsy scanner
- They now have access to Experimental Dissection

Experimental Dissection is the old dissection, giving research points in
the form of paper notes on completion. They must be turned in to the RND
server (only works on the Oldstation one, so you can't abuse this) for
points. This was an idea I've had for some time, as Oldstation is used
somewhat as a representation of how ss13 used to be (through its use of
directional windows (before they got removed, but I'd like to bring them
back), old IDs, RTGs, and old engines before they got removed from the
game fully)

Considering there are 11 alien mobs in Oldstation, there is 27.5k
research points to get from alien corpses, enough to bring them up to
speed with whatever they wish to do. This is their 'alternative' for
experiments (which they can still do if they want, but it is very hard
to do, outside of dissection which is needed for the node).

This surgery isn't repeatable, isn't upgradable, and isn't removed by
being healed. It is not mutually exclusive with autopsy (so you can't
ruin yourself doing the wrong surgery).

### Other stuff

- Ninjas now drain RND points from the server they drain from, rather
than always hitting science
- Syncing machines to research roundstart is now a macro, and now
immediately syncs to a server on your Z-level. Machines will
automatically connect to the Science servers if none else are available.

### non-player facing

- Science, Admin, and Oldstation techwebs are now no longer vars on
research, but stored in research's list of techwebs.
- ``get_available_servers`` and ``find_valid_servers`` are now procs on
the research subsystem, rather than the experisci component.
- Oldstation code has been split into separate files.

## Why It's Good For The Game

Oldstation is one of my favorite ruins, but it is also one of the
largest complaints for RND (along with Golems) because they use the
station's Science nodes & points (I recently tried de-hardcoding Science
stuff to help prepare for this, but I didn't get everything in advance).

The complaint stems from these ghost roles, who are meant to be a fun
activity to do while waiting for the next round, using the station's
research points for their own stuff, completely untrackable unless
someone goes out of their way to grief a ghost spawn just for using
points to get things they need. These roles make their own servers to
drain the station, and I find that unfun and quite boring for everyone-
it's also not very flavorful, why would Charliestation know of the
station's RND to take advantage of it?

This hopes to fix those issues, make Charliestation more worthwhile, and
more flavorful.

## Changelog

🆑
fix: Getting a node researched now properly makes it no longer hidden.
fix: Ninjas draining RD servers now drains it from the connected
techweb, rather than sniping Science.
balance: Machines will first try to connect to a techweb with servers on
their z-level, with the Science techweb remaining as fallback.
add: Oldstation RND, comes with their own Techweb and special surgery to
gain research points through dissecting Xenomorphs.
/🆑
2023-09-07 17:59:17 +01:00
Watermelon914
52b9c952b9 Adds associative list manipulation to circuits, updates a few list circuit components. (#77803) 2023-08-27 11:36:20 -04:00
SyncIt21
9aed3b6a8f General code maintenance for Mat container related stuff (#77671)
1. Removes `/obj/machinery/ore_silo/proc/remote_attackby()`. This proc
calls `datum/component/material_container/user_insert()` anyway which
performs all the checks necessary for inserting stuff into the ore silo
and `/obj/machinery/ore_silo/proc/remote_attackby()` was just repeating
its code & checks. So now inserting into the ore silo is directly
handled by the mat container without this proxy proc making the
operation slightly faster
2. Removed silo `attackby` code. Same operations can be done via
`screwdriver_act` & `crowbar_act` procs much cleaner
3. The ore silo now hooks onto signals
`COMSIG_MATCONTAINER_ITEM_CONSUMED` and
`COMSIG_MATCONTAINER_SHEETS_RETRIVED` and logs into silo when they are
triggered. This means when you insert/eject sheets from the silo the
connected machine performing the operation no longer has to do the
logging manually thus the proc `silo_log` has been removed from a lot of
places ,reducing overall code size
4. A lot of stuff that use materials from the ore silo follow this
pattern.

i.e. They first use the materials from the silo and then log it via
`silo_log` proc. This code pattern is repeated in a lot of places so
let's just merge these 2 lines with some extra sanity checks into a
single proc inside `remote_materials` itself. That's what was done and
the number of places where you log manually into the silo has been
removed further reducing code size everywhere.
5. Added auto doc & cleaned up some procs

Since logging is now done by the ore silo directly, we need a way to
pass the machine that is inserting items into the silo to the signal
handlers of the ore silo [via the `context` var]. So other code changes
elsewhere is because of this var
2023-08-21 22:23:01 +00:00
SyncIt21
6a55c540da Module duplicator has cheaper costs for circuit duplication (#77180)
## About The Pull Request
Fixes #77158

> this is pretty clearly a relic of the resource cost rebalance.

Yes it is. `cost_per_component` var had a fixed value of 1000. Now it's
value is 1 /10th of `SHEET_MATERIAL_AMOUNT `
2023-07-30 14:22:11 -05:00
SyncIt21
920551d603 [NO GBP]Mat container Final clean-up & patches (#77092)
## About The Pull Request
1. Fixes #77177 
Some things were not connecting to the ore silo round start because the
silo was not initialized yet so it went to local storage. Now it
connects with the ore silo again
3. Removed some unused code in remote materials
4. Protolathe uses `eject_sheets()` defined in remote materials and not
it's own version because that's redundant
5. Don't put the item back in the players hand when inserting it in the
material container cause we haven't even removed it yet
6. `fast_split()` is now even faster & robust and is a global proc
7. Some code cleanup for RHD silo link

## Changelog
🆑
fix: some things not connecting to the ore silo round start
/🆑
2023-07-29 15:36:46 +02:00
SyncIt21
e92ae5b75b Material container & related stuff ui refactors & clean-up (#76220)
## About The Pull Request

**1. Material container clean-up & refactor**
- Replaced `total_amount` var with `total_amount()` proc, this var can
be easily computed by summing up all material amounts rather than
storing it as a var which is tedious to update & keep track of when
materials are added/removed
- Removed unused procs `transer_amt_to()`, `can_insert_amount_mat()`,
and `get_categories()`. These procs are not used anywhere in the
codebase so let's remove them & make some space.
- Callbacks are replaced with signals, the callbacks don't need to be
explicitly garbage collected & having macros & procs marked with
`SIGNAL_HANDLER` makes your intentions more readable & explicit.
- Fixes #76151 
All material adding, removal, checking operations are "Integer"
operations, i.e. the final value is rounded & them made 1 if the final
value is 0 using the macro `OPTIMIZE_COST`[coudn't come up with a better
name]. No more dealing with decimal value materials
The problem was after the protolathe was upgraded with better parts all
the design costs were multiplied with a decimal `efficiency_coeff`
value, this means even though in the UI the cost was displayed as 60
bluespace crystals its actual cost was `60.0001` something in the
backend causing this check for materials to fail & print the error
message.
- Replaced `GetComponent(/datum/component_material_container)` with just
a simple ref to the material container when adding the component, so we
can save some overhead from calling this proc
- Gave all procs a ton of documentation with documentation having
documentation
- Fixes #76506 RCD and other devices that uses the silo link upgrade now
have the correct material usages
- Fixes #72096. It wasn't just a problem with ancient protolathe but
with all machines that used `datum/component/remote_materials` the
problem was remote materials would add an instance of
`datum/remote/material_container` if it wanted to use local storage but
this component would get added before `datum/component/remote_materials`
could be registered i.e. it comes before remote_materials in the
component list. So when the machine is destroyed it will first destroy
`material_container` & then `remote_materials` therefore destroying the
materials before they could get ejected
- Silo link is established when parent is registered with remote
materials raher than adding an external timer which is faster
- Everything that uses a material container will auto eject their sheets
when destroyed
- Moved this & remote materials into its own folder for better
organization


**2. Material UI Changes**
- Removed the x25 & x50 print buttons from the autolathe, now they just
have x5 & x10 buttons like the protolathe, These buttons were of no use
since you could just type the exact amount you want to print in the
`[Max: <some amount>]` side bar. The code to compute these buttons was
just plain right nasty & some of it unused in the UI.
- The material eject button in the material bar does not gray out when
you can eject exactly one sheet
- All material cost are integer values rounded
- Fixes #76253 Exosuit Fabricator sends the material container static
data to the UI so its material bar is not greyed out when there are
sufficient materials to eject
- Component printer material bar sends the material container static
data to the UI so its material bar is not greyed out when there are
sufficient materials to eject
- Autolathe Material bars now display number of sheets available
- Max printable amount of items are now computed & updated correctly in
the UI. They were displaying wrong values & now get updated when items
are printed, materials are removed
- Silo hold actually works now. When a machine is put on hold it calls
this proc

e929cf39cd/code/datums/components/remote_materials.dm (L78-L87)
Notice how the key is `src` so we should be consistent during checking
if a machine is on hold using the same `src` var. But for some reason we
did dumb shit like this

e929cf39cd/code/datums/components/remote_materials.dm (L150-L153)
What is category? Why do we care for the area the machine is in? None of
it made sense so i removed all that junk and just made it check for
`src` like it should
- Removed redundant `removable` & `sheets` var from the material
container ui_data. These vars are unused in the UI
- If an item does not have the required materials then upon clicking
that item you will not get any error message but instead nothing happens

## Changelog
🆑
fix: items can be printed from autolathe & protolathe when the exact
material amounts are present in them after upgrading
fix: max printable amount now shows the correct value & updates when
items are printed, materials are removed in the autolathe & protolathe
fix: component printer material bar is not greyed out when there are
sufficient materials to eject
fix: rcd and other devices that uses the silo link upgrade now have the
correct material usages
fix: silo hold actually works
fix: machines using local storage to hold materials will eject it's
materials as sheets when deconstructed/destroyed
refactor: Autolathe Material bars now display number of sheets available
refactor: printing an item that does not have enough materials will fail
silently with no error messages
refactor: Drone dispenser will eject sheets upon deconstruction
refactor: all things that store materials will auto ejects its sheets(if
there is sufficient material) when destroyed
refactor: inserting an item into the material container will display the
units consumed as sheets not absolute units
refactor: removed x25 & x50 print buttons from the autolathe
2023-07-24 19:47:14 -04:00
YesterdaysPromise
fb10121022 Icons folder cleaning wave two (#76788)
## About The Pull Request

Further continous organizing and cleaning the Icons folder. There are
still some minior nitpicks left to do, but I reached my daily sanity
expenses limit again, and the faster these get in the less issues for
both me and others later. Also cleans some mess I caused by my blindness
last PR.

## Why It's Good For The Game

Saner spriters = better sprites
2023-07-14 18:36:41 +00:00
Helg2
8a2e6f0eb8 Autolathe, protolathe, mech fab and comp printer now use defines for matter bins values. Also some production ui do. (#76020)
Changed hardcoded matter bins values to use defined
`SHEET_MATERIAL_AMOUNT` for following stuff: autolathe, protolathe, mech
fabricator and component printer.

`Material Access Bar` and `MaterialIcon` used for protolathes, circuit
printers and etc. now also use defined `SHEET_MATERIAL_AMOUNT`, via
static ui data, to prevent same issues in future.

Also changed some notes in /// parts just because why not.
2023-06-21 01:08:51 +00:00
LemonInTheDark
ae5a4f955d Pulls apart the vestiges of components still hanging onto signals (#75914)
## About The Pull Request

Signals were initially only usable with component listeners, which while
no longer the case has lead to outdated documentation, names, and a
similar location in code.

This pr pulls the two apart. Partially because mso thinks we should, but
also because they really aren't directly linked anymore, and having them
in this midstate just confuses people.

[Renames comp_lookup to listen_lookup, since that's what it
does](102b79694f)

[Moves signal procs over to their own
file](33d07d01fd)

[Renames the PREQDELETING and QDELETING comsigs to drop the parent bit
since they can hook to more then just comps
now](335ea4ad08)

[Does something similar to the attackby comsigs (PARENT ->
ATOM)](210e57051d)

[And finally passes over the examine
signals](65917658fb)

## Why It's Good For The Game

Code makes more sense, things are better teased apart, s just good imo

## Changelog
🆑
refactor: Pulled apart the last vestiges of names/docs directly linking
signals to components
/🆑
2023-06-09 06:14:31 +00:00
Watermelon914
ff5a2469e6 Makes the component menu in the integrated circuit interface more intuitive. (#75364)
## About The Pull Request
Added a notice box to the component menu in the integrated circuit
interface explaining how to link an integrated circuit to a component
printer to allow for integrated circuit programming away from the
component printer.


![image](https://github.com/tgstation/tgstation/assets/37270891/6a7ed31a-7d45-49a6-8025-09564ef099d2)

Last sentence in the above image has been removed. Integrated circuits
will now update their static data once linked so closing and re-opening
the UI is unnecessary.

## Why It's Good For The Game
It wasn't clear anywhere in game that you could link integrated circuits
to component printers. I've run into players being completely unaware of
this feature, so this should help to make it more clear that players
don't need to print out components manually from the component printer
and slap them into an integrated circuit each time.

## Changelog
🆑
qol: Added a message to the component menu in the integrated circuit
interface that explains how to link an integrated circuit to a component
printer.
/🆑

---------

Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2023-05-14 15:54:36 -07:00