Commit Graph

101 Commits

Author SHA1 Message Date
SkyratBot
67628cdcf9 [MIRROR] Oldstation (Charlie) experiments tweaks [NO GBP] (#28552)
* Oldstation (Charlie) experiments tweaks [NO GBP]

* oldstation.dmm

---------

Co-authored-by: Andrew <mt.forspam@gmail.com>
Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com>
2024-07-02 20:15:23 +05:30
SkyratBot
65f0e6bd76 [MIRROR] Adds a new power storage type: The Megacell. Drastically reduces power cell consumption/storage. [MDB Ignore] (#28376)
* Adds a new power storage type: The Megacell. Drastically reduces power cell consumption/storage. [MDB Ignore]

* Multi chargers

* all this other shit

* maps

* more fixes

* even more

* mapping

* map fixes

* MCR

* map2

* map3

* map4

* map5

---------

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: SpaceLoveSs13 <68121607+SpaceLoveSs13@users.noreply.github.com>
Co-authored-by: Fluffles <piecopresident@gmail.com>
2024-07-01 23:44:49 +05:30
SkyratBot
434c1bea7a [MIRROR] Refactor modular computer (and application) attackby into item_interaction (#28360)
* Refactor modular computer (and application) attackby into item_interaction (#84245)

## About The Pull Request

Sooooooooo I was recently notified of an issue (#84185) that popped up
from me replacing the `attackby(...)` chain on id cards, where it's no
longer possible to put money into IDs inside of PDAs by slapping it
against the PDA.
As I expected, this is because modular computers both still use
`attackby(...)`, and would call `attackby(...)` on the ID they contained
if hit with cash.

24a23009e8/code/modules/modular_computers/computers/item/computer.dm (L799)
Now this could've been an easy one line no-gbp fix where I just replace
it with a direct call to `insert_money(...)` on the ID and call it a
day!
But hey. Might as well get rid of the `attackby(...)` altogether while
we're at it.

First off, because the `attackby(...)` proc was getting quite bloated,
we split off all the specific item behaviours into `[X]_act(...)` type
procs to clean it up.
We then make those return item interaction flags, so we can call them on
`item_interaction(...)` after the right typecheck passes and immediately
return their results.
This also involves replacing the `application_attackby(...)` on
applications with an `application_item_interaction(...)`, and making it
return the item interaction flags too.

The code of each subsection isn't significantly different, though
reorganized a bit in some cases.
Like inserting a computer disks now tries to move it into the computer
_first_ before swapping out whichever disk is already in there, so it
doesn't swap out the disk if putting the new one in fails.
## Why It's Good For The Game

Fixes #84185.
Having more stuff be updated to the proper `item_interaction(...)`
system is cool and good.

* Refactor modular computer (and application) attackby into item_interaction

---------

Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
2024-06-25 16:19:55 +05:30
SkyratBot
d899ab0404 [MIRROR] Mild QOL updates to vending machine-cargo interactions. (#28282)
* Mild QOL updates to vending machine-cargo interactions. (#83933)

## About The Pull Request

This Pull makes a few minor improvements to the features I added with
vendor cargo (#81582).
Changes are as follows:

* Vending machines, when restocked with a refill pack and while
containing a number of credits, will play a cash register sound to alert
you that there's a payout associated with the action.
* The Vending Restock app now works on all modular computer platforms,
as opposed to just laptops and tablets.
* This is actually hilarious because I even made a screen icon for
modular consoles, and it's just been unused ever since merge.
* The "cargochat" cargo modular console now has the vendor refill app
pre-installed.
* Vending machines, when determining their missing inventory during the
associated station trait, now adds from 1-5 credits per missing item, up
from 0-1. The original number was far too low to feel like a strong
incentive based on feedback I'd received, and while still lower than
providing a flat percentage of the missing item specifically (we ran
some numbers on this a few months back), it should at least incentivize
players to keep the station better stocked during regular rounds.

Also, the UI now shows a difference between if all vending machines are
stocked or not.

![image](https://github.com/tgstation/tgstation/assets/41715314/7ea762a6-25d0-4119-87cc-91c1691ba01d)

## Why It's Good For The Game

Most of these are just interfacing and ease of use improvements, as
having the app pre-installed in a place where players can actually make
some use of it's contents should help to improve it's versatility with
regards to the restocking app.

Audio feedback is always good.

In terms of the balance tweak on the stored value on vending machines,
basically it's a way to better incentivize it as an option on the
station and to better encourage players to do these kinds of minor
upkeep tasks for the crew.

## Changelog

🆑
qol: Vending machines now give audio feedback when you restock a vending
refill and get a payout.
qol: The Restock tracker NTOS app for tracking vending machine contents
now works on all consoles, and comes pre-installed on the cargochat
cargo computers.
balance: Vending machines now offer a bit more credits when missing
contents at the start of a round after getting restocked.
/🆑

---------

Co-authored-by: Jacquerel <hnevard@ gmail.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@ users.noreply.github.com>

* Mild QOL updates to vending machine-cargo interactions.

---------

Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@ gmail.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@ users.noreply.github.com>
2024-06-20 16:15:00 +05:30
SpaceLoveSs13
ba5c112a86 Huge Mirror fixes (#27488)
* Fixes incorrect operator usage in mecha code (#82570)

## About The Pull Request

I completely screwed up and told the original PR author of #82415
(9922d2f237) to use the `XOR` operator
instead of the `OR` operator (I wasn't thinking right for some reason
when I was reading the ref), anyways this PR just fixes that because I
misled the contributor into doing something that wasn't correct and
actually would BREAK functionality instead.

* Fixes TGUI debugging tools (#82569)

This project doesn't interfere with the game logic and aims to fix
multiple debugging features that are currently broken. Unfortunately,
kitchen sink and debug layout became broken after migration to Redux.
This PR aims to fix those features.

* Removes unused code for HTML UIs (#82589)

## About The Pull Request

This is the final PR for https://hackmd.io/XLt5MoRvRxuhFbwtk4VAUA that
I've been slowly inching towards the past few months.

This removes ``updateDialog``, ``updateUsrDialog``, ``IN_USE``,
``INTERACT_MACHINE_SET_MACHINE``, and everything surrounding it. Also
fixes advanced camera consoles not booting you off when you're moved out
of reach.

We called ``check_eye`` on mob life whenever they had their machine var
set, but their machine var would never be set to anything that actually
used it, which I found to be a little funny but was also probably my
fault.

## Why It's Good For The Game

This is poor and unmaintained code used for HTML UIs that we no longer
need thanks to TGUI, we should get rid of it to encourage the use of
TGUI in the future instead.

## Changelog


🆑
fix: Advanced camera consoles now boots you off when you're moved out of
reach.
/🆑

* Fixes a variety of input stalling exploits (#82577)

## About The Pull Request

Fixes the following input stalling exploits (maybe missed some): 

- Changing GPS tag 
- Setting teleporter destination
- Request Console Reply
- Various AI law board interactions
- Note, I used `is_holding` but technically this means these fail with
telekinesis. I can swap them to `can_perform_action(...)`, which allows
TK, but I noticed some places explicitly deny TK interactions with Ai
law boards. Not sure which is preferred.
- Borg Rename Board
- Plumbing Machines and Ducts
- APCs and SMES terminal placements
- Stargazers Telepathy
- Go Go Gadget Hat

## Changelog

🆑 Melbert
fix: You can't change the GPS tag of something unless you can actually
use the GPS
fix: You can't set the teleporter to a location unless you can actually
use the teleporter
fix: You can't reply to request console requests unless you can actually
use the console
fix: You can't update AI lawboards unless you're actually holding them 
fix: You can't update a borg rename board unless you're actually holding
it
fix: You can't mess with plumbing machines unless you can actually use
them
fix: You can't recolor / relayer ducts unless you're actually holding
them
fix: You can't magically wire APCs and SMESs unless you're right by them
fix: You can't use Stargazer Telepathy on people who you can't see
fix: You can't configure the Inspector Hat unless you can actually use
it
/🆑

* [NO GBP] Power outage operation fixes for chem master (#82591)

## About The Pull Request
- If the chem master runs out of power mid printing, it will properly
stop the printing process and its animation
- When transferring reagents it correctly checks if we have enough power
without forcing it

## Changelog
🆑
fix: chem master properly shuts down if it loses power mid printing and
won't transfer reagents for the same
/🆑

* Refactor renaming UNIQUE_RENAME items from the pen to an element (#82491)

## About The Pull Request

So a bit ago someone in code_general wanted to make plushies renamable,
but learnt that just adding the `UNIQUE_RENAME` flag wouldn't work as
pens would murder the plushie and only THEN let you rename it. I noted
refactoring both pens and plushies to use the new
`item_interaction(...)` procs would Just Solve This, but, well, they
didn't really have any coding experience.

But, hey, renaming being hardcoded to the pens has annoyed me ever since
I laid my eyes upon the hot mess that is paperwork code.
So here we are!

### We're making it an element.

There's not really much to this, this is mostly the same code but moved
to an element and with some minor cleanups.

First, we move it all from `/obj/item/pen` to a new element we called
`/datum/element/tool_renaming`. With this, instead of having it proc on
`/obj/item/pen/afterattack(...)`, we register it to proc on the
`COMSIG_ITEM_INTERACTING_WITH_ATOM` signal.

6e36ed9840/code/__DEFINES/dcs/signals/signals_atom/signals_atom_x_act.dm (L59-L62)
Secondly, we realize the code is just going through each if statement
regardless of whether the previous was correct.

6e36ed9840/code/modules/paperwork/pen.dm (L225-L258)
And, as we're dealing with text, just make it a switch statement
instead.
```dm
switch(pen_choice)
		if("Rename")
			(...)

		if("Description")
			(...)

		if("Reset")
			(...)
```
Then, we replace all single letter variables with descriptive ones,
replace the if-elses with early returns, and make it actually return
item interaction flags.

Finally, we slap this onto the pen, and we're done.
Now we can slap it onto other fitting renaming tools, and it uses the
proper item interaction system.
## Why It's Good For The Game

I feel it's generally better to not hardcode this to just pens, we have
plenty other writing utensils and possible renaming tools.
It's also a bit cleaner than before.
Apart from that, moves it from using `afterattack(...)` to the proper
item interaction chain by using `COMSIG_ITEM_INTERACTING_WITH_ATOM`,
which should reduce janky interactions.
## Changelog
🆑
refactor: Instead of being hardcoded to the pen, renaming items is now
an element. Currently only pens have this, and functionality should be
the same, but please report it if you find any items that were renamable
but now aren't.
/🆑

* Adds various quality of life changes for cooking to make it less click intensive. (#82566)

## About The Pull Request

- Increases tray item size by 1 item.

- Ranges and griddles can now be fed from trays.

Click when closed => fill soup pot.
Click when open => fill associated oven tray.
Right click when open => fill tray from oven tray
Click griddle => fill griddle surface.
Right click => fill tray from griddle surface

- Martian batter is now 5u of each ingredient into 10u of batter.

Hopefully will make it bug out less where it makes far fewer reagents
than it is supposed to, fixing reagents, or well soups specifically...
is out of scope for this PR.

- Adds the ability to print soup pots and large trays from the service
lathe

Soup pot: 5 Iron sheets, 0.4 bluespace crystal (given their size of
200U)
Large serving tray: 2 iron sheets

## Why It's Good For The Game

Makes cooking a lot less tedious. Especially for people with low
precision when it comes to filling oven trays. This also bring the
behavior up to parity with how you can click microwaves with trays to
fill them, ditto for the food processor. It also allows chef to use the
whole capacity of an oven, as previously you couldn't easily click 6
cake batters or other giant sprites onto the tiny tray.

The tray is now sized to be able to easily feed a griddle 8 items.

## Changelog

🆑
qol: chef equipment can now deposit and withdraw to/from trays!
qol: chef now has access to griddle and oven sized trays!
qol: service can now print soup pots
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>

* Removes grid usage + heavy refactors (#82571)

## About The Pull Request
Grid has been deprecated for quite some time and we still use it. I
won't completely remove the component, this way downstreams won't
immediately suffer, but I can remove it from usage.

Some of these UIs had issues with them and as a hobby project I've
refactored them into typescript / rebuilt them. Airlock electronics, for
instance, looks substantially better.

<details>
<summary>before/after as requested</summary>

current airlock electronics scrolls into oblivion

![6RJ29HCPob](https://github.com/tgstation/tgstation/assets/42397676/ba82bc20-40fa-4af0-b709-7c8846c25652)

updated
![Screenshot 2024-04-11
164321](https://github.com/tgstation/tgstation/assets/42397676/05507e06-6305-4175-8476-778c345f02c8)

</details>

## Why It's Good For The Game
Code improvement + probably UI bug fixes
## Changelog
🆑
fix: Airlock electronics and other access-config type UIs should look
much better.
/🆑

* modular fixes

* [No GBP] Removes cogbar from some stealthy actions (#82593)

Issue brought some missed hidden actions to my attention.

I left cogbars in for _breaking_ handcuffs because resisting is sort of
a gray area. On one hand, you don't want someone to see you doing it; on
the other, there is a visible warning that you started doing it. So,
meet in the the middle, breaking handcuffs is still visible while
resisting isn't.
Closes #82583
Cogbars are not intended to ruin stealth
🆑
fix: Deviants buffed: Rogue shoelacing, pickpocketing and restraint
resisting no longer give cogbar icons.
/🆑

* [NO GBP] ...Remember to add SIGNAL_HANDLER (#82630)

## About The Pull Request

Just realized I forgot to add `SIGNAL_HANDLER` to the all-nighter
`on_removed_limb(...)` proc, even though it handles signals.
## Why It's Good For The Game


fe26373572/code/__DEFINES/dcs/helpers.dm (L9-L11)

* React cleanup (#82607)

## About The Pull Request
- No defaultHooks in react. Might fix issues where pages were not
scrollable on hover.
- createRef in a functional component. should be useref

## Why It's Good For The Game
Code improvement

* Security photobooths have their own ID (#82628)

## About The Pull Request

Prevents the HoP's photobooth button from connecting to the security
photobooth via having the same ID.

## Why It's Good For The Game

I forgot to add this when I made the security photobooth but it's
important that by default without any varedits, the HoP and security
photobooths stay separate.

## Changelog

🆑
fix: The HoP's photobooth button is now consistently connected to the
HoP's photobooth.
/🆑

* Fix buckled alert unbuckling not working properly (#82627)

## About The Pull Request

So funny thing, while trying to reproduce a different issue on the
current master, I coincidentally let my local instance start without
reading, latejoined on the shuttle, and I noticed it wasn't letting me
unbuckle as easily.

Looking into this a bit later, it seems as if it's a line #82593
accidentally changed while moving around the
`/mob/living/carbon/resist_buckle()` proc's flow.

fe26373572/code/modules/mob/living/carbon/carbon.dm (L238-L241)
While before it was
```dm
/mob/living/carbon/resist_buckle()
	if(HAS_TRAIT(src, TRAIT_RESTRAINED))
		(...)
	else
		buckled.user_unbuckle_mob(src,src)
```
Just changing this to `buckled.user_unbuckle_mob(src, src)` fixes this.
## Why It's Good For The Game

Fixes buckled alert unbuckling not working properly.
Fixes #82627.

## Changelog
🆑
fix: Clicking the buckled alert unbuckles you again.
/🆑

* Advanced camera consoles correctly deactivates when something happens to it or the user (#82619)

## About The Pull Request
- Fixes #82520

1. The eye deactivates when the machine is destroyed/deleted
2. The eye deactivates when the machine loses power
3. The computer constantly moniters the users status inside `process()`
and will deactivate when anything happens to them. Its not enough to
just hook onto to the mobs `COMSIG_MOVABLE_MOVED` signal. Literarly
anything can happen to them so we have to check constantly for any
changes

## Changelog
🆑
fix: advanced camera consoles correctly deactivate when something
happens(no proximity, no power etc) to its user
/🆑

* Oven tray checks for ovens (#82615)

## About The Pull Request
- Fixes #82610

Only oven trays have this proc not serving trays or other stuff
![Screenshot
(408)](https://github.com/tgstation/tgstation/assets/110812394/4867cc14-9df3-4398-9d2d-f8e38b5f0da9)

Also oven trays have a null atom storage which prevents it from being
put back in the oven after taking it out. So we remove that check

## Changelog
🆑
fix: you can put back the oven tray after you take it out
fix: only oven trays are allowed in ovens preventing baked food runtimes
/🆑

* Living Limb fixes (feat: Basic mobs attack random body zones again) (#82556)

## About The Pull Request

Reworks Living Limb code to fix a bunch of runtimes and issues I saw
while testing Bioscrambler.
Specifically, the contained mobs are now initialised via element
following attachment so that signal registration can occur at the
correct time. This allows limbs to function correctly when added from
nullspace via admin panel or bioscrambler.

Secondarily (and more wide-ranging) at some point (probably #79563) we
inadvertently made basic mobs only attack the target's chest instead of
spreading damage.
This is problematic for Living Flesh which can only attach itself to
damaged limbs but was left unable to attack damaged limbs.

I've fixed this in a way which is maybe stupid: adding an element which
randomises attack zone pre-attack.
Living limbs also limit this to _only_ limbs (although it will fall back
to chest if you have no limbs at all).
This is _technically_ still different, the previous behaviour used
`adjustBruteLoss` and `adjustFireLoss` and would spread the damage
across your entire body, but there isn't a route to that via the new
interface and this seems close enough.

## Changelog

🆑
fix: Living Limbs created by Bioscrambler will be alive.
fix: Living Limbs can once more attach themselves to your body.
balance: Living Limbs will prioritise attacking your limbs.
fix: Basic Mobs will once again spread their damage across body zones
instead of only attacking your chest.
/🆑

* RPG Loot: Revisited & READY (#82533)

Revival of #72881

A new alt click window with a tarkov-y loading spinner. Replaces the
object item window in stat panel.

<details>
<summary>vids</summary>

toggleable grouping:

![syAA5zf6RK](https://github.com/tgstation/tgstation/assets/42397676/c89b372d-29f6-4ebe-895d-f73bbdc41c19)

now lists the floor as first obj:

![abc](https://github.com/tgstation/tgstation/assets/42397676/cd8dc962-2ac7-41bf-a5d3-b9e926116b06)

in action:

![dreamseeker_IkrPKt2QZt](https://github.com/tgstation/tgstation/assets/42397676/1f990aa0-60f0-47e7-9d93-b63e35d05273)

</details>

- search by name
- 515 image generator is much faster than alt click menu
- opening a gargantuan amount of items shouldnt freeze your screen
- groups similar items together in stacks by default, toggleable
- shows tile as first item
- <kbd>Shift</kbd> and <kbd>Ctrl</kbd> compatible with LMB
🖱️
- RMB points points at items (sry i could not get MMB working)
- key <kbd>Esc</kbd> to exit the window.

For devs:
- A new image generation tech.
- An error refetch mechanic to the Image component
- It does not "smart track" the items being added to the pile, just
reopen or refresh. This was a design decision.

Honestly I just dislike the stat panel

Fixes #53824

Fixes

![image](https://github.com/tgstation/tgstation/assets/42397676/0e50faab-7d4d-4bf7-8c5b-4ac28547bfbd)

🆑
add: Added a loot window for alt-clicking tiles.
del: Removed the item browser from the stat panel.
/🆑

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: AnturK <AnturK@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>

* Reverts parts of #82602 (nodeath checks) (#82637)

## About The Pull Request

Reverts the nodeath checks of #82602

I opened a review thinking these checks were sus and the PR author said
they would remove them, but it was merged before that happened.

TL;DR 

1. I just noticed this now but it only affects carbons / humans it
doesn't even cover living or any other subtypes
2. Kinda sus. Some code intentionally skips checking nodeath (I guess?
Like removing the brain for example) so we would need a larger audit of
this rather than haphazardly throwing it in.

* Fixes to battle arcade (#82620)

## About The Pull Request

Added gear for world nine, removed the "Gear" gear that did nothing.
Made counterattacks to kill an enemy properly kill the enemy.
I renamed some gear items to fit the theme of the area they are unlocked
in just as a small thing.

## Why It's Good For The Game

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

## Changelog

🆑
fix: Battle arcade's higher levels no longer gives you a "Gear" gear,
and counterattacks can now properly kill enemies.
/🆑

* Fixes SMES terminal placing under the SMES and not under the player (#82665)

## About The Pull Request

Changes `src` to`user` to get intended behavior.

* Birdshot: Toy crate (#82633)

## About The Pull Request
Gives the clown+mime their toy crate.
## Why It's Good For The Game
*honk*

* tram ai sat starts with a full smes (#82646)

## About The Pull Request

consistency and also this is fixes a bug introduced by that one power
refactor

## Why It's Good For The Game

bug bad

## Changelog
🆑
fix: tramstation AI sat starts full
/🆑

* [no gbp] Space Ruin bioscramblers shouldn't chase people around (#82649)

## About The Pull Request

See title
They wouldn't lock on to people on the station from a space ruin, but
would to whoever entered their z level the second it was entered.
Also fixes bug where I changed `status_flags` to `status_effects` for
some reason which isn't where you look for godmode

## Why It's Good For The Game

We have a space ruin whcih several (coreless) anomalies spawn on, the
bioscrambler was put as an option because it was already immortal. It's
weird though to zone into the ruin and immediately have every anomaly in
there lock onto you, the best intended effect is probably for these ones
specifically not to be bloodthirsty.
We kind of only care about that behaviour on the station.

## Changelog

🆑
fix: Anomalous Research ruin Bioscrambler anomalies won't home in on
targets
fix: Bioscrambler won't randomly drop its target for no reason
/🆑

* Sunders the many unused sprites and organizes what's left in structures.dmi (#82658)

## About The Pull Request
Hello again, I noticed the /obj/structures.dmi file had a lot of unused
stuff like tables from two generations ago, so I changed some stuff
around:
- Many unused, old icons deleted, mostly window variants used in old
smoothing systems I imagine
- Reorganized many sprites in the file so they're more grouped together
- Tweaked some barricade sprite naming to be consistent/standardized,
and to let others know they're not _too_ old...
- Fixed a misnomer that I believe was making directional tinted windows
look like frosted windows

## Why It's Good For The Game
Saves on file space, and satisfies your brain's pattern recognition bits

### Spriting
Old: 

![image](https://github.com/tgstation/tgstation/assets/143908044/0717940e-787e-40ee-85e2-0a0c5ebc0837)

New:

![image](https://github.com/tgstation/tgstation/assets/143908044/3954ba3b-b261-4700-986a-d30f3aa0e2a6)
also good lord those linen bin sprites are a crime

## Changelog
🆑
fix: Probably fixed directional tinted windows looking like directional
frosted windows
image: Deleted a bunch of unused structure sprites
/🆑

* Birdshot Wall Sanity Pass (#82598)

## About The Pull Request

Cleans up minor artifacting in the Birdshot Sec-Tram Closed Turfs

## Why It's Good For The Game

Someone definitely didn't mean to place some machines under Closed
Turfs. This barely qualifies as player facing.

## Changelog

🆑
fix: Cleans up some rocks on Birdshot
/🆑

* [NO GBP] Fixes deconstruction of closets & crates under a special case (#82612)

## About The Pull Request
So if a closet/crate has the `NO_DEBRIS_AFTER_DECONSTRUCTION` set on it
and if someone/something is still inside, then after deconstruction they
get deleted rather than getting dumped out first.

Could cause potential hard delete of mobs & stuff. We don't want to deal
with that

## Changelog
🆑
fix: closets & crates will dump all contents out first before deleting
itself regardless of `NO_DEBRIS_AFTER_DECONSTRUCTION` thus not for e.g.
hard deleting mobs inside it
/🆑

* Fixes ordinance lab igniter in IceBox (#82595)

## About The Pull Request
- Fixes #82294

Basically the same idea of merging ordanance lab with the burn chamber
so they share the same apc as already implemented in #82322

## Changelog
🆑
fix: Ordinance lab igniter in Icebox works again 
/🆑

* Birdshot: engi wardrope. (#82639)

## About The Pull Request

Add engi wardrope on Birdshot.

## Why It's Good For The Game

Birdshot doesn't have engi wardrope.

🆑
fix: Birdshot now have engi wardrope
/🆑

* Gives shadow walk a new, spookier, and shorter sound effect that no longer ignores walls (#82689)

## About The Pull Request

This gives shadow walk a snazzy new sound effect for entering/exiting
jaunt.


https://github.com/tgstation/tgstation/assets/28870487/c25f720f-5bad-4063-8d6e-140fd41bd740

This also has the sounds it plays no longer passes through walls.
## Why It's Good For The Game

The ethereal_entrance/exit sound effects are drawn out, and pretty
grating. They work for the other jaunts they're used for because a jaunt
typically lasts longer than the sound itself. Nightmares are frequently
dancing in and out of jaunt, and the sound effects for entering/exiting
tend to overlap. It gets loud and annoying really fast.

This sound effect is quicker, spookier, and more distinct.

As for making the sound not ignore walls, I think it's pretty dumb how
easy it is to detect the spooky scary shadow antag just by sitting in
your department. It takes a lot of the initial fear and paranoia they
have the potential for is wasted when Joe Geneticist can hear them
messing around in their territory without having to leave their chair.
## Changelog
🆑 Rhials
sound: Nightmare has a new sound effect for entering/exiting shadow
jaunt. It also no longer can be heard through walls.
/🆑

* [MIRROR] Alt click refactor (#2029)

* Alt click refactor

* Some early conflict removal

* Big modular refactor

* Update console.dm

* Update paper.dm

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: Mal <13398309+vinylspiders@users.noreply.github.com>

* Yeets `ATTACK_QDELETED`, fixes welding torches not using fuel on attacking non-mobs (2 year old bug)  (#82694)

## About The Pull Request

- Deletes `ATTACK_QDELETED`
- May have been necessary in the past but it's pointless now. All it
does is clutter the attack chain. Perish.

- Fixes welders not using fuel on attacking non-mobs
- #65762 "fixed" welders consuming fuel on clicking turfs by adding an
`isliving` check and not an `ismovable` check?


## Changelog

🆑 Melbert
fix: Blobs may rejoice, welding torches now consume fuel when attacking
objects again after two years.
/🆑

* electric_welder fire

* Quirks, which give items, now have quirk_item arg specified as obj/item, instead of being just a var (#82650)

## About The Pull Request
quirk_item is now /obj/item, since it will allow for calling procs or
getting variables from this item

It's required for non-modular translation to call for item's name to
remove articles

## Why It's Good For The Game
It's always an item, and if it's a path, it's already checked for it.
Better usage in the future.

* turns martial arts gloves into a component (#82599)

sleeping carp gloves also work on mind init

this means for the sake of deathmatch you dont have to put them off and
on

fixes #82321

🆑
fix: you no longer need to put your sleeping carp gloves off and on in
Deathmatch to get the martial art
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>

* Regal Rats can now tear down posters (#82673)

## About The Pull Request

i was fixing something on bagil and someone who was playing a regal rat
(after the round ended) said they wanted to be able to tear down posters
as a regal rat so i decided to code it because it made sense.

it's an element so literally any mob can tear down posters but i can't
think of any other mobs that would make sense to let it tear down
posters so we'll leave it just for _The Champion of All Mislaid
Creatures_ for now
## Why It's Good For The Game

Regal Rats should be all about sludgemaxxing and fucking up maintenance
to make it look even more grody than it should be. Being able to tear up
those disgusting and well-drawn posters to leave behind nothing but
scraps fits that motif. The element has a `do_after()` just to make sure
His Holiness doesn't accidentally tear down his posters while clicking
(i think all mobs should have this but that's a different issue man)

also includes some code improvement and user feedback in some failure
cases that already existed in the code.
## Changelog
🆑
add: Regal Rats are now able to tear down those colorful posters those
weird grey creatures keep spackling up on the walls of their rightful
domain.
/🆑

* Adds "Strong Stomach" quirk, a core CDDA/PZ quirk we've sorely been missing. Also Deviant Tastes dirty food re-nerf. (#82562)

## About The Pull Request

- Adds Strong Stomach quirk. 
   - 4 points
   - You can eat dirty food without risk of getting disease. 
- You suffer less negative effects from vomiting. Vomit stuns you for
half the duration, and you lose half as much nutrition.

- Reverts https://github.com/tgstation/tgstation/pull/76864 , integrates
its effects into Strong Stomach instead.

## Why It's Good For The Game

- Lotta people (namely Lizards and sometimes Felines with Deviant
Tastes) run gimmicks involving them being a gremlin person and eating
trash off the ground, and it's rather hard to accomplish this now since
it makes you a public medbay enemy # 1. This quirk should give them an
option to avoid that.
- Also (as mentioned in the title) both CDDA and PZ have this trait and
I can't believe we're missing it! This is something in
modifiable-character-traits/quirks-101.

- I moved the effects from #76864 to this quirk because 1. I thought it
was more fitting and 2. I thought the original PR was kinda wack for
what is (generally) a neutral quirk.

## Changelog

🆑 Melbert
add: Adds the Strong Stomach quirk, which allows you to eat grimy food
without worry about disease, and makes you a bit more resilient to the
effects of vomiting.
del: Deviant Tastes no longer prevents you from getting a negative
moodlet from eating dirty food. Strong Stomach does that now.
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>

* Remove several functions from collections.js which have ES5 equivalents (#82417)

* Makes it EVEN EASIER to work with atom item interactions ft. "Leaf and Branch" & "Death to Chains" (#82625)

* apc fix

* Gulag Adjustments Two (#82561)

## About The Pull Request

I have received feedback that after the prior changes in #81971, the
gulag is still a little bit too subject to RNG.
The main culprit (as in my previous PR) is Iron being kind of cheap and
the fact that unlike the old Gulag you no longer have any way of
headhunting more valuable materials (everything appears as boulders on
your ore scanner).

My solution to this is wider than the last one of tweaking point values,
but also much simpler:
Just make every boulder you mine be worth the same amount of points
regardless of what is inside of it.

On the average test I made I could comfortably mine about 40-45 boulders
in ten minutes.
We'll make some adjustments to that rather than leaving 40 as the target
number;
Most players upon being teleported to the gulag are going to spend a few
minutes whining and bemoaning their fate instead of getting straight to
work. I had the benefit of being able to make sure my run started as
soon as a storm ended so I wouldn't need any kind of midpoint break. I
was also always the only person playing on my local instance, there
hadn't been any other pesky prisoners before me who had already mined
out all the nearest available deposits. And of course, let us not
forget, I am an MLG master league ss13 player who was surely performing
well above average.

So we'll round that down to: Each boulder is worth 33 points, meaning
you need to collect 31 boulders to complete a 1000 point (roughly ten
minute) sentence.

How do I ensure that every boulder is worth the same amount of points?
Well it's pretty easy.
One boulder = one material sheet. One material sheet = 33 points.
Simple.

"Now Jacquerel", I hear you not saying because you don't want me to know
about this thing you would prefer to do instead of hitting rocks
outside; "if I simply smash all of the tables and microwaves and botany
trays and bed in the gulag I can easily get like 65 sheets of Iron,
which is almost enough to buy the freedom for two entire people!"
Unfortunately I knew you were going to try and do that and the prisoner
point machine will only give you points for material sheets which have
been printed from the material smelter (well, any material smelter
actually but you should probably use the one in the gulag). You'll be
able to tell because if you examine a valid material sheet it will
mention a little maker's mark on it, which is absent in the beat-up iron
that you get from smashing furniture to bits.

Also glass is worth 0 points. Don't waste time digging up that shit. 

As glass has had all of its point value removed, I have added a "work
pit" to the gulag to compensate. You can pull boulders out of this
indefinitely via effort, however it also stamcrits you every time.
It's not very fun to do this, but that's because I would prefer you to
go find the rocks out in the field instead. This is a last resort.
You can do this if there's no boulders left to mine or if you really
really really hate mining and would rather very slowly click on one tile
repeatedly to get your boulders instead.
As a tiny bonus doing this gives workout experience.

This isn't a totally ideal solution but I think it'll do for now.

## Why It's Good For The Game

What we want out of the gulag is:
- Something where officers can vaguely approximate an expected sentence
duration.
- A task that requires players to actually be spending that time doing
something to get out of here.
- Produces at least some amount of useful materials.

In I think roughly that order.
I hope this change accomplishes all three of these in a way that is
somewhat predictable rather than throwing darts at a board.

## Changelog

🆑
balance: Gulag mining has been rebalanced so that every boulder is worth
the same amount of points to mine for a prisoner regardless of what it
contains, and should be more consistent.
add: A vent which boulders can be hauled out of by hand has been added
to the gulag which you can use if there's nothing left to mine. It is
very slow, but at least it gives you a workout...
/🆑

* stone

* Makes test merge bot continue with other PRs if updating one fails. (#82717)

Right now updating
https://github.com/tgstation/tgstation/pull/81089#issuecomment-1907296233
fails because it exceeds github character limit for comments.

This will make it work until backed is updated.

* Fixes the RnD console by adding a removed import (#82750)

## About The Pull Request
The 'map' import was removed from this file by #82417 but it's still
used in place in code. This re-adds the import

## Why It's Good For The Game
Fixes RnD consoles

## Changelog
🆑
fix: Fixed RnD consoles not being able to be opened.
/🆑

Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>

* Fixes cargo import (#82755)

## About The Pull Request
One of the imports got removed and there were no warnings... Man if only
there were a technology that could warn us in advance
## Why It's Good For The Game
UI fixes
## Changelog
🆑
fix: Fixed a bluescreen in cargo console
/🆑

* fixes

* Fixes, fixes.

* Pre-emptive mirror of https://github.com/tgstation/tgstation/pull/82892

* Turf weakref persists in changeturf / Fix plasma cutters  (#82906)

## About The Pull Request

Turf references don't change so logically, turf weakrefs wouldn't change
if the turf changes.

By not doing this this can cause bugs: See #82886 . (This Fixes #82886) 

(Projectiles hold a list of weakrefs to atoms hit to determine what they
have already hit.

Because turf weakrefs reset, we could "hit" the same turf twice if it
destroyed the turf.

Old behavior - this was fine but now that they're weakrefs, we get two
weakref datums in the list that point to the same ref.)

Less hacky alternative to #82901 . (Closes #82901) 

## Changelog

🆑 Melbert
fix: Plasma cutters work again
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Interception&? <137328283+intercepti0n@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
Co-authored-by: Ketrai <zottielolly@gmail.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: AnturK <AnturK@users.noreply.github.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Iajret <8430839+Iajret@users.noreply.github.com>
Co-authored-by: vect0r <71346830+Vect0r2@users.noreply.github.com>
Co-authored-by: jimmyl <70376633+mc-oofert@users.noreply.github.com>
Co-authored-by: AMyriad <143908044+AMyriad@users.noreply.github.com>
Co-authored-by: Zytolg <33048583+Zytolg@users.noreply.github.com>
Co-authored-by: Xackii <120736708+Xackii@users.noreply.github.com>
Co-authored-by: Rhials <28870487+Rhials@users.noreply.github.com>
Co-authored-by: NovaBot <154629622+NovaBot13@users.noreply.github.com>
Co-authored-by: Mal <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: larentoun <31931237+larentoun@users.noreply.github.com>
Co-authored-by: Arthri <41360489+Arthri@users.noreply.github.com>
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
2024-04-28 22:24:01 +02:00
SpaceLoveSs13
7aa6664021 Mirror (#27453)
* Fix Conflicts

* Change COGBAR_ANIMATION_TIME to seconds and not deciseconds (#82530)

Most people should not be using this define

* New Battle Arcade (#81810)

Remakes Battle Arcade from just about the ground up, with exceptions
taken for emagged stuff since I didn't really want to touch its
behavior.

The Battle Arcade now has stages that players can go through, unlocking
a stage by beating 2 enemies and the boss of the previous one, but this
must all be done in a row. You can choose to take a break between each
battle and there's a good chance you'll sleep just fine but there's also
a chance it can go wrong either through an ambush or robbery.

The Inn lets you restore everything for 15 gold and you can buy a sword
and armor, each level you unlock is a new sword and armor pair you can
buy that's better than the last, it's 30 gold each but scales up as you
progress through levels. They are really worth getting so it's best to
try to not lose your money early in.

The battle system is nearly the same as how it was before but I removed
the poor combo system that plagued the old arcade as one big knowledge
lock, now it's more just turn based. The game is built on permadeath so
dying means you restart from the beginning, but if you are going to lose
you can try to escape instead which costs you half of your gold.

Getting to higher levels increases the difficulty of enemies but also
increases the gaming exp rewards which could make this a better way to
get exp if you can get good at it.

Gaming EXP is used to increase chances of counterattacking but doesn't
give any extra health to the player.

I also removed the exploit of being able to screwdriver arcade cabinets
because people would do that if they thought they were on the verge of
losing to bypass the effects of loss. I instead replaced it with a new
interaction that the Curator's display case key can be used to reset
arcade cabinets (there's several keys on the chain so it made sense to
me), which I added solely because I thought Curators would be the type
of person to have run an actual arcade.

This is some gameplay

https://github.com/tgstation/tgstation/assets/53777086/499083f5-75cc-43b5-b457-017a012beede

As a misc sidenote, I also split up the arcade file just like how Orion
Trail was before, just for neat code organization.
The Inn keeper is straight up just a photo of my localhost dude, he's
not a player reference or anything it's not my actual character.
I also have no idea how well balanced this is cause I suck at it lol.

Battle Arcade is one of 3 last machines in my hackmd here to turn into
TGUI https://hackmd.io/XLt5MoRvRxuhFbwtk4VAUA?view
I've always thought the current version of battle arcade is quite lame
and lacks any progression, like Orion Trail I thought that since I was
moving this to TGUI, it would also be a perfect opportunity to revamp it
and try to improve on where it failed before, especially since the
alternative (NTOS Arcade) is also lame as hell and is even lamer than
HTML battle arcade (spam mana, then spam health, then just spam attack,
rinse and repeat).
This will hopefully be more entertaining and give players sense that
they are getting through a series of tasks rather than doing one same
one again and again.

🆑 JohnFulpWillard, Zeek the Rat
add: Battle Arcade has been completely overhauled in a new progression
system, this time using TGUI.
add: The Curator's keys can now reset arcade cabinets.
balance: You now need to be literate to play arcade games, except for
Mediborg's Amputation Adventure.
fix: You can no longer screwdriver emagged arcade consoles. Accept your
fate.
fix: Silicons can no longer play Mediborg's Amputation Adventure.
/🆑

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>

* Change setting item weight class to a setter to patch some weight class related shenanigans (#82494)

## About The Pull Request

Fixes #81052 
Fixes #58008

Setting weight class of items is now done via `update_weight_class`.

I updated as many occurrences of manually setting `w_class` as I could
find but I may have missed some. Let me know if you know of any I
missed.

This is done to allow datums to react to an item having its weight class
changed.

Humans and atom storage are two such datums which now react to having an
item in its contents change weight class, to allow it to expel items
that grow to a weight class beyond what is normally allowed.

## Changelog

🆑 Melbert
fix: You can't fit items which are normally too large for a storage by
fitting it in the storage when it is small, then growing it to a larger
size.
/🆑

* Material datum color update, plus touching up some material items (knight armor, tiles) (#82500)

## About The Pull Request

Tries to bring the material datum colors in closer approximation to the
stacks they're attached too. I literally used the colors on the stacks.
some might need to be lighter or darker, but for the most part they'll
look...closer to their actual material hues.

![material datum stuff
2](https://github.com/tgstation/tgstation/assets/40847847/a3a5968f-cab3-43dd-8699-3dae879b21fb)

I've also tweaked the sprites of both the tile object and the actual
material tile turf to give it the right shading.


![image](https://github.com/tgstation/tgstation/assets/40847847/56489479-8774-492b-b8cc-aeabc6c0a67f)

In addition to the tiles, I've also updated the knight armor and helmet
to look closer to the much higher quality plate armor already in the
game.

## Why It's Good For The Game

It bothered me that the material datum coloring was inconsistent with
the actual colors used for the material stacks. When they were updated,
and even before they were updated, material datum stuff just never
looked _right_. I wanted to change that so that it looks just right.

I did not like the old material knight armor whatsoever. It was a
dithered mess, and seemed to already use parts of the standard plate
armor but with all the actual shading removed or replaced with the wrong
colors. This fixes that so that the armor is actually readable for what
it is.

## Changelog
🆑
image: Updates the colors of various material datum to bring them closer
in-line with their actual material stacks
image: Improves the sprites for the material knight armor and helmet.
/🆑

* 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.
/🆑

* Fix table top deconstruction (#82508)

## About The Pull Request

Edited: updated changelog, read comments for changes in implementation
details

So previously, tables would let you use a wrench to fully deconstruct
them, or a screwdriver to take off only their top.
This, however, broke in two different ways in #82280, when their
deconstruction logic got changed.

First off, deconstructed tables would only drop the materials for their
top and not their frame.
For this, the primary culprit seems to be on line 307:

c34d56a45b/code/game/objects/structures/tables_racks.dm (L300-L307)
Where `new framestack(target_turf, framestackamount)` accidentally got
an extra indent, and ended up in the less common half of the if-else
chain.
Just moving this outside of the if-else chain again fixes it.

Secondly, tables had their own special deconstruction logic, which got
'standardized'.
Issue. This was special to accommodate for having two different
deconstruction logics: full or top only.
With `deconstruct(...)` no longer being overridable, I feel it's awkward
to attempt to proxy that information to the new `atom_deconstruct(...)`
So we introduce a new method, `deconstruct_top`, for the screwdriver to
use, which handles deconstructing only the top.
```dm
/obj/structure/table/proc/deconstruct_top()
	var/obj/table_frame = new frame(loc)
	if(obj_flags & NO_DECONSTRUCTION)
		table_frame.obj_flags |= NO_DECONSTRUCTION
	else // Mimic deconstruction logic, only drop our materials without NO_DECONSTRUCTION
		var/turf/target_turf = get_turf(src)
		drop_top_mats(target_turf)
	qdel(src)
```
Mimicking the `NO_DECONSTRUCTION` logic of normal deconstruction, and
copying over the flag onto its frames if need be.
This fixes screwdriver deconstruction.
## Why It's Good For The Game

Fixes #82503.
We can now deconstruct the table top separately again, AND get the right
materials back too.

## Changelog
🆑 00-Steven, SyncIt21
fix: Wrench table deconstruction gives the right materials again.
fix: Screwdriver table deconstruction only deconstructs the top again.
/🆑

* [NO GBP] Reagent grinders display reagents on examination (#82535)

## About The Pull Request
- Fixes #82531

Somehow omitted this during the general maintenance thing

## Changelog
🆑
fix: Reagent grinders display reagents of its beaker on examination
/🆑

* Monkeys now use height offset (and monkey tail works) (#81598)

This PR adds the ability for monkeys to wear any jumpsuit in the game,
and adds support for them to wear things like coats, gloves, and shoes
(though this cannot be obtained in-game and is solely achieved through
admins, which I also improved a bit upon by adding a defined bitfield
for no equip flags).

This reverts a lot of changes from
https://github.com/tgstation/tgstation/pull/73325 - We no longer check
height from limbs and such to bring sprites down, instead monkeys now
work more similarly to humans, so the entire PR was made irrelevant, and
I didn't really want to leave around dead code for the sake of having a
human with longer legs.

I've now also added support for Dwarfism, which makes monkeys look even
smaller. Very minor change but at least now the mutation doesn't feel
like it does literally nothing to monkeys (since they can already walk
over tables).

Here's a few examples of how it can appear in game (purely for
demonstration, as it is currently intentionally made impossible to
obtain in-game, though if someone wants to change that post-this PR now
that support is added, feel free):

Tails have been broken for a while now, the only reason you see them
in-game is because they are baked into the monkey sprites. This fixes
that, which means humans can now get monkey tails implanted into them
(hell yeah) and monkeys can have their tails removed (also hell yeah)

* Gets [weird] with (spies) by adding protect and deuteragonist-flavored objectives. (#82447)

## About The Pull Request

What are their goals? Why are they doing this? gets weird with Spy
objectives - namely by adding a lot more ways spies might be asked to
affect various targets around the station.

the first of these is by several flavors of Protecting targets (these do
NOT print a success at roundend in keeping with Spy design:)
- Protect (get a humanoid target off alive)
- Protect Nonhuman (get an entity off alive)
- Jailbreak (make sure a humanoid target escapes free)
- Detain (make sure a humanoid target gets taken out arrested)

the second of this is by a new escape condition: 
- Exile (get off-station or off the Z-level by the end of the shift -
sometimes it's not just pods, you need to fuck off to space to win.)

the third is through a massive increase in the number of possible:
- objective templates 
- departments to target (Command + Service added)
- specific locations to target
- general classes of objects to target (medicines, floor tiles, critical
infrastructure, etc.)
- efforts to target (such as meals, mechs, public supplies)
- ways to leave (you can be asked to abscond from the scene of your
crimes?)

## Why It's Good For The Game

More goofy and weird prompts to do more interesting things with Spies.
One thing I think we're sorely missing in our lineup is antagonists that
can act a bit more as deuteragonists - very possibly helping the crew
under certain conditions and frustrating the Hell out of them in others.

Since there's no way to check their objectives, and they get their
gear/progression through stealing shit, they're still very much an
antagonist and exist under the suspicion of doing bad... but, just going
by their objectives, introducing more varied (and in some cases even
benign) goals for them creates suggestions pointing to a lot more varied
and interesting stories if people choose to run with it.

* Adds anosmia quirk (#82206)

## About The Pull Request

Adds anosmia quirk. Anosmia, also known as smell blindness, is the loss
of the ability to detect one or more smells.

I tried to find all smells action and (most likely) update all of them,
unfortunately I can't change descriptions for this quirk.

## Why It's Good For The Game

Some characters will be able to not feel smells
That affect:
* Gases feelings and alerts (CO2, Plasma, miasm) - you don't feel them
* Bakery and cooking
* Changeling ability to feel other changelings by smell
* Some unimportant spans

* Explosions Part I - Directional Explosions (#82429)

## About The Pull Request

Adds the ability for explosions to be directional. This is achieved by
adding an angle check to `prepare_explosion_turfs()` to drop any turfs
outside the cone of the explosion. If the arc covers a full 360 degrees,
as is the default, it will accept all the turfs without performing the
angle check.

Uses this functionality to rework both rocket launcher backblast and X4
explosions. Rocket launcher backblast has been changed from a shotgun of
indendiary bullets to a directional explosion of similar length. X4 now
uses a directional explosion to "ensure user safety".

Apparently the old method of moving the explosion one tile away didn't
even work, as it blew up `target` before trying to check its density for
the directional behaviour.

https://youtu.be/Mzdt7d7Le2Y

## Why It's Good For The Game

Directional explosions - Useful functionality for a range of potential
use cases, which can be implemented with minimal extra processing cost
(Worst case scenario being very large directional explosions)

Backblast - Looks way cooler than a bunch of projectiles, and should be
significantly more functional in high-lag situations where projectile
code tends to get fucky

X4 - More predictable for players wanting to use it as a breaching
charge, you can actually stand near the charge and not have to worry
about being hoist upon your own petard.

## Changelog
🆑
add: Added support for directional explosions.
add: Rocket launcher backblast is now 271% more explosive, check your
six for friendlies!
add: X4 charges now explode in a cone away from the user when placed on
a sufficiently solid object.
fix: X4 charges will now behave correctly when placed on dense atoms
(note: don't try to read a variable from an atom you just blew up)
/🆑

* Add balloon alerts to plunging (#82559)

## About The Pull Request

Makes all plunging actions (pretty much anything using `plunger_act`)
have a visible balloon alert.

## Why It's Good For The Game

Makes sense that others would easily notice you plunging the shit out of
something.

Also, more people might finally learn that you can plunge the vent clogs
instead of welding them.

## Changelog
🆑
qol: Added balloon alerts whenever you start plunging something (i.e )
/🆑

* Fixes spurious runtime on Icemoon caused by turf calling unimplemented LateInitialize() (#82572)

## About The Pull Request

As of https://github.com/tgstation/tgstation/pull/82540 this runtime was
happening,


![image](https://github.com/tgstation/tgstation/assets/13398309/4d838fda-c157-4e33-ae64-77eafca1806f)

`/turf/open/openspace/icemoon/` can be changed to
`/turf/open/misc/asteroid/snow/icemoon/do_not_chasm` before
`Initialize()` returns, which resulted in it `INITIALIZE_HINT_LATELOAD`
getting returned on a turf that does not have an implementation of that
proc.

This should fix that.

## Why It's Good For The Game

Fixes CI error

* Blueprints tgui (#82565)

Blueprints now use a TGUI panel instead of the old HTML one.
Also did general code improvement and maintaining to blueprints in
general and also destroyed the ``areaeditor`` level, repathing it to
just 'blueprints'.
Also adds a sound when you look at structural data cause why not

Video demonstration:

https://github.com/tgstation/tgstation/assets/53777086/861773fd-3d57-472d-bc94-d67b0d4f1dbd

The 4 blueprint types:

![image](https://github.com/tgstation/tgstation/assets/53777086/bfd68eb5-c430-4608-a3f7-d6ac86727882)

Another HTML menu dead underground.
This is more responsive and doesn't require constant updating to see
which area you're in, feels less OOC (instead of saying "the blueprints
say", just say it, you ARE the blueprints).

Like, come on

![image](https://github.com/tgstation/tgstation/assets/53777086/fcf1b8b6-37c3-4c94-969f-3b121c983dc0)

Look at all this wasted space

![image](https://github.com/tgstation/tgstation/assets/53777086/1d3e61cd-bc56-4280-a3bb-0c66604e75b3)

🆑
refactor: Blueprints now use TGUI.
qol: Blueprints can now be used while lying down.
/🆑

* General maintenance for chem master (#82002)

**1. Qol**
- Adds screen tips & examines for screwdriver, wrench, crowbar & beaker
insertion, removal & replacing actions
- Analyzing reagents is now a client side feature & not a back end mode,
meaning one person can see details of a reagent while the other can
print stuff and do other operations so it's a non blocking operation.
This also means 2 players can see information of 2 different reagents in
their own screens, With that the overlay for analysis mode has been
removed
- You cannot do any tool acts on machines while printing. Balloon alerts
will be displayed warning you of that.
- The preferred container for the master reagent in the beaker is now
showed in both condiment & chem master. It can be enabled/disabled via a
CheckBox

**2. Code Improvements**
- Removed defines like `TARGET_BEAKER` , `TARGET_BEAKER` etc. ther
functionality is implemented as params in the `transfer_reagent()` proc
directly
- Removed all variables relating to analyzing reagents like
`reagent_analysis_mode`, `has_container_suggestion` etc. all memory
savings
- `printable_containers` now stores static values that can be shared
across many chem masters
- Updates only overlays and not the whole icon during operations for
efficiency

**3. Fixes**
- You can hit the chem master with the screwdriver, wrench, crowbar &
beaker when in combat mode
 - You cannot insert hologram items into the chem master
- Deconstructing a condiment master will give you the circuit board
already pre-programmed with that option selected so you don't need to
use a screwdriver to re program it
- `printing_amount` is now the maximum number of containers that can be
printed at a time. Presently this number with upgraded parts would print
out empty containers especially for patches. This is because
`volume_per_item` does not take into consideration this var. Also this
var would not give control to the player on exactly how many containers
to print as whatever amount the player entered would be multiplied with
this value producing a lot of waste & worse empty containers. Now this
var determines exactly how many containers you can print and is imposed
on the client side UI as well

**4. Refactors (UI performance)**
- Beaker data is compressed into a single entity & sent to the UI. This
is set to null if no beaker is loaded thus saving data sent
- Reuses Beaker props from chem synthesizer to reduce code
- reagent REF replaced with direct type converted to text and later
converted with `text2path()` cause its much faster

🆑
qol: Adds screen tips & examines for screwdriver, wrench, crowbar &
beaker insertion, removal & replacing actions
qol: Analyzing reagents no longer blocks other players from doing other
operations. Multiple players can analyze different reagents on the same
machine
qol: You cannot do any tool acts on the machine while printing to
prevent any side effects.
qol: The preferred container for the master reagent in the beaker is now
showed in both condiment & chem master. The feature can be
enabled/disabled via a check box
code: removed defines for reagent transfer, vars for reagent analyzis to
save memory. Autodoc for other vars & procs
fix: You can hit the chem master with tools like screwdriver, crowbar,
wrench & beaker in combat mode
fix: You cannot insert hologram items into the chem master
fix: Deconstructing a condiment master will give you the circuit board
already pre-programmed with that option
fix: You now print the exact amount of containers requested even with
upgraded parts without creating empty containers. Max printable
containers is 13 with tier 4 parts able to print 50 containers.
refactor: Optimized client side UI code & chem master as a whole.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>

* Wraps `lowertext()` to ensure proper stringification. (#82442)

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.

* Clowns can now make balloon... toys. And also mallets and hats. (#82288)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

Clowns will now start with a box of 24 random long balloons and a
skillchip in their noggin allowing them to create balloon animals by
combining two of them of different colour together. Owners of the
skillchip also gain access to crafting recepies of balloon mallets,
vests, helmets and tophats, all created from long balloons. A crate of
long balloons, with a box of balloons inside, can be bought at cargo, in
case the clown runs out. I might edit this once I wake up, its 3 in the
morning right now.
Oh also, resprited how balloons look in inventory.

![image](https://github.com/tgstation/tgstation/assets/122572637/2d7ce955-c787-48a5-bfda-4613d2eed837)

Balloon animals funny.
Silly features are my favourite kind of features, and this one's
open-ended too.
Someone on the coder chat recommended someone would do it that one time,
here it goes.

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

🆑
add: Added long balloon box to the clown's starting inventory, and a
skill-chip of long lost honk-motherian knowledge to their brain.
add: Added long balloons. Consequently, added balloon animals to make
from such balloons. Also, balloon top hat, vest, helmet, and a mallet.
Don't ask about the mallet.
add: A long balloons box harvested fresh from the farms on the clown
planet will be able to be shipped in a crate to the cargo department
near you!
add: As per requests; water balloons can now be printed at service
lathe, and entertainment modsuit can now blow long balloons!
image: Balloons will now have an unique sprite when in the inventory,
compared when to on the ground.
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Jacquerel <hnevard@gmail.com>

* Quick spellcheck 'steall' (#82560)

## About The Pull Request

https://github.com/tgstation/tgstation/pull/82447 quick followup to
this, caught it while glancing through the code.

* Fix

* merge conflicts

* Revert "Monkeys now use height offset (and monkey tail works) (#81598)"

This reverts commit 5cfdc5972d16c6b509220e8874a927696249d36a.

* fix

* Fixed lateinitialize

* This should cut it

* Oh right

* There?

* Damn, here?

* There

* [NO GBP] Fixes spurious runtime caused by icemoon (again) (#82582)

## About The Pull Request

https://github.com/tgstation/tgstation/pull/82572 I tried to fix this
but there was an unaccounted race condition which just caused a separate
runtime...


![firefox_GxGibAO281](https://github.com/tgstation/tgstation/assets/13398309/f251aecc-ef17-4bae-a741-5aade40de423)

Since the type is being changed mid-execution `replacement_turf` will
become out of scope. My bad--this should fix it now for good.

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Higgin <cdonny11@yahoo.com>
Co-authored-by: NeonNik2245 <106491639+NeonNik2245@users.noreply.github.com>
Co-authored-by: Thunder12345 <Thunder12345@users.noreply.github.com>
Co-authored-by: Lucy <lucy@absolucy.moe>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: YesterdaysPromise <122572637+YesterdaysPromise@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
2024-04-26 01:22:24 +02:00
Useroth
2b60c77e55 Yet another mirror batch (#27314)
* A skub-related station trait. Reduced weight of annoyingly frequent neutral traits. (#81388)

## About The Pull Request
This PR introduces a new station trait that lets people choose if they
want to be pro-skub or anti-skub (or neither, really). It works the same
lobby buttons that job-related station traits also use. Depending on
whether you chose to be pro or anti skub, you'll spawn in with a special
box that contains the (bulky) skub and a pro-skub shirt, or an anti-skub
shirt. EDIT: Both also receive a number of stickers to propagate their
causes.

Kudos to @Fikou for coding the lobby buttons to be accessible by any
station trait rather than only job-related ones when you made the
Cargorilla station trait.

Another thing this PR also halves the exaggerated weight of low-cost
traits such as scarves, wallets and glitched PDAs, which I clearly
underestimated.

## Why It's Good For The Game
We've learned that low-cost, high weight traits are a bit of a design
mistake, because they tend to tip the scales toward themselves over and
over and over, leveling the diverseness of the feature and therefore
making it shallow and boring.

Beside, I've been thinking of the popular [skub comic
strip](https://pbfcomics.com/comics/skub/) lately.


## Changelog

🆑
add: Added a Skub-related station trait. You can now choose if you want
to be pro-skub or anti-skub, complete of shirt and stickers. Please
don't shank each other over it.
balance: Halved the weight of station traits such as scarves, wallets
and glitched PDAs.
/🆑

* Fix some slime species subtypes not having burn resistance (#82164)

## About The Pull Request

All slime species limb subtypes now inherent from the parent `/jelly`
subtype, giving them all their proper burn resistance.

## Changelog

🆑 Melbert
fix: Slimepeople and Luminescents are now 50% burn resistant like
Stargazers
/🆑

* There we go

* FIX: Makes Hatsune mi-go a (friendly) gold slime mob (#82251)

## About The Pull Request:

The hatsune mi-go is now a friendly gold slime mob. This means it won't
try and kill you. It also now doesn't make your ears hurt, and drops a
keyboard synth on death (you monster.)


![migomigodance](https://github.com/tgstation/tgstation/assets/69398298/9dd6eb82-68d6-470c-9538-12298c3a6008)
## Why It's Good For The Game


So in making my resprited mi-go and subsequent speedmerge, I failed to
realize that there are only 10 possible migo spawnpoints - 5 in snowdin
gateway, 3 on ceres whiteship, and 2 on kilo whiteship. This means at
most eight can exist on anyround, with a decent likelyhood of 0. This,
combined with the fact the hatsune migo is banned from spawning outside
of roundstart locations, along with the fact people seem to love the
thing, made it feel _too_ rare, even for a shiny mob. You still have to
roll the random odds with the life chem or friendly gold slime pools,
but you should actually see them outside of two mutually exclusive space
ruins and a gateway now. Also, they don't try and kill you now, because
it would have been wrong to add a hostile creature to the friendly pool.

🆑
fix: Hatsune mi-go now is a friendly gold slime mob, and doesn't hurt
your ears.
add: Hatsune mi-go drops a keyboard synth on death (you monster.)
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>

* [THE QUIRKENING] Adds customization options to Organ Prosthetic, Junkie, Smoker, and Alcoholic! (#82051)

## About The Pull Request

Lets people pick:
- The shitty organ they spawn with (still has the restrictions of not
being possible to get heart when you are a plasmamen, for example)
- Their favorite alcohol to blackout with
- Their favorite brand of cigs
- Their favorite brand of drugs!
A lot of the code was taken from a downstream, made by @Floofies, i
already had my own implementation but it was buggy and not nearly as
clean, then i was made aware of theirs.
## Why It's Good For The Game

Character Customization is good and fun and lets people have more choice
in their roleplay.
## Changelog
🆑
add: Prosthetic organ users are now allowed to pick what they want to
start with.
add: Junkie of all kinds, including smokers and alcoholics, are also
able to pick their favorite type.
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>

* [NO GBP] Fixes the "Drop Pod: Syndies" deathmatch modifier. (#82216)

## About The Pull Request
I've had false memories of `pick_weight` working with assoc-value-less
lists.

## Why It's Good For The Game
This will fix an issue with deathmatch modifiers.

## Changelog

🆑
fix: Fixed the "Drop Pod: Syndies" deathmatch modifier.
/🆑

* Fix robocontrol access runtime (#82242)

## About The Pull Request


![image](https://github.com/tgstation/tgstation/assets/51863163/568fa916-d167-4038-b0e8-7b0870754bf9)

`check_access` expects an item, such as an ID card, to... check access.
Not a mob.

We can circumvent this entirely by using `allowed`.

But this has an averse effect in that `allowed` will only check the
user's ID, not the ID in the mod PC.

So we need to run a separate check of `check_access` for the computer ID
card.

## Changelog

🆑 Melbert
fix: Robocontrol should work better.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>

* Adds a photobooth (#82105)

## About The Pull Request

Adds a photobooth machine to the HoP line which can be used to update
your security records photo.
It updates the records of the person's name, which means hiding your
identity and wearing an ID will let you change other people's photos. If
you aren't hiding your identity and are wearing someone else's ID, it
won't update at all because it will be unable to find your record.
There's 2 variants of this machine, one at the HoP line that's tied
behind Law Office access (so Lawyers have an extra thing they can help
out with if no one's available, but maybe it would be better behind
Library access since Curators are our "photographer" role?), and the
Security one that requires Security access.
The Security one has a special feature that it adds a height chart
behind the player.

![image](https://github.com/tgstation/tgstation/assets/53777086/c4eb0661-d752-4052-8006-2898af78c528)

This machine is used by either right-clicking on it or by pressing a
button, so the HoP can do it remotely from their line (except on Tram
where it's in the library), and after a few delays it'll update your
records automatically to how you look like.

Emagging the machine will remove its access restrictions but every time
it updates your photos it will spam camera flashing and blind you.

Sprites

Open

![image](https://github.com/tgstation/tgstation/assets/53777086/d5e97d84-46d8-40b5-995f-c0ef5c7f18ac)
Closed

![image](https://github.com/tgstation/tgstation/assets/53777086/520e88ed-4630-40d8-9039-4c6dd85a9872)
Security version on the left, has a red tint on it

![image](https://github.com/tgstation/tgstation/assets/53777086/ef71a092-8d1b-4776-bdb4-6718308967c7)

Video demonstration (old sprites):


https://github.com/tgstation/tgstation/assets/53777086/a2e59f08-2d58-4f5b-b081-e137c7606d35

## Why It's Good For The Game

Current security records has no way to change your photo ID, something
that was a feature before it was moved to TGUI. The only alternative is
to fully delete your record and make a new one with a photo and the same
name, but this shares a major issue with the HTML UI: You're immediately
sold out by the fact you have a background. No matter how well you try
to cover your tracks, any security officer looking at records will see
you are the only photo on the manifest that has a background and even a
camera in your hand, which makes it impossible to get away with it
unless security essentially takes pity on you.
This opens up the ability to fully mask yourself in records, finally.

This is also better even for non antagonists because you can now
properly update your photos to match what you look like in the event of
an appearance change or even just a job change, which makes it a benefit
for HoPs who likes to keep records as up-to-date as possible.

## Changelog

🆑 JohnFulpWillard, Twox
add: Added a new photobooth machine to the HoP's line.
fix: Things checking for access now checks your off hand, too.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>

* Converts slimes to basic mobs (#82176)

After months of preparation, and further months of work, I am finally
done. Please bear with me, as this is a massive refactor, but I have
already atomized everything I could. This is now ready for review.

General

- 	The hilbert hotel slimes are now a subtype instead of a varedit.
- The `use_mob_ability` subtree now also accepts non cooldown abilities.
If set_behaviours is set up properly, mobs won't keep continously
triggering it as if it were a 0 second cooldown action. The alternative
would have been turning the slime abilities into cooldown abilities.
- Wrestling off a slime now signs up to the `COMSIG_ATOM_ATTACK_HAND`
signal, instead of being part of attack_hand.
- Adds datum/ai_controller/controller as a fourth, optional argument to
`/datum/ai_behavior/find_hunt_target/valid_dinner()` to make it possible
to access blackboard keys.
- Slimes no longer attack windows if they would accidentally move into
them (when the conditions are met), since random walk behaviour ignores
tiles they can't go in. It was also not worth to keep. Did you know this
was the sole override of `ObjBump()`?
- Examine was made less snowflaky/bespoke. Also added a new element:
`/datum/element/basic_health_examine`, which is a simple bespoke element
that prints out a custom message based on how damaged the basic mob it
is attached to is.
- Slimes only perform knockdown instead of paralysis, as they can attack
more often now, and paralysis is not that fun.
- LAssailant has been removed due being archaic code. To befriend a
slime, you have to spawn a monkey with the slime console, or feed them a
sheet of plasma. Simple grabbing the monkey or stuffing them in
disposals do not work anymore. Slime console spawned monkeys will have a
visible status effect, with pheromones coming off them to make this
clearer.

Actions
- 	Feeding, reproduction and evolution is no longer a verb.
- Slime feeding is no longer an action button. You have to use right
click, or as previously, mousedrop. Slimes can always unbuckle from mobs
they are attached to.

Hunger

- Instead randomly changing the starvation and max nutrition values
while growing up, evolution costs 200 nutrion. This makes the code more
readable, and behaviour more predictable, while still giving the
intended time between evolving and splitting. As a result, I could also
turn these into defines.
- Added a component that handles doing an effect over time while buckled
to a mob, until the mob dies or you get unbuckled.
- Slimes gained nutrition is no longer randomly multiplied by the damage
config value, but rather gain nutrition equal to twice the damage dealt.
You'll have to eat one monkey to evolve, just as before.
- Slimes do not heal passively. They only heal from eating. It was a
rather miniscule value that did not have much effect.
- Slimes generate electricity from hunger threshold, instead of the
random amount of hunger threshold + 100.

Environment

- Slimes take 15 damage from cold every second, instead of using a
complex formula (that also decreased the damage up to a point?).
- Slimes still heal from burn damage, but this is now set on the damage
coefficient list.
- Slimes instead of getting stunned by the cold, freeze in an ice cube.
BZ instead of setting them unconscious, calls the stasis status effect,
allowing you to safely stash your hungry slimes for later. They also no
longer slow down from the cold, as they are already slowed down by the
damage they get. Conversely they no longer get a speed up from a random
amount of temperature. I could be convinced to readd this either as part
of the basic sensitive component, or a similar one.

AI
- Removed the attacked_stacks system. Slimes will just perform regular
retaliation if you hit them in a harmful manner.
- Slimes now use the pet orders component. They will interrupt their
feeding when given a command by their master.
- Slimes have their own subtrees. I tried to replicate as much as I
could from the old code, dividing ancient code artifacts and intentional
stuff, so there might be some weirdness.
- Slime speech has been almost fully reduced to basic blorbing, as you
can not even understand them anymore, and most of them require the slime
to loop through all of their surroundings.
- Discipline does not have stacks either. Disciplined baby slimes have a
chance to clear their attack and hunt blackboard keys. All slimes will
stop feeding on the target otherwise.
- Since discipline is not a stack, rabidity instead gets removed at a
10% chance per disciplining.
- 	Slimes faces are a bit more randomly picked now.

- We want to convert all simple animals to basic mobs. Old slime code
was also very strange, and had some systems that have been replicated by
components.
- Slimes fully paralyzing you is not fun at all. Knockdown should give
you a fighting chance when a slime would like to eat you.
- Slimes slow down from the heavy damage they get from the cold, so I
don't think they need extra slowdown, nor do they need to speed up from
warmth, as they are already fast.
- Slimes turning into an icecube instead of becoming paralyzed from the
cold is more fun for the slimes, as they can break out for a few
moments. It is also funny.
- Slimes entering proper stasis from BZ is not just a visual indicator
of a slime that is safe to approach, but also keeps the slimes's hunger
value in check, allowing it to not starve while stopped. They can also
look around and blorble, instead of staring at a black screen, if player
controlled.
- The attack_stack and discipline_stack behaviours were rather
overcomplicated, and the xenobio mains I talked with didn't even know it
was a thing, so I argue it needed simplification.
- The bespoke friendship system of slimes was also too complicated.
Slimes slowly gained levels of trust, and at certain levels commands
costed friendship, and other levels, they did not. The binary friend/not
friend system that everything else in the game uses is much more
sensible.
- Using right click for feeding is much more sensible than using an
action, and then picking someone from a dropdown.
- Slime speech was very soulful but not only did it loop through
everything in sight, you couldn't even understand it unless you spoke
slime. Maybe it can be readded later in a different form.
- Slime's passive healing was miniscule, and having them rely on feeding
is more interesting.

also
fixes #81463

🆑
refactor: Slimes are now basic mobs. Please report any strange
behaviours!
balance: Slimes only stun you for two seconds when they shock you, the
rest of the duration is a knockdown.
balance: Slimes are not stunned from the cold, but rather, get frozen in
a freon icecube. BZ also puts them in complete stasis, instead of making
them unconscious. Their speed is likewise unchanged by temperatures.
balance: Slimes do not passively heal, they instead rely on feeding.
fix: Slimes can use the buckling screen alert to unbuckle and stop
feeding, along with clicking on the mob they are riding
/🆑

* Oh, right.

* Fixes AI verb Jump To Network (#70016)

* check for camera loc to not be a silicon

* check for z=0 instead

* Update code/modules/mob/living/silicon/ai/ai.dm

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>

* evil touch

* redundancy

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>

* Removes camera assembly structures (#81656)

Removes the camera assembly structure middleman between the camera
wallframe and camera machine. All its behavior has been instead moved to
the camera, and I've tried to keep as much of the behavior the same as
before.
This also fixes the issue that camera assemblies had where, upon the
construction being finished, it would move itself into the newly
finished camera machine, therefore taking itself off a wall, therefore
deconstructing itself. This resulted in 2 piece of iron being in each
camera machine (except roundstart ones), and because camera machines
rely on the assembly inside of them for upgrades and such, upgrading
didn't work at all.

I've also made camera nets use defines (not in map) so it's easier to
find a list of them all, and tried to add autodoc comments to nearly
every var in camera code.

Removes copy paste and spaghetti code between structure and machine
camera, thus making it easier to work around with.
Closes https://github.com/tgstation/tgstation/issues/79019

🆑
fix: Cameras built in-round can be upgraded again.
fix: Deconstructing cameras now more consistently return to you the
upgrades inside of the camera.
fix: RD's telescreen can now properly see Ordnance cameras again.
fix: [Deltastation] Library art gallery no longer has an invisible
camera.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>

* [MDB Ignore] Combines Cargobus consoles with Dept. Order Consoles, freeing all departments of 1 whole tile of space (#82210)

## About The Pull Request

- Departmental orders are now an NTOS app
   - To download, they require `ACCESS_COMMAND`.
   - To use, they require one access from the department.
- This means you cannot order things from not-your-department unless you
have an ID.
- When newly downloading the app, it will prompt a head of staff to
insert an ID, to determine which department to be linked to.

- Changes chat room overlay from the kind that AI uploads use to a new
icon.

- Minor refactors to department order in general. 


![image](https://github.com/tgstation/tgstation/assets/51863163/605c2499-e5e9-4f91-aa2a-aa8af8b05a9f)


![image-1](https://github.com/tgstation/tgstation/assets/51863163/089d3fe1-787c-4f5a-bc3d-edb9611dfbb2)

## Why It's Good For The Game

These two computers are surprising waste spacers for two things which
are tied together.
So why not combine them?

The lesser used cargobus chat is still there, and departmental orders
are front and center.

This gives mappers a ton more leeway when mapping departments out and is
overall less clutter.

## Changelog

🆑 Melbert
qol: Cargobus chat console and Departmental Order console are now
combined into one.
qol: Mod PCs active on the "chat client" apps no longer look like AI
uploads (and now have their own sprite)
refactor: Departmental order consoles were refactored a bit, report any
oddities.
/🆑

* This should cut it.

* Was it really just skub?

* [No GBP] Fixes slow slime feed (#82284)

## About The Pull Request

Slimes were supposed to gain the same amount of nutrition as the damage
they dealt while feeding. However, I have accidentally multiplied this
again by `seconds_between_ticks` a second time. This meant that locally
slimes fed normally, but on the server they got about the third
nutrition they were supposed to, probably due to having more ticks per
second then my machine. This PR fixes that.

Also raised the nutrition gained by slimes by 20%, after careful
testing, one monkey wasn't always enough.

## Why It's Good For The Game

 Fixes #82283

## Changelog

🆑
fix: Slimes now feed faster, and should only need one monkey to reach
their next lifestage.
/🆑

* [No GBP] Fixes a slime speed config and ai controller null error in slime nutrition handling (#82330)

## About The Pull Request

Someone has linked the runtimes logs of round 226376 to show off a
runtime, and I took a look, and found some unrelated runtimes in slime
code.

- The config file for slime slowdown was still using the simple_animal
path. This has been fixed.
- Somehow, a grey slime has lost its AI controller, and when it got
hungry, it runtimed. For now, a coalesce operator has been put in place.
Later, an investigation is needed to figure out where did its AI
controller go.

## Why It's Good For The Game

Runtimes bad.

## Changelog

🆑
fix: Slime properly load their slowdown values from the config files.
fix: Slimes who lose their AI controller will no longer runtime when
they get hungry.
/🆑

* [No GBP] Slime stasis fixes (#82304)

## About The Pull Request

`handle_environment` is never called when the target was in stasis, so
slimes stayed in stasis forever. This PR fixes that, albeit in an ugly
way.
It also makes slimes actually not get hungry while in stasis.

## Why It's Good For The Game

Fixes #82300
I also claimed slimes can be safely kept in stasis, but I didn't
actually put a stasis check before handle_nutrition. This is fixed now.

## Changelog


🆑
fix: Slimes stop being in stasis when taken out of a BZ filled
environment
fix: Slimes no longer become hungry while in stasis
/🆑

* Add a unit test to check that maploaded simple/basic mobs are in an environment they can survive in. (#82180)

I've recently noticed that the maploaded penguins from the snowdin away
mission were dying from unsafe atmos/temperature. This sparked the idea
of making a (focus only) unit test that would prevent this sort of
issues from happening.

This PR also implements the usage of the `atmos_requirements` and
`body_temp_sensitive` elements for simple animals too, cutting down the
copypaste.

More unit tests to make sure things are done correctly.

🆑
fix: Made sure that mapped critters (i.e. penguins on the snow cabin
away mission) can survive in the environment they're spawned in.
/🆑

* This all is going to suck.

* A step further

* Is this hell over?

* I hope it is.

* Autosort I suppose

* This should cut it for VoidRaptor

* And Blueshift

* Revert "Autosort I suppose"

This reverts commit 9100de67c30514fc25db3ba29df81d1b0ac54e24.

* Dear god, the chicken.

* I fucking hate mapping

* fixes gas analyzers (#82278)

## About The Pull Request

#82180 accidentally messed up air analyzers being able to read or send
readouts to the chat.

## Why It's Good For The Game

air analyzer good

## Changelog

🆑
fix: air analyzers work again
/🆑

* [NO GBP]Grind & juice fixes (#82272)

- Fixes #82266. Anything that has reagents can be either grinded or
juiced
- If something doesn't have reagents but has grind results it can still
be grinded but not juiced

🆑
fix: anything that has reagents can be either grinded or juiced
fix: stuff that does not have reagents but has grind results can still
be grinded but not juiced
/🆑

* Birdshot Engineering Retrofitting (#81840)

Warning: Nanotrasen Confidential Proprietary Information (NCPI) must
only be accessed and viewed within a Nanotrasen Virtual Environment
(NVE, vNTOS-3). Employees in violation of this information ordnance will
have their wages A) garnished, and B) sent to a labour camp up to a
maximum of ten (10y) years. Questions regarding policies related to NCPI
should be directed towards departmental heads or your sector Central
Command Information Authority (CCIA) personnel.

## About The Pull Request

Credentials Confirmed
The Birdshot Engineering Revitalization Plan (formerly proposal
Blindfold, now BERP) is a procurement effort to address growing
maintenance liabilities and costs on the Skitter-MDR Class Orbital
Station located in the Spinward Stellar Cluster (SSC, Sector 28-7b).
Over the course of the previous year, ongoing analysis data has provided
vital feedback since the station was once again brought into operation
after 17 years of abandonment; and using this data, 4 options were
outlined for the Blindfold Proposal.
1) Abandonment - No Cost. Operations on Birdshot will cease. 28-7b
operations will be moderately impacted.
2) Procurement - Medium Cost. Replace offending station sections
completely with low-cost, working alternatives. Operational gains in
28-7b expected.
3) Do Nothing - No Cost. Moderate long-term impacts to operations in
28-7b.
4) >>>_Was removed_

Option 2 was selected for BERP. Procurement efforts identified 3
solutions and later narrowed it down to 1. Following the selection
process architects were brought in to draft up low-impact refits to the
designated hulk. 5 selections made it past initial drafting, with 3
ultimately being selected for engineering board review. Penultimately
draft proposal 3 was selected for the project and now awaits engineering
certification. The draft plan is provided on the next page:


![Birdshot Eng
Final](https://github.com/tgstation/tgstation/assets/33048583/441a6ca8-d7e1-4962-82b9-c412393ad73b)

Following board certification, implementation of the plan will be
commenced by 28-7b Nanotrasen Enigneering Corps. (NECs). Construction
time-frame pending Project Foremans review.

## Why It's Good For The Game

Birdshot Engineering is where this whole station began. Back then,
things were going to look closer to Birdboat Station, but that became
looser and more ill-defined as progress was made on the overall station.
While I was satisfied of the decrepit feel of Birdshot Enigneering
initially, I knew that at some point, it would require modification to
better play into Birdshots strengths.

I've had a long laundry list of a roadmap that I've wanted to implement
since the station was added, and this was the top item. Tier Zero.
Problema Numero Uno. You get the idea. This has been a year of drafting,
redrafting, and redrafting everything until it fit Birdshot right. With
this, we're nearly there. I see this being the definitive Engineering
Department for this station for quite some time to come. However, this
is still a draft and some elements are subject to change as I begin to
work out some of the more minor kinks in the draft such as pipe
locations and transit tubes.

Presently Atmospherics is completely rebuilt from the bottom up. There
is more space, enough to do projects, but you'll have to tear down some
windows and walls to gain it. Nothing ventured, nothing gained. You also
have most of the gas distro line outside. I'm a firm believer in
enabling whatever antics ANY lunatic may have. Atmos techs can rest
assured that outside lines are completely reconfigurable (and powered)
enabling some... unique project prospects. You also gained an inside HFR
and Spare burn chamber. Enjoy.

The Engineering Common Areas are now inside the department proper
instead of the satellite treatment in the original implementation.
Security gets an actual outpost and engineers now have a proper office
to file engineering documentation. They say that office colleagues can
form tight bonds so let's see whose is stronger: Purples or Yellows?

The Supermatter Engine is more of an upgrade over the previous model
(Leaky SM is here to stay so deal with it). The room is larger with less
rock, allowing some manner of greater customization, but I believe
engineers will be more than happy to find that they now have a Burn
Chamber of their own. I have zero clue of what they'll do with it, but I
think any enterprising CE will be able to create something that even god
should fear.

Finally we have maint improvements. Nothing really to see here though
maybe there's the beginning of something for the future if you care to
speculate. I couldn't really keep the meandering maint of the previous
rock, so instead we now have some pseudo dead-ends. It's all connected
by transit tubes to the north (not shown) so you can slowly get around
if you will it. Of course there's plenty of cut-throughs,
not-so-finished sections, and opportunity for those who need it. Caution
to the blind, this whole rock is spicy.

Overall I'm happy with this and want to open it up in Draft Mode for
initial thoughts. I have a rough timeline on finishing this that
stretches out to the weekend, so the earlier comments are, the more
likely I'll be able to MAYBE do something about it. Thanks for the
patience and hopefully this is a doozy of an update for all our players.

Previous Engineering Provided for Point of Reference:

![Screenshot 2024-03-04
190827](https://github.com/tgstation/tgstation/assets/33048583/55355582-2129-4744-a75b-0cd97f2b5008)

closes  #75590

## Changelog
🆑
qol: Wholesale Revamp of Birdshots Engineering Department
fix: Some Birdshot Amtospherics Concerns
fix: Some Birdshot Engine Concerns
/🆑

* Bumps `dependencies.sh` to 515.1633 Stable (#82138)

## About The Pull Request

Two reasons for this.

1. It's the stable branch, so let's move it up. This PR will detect any
issues that we might have with the latest 515.1633 as far as the
codebase is concerned (the servers have been running 1633 for at least a
week now).
2. ~~I'm fucking sick of seeing the Lua Scripting Notice in CI even
though it was fixed a few days ago in #82074
(5624d94524)

`![image](https://github.com/tgstation/tgstation/assets/34697715/0cc889c9-25d0-48cb-a0d1-304738acd8cc)`~~

* Makes simple bodycam component `COMPONENT_DUPE_SELECTIVE` (#82310)

## About The Pull Request

The thought only just occurred to me people may want to throw multiple
bodycams with different networks on them onto one mob, and it would be
trivially easy to support, so here.

I used `COMPONENT_DUPE_SELECTIVE` rather than `COMPONENT_DUPE_ALLOWED`
so people can avoid adding two of the same camera (network) to one mob.

* Fixes unfathomable curios not blocking when equipped. Fixes the shielded component still blocking despite not having a 'wearer'. (#82073)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

The unfathomable curio now only blocks when equipped to the belt slot,
and not when equipped in the hand.

The shielded component now no longer blocks despite not having a wearer,
and does not block if the wearer is not the same as the owner in the
``hit_reaction()`` proc.

Fixes https://github.com/tgstation/tgstation/issues/82068

## Why It's Good For The Game

The curio was only blocking while in-hand, rather than how it should be;
in the belt slot. Now it does what it is supposed to.

On top of that, this fixes what I think has been a bug for quite some
time with shield_inhand just not being respected whatsoever with regards
to whether or not the component worked. It only really determined
whether or not you got the sprites added/removed, but didn't factor into
the blocking ability whatsoever.

## Changelog

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

🆑
fix: Unfathomable Curios now properly block as expected.
fix: The shielded component actually respects the shield_inhand when
determining blocking potential.
fix: Ensures that the shielded component has a wearer before attempting
to block, and that this wearer is the same as the owner of the item.
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Co-authored-by: san7890 <the@san7890.com>

* Chem dispenser UI minor patches (#82123)

## About The Pull Request
- Fixes #82119. ph is not computed & shown when recording recipes is
enabled. The ph value was inaccurate anyway because it was not computed
from the recorded recipe but from the beaker.
- Removed deprecated `content` tag from buttons in the UI

## Changelog
🆑
fix: chem dispenser UI doesn't brick when beaker is ejected while
recording recipes
code: removed deprecated `content` tag from buttons in chem dispenser
/🆑

* Resprites supermatter theft (#82326)

## About The Pull Request

Resprites supermatter theft tools to match the current style surgical
tools they're based off of, as well as esprites the sliver to not be a
shard of pee glass.


![image](https://github.com/tgstation/tgstation/assets/5479091/bd37909d-afff-4316-91f4-1b87d45d57fa)

## Why It's Good For The Game

Consistency in surgical tool derived sprites that previously kept the
old style from before the last surgery resprite, and making supermatter
shards not look like glass.

## Changelog
🆑
image: Supermatter slivers and the tools used to steal them have been
resprited.
/🆑

* GAGSifies the jester costume (#82339)

## About The Pull Request

Updates the jester costume to support GAGS.


![image](https://github.com/tgstation/tgstation/assets/5479091/d76f4aaf-d3aa-489a-8a0b-cf443bda7252)

## Why It's Good For The Game

More freedom for players to customise their jestering.

## Changelog
🆑
image: The jester costume now supports GAGS
/🆑

* There we go

* You win, chicken, take your leave. (apparently nulls in prefabs default to the normal mob stuff)

* Makes the Captain's Spare safe actually secure from being smashed open now that it's been removed from a wall. (#82076)

## About The Pull Request
Makes the Captain's Spare safe actually secure from being smashed open
now that it's been removed from a wall. Damage Deflection of 30 has been
added to it.

## Why It's Good For The Game

Because the Captain's Safe was moved off of the wall it's now vulnerable
to direct attack and projectiles way, way more than before and now
there's a lot of avenues to inflict AP damage, which is directly
subtracted from the armor value before application of damage. I've added
a damage deflection of 30 to make it

## Changelog

🆑
balance: Makes the Captain's Spare safe actually secure from being
smashed open now that it's been removed from a wall. Damage Deflection
of 30 has been added to it.
/🆑

* [NO GBP] Fixes prosthetic limb quirk preferences (#82354)

## About The Pull Request

Accidentally broke it during my latest quirk PR, oops!
## Changelog
🆑
fix: Fixed Prosthetic limb quirk preferences
/🆑

* Makes deconstruction of computer & machine frames consistent (#82378)

## About The Pull Request
- Adds a missing examine for when the machine frame can be deconstructed
- Both the machine & computer frames needs to be unanchored before it
can be deconstructed & adds examines to explain the same. Currently
computer frames don't have the unanchor requirement which is
inconsistent, but now both frames share the same code

## Changelog
🆑
qol: adds missing examine for when machine frames can be deconstructed 
qol: both machine & computer frames must be unanchored before it can be
deconstructed & adds examines to explain the same
/🆑

* [NO GBP] Emergency Birdshot Maintenance (#82380)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

I forgot about changing these when I moved stuff around, and smart pipes
kinda did their smart-piping things.

Whoops forgot a cable hookup. Non-Critical, but still needs to be there.

## Why It's Good For The Game

Clear Labels make things more readable. 

APCs should start powered. 

Atmos Turbines should make the atmos techs work for their paycheck. 

## Changelog


🆑
balance: Readds some N2O to the Birdshot AI sat. I'll be working on a
better solution for this in the coming weeks.
fix: Due to a Misprint, the Atmos Gas -> Pure pipes were incorrectly
labeled on Birdshot. Your Cargo Techs have since remedied this.
fix: Our cable laying intern team didn't lay cable to the Secure Storage
APC in Enigneering. Getting coffee instead of working is a big no-no
here at Nanotrasen Tech Support, and they have since been reassigned.
Your Chief Engineers have been instructed to make the modifications on
all Birdshot Class Stations.
fix: We've noticed some Heads-Of-Staff getting lost on Birdshot. While
Telecommunications does have a GPS waypoint, our staffs stubbornness
often means this is ineffective. Additional Signage has been placed to
help direct our most senior of staff.
fix: The Birdshot Turbine will no longer Pre-Load itself with highly
flammable Plasma Gas. Do your own jobs you lazy atmos bums.
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

* Makes highlander layer hoisting code actually work (#82388)

Whoops

* Small Social Anxiety Fixes (#82387)

## About The Pull Request

- Speech filters from speech impairments don't apply unless they
actually change the message
- Psicodine properly stops stutter

## Changelog

🆑 Melbert
fix: Psicodine helps Socially Anxious people again (as does signing) 
fix: Speech effects such as stuttering no longer applies its TTS filter
if the resulting message doesn't actually change the message
/🆑

* Merge ordinance burn chamber with main lab for MetaStation (#82322)

## About The Pull Request
Fixes the issue specified in #82294 for Metastation ordinance burn
chamber.

Now both the burn chamber and the lab are combined together as one
area(no physical objects were displaced just their area properties were
modified) so they share the same apc allowing the igniter to function
there

## Changelog
🆑
fix: igniter in meta station ordinance burn chamber works again
/🆑

* TGUI: bumps yarn version (#82385)

Bumps our bundled yarn version up to 4.1.1.

This seemed previously impossible due to an indecipherable error
message:
```
SyntaxError: missing ) after argument list
    at wrapSafe (internal/modules/cjs/loader.js:979:16)
```

I'm assuming this was a bug in (earlier) versions of yarn ~4.0.2.
Meaning, this is probably worth testing or test merging, as it seems to
be running fine currently.

Better build tools

N/A

* Yeah, this should do.

* TGUI: updated dependencies (#82377)

Updates some of the dependencies in tgui. Should have zero gameplay
impact at all.

This puts our typescript version up to 5.4.3! And it detected errors
immediately

Bzzz here comes the airplane

N/A

* Clown anomalous crystals turn the dead into living clowns, rather than anyone who speaks in proximity (#82373)

## About The Pull Request

Rather than turning people into clowns if they speak within proximity of
the crystal, the clown anomalous crystal instead transforms the dead
into clowns, similar to the dark revival crystal.

This also adds logging for crystal activation.

## Why It's Good For The Game

We've had a significant number of admin issues with this crystal being
abused to both grief and killbait people by turning them into clowns as
of late. The crystal literally only exists to do this basically. And it
is also grossly unlogged despite the fact that many of the effects could
be cause for investigation.

Rather remove this crystal, I'm making it useful...with a catch.

## Changelog
🆑
qol: Makes the clown anomalous crystal actually useful for once rather
than an open griefing tool. It now revives the dead...as clowns!
admin: Adds logging for the anomalous crystal activation, including
fingerprints.
/🆑

* Fix all nighter runtimes (#82405)

## About The Pull Request

So, recently, someone asked me why their All Nighter eyebags weren't
working, and though after a short conversation we worked out it was
working as intended and they had just taken a few naps to train fitness,
I still checked the round logs once they were public.
https://scrubby.melonmesa.com/round/226476/runtimes

![image](https://github.com/tgstation/tgstation/assets/42909981/162d76ae-2d43-428b-bc7e-37371ba27a1c)
Coincidentally! Someone else _did_ have an All Nighter runtime!
Well. Time to fix it.

I look into the code, and lo and behold, it seems we're really just not
caring about whether the head actually exists.

d38f9385b8/code/datums/quirks/negative_quirks/all_nighter.dm (L50-L56)

But that reminds me. We have more ways to lose your head, like
H.A.R.S.... So... I boot the game, and...
Oh no.
_Oh no._
That's a _lot_ of runtimes huh. (See "Why It's Good For The Game")

Soooo we just add a check for whether our head-in-question actually
exists to both adding and removing our bags, and be done with it.
```dm
///adds the bag overlay
/datum/quirk/all_nighter/proc/add_bags()
	var/mob/living/carbon/human/sleepy_head = quirk_holder
	var/obj/item/bodypart/head/face = sleepy_head?.get_bodypart(BODY_ZONE_HEAD)
	if(isnull(face))
		return
	bodypart_overlay = new() //creates our overlay
	face.add_bodypart_overlay(bodypart_overlay)
	sleepy_head.update_body_parts() //make sure to update icon

///removes the bag overlay
/datum/quirk/all_nighter/proc/remove_bags()
	var/mob/living/carbon/human/sleepy_head = quirk_holder
	var/obj/item/bodypart/head/face = sleepy_head?.get_bodypart(BODY_ZONE_HEAD)
	if(face)
		//our overlay is stored as a datum var, so referencing it is easy
		face.remove_bodypart_overlay(bodypart_overlay)
		sleepy_head.update_body_parts()
	QDEL_NULL(bodypart_overlay)
```
Right?

Well, no. Yes, this stops the runtimes, but while testing this I also
noticed that the bags don't come back.
We lose our head, we regenerate a new one, and we don't have bags. Even
though we removed our head, we never actually removed _our bags_.
So our `bodypart_overlay` is never set to null, and it's never actually
attempting to apply them to our new head.

To resolve this, we then just add a new proc called on
`COMSIG_CARBON_REMOVE_LIMB`, which handles removing the eyebags before
we remove our head if needed.
```dm
///if we have bags and lost a head, remove them
/datum/quirk/all_nighter/proc/on_removed_limb(datum/source, obj/item/bodypart/removed_limb, special, dismembered)
	if(bodypart_overlay && istype(removed_limb, /obj/item/bodypart/head))
		remove_bags()
```

Oh, we also remove the unused `client/client_source` argument from both
the `add_bags(...)` and `remove_bags(...)` procs.
## Why It's Good For The Game

![image](https://github.com/tgstation/tgstation/assets/42909981/31fd97b5-dce3-46ec-9388-abf568fe4f0b)
## Changelog
🆑
fix: All Nighter: fixed a runtime from not having a head, whether from
hars/deletion/somesuch.
fix: All Nighter: losing and regaining your head while you had eyebags
no longer removes your eyebags until you've slept.
/🆑

* [NO GBP] Fixes Alcoholic quirk selection and addiction in general not being forever. (#82403)

## About The Pull Request

Fixes #82346
Also fixes a bug where Junkie, Smoker, and Alcoholic would not give you
more addiction once yours ran out.
## Changelog
🆑
fix: Fixes Alcoholic quirk selection
fix: Fixes Junkie, Smoker, and Alcoholic not giving you more addiction
when you come clean.
/🆑

* Fixes root beer rounding down to 0 delay for laser carbines/disabler SMGs (#82414)

## About The Pull Request

Title.
Closes https://github.com/tgstation/tgstation/issues/80921.

Uses SSprojectiles wait, via lemon's suggestion
(https://discord.com/channels/326822144233439242/326831214667235328/1195468576514130010)
## Why It's Good For The Game

bug bad
## Changelog
🆑
fix: Root beer no longer causes laser carbines and disabler smgs to fire
infinitely fast.
/🆑

* Fixes quirk being examined when observing (#82424)

Examining a human as ghost now shows their quirks again. This was
unintentionally removed with
https://github.com/tgstation/tgstation/pull/80692

This was unintentionally removed. Bugfix good me thinks?

![image](https://github.com/tgstation/tgstation/assets/49160555/57a8d817-c9f4-4bf5-bc10-498be58ed23d)

🆑
fix: Observers can now see people's quirks again
/🆑

* Moves that one wall in NorthStar Maints   (#82382)

You know the one, right? 

![image](https://github.com/tgstation/tgstation/assets/69398298/43f98dcb-2a00-43bb-9b9c-6541a77a8454)
Seriously though I asked "where's that random wall in northstar maints"
and not only did people know what I meant, within 5 min people told me
where it was.

<img width="825" alt="image"
src="https://github.com/tgstation/tgstation/assets/69398298/449ff97f-f256-449a-9eb0-d34b1e09f8f4">

## Why It's Good For The Game

Hallways work best when they're traversable. 

## Changelog

🆑
fix: Moves that one wall on NorthStar to not block the maints passage
/🆑

* fixes material scanning, so we can scan again (#82428)

I broke material scanning, This fixes it.

* Fixes access to borg panels (#82427)

## About The Pull Request

https://github.com/tgstation/tgstation/pull/81681 removed the access
requirement to unlock a borg, which of course meant anyone with any ID
could fiddle with them.

## Why It's Good For The Game

back to sanity

## Changelog
:cl:Zergspower
fix: borg panel access now requires robotics access again
/🆑

* Adds a visual effect to breathing in cold environments (#82336)

## About The Pull Request

Humans (who breathe) (with lungs) now has a particle associated when
breathing in cold air. The colder the air, the more likely the particle
to occur per breath.


https://github.com/tgstation/tgstation/assets/51863163/f375dd1b-87f6-4124-9329-4714fe988c16

Other changes:

- Adjusts the probability of getting "your lungs feel cold/hot" when
breathing cold/hot air depending on how cold/hot the air is.
- Very cold air now has a chance of causing humans to shiver when they
breathe it in.

## Why It's Good For The Game

Some nice VFX to breathe some style into the game. 

## Changelog

🆑 Melbert
qol: Breathing cold air now has a particle effect associated, careful
not to let your glasses fog up.
qol: Breathing cold air will now occasionally make your spaceman shiver.
Brrr.
/🆑

* [NO GBP] Emergency Birdshot Maintenance (#82380)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

I forgot about changing these when I moved stuff around, and smart pipes
kinda did their smart-piping things.

Whoops forgot a cable hookup. Non-Critical, but still needs to be there.

## Why It's Good For The Game

Clear Labels make things more readable. 

APCs should start powered. 

Atmos Turbines should make the atmos techs work for their paycheck. 

## Changelog


🆑
balance: Readds some N2O to the Birdshot AI sat. I'll be working on a
better solution for this in the coming weeks.
fix: Due to a Misprint, the Atmos Gas -> Pure pipes were incorrectly
labeled on Birdshot. Your Cargo Techs have since remedied this.
fix: Our cable laying intern team didn't lay cable to the Secure Storage
APC in Enigneering. Getting coffee instead of working is a big no-no
here at Nanotrasen Tech Support, and they have since been reassigned.
Your Chief Engineers have been instructed to make the modifications on
all Birdshot Class Stations.
fix: We've noticed some Heads-Of-Staff getting lost on Birdshot. While
Telecommunications does have a GPS waypoint, our staffs stubbornness
often means this is ineffective. Additional Signage has been placed to
help direct our most senior of staff.
fix: The Birdshot Turbine will no longer Pre-Load itself with highly
flammable Plasma Gas. Do your own jobs you lazy atmos bums.
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

* [NO GBP] Emergency Birdshot Maintenance (#82380)

<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

I forgot about changing these when I moved stuff around, and smart pipes
kinda did their smart-piping things.

Whoops forgot a cable hookup. Non-Critical, but still needs to be there.

## Why It's Good For The Game

Clear Labels make things more readable. 

APCs should start powered. 

Atmos Turbines should make the atmos techs work for their paycheck. 

## Changelog


🆑
balance: Readds some N2O to the Birdshot AI sat. I'll be working on a
better solution for this in the coming weeks.
fix: Due to a Misprint, the Atmos Gas -> Pure pipes were incorrectly
labeled on Birdshot. Your Cargo Techs have since remedied this.
fix: Our cable laying intern team didn't lay cable to the Secure Storage
APC in Enigneering. Getting coffee instead of working is a big no-no
here at Nanotrasen Tech Support, and they have since been reassigned.
Your Chief Engineers have been instructed to make the modifications on
all Birdshot Class Stations.
fix: We've noticed some Heads-Of-Staff getting lost on Birdshot. While
Telecommunications does have a GPS waypoint, our staffs stubbornness
often means this is ineffective. Additional Signage has been placed to
help direct our most senior of staff.
fix: The Birdshot Turbine will no longer Pre-Load itself with highly
flammable Plasma Gas. Do your own jobs you lazy atmos bums.
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: KingkumaArt <69398298+KingkumaArt@users.noreply.github.com>
Co-authored-by: DATAxPUNGED <44149906+DATA-xPUNGED@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Profakos <profakos@gmail.com>
Co-authored-by: Sealed101 <75863639+Sealed101@users.noreply.github.com>
Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
Co-authored-by: Higgin <cdonny11@yahoo.com>
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Zytolg <33048583+Zytolg@users.noreply.github.com>
Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
Co-authored-by: Thunder12345 <Thunder12345@users.noreply.github.com>
Co-authored-by: Iamgoofball <iamgoofball@gmail.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
Co-authored-by: nikothedude <59709059+nikothedude@users.noreply.github.com>
Co-authored-by: Waterpig <49160555+Majkl-J@users.noreply.github.com>
Co-authored-by: Bilbo367 <163439532+Bilbo367@users.noreply.github.com>
Co-authored-by: Zergspower <Griffinj88@yahoo.com>
2024-04-16 06:05:57 +00:00
Useroth
59d74624b1 Upstream power stuff combined and shit (#27284)
* Converts arbitrary energy units to the joule. Fixes conservation of energy issues relating to charging cells. (#81579)

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.

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.

🆑
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>

* Corrects Suit Storage Unit charge rate  (#82192)

## About The Pull Request

Adjusts SSU charge rate according to the new conversion ratio. 

Betcha didn't know SSUs recharge suit and MOD cells? 

This number is actually supposed to be equal to the rate a recharger
station does it.
I don't know if we have some macro for it. 

## Changelog

🆑 Melbert
fix: Fixed Suit Storage Unit cell charging rate
/🆑

* Corrects EVA thermal regulator cell cost (#82195)

## About The Pull Request

Another unit not converted to watts / joules

## Changelog

🆑 Melbert
fix: Fixed space suit thermal regulators cell usage.
/🆑

* Fixing cell power usage (Part 1) (#82197)

## About The Pull Request
Yeah i am not about to create 30 different PR's to address 1 issue at a
time. The changes are small enough to be grouped together in bulk.

This fixes the following issues specified in #82196
- Borg & exosuit RCD (Fixes #82193)
- Motorized wheelchair
- Canister shielding
- Electrolyser
- Potato cell
- Space heater
- Microwave

## Changelog
🆑
fix: Fixed cell energy usage for a bunch of stuff(Part 1). See PR 82197
for details
/🆑

---------

Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com>

* Fixing cell power usage (Part 2) (#82198)

## About The Pull Request
Continuation of #82197.

Fixes these issues in #82196
- Cyborg self repair
- Cyborg lollipop dispenser
- Mauna mug
- Plasma cutter (Initial charge not the number of laser shots so partial
fix)

## Changelog
🆑
fix: Fixed more energy usages for cells(Part 2). See PR 82198 for
details
/🆑

---------

Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com>

* Fixing cell power usage (Part 3) (#82204)

## About The Pull Request
Continuation of #82198

Fixes these issues in #82196
- Borg hypo spray
- Borg projectile dampen
- Borg chameleon
- Firelance
- MODlink scryer
- Emergency light usage

## Changelog
🆑
fix: Fixed more energy usages for cells(Part 3). See PR 82204 for
details
/🆑

---------

Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com>

* [NO GBP]Fixes static power usage not always drawing the remaining energy of an APC cell. (#82205)

## About The Pull Request
Makes APC static power draw consume the remaining energy of the cell if
there's not enough energy.
## Why It's Good For The Game
Prevents a niche issue where an area composed entirely of static power
users with no dynamic users from running forever with no power supply.
## Changelog
🆑
fix: Fixes static power usage from being able to not draw power.
/🆑

* Fixes recharge stations charge rates (#82191)

## About The Pull Request
- Fixes #82190

Have to now use the assigned constants and not magic number `10000`.
Also stuff will take the exact charge needed without any wastage.

## Changelog
🆑
fix: recharge stations draw the same amount of power as before but
directly from grid(without using apc cell power) and won't waste any
excess power
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>

* Fixes space heater power usage (#82208)

## About The Pull Request

Related to https://github.com/tgstation/tgstation/issues/82196 fixes the
space heater power cell usage relating to power per tile heated.

Space heater calculates the amount of power required to heat a tile, but
only uses power at the end of the processing loop. Fixes so the power
consumption matches the calculated usage per tile.

Reverts changes to space heater power efficiency in
https://github.com/tgstation/tgstation/pull/82197 that causes the heater
to instantly drain the cell.

Fixes https://github.com/tgstation/tgstation/issues/82228

## Changelog

🆑 LT3
fix: Fixes Schrödinger's space heater, where a space heater both
consumes a power cell instantly while also not consuming power when
heating adjacent tiles
/🆑

* General maintenance for reagent grinder (#82161)

## About The Pull Request

**1. Qol**
  - Adds examines & screentips for screwdriver, crowbar & wrench acts.
- Adds examines & screentips for inserting, replacing & removing beaker,
Also for inserting items from bags or directly
- Adds an off icon overlay for when the reagent grinder is either
screwed open or loses power,
 
**2. Code Improvements**
- Replaced `attackby()` with `item_interaction()` so we can end the
attack chain early for non combat operations like inserting beakers/
ingredients for grinding etc.
- Removed custom shake animations & replaced it with the global
`Shake()` proc cause it did the same thing
- Removed constructed version of reagent grinder. We instead just check
`mapload` to see if we need the beaker to be created or not for round
start reagent grinders
- Grinding & Juicing use the same `operate_for()` rather than having
seperate procs for each operation
- Removed trait `TRAIT_MAY_CONTAIN_BLENDED_DUST`. Why do we have this?
Its just used to change the grinder description to warn it may contain
dust. It's a waste.
  
**3. Fixes**
- You cannot insert hologram items into the grinder. Rather than
destroying that item & making it vanish you simply won't be allowed to
put it inside the grinder so you can save that item
- You can hit the grinder with items like screwdriver, wrench, crowbar,
beaker & even with stuff you would normally put in the grinder when in
combat mode
  - Adds `can_interact()` checks for using the UI & other stuff 
- Fixes #46356. All items of type `obj/item/grown` can be put from any
bag into the grinder
- The item "and its contents" are now grinded/juiced recursively to get
all the reagents it has to offer just like a real grinder would
- An AI/Human with AI access examining the reagent grinder now actually
works.
 
**4. Refactors**
- The grinder now measures its available capacity based on the "total
weight" of all items present & not its number. This is more realistic
because the grinder has limited space inside & so inserting huge items
should have greater impact rather than deciding on an arbitrary number
like 10(The grinder having the capacity for 10 items of any size inside
its small compartment makes no sense). Examines are displayed to show
how much capacity of the grinder has been filled. Upgrading the grinder
with better matter bins will allow for higher storage capacities.
- Total power consumed is measured based on the duration & weight of all
items grinded cause you know its realistic.


🆑
qol: adds examines & screentips for tool acts & other operations for
reagent grinder
qol: adds an off icon for when the grinder panel is open/not powered
code: auto docs vars & procs. Shared common proc for grinding or juicing
code: removed trait for blended dust, changed some item interactions to
end the attack chain early & save time
fix: no inserting hologram items into the reagent grinder
fix: you can hit the reagent grinder tools like screwdriver, wrench,
crowbar & even beakers/ingredients etc when in combat mode
fix; adds sanity checks for when & how mobs interact with the reagent
grinder
fix: examining a reagent grinder by an AI/Human with AI access now
actually works.
fix: you can insert Nova flowers & other food items from any bag type
fix: reagent grinder now grinds all the contents of an item recursively
to produce maximum reagents like a real grinder would
refactor: reagent grinder now measures available capacity to store items
as total weight of stored items & not number. Capacity can be increased
with upgraded matter bin
refactor: reagent grinder power usage is now a function of duration &
total weight of items blended, meaining blending more number of
items/larger items will consume more power
refactor: reagent grinder code has been optimized overall. Report bugs
on github
/🆑

---------

Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>

* Suit Storage Units / Inducers can charge MODsuits without necessitating them be screwdrivered opened  (#82194)

## About The Pull Request

So MODsuits do this thing here with `get_cell` in that they don't return
anything when they're closed


![image](https://github.com/tgstation/tgstation/assets/51863163/416f8ef5-3bfc-4d2c-a12f-029f051d6692)

And I... can't tell why they do this. 

I looked through every use of `get_cell` and the only things affected by
this are
A. Suit Storage Units, which I believe have always been intended to
charge MODsuits?
and
B. Inducers

So I removed the `open` check. Allowing both Inducers and Suit Storage
Units to charge mods without needing you screwdriver their panel open
first.

I also took the opportunity to allow SSUs to charge multiple items at
once (divvying charge accross all items)

## Why It's Good For The Game

I asked Fikou and they said it was "probably not" intended that you need
to screwdriver them open so yeah.

I think I remember charging my MODs during the original test merges
years back but I can't remember if I opened the suit first when I did or
not.

Either way, it's not super intuitive. Though it's already not very
intuitive that SSUs charge things.

## Changelog

🆑 Melbert
qol: Suit Storage Units charge MODsuits while their cell panel is closed
or open, rather than only when screwed open
qol: Inducers can charge MODsuits while their cell panel is closed or
open, rather than only when screwed open
qol: Suit Storage Units will charge all items within simultaneously (if
possible)
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>

* Fixes modular computer boot-up (#82254)

## About The Pull Request

Fixes a bug where modular computers (specifically PDAs) will fail to
start up if there is zero required application power draw.

PDA will now consume base active power usage during startup.

Related https://github.com/tgstation/tgstation/issues/82196
Fixes https://github.com/tgstation/tgstation/issues/82245
Fixes https://github.com/tgstation/tgstation/issues/82229

## Changelog

🆑 LT3
fix: Fixed modular computers failing to boot up using cell power (eg:
contractor tablet)
/🆑

* Fixing cell power usage (Part 4) (#82227)

## About The Pull Request
Continuation of #82204

Fixes these issues in #82196
- Cyborg Electroadaptive Pseudocircuit
- Defib EMP
- Cell EMP
- `/datum/action/cooldown/mob_cooldown/charge_apc` stuff
- Mecha movement, melee, light ,weapon & tool energy drains
- Ninja drain

## Changelog
🆑
fix: Fixed more energy usages for cells(Part 4). See PR 82227 for
details
/🆑

---------

Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com>

* Fixing cell power usage (Part 5) (#82296)

## About The Pull Request
Continuation of #82227

Fixes these issues in
https://github.com/tgstation/tgstation/issues/82196 and others that
weren't noticed.
- Batton emp protection
- Cyborg stun arm
- Cyborg energy sword
- Cyborg hug attack
- Mechanical god religious sect charge check
- Mecha fixes
  - Phasing energy drain
  - Short circuit energy drain
  - Durand shield damage energy drain
  - Plasma engine recharge rate
- Mechbay recharge power rate
- Recharge station charge rate

Stuff that was already working & didn't require fixing.
- Plasma cutter energy shots
- Botany cell charging

## Changelog
🆑
fix: Fixed cell energy usage for a bunch of stuff(Part 5). See PR 82296
for details
/🆑

---------

Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com>

* Ties power limit of anchored circuits to 20 * standard cell charge to make it consistent with power changes. (#82287)

## About The Pull Request
It just makes the power requirement 20 * standard cell charge instead of
20000
## Why It's Good For The Game
This is too restrictive to make anything with.



https://github.com/tgstation/tgstation/assets/62126254/e39dcf27-8793-42b0-84a0-7f747e95efcc
## Changelog
🆑
fix: anchored circuits no longer blow up after 2 components are used.
/🆑

---------

Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com>

* Space heater power and heating tweaks (#82344)

## About The Pull Request
- Fixes #82342
- Space heater computes total power for heating adjacent turfs and uses
cell energy once rather multiple times per turf
- Improvised space heater actually works & uses beaker heat capacity and
not a constant of 200 for heating beaker contents

## Changelog 
🆑 SyncIt21,Pickle-Coding
fix: space heater(including improvised) turns off when cell is drained
fix: optimized power usage for both improvised and main space heater.
Improvised heater now works & uses beaker heat capacity
/🆑

* Improved lathe error message (#82260)

## About The Pull Request

Improves the auto/protolathe low charge error message. Instead of simply
saying low power, it will tell you how long until it has enough charge
to print.


![image](https://github.com/tgstation/tgstation/assets/83487515/a2aebd3e-b7bf-4a13-ae7a-6c1cc14c9057)

## Why It's Good For The Game

Less mashing the lathe over and over with no idea how much APC charge it
needs to start printing again

## Changelog

🆑 LT3
code: APCs can now calculate time-to-charge
qol: Overloaded lathes will now tell you the wait time until they're
ready to print again
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>

* Fixes issues with multitools on power objects (#82389)

## About The Pull Request

So at some point the power object's `multitool_act(...)` proc was set to
_always_ block, for what I could find to be no discernable reason.

### The Main Thing


d38f9385b8/code/modules/power/power.dm (L62-L74)
Now, of course, it shouldn't, because this cuts the entire chain short
and thus blocks any other multitool interactions. Like opening the wires
panel with a multitool, in this case. Even if `can_change_cable_layer`
were to be false and thus the object would never actually care about
having this interaction, it'd _still_ block it.

So we don't do that. But what _do_ we do?
I decided to just split off the actual cable changing part into its own
proc, `cable_layer_act(...)`.
```dm
/obj/machinery/power/proc/cable_layer_act(mob/living/user, obj/item/tool)
	var/choice = tgui_input_list(user, "Select Power Line For Operation", "Select Cable Layer", GLOB.cable_name_to_layer)
	if(isnull(choice))
		return ITEM_INTERACT_BLOCKING

	cable_layer = GLOB.cable_name_to_layer[choice]
	balloon_alert(user, "now operating on the [choice]")
	return ITEM_INTERACT_SUCCESS
```
Which is then called on `multitool_act(...)`, if
`can_change_cable_layer` is true.
```dm
/obj/machinery/power/multitool_act(mob/living/user, obj/item/tool)
	if(can_change_cable_layer)
		return cable_layer_act(user, tool)
```
Which continues with the chain if we can't change layers by default, and
otherwise lets `cable_layer_act(...)` work out whether we should block
or continue.
Notably, we've removed the `cable_layer_change_checks(...)` proc from
the equation, and just let inheritors override it to add their own
preconditions and what flags they should return.
On its own this fixes the APC wire panel interactions, but also lets us
just return `NONE` when we need to.
```dm
/obj/machinery/power/emitter/cable_layer_act(mob/living/user, obj/item/tool)
	if(panel_open)
		return NONE
	if(welded)
		balloon_alert(user, "unweld first!")
		return ITEM_INTERACT_BLOCKING
	return ..()
```

### The OTHER Things

While doing this I noticed there's actually very little sanity checks
after we close our input list.
```dm
var/choice = tgui_input_list(user, "Select Power Line For Operation", "Select Cable Layer", GLOB.cable_name_to_layer)
if(isnull(choice))
	return ITEM_INTERACT_BLOCKING
```
We only care about whether we made a choice!
Testing this, lo and behold, this can cause runtimes if the power object
gets qdeleted before you close the menu.
As a funny side, it _also_ doesn't care about whether you're on the
other side of the station, while your multitool is on a different
z-level, or just doesn't exist anymore.
So we just add a few basic sanity checks while we're at it.
```dm
var/choice = tgui_input_list(user, "Select Power Line For Operation", "Select Cable Layer", GLOB.cable_name_to_layer)
if(isnull(choice) || QDELETED(src) || QDELETED(user) || QDELETED(tool) || !user.Adjacent(src) || !user.is_holding(tool))
	return ITEM_INTERACT_BLOCKING
```
That's all. Having done some basic testing, I believe the behaviour is
otherwise unaffected.
## Why It's Good For The Game

It's annoying to need to swap to an empty hand or wirecutters to
interact with APC, emitter, or tesla coil wires.
This fixes that. (Fixes #81745.)
...and then a few other tidbits I realized existed.
## Changelog
🆑
fix: Fix using a multitool on a power object with wires not actually
opening the wires menu when it should.
fix: Fix a runtime from a power object being deleted before selecting
what cable layer to put it at.
fix: Fix power object cable changing not caring about whether you were
still adjacent, still holding your multitool, or whether it even still
existed after the selection menu was closed.
/🆑

* Updates cyborg cells created from borgifier to the SI standard (#82437)

## About The Pull Request

Unchanged value in transformer.dm resulted in borg charge draining to
zero immediately after forced conversion in the borgifer. Changing the
value of robot cell charge to 5 MJs to fix this.
## Why It's Good For The Game

Fixes #82426
## Changelog
🆑
fix: changed value of cell charge from 5000 to 5 megajoules
/🆑

* cell chargers now bypass APCs (#82309)

## About The Pull Request
This makes cell chargers and suit storage units draw from the grid
before the local apc

## Why It's Good For The Game
Upgraded Cell chargers have a charging power of 1MW leading to them
instantly draining the apc of any room they are in,
this Pr makes them draw from the grid preventing immediate blackout. 
This is a stopgap until someone smarter than me changes power values so
a pocket-sized battery won't require the same power to charge then over
600 average suburban homes.

## Changelog
🆑
balance: suit and cell chargers should draw from grid preventing instant
apc blackouts in most cases.
/🆑

* Let ethereals starve again (#82308)

## About The Pull Request

Ethereals use energy as 'food', so of course #81579 had to touch them.
To bring them in line with the new standard, the Ethereal charge levels
were updated to be in megajoules.

466b3df048/code/__DEFINES/mobs.dm (L292-L299)

7fa8daad63/code/__DEFINES/mobs.dm (L285-L292)
However! This forgot to update the rate at which Ethereals passively
discharge.

7fa8daad63/code/modules/surgery/organs/internal/stomach/stomach_ethereal.dm (L11-L14)

7fa8daad63/code/__DEFINES/mobs.dm (L437)
Meaning it's effectively a thousand times less with the new charge
levels.

So we simply update this define to be in kilowatts.
```dm
#define ETHEREAL_CHARGE_FACTOR (0.8 KILO WATTS) //factor at which ethereal's charge decreases per second
```
## Why It's Good For The Game

Fixes issue with ethereal hunger caused by #81579.
## Changelog
🆑
fix: Ethereal starvation has been updated to the new joules/watts
standard. Congratulations Ethereals! You can starve again!
/🆑

* [NO GBP]Fixes ethereal charging and recharge station charge speed. (#82483)

## About The Pull Request
Fixes many instances of things not charging ethereals properly. Scales
all things that are meant for charging/taking from the ethereal stomach
by STANDARD_CELL_CHARGE, so we never run into this issue again. Ethereal
stomachs now store a cell inside them, and uses that for the charge
instead of tracking a variable. Fixes recharging stations not being able
to charge ethereal stomachs. The ethereal signal proc attempted to feed
a callback datum to adjust_charge(), which caused a runtime. Changes
that by invoking the charge_cell callback instead.

Also fixes recharge station charging speed. They weren't converted
correctly. Also formats their charging speed in their description, and
displays power rather than referencing cycles.
## Why It's Good For The Game
So ethereals charge properly.

Closes #82470
## Changelog
🆑
fix: Fixes many instances of energy sources for ethereals supplying a
thousand times less energy than intended.
fix: Fixes recharging stations not being able to charge ethereals.
fix: Fixes recharge stations charging too fast.
qol: Recharge stations display their recharging speed in formatted
power, rather than unformatted energy per cycle.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>

* Update lead acid batteries charge values (#82510)

## About The Pull Request

So during the whole power consistency update thing, it seems lead acid
batteries were entirely forgotten about.
Which, well, is easy, because they never actually used
`STANDARD_CELL_CHARGE`.

c34d56a45b/code/game/objects/items/maintenance_loot.dm (L32-L33)
Looking into it, the previous value for `STANDARD_CELL_CHARGE` seemed to
have been 1000, so we convert it directly:
```dm
maxcharge = STANDARD_CELL_CHARGE * 20
chargerate = STANDARD_CELL_CHARGE * 1.4
```
But, comparing this to the normal power cells, it seems their charge
rates got _halved_ during the update.
So, we do that too.
```dm
maxcharge = STANDARD_CELL_CHARGE * 20
chargerate = STANDARD_CELL_CHARGE * 0.7
```
And that fixes it.
## Why It's Good For The Game

Fixes lead acid batteries still using the old power amounts, and not
being relative to `STANDARD_CELL_CHARGE`.
## Changelog
🆑
fix: Lead acid batteries have had their power values fixed.
/🆑

* This should do for modular code, for now.

* Fixing cell power usage (Part 5) (#82296)

Continuation of #82227

Fixes these issues in
https://github.com/tgstation/tgstation/issues/82196 and others that
weren't noticed.
- Batton emp protection
- Cyborg stun arm
- Cyborg energy sword
- Cyborg hug attack
- Mechanical god religious sect charge check
- Mecha fixes
  - Phasing energy drain
  - Short circuit energy drain
  - Durand shield damage energy drain
  - Plasma engine recharge rate
- Mechbay recharge power rate
- Recharge station charge rate

Stuff that was already working & didn't require fixing.
- Plasma cutter energy shots
- Botany cell charging

🆑
fix: Fixed cell energy usage for a bunch of stuff(Part 5). See PR 82296
for details
/🆑

---------

Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com>

* [NO GBP]Fixes some mapped SMES starting with low energy. (#82203)

## About The Pull Request
Scales them all by up to 20 to account for removing the dumb SMESRATE
define. This isn't a 100% conversion for every SMES because it would go
beyond their capacity (old SMES use to duplicate cell energy, so they
had a higher capacity than their cell parts imply). Also removes
instances of varediting their capacity to fucking 1e+600 and replaces
them with magical SMES.
## Why It's Good For The Game
So lavaland and crap don't instantly run out of power. Also I don't
think we should be varediting anything to 1e+600.
## Changelog
🆑
fix: Fixes lavaland SMES and other crap from not starting with enough
energy.
fix: The pirate SMES are now magical instead of secretly infinite.
/🆑

* Mechbay & modsuit recharger tweaks (#82337)

## About The Pull Request
- Both mechbay & modsuit rechargers now waste a small amount of energy
as heat like it did before
- Fixes #82332. Mechbay recharger displays the energy of the mech in
joules & charges the cell with the exact energy required directly from
the grid thus not causing the room to blackout

## Changelog
🆑
fix: Mechbay & modsuit rechargers waste a small amount of energy as heat
fix: Mechbay recharger console displays mech charge as joules & charges
directly from the grid thus sparing the rooms apc cell from huge loads
/🆑

* Refactor APCs interaction chain from attackby to item_interaction (#82390)

## About The Pull Request

For how many lines this is, there's not a lot to really say.
In general, we simply move all item interactions from `attackby(...)` to
`item_interaction(...)`, split each item interaction off into a separate
proc, and make them all return the proper item interaction flags.
We _do_ kill some probably dead code, and remove a call to
`attackby(...)` elsewhere. Then, for clarity, we move the cell check
below the ID check so it can be next to the other item type checks, as
the priority between cell and ID is unlikely to matter anyway.
Other than what's described above and detailed below, each section's
functionality should be the same.

Now, for the parts that _do_ need to be explained more.

### Killing Probably Dead Code

Alright, so, the first part that does not have the cleanest transition.

d38f9385b8/code/modules/power/apc/apc_attack.dm (L22-L23)
Whatever the fuck this is.

Asking around, this seems to just be dead code.
For sanity's sake removing it and testing, silicon interactions with it
seem to work just fine.
So we kill it. We just kill it. We Just Kill It.

Closest we could find requires the distance check there to be false, so
it wouldn't apply. But it _does_ bring us to the second bit of weird
code.

### Calling APC Attackby Elsewhere?
So wallframes let you screwdriver them to put them up, which from a
comment seems to be because of cyborgs.
APC wallframes of course override this with their own implementation,
that allows you to also replace a damaged cover or frame like that!

d38f9385b8/code/game/objects/items/apc_frame.dm (L29-L39)
...By just calling the wholeass `attackby(...)` proc on the APC and
calling it a day.

But hey, this is where our previous splitting up comes in handy, because
we just have a `wallframe_act(...)` proc!
So we just call that instead.
```dm
var/obj/machinery/power/apc/mounted_apc = locate(/obj/machinery/power/apc) in get_turf(user)
mounted_apc.wallframe_act(user, src)
return ITEM_INTERACT_SUCCESS
```
...And not use single letter variables, while we're at it.

That should be all.
Remember to get snacks and drinks.
## Why It's Good For The Game

Split off 178 line `attackby(...)` item interaction chain into separate
procs called in `item_interaction(...)`.
Screwdrivering APC wallframes no longer calls the wholeass
`attackby(...)` on the APC, but just call the new sub-proc for the
specific interaction it cares about.
## Changelog
🆑
refactor: APCs have had their item interaction chain refactored. This
should functionally be the same, but please report any issues.
/🆑

* [NO GBP]Cells will only consider 0.1% of their charge when shocking a user. (#82456)

## About The Pull Request
Makes cells only consider 0.1% of their charge when calculating the
damage for shocking someone. This makes the minimum damage 20, and goes
up to 22 (previous behaviour, even though that's a shockingly small
difference) with a 50 MJ cell, which is the highest capacity crew can
get. This makes it inversely scale with the standard cell charge define,
so if that gets changed, cells will use a different composition of their
charge to consider.

## Why It's Good For The Game

Airlocks instantly critting people when shocked regardless of what's in
the grid wasn't previous behaviour.

* Oops. There we go.

* Oh, these two too.

---------

Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com>
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
Co-authored-by: moocowswag <62126254+moocowswag@users.noreply.github.com>
Co-authored-by: _0Steven <42909981+00-Steven@users.noreply.github.com>
Co-authored-by: Archie700 <archie712@hotmail.com>
Co-authored-by: Blacklist897 <149209377+Blacklist897@users.noreply.github.com>
2024-04-12 06:33:40 +02:00
SkyratBot
fb99259785 [MIRROR] Fixes runtime from examining mod PCs (#26318)
* Fixes runtime from examining mod PCs (#81200)

## About The Pull Request

It's a classic

![image](https://github.com/tgstation/tgstation/assets/51863163/297cbecd-c32d-4c10-8c25-000d8a95310c)

`EXAMINE_HINT(x)` resolves to `"<b>" + x + "</b>"`

When placed in this line directly, you get:

`["<b>" + HAS_TRAIT_FROM(...) ? "..." : "..." + "</b>"]`

You see the issue, right?

This resolves as you would expect:
`("<b>" + HAS_TRAIT_FROM(...)) ? ("...") : ("..." + "</b>")`

Which, of course, runtimes as it's adding a string to an integer (0).

By pulling it out to its own var we can get around this:

`["<b>" + frame_or_pc + "</b>"]`

## Changelog

🆑 Melbert
fix: Fixed examining modular PCs
/🆑

* Fixes runtime from examining mod PCs

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-02-02 18:34:27 +01:00
SkyratBot
fdcfabefd8 [MIRROR] Integrated circuits for modular computers (#26196)
Integrated circuits for modular computers (#80530)

This PR integrates circuits for modular computers and a good bits of
their programs.
The peculiarity here is that modular computers have no fixed amount of
unremovable components (except the base one with just a couple ports for
now), instead, they're added and removed along with programs. With a few
exceptions (such as the messenger and signaler), for these program
circuits to work, their associated program has to be either open or in
the background.

For a reason or another, not all programs have a circuit associated to
them, still, however the programs with a circuit are still a handful.
They are:
- Nanotrasen Pay System
- Notepad
- SiliConnect
- WireCarp
- MODsuit Control
- Spectre Meter
- Direct Messenger*
- LifeConnect
- Custodial Locator
- Fission360
- Camera
- Status Display
- SignalCommander

*By the by, sending messages has a cooldown, so it shouldn't be as
spammy. If it turns out to not be enough, I can make it so messages from
circuit will be ignored by other messenger circuits.

The PR is no longer WIP.

I believe modular computers could make for some interesting setups with
circuits, since they're fairly flexible and stocked with features unlike
many other appliances, therefore also a speck more abusable, though
limits, cooldowns, logging and sanitization have been implemented to
keep it in check.

🆑
add: Modular Computers now support integrated circuits. What can be done
with them depends on the programs installed and whether they're running
(open or background).
add: Modular Consoles (the machinery) now have a small backup cell they
draw power from if the power goes out.
/🆑

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-01-21 14:59:14 +00:00
SkyratBot
d34aab9be3 [MIRROR] PDA general maintenance (NTNet downloader rework) [MDB IGNORE] (#25133)
* PDA general maintenance (NTNet downloader rework)

* Update modular_computer.dm

* e

* weh

* Update archive_viewer.dm

* Update three_layer_hats.json

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-12-24 22:28:40 +00:00
SkyratBot
41ea46d5f2 [MIRROR] Scopes NODECONSTRUCT_1 from flags_1 to obj_flags [MDB IGNORE] (#25496)
* Scopes `NODECONSTRUCT_1` from `flags_1` to `obj_flags`

* Update bitfields.dm

* Modular

* Update rack.dm

---------

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-12-08 23:24:46 -05:00
SkyratBot
b1aefe3a74 [MIRROR] pdas now use their cells more [MDB IGNORE] (#23977)
* 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.
/🆑

* pdas now use their cells more

* reduce power usage

* Update computer.dm

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
2023-10-06 21:54:55 -07:00
SkyratBot
ee8c524e7c [MIRROR] Fixes Intellicards in computers being deleted when the computer is destroyed [MDB IGNORE] (#23900)
* Fixes Intellicards in computers being deleted when the computer is destroyed (#78475)

## About The Pull Request

As described in #78467, if an Intellicard is inserted into a laptop or
stationary modular computer, and said computer is destroyed, then the
Intellicard (as well as any AI on it) is instantly deleted. This PR
makes the Intellicard get dropped instead. Closes #78467.
## Why It's Good For The Game

Bugs are bad.
## Changelog
🆑
fix: Intellicards in computers are no longer deleted when the computer
is destroyed.
fix: Modular consoles can now be deconstructed by right clicking with a
wrench.
/🆑

* Fixes Intellicards in computers being deleted when the computer is destroyed

---------

Co-authored-by: GPeckman <21979502+GPeckman@users.noreply.github.com>
2023-09-25 13:40:01 -04:00
SkyratBot
2f552919c1 [MIRROR] Icons folder cleaning wave two [MDB IGNORE] (#22454)
* Icons folder cleaning wave two

* Merge conflict resolution

* Modular path hell

* hmm

* Update 2022-10.yml

* Another modular thing

---------

Co-authored-by: YesterdaysPromise <122572637+YesterdaysPromise@users.noreply.github.com>
Co-authored-by: Giz <vinylspiders@gmail.com>
2023-07-16 00:41:18 -04:00
SkyratBot
0a03e8a2a7 [MIRROR] Machine list is now stored in SSmachines | Remove excessive use of global lists for specific machine types [MDB IGNORE] (#22481)
* Machine list is now stored in SSmachines | Remove excessive use of global lists for specific machine types

* Resolve merge conflicts

* Modular adjustments

* destroy this double return on destroy

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Giz <vinylspiders@gmail.com>
2023-07-15 22:51:23 -04:00
SkyratBot
e264ee3644 [MIRROR] Adds an extra malf AI ability: Remote emagging. Also tidies up emag code and coverts a lot of things to balloon alerts [MDB IGNORE] (#22469)
* Adds an extra malf AI ability: Remote emagging. Also tidies up emag code and coverts a lot of things to balloon alerts

* Update communications.dm

* Modular override

* Some modular adjustments, removes 'emagged' vars in favor of obj_flags

* whoops, mobs don't have obj_flags.

---------

Co-authored-by: nikothedude <59709059+nikothedude@users.noreply.github.com>
Co-authored-by: Giz <vinylspiders@gmail.com>
2023-07-15 16:46:17 -04:00
SkyratBot
3079143be5 [MIRROR] Tablet apps are now deleted when necessary & removes console preset. [MDB IGNORE] (#21942)
* Tablet apps are now deleted when necessary & removes console preset. (#75863)

## About The Pull Request

Apps now properly delete themselves when removed, so they don't exist in
nullspace anymore.
Chat client now actually updates the uid, because its New() didn't call
parent.
Deletes the 'console' subtype of modular computer
Updates how downloading and transferring files are handled
Fixes being able to infinitely upload apps to a disk

## Why It's Good For The Game

Fixes some more bugs I found with apps and prevents spamming apps in a
disk.

## Changelog

🆑
fix: Maintenance data disks now properly transfer from PC to disk
fix: Disks can no longer be flooded with the same app repeatedly.
/🆑

* Tablet apps are now deleted when necessary & removes console preset.

* updatepaths

* feex

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Jolly-66 <70232195+Jolly-66@users.noreply.github.com>
2023-06-20 14:36:09 +00:00
SkyratBot
c50e7c03b6 [MIRROR] Fixes issues with closing apps on tablets [MDB IGNORE] (#20969)
* 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.
/🆑

* Fixes issues with closing apps on tablets

* Update tablet.dm

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2023-05-08 23:02:51 +01:00
SkyratBot
64be8f7adf [MIRROR] Removes ID computer parts (Removes computer hardware) [MDB IGNORE] (#17612)
* Removes ID computer parts (Removes computer hardware)

* Removes missed file

* oop

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-11-21 17:46:25 -05:00
SkyratBot
5afc46835b [MIRROR] Removes tablet cell parts [MDB IGNORE] (#17498)
* Removes tablet cell parts (#71078)

## About The Pull Request

Removes cell parts and cell part cells, now tablets directly stole a
power cell in them, and uses regular stock cells like every other
machine in the game. This also makes it less confusing because people
are more used to stock cells over computer cells. Because cells
generally hold more power than computer ones, I bumped up the active
power usage from 50 to 75.

## Why It's Good For The Game

We are nearly finished removing all parts, holy cr*p

## Changelog

🆑
balance: Tablets now use regular cells instead of computer cells.
balance: Tablets no longer need a power cell component to hold power
cells.
/🆑

* Removes tablet cell parts

* Feex

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-11-16 08:14:17 -08:00
SkyratBot
36457f1a45 [MIRROR] Fixes & Improves ntnrc client & ntnet conversations [MDB IGNORE] (#17224)
* Fixes & Improves ntnrc client & ntnet conversations (#70854)

Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>

* Fixes & Improves ntnrc client & ntnet conversations

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
2022-10-29 07:16:29 -07:00
SkyratBot
097e913e4b [MIRROR] Removes tablet hard drives entirely (HDD & SSD) [MDB IGNORE] (#17164)
* Removes tablet hard drives entirely (HDD & SSD)

* map updates

* changes

* contractor uplink theme

* uplink improvements

* tab

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-10-26 14:09:16 -04:00
SkyratBot
9854cd8eeb [MIRROR] Fixes some inconsistencies with computers [MDB IGNORE] (#17084)
* Fixes some inconsistencies with computers (#70679)

* Modular computers now have their initial name if they don't have an idenfitication and job, which previously meant they would have the name ()
* Removes MACHINE modular computer's process, because all it did was update the name, then call computer's process. Now it just does what every computer does, BUT UpdateDisplay on ITEM modular computers will now update the machine's name.
* Additionally, I moved the modular computer processor's New to an Initialize, and removed the shutdown_computer code, because we already register update_icon signal to update the computer's appearance, why do we need to do it twice?

* Fixes some inconsistencies with computers

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2022-10-22 01:51:01 +01:00
SkyratBot
58752b0969 [MIRROR] Removes a ton of unused tablet vars, re-organizes the rest [MDB IGNORE] (#17014)
* Removes a ton of unused tablet vars, re-organizes the rest (#70344)

* Removes a ton of unused vars, re-organizes the rest

Removes a ton of unused vars from Modular computers
Re-organizes the rest, and adds autodoc comments to most of them
Moved 2 vars (saved_image and invisible) from the tablet to the messenger app, since that's where it was used. I didn't see the point of having these vars be on every computer anyways, only PDAs have the app.
Renames Clown's honk virus var
Makes Messenger app's saved image, actually used.

* static list and NODECONSTRUCT_1 check

* oops

* Removes a ton of unused tablet vars, re-organizes the rest

* cryopod

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-10-20 02:28:27 -04:00
SkyratBot
d89adf597a [MIRROR] Modular computer fixes [MDB IGNORE] (#16966)
* Modular computer fixes (#70606)

* Moves a lot of modular computer attackbys to the cpu instead, which is what handles it all. This allows their parts to be removed and the console deconstructed/repaired once again.

* Modular computer fixes

Co-authored-by: GoblinBackwards <22856555+GoblinBackwards@users.noreply.github.com>
2022-10-19 00:31:36 +00:00
SkyratBot
0339798a42 [MIRROR] Removes network cards and printers from tablets [MDB IGNORE] (#16451)
* Removes network cards and printers from tablets

* merge tablet_presets

* printer.dm should have been deleted, missed change

* update contractor tablet

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-09-27 23:16:32 -04:00
SkyratBot
d0b706c041 [MIRROR] Removes AI and Charge parts from tablets, adds support for more later. [MDB IGNORE] (#16381)
* Removes AI and Charge parts from tablets, adds support for more later.

* merge conflict

* remove modular tablet loadout item

* fix SR maps referencing tablets, add clear PDA instead of modular tablet loadout

* remove pda loadout item

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: tastyfish <crazychris32@gmail.com>
2022-09-27 17:52:24 -04:00
SkyratBot
9e9b8584d6 [MIRROR] Removes CPU, Sensors and Identify ModPC parts. [MDB IGNORE] (#13594)
* Removes CPU, Sensors and Identify ModPC parts.

* Update computer_part_designs.dm

* Update tablet.dm

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
2022-05-15 19:43:02 -07:00
SkyratBot
729132a4e0 [MIRROR] Rebalanced Power consumption, increase for machines [MDB IGNORE] (#12930)
* Rebalanced Power consumption, increase for machines

* wew

Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-04-20 17:07:14 +01:00
SkyratBot
6f1ab2f231 [MIRROR] Ordnance Content Update: Scientific Papers [MDB IGNORE] (#11862)
* Ordnance Content Update: Scientific Papers

* Feex

* Updated our modular maps to not be missing equipment

* I also forgot to fix that in another PR, I'm too lazy to open a new one to fix it

* Yikes

* I forgot Journey

Co-authored-by: vincentiusvin <54709710+vincentiusvin@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
2022-03-07 17:59:39 -05:00
SkyratBot
c23bd1cb8c [MIRROR] every case of initialize that should have mapload, does (#8374)
* every case of initialize that should have mapload, does

* E

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-09-24 23:07:53 +01:00
SkyratBot
eae7233c5b [MIRROR] small refactor to can_interact() so that borg range is fully respected (#7891)
* small refactor to can_interact() so that borg range is fully respected (#60693)

Its a relatively small refactor that changes the previous machinery "can_interact()" proc that literally did a full override despite half of their checks already existing in not one, but TWO parent procs, so i removed the redundant checks, added callbacks to its parents and then added the cyborg range check on the can_interact_with() itself. in doing so i also moved the interaction range var from silicons only, to mobs as a whole and defaulted it to a single tile, silicons override it to 7 (so pAIs and borgs like before) but then set AI and AI.eye to "null", because i have a check in can_interact that if there is no range set, then the range is effectively unlimited. and i even added code for when AI is carded and their wireless transmission is disabled it sets their range to "0" aka, it has no range to do anything even if it could

this was really complicated for me so despite my extensive testing it probably would be a bad thing if any of you want to test my code yourself to ensure there isnt a bug with this (theres no runtimes ive come across)

note: i did a lot of searching and going through machinery to ensure i caught all the little snowflake overrides and added can_interact() checks to them, but i may have missed one or two things, especially maybe a altclick or ctrlclick somewhere, however i believe i caught most of them

one nice side effect of this refactor is that you can actually set another mobs range to something other than 1 tile and they can interact at range, rather than only silicons getting this ability, an admin could VV a human to have a 3 tile arm reach as a meme if they want

* small refactor to can_interact() so that borg range is fully respected

Co-authored-by: 小月猫 <alina.r.starkova@gmail.com>
2021-08-31 20:26:36 +01:00
SkyratBot
db3a796876 [MIRROR] Sets RD consoles to have two ID card slots (#6562)
* Sets RD consoles to have two ID card slots (#59830)

* Sets RD consoles to have two ID card slots

Co-authored-by: zxaber <37497534+zxaber@users.noreply.github.com>
2021-06-28 14:16:05 +01:00
SkyratBot
7d1d0e1fad [MIRROR] Refactors most spans into span procs (#6315)
* Refactors most spans into span procs

* AA

* a

* AAAAAAAAAAAAAAAAAAAAAA

* Update species.dm

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-06-16 00:24:49 +01:00
SkyratBot
6f3b151bb8 [MIRROR] Fixes a bunch of harddels that are sourced from player action (#6252)
* Fixes a bunch of harddels that are sourced from player action

* Mirror!

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: Funce <funce.973@gmail.com>
2021-06-11 03:13:33 +01:00
SkyratBot
fbb78302cf [MIRROR] Makes obj_integrity private and only updated through procs (#6125)
* Makes obj_integrity only updated through procs (#59474)

Having things updating integrity directly is just going to cause more problems down the line as more elements and components depend on being notified of integrity changes. It's an easy mistake to make so making it private should deal with the problem.

get_integrity() might be useful in the future but is mainly a side effect of making obj_integrity private as that also disallows reads.

* Makes obj_integrity private and only updated through procs

* Mirror!

Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>
Co-authored-by: Funce <funce.973@gmail.com>
2021-06-05 16:35:09 +12:00
SkyratBot
ed876c661c [MIRROR] Gives curators a console for printing portraits not in the round onto canvases (#5810)
* Gives curators a console for printing portraits not in the round onto canvases (#59146)

* Gives curators a console for printing portraits not in the round onto canvases

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
2021-05-20 22:34:14 +01:00
SkyratBot
1ca81d9b86 [MIRROR] adds #cargobus and gauntlets (also modernizes ntchat) (#5458)
* adds #cargobus and gauntlets (also modernizes ntchat)

* Update quartermaster.dm

* Update DeltaStation2_skyrat.dmm

* mirrors changes

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
Co-authored-by: KathrinBailey <53862927+KathrinBailey@users.noreply.github.com>
Co-authored-by: KathrinBailey <evesovereign@hotmail.co.uk>
2021-05-08 14:25:24 +01:00
SkyratBot
9ffdf58259 [MIRROR] Some explosions code cleanup (#4276)
* Some explosions code cleanup (#57493)

Clears out two deprecated explosions systems (explosion ids and explosion levels)
Refactors a bunch of contents_explosions procs to be maybe slightly faster.
Cleans up a bunch of ex_act code.
Slightly cleaner code
A few less unused vars on /atom and /turf

* Some explosions code cleanup

Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
2021-03-21 01:03:36 +00:00
SkyratBot
5a0b30616c [MIRROR] Miscellaneous appearance fixes. (#3771)
* Miscellaneous appearance fixes. (#57133)

* Fixes modular computer runtimes

- Adds a proc to eat the source arg of the update icon signal.

* Fixes a couple things not passing the right args

- Fixes the alien leap hallucination passing a string as the first arg to updat_icon
- Fixes the roulette machine passing the payout as the first arg to update_icon.

* Miscellaneous appearance fixes.

Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
2021-03-03 01:59:21 +00:00
SkyratBot
18eca27569 [MIRROR] update_appearance (#3508)
* update_appearance

* a

* a

Co-authored-by: TemporalOroboros <TemporalOroboros@gmail.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
2021-02-19 16:08:09 +00:00
SkyratBot
b332b46b65 [MIRROR] Remove hideous inline tab indentation, and bans it in contributing guidelines (#3394)
* Remove hideous inline tab indentation, and bans it in contributing guidelines

* a

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
2021-02-15 15:32:02 +00:00
SkyratBot
aa22eaee89 Replaced all id consoles with modular ones (#3212)
Co-authored-by: Fhaxaris <Chrisamcculler@gmail.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
2021-02-08 23:55:36 +00:00
SkyratBot
e890b1282b [MIRROR] Replaces intents with combat mode (#3063)
* Replaces intents with combat mode

* updates

* a

* Update living_defense.dm

* https://github.com/tgstation/tgstation/pull/56638/files

* gunsafety!

Co-authored-by: Qustinnus <Floydje123@hotmail.com>
Co-authored-by: Gandalf2k15 <jzo123@hotmail.com>
2021-02-05 16:58:16 +01:00
SkyratBot
3190f290ae [MIRROR] Modular computers can now be attacked (#2259)
* Allow modular computers to be attacked (#55629)

You will now attack modular computers if you are not in help intent, rather than opening up their menu.
Why It's Good For The Game

i died here as nightmare because i couldnt attack the computer

* Modular computers can now be attacked

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-12-21 19:55:44 +00:00
SkyratBot
b8d9874c27 [MIRROR] Converts all A && A.B into A?.B (#1292)
* Converts A && A.B into A?.B (#54342)

Implements the ?. operator, replacing code like A && A.B with A?.B

BYOND Ref:
When reading A?.B, it's equivalent to A && A.B except that A is only evaluated once, even if it's a complex expression like a proc call.

* Converts all A && A.B into A?.B

Co-authored-by: ZeWaka <zewakagamer@gmail.com>
2020-10-13 23:19:25 +02:00
SkyratBot
fd11d35489 [MIRROR] Adds borg tablets, and RoboTact as a borg self-management app (#959)
* tgui: Borg tablets and RoboTact as a borg self-management app (#53373)

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* take one

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* part 2

* Automatic changelog compile [ci skip]

* part 3

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* part three I think

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* who even knows what step I'm on anymore

* and another one

* Automatic changelog compile [ci skip]

* PR time

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Automatic changelog compile [ci skip]

* Forward Progress

* Automatic changelog compile [ci skip]

* Merge remote-tracking branch 'upstream/master' into SiliScreen

* more foward progress

* RoboTact

* bad tab

* Improvements all around

Plus some changes to vis_overlay to allow for color

* Lights and things

* borg network card

borg tablets lose networking when borg is locked or has no power

* hud changes

not done yet, but getting close

* better modPC screen button

* updoot

* more useful colors

* linter

* Do I finally get a green ✓

* better law sync catching

* hate linters

Co-authored-by: Changelogs <action@ github.com>

* Adds borg tablets, and RoboTact as a borg self-management app

Co-authored-by: zxaber <37497534+zxaber@users.noreply.github.com>
Co-authored-by: Changelogs <action@ github.com>
2020-09-24 20:29:31 +02:00
SkyratBot
1e705faa19 [MIRROR] Process procs now properly utilize deltatime when implementing rates, timers and probabilities (#709)
* 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

* Process procs now properly utilize deltatime when implementing rates, timers and probabilities

Co-authored-by: Donkie <daniel.cf.hultgren@gmail.com>
2020-09-09 08:19:23 +02:00
SkyratBot
63a0ca874c [MIRROR] Refactors machine_stat and is_processing() to process on demand (#515)
* Refactors machine_stat and is_processing() to process on demand (#53150)

* Refactors machine_stat and is_processing() to process on demand

* Fixes master (#53193)

* fixes master, damn it me/mothblocks

* fuck again

* ANOTHER ONE

* Fixes master

Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2020-08-26 01:21:26 +02:00