Commit Graph

3727 Commits

Author SHA1 Message Date
Mothblocks
bfc2916779 Avoid wasted work creating body parts that are just going to be destroyed [0.3s of init] (#71916)
Current process:
- Human created
- Body parts created for basic human
- Species set
- Body parts torn down, recreated

New process:
- Human created
- Species set
- Body parts created then and there

I think the same is being done to organs, can be adjusted.

Set species was also being invoked asynchronously, but it's not clear
why, and SHOULD_NOT_SLEEP indicates nothing sleeps, so alas. This isn't
done for init, just for consistency.

Reorders init a little to accomodate the body parts not necessarily
being there, huds now need to safety check.

Saves about 0.3s of init. Closes
https://github.com/tgstation/dev-cycles-initiative/issues/18
2022-12-12 23:19:13 -08:00
Mothblocks
beb8111b2a Defer admin profiling access until the admin logs in - Saves 69ms (#71680)
Just some unnecessary costs. We create `/datum/admins` for every admin
in the txt and database. It might sound silly, but it ends up being
useful for things like the permissions panel. Anyway, admins are usually
given profiling access, but the SetConfig call is extremely slow. So
slow that we have it config'd off on Campbell, AFAIK. This defers that
cost to when an admin joins.

This could in theory cause issues with latejoining admins getting debug perms, but it appears to work in testing. noting for far future
2022-12-12 22:05:33 -08:00
Time-Green
ddf453a170 Removes ++ and -- in conditionals (#71925) 2022-12-12 11:02:57 -08:00
tattle
9b1be9ef13 Investigate logs include ckey of source (if applicable) (#71833)
## About The Pull Request
All investigate logs start with [src], which can be any atom. So
sometimes names and items get printed twice. Adds ckeys to the
investigate_logs of living mobs.


![image](https://user-images.githubusercontent.com/66640614/206372340-3c50bc9d-b662-4a4d-b1ec-91c0b4db8a39.png)


## Why It's Good For The Game
Better logging, includes the ckey for living mobs in investigate logs,
and fixes some investigate_death logs that weren't properly attributed
to mobs.

## Changelog

🆑 Tattle
admin: investigate logs include ckey of source (if applicable)
/🆑

Co-authored-by: tattle <article.disaster@gmail.com>
2022-12-11 12:52:50 +13:00
tralezab
8ac384f35b Converts ForceEvent.js to typescript and overhauls the UI to be good (#71750)
## About The Pull Request


![image](https://user-images.githubusercontent.com/40974010/205735472-e6ea0f7e-ffcc-4339-b2c6-7cc43c65c575.png)

## Why It's Good For The Game

The old UI annoyed me enough to improve it

## Changelog
🆑
refactor: Refactored and overhauled the ForceEvent UI
/🆑
2022-12-09 21:34:47 +00:00
tattle
e928449067 3/4ths-ify some wall mount sprites (by Kryson and Viro) (#71788)
posters are now 24px tall, new sprites for nanomeds, emergency safes, and ticket machines
(by Kryson)
2022-12-09 18:02:16 -03:00
GoldenAlpharex
d62c2ca5ee Fixes fake links in Adminwho that led to "no_feedback_link" (#71804)
## About The Pull Request
Basically, sometimes, very rarely, it was possible for this to happen,
when it shouldn't be happening. I was wondering for a little while what
it was about, and then I finally downloaded my chat logs for a round and
realized what was going on. It should no longer happen.

## Why It's Good For The Game
Clickable links that lead nowhere (and thus don't do anything) aren't
very good for the game.

## Changelog

🆑 GoldenAlpharex
fix: There shouldn't be clickable names in Adminwho that don't do
anything anymore.
/🆑
2022-12-09 09:46:42 -08:00
san7890
d948cf944e Patches Admin_Teleport Location Logging Error (#71770)
## About The Pull Request
Hey there,


![image](https://user-images.githubusercontent.com/34697715/205855401-345d811c-b9be-48db-927c-10ef6b80f6b7.png)

This admin didn't actually send that player to the secret nullspace
room, they sent them to somewhere stationside. This is because the
logging in admin_teleport only reads the location of the current
mob/atom's location, not the actual location of where they are going to.
Silly error, but I've fixed it now.
## Why It's Good For The Game


![image](https://user-images.githubusercontent.com/34697715/205855414-75c562e3-919b-412c-8792-fa4031941939.png)

Logs being _correct_ is quite important, I feel.
## Changelog
🆑
admin: Whenever you teleport an atom/mob using the Get function found in
many admin utilities, rest assured that it will actually log the
destination location of where you are teleporting that thing to- rather
than the location they were pre-teleportation.
/🆑
2022-12-07 14:53:29 -08:00
Mothblocks
e2ad4f2b9d Change "End Round Normally" -> "Undelay Round End" (#71681)
## About The Pull Request

This is right under a button that says "End Round Now" so I was scared
as piss to click on it in a live server to undelay round end

## Changelog
🆑
admin: Renamed "End Round Normally" in Check Antagonists to "Undelay
Round End"
/🆑
2022-12-04 13:25:33 -08:00
Rhials
e10ff7d8f4 Admins can now add footnotes to the roundstart command report (#71647)
## About The Pull Request

Admins now have a verb to add footnotes to the roundstart threat report.
These messages can be signed, and multiple can be submitted at once.


![image](https://user-images.githubusercontent.com/28870487/205114744-32056a6d-3528-48b3-8365-14594cfc8d71.png)

(If no footnotes are submitted, the report does not display the
"additional notes" section)

This ALSO adds a verb to delay the roundstart threat report
indefinitely, to give some extra time. If you turn it off, be sure to
toggle it back on when you're done!

## Why It's Good For The Game

Gives admins a way to set the tone for a shift, give IC advisory on
stuff, bully the command players, or just add some flavor to the report.

We already give these chuckleheads enough platforms to shitpost from.
What's one more?
## Changelog
🆑
admin: new admin verb -- Command Report Footnote. Lets you attach a
signed message to the roundstart command report.
admin: new admin verb -- Delay Command Report. Lets you delay the
roundstart command report indefinitely.
/🆑
2022-12-03 12:44:06 -08:00
Mothblocks
2e6b06353d Atmospheric machineries now interact with each other directly, rather than going through a radio layer -- saves about 0.4s of init time (#71232)
More than a decade ago, these were all coded to use a weird dynamic list
radio broadcasting system to communicate with each other. If there was
any depth that they were planning on creating with this, it didn't come
to fruition, and it instead just wasted a lot of init time.

Removing `post_signal` saves 198.41ms, fired 588 times from lots of
different machinery. Its self cost was 81.44ms.

`broadcast_status`, also removed, was taking 218ms.

I'm pretty sure I'm done with this, but it's hard to tell given the
nature of old radio signal code.

A small self cost of 34.9ms was added in the form of /obj/Initialize
checking id_tag to set in a global list. This could be optimized away by
tagging everything that does use id_tag, but it's a loooot and I think
this is just a useful mechanism to have. Not worth it IMO.

The "Check Atmos Chamber Devices" verb has been removed. Everything it
did *should* be replicated by runtimes on Initialize, which is both more
obvious to mappers and shows up in unit tests since we spawn every ruin.
2022-12-02 01:28:24 -08:00
John Willard
2425531eb2 Removes tablets (not PDAs) entirely. (#71507)
## About The Pull Request

**Comes with an UpdatePaths!**

Removes the tablet subtype, PDAs now replaces them entirely.

Nukie and Silicon tablets are now subtypes of the PDA instead, while
contractor ones were removed entirely as they didn't do anything and
were unused (though it wouldn't be hard to re-add).

Nukie PDAs are now the only type of PDA that uses modular_tablets.dmi,
which is just larger icons of modular_pda. Each application requires an
icon state in both of these, for 2 different sizes, which makes it
annoying to make new applications, especially if it can also run on
computers/laptops.

### Icons

Because Silicon tablets are now a subtype of PDA, they use PDA icons
instead of tablet ones. Luckily for us, they already exist in code.

![image](https://user-images.githubusercontent.com/53777086/203876575-56eb1593-774c-47c6-8e7d-491a7805f28c.png)

AI's don't use a tablet icon though, so they aren't affected.

## Why It's Good For The Game

There's very little difference between tablets and PDAs, PDAs overshadow
them in every single way, so at this point I don't see why we should
have both of these, and if you compare the two in usefulness and actual
in-game use by players, it's a no-brainer than the item all players get
roundstart and comes with a messenger should be the one we go with.

Also as said in the about section, when making an app you would need to
make icon states for the program running for all hardware it can run on,
which is Computer, Laptop, PDA, and Tablet.

Laptop is just a smaller computer icon
PDA is just a smaller tablet icon

However, you can't simply shrink the size of the icon, instead you have
to completely resprite the same app icon FOUR TIMES for it to not
bluescreen on all these different devices.

<details>
<summary>
Here's examples of it
</summary>
Computer (NOTE: *They share the same icon file as regular computers*)
<img
src="https://user-images.githubusercontent.com/53777086/203876801-486a8054-489a-4983-bdad-a2599b4dc379.png"/>
Laptop
<img
src="https://user-images.githubusercontent.com/53777086/203876333-58e5d135-f4c6-4a02-8948-1df771e294a4.png"/>
Tablet
<img
src="https://user-images.githubusercontent.com/53777086/203876352-816c7fb1-c681-40b9-99e0-052f49632c7f.png"/>
PDA
<img
src="https://user-images.githubusercontent.com/53777086/203876358-1cf7253d-3c6a-456a-8133-ebf7f0351637.png"/>
</details>

If we wish to help in simplifying this, we should remove tablet icons
entirely, which means 1 less icon to worry about. To do this, we'd need
to resprite nukie PDAs, however I am very much not a spriter and never
tried GAGS, so I'll leave it to someone else to do.

## Changelog

🆑
del: Tablets are now removed, PDAs are now the base 'tablet'. Silicon
and nukie tablets are now PDAs.
/🆑
2022-12-02 00:15:14 -08:00
TiviPlus
8dda6c96d5 Fixes a transofrm animation todo (#71496)
makes it pass appearance

Co-authored-by: TiviPlus <572233640+TiviPlus@users.noreply.com>
2022-11-25 11:27:15 -08:00
Kyle Spier-Swenson
eac6f2d07d Fixup list helpers, remove listoflist footgun from generic list procs, remove duplicated procs. (#71280)
Add helper defines for handling list values in lists to remove the
footgun where `+=` and `-=` with lists as the Right hand side argument
causes the list contents to be added or removed, not the list itself.

Use said helpers to remove the footgun from list helpers that could
reasonably be expected to get called on list of lists.

Remove duplicated clear nulls from list proc. this pr will fail to
compile until i go move those over to the preexisting one, but the
compile errors will tell me where all the consumers are.

This likely fixes some bug(s) in the issue tracker, but we don't know
what they are.
2022-11-25 00:51:03 -08:00
AnturK
84f69359a0 More horrible 515 proc compatibility. (#71333)
So i left over some basic `/whatever/proc/format` uses in the original
PR this fixes it.

Notable exceptions to the rule:
- Paths in add_verb/remove_verb, we need full path instead of a name
there to access verb metadata so we can't use proc ref macros there.
- regex.Replace, found out that it does not accept call by name. Instead
i added new REGEX_REPLACE_HANDLER so we can at least try to mark these.

There's still leftover global procs that do not use GLOBAL_PROC_REF but
they functionally equivalent so that's for later.

I don't see any reasonable way to grep for this. But if you got any
ideas please share.
2022-11-22 07:55:43 +00:00
Zonespace
021e56f8ff Adds the ability for ERTs to use a custom shuttle (#71348)
## About The Pull Request
ERTs can now have a custom shuttle template defined on their type,
which, should the "use custom shuttle" toggle be enabled while creating
the ERT, will spawn them in deep space on the given shuttle instead of
at Centcom.

Applies the new system to the bounty hunter ERT

## Why It's Good For The Game
Not all ERTs are NT enough to start at Centcom all the time, and it
gives more control over ERTs

## Changelog
🆑
admin: ERTs can now have a custom shuttle that they can spawn on, on a
toggle while creating said ERT.
/🆑
2022-11-21 22:58:08 -08:00
ShizCalev
9dab26371c Throws a bunch of parenthesis around to ensure dear Aunt Sally is always properly excused. (#71281)
Similar vein to #37116

This is supposed to be standard, yet here we are.

SHOULDN'T change anything, but there's likely something out there that's
bound to behave different because of it.


These were done manually, regex to find things that MIGHT need to be
corrected;
`^#define.+\+((?!\)).)*$`
`^#define.+-((?!\)).)*$`
`^#define.+\*((?!\)).)*$`
`^#define.+\/((?!\)).)*$` (yeah that's a lot of stuff.)
`^#define.+%((?!\)).)*$`
`^#define.+SECONDS((?!\)).)*$`
`^#define.+MINUTES((?!\)).)*$`
2022-11-21 20:53:06 -08:00
san7890
6157b09ab9 Improves Readability/Documentation of SSTicker.force_ending (#71329)
## About The Pull Request

Hey there,

force_ending was a boolean (with inconsistent usage, flip-flopping
between using TRUE/FALSE and 1/0 variables), so let's just change it all
over to the macros and call it a good day.

I also updated documentation of the variables in that "code block" in
SSTicker while in the area because changing just one line made it look
ugly. Some of the documentation was no longer current to it's... current
use in code, so I updated those as well.
## Why It's Good For The Game

Pure code improvement, DMdocs are swell, and readability is kino.
## Changelog
Nothing here should affect players.
2022-11-21 13:23:47 -08:00
Yaroslav Nurkov
ec1115efff Add a few networks to fax, which send papers to request manager, and staff can answer on them from fax panel. (#71129)
## About The Pull Request

This PR adds the ability to send faxes to a central command or
syndicate, which will be delivered to the admins in request format. And
also, a fax panel for admins has been added, which will allow them to
conveniently send a fax already back (including stamps)

![image](https://user-images.githubusercontent.com/78199449/200159547-4e5f1759-2879-459c-b84f-e6dedd5f1ccb.png)

![image](https://user-images.githubusercontent.com/78199449/200159551-951e235f-e2ac-4f92-a96f-72cba643e634.png)

![image](https://user-images.githubusercontent.com/78199449/200159552-57f3dcf6-5875-4b11-af58-22c0b0fb4ae2.png)

![image](https://user-images.githubusercontent.com/78199449/200159553-57fbf90c-f141-4c12-8879-81a842afe30f.png)


## Why It's Good For The Game

More bureacracy gaming.

## Changelog

🆑 Vishenka0704
add: A way to send faxes to CentCom/Syndicate
admin: New fax panel(with stamps!!!)
/🆑

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-21 07:44:29 +00:00
Profakos
bf582cb833 Trophy case update (#71015)
## About The Pull Request

I have been chipping away/procrastinating at this since May, but after
several years, I have finally updated how Trophy Cases work.

So, what this PR does is the following:

- Standardized everything in persistence.dm to use snake case, and added
basic autodocs
- Automatically moves trophies from data/npc_saves/TrophyItems.json to
data/trophy_items.json. Removed legacy .sav conversion by request, it
has been a long time.
- Trophy cases are opened and loaded the same way you would open a
regular ID locked display case (used curator access, relevant access
autodoc has been updated)
- Instead of cheap plastic replicas that turn to dust anyways, trophy
cases use holograms, which can be dispelled by hand
- Trophy data gets saved if an item stays in the trophy case when the
shuttle arrives to centcom, and the item has a description set. This is
in line with paintings, which has to still hang on the wall at round
end.
- You can edit the description of new trophies by using the librarian's
key to unlock History Mode
- When you click on a closed trophy case, it will open a tgui, and will
not display the case description. It will still do for open cases.
Vendatrays have been updated to do the same.
- The UI's icon uses icon2base64(getFlatIcon(showpiece, no_anim=TRUE)).
Vendatrays have been updated similarly, so items with directions and
animations are displayed properly. The base64 strings are updated in
update_static_data.
- Fixes vendatrays from displaying some characters in strange ways, such
as displaying /improper.
- Renames some one letter, or nonindicate argument and var names in
trophy case code
- Adds a trophy management admin panel, where admins can finally delete
all the curator ID cards swallowed over the years. Or, they can replace
the paths with funny new paths.
- If an entry has an incorrect, no longer existing path, it will be
marked red in the management panel
- Adds MAX_PLAQUE_LEN define, which 144 characters
- Removes start_showpieces from trophy cases, as it was completely
unused. The start_showpiece_type var is still around.
- Moves trophy_message var to trophy cases. Only a dice collector
display case used them in the Snowdin map.

What this PR does not do

- Sadly, it still only saves the base image of an item, and no layers or
altered image states. This has to come in the future.

<details>
<summary>Click here to see various states of the trophy tgUI</summary>
 

![kép](https://user-images.githubusercontent.com/2676196/199545412-e5b7e7a8-59fb-41e6-aca5-6b07ba33501c.png)
Locked history mode, existing item.


![kép](https://user-images.githubusercontent.com/2676196/199545574-9e705603-9b7a-457d-9575-2d4145ad940d.png)
Unlocked history mode, but holographic trophy is present.


![kép](https://user-images.githubusercontent.com/2676196/199545883-45c3916b-011f-462a-8296-6eb13db32158.png)
Locked history mode, no item.


![kép](https://user-images.githubusercontent.com/2676196/199545967-a33e2501-aa5f-473b-b79f-ebd950df2afc.png)
Unlocked history mode, no item.


![kép](https://user-images.githubusercontent.com/2676196/199546100-718bd639-3199-4df7-ad77-ed3dbf27b290.png)
Unlocked history mode, item placed, default text. (Note: this picture is
out of date. The typo has been fixed, and "record a message" is now
"record a description" for consistency)
 

![kép](https://user-images.githubusercontent.com/2676196/199546202-5ebbbd28-907c-4f2d-b7cd-29d2ef21c7f3.png)
Unlocked history mode, item placed, new text.

</details>

<details>
<summary>Click here to see the admin panel</summary>


![kép](https://user-images.githubusercontent.com/2676196/199553349-8684f23f-4699-42f2-a27e-15cccad29d0b.png)


</details>

## Why It's Good For The Game

Less curator ID's stuck in the Trophy Cases, and the existing ones can
be cleaned up. A more immersive Trophy Case user experience, in general.

## Changelog


🆑
refactor: refactored trophy cases, to be more user friendly
admin: created a trophy managment admin panel
/🆑
2022-11-20 23:18:30 -08:00
John Willard
b8d86849c8 Removes ID computer parts (Removes computer hardware) (#71320)
## About The Pull Request

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

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


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

## Why It's Good For The Game

Computer hardware is finally dead 🦀 

## Changelog

🆑
balance: All modular computers now only have one ID slot, and cannot be
upgraded.
qol: The HoP's access application now only has one app, logging in will
directly modify the ID that's in it, making it less confusing to swap
back and forth.
/🆑
2022-11-20 23:04:45 -08:00
TiviPlus
b6ecf882ce Particle editor (#71110)
## About The Pull Request
Demo: https://streamable.com/wnj3mf

Features:
- Full support for most gradients/vectors/numbers/generators/transforms
( I might have forgotten some of the more esoteric ones)
- A "tutorial" section that explains the different rand/generation types
and how physics works with pictures
- Button for viewing what each var does
- Selecting a particle type to set immediately
- The generator types use defines now

Not included:
Color matrix support for color generators (I'm sorry but hell no)

Special thanks to @jlsnow301 for explaining js things to me

## Why It's Good For The Game

Making cool stuf

## Changelog
🆑
refactor: Added a particle editor to VV dropdown which can be used by
coders and admins to edit particle values on the fly easily.
/🆑

Co-authored-by: TiviPlus <572233640+TiviPlus@users.noreply.com>
2022-11-19 14:27:10 -08:00
Riggle
5086f9aad9 Imaginary friend refactor (#71058)
## About The Pull Request

This makes imaginary friends less janky. It adds many QoL features like
runechat and typing indicators, fixes jankyness that results from a
runtime. You can now even emote and whisper as an imaginary friend which
adds countless RP possibilities that weren't available before.


![image](https://user-images.githubusercontent.com/27156122/199902939-c3d98955-7a1d-4752-86d2-710f38b077a2.png)

![image](https://user-images.githubusercontent.com/27156122/199902999-c88ffb5f-fed0-4cdf-a202-f221a5cb836e.png)

![image](https://user-images.githubusercontent.com/27156122/199903282-50146014-bf09-4e6b-98d2-aa8ebc94b5e3.png)

![image](https://user-images.githubusercontent.com/27156122/199903417-105cf372-a69b-4d49-bfa6-47390a0e64cf.png)

![image](https://user-images.githubusercontent.com/27156122/199936352-c614ee9e-8084-4c27-b817-779aeff427ce.png)

![image](https://user-images.githubusercontent.com/27156122/199936394-063e1431-59ff-4f5c-9b0f-47c342797cfe.png)

![image](https://user-images.githubusercontent.com/27156122/199936483-1941c349-91c1-4754-8827-7f9b9f5bb967.png)

## Why It's Good For The Game

It makes an old feature better.

## Changelog

🆑 Riggle
qol: Imaginary friends now have runechat, typing indicators and emotes!
qol: Imaginary friends can point and spin
fix: Fixed a bug with imaginary friends where ghosts would stay after
aghosting
refactor: Imaginary friend code massively improved
refactor: Imaginary friends now support multiple friends at the same
time!
admin: Imaginary friends no longer bypass filters
/🆑
2022-11-19 14:20:51 -08:00
twilightwanderer
dea4600193 Adding the ability to load the configuration of custom maps. (#71277)
## About The Pull Request

By default, all custom maps are assigned one standard configuration.
This option rather limits the possibilities for creating custom levels.
For example, you can not use multilevel maps, because with this
configuration will always be loaded only one level. With this PR I want
to provide the ability to load a configuration file for a custom map
similar to the standard map.json configs.

![ZpdpfZWq2V](https://user-images.githubusercontent.com/88540658/201946344-fdf8589c-0e20-475c-a9d8-b21c9ff32dd8.png)

## Why It's Good For The Game

Allows administrators to flexibly configure custom maps. For example for
events, etc.

## Changelog
🆑
admin: Adding the ability to load the configuration of custom maps
/🆑

Co-authored-by: twilightwanderer <twilightwanderer@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
2022-11-18 17:27:58 +01:00
MrMelbert
79ffefa06d Allows Fully Heal to be passed a series of flags, fixes Adminordrazine being horrible (#71123)
## About The Pull Request

- Fully heal can be passed a series of flags detailing what all is
healed by the proc. This allows for things to provide
almost-but-not-quite fully heals.
- Uses this in Adminordrazine, so that it stops being a pain to update
every time fully heal is updated.

This includes some small balance changes which i'll go over, nothing
extremely noticable.

## Why It's Good For The Game

Allows for more precise control over full heals. 

## Changelog

🆑 Melbert
refactor: Fully heal can be passed a series of flags. As a result, some
things which previously did a full heal might heal slightly less, or
some things which did partial full heals might do slightly more.
fix: Adminordrazine will no longer completely break every facet of a
person
admin: Ahealing a changeling will refill all of their chems.
/🆑
2022-11-17 10:09:00 -08:00
texan-down-under
3f56f3fb46 Moves flick_overlay to atom instead of being global (#71045)
## About The Pull Request
Moves flick_overlay and flick_overlay_view to atom instead of being a
global proc
## Why It's Good For The Game
General performance and syntaxical improvements, makes it easier to
retrieve iconstates
## Changelog
🆑
fix: flick_overlay is an atom proc
/🆑

Co-authored-by: etherware-novice <candy@notarealaddr.com>
Co-authored-by: Candycaneannihalator <candycane@thisisnotarealaddr.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-17 08:54:24 -08:00
John Willard
ac8dc42060 Strays away from GLOB.machines when possible (#71100)
## About The Pull Request

This replaces needless GLOB.machines with more precise lists whenever
one existed, plus adding a new one for CTF machines.

## Why It's Good For The Game

GLOB.machines holds every single /obj/machinery in the game, so checking
the whole list for stuff is pretty big. This aims to cut that down by
using smaller lists whenever possible. I also gave CTF a new list
because it checked machines very often.

## Changelog

Nothing player facing.
2022-11-15 08:59:22 -08:00
san7890
2d3e7f2383 Prettifies adminmoreinfo into a neater Examine Block (#71170)
Updates the Adminmoreinfo button (also known as the '?' button)
to be cleaner and easier to understand/read, and also makes it
an examine block so it doesn't blend in with the rest of chat.
2022-11-15 01:07:38 -05:00
AnturK
4d6a8bc537 515 Compatibility (#71161)
Makes the code compatible with 515.1594+

Few simple changes and one very painful one.
Let's start with the easy:
* puts call behind `LIBCALL` define, so call_ext is properly used in 515
* Adds `NAMEOF_STATIC(_,X)` macro for nameof in static definitions since
src is now invalid there.
* Fixes tgui and devserver. From 515 onward the tmp3333{procid} cache
directory is not appened to base path in browser controls so we don't
check for it in base js and put the dev server dummy window file in
actual directory not the byond root.
* Renames the few things that had /final/ in typepath to ultimate since
final is a new keyword

And the very painful change:
`.proc/whatever` format is no longer valid, so we're replacing it with
new nameof() function. All this wrapped in three new macros.
`PROC_REF(X)`,`TYPE_PROC_REF(TYPE,X)`,`GLOBAL_PROC_REF(X)`. Global is
not actually necessary but if we get nameof that does not allow globals
it would be nice validation.
This is pretty unwieldy but there's no real alternative.
If you notice anything weird in the commits let me know because majority
was done with regex replace.

@tgstation/commit-access Since the .proc/stuff is pretty big change.

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-15 03:50:11 +00:00
tattle
ad5debaaa1 Add investigate_deaths (#71112)
## About The Pull Request
Adds INVESTIGATE_DEATHS, an investigate category intended to better show
causes of death.


![image](https://user-images.githubusercontent.com/66640614/200142461-c17b5e51-1116-4eef-bbfb-49bc024c0953.png)


![image](https://user-images.githubusercontent.com/66640614/200147306-09bef76e-68c6-4f0a-bdf9-0211eb274e66.png)

Also makes suicide_act take a `mob/living` as an argument instead of a
`mob`, and some minor style improvements since apparently I hate
atomicity.

## Why It's Good For The Game
Inspired by a mysterious death and dusting. More logging and leads for
admins investigating deaths.

Also fixes #59028

## Changelog
🆑 Tattle
admin: added investigate deaths to shed some more light on unusual
demises, dustings, and gibbings
/🆑

Co-authored-by: tattle <article.disaster@gmail.com>
2022-11-07 16:22:37 -08:00
Thunder12345
762e9f06cf Refactors sound toggle prefs away from legacy toggles, introduces a new sound pref for jukeboxes (#71040)
## About The Pull Request

Migrates sound toggle prefs away from legacy toggles, and changes all
related preference checks to the modern form. Cleans up unnecessary
defines linked to the old prefs. Increments the minimum save file
version so a piece of old sound related code can be neatly removed. (The
minimum version hasn't changed in two years anyone who hasn't played in
at least that long probably doesn't even remember they had prefs saved)

Splits off jukebox music into its own preference distinct from
instruments. (This was actually the change that brought about this whole
PR the rest of the igration just made sense to do at the same time)

## Why It's Good For The Game

More granularity in sound preferences is good. It is quite reasonable
for players to want to hear normal volume and largely unobtrusive
instruments, without also being subjected to the aural torture of the
jukebox. As implementing this wothout creating an unwelcome extra legacy
toggle already required setting up a non-legacy sound toggle, it is most
reasonable to migrate the other sounds at the same time.

## Changelog
🆑
qol: Jukebox music can be controlled by a new seperate preference, and
is no longer linked to the instrument sound preference option.
refactor: Sound related toggle preferences have been migrated away from
the legacy system. Pre-existing preferences should be safely migrated
but players are advised to check.
/🆑
2022-11-07 08:45:40 -08:00
LemonInTheDark
6745d4fbee Ensures bunkering someone doesn't runtime due to a divide by 0 error (#71081)
## About The Pull Request
HAHHHHHHHHHHHHHHHH
2022-11-05 20:51:28 -07:00
LemonInTheDark
5b4ba051a0 Builds logic that manages turfs contained inside an area (#70966)
## About The Pull Request

Area contents isn't a real list, instead it involves filtering
everything in world
This is slow, and something we should have better support for.

So instead, lets manage a list of turfs inside our area. This is simple,
since we already move turfs by area contents anyway

This should speed up the uses I've found, and opens us up to using this
pattern more often, which should make dev work easier.

By nature this is a tad fragile, so I've added a unit test to double
check my work

Rather then instantly removing turfs from the contained_turfs list, we
enter them into a list of turfs to pull out, later.
Then we just use a getter for contained_turfs rather then a var read

This means we don't need to generate a lot of usage off removing turf by
turf from space, and can instead do it only when we need to

I've added a subsystem to manage this process as well, to ensure we
don't get any out of memory errors. It goes entry by entry, ensuring we
get no overtime.
This allows me to keep things like space clean, while keeping high
amounts of usage on a sepearate subsystem when convienient

As a part of this goal of keeping space's churn as low as possible, I've
setup code to ensure we do not add turfs to areas during a z level
increment adjacent mapload. this saves a LOT of time, but is a tad
messy

I've expanded where we use contained_turfs, including into some cases
that filter for objects in areas. need to see if this is sane or not.

Builds sortedAreas on demand, caching until we mark the cache as
violated

It's faster, and it also has the same behavior

I'm not posting speed changes cause frankly they're gonna be a bit
scattered and I'm scared to.
@Mothblocks if you'd like I can look into it. I think it'll pay for
itself just off `reg_in_areas_in_z` (I looked into it. it's really hard
to tell, sometimes it's a bit slower (0.7), sometimes it's 2 seconds
(0.5 if you use the old master figure) faster. life is pain.)

## Why It's Good For The Game

Less stupid, more flexible, more speed

Co-authored-by: san7890 <the@san7890.com>
2022-11-04 20:13:54 -07:00
Fikou
348013ba9e adds applying client quirks to player panel (#70923)
## About The Pull Request

![image](https://user-images.githubusercontent.com/23585223/198891626-9969f056-0be1-49fb-8e15-fcf3244bf9e7.png)
this is terribly annoying for any sort of testing. especially if you
were to have a blind or crippled character.
instead of that, we now just make it a button in player panel

## Why It's Good For The Game

fuck

## Changelog

🆑
admin: ctrl shift click spawning no longer applies quirks
admin: adds quirk applying button to player panel
/🆑
2022-10-31 12:41:49 -07:00
Kyle Spier-Swenson
2a63859757 Fix admin 2fa not syncing authorized admins to the player table in the db. (#70910)
* Fix admin 2fa not syncing authorized admins.

* make it a bit more clear what this code does, since the if wording is misleading.
2022-10-31 11:39:14 +01:00
Funce
f96b6d308e Accurately report the dead in check-antagonists (#70897)
* Accurately report the dead in check-antagonists

* Rename one letter variable
2022-10-30 21:51:11 -05:00
Yaroslav Nurkov
a66c1e75fb Admin verb to send message on PDA (#70790)
* base

* oh, oh.

* uh, dots?

* no hdd, only computer

* kill let in UI(but not in func)
2022-10-30 17:35:18 -04:00
LemonInTheDark
85b2d5043d Optimizes qdel related things (slight init time savings) (#70729)
* Moves spawners and decals to a different init/delete scheme

Rather then fully creating and then immediately deleting these things,
we instead do the bare minimum.

This is faster, if in theory more fragile. We should be safe since any
errors should be caught in compile since this is very close to a
"static" action. It does mean these atoms cannot use signals, etc.

* Potentially saves init time, mostly cleans up a silly pattern

We use sleeps and INVOKE_ASYNC to ensure that handing back turfs doesn't
block a space reservation, but this by nature consumes up to the
threshold and a bit more of whatever working block we were in.

This is silly. Should just be a subsystem, so I made it one, with
support for awaiting its finish if you want to

* Optimizes garbage/proc/Queue slightly

Queue takes about 1.6 seconds to process 26k items right now.
The MASSIVE majority of this time is spent on using \ref
This is because \ref returns a string, and that string requires being
inserted into the global cache of strings we store

What I'm doing is caching the result of ANY \ref on the datum it's
applied to. This ensures previous uses will never decay from the string
tree.

This saves about 0.2 seconds of init
2022-10-30 00:09:15 -07:00
Yaroslav Nurkov
3d901e6c96 Add security(in round, alive, dead) in check antagonists (#70681)
* add security in check antagonists

* minor fixes + antagonists
2022-10-23 19:09:17 -04:00
Funce
a5e579e0c8 Admins can now safely cancel the "Admin PM" verb (#70705) 2022-10-21 21:24:57 -07:00
Tim
09d88b31ee Wizard DLC - Tower of Babel (#69629)
About The Pull Request

This adds a new status effect called - Tower of Babel

Any carbon mob afflicted by the status effect will lose knowledge of every known language and gain a randomized one as a replacement. The affected mob will also be hit with a depressing moodlet that lasts for 15 seconds. Silicons are immune to all effects.

This effect is implemented in several ways:

    Tower of Babel wizard event (all crew on the station z level are affected. The wizard is not and gains mastery of every language to taunt their victims)
    Admin smite option
    Admin secret event (can be reversed)
    Staff of Babel (formerly the Staff of Sapping) will spawn during spawn magic wizard event
    Magicarp will randomly shoot bolts of babel
    Staff of Chaos will randomly shoot bolts of babel
    Overdosing on Mushroom Hallucinogen will temporarily and sporadically acquire the effect

The effect can be blocked or cured in several ways:

    Curators are given immunity
    Reading a book of babel (via lavaland loot) cures and gives immunity
    Reading a language book cures and gives immunity ONLY for that particular language

Note - The Tower of Babel does not allow tongueless, mute, or tongue tied people the ability to speak
2022-10-19 05:17:05 +00:00
san7890
2878345ebb Swaps sleep() to use SECONDS define, changes some sleep(1) to sleep(1 TICKS) (#70452) 2022-10-18 21:25:23 -07:00
san7890
901662f59b Changes job config format to use TOML, and add tools for migrating existing format (#70199) 2022-10-18 14:51:24 -07:00
san7890
02e24dc3f2 Player Panel's "Make AI" Now Respects Closing The Input Menu (#70449)
Player Panel's Make AI Now Respects Closing

Hey there,

Before, this wouldn't respect it if the user calling this via the Player Panel just hit the X button, instead of "cancel" on the TGUI input message. If you hit the X button, it would just create an AI at the normal AI landmark anyways (very stupid!). I fell for this like twice in the last week, so let's get this outta here.
2022-10-13 15:25:05 -04:00
Twaticus
c7dde06668 [MDB Ignore]Hats DMI split (#70060)
Splits head dmi into separate files for both mob and obj icons. Kept similar to suit split categorization + some more. New files include beanie, bio, chaplain, costume, cowboy, default, hats(softcaps, fedoras, head caps, generic hats), helmet(helmets and other armored headgear/hoods), spacehelm, utility(hardhats, mostly work related hats), wizard.
Moves animal/pet head sitting icons to 1 folder, pets_head.dmi
Renames PAI head sitting icon file to pai_head.dmi
2022-10-06 21:37:06 -07:00
ShizCalev
1a32f60cf4 [ready] adds unit test for missing inhand icons. fixes a bunch of missing inhand icons (#70037)
fix: Fixed a bunch of missing inhand icons.
fix: Fixed cables in electrical toolboxes not randomizing their colors.
fix: Fixed the wrong colored icon showing when trying to make cable cuffs out of cables.
fix: The collectable SWAT helmet is now using the proper icon again!
refactor: Pipecleaners and power cables now share a unified color system, so they're once again available in ALL the same colors.
imageadd: Updated the screwdriver belt overlay to represent the newer sprite.
imageadd: Added a bunch of new inhand icons. Special thanks to Twaticus for doing the helmets! <3
fix: Wirecutters now have an icon when inside a belt again!
admin: Added a new omnitool subtype that allows you to spawn all items in a typepath!
fix: Explorer gaskmasks now properly reflect their adjusted state when held.
fix: Fixed balaclavas having the wrong icon when pulled up.
fix: Fixed the base energy sword (admin spawn only) being invisible.
fix: The rainbow energy sword is now a little bit more rainbowy!
fix: Fixed an tk exploit with orange handcuffed shoes.
fix: The traitor outfit in the select equipment panel is now actually functional!
2022-10-04 10:20:24 -07:00
Fikou
9dddcb6f48 makes radios use paths instead of new (#70252)
* makes radios initialize in Initialize instead of init()
2022-10-03 09:46:02 +02:00
MrMelbert
ea899232b0 Game panel is a bit more generous when spawning multiple paths for admins (#70078)
Changes the limit of paths to spawn via game panel from a hardcoded 5 to be based on the admin spawn limit.
Why It's Good For The Game

5 is a bit limiting, especially as it's easily possible to spawn more than five types of something in other ways. QOL.
Changelog

cl Melbert
admin: The game panel now lets you make more than five different types of something at once.
/cl
2022-09-30 11:02:42 +13:00
san7890
acd43427c9 List Them Out - A Modern Revision On Extracting Global Lists (#70080)
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2022-09-29 10:44:41 -07:00
John Willard
be450e12c8 Unit tests powernets to make sure the whole station is connected. (#70090) 2022-09-27 22:33:56 -07:00