Commit Graph

216 Commits

Author SHA1 Message Date
Fikou
fd329744ea death squad officer outfit works (#74734)
## About The Pull Request
makes the death squad officer modsuit use the hat stabilizer module to
wear the beret simultaenously with the suit

## Why It's Good For The Game
it was an outfit that spawned you in a not working suit

## Changelog
🆑
fix: death squad officer outfit works
/🆑
2023-04-15 21:20:42 -06:00
oranges
4c48966ff8 Renames delta time to be a more obvious name (#74654)
This tracks the seconds per tick of a subsystem, however note that it is
not completely accurate, as subsystems can be delayed, however it's
useful to have this number as a multiplier or ratio, so that if in
future someone changes the subsystem wait time code correctly adjusts
how fast it applies effects

regexes used

git grep --files-with-matches --name-only 'DT_PROB' | xargs -l sed -i
's/DT_PROB/SPT_PROB/g'
git grep --files-with-matches --name-only 'delta_time' | xargs -l sed -i
's/delta_time/seconds_per_tick/g'
2023-04-11 21:31:07 -07:00
Vile Beggar
b2eb04f151 Allows PKAs to be attached to mining MODsuits (#74601)
## About The Pull Request

like the title says, this PR allows miners to attach their funny little
proto-kinetic accelerator to their hard-earned modsuit

## Why It's Good For The Game

this is probably an oversight, but if not, it's a really weird design
choice. if you can attach a crusher to it, there's no reason you
wouldn't be able to attach a PKA. a very dumb inconvenience imo

## Changelog

🆑
balance: PKAs can now be attached to mining MODsuits.
/🆑
2023-04-09 19:47:57 -04:00
Bloop
c3df56d4fd Fixes the atrocinator modsuit module (#74529)
## About The Pull Request

Somewhere gravity got modified where you can have values below -1. This
updates all the checks for `NEGATIVE_GRAVITY` to reflect that.

Closes https://github.com/tgstation/tgstation/issues/72794
Closes https://github.com/Skyrat-SS13/Skyrat-tg/issues/20314

Confirmed https://github.com/tgstation/tgstation/issues/64703 is still
an issue. Fireman carrying prevents it from happening, Something to do
with buckle code probably, but I care not to investigate further at this
moment. Just stating in case anyone else does.

I did not experience the chat bug though. Don't think it's related. 

## Why It's Good For The Game


![dreamseeker_BiZRIyQ3Qe](https://user-images.githubusercontent.com/13398309/230061927-646223c4-861a-4dc9-89d9-495c123a016f.gif)

## Changelog

🆑
fix: the atrocinator modsuit mod will now make you fall up again when
activated.
/🆑
2023-04-06 19:23:04 -06:00
san7890
ccef887efe Lints Against Unmanaged Local Defines (#74333)
# MAINTAINER - USE THE BUTTON THAT SAYS "MERGE MASTER" THEN SET THE PR
TO AUTO-MERGE! IT'S MUCH EASIER FOR ME TO FIX THINGS BEFORE THEY SKEW
RATHER THAN AFTER THE FACT.

## About The Pull Request

Hey there,

This took a while to do, but here's the gist:

Python file now regexes every file in `/code` except for those that have
some valid reason to be tacking on more global defines. Some of those
reasons are simply just that I don't have the time right now (doing what
you see in this PR took a few hours) to refactor and parse what should
belong and what should be thrown out. For the time being though, this PR
will at least _halt_ people making the mistake of not `#undef`ing any
files they `#define` "locally", or within the scope of a file.

Most people forget to do this and this leads to a lot of mess later on
due to how many variables can be unmanaged on the global level. I've
made this mistake, you've made this mistake, it's a common thing. Let's
automatically check for it so it can be fixed no-stress.

Scenarios this PR corrects:

* Forgetting to undef a define but undeffing others.
* Not undeffing any defines in your file.
* Earmarking a define as a "file local" define, but not defining it.
* Having a define be a "file local" define, but having it be used
elsewhere.
* Having a "local" define not even be in the file that it only shows up
in.
* Having a completely unused define*

(* I kept some of these because they seemed important... Others were
junked.)
## Why It's Good For The Game

If you wanna use it across multiple files, no reason to not make it a
global define (maybe there's a few reasons but let's assume that this is
the 95% case).

Let me know if you don't like how I re-arranged some of the defines and
how you'd rather see it be implemented, and I'd be happy to do that.
This was mostly just "eh does it need it or not" sorta stuff.

I used a pretty cool way to detect if we should use the standardized
GitHub "error" output, you can see the results of that here
https://github.com/san7890/bruhstation/actions/runs/4549766579/jobs/8022186846#step:7:792
## Changelog
Nothing that really concerns players.

(I fixed up all this stuff using vscode, no regexes beyond what you see
in the python script. sorry downstreams)
2023-03-29 10:17:03 -07:00
Zephyr
ecbcef778d Refactors Regenerate Organs, and a few organ helpers (#74219)
## About The Pull Request

Refactors regenerate organs to be slightly more intelligent in handling
organ changes and replacements.
Noteably:
- We don't remove organs that were modified by the owner; such as
changing out your heart for a cybernetic
- We early break out of the for loop if they aren't supposed to have an
organ there and remove it
- We check for the organ already being correct, and just healing it and
continuing if it is

Also changes the names of some of the organ helpers into snake_case
### Mapping March
Ckey to receive rewards: N/A

## Why It's Good For The Game
## Changelog

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-03-26 17:54:36 +01:00
LemonInTheDark
5aab9dd88a Saves roughly 20% off living/Life(), makes gravity event based (#74084)
## About The Pull Request

Right now, each time life processes we need to run has_gravity, and
check its output against a bunch of thresholds.
We could save off that second bit by caching the previous value, but
we'd still be only updating this every 2 seconds.

This potentially delayed updating leads to really janky feeling behavior
around transition points too (like when moving on/off the sand on tram
station)

So instead of doing this updating off life(), let's make it event based.
We'll decompose has_gravity, and take all the values it relies on, and
check for them changing ourselves.
That way we get instant response, and can save all the wasted
has_gravity calls.

This constant checking on movement adds a few signal registrations, a
connect_loc, and some logic on living/Moved

The Moved logic increases Moved's self by 50%, roughly 1 second a round
at worst.
Don't have concrete numbers for the connect_loc

(new self / old self)

![image](https://user-images.githubusercontent.com/58055496/226091990-8cbeef82-6a37-488c-a0b6-cf570156c2dc.png)

In constrast, handle_gravity is currently on average maybe 15 seconds.


![image](https://user-images.githubusercontent.com/58055496/226092056-5fc7fc59-46e2-4e01-a6ee-6867de30c1f0.png)

I could JUST save maybe 13 seconds and not spend the 1 by storing the
previous gravity value, but I think this is worth the ux changes. It
does add some extra resistance to change, but s much nice.

Moved some functions around too, and removed now redundant
update_gravity calls

## Why It's Good For The Game

Snappier gravity, faster Life()

## Changelog
🆑
qol: Human gravity will react to changes instantly, instead of waiting
for the next process tick. Hopefully this feels better and not worse
/🆑
2023-03-25 22:44:27 -06:00
san7890
bf6f81a9b5 Implements AddTraits and RemoveTraits procs for adding/removing multiple traits + swag unit test (#74037)
On the tin, doing it like this means we can reduce our overall line
fingerprint whenever we have to add two or more traits from the same
source on the same target. Especially helps when we get to the 4+ range
of traits, a breath of fresh air even.

Doesn't mean we have to do for loops, as that's already handled within
the define as well. I replaced some of the checks with `length()`
checks, let me know if I should switch it over to something else (maybe
`islist()`)? We stack_trace whenever we're not passed a list reference
on purpose, and sometimes var/lists are null by default (or just empty,
making this redundant).
## Why It's Good For The Game

I commonly feel the urge to write "use `AddTraits()`" or something in
reviews, then am sad when I remember it doesn't exist. I will no longer
be sad.

Can ensure a lot more trait safety as well by using static lists- when
both ADD_TRAIT_LIST and REMOVE_TRAIT_LIST re-use the same list, you are
confident (from a static point of view) that everything that you want to
be adding/removing works.

I may have missed a few things where this could be used, but both macros
implemented in this PR still use the same framework that was being used
in the last four years- so stuff won't break if left untouched. Just a
nifty new tool for developers.

also fixed up some code in the area, numerous bugs were found and
exploded
2023-03-18 01:57:06 +00:00
MrMelbert
48ff6a6e65 Fixes Ice Slipping, Refactors noslip mechanics, Allows magboots to prevent slip slides (but not the slip itself) (#73948)
## About The Pull Request

Code changes: 

- Fixes #73946 , Ice Slipping not going forever as intended
- Detailed in the issue report. Ice slide slip was replaced from a stun
to a knockdown, but it relied on it being a stun to function. I replaced
it back with an immobilize and incapacitate, reduced to 1 second to
prevent cheese.

- Refactors noslip mechanics
- Changes noslip and noslip_ice from a clothing flag to a clothing
trait, as the trait already existed and was used by MODsuits. Also added
noslip_slide, which prevents all sliding from slips like lube.

- Refactors magboots
- Refactored and modernized magboot code. Mostly cleanup, like using
base icon state, updating appearance, etc.

- Fixes speed potioned magboots not maintaining the speed boost after a
toggle

- Adds a helper for adding or removing clothing traits from existing,
(potentially) worn items.

- `TRAIT_NEGATE_GRAVITY` now always updates gravity on signal, no longer
requiring a manual call after.

Balance change: 

- Magboots now prevent sliding on permafrost (outside icebox).  
   - This is mainly to give them more of a purpose on Icebox. 
- Magboot snow prevent sliding on ice (or lube). You will still slip. 
- Slipping over ice or lube will knock you down as before, but will not
send you across the room.
   - See https://tgstation13.org/phpBB/viewtopic.php?t=33217. 

## Why It's Good For The Game

Magboots justification: 

This makes Magboots much less of a "noob trab" for engineers
fire-fighting in the Supermatter room. Most engineers believe themselves
to be completely save to the Supermatter's pull with magboots, however
"wet ice" will still send you flying into the crystal.

I think it is an inconsistency, seeing as it protects you from other
forms of forced movement like gravitational pulls. However making them
pure no-slip seemed a bit too far to me, so the knockdown still occurs.

## Changelog

🆑 Melbert
balance: Magboots will now protect you from sliding on ice. It will not
stop the slip, though.
fix: "Ice sliding" (from patches of permafrost ice) will now correctly
slide you until you reach a non-ice patch.
fix: Speed potioned magboots maintain their speed booster after toggling
them
refactor: Refactored magboots. 
refactor: Refactored noslip mechanics. 
/🆑
2023-03-14 18:51:34 -06:00
Jacquerel
44c0099536 Restores Spell Card targetting behaviour (#73706)
## About The Pull Request

Fixes #52946

This has been broken ever since #44112 which apparently removed the proc
in this component which selected a target for performance reasons and
just... didn't replace it with anything else? So it's been bricked ever
since.

In order to restore the removed mouse tracking behaviour I implemented
the pattern used in scoped weapons and the kinesis module. As this was
the third thing I could find to use this code, I abstracted it out into
an object where most of the shared behaviour lives. I tested those
things too and they still seem to do what they used to.

Here it is in action:


https://user-images.githubusercontent.com/7483112/221954852-22244bb1-7c87-452d-a9b0-ebed81c4c1ef.mp4


Because this spell now applies a full screen overlay in order to
function, it's really begging for someone to make some touhou-style art
with cards and patterns around the edge of the screen while you are in
aiming mode, but I'm not going to be the one to make it.

I tidied this component up and refactored it as best I could while I was
reworking it to use a full screen overlay but I am... not totally
confident that it should be a component at all given that it keeps being
created and destroyed. But also it has worked that way for like four
years now, so who am I to say.

Oh yeah also the icon for this spell broke, so I fixed it.

## Why It's Good For The Game

Makes a reasonably terrible wizard spell marginally less bad.
Maybe now that this component works, some other things can use it?
If we make a fourth thing which follows your cursor it won't need to
copy/paste code around.

## Changelog

🆑
fix: Spell Cards from the Wizard spell will now home in somewhat on the
target nearest to your cursor.
fix: The Spell Cards spell now displays the correct icon instead of a
big red "error" text.
/🆑
2023-03-10 21:49:23 -07:00
MrMelbert
d755b70d76 Removes bad nodamage var from projectiles, fixes Juggernaut / Rust Walker projectiles doing zero damage (#73806)
## About The Pull Request

- Juggernaut and Rust Walker projectiles were subtyped off of magic,
which is `nodamage`.

- The juggernaut actually had a copy+paste error with their type
`on_hit` which caused none of their special effects on hit ("relative
patching catches this")

- Then I realized projectiles have this var `nodamage` which is, for all
intents and purposes, just `damage > 0`. it's not checked for pacifism,
it's just that. This is dumb. So very dumb, so I removed it.
- There are, however, a few situations which used it in a unique way,
such as the blast wave cannon. This is why I replaced it with a proc,
`is_hostile_projectile`, for certain situations to actually find out if
the projectile is damaging. Projectiles can override this on a per type
basis by default, damaging projectiles = hostile.
- This has a chance to break some things, but I ... kinda doubt it will.

Fixes #73756

## Why It's Good For The Game

Projectiles that act as they should, less dumb vars

## Changelog

🆑 Melbert
fix: Fixes Juggernaut / Rust Walker projectiles doing zero damage
fix: Fixes Juggernaut projectiles not doing bonus damage to nearby
structures
code: Removed projectile nodamage var, replaces it with just checking
for damage
/🆑
2023-03-10 17:51:31 -07:00
tralezab
47206594b9 Fixes Ninjas not being able to use adrenaline while unconscious + code improvement (#73538)
## About The Pull Request

### Bugfix

Fixes #73521

Ninja's adrenaline is supposed to cure unconscious, but you can't
activate it while unconscious. This pr fixes that

### Code improvement

Combined all the allow variables into a bitflag

## Why It's Good For The Game

bugfix

## Changelog
🆑
fix: You can use ninja adrenaline to cure unconsciousness as intended
code: Cleaned up some modsuit code
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-02-20 20:30:51 +01:00
Fikou
a11517e3df worn overlays proc sends a signal (#73101)
what the title says, it sends the list of overlays to be edited and some
other stuff
makes modsuits use this
2023-02-02 16:32:03 -05:00
Zephyr
a8f5a6d158 Fix a merge skew on armor datums (#72909)
## About The Pull Request

And also add a check grep to find it in the future
## Why It's Good For The Game
## Changelog
2023-01-28 19:34:11 -05:00
Zephyr
dc2b1f5589 Removes SQRT_2 and its usages (#72913)
Signed-off-by: GitHub <noreply@github.com>
## About The Pull Request
## Why It's Good For The Game
Resolves #72534 
## Changelog

Signed-off-by: GitHub <noreply@github.com>
2023-01-24 10:51:52 -08:00
Mothblocks
54eae1e713 Fix signal override merge skew (#72882)
Caused by https://github.com/tgstation/tgstation/pull/72517, with
https://github.com/tgstation/tgstation/pull/72561 raising an error that
was being hidden before

This changes equip logic somewhat so that set_wearer was being called
twice.

I don't think this should be being run in visualsOnly at all, as it does
a ton of stuff like registering signals, updating UI, etc etc etc. Don't
have time to investigate further.
2023-01-22 10:34:56 +00:00
MrMelbert
a55a30f820 Return to Tiny: Reworks heights to use filters, allows spacemen to have varying heights (#72344)
## About The Pull Request

Re-pr of #66644 with some changes to get it working


![image](https://user-images.githubusercontent.com/51863163/209893337-6a35207b-f097-4fd8-bc51-e66b3273919c.png)

- [x] ~~Huds get cut off~~ Resolved
- [x] ~~Very tall helmets get cut off~~ Resolved
- [x] Hair gets cut off
- [x] ~~Needs optimization before releasing to the world as a pref~~ jk
lol

## Why It's Good For The Game

Look at that fella so cute

## Changelog

🆑 Melbert, That REALLY Good Soda Flavor, FatFat, AndreyGusev
add: Spacemen can now have varying height. (Admin only for now)
add: Dwarfs are now slightly shorter, but look way better.
/🆑

Co-authored-by: Jack LeCroy <3073035+jacklecroy@users.noreply.github.com>
2023-01-18 22:52:17 -08:00
John Willard
af98c74f4a Adds maintenance tablet apps (Health analyzer is one now too) (#71738)
About The Pull Request

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

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

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

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

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

    A camera application:

image
image

    MODsuit control application:

image
image

image

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

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

cl JohnFulpWillard, sprites by Tramzz
add: Added Maintenance tablet applications, applications that can't be cloned or downloaded from the store, instead you can find one app in maintenance.
balance: The Analyzer tablet application is also a maintenance tablet application now.
/cl
2023-01-19 10:43:32 +13:00
Fikou
519bf69869 Dynamic Human Icon Generation For Simple/Basic Mobs (& Cardboard Cutouts) (#72517)
## About The Pull Request
revive of #68760
this time a proc, not an element
this time supports cardboard cutouts
this time supports mob corpses

![image](https://user-images.githubusercontent.com/23585223/211064291-81070650-189f-4afa-8116-81b687e3ea35.png)

## Why It's Good For The Game
prevents these icons ever being outdated, they'll always look what they
are supposed to, saves spriting work

## Changelog
🆑 Fikou, a hood by Viro
refactor: humanoid mobs and cardboard cutouts automatically generate
their sprites, they no longer will be outdated
/🆑

Co-authored-by: Time-Green <timkoster1@hotmail.com>
2023-01-18 20:04:10 +00:00
Fikou
819e6be70c adds more default pins for prebuilt modsuits (#72427)
## About The Pull Request
makes magboots autopin
adds autopin to unique ert modules and to the admin suit
**if you have any module that should be autopinned but isnt say in the
comments**

## Why It's Good For The Game
cool

## Changelog
🆑
qol: makes modsuits with magboots have those pinned by default, pins
active modules on the admin suit, mining suit and the additional module
of the ert suits
/🆑
2023-01-03 22:46:58 +01:00
Fikou
3630c3f497 modules attached to active modsuits act as if the suit was activated, removed modules properly unequip themselves (#72341)
this seems neat for backend even if players cant use it right now also bug fix
2022-12-29 21:17:47 -06:00
Fikou
952b864f84 sphere transform module no longer resets base pixel y (#72328)
closes #72319
2022-12-29 17:56:02 -06:00
Mothblocks
e9351f6ae0 Add lints for idiomatic balloon alert usage (#72280)
Adds lints for `balloon_alert(span_xxx(...))` (which is always wrong),
and balloon alert where the first letter is a capital (which is usually
wrong). Fixes everything that failed them. As a reminder, abbreviations
like "AI" and "GPS" shouldn't be capitalized in a balloon alert.

In cases where this is intentional for flavor (there was one case), you
can `UNLINT` like so:

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2022-12-29 19:01:45 +00:00
Fikou
0151eb46b9 some modsuits now have some modules pinned by default (#72258)
## About The Pull Request
cleans up some modsuit code i dont like about their modules
removes mod theme blacklists, they are unused and weve not needed them
at all so far
adds support for premade suits to have modules they pin by default
the default pins currently are:

advanced suit: jetpack
loader suit: clamp, magnet, hydraulic arms
mining suit: sphere transformation
safeguard suit: jetpack
magnate suit: advanced jetpack
traitor suit: armor booster, jetpack
elite traitor suit: armor booster, advanced jetpack
nukie suit: armor booster, advanced jetpack
elite nukie suit: armor booster, advanced jetpack
spetsnaz pyro suit: armor booster, advanced jetpack, flamethrower
prototype suit: tether, kinesis
apocryphal suit: jetpack
chrono suit: timestopper, rewinder, timeline jumper, kinesis plus,
timeline eradication
ninja suit: advanced stealth, star dispenser, emp pulse, weapon recall,
adrenaline boost, energy net

## Why It's Good For The Game
quickens some stuff up

## Changelog
🆑
qol: some modsuits now have some modules pinned by default
/🆑
2022-12-28 04:37:36 -08:00
Zephyr
72add64520 Refactors armor into dedicated subtypes (#71986)
## About The Pull Request

See title.
## Why It's Good For The Game

Code is cleaner, and more readable/intuitive
Technically closes
https://github.com/tgstation/dev-cycles-initiative/issues/8
## Changelog
🆑
refactor: armor, from the ground up basically
/🆑

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-12-23 16:21:22 -08:00
Jacquerel
8cb4947084 AI actions won't unassign each other's movement targets & Mice stop being scared of people if fed cheese (#72130)
## About The Pull Request

Fixes #72116 
I've had a persistent issue with basic mob actions reporting this error
and think I finally cracked it
When replanning with `AI_BEHAVIOR_CAN_PLAN_DURING_EXECUTION` it can run
`Setup` on one action leading to the plan changing, meaning that it runs
`finishCommand` to cancel all other existing commands
If you triggered a replan by setting up a movement action in the middle
of another movement action, cancelling the existing action would remove
the target already set by the current one.
We want actions to be able to remove _their own_ movement target but not
if it has been changed by something else in the intervening time.

I fixed this by passing a source every time you set a movement target
and adding a proc which only clears it if you are the source... but this
feels kind of ugly. I couldn't think of anything but if you have a
better idea let me know.

Also while I was doing this I turned it into a feature because I'm
crazy.
If you feed a mouse cheese by hand it will stop being scared of humans
and so will any other mice it attracts from eating more cheese. This is
mostly because I think industrial mouse farming to pass cargo bounties
is funny.
Mice controlled by a Regal Rat lose this behaviour and forget any past
loyalties they may have had.


https://user-images.githubusercontent.com/7483112/208779368-3bd1da0f-4191-4405-86e5-b55a58c2cd00.mp4

Oh also I removed a block about cancelling if you have another target
from the "hunt" behaviour, everywhere using this already achieves that
simply by ordering the actions in expected priority order and it was
messing with how I expected mice to work.
Now if they happen to stop by some cheese they will correctly stop
fleeing in order to eat it before continuing to run away.

## Why It's Good For The Game

Fixes a bug I kept running into.
Makes it possible to set up a mouse farm without them screaming
constantly.
Lets people more easily domesticate mice to support Ratatouille
gameplay.

## Changelog

🆑
add: Mice who are fed cheese by hand will accept humans as friends, at
least until reminded otherwise by their rightful lord.
fix: Fixed a runtime preventing mice from acting correctly when trying
to flee and also eat cheese at the same time.
/🆑
2022-12-22 00:41:36 -08:00
LemonInTheDark
9e69e5d6ac Minor plane cube cleanup (#72038)
## About The Pull Request

[Fixes area lighting not working on turf change in multiz
cases](7b92deffbc)

If you modify a area lit turf when using multiz, it'd end up using the
wrong plane for its light, because of stupid shit on my part.
Stupid shit resolved

[Fixes some uses of plane masters that only specified one rather then
all](a59ec96d29)

We almost never only want to show SOME hidden planes. 
Should really make a helper for this someday
2022-12-19 11:34:03 +01:00
Fikou
e79d3bc1c4 fixes modsuit icons (#71998)
## About The Pull Request
#71908 this pr breaks modsuit icons before the first time they seal by
making the icon state be skin-standard-part
this fixes that by making them use base_icon_state instead of initial,
and also puts that in other places to reduce hardcoded stuff

## Why It's Good For The Game
le bug is le fix

## Changelog
🆑
fix: fixes modsuit icons
/🆑
2022-12-14 13:51:04 +00:00
ShizCalev
ae8ed395e1 Changes the missing food icon test to cover ALL /obj's (#71908)
Might as well cover everyyyyyyyyything. :)

Fixes https://github.com/tgstation/tgstation/issues/71953
Fixes https://github.com/tgstation/tgstation/issues/71983

🆑 ShizCalev
code: We now unit test all /obj's for missing icons. :)
/🆑


todo: Fix the fucked up icons.

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-12-13 17:51:40 -08:00
MrMelbert
46610d3959 Fixes pinned module modsuit icons (#71857)
## About The Pull Request

- `item_action/New` is where it item actions generate an icon based on
the target if the icon is null. Pinned modules set up the icon **after**
the parent call, so it went through to New, generated the icon, and THEN
set its own icon.
- Simply moves the icon setup to before the parent call to resolve this.
- Also removes some copy and paste code. 

## Why It's Good For The Game

Icons look good

![image](https://user-images.githubusercontent.com/51863163/206623593-d6bbd4ea-5b5d-4365-aa08-d43d4fce0335.png)

## Changelog

🆑 Melbert
fix: Corrects the look of pinned modules
/🆑
2022-12-11 14:39:34 +01:00
Fikou
f9445e027f makes beams better (plus small kinesis tweaks) (#71768)
## About The Pull Request
kinesis now waits for its first inputs to be given before firing, it
should no longer pull the item to the center of the screen
the kinesis overlay now is emissive
beam emissivity now works (emissive appearances no longer reset
transform)
beams now have a variable whether or not they should be emissive,
because of stuff like vines or chains from the meat hook
fixes https://github.com/tgstation/tgstation/issues/71640

## Why It's Good For The Game
neat visual stuff

## Changelog
🆑
fix: fixes beam glow in the dark effects
fix: kinesis now doesnt pull the item to the centre of the screen when
first used
fix: physical beams (like vines or meat hook chain) no longer glow in
the dark
/🆑
2022-12-09 15:58:58 -05:00
MrMelbert
329921639a Rewrites how action buttons icons are generated, makes them layer nicer. Allows observers to see a mob's action buttons. (#71339)
## About The Pull Request

- Rewrites how action button icons are generated.
- Prior, generated an action button icon was fairly simplistic and
didn't allow for many changes. Someone recently added the option for
overlays to be generated over action buttons, but the framework was very
weak.
- Now, action button icon generation is split across multiple procs,
like atom icon updates.
      - The background of action buttons are underlays
- The actual icon of the action button is the icon and icon state of the
action button movable
- The rim / border of the button is an overlay, layered overtop the
button.

- Allows observers to see what action buttons a mob has. They even
update in real time! And no, the observers cannot click on them.

## Why It's Good For The Game

- Runechat text of action buttons are no longer hidden behind the actual
icon. This was very ugly with cooldown actions, as the cooldown text was
hidden behind a lot of spell icons.
- Cuts down on a lot of icon duplication. 
- Gives much finer control over action button icons
- Saves a bit of processing from generating full action button icons
when not necessary. Not implemented in many places, but is in some.


![image](https://user-images.githubusercontent.com/51863163/202816617-342e87e6-2cc6-488e-9af2-4b2053dc3dc6.png)


![image](https://user-images.githubusercontent.com/51863163/202816604-da8d4821-0e2b-45af-b289-7442367f98ce.png)

## Changelog

🆑 Melbert
add: Observers can now see what action buttons an observed mob has. No,
you can't click them. And no it doesn't show EVERY action.
refactor: Refactored how action button icons are generated. Some actions
will now use a colored border when active instead of just turning green.
Cooldown text will also appear on the top layer of actions too. If you
see any funky lookin' icons (namely their borders), let me know.
refactor: Bluespace Golem's teleport action is now a cooldown action.
fix: Construct actions go to the middle of the screen like expected. 
/🆑
2022-12-03 19:01:08 -08:00
CapybaraExtravagante
8f6528c9ec Allows datum AI to switch to different movement datums (#71595)
## About The Pull Request

Allows basic mobs / datum AI to switch between movement datums. Useful
if you need JPS in some moments, but simple obstacle avoidance in others

This isn't used anywhere yet, but is a building block for basic bots.

## Why It's Good For The Game

Allows us to pick the right tool for the job!

## Changelog

🆑 Capybara Holly
refactor: Datum AI can now switch to different movement datums in their
behavior.
/🆑

Co-authored-by: Capybara <Capybara@CapybaraMailingServices.com>
2022-11-29 14:30:30 -08:00
tralezab
83f475aa7e Adds the DNA Infuser, a genetics machine you feed corpses to infuse their DNA with yours! What could go wrong?! (#71351)
## About The Pull Request  
Adds the "DNA Infuser" to genetics. One person enters, a corpse is added
to the machine, and you can activate the machine to "infuse" the subject
with the DNA. This converts one random organ from a set into the
mob-related organ.

### Rat mutation 🐀

Rats can be fed in to turn you into a rat-creature-thing!
```diff
+See better in the dark
+Can pretty much eat anything! Toxic foods, gross foods, whatever works!
+Smaller, and can climb tables
?Randomly squeaks occasionally?
-Take twice as much damage
-Vulnerable to flashes
-Gets hungry MUCH quicker.
-Yes, eat anything, but only ENJOY dairy.
```
Having every rat organ at once allows you to ventcrawl nude!

### Carp mutation 🐟 

Carp work for a mutation as well!
```diff
+Strong jaws, that drop teeth over time!
+Space immunity! Breathe in space, unbothered by pressure or cold!
+Smaller, and can climb tables
-Can't block your jaws with a mask
-Can't take the heat, overheats easily
-Can only breathe in environments that have minimal or no oxygen
-Nomadic. If you don't enter a new zlevel for awhile, you'll start feeling anxious.
```
Having every carp organ at once allows you to swim through space!

### Fly mutation 🪰 

Any corpses without organs to turn into turn into fly organs! Fly organs
now have a bonus for collecting them all, transforming you into a fly,
when you pass the threshold. But even without those, fly organs are
technically... organs. They most of the time work like normal ones.

## Todo 🐦 

- [x] Finish the infuser code
- [x] Create a little booklet that shows what kind of shit you can turn
into, hopefully i can autogenerate this based off of organ set subtypes
list
- [x] sprite/slap a color on rat mutant organs
- [x] Maybe make a *few* more organ sets

## Why It's Good For The Game 🐑 

Oops, I forgor to fill this out! My hackmd is here.

https://hackmd.io/@bazelart/ByFkhuUIi

## Changelog 🧬 

🆑 Tralezab code, Azlan + Azarak (Az gaaang) for the organs
add: Added the DNA infuser to genetics! Person goes in, corpse goes in,
and they combine!
add: Try not to turn yourself into a fly, OK?
/🆑

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-11-29 02:05:44 +00:00
MrMelbert
928b902b9e Small optimization for allowed lists (#71562)
## About The Pull Request

Removes typecaching from allowed lists. 

`allowed` uses `is_type_in_list`, it's not a typecache.
Making it a typecache makes it scale very poorly. 

Before: 488 `istype`s

![image](https://user-images.githubusercontent.com/51863163/204115121-725ea813-3369-4eb5-9bd8-fd6b80efb5ca.png)

After: 5 `istype`s

![image](https://user-images.githubusercontent.com/51863163/204115127-65c17653-8c1e-406f-baf5-0a78c604d4b6.png)

You may ask "Why not make allowed lists typecaches instead, it's also
faster than is type in list"
Yes, but it's a lot more work than just getting this out of the way, and
plus you need to account for stuff like adding allowed lists together
and meh. This is just easier.

## Why It's Good For The Game

Code goes faster

## Changelog

🆑 Melbert
code: Cuts some uses of allowed list as a typecache. Allowed lists are
not typecaches, don't make them typecaches
/🆑
2022-11-27 23:00:41 -08:00
necromanceranne
03bc97ade5 Nukies Update 6: Interdyne is here for you! Medical Supplies and Atropine! (#71067)
## About The Pull Request

Quite a few changes overall to the nuclear operatives tactical medkit.
The kit is more of a full suite of equipment for performing field
medical duties as a nukie.

- I've split the medkits between two kinds. Basic and premium. Medical
bundle has the premium kit.
- Basic contains additional amounts of basic c2 chem patches, some spare
atropine autoinjectors, sutures and regen mesh, and some basic medical
equipment for tending wounds. 4 TC (as it was before). That's it.
- The premium kit is a far more useful full suite of advanced medical
equipment, MODsuit modules, medical supplies and cybernetic implants,
including the combat hypospray and the combat defib. 15 TC.

**In the premium kit, there is:**
- It has a box of beakers with powerful healing chems. Omnizine,
salicylic acid, oxandrolone, pentetic acid, atropine, salbutamol and
rezadone.
- The combat injector is empty, so you can load it as necessary.
- There are advanced sutures and regenerative mesh packs. They don't
work through spacesuits, but are invaluable for wound repair. Especially
burns.
- There is a surgery arm toolset so you can do field operations without
lugging tools.
- There is a surgery processor module that comes preloaded with advanced
surgeries, a threadripper module, and the combat defib module. The
module works entirely like a combat defib, but you don't need to lose
your belt slot to use it.
- The surgeries are revival, the upgrade surgeries (like vein
threading), brainwashing (did you know they didn't get access to
brainwashing, I think this is a shame) and the better tend wounds
option.
- The nightvision medical hud doubles as a pair of science goggles.

**Atropine changes:**
- Atropine now stops bomb implants from autoexploding. This does **NOT**
stop you from manually detonating the bomb. (This is possible even when
you're dead and haven't left your body)
- As a result, nukies get atropine medipens so that they can potentially
stop themselves detonating prematurely, or stop their allies detonating
prematurely. They have a little pamphlet to help explain how their
microbomb works.

## Why It's Good For The Game

Straight up: The medkit is ass.

The meds in the injector sucks, just getting c2 meds in patches is kind
of insulting for something granted to you from an uplink item (and also
you get those for free with your ~~xbox~~ infiltrator medical room so
lol), and operatives just got the kit for one reason and one reason
only. That combat defib as a _weapon_.

Fuck that. So the kits now much better as a way to both support yourself
AND your team through providing a range of improvements you can provide
the squad, while also not undermining the reason why people may have
wanted the kit (that defib). I would really like to see more nukies
attempt to support one another in combat, and a medic operative is a
role that needs love to make that a reality.

**Edit here**: I reintroduced a low end kit with more c2 medical
supplies _if you want them_. I can see how someone might pinch all of
the medical supplies like a cunt, so maybe we should have a failsafe for
that.

A huge culprit of the lack of value of support meds was usually that
ops...explode when they die. If a medic can pop atropine into an op
before they die, they might be able to save them, or an op could pop
themselves with atropine prematurely to maybe stave off death.

## Changelog
🆑
balance: Splits the nuclear operative combat medical kit into two
versions: basic and premium.
balance: Basic contains additional amounts of basic c2 chem patches,
some spare atropine autoinjectors, sutures and regen mesh, and some
basic medical equipment for tending wounds. 4 TC (as it was before).
balance: The premium kit is a far more useful full suite of advanced
medical equipment, MODsuit modules, medical supplies and cybernetic
implants, including the combat hypospray and the combat defib. 15 TC.
balance: Atropine stops bomb implants from automatically detonating on
death. You can still manually activate your bomb implant (even when you
are dead).
balance: Operatives start with an atropine pen to stop themselves and
their allies from detonating so they can hopefully be saved by a medical
operative.
add: There is a pamphlet to explain this in the nuclear operative's
survival box.
add: I'm not telling you to read the pamphlet, but you should probably
read the pamphlet.
/🆑

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-11-27 16:20:24 +01:00
GoblinBackwards
80f7366c21 Fixes being able to get to centcomm and move through floors when in mechs/boxes (#71486)
## About The Pull Request
Fixes #71484 - Adds a check to the down verb to make sure a z level
exists below before trying to move.
Changes some step() in relay_move procs to use zMove instead if they
have a direction of up/down, as this was causing you to be able to phase
through floors if you were in a cardboard box/mech/etc
## Why It's Good For The Game

![dreamseeker_LuXqZUhvNg](https://user-images.githubusercontent.com/22856555/203672877-6b7da56c-494a-49dc-a8c8-13b15c2133eb.gif)
## Changelog
🆑
fix: Fixed being able to move through floors and get to centcomm when
moving up/down while inside mechs and similar movable objects.
/🆑
2022-11-25 00:29:11 -08:00
Mothblocks
fa7688d043 Save 0.6-0.7s of init time by splitting registering lists of signals into its own proc, and optimizing QDELETED (#71056)
- Makes QDELETED use isnull(x) instead of !x, giving about 0.2 to 0.25s
of speed.
- Make disposal constructs only update icon state rather than go through
expensive overlay code. Unfortunately did not have much effect, but is
something they should've been doing nonetheless.
- Makes RegisterSignal only take signals directly as opposed to
allocating a fresh list of signals. Very few consumers actually used
this and it costs about 0.4s. Also I think this is just a bad API anyway
and that separate procs are important

`\bRegisterSignal\((.*)list\(` replaced with `RegisterSignals($1list(`
2022-11-22 07:40:05 +00: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
ATH1909
0119a054b3 samus bombs deal the same base damage to objects and mobs (#71215)
## About The Pull Request

reduces the damage modsuit bombs do vs. objects from 15 damage to 12.

## Why It's Good For The Game

whoever made modsuit bombs decided to define a damage variable with an
autodoc comment of "Damage done on explosion.", then _only use it for
object damage_, with a *hardcoded value of 12* being used for the damage
to mobs. it's a 3 point difference in damage, so I figured that the
better solution would just be to just unify the damage values instead of
making a new variable for this.

an alternative I considered was buffing the damage vs. mobs/hostile mobs
from 12/48 to 15/60, but idk if that'll affect lavaland balance in a bad
way. if it won't, go ahead and tell me and I'll do that.

## Changelog

🆑 ATHATH
balance: The damage modsuit bombs do to objects has been reduced from 15
damage to 12, to match the damage they deal to non-hostile mobs.
/🆑
2022-11-17 21:49:42 -08: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
Fikou
78124de4c1 concussive gauntlets now launch you away from gibtonite and mine basalt (#71108)
when you mine gibtonite using concussive gauntlets, you now get launched
away from it, so you wont get hit by the explosion
also lets them mine basalt for glass
2022-11-07 14:07:51 -05:00
Jacquerel
140c12b580 Giant Spider action fixes & Action feedback (#70848)
I went into this just planning on fixing some weird behaviour with
spider buttons and ended up touching a lot of files.

Specifically this is because some of the actions used by Giant Spiders
would print feedback messages in IsAvailable, which was bad because this
is called every time the button updates and so would (for example) print
a bunch of messages about eggs existing when you spawned as a
broodmother because the lay eggs button would be checking for that when
it was granted to you.
The feedback _is_ useful though so I've implemented a pattern used in
Spell where we just pass a flag describing whether we want to print it
or not, which is generally set to true in Trigger() or if the player
physically pressed the button.

A side effect of this is that any action with usability flags (such as
"not when handcuffed") will now tell you why it is failing if you click
it while it is unusable, which is nice.

The spider changes are largely to make sure that their buttons are
tinted at the correct time, they were previously tinted red as if
inactive at almost all times due to the icon not being updated when
relevant conditions changed.
This necessitated adding a new signal (two actually) sent when a
do_after begins and when it ends (for any reason, including premature
interruption).

I also fixed a quirk where the Wrap ability had a permanent 'active'
outline after using it once (the icon states were inverted).

I also fixed a bug where you could just lay infinite enriched eggs after
eating one guy, which is not how the game describes it as working.
I looked up the PR adding it
(https://github.com/tgstation/tgstation/pull/54451) and one egg per kill
seems to be how it is supposed to work.

And finally I changed a few nurse spider to_chats into balloon_messages,
on the principle that they're not information which needs to stick
around for more than a few seconds.
2022-11-05 22:09:17 -05:00
Fikou
a943cc4ca6 MODsuit action button resprite (#70988)
## About The Pull Request
resprites the modsuit action buttons, turning it from these reused icons

![image](https://user-images.githubusercontent.com/23585223/199305682-161ba3e7-f15a-41f5-8e21-65857e076281.png)
into these unique icons by imaginos

![image](https://user-images.githubusercontent.com/23585223/199310820-c972ea85-7307-4260-8590-58d15fb2eb13.png)

## Why It's Good For The Game
reduces the vagueness of the icons, tells the players about the lmb/rmb
functions of them from the get go.
the old ones being the engineering suit twice and a swarmer
deconstruction sprite really were not great

## Changelog
🆑 Imaginos
imageadd: new icons for modsuit actions
/🆑
2022-11-04 01:00:42 -07:00
MrMelbert
1ac4a67c27 Chefs can now kiss food they make to make it with love. (And a lot of cooking refactoring) (#70409)
About The Pull Request

    Adds a skillchip to the chef's vendor. This vendor allows the chef to kiss their food to deliver a chef's kiss.
        Chef's kissing your food will add the "love" reagent to the food, which makes people much happier when they eat it. Be careful, overdosing on love can cause heart attacks.

    Refactors microwaving.
        Separates microwaving out of the edible component and makes it its own element, like grillable and bakeable.
        Also removes some magic numbers from microwave code.

    Code improvements all around baking and grilling code.

    Refactors edible component inheritance.
        Inheriting the edible component is now a viable way to cleanly add food types, flags, and callbacks. This makes it much much easier to change the values of an edible item without adding hacky signals / procs / getcomponent.

Why It's Good For The Game

Emergent chef gameplay.
Being able to further enhance your food with mood buffs.
Better code.
Changelog

cl Melbert
add: Chefs can now make food with love. They can purchase a skillchip from their vendor which enhances their kiss emote. Using your kiss on food you create will add a special reagent to it which makes it nicer.
refactor: Separated Microwavable from the Edible component, refactored microwave act to accompany this
refactor: Refactored how grilled items are generated
refactor: Refactored how silver slime food items are generated
refactor: Refactored how edible items inherit new edible statuses
code: Removed some magic numbers from microwaves
code: General code improvements for grillable / bakeable / etc
/cl
2022-11-04 09:45:01 +13:00
GoblinBackwards
a2bcc71706 Makes the Space Ninja modsuit module buttons pinned by default (#70997)
## About The Pull Request
Makes space ninjas spawn with their modsuit action buttons already
pinned
## Why It's Good For The Game
The radial menu isn't really practical for abilities you're going to be
using mid-combat, the throwing star dispenser is especially bad since
it's basically impossible to use at the rate it comes off cooldown if
you don't have it pinned.
People shouldn't need to know how to pin the modules or to go through
the UI pinning each of them just for the antag to be playable.
## Changelog
🆑
qol: Space Ninja now has their MODsuit module buttons pinned by default
/🆑
2022-11-03 20:53:10 +01:00
Fikou
5bb972c94a (hopefully) improvements to use of scope and kinesis module (#70934)
## About The Pull Request
so, scope and kinesis are the only things in the game (other than the
body zone selector) which use the function MouseMove. this tracks every
mouse movement, which meant we had to stuff a cooldown on it to not
calculate a ton of useless stuff. this time can misalign if you move
your mouse fast, not registering at all, as well as not working out with
the 0.2 second processing time of the things handling it (the scope
component and kinesis module)
instead of doing that, we are now keeping the mouse parameters as a
variable, which we update with every mousemove to the current
parameters. then we handle the calculations right as we need them (in
the kinesis/scope) module, rather than relying on mousemove cooldowns,
this should hopefully feel way better

## Why It's Good For The Game
😁 

## Changelog
🆑
qol: sniper scopes and kinesis module should feel better to use
/🆑
2022-11-01 20:02:13 +00:00
MrMelbert
01c7f6541c Fixes cyborg projectile dampner runtime (#70888)
- Adds some missing `SIGNAL_HANDLERS` to projectile dampeners
- Fixes the cyborg projectile dampener having incorrect arguments
2022-11-01 00:31:52 +01:00
MrMelbert
a1ab0201ff Fix halloweens races (#70874)
* Fixes halloween races.
- Fixes a race condition involve checking for holidays befores SSevents is instantiated. Now, holiday checking is done through a helper, which will ensure the holidays list is created and filled before checked.
2022-10-31 16:01:31 +01:00