Commit Graph

1807 Commits

Author SHA1 Message Date
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
Jacquerel
fb53f4be81 Fixes arrivals shuttle runtime (#74296)
## About The Pull Request

Fixes #74172

Some signals were added to this component late in development and
weren't unregistered when the component was removed, now they are.

## Why It's Good For The Game

This runtime was annoying me.

## Changelog

Not player facing.
2023-03-28 23:27:23 -06:00
Thunder12345
0e70a14d24 Adds The Sturdy Shako (HoS Hat) (#74277)
## About The Pull Request

Adds a new craftable HoS shako, made from the standard peaked cap and
some plasteel and gold.


![shako](https://user-images.githubusercontent.com/5479091/227799392-ad2ea145-5c58-45d7-8763-a76e9323ec09.png)

Moves the HoS cap into a subtype `/obj/item/clothing/head/hats/hos/cap`
to avoid catching the beret in the crafting recipe, the base type
`/obj/item/clothing/head/hats/hos` is now a generic subtype which should
never exist.

(Yes there's a TF2 reference included with the hat)

## Why It's Good For The Game

Adds an additional level of style for an HoS willing to put a little
effort into gathering the required materials. As it is crafted as a
one-to-one trade with another headgear there is no additional spare
headgear introduced.

## Changelog
🆑
add: The Nanotrasen Costuming Department has released specifications for
how to convert the Head of Security's cap into a shako.
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
2023-03-27 13:37:51 -06:00
Watermelon914
55528681b1 Reduces progression cost of a lot of traitor items. Groups assassinate/behead/eyesnatching objectives together so that they're treated the same under the traitor no-dupe rules. (#74270)
<!-- 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

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->
Assassinate/behead/eyesnatching objectives now share one common type so
that they don't end up sharing the same targets. Also, this allows me to
limit the amount of assassinate/behead/eyesnatch objectives by treating
them like one objective type instead of 3 separate objective types.
As a result, you can only get 4 of these objectives within a 15 minute
period, which means your potential objective list won't be flooded with
assassinate/kidnap objectives.

Additionally, progression costs for traitor items have been rebalanced.
Primarily, progression costs have either been removed or reduced for
most non-murderboney traitor items. There are a few notable exceptions
where the progression costs have been removed/reduced for murderboney
traitor items, primarily for the Clown Car and His Grace. I'll go into
the reasoning why below.

Also fixed an obscure bug where traitor categories with a list depth
greater than 2 would have their list mutated because they weren't being
properly deep copied.
Also, purchasing His Grace or Syndicate Balloon will now lock you out of
future purchases and they can't be bought if you've already bought other
items.
## Why It's Good For The Game

<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->
Less duplicate objectives is for the better. Also, this'll give some of
the other objectives some breathing room to appear.

Progression costs have been normalised amongst the more
murderbone-orientated items so that they all mostly unlock at 30 minutes
for consistency purposes.

Progression costs have been largely reduced for non-murderboney items
because most of these items didn't need a progression cost in the first
place, as they weren't really a problematic tool to use at the start of
a round.
For the items where their progression cost was reduced to 5 minutes,
I'll go into the reasoning why now:
**Clown car** - It's not really a tool that's used for murderbone and it
works best at the start of a round. It can end up killing a large
portion of the crew, but it takes a lot of effort to reach that point. I
think reducing the progression cost of the clown car to 5 minutes allows
for the clown car gimmick to happen more often.
**His Grace** - Now this is a tool that is used primarily to go on a
murderbone, but the reason that the progression cost has been decreased
down to 5 minutes is because I think it's the one tool where you are
supposed to get it at the start of a round and go on a murderbone, given
its absurd price tag and the fact that you're required to kill others to
survive. If this ends up being a boring roundstart murderbone tool, then
I can look at increasing the progression cost back up to 30 minutes, but
it's worth giving it a shot.
To balance out His Grace, you can't purchase any uplink items after
purchasing it, and it can't be purchased if you have already purchased
items.

## 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. -->

🆑
balance: Reduced the reputation cost of most non-murderbone orientated
uplink items like hypnotic flash and emag.
balance: Reduced the amount of assassinate/kidnap/eyesnatch objectives
that'll appear at once.
/🆑

<!-- 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: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
2023-03-27 18:30:36 +01: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
John Willard
3e41388e20 Removes networks from the game (#74142)
## About The Pull Request

This is a continuation of
https://github.com/tgstation/tgstation/pull/74085 - I announced in the
comments there that this would be my next PR, and this is it.

Removes SSnetwork, ``/datum/ntnet``,
``/datum/component/ntnet_interface``, ``var/network_root_id``, the
network unit test, and a lot of other things related to networks.

- NTNet circuits now check for an Ntnet relay, and uses signals to
operate.
- Logs in Wirecarp is now only for PDA and Ntnet Relay things, so you
can no longer see what ruins exist using it (why should Wirecarp know
that Oldstation spawned? The flavor is that they dont know its there).
- Removed it from MULEbots entirely, I don't think it even did anything
for them? Botkeeper seems to work without it, so it's possibly there
from pre-tgui PDAs.
- Moves assigning random names to a base proc instead of being tied to
network, this is things like random-naming scrubbers/vents. The behavior
hasn't changed at all.
- Makes Ntos work for consoles when relays are down, as the comments
said they're supposed to (because they're wired). I think this was an
accidental change on my part, so this is a revert of that.

## Why It's Good For The Game

Ntnet is ancient code that hasn't given us much that we can't do with
already existing alternatives, we've been slowly moving away from it for
init times, and though a large portion of that was limited to airlocks,
I still don't think this is a system worth keeping around.
It's way too complex to expect feature coders to do anything with it,
and too old with better alternatives for anyone to want to improve any
of it.

## Changelog

🆑
fix: Computers are now properly connected to Ethernet, and can use Ntos
when Relays are down.
refactor: Removes Ntnet and Ntnet interfaces, which was only used by
Ntnet circuits (which now directly checks for a Relay to work) and
MULEbots, which did nothing with it.
balance: Wirecarp no longer tells you what ruins spawned in a round,
instead it's limited to PDA logs, and tells you the source too. This
means the RD can catch someone running illegal programs if they don't
make any attempt at hiding it.
qol: Wirecarp logs is now set to save 300 at once, instead of 100 and
being increased to 300 by the RD during the round. This is pretty
insignificant, since there's no reason to NOT want as many logs as
possible.
/🆑

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2023-03-26 03:02:28 -07:00
jimmyl
2b9bd4acad Turns stickers into a component and an element (#74091)
## About The Pull Request
Adds /datum/element/sticker, and /datum/component/attached_sticker
Sticker items now mostly operate off /datum/element/sticker
The sticker element, hooks the whole "attach to stuff" and adds the
attached_sticker component to its target
The attached_sticker component, adds the overlay, hooks the clean and
on-fire signals.


## Why It's Good For The Game

Allows to check if a sticker is present on an object (which I will use
later)
Code is probably cleaner???

## Changelog
🆑
refactor: Stickers use a component and an element now to do their
sticking
/🆑
2023-03-25 21:57:20 +00:00
san7890
a6f49ed542 Refactors Suiciding Variable Into Trait (#74150)
## About The Pull Request

Firstly, this var was on `/mob`, even though only `/mob/living` and
`/mob/dead` could have ever used it, so who knows how much needless
memory it was consuming on stuff such as `oranges_ear` that would never
ever ever use something like this.

Edit: okay instead of memory it just polluted variable edit windows for
all /mob when it didn't need to. I like having a slim VV window

Secondly, it's a technical improvement over the previous system as we
are able to "track" where a suicide originates from, and how we can
track that from mob-to-mob-to-mob. Previously, the boolean `suiciding`
would only inform us if they had ever been connected to a mob that had
ever committed suicide, but now we are able to precisely determine which
mob gave them the trait that they must now apparently bear until the
round restarts.

## Why It's Good For The Game

Less memory usage, more indepth ability to track suicides in case you
really need that dexterity. Currently no implemented code could benefit
from using it, but it would be pretty neat if someone could figure out a
way to have someone be guilt-tripped whenever they look into a mirror
and seeing the reflection of their past life? This PR won't actually
help you code that and it'll probably require a bit more work, but it's
a possibility of some cool interactions you can do when you have this
information available to you.


![image](https://user-images.githubusercontent.com/34697715/226506321-550c37e7-5de8-4f9f-9ceb-4bf9b1052597.png)

## Changelog

🆑
refactor: Some aspects of how we track suicides from your living mob to
your observer have changed- please do let us know if anything has broken
via a GitHub Issue Report.
/🆑

There's probably some technical improvements that can be made in some
parts of the code I reworked to accommodate this change, do let me know
if you spot any easy ones (or fuckups). a lot of excess comes from the
fact that any step in the TRAIT framework trusts that you are passing in
a valid datum (or subtype) so that's a thing
2023-03-21 20:06:45 -04:00
Jack Edge
21ba2c10a8 Correct grammar, tags, procs involving food processing (#74097)
The wording of microwable/grillable/processable outputs now takes into
accounts plurals.

For example, the examine text for an onion slice is now: "The onion
slices can be baked into _some_ onion rings", rather than "an onion
rings".

- Examining microwavable things now uses "can be", rather than "could
be"; the same verb as bakeable and griddlable.
- Processing atoms now uses `plural_s()` rather than just a flat `/s`,
which is unreliable.
- The use of `<b>` tags has been changed to `span_bold()`.
2023-03-19 18:33:33 -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
Jacquerel
0fe4dea03f Audits usage of isanimal() vs isanimal_or_basic_mob() (#74029)
## About The Pull Request

There's a couple of open issues which fix places where only simple
animals were considered, but they are doing it piecemeal.
I decided to just go through every instance of `isanimal` or
`subtypesof(mob/living/simple_animal)` I could find, identify which
should also affect basic mobs, and fix them.

I left out the two others which are already in PR, I'm not stealing your
GBP.

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

## Why It's Good For The Game

Consistency, mostly. 
As far as I can tell all of these things _should_ have effected basic
mobs, but didn't.
This fixes a fair number of bugs but also they're bugs that nobody
noticed or reported.

There are a couple of places I did not update which will need updating
in future. These are:
- Dextrousness checks, because basic mobs don't have that yet.
- The Charge cooldown action, because frankly I couldn't tell what it
was trying to do.

alright here goes

## Changelog

🆑
fix: Carp will once again be healed from being near carp rifts
fix: Sepia slime cores and the rewind camera now work on Ian
fix: Sapient ridden carp (or cows) can throw off their riders by shoving
them, or by performing the spin emote.
fix: Giant Spider AI will be disabled by the timestop spell
fix: Ian can eat envirochow
fix: Mice, Frogs, and Cockroaches will no longer set off bear traps
fix: You can put a macrobomb implant into Cayenne (or Ian)
fix: Ian will now recognise that being squeezed by a cyborg is a nice
hug
fix: The player panel will tell admins if you're currently a corgi
fix: The staff of storms deals massive damage to Bileworms and Giant
Spiders
fix: Ian will whimper if forced to scream
fix: Slimes can consume space carp
fix: Mice can be captured in xenoballs
fix: You can use pacifying potions on Giant Spiders
fix: Sgt Araneus can be fitted with a xenobiological radio implant
fix: Sapient corgis no longer count as living players for the purpose of
highlander escape objectives
fix: The random sentience event can now target corgis and sergeant
araneus
add: The random sentience event can target a wider array of farm animals
fix: Petsplosion wizard event can target corgis
add: Petsplosion wizard event will now target farm animals and
mothroaches
fix: The colossus possession crystal can now actually possess the
cockroach it spawns, does not kill you instantly upon ending possession
/🆑
2023-03-17 13:47:07 -06:00
SyncIt21
2bab78bcc6 Fixes atmos machinery breaking when the area is edited/renamed via station blueprints & Deletes empty areas, ARCD upgrades (#73850)
## About The Pull Request
1. Fixes #70430
- APC's
- Air Alarms
- Fire Alarms
- Vents
- Scrubbers

Now all re-assign themselves to their correct areas & properly rename
themselves after an area has been created, modified via the station
blueprints.

2. Now Area's can't be expanded if both the current area where the
player is standing and the selected area both have an apc because that
would make the final area have 2 apc's

3. When 2 areas are merged, If the old area has no more turfs left then
it is deleted

4. Bonus fixes
- is removed redundant `Initialize()` proc inside light switch.
- arcd has all upgrades installed

## Changelog
🆑
fix: area machinery from breaking after creating & modifying areas via
the station blueprints.
refactor: turfs are cannonized from areas during creation/editing
operations & empty areas are deleted
refactor: removed duplicate Initialize() from light switch
refactor: arcd has all upgrades installed
/🆑
2023-03-16 11:32:54 -04:00
SyncIt21
8115310c6f More stuff to construct & destroy (#73942)
## About The Pull Request
**1. Suit Storage Units**
- What about them?

1. You can print "suit storage unit" circuit boards from engineering &
science circuit printer's after research to make more suit storage
units, now since they behave like regular constructable machines you can
deconstruct them via screwdriver & crowbar.
   2.  You can upgrade its capacitor to get faster charging speeds

- Why its good for the game?
   1. You can rebuild these in the event they get destroyed
   2. Better tier capacitors = faster charging speeds
3. More storage units = More places to decontaminate your equipment +
Recharge more mod suits made in robotics
4. If you decide to leave the game or your done using a mod suit e.g. a
mining mod suit rather than keeping it to yourself or throwing it away,
just build a suit storage unit and hang it there so other players can
use it i.e., sharing is caring.
  
**2. Freezer Cabinet**
- What about them?
 1. They are now craftable
       
![Screenshot
(133)](https://user-images.githubusercontent.com/110812394/224561037-5461be22-e651-4d72-8afc-f797bb7d8a47.png)

  3. You can deconstruct them with a welding tool.
   
- Why its good for the game?
  1. You can now make more of them if they get stolen/destroyed
  2. More places to store food, dead bodies, whatever

**3. Flood Lights**
- What about them?
They can now be fully deconstructed in the exact opposite sequence you
constructed them.
  - First use screwdriver to open its panel
  - Then use empty hand to remove light
  - Then use screwdriver to unscrew the wiring from frame
  - Use wire cutter to remove wiring completely
  - Finally use wrench to completely deconstruct frame
 
- Why it's good for the game?
Reclaim used material to build flood light else where . Also much more
clean than what the wiki is suggesting.
  
![Screenshot
(134)](https://user-images.githubusercontent.com/110812394/224561553-f44a97f3-ac70-49e7-892f-1a05e2323ecb.png)

  ## Changelog
🆑
add: suit storage unit circuit boards to engineering & science
department circuit printers.
add: freezer cabinet as a craftable & destructible item.
qol: flood light can now be deconstructed rather than destroyed/thrown
away.
/🆑

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
2023-03-16 01:31:09 -07:00
necromanceranne
6d55729502 Adds the Snatcherprod. It steals stuff from peoples hands and puts it into yours! (#73746)
## About The Pull Request

Adds the Snatcherprod, the telecrystal version of the teleprod. It
yoinks an item out of the victim's hand, and puts it into yours. Or on
the ground, if your hands are full.

You make it like you would a teleprod, but using a telecrystal instead.

## Why It's Good For The Game

It was a funny joke I observed. Also I'm deeply sleep deprived and so my
better judgement eludes me during these capricious moments.

## Changelog
🆑
add: Adds the Snatcherprod. Like a teleprod, but it steals stuff from
peoples hands instead. Made using a telecrystal, rather than a bluespace
crystal.
/🆑

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2023-03-14 22:59:21 -06:00
Mothblocks
7098b1f2b7 Clicking on the >> WALL << of a fire alarm/light switch with your hand will activate it (#73920)
## About The Pull Request

Clicking on the turf of a fire alarm/light switch with your hand will
activate it, similar to how you can click the turf a door is on to close
it and not pixel hunt. Refers to the turf it *looks* like it's on, not
the one it actually is on, since fire alarms and light switches are
actually on the turf near the wall, pixel shifted up.

False walls are ignored.

## Why It's Good For The Game

Lets our artists do whatever they want to these sprites, or those of
future consumers, without worrying about niche balance stuff. I really
like people using fire alarms for environmental combat and don't want
that to get in the way of spriting.

## Changelog
🆑
qol: Clicking on the turf of a fire alarm/light switch with your hand
will activate it.
/🆑
2023-03-14 19:08:57 -06:00
Time-Green
9843c23657 Replaces internal_organs with organs (#73918)
Internal_organs now also contains external organs, so the naming was
incorrect

Requested by @tralezab in #72734

Also removed some now incorrect 'as anythings' that assumed everything
in the internal_organs list was an internal_organ (which is a lie since
I put extorgans in there which means runtimes and unintentionakl
behaviour

🆑
fix: fixes deadly harvesting just taking harmless extorgans
code: renames internal_organs to organs now that it can also contain
external_organs
/🆑
2023-03-14 18:33:35 -06:00
TheSmallBlue
1dad66101d All hail The Pickle Jar, harbringer of better crafting (#73939)
## About The Pull Request
Fixes #73841 

---

_It is the 12th of March, 2023. Around 3am. I have published a Pull
Request which involves circuits, and got reminded of my low GBP. I go
into the issues tab to see if there's anything someone of my low skill
caliber could tackle. I see it; Pickles.
"How hard could I be?" I ask myself, foolishly unaware of the dangers
that would soon overcome me.
Surely it must've been a mistype, I thought. Surely someone accidentally
confused pickles and cucumbers.
"Wait, the pickles are supposed to be created on the jar when the jar is
created", I say foolishly.
"Wait, its putting the ingredients used for the jar in the jar, that
doesn't explain why the pickles aren't there though", I say foolishly
"Wait, whoever tried fixing this earlier fucking qdel'd the beaker and
called it a day????", I say, foolishly._

---

Anyways I changed how the crafting menu distincts between categories,
instead of checking whether or not the path is for food, it checks the
actual categories themselves (why didn't it do this already), meaning
that you can have non-food items on the food tab if it has a food
category. Did this by adding a list that includes all crafting
categories, so in the future when adding new categories you'll have to
add them twice, which sucks, but oh well.

Also added a new variable to craftable items, which makes it so that you
can not delete a container's contents if you so wish (why was this the
default).

All this so that when you craft pickles, it actually crafts pickles
instead of cucumbers.

I spent hours on this, its 6:30am as I'm typing this. I'm tired. Fucking
pickles.

Super duper ultra thanks to FinalPotato for guiding me and suffering
with me through this and teaching me so much about DM and BYOND. I
cannot emphasize just how helpful and awesome they were thank you thank
you thank you <3
## Why It's Good For The Game

Bug fixing be good
## Changelog
🆑
fix: The jar of pickles, after millenia, finally actually contains
pickles. All hail the jar of pickles.
/🆑
2023-03-14 16:36:47 -06:00
Kyle Spier-Swenson
ffd3edc22b admins can use the spawner component again (#73976)
Not playing code vanity project with this shit.

Do not require data that just gets stored on a var to be passed via the
stack.

---------

Co-authored-by: san7890 <the@san7890.com>
2023-03-14 16:18:55 -06:00
LemonInTheDark
dd419e77be Converts the crackable element to mutable appearances, saves 0.15 seconds of init (#73941)
## About The Pull Request

Instead of passing in an icon as a source to the alpha mask filter, we
can stick a mutable appearance in our overlays list with a render target
set, and use that render target to do our masking. Remember to use "*"
to avoid rendering the crack twice

## Why It's Good For The Game

CPU time
2023-03-13 16:25:40 -06:00
NamelessFairy
bd6a018083 Adds Pinatas that can be purchased by cargo and clown operatives! (#73868)
## About The Pull Request

Pinata's drop various items when struck with a sufficiently powerful
weapon. This PR adds two types, a standard one which can be bought from
cargo which contains various candy items and a syndicate one which
contains both candy items and explosives purchasable by clown
operatives.

The pinata functionality is also a component so admins can turn any
structure/machine/mob into a pinata and customize the "candy" inside

Sprites by @Mey-Ha-Zah animated versions by me
## Why It's Good For The Game

Adds a cute little celebration themed structure that can be bought by
players to accommodate a celebration based gimmicks or the party trait.
I think the options on things to do as a crew during a celebration are a
bit limited at present with most of the options being making/purchasing
food, activity wise the main example of a celebration item is pin the
tail on the corgi which is a bit uninteresting, the pinata on the other
hand is more cathartic and provides a "reward" in the form of various
candy items for people who participate in smashing it. I also think its
just funny to have clown operative gambling half their TC to try and get
explosives.
## Changelog
🆑 Mey-Ha-Zah & NamelessFairy
add: Added pinata crates to cargo, they contain various candy items. Fun
at parties.
add: Clown operatives can now purchase a weapons grade pinata, this
contains both candy and explosives. Still fun at parties.
admin: Admins can now turn players, mobs and objects into pinata's with
the new pinata component.
/🆑
2023-03-13 16:20:34 -06:00
Vladin Heir
502bc896aa Fake nuclear authentication disks now have a placebo keep_me_secure component (making them more convincing) (#73890)
## About The Pull Request
In #73453, we were given the `keep_me_secure` component. Something I
think was long overdue, really.

However, it came at a terrible price...
<details>
  <summary>The Lore</summary>

Tell me, John Assistant with absolutely no disk verifier skillchip,
which nuclear authentication disk is real?

![image](https://user-images.githubusercontent.com/44104681/224259065-1176d783-355c-4d83-a7a2-d0a5fa1324fa.png)

The one on the plastitanium glass table?

![image](https://user-images.githubusercontent.com/44104681/224259331-3f7bc729-f451-4c52-9534-b4a86a433d91.png)

The one on the titanium glass table?

![image](https://user-images.githubusercontent.com/44104681/224259436-3aeecb65-57c8-4806-82e9-9e586d44d9e5.png)

Or the one on the reinforced plasma glass table?

![image](https://user-images.githubusercontent.com/44104681/224259583-2e2cb6ad-a6a7-4f7f-b012-9102fe51bc01.png)

The one on the plastitanium glass table you say?

![image](https://user-images.githubusercontent.com/44104681/224259817-1edfbe68-94a9-4f0d-be99-c52adf682774.png)
B-but how did you know?!
</details>

tldr: Anyone can tell the real disk apart from fakes because only the
real one has the `keep_me_secure` component examine message! This PR
fixes that by adding the `keep_me_secure` component to fake disks. It
won't actually do anything - and I added a check to `keep_me_secure` so
it won't process if there are no callbacks passed, avoiding Free Lag.
This just gives the fake disks the same examine message as the disk, so
it won't be so obvious.
## Why It's Good For The Game
Bugfix good. Futureproofing good. Fake disk noob trap bad. Disk verifier
skillchip should actually do something.
## Changelog
🆑
fix: Fake nuclear authentication disks have been updated to include the
holographic security sticker found on the real disk, one again making
them convincingly real to the average person.
code: The keep_me_secured component will now only process if it has at
least one callback argument passed.
/🆑
2023-03-11 00:56:23 -07: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
Rhials
3ab262f165 The CE blueprints can no longer be used to obfuscate cultist summon locations (#73853)
## About The Pull Request

The Nar'Sie summon message will now only use the original name of the
ritual site area. You can no longer fake out the ritual announcement by
renaming the area with the CE blueprints.

The ritual site locator HUD popup now also uses the original area names,
to prevent the same issue from occurring.
## Why It's Good For The Game

Closes #73036.
## Changelog
🆑
fix: The cultist ritual site locator and Nar'Sie summon message will no
longer use area names modified by the CE's blueprints.
/🆑
2023-03-10 21:34:07 -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
Jacquerel
153c1818e5 Reworks sabotage progression traitor objective (#73750)
## About The Pull Request

This one is a little bit of a more abstract change than my last traitor
objective rebalancing PR.

The idea here is that I think that the objectives which have you
sabotage a frequently used machine (lathes or the ORM, but we can maybe
expand it to others following this?) are potentially pretty good but
limitations in how the objective are tracked mean that people go about
them in a boring way which rarely inconveniences anyone.

I have reworked these objectives so that you can choose to apply a
provided item to the machine over 10 seconds. The next interaction
following this (clicking on it, or in the case of the ORM loading any
ore into it) will cause the machine to explode, destroying itself and
lightly damaging people nearby (explosion damage is... variable, but
it's a light explosion so it won't instantly kill anyone).
There is a 0.5 second grace period between the bomb triggering and the
explosion actually happening, which players can use to perform some kind
of tactical reaction or simply to feel regret.

Here's a video:
https://www.youtube.com/watch?v=xNIaHsA9YFE

Trapped machines will intermittently beep, though at a volume which is
hard to detect from more than two tiles away, and can be defused by
using a screwdriver on the machine.
If you choose to do this then you will get a little bonus to TC and
reputation, but only if the trap is successfully sprung. This means that
sabotaging a machine in an empty department is unlikely to lead to quick
success.
You can also still do it with screwdriver and crowbar way if you are
boring but this means you will only get reputation and not any
telecrystals.

The two objectives to destroy a radio server or the research machine
remain as they were.

Also I refactored how we set which machines are targets for these
objectives so it doesn't iterate over every machine in the world every
time.

## Why It's Good For The Game

Traitor objectives (and antagonist objectives in general) should:
- Present you with a somewhat engaging task
- Encourage you to interact with at least one other player (at least by
"attempting to sneak past them")
- Move the state of the round forward in some way, usually by creating
inconvenience for at least one other person

Prior to this change you could, and people often did, complete this
objective by accessing a machine that you already _have_ access to,
using a screwdriver and crowbar on it, and then reassembling it.
This prompts interaction with nobody, and inconveniences nobody.

Following this change people will be encouraged to:
- Actually destroy the machine.
- Probably harm somebody.
- Potentially cause some collateral damage.
- Make loud sounds and flashing lights to delight people of all ages.

Even if you opt to set the device in a little-used department and then
blow yourself up, that will prompt you to go and interact with someone
in medbay and will also look pretty suspicious in a way that's much
harder to track with the previous objective.

Also I might reuse this component again in the future, you never know.

## Changelog

🆑 Jacquerel, sprite by J(Clearly Lying)
balance: Traitor objectives which ask you to destroy lathes or the ORM
provide an optional bonus if you _booby trap_ the machine using a
provided tool. This causes the machine to explode the next time it is
interacted with.
balance: Performing the objective without rigging the machine to explode
awards no TC, using it awards more TC than it did previously.
/🆑
2023-03-10 22:58:11 +00:00
MrMelbert
8284a7faab Fixes some invisible inhands from the transforming component (#73807)
## About The Pull Request

The original issue caused by #70037
Esword issue caused by #73716

Originally the transforming component did not override the inhand icon
state of the the item on its own (instead putting the onus on the item
itself if they wanted unique behavior). It was changed to always update
inhand icon state, most of which don't have one

I don't really like this fix, it should be explicit "I want inhand to
change" and not default, but this will work for now

Also the PR that fixed the Jaws issue didn't actually set the var they
created

Fixes #73805
Fixes #73711 (Actually)

## Why It's Good For The Game

Invisible sword bad

## Changelog

🆑 Melbert
fix: Fixed a eswords, some tools, and some other misc. items from being
invisible while extended / active
fix: Teleshields and other misc items not extending in hand when active
fix: Switchblades click on extend again
fix: Pendrivers click on extend
/🆑
2023-03-07 22:11:35 -07:00
san7890
a3451b7fe4 Makes "forced" opening and closing of doors way more sane (#73699)
## About The Pull Request

The gist is that people thought that this was a boolean value, which was
fucked up. It's not a boolean value, it accepts anything between 0 and
2. So, let's re-arrange the checks and framework, give it some
descriptive defines, just so people know what the fuck "2" actually
does. `DOOR_DEFAULT_CHECKS` (0) does stuff normally,
`DOOR_FORCED_CHECKS` 1 typically just checking if we aren't emagged shut
or something (i suppose it could happen), and `DOOR_BYPASS_CHECKS` (2)
means that we just get the fucking door open if it isn't physically
sealed shut/open somehow.

I don't know if `forced` has ever _been_ a boolean, but for some reason
people thought it was.

I also enforced boolean returns instead of passing back null. This did
not matter for close() but i think it's silly to have a TRUE/null
dichotomy so that was also touched up.
## Why It's Good For The Game

Much better to read, less confusing, less stupid. It's been irritating
me for a while now, so let's just implement it now. Had to make a few
awkward concessions in order to fit this into the current code
framework, but it should be a lot nicer. I also shuffled the order of
some code around because certain placements didn't make any sense (early
returns not being in the right spot for an early return).
## Changelog
Nothing that should concern players.
2023-03-07 11:24:44 +00:00
MrMelbert
1f551f21cc Fixes Luminescence actions (#73802)
## About The Pull Request

- Add Component was supposed to use a named arg, quick fix
- While testing the fix I noticed it doesn't properly remove the
appearance when the item is lost, cuts the overlay on failures

## Why It's Good For The Game

Mothblox said this broke things (it was making a weakref of a callback
on accident)

## Changelog

🆑 Melbert
fix: Luminsecent slime actions correctly update their appearance when
integrating or ejecting slime cores
/🆑
2023-03-06 17:42:23 -05:00
Jack Edge
c60018c834 Refactor egg to chick logic into component (#73537)
Refactored how eggs growing into chicks is implemented, and
how the number of chickens and chicks are tracked. It's now possible for
admins to make anything into an egg.

- Instead of the "fertility" of an egg being whether or not it's
processing (along with the ugliness of adding a variable to a item
defined in another file), fertile eggs are now implemented via
components.
- The number of chickens in the world, and the number of chicks hatched
from egg throwing are now global variables, rather than static variables
on the class.

I've tried very hard to keep these changes completely feature freeze
compatible, any variation in the old behaviour is non-intended (at this
point).
2023-03-06 07:39:58 -05:00
Kapu1178
4ab46358c0 Optimizes INVOKE_ASYNC by making it a macro and avoiding a proc call (#73264)
## About The Pull Request
This is quite literally the same behavior but faster, and also catches
improper arguments better than the old macro/proc approach.

Credit to Lohikar for writing the macro.
Port of https://github.com/DaedalusDock/daedalusdock/pull/196

Also, `world.ImmediateInvokeAsync()` never set a return value, so
expecting one was never valid behavior.

At MSO's request, the documentation of `spawn(-1)`:

As per the reference, calling `spawn()` with a negative value will
execute the spawned code until a blocking action (such as `sleep()`) is
encountered. Then, it will step outside of the spawned code, and
continue the proc. This is the same behavior as calling a `waitfor =
FALSE` proc. Specifically, under the hood, `spawn(-1)` creates a copy of
the callstack like `sleep()`, incase the spawned code is blocked and
needs to be rescheduled.

As an added bonus, `spawn(-1)` silences SHOULD_NOT_SLEEP errors, whereas
`waitfor = FALSE` does not.

## Why It's Good For The Game

ITS FREE FUCKING CPU TIME

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Kyle Spier-Swenson <kyleshome@gmail.com>
2023-03-04 19:33:37 -08:00
Zephyr
6163d06604 Sourced Component Backend (#73571)
## About The Pull Request
Adds a backend for sourced components. which was requested by @Fikou 
Also cleans up a little bit of the AddComponent logic

## Why It's Good For The Game

Backend for fancy stuff and having a component from multiple sources

---------

Signed-off-by: GitHub <noreply@github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-03-04 17:10:57 -08:00
FinancialGoose
b74c422d39 Fixes wrong inhand icon state for jaws of life (#73716)
## About The Pull Request
Fixes #73711
## Why It's Good For The Game
## Changelog
🆑
fix: fixed missing inhand icon state for jaws of life
/🆑
2023-03-04 03:05:47 -05:00
Profakos
50b37c8c7f Faction defines (#73681)
## About The Pull Request

Quite a lot of mobs had faction defines as a string, which always has a
chance for error. For example, the clown mob spawner had their faction
written as "clown", when the official faction name was "clowns", and a
define existed for it anyways! This PR moves every single string based
factions over here. No references or special role factions. Hopefully I
didn't miss anything.

I also moved a global define used for picking your uplink provider's
flavour to the only file that used it, datum_traitor.dm, and renamed
them a bit to avoid confusion.

I have also noticed that the mimic faction was assigned to the petrified
player with += instead of |=. |= would ensure no duplicate factions, so
I have changed it.

Future improvement:
I have noticed that there is a lot of bloat with factions that contain
only one or two entries (examples: gnomes, floating eyeballs, penguins,
the pet lizards), and some always appear in pairs (vines and plants, the
rare exceptions being killer tomatoes and strange reagent spawned pine
trees), but trimming consolidating them is a matter for a different
time.

## Why It's Good For The Game

Makes assigning factions a bit less error prone.

I can finally remove the ```/// Later all mob factions will be moved
here and their current factions replaced with faction defines.```
comment. Later is NOW.

## Changelog
Nothing player facing
2023-02-28 16:44:08 -07:00
Jacquerel
f435207376 Replaces Netherworld mob health scaling component (#73629)
## About The Pull Request

The netherworld mob refactor PR added a component called `damage_buffs`
which... was both kind of a little bit pointless and also didn't do what
the name said it did.
This adds a new component which actually does what that component
promised to do, and does it more reliably.

The previous system had sort of odd behaviour where a Migo would start
moving faster as it took damage but _only_ if it took damage with an
identifiable mob, so damage from the environment or lava or an explosion
or anything else which doesn't come with someone to blame wouldn't
update the mob, and neither would its health going back _up_... until
someone punched it at which point anything it should have been doing
before then would suddenly update.

This adds a new component which simply listens to
`COMSIG_LIVING_HEALTH_UPDATE` instead of `COMSIG_ATOM_WAS_ATTACKED` and
then interpolates the provided maximum and minimum values smoothly based
on how close you are to a maximum or minimum health threshold.
This is slightly different from the original behaviour which didn't
necessarily have those things change linearly and only did it in
increments of 25%... but this is cleaner.

## Why It's Good For The Game

Fixes some odd behaviour with these mobs.
Hopefully makes the code both cleaner and more reusable in the future.

## Changelog

🆑
refactor: Migos, Creatures, and Blank Bodies use a new shared component
to update their stats which scales smoothly as they take damage rather
than in stages.
fix: Migos, Creatures and Blank Bodies will all update their stats when
taking or losing damage regardless of it was from an identifiable enemy.
/🆑
2023-02-27 16:27:50 -07:00
Jacquerel
705f7a419c Refactor Statue & Creature unobserved behaviour (#73630)
## About The Pull Request

While I was touching the Creature file for another PR (#73629) I noticed
that an identical proc was implemented here and on Statue.
I moved it into a component and managed to hook it into signals which
have return flags.

This required a bit of a refactor of their abilities too, but that was
for the best because one of them had a reimplementation of Jaunt which
could have just been a subtype of Jaunt, and none of their abilities had
icons.

I also made `spell` send `COMSIG_MOB_ABILITY_STARTED` in `PreActivate`
because it completely overrides the parent and doesn't do that as a
result.

## Why It's Good For The Game

I'll be honest this is mostly because I was looking at the code and
didn't like it, I don't think there were any bugs related to this but it
does reduce chat spam a little bit?
It should make this behaviour more maintainable and useful in the
future, as we're not copying and pasting multiple procs between
different files (for both this behaviour and jaunting).

## Changelog

🆑
refactor: The actions of Statues and Creatures which can't be used while
seen now share logic, and will not spam chat with feedback.
/🆑
2023-02-26 17:58:51 -07:00
Jacquerel
8da1bae8e7 Refactor mob spawner component so that it is independent (#73645)
## About The Pull Request

Went down a rabbit hole with touching the migo files... I noticed that
all of those mobs had a reference to `/datum/component/spawner` on them
which looked a bit off.
After investigation it seems like this component is breaking the
prinicple of using an ECS system by assigning a reference to itself on
every mob it creates? There doesn't seem to be a good reason to do that,
as we can just use signals.

This also doesn't work for basic mobs, because most of them don't _have_
this reference to assign to. If we don't want to add it to every basic
mob (and why would we?) it would make more and more converted mobs
invalid for spawners.
Also it means that it has never been valid to create a Monkey spawner,
which seems like a big oversight.

I replaced all of the parts dependent on telling the mob where it was
spawned from with signals.

Megafauna seemed to have a reasonable amount of code related to "not
straying a certain distance from what spawned them", but as far as I can
tell unless someone varedited one onto a map we have never had a spawner
which creates megafauna (nor would we want one? That would virtually
always cause it to respawn instantly after being killed).

## Why It's Good For The Game

Improves future maintainability
Brings implementation up to current standards.
Makes the code work the way I would have assumed it already worked in
the first place.

## Changelog

🆑
fix: Mob spawners will no longer break if instructed to spawn certain
kinds of basic mob, or monkeys.
/🆑
2023-02-26 22:37:49 +00:00
NamelessFairy
1bd348cd0d Fixes being able to "Drive" ridden vehicles without the key/in space. (#73611)
## About The Pull Request

Fixes: #73610

I've elevated the code that prevents you from grabbing the thing your
riding from the creature subtype to the main riding component. I cannot
think of any ridden vehicles that you should be able to grab while
riding so I don't think there is any issue in making this change,
although please advise me if this is not true.
## Why It's Good For The Game

Using a wheelchair for space traversal seems like a bug.
## Changelog
🆑
fix: You can no longer drive ridable vehicles without keys or in space.
/🆑
2023-02-25 23:54:08 -07:00
Jack Edge
c98136fc4f Fix chef food ownership to follow mind (#73600)
🆑 coiax
fix: A chef who is beheaded, and the head stitched on another body will
still see their food as their own.
/🆑

## Why It's Good For The Game

Having food ownership be based on the mind, rather than the mob, makes
it resilient to body-swap, mind-swap, podcloning (cloning!?),
situations. Because even though you may have been reduced to just a
head, that stew is still yours, you still made it.
2023-02-24 14:42:55 -07:00
Jacquerel
7e4a6d842c [no gbp] Allows clothes to be eaten (#73565)
## About The Pull Request

Fixes #73546
In #73481 I made the foolish assertion that it's never correct for
someone to eat something which isn't physically nearby.
I had of course forgotten that while Moths _think_ they can eat clothes,
what they are actually eating is the abstract concept of clothes if they
were edible, functionally nothing, which exists nowhere.
By moving the check to only run when you are trying to eat a turf
(conveniently, no clothing is also a turf... yet) I allow them to return
to their delusion.

Alternate fixes and why I didn't do them:
- Always allow people to eat food which is in nullspace. This feels
pretty gross.
- Put the abstract clothes food physically inside the clothes. I assume
this wasn't done because there's some scenarios where you would be able
to remove abstract clothes food from the clothes, so that's not
desirable.
- Move the food into the actual clothes object just before taking a bite
and then put it back in nullspace again. This is silly.
- Try to make moth clothes food work in a way which doesn't involve
creating an imaginary food item in the void. I don't want to do this.

## Why It's Good For The Game

It's funny to eat clothes I guess.

## Changelog

🆑
fix: Moths can eat clothes again.
/🆑
2023-02-21 21:49:20 -07:00
LemonInTheDark
7cc6934eff Visual fixes (lighting, weird shit, old bugs from a parallax thing) (#73555)
<!-- 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

[Fixes a bug where anything fully dark on the floor plane would mask the
lighting
plane](a1a03dc339)

I fucked it up boys, needed to take alpha into account here

[Fixes pais getting parallax on icebox because their location was
nested](81252e0f45)

God I hate this place (Note when I say get I mean they got the plane
master that controls it, not that they actually got it displayed. That
does appear to sometimes happen but I have no idea why)

[Fixes double flashlights not activating if enabled in
place](efb8b641ea)

[efb8b64](efb8b641ea)

cast_directional_light removes the lighting appearance, because it's
gonna modify it, but it turns out because appearances are static when
they're in like underlays/overlays, this could remove the WRONG UNDERLAY

This lead to double held flashlights just... not working until you
rotated. V stupid.

I've also had to move the flag set to make the overlay add in
cast_directional_light work. Depression

## Why It's Good For The Game

Closes #73535, closes #73517, closes #73518, and fixes part of #73471
<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## 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: Fixes activating two flashlights without moving only turning on one
flashlight (until you move)
fix: Purely black things drawn on the floor (like carpets, those foam
dispensers, etc) will no longer cause things on top of them to be fully
masked in darkness
/🆑

<!-- 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. -->
2023-02-21 16:43:20 -07:00
Ryll Ryll
40fa6e43a0 Fixes tackles rarely applying permanent slowdowns, improves min_distance tackle targeting (#73550)
## About The Pull Request

Fixes: #61449
Monster tackles (the top tackle result that automatically applies an
aggro-grab) now checks if the user is getting stamcrit from the stamina
damage that comes from launching the tackle. If not, it proceeds as
normal and applies the aggro-grab, but if it does stamcrit, the tackler
instead extra stamina damage/paralyze/knockdown in lieu of the autograb.
This resolves the issue with the aggro-grab slowdown applying
permanently, since that grab shouldn't have been possible to land in the
first place.

Fixes: #50888
I was lazy when I first implemented tackles, so if you tackled a target
with a range less than the gloves' min_distance (dolphin and rocket
gloves), it would simply launch you the min_distance range in the
nearest cardinal/diagonal direction. It now uses the angle you're
launching towards, which means you'll leap closer to where you actually
clicked on, and hopefully make rocket gloves slightly less suicidal.

Also I raised the amount of objects you can knock off a table with a
tackle from 12 to 18 because it's funny.
## Why It's Good For The Game
Tackles are more consistent and less buggy. Also you can shotgun more
shards of glass stacked on a table at people at once with rocket gloves.
## Changelog
🆑 Ryll/Shaps
fix: Landing a monster tackle that applies an auto aggro-grab while
stamcrit will no longer try applying an aggro-grab that leads to a
permanent slowdown to the user, and will instead just knock the target
down a bit harder.
fix: Launching dolphin and rocket glove tackles on targets at ranges
shorter than their minimum distance will be more accurate at targeting
where you clicked at, rather than locking you into the nearest
cardinal/diagonal direction.
balance: You can now knock more things off a table full of stuff by
tackling it than you could before.
/🆑
2023-02-21 16:43:03 +13:00
Jacquerel
6dc123735d You can't eat a turf unless you are standing next to it (#73481)
## About The Pull Request

Fixes #73115, don't you love telepathy?
Just adds a range check to the general "can I eat this now?" proc. I
couldn't think of any situation where you should be able to eat
something which isn't next to you.
I tested it and you can still feed people and eat food from your
inventory.

## Why It's Good For The Game

It's funny to be able to eat pizza floor with your brain but not
intended.

## Changelog

🆑
fix: You can no longer eat pizza floor tiles with your brain.
/🆑
2023-02-18 13:45:53 -07:00
tralezab
77031e2a93 Refactors the Nuclear Authentication Disk's Lone Op Behavior Into a Component, + Examine Message (#73453)
## About The Pull Request

### Refactor

Turns all the behavior for the nuke disk raising lone op probability
when unsecured into a new component, the "Keep Me Secure" component. As
an example (and really, I made it to test that the component was
actually working), there is a new admin plush called the "whiny plushie"
that will change icon depending on whether it is secure or not. Useful!

### Examine

I also added an examine message. Will explain below

## Why It's Good For The Game

The examine message was really what this entire pr's purpose was really
for.

>
[Capsandi](https://tgstation13.org/phpBB/memberlist.php?mode=viewprofile&u=7767)
wrote:
[↑](https://tgstation13.org/phpBB/viewtopic.php?p=665827#p665827)Wed Feb
15, 2023 2:42 pm
Someone needs to pr some sort of indicator as to whether the disk is
'secure' or not so players who don't know about the niche lone op
mechanic won't make the same intuitive assumption (though swat has been
trolled for putting it in the safe before).

I agree with this for the same reasons I did #73016 so I'll restate the
point with it here: A piece of banning a captain recently was that they
didn't secure the disk, but there is no indication in game that the disk
has special condiitons that trigger lone op, just that it should be kept
safe (which yeah, nuke ops want it). I'd rather remove the ambiguity of
a captain knowing this mechanic or not for the sake of the game, a
single examine for it is harmless

I'm considering this administration, not a feature. If maints want me to
take it out and have this be refactor only, that's fine with me

## Changelog
🆑
refactor: Refactors how nuclear activation disk works. Shouldn't notice
a whole lot but if you do, it might be because of this.
admin: Disk now has an examine message for whether it's secure or not,
to make it less ambiguous for players.
/🆑
2023-02-17 23:09:41 +00:00
Jacquerel
7867d14fd4 Lightgeists won't try to heal toxin damage (#73467)
## About The Pull Request

Fixes #73439
Lightgeists use `heal_overall_damage` to heal, but despite the name that
actually only heals burn, brute, and stamina damage.
It will now prompt an error message if you try to heal someone who
doesn't have any of those damage types.
Simpler mobs can't take toxin or oxyloss damage so this has no effect on
spiders (the other user of this component).

Also during my conversion I forgot to set the lightgeist healing time to
0, so I did that too.

I thought about maybe changing this so that they _can_ heal toxin damage
but they've existed without being able to do it for so long that I don't
think it would be a "bug fix" at that point, I'll maybe adjust the
component behaviour further (to use `heal_ordered_damage` instead
probably) after this month. Until then I technically can't do it without
affecting Spider balance a little bit.

## Why It's Good For The Game

Makes it a _little_ clearer why someone's health doesn't increase when
they are clicked on.
Restores lost functionality.

## Changelog

🆑
fix: Lightgeists won't try to heal any damage which isn't burn or brute,
because they can't.
fix: Lightgeists don't need to perform an action bar in order to heal
someone, which was added by mistake.
/🆑
2023-02-17 15:03:57 -07:00
Tim
a1ada2c9ef Refactor, improve, and rename canUseTopic to be can_perform_action (#73434)
This builds on what #69790 did and improved the code even further.
Notable things:
- `Topic()` is a deprecated proc in our codebase (replaced with
Javascript tgui) so it makes sense to rename `canUseTopic` to
`can_perform_action` which is more straightforward in what it does.
- Positional and named arguments have been converted into a easier to
use `action_bitflag`
- The bitflags adds some new checks you can use like: `NEED_GRAVITY |
NEED_LITERACY | NEED_LIGHT` when you want to perform an action.
- Redundant, duplicate, or dead code has been removed.
- Fixes several runtimes where `canUseTopic` was being called without a
proper target (IV drips, gibber, food processor)
- Better documentation for the proc and bitflags with examples
2023-02-16 20:22:14 -05:00
Time-Green
6097d1dd42 Fixes taking items from storage in hyperspace (#73428)
Taking items from storages actually puts it on the floor and then in
your hands, which isnt really caught by movement signals. So deletes the
hyperspace component on item pickup

closes #72727

🆑
fix: fixes taking items from inventories glitching out in hyperspace
/🆑
2023-02-15 19:43:40 -07:00
Jacquerel
481824cf8c Chasms should not render contents invisible (#73424)
## About The Pull Request

Fixes #69507
Occasionally a mob would start processing itself as falling into a chasm
while already falling into a chasm. This would reset the "stored"
appearance data to the data from the end of the fall (where you are
invisible and size 0) and so just leave it in that state.
I couldn't find a way to replicate this reliably through gameplay but
spamming "get mob" worked.

I fixed it by just... not doing any of that stuff if you're already
falling into a chasm.
Also while unreported I noticed that `notransform` could get stuck on as
well, which it shouldn't do.

## Why It's Good For The Game

It's hard enough to rescue someone from a chasm, if their corpse is also
invisible and intangible afterwards then that's probably not ideal.

## Changelog

🆑
fix: Things dropped into a chasm should no longer occasionally become
invisible and intangible.
/🆑
2023-02-15 16:39:09 +01:00
Jacquerel
6dd590a4e1 Bileworms won't evolve if they're dead (#73427)
## About The Pull Request

Fixes #70865 
I kind of agree with the comments that it would be funny to canonise
_something else_ happening to dead ones once the alive ones evolve but
that would qualify as "a feature".

## Why It's Good For The Game

Even if it's pretty funny it's not really ideal for unbutchered mobs to
come back to life without warning at the 30 minute mark, and clearly not
intended.

## Changelog

🆑
fix: Bileworms which have been struck down but not butchered no longer
return in a more powerful form.
/🆑
2023-02-15 16:37:55 +01:00
MrMelbert
27e1a3c37b Refactors species mutanthands into human component (#73286)
## About The Pull Request

Mutanthands is now a component, which handles ensuring the mob always
has their mutant hands equipped to their right slots at all times.

Alternative to #73282 
Fixes #73034 

## Why It's Good For The Game

Cleaner and more consistent code, Ensures mutant hand mobs always have
their correct hands.

## Changelog

🆑 Melbert
fix: It should be way harder to lose your special hands as a zombie or
shattered risen ghoul.
refactor: Refactored mutanthands for zombies and shattered risen.
/🆑
2023-02-14 17:24:50 -07:00
LemonInTheDark
ea29ca3198 Prevents nulls in the always_visible_inventory list (which caused runtimes blocking PM reapplication) (#73400)
## About The Pull Request

Attempting to add a null to images (even in a list) is a runtime, which
in this case blocks off the rest of show_hud, breaking planemasters and
other shit

## Why It's Good For The Game

Closes #73387, closes #73364

## Changelog
🆑
fix: Equipping an fov item, disconnecting, waiting 6 minutes and
reconnecting will no longer break your game
/🆑
2023-02-13 15:56:14 -07:00