Commit Graph

4608 Commits

Author SHA1 Message Date
SyncIt21
dac0afe420 [NO GBP] Aux construction console RCD works again. (#74158)
## About The Pull Request
Fixes #74145

Forgot to make aux construction console RCD use `afterattack()`.

🆑
fix: aux construction console RCD works again
/🆑
2023-03-22 12:59:02 +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
1d3af1794d Fix holo signs being able to be frozen (#74103)
🆑 coiax
fix: Holosigns, like the atmos holofan, can no longer be frozen by low
temperature water vapour.
/🆑

Seen this a couple of times where a holofan's been "frozen" which is
quite silly.

This won't actually _do_ anything until #74102 is merged though, but
let's keep our changes separate.
2023-03-19 18:21:25 -06:00
jimmyl
9bb9e356b1 Makes all CTF windows actually indestructible (#74021)
## About The Pull Request

Adds a spawner for indestructible shuttle windows
Replaces all "hardened windows" (which were actually not unbreakable)
with proper unbreakable windows

## Why It's Good For The Game

Fixes #73297, people shouldn't be breaking into space in CTF

## Changelog
🆑
fix: All CTF windows are now indestructible, fixes breaking into space
during CTF.
/🆑
2023-03-16 17:35:50 -06: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
SgtHunk
d27a3fbb22 Recolors and fixes holodeck chess board, fixes error on white king's description (#73886)
## About The Pull Request

In a chess board, the white pieces occupy the 1-2 squares, while the
black pieces occupy the 7-8 squares. This was reversed in space chess,
with the white pieces being on black's position and vice versa.
I changed the colors of the board as well, to make it nicer to the eye
(and also occupying full tiles since the old version used the regular 4
square tiles). This accompanied by switching the carpet to wood for a
more aesthetically pleasing view (esp since carpets look ugly in that
shape).
I made the names of the chess pieces lowercase to make it consistent
("That's a Black Pawn." -> "That's a black pawn.") and fixed the white
king's description.
All in all, the chess board looks like this now.


![imagen](https://user-images.githubusercontent.com/68669754/224214951-d10e9a8b-1a8e-492c-bd91-0fd5ecae4385.png)

## Why It's Good For The Game

![imagen](https://user-images.githubusercontent.com/68669754/224215899-2059f845-0071-4a21-84bb-13108ceec9b2.png)

![imagen](https://user-images.githubusercontent.com/68669754/224215206-1b5ef367-a5c5-436c-9bf5-665f243fe3e8.png)

![imagen](https://user-images.githubusercontent.com/68669754/224215215-0b5799b3-9f47-46f2-958a-6dd211eff59a.png)

![imagen](https://user-images.githubusercontent.com/68669754/224215235-4c5381de-93ce-4760-b881-50412a6e55b9.png)

## Changelog

🆑
qol: Holodeck space chess board is more pleasing to look at.
fix: Fixes holodeck space chess pieces being reversed.
spellcheck: Fixed white king's description saying it moves any tile in
one direction.
/🆑
2023-03-14 16:39:52 -06:00
NamelessFairy
f2df4075b9 Fixes the metallic hydrogen axe being silent when being used as a crowbar and crowbars can now hit windows. (#73974)
## About The Pull Request

The metallic hydrogen axe had no usesound var set despite having a
tool_behavior applied to it, this meant that when using it as a crowbar,
for example to remove floor tiles no sound was played. I've given it the
default crowbar sound for this.

Bonus fix: Crowbars were incapable of hitting fully constructed default
windows, this included the H2 axe, They are now able to be used on
standard windows (they already worked on reinforced windows)

## Why It's Good For The Game

Missing sound bad. Pretty sure the crowbar thing is a bug too.
## Changelog
🆑
fix: The metallic hydrogen axe is no longer silent when using it as a
crowbar.
fix: You are now capable of hitting standard windows with a crowbar when
they're fully constructed.
/🆑
2023-03-14 16:18:40 -06:00
Rhials
9d5b4907e8 Post-Revolutionary Fervor station trait, revolutionary bedsheets, and a megaphone (#73799)
## About The Pull Request

Upon revolution success, the chosen headrev will now also receive a
megaphone, and a "revolutionary bedsheet" repurposed from a stolen CC
bedsheet to commemorate their success. The post-revs confusion and lack
of command/security usually leads to an instantaneous, total breakdown
in cohesion. It's every man for himself -- that's no way to run a
commune! Just because the revolution has succeeded and nobody can see
your big blue "R" anymore doesn't mean you can't be a leader!


![image](https://user-images.githubusercontent.com/28870487/222981576-e62e457b-1b2d-4756-8c87-7a9093c92c2d.png)

This also adds a new revolution-themed negative station trait --
Post-Revolutionary Fervor. When present, this trait trashes the command
areas at the start of the round. This means cracked windows, broken
consoles, vendors getting knocked over, and the occasional dead
greytider.


![image](https://user-images.githubusercontent.com/28870487/222981095-14ce9336-2320-406e-b0a6-dc91cb8f9479.png)

If you start cleaning at the start of the round, you might finish right
as the next batch of revs decides to crop up.
## Why It's Good For The Game

Giving one of the headrevs a bigger voice and a cool cape (or uncool,
depending on how you view the sprite) means that there's a chance for
them to step up and try to keep the wheels on. Just remember -- Nobody
is obligated to actually listen to this person, it's just a bedsheet.

Adds a neato station trait, which probably counts as command gameplay
content.

## Changelog
🆑 Rhials
add: The headrev who receives the revolutionary banner after a win will
also receive a commemorative bedsheet and megaphone.
add: Post-Revolutionary Fervor station trait. I hope you enjoy fixing
broken computer screens.
spriteadd: A revolutionary bedsheet.
/🆑
2023-03-13 19:29: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
kinnebian
b12c4a1d3c Resprites Majority of chairs (#73879)
## About The Pull Request
Updates Chair sprites to be more appealing. Sprites made by @Imaginos16 

![image](https://user-images.githubusercontent.com/75904284/224176910-c01e05bb-3a47-416d-a0d5-9e1643282740.png)
## Why It's Good For The Game
-Removes soul
## Changelog
🆑
imageadd: Changed sprites for wooden chairs, comfy chairs, electric
chairs, folding chair and shuttle seats!
/🆑
2023-03-11 22:04:12 -08:00
Jacquerel
4aef8a4cd5 Limit theft/destroy secondary objectives to items which at least one person cares about (#73731)
## About The Pull Request

This PR adds a new field `item_owner` to `datum/objective_item` and
populates it for most objective items.
The function of this field is that the objective will fail to generate
if there isn't at least one player in the game with one of those roles.
This limits theft objectives to targets which are likely to be carried
around, missed if they become absent, or at least vaguely have someone
standing close to.
This has only been applied toprogression traitor secondary objectives. 

While doing this I also culled a number of deprecated or tedious
objectives which we didn't use any more, such as every "steal a stack of
x" objective. And the plasma tank one. And the slime core one.
I also deleted any which nobody would miss, chiefly "an empty AI card".
There's plenty of those things and if one vanished nobody would notice
let alone be inconvenienced.
If anyone ever wants to bring them back for soul reasons it will be
retained in the commit history, that's what git is for.

The list is actually not particularly long now, so if people have good
ideas for more things to add to expand it again... well they could have
done that any time in the past 10 years but they can still do it now as
long as it isn't to fill it back up with things nobody will miss if they
are gone.
For myself, I added the robotics lab mech crowbar to the list as it
fulfils most of the criteria of "fire axe" but with the benefit of there
only being one on most maps.

I also removed the `difficulty` var which was undocumented, not set for
most objectives (all "low risk" objectives had a default difficulty of
`9001`), and unused.

Also I think this is my 100th PR so you have to be nice to me.

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

Many current progression traitor objectives do not meet all (and some
perhaps not even any) of the above criteria and I am planning on making
a series of changes in order to address this. Expect to see this
paragraph copied/pasted into some other PRs probably.

This one is the simplest: Stealing an item from someone who literally
isn't in the game does not antagonise anyone. So we won't ask anyone to
do it.

## Changelog

🆑
balance: Traitor secondary objectives to steal or destroy an item are
now associated with a particular "owner" or "victim" and won't generate
themselves if nobody would actually be victimised by the crime.
add: Traitors can sometimes be tasked with stealing and destroying the
roboticist's big crowbar, if there is one
/🆑
2023-03-07 23:29:16 +00: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
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
Timberpoes
52491209f9 Fixes paper formatting on vote box tallies, for democracy. (#73639)
In the spirit of AnturK's original PR the voting season, I present to
you: Fixing a piece of paper.

Due to using DM's multiline template formatting, the `<div>` for the
header started with double tab.

Markdown interpreted that as a code block, quote:
> [Code blocks](https://www.markdownguide.org/basic-syntax/#code-blocks)
are normally indented four spaces or one tab. When they’re in a list,
indent them eight spaces or two tabs.

So I just changed a line of code, then messed around with some other
formatting.
2023-02-26 16:10:15 -05:00
kawoppi
f320313281 filled trashcarts spawn nearby grime when initialized instead of when opened for the first time (#73608)
## About The Pull Request
Filled trashcarts spawn some trash in them once they are opened for the
first time. But they also spawn grime, and the problem with that is that
grime spawns in a range around the trashcart. So opening the trashcart
for the first time would cause the grime to suddenly pop in around the
cart.

This PR changes it so that the grime is spawned when the filled
trashcart is initialized.
## Why It's Good For The Game
Having trash spawn around the trashcart the moment that you open it is
probably not intended. The grime is probably meant to be there before
the trashcart is opened for the first time.
## Changelog
🆑
fix: filled trashcarts spawn nearby grime when initialized instead of
when opened for the first time
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-02-25 23:54:41 -07:00
Jacquerel
4599842d7c Makes Shake() proc work (#73480)
## About The Pull Request

Fixes #72321
Fixes #70388

The shake proc didn't work and hasn't for ages.
I remember it having worked at some point, but it was quite a long time
ago.
I cannot guarantee that the end result here is the same as it was, the
reason here being that I have no idea how this proc ever worked in the
first place. My limited understanding of the `animate` proc implies that
the previous implementation as written would never have acted as you
would expect it to, but clearly at some time in the past it did work. A
mystery.

As a result of the previous, possibly because the proc never _did_ work
as expected and just did something which looked vaguely correct most of
the time, both the default values and the values people were passing
into this proc were completely ridiculous.
Why would anyone ever want to pixel shift an object with a range of _15_
pixels in all directions? That's half a full tile! And why would you
want it to do this for 25 seconds?
So I also changed the values being passed in, because you really want
pretty small numbers passed into here most of the time.

Here's a video of everything that vibrates:
https://www.youtube.com/watch?v=Q0hoqmaXkKA

The exception is the v8 engine. I left this alone because it seems to
try and start shaking while in your hands, which doesn't work, and I
don't know how to fix that. This has potentially _also_ never worked.

## Why It's Good For The Game

Now you can see intended visual indicators for:
- Lobstrosities charging.
- Beepsky being EMPed.
- The Savannah Ivanov preparing to jump.
- The DNA infuser putting someone through the spin cycle.
- The mystery box admin item I had no previous idea even existed (fun
animations on this one).
- Anything else which wants to use this proc to create vibrating objects
in the future.

## Changelog

🆑
fix: Lobstrosities and Tarantulas will once more vibrate to let you know
they're about to charge at you.
fix: The Savannah Ivanov will once more vibrate to let you know it's
about to jump into the air.
fix: The DNA infuser will now vibrate to let people know that it's busy
blending someone with a dead animal.
/🆑
2023-02-18 14:28:17 -07:00
NamelessFairy
d131588cf3 Fixes an inverted if check on false wall attackby code. (#73459)
## About The Pull Request

#64428 made it so using a non-tool on a false wall that was closed would
return the "You must wait until the door has stopped moving" message,
this was caused by a flipped if statement so I've re-flipped it by
changing it to an early return instead.
## Why It's Good For The Game

Bug fix!
## Changelog
🆑
fix: False walls will no longer tell you to wait until they've stopped
moving when you use an item on them.
/🆑

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
2023-02-17 09:39:16 -05:00
SyncIt21
ca5c654556 RCD build patches (#73270)
## About The Pull Request
Fixes #73256
Fixes #37162

- RCD's can now create plating
- underneath machine frames or any other dense objects if you can click
into its turf
- underneath mobs and the turf you are standing on without moving aside
- RCD's now finish wall girders like they are supposed to
- RCD's can create windoors on the turf you are standing on without
moving aside in all 4 directions. They can co-exist with directional
windows on the same turf and the other way around as well

Same benefit's apply to borgs too.

You however cannot create walls on the turf you are standing on or on
any other turf having mobs/dense structures on them because
- Its dumb (Building a wall on top of yourself or on top of
someone/something else should be physically impossible)
- Its a power creep(It would be very easy to corner someone into a
small, enclosed space and put a wall on them and trap them in concrete)
should not be allowed and so its not

If you want a wall there move out the way & make space

Also added a ballon alert which will tell you if something/someone dense
is blocking the turf

## Changelog
🆑
fix: rcd's not building plating underneath mobs & structures
fix: wall girders not being completed by the rcd
fix: unable to build windoors on the turf you are standing on
/🆑

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2023-02-16 19:42:50 -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
Profakos
d3538e334e Guillotine can be unanchored again (#73423)
## About The Pull Request

Guillotines could not be unanchored, because the unfasten check checked
if any action is being applied to the guillotine, including being
wrenched at the moment. This PR fixes that.

This PR also autodocs everything, adds a missing UNDEF, and renames
GUILLOTINE_BLADE_IDLE to GUILLOTINE_ACTION_IDLE to make it clearer that
this is intended for the current_action var, and not the blade_status
var.

## Why It's Good For The Game

Fixes a bug that prevents something from being moved around.

## Changelog

🆑
fix: Guillotines can be unanchored again
/🆑
2023-02-15 18:40:38 -07:00
Jacquerel
7c30d9d746 Basic Wumborian Fugu & Fugu Gland (#73415)
## About The Pull Request

Fixes #72677 and also converted the "Wumborian Fugu" mob to a basic mob
rather than a simple one.
I will be totally honest: I didn't need to do that in order to fix the
bug. I just didn't like looking at the rest of the code in that file.
Also I have some kind of sickness which makes me do this.

This ended up being one of those "see something related and fix it as
well" ones so there's a couple of only tangentially related changes in
here. If you want me to split it up I will but I think this one is
_probably_ fine because the wide-ranging changes are pretty simple ones?

So what this PR does is:
- Refactors simple mob into basic mob.
- Cleans up its really ugly ability to work in a hopefully nicer way.
- A one line fix to the linked issue above.
- Modifies the default cooldown on `basic_melee_attack` and
`attack_obstructions` to be a widely used cooldown rather than a random
value used by no mob that we have.
- Renamed behaviour "try_mob_ability" to "targeted_mob_ability" and
added a new AI behaviour called "use_mob_ability", the difference
between the two being that the former requires a target and the latter
does not. I... don't actually use this because I realised after adding
it that I still want a target for this mob, but someone will need it
eventually.
- Change everywhere that is passing references to abilities to actions
to pass weak references instead.
- Adds an element to handle "spawn this stuff when a related mob dies".
- Found a few places where people were setting `environment_smash ` as
if it did anything (including me) and replaced them with the proper
ai_controller implementation instead, updated the comment to make it
clearer although that won't prevent copy/paste errors.
- Registered to the "movement speed updated" signal to ensure that basic
mobs actually notice that you have applied a movement speed modifier.

## Why It's Good For The Game

Fixes a linked issue.
Refactors some code which made me sad whenever I saw it.
Restores some mob behaviour which nobody noticed was missing, but was.
Fixes some apparently unreliable code I added in a recent PR reliant on
basic mobs using movespeed modifiers.
Adds element we will definitely need again in the future.

## Changelog

🆑

fix: The Fugu Gland can once more be used on Ian, Carp, Giant Spiders,
or other basic mobs.
fix: Syndicate mobs will once again attack windows to try to reach you,
and space ruin spiders won't.
fix: Netherworld-themed mobs will correctly adjust their speed as they
take damage.
refactor: Made the Wumborian Fugu into a basic mob, which should act
largely the same way but may have slightly different speed and reaction
times.
/🆑
2023-02-15 18:34:41 -07:00
NamelessFairy
58a9fcff82 De-hardcodes spawnDebris in windows, fixes a bunch of issues with windows. (#73274)
## About The Pull Request

spawnDebris was being overridden by almost every type of window, I've
set up some new vars for it to pull shard and its debris decal from so
spawnDebris only needed to be set up once (+ once more for paper windows
which are unique).
Fixes an issue with reinforced plasma glass windows dropping regular
glass when broken.
Fixes an oversight where tram windows were dropping only 1 rod instead
of 2 and dropping glass sheets instead of shards.
Cleans up tram window code a bunch.
## Why It's Good For The Game

Fixes several issues, cleans up code and cuts down on a lot of repeat
code.
## Changelog
🆑
fix: Reinforced plasma windows will now drop plasma glass instead of
regular glass when broken.
fix: Tram windows drop the correct number of rods and a shard when
broken instead of a sheet.
code: Removed a ton of duplicate vars in tram window code and
re-organize the file slightly.
refactor: spawnDebris has been un-hardcoded and all (but one) override
of it has been removed.
/🆑
2023-02-14 21:38:55 -07:00
NamelessFairy
3f40f7556e [NO GBP] Maintainer requested changes to the locker/closet grammar PR (#73412)
## About The Pull Request

San requested changes to #73331 however the PR got merged before I had
an opportunity to update my PR, this PR should contain the requested
changes/reverts.
## Why It's Good For The Game

Should have been in the previous PR but was not.
## Changelog
🆑
spellcheck: Head of staff lockers and prison cell lockers have had their
proper noun status returned.
/🆑
2023-02-14 10:30:12 -08:00
GoldenAlpharex
1c2c74ff82 Fixes the benches' appearance and odd sitting offset (#73397)
## About The Pull Request
Introduced in https://github.com/tgstation/tgstation/pull/73057,
undocumented, was a change in the offset of players sitting in benches,
which just made it look like if everyone was standing on benches, rather
than sitting on them. I can understand the original goal behind that
change (after discussing with LT3 about it), but I still think that, for
one direction where it might _arguably_ look better, _every_ other
direction looks absolutely awful, and goes against the norm when it
comes to sitting on an chair/sofa/anything you can buckle onto that
serves as a place to sit.

Introduced in https://github.com/tgstation/tgstation/pull/73243,
undocumented, was a new color for benches that just made them look blue
rather than the brown they were meant to be. I'm returning them to their
prior color, as I think that it fits a lot better in its surroundings in
light brown than it did with dirty blue.

This fixes both of these issues, bringing the benches back to
consistency with the rest.

## Why It's Good For The Game
It just looks more consistent with everything else.

![image](https://user-images.githubusercontent.com/58045821/218340276-ee42d15b-fc54-4e56-b565-164b8a8b4db2.png)


## Changelog

🆑 GoldenAlpharex
fix: Sitting on benches no longer gives you a weird offset that makes
you look like you're standing on them.
fix: Returns benches to their original light brown color, rather than
the middle between brown and cyan that they were at for a bit.
/🆑
2023-02-13 20:28:15 -07:00
MrMelbert
a9f82bb140 Fixes kitchen spike add context screentip runtime (#73392)
## About The Pull Request

`held_item` does not always exist, hovering over spikes with empty hands
caused a runtime error

## Changelog

🆑 Melbert
fix: Fixed a runtime from hovering over a meat spike / kitchen spike
with an empty hand
/🆑
2023-02-13 15:57:23 -07:00
NamelessFairy
b06ac3df56 Grammar checks every closet that spawns on a station. (#73331)
## About The Pull Request

All closets now are called either closets, lockers, wardrobes etc. (e.g.
the lethal injections locker was previously called "lethal injections")
Head of staff and the cook's locker are no longer proper nouns, it
didn't make much grammatical sense and it keeps consistency with other
lockers (Example: detective's cabinet)
All locker names de-capitalized except the Thunderdome ones since those
made sense.
The empty freezer is now just called a freezer since it being empty or
not depends on what players and mappers do to it.
Tram now has evidence lockers labelled from 1 through 7 instead of 7
evidence lockers labelled as 1.

Changes have been made to all station maps and in code, I've not gone
through all ruins, away missions, etc.
## Why It's Good For The Game

Cleans up a lot  of minor name issues.
## Changelog
🆑
spellcheck: All station closet and lockers have had their naming
conventions standardized.
fix: Tram now has evidence lockers labelled 1 through 7 instead of 7
evidence lockers labelled as locker 1.
/🆑
2023-02-13 09:22:51 +01:00
lessthanthree
06451927fe Tram signal defines, subtypes, documentation, compound damage calc [NO GBP] (#73199)
## About The Pull Request
- Adjusts the signal distance thresholds and moves them to the tram
defines file
- Makes a subtype of the signal for Tramstation specific variables
- Updates documentation to dmDocs
- Fixes #73367 (tram was compounding base damage and wound damage,
changes to a flat 15% death chance, lowers base damage in favor of
causing wounds)
- Adds logging for when people get hit by the tram
## Why It's Good For The Game
Cleanup, documentation, tram isn't killing everyone.
## Changelog
🆑 LT3
fix: Tram damage calculation takes into account compound wounds
code: Tram crossing signals are now map specific
admin: Combat log now generated when the tram collides with someone
/🆑
2023-02-13 04:21:47 +00:00
ArcaneMusic
7e2c352ca8 Sign/plaque contextual screentips and file reorganizing (#73246)
## About The Pull Request

This PR adds contextual screen tips to signs and plaques based on the
held tool. Wrenches unfasten, and welders repair. Behaves the same with
plaques, but plaques also get a screentip for using a fountain pen on
them if they can be engraved. Also adds a tip to editable-item signs
with a pen out.
Tested to avoid issues with posters from cropping up, and it appears to
still behave correctly with paper posters, which are apparently a type
of sign. Go figure.


![image](https://user-images.githubusercontent.com/41715314/216807994-c2400fa0-77fa-48e9-8c2e-5c5ea660a1d8.png)

I've also reorganized the sign and plaque files to follow our more
standard object hierarchy of base type -> inherited procs -> subtype
specific procs, where these were interspersed throughout the file. I did
however leave the armor datums below the object, as they appear to
follow new convention.

## Why It's Good For The Game

Screentips avoid ambiguity and improve readability of construction. Easy
improvement.

Plus, improves consistency of the signs file layout-wise.

## Changelog

🆑
qol: Adds screentips to both signs and plaque construction/modification.
/🆑
2023-02-07 16:18:19 -08:00
NamelessFairy
115a021544 Fixes freezers locking automatically when closed. (#73253)
## About The Pull Request

Took a little while to figure out what was going on, Freezers override
close() but never return true when they successfully close which results
in the code for locking the freezer being called right after closing it.
## Why It's Good For The Game

Fixes an oversight.
## Changelog
🆑
fix: Freezer no longer lock automatically when closed.
/🆑
2023-02-06 12:58:21 -07:00
lessthanthree
de46c57264 Tram Mk. IV hotfixes [NO GBP] (#73243)
## About The Pull Request
Fixes some little issues in
https://github.com/tgstation/tgstation/pull/73057

- tram doors only crush people if either emagged (100%) or
malfunctioning (15%)
- emag works on tram doors
- crossing signals use correct amount of power, increased brightness
- crossing signals and destination signs consume power when idle
- green static crossing signal shuts off when power lost
- left/right emag icons are swapped
- tram bench override shouldn't override all benches | Fixes
https://github.com/tgstation/tgstation/issues/73250
- reduced damage from tram door crushing (60 > 45)

## Changelog
🆑 LT3
fix: Fixed motion sensors on tram doors, they will now crush you much
less often!
balance: Reduced damage from being crushed by tram doors
code: Un-nested emag blacklist
code: emag works properly on tram doors
fix: Backwards tram door sparks animation
fix: Tram displays power consumption
fix: Tram crossing signals power consumption
balance: Increased brightness on tram crossing signals
fix: West Wing NW/SW and East Wing NE/SE crossing signals now shut off
when power is lost
fix: Tram benches don't override standard benches
fix: Reduced saturation and brightness of standard bench
/🆑

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2023-02-05 20:47:26 -07:00
Comxy
7e41cd3c0b Netherworld Mobs Refractor (#73086)
## About The Pull Request

This PR refactors netherworld mobs into basic mobs as best as possible.
Also makes some of them run faster when they are getting damaged or deal
more damage. Now the mobs might be able to keep up a little with the
players.
## Why It's Good For The Game

Makes the mobs have better movement and more dynamic movement. Makes the
quality of these mobs better.
## Changelog
🆑
add: Added new damage buffs for netherworld mobs
refactor: Refactors netherworld mobs into basic mobs
/🆑
2023-02-05 12:42:07 -07:00
SyncIt21
c4744f419b Adds examine, balloon alert & screen tips for Meat Spike Frame (#73126)
## About The Pull Request
- Examining a meat spike frame will tell how you can either deconstruct
it with an welding tool or add spikes to it with iron rods
- Examining a meat spike will tell you how to remove its spikes and how
to basically use it
- A balloon alert will pop up if you don't have enough iron rods to add
spikes to a meat spike frame
- Screen tips when holding the correct tool are displayed

## Why It's Good For The Game
New players don't have to wiki this and honestly i got confused the
first time i used it so there is that. More information basically


## Changelog
🆑
qol: examining a meat spike frame & meat spike will tell you about
itself
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: san7890 <the@san7890.com>
2023-02-05 12:26:43 -07:00
lessthanthree
4894878ff6 Tram Mk. IV (#73057)
## About The Pull Request
- After one too many tram malfunctions, Nanotrasen's insurance provider
finally sprung the cash for a new tram. Made with the latest in
lightweight materials, there's more capacity than ever before to shuttle
your crew around the station.


https://user-images.githubusercontent.com/83487515/215639768-3f7fcb84-cfd2-4efe-b578-998197651f13.mp4

- Consolidates all the tram turfs, objs, and structures into respective
.dm files because they were haphazardly spread everywhere.
- Fixes tram doors playing open/close animations when they're already in
the correct state, corrects timing for when they change density.
- Tram now correctly has an operating status and will stop functioning
when power is lost.
- Call buttons no longer dispatch a tram that doesn't have power.
- Fix for emergency exit when tram has no power.
- Running at closing tram doors is a gamble, you may be crushed
- Fixes https://github.com/tgstation/tgstation/issues/73125

## Why It's Good For The Game
Looks nice, more space, tram doors demand a pound of flesh.
## Changelog
🆑 LT3
imageadd: Nanotrasen's insurance provider finally sprung the cash for a
new tram. Made with the latest in lightweight and mostly* non-flammable
materials, travel in comfort and style!
code: All tram components are now organised based on type
code: Tram is now aware if it has power or not
del: Removed movement slowdown running on tram plates
fix: Tram call buttons will not work calling an unpowered tram
fix: Tram doors will no longer cycle open/closed when they're already in
the correct position
fix: Fixed an edge case where running onto the tram you bounce off the
open door as if it was closed
fix: Unpowered tram doors can only be forced into the open position
fix: Westbound travel shows the correct controls animation
add: Tram doors take a chunk of flesh if you run at them last minute
qol: Reduced duration of amber stage on tram crossing signals 
/🆑
2023-02-02 14:21:46 -08:00
John Willard
c097f167b1 Completely removes do_mob and do_after_mob (#73117)
## About The Pull Request

This is a remake of #70242

Replaces all instances of ``do_mob`` and ``do_after_mob`` with
``do_after``.

## Why It's Good For The Game

All 3 of these are just copy pastes of eachother but some miss some
features (like do_after not checking for target loc change, which helps
towards fixing https://github.com/tgstation/tgstation/issues/66874
though it doesn't because mechs are setting ``do_after`` on the mob in
the mech) and signals only being used on ``do_after``.

## Changelog

🆑
fix: Mechs should now cancel out of drilling when they move.
/🆑
2023-02-02 21:17:20 +00:00
Tim
4151cf13d3 Barsign UI/UX Improvements - Emissive effects, balloon alerts, and refactored code (#73106)
The barsign code is over a decade old so this is a big refactor with
some notable improvements:

- Emissive effects (neon lights now glow in the dark)
- Balloon alerts instead of `to_chat` messages
- Mapping helpers based on direction and all_access
- Barsigns are considered machinery now and use power
2023-02-02 16:00:18 -05:00
LemonInTheDark
e9c87c0acb Starlight Polish (Space is blue!) (#72886)
<!-- 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

Adds support to underlays to realize_overlays
Ensures decals properly handle plane offsets
Fixes space lighting double applying if it's changeturf'd into. this
will be important later
Makes solar vis_contents block emissives as expected
Moves transit tube overlays to update_overlays, adds emissive blockers
to them

#### Adds render steps

An expansion on render_target based emissive blockers. 
They allow us to hijack an object's appearance and draw it somewhere
else, or even modify it, THEN draw it somewhere else.
They chain quite nicely

Fixes shuttles deleting z holder objects

#### Makes space emissive, makes walls and floors block emissives
The core idea here goes like this:
We make space glow, and give its overlays some color

This way, the tile and space parallax remain fullbright, along with
anything that doesn't block emissives, but anything that does block
emissives will instead get shaded the color of starlight

This requires a bit of extra work, see later

This is done automatically with render relays, which now support
specifiying layer and color (Need to make an editor for these one of
these days)

The emissive blocking floor stuff requires making a second render plate
to prevent double scaling

Also adds some new layering defines for lighting, and ensures all turf
lights have a layer. We'll get to this soon

#### Makes things in space blue

We color them the same as starlight, by taking advantage of space being
emissive
This means that things in space that block emissive will block it
correctly and be colored blue by the light overlay, but space itself
will remain fullbright

This does require redefining what always_lit means, but nothing but
cordons use that so it's fineee


#### Makes glass above space glow, and some other stuff

Glass tiles that sit above space will now shine light with matching
color to the glasses color. This includes mat tiles.

Glass tiles (not mat because they have no alpha) also only partially
block emissives.
Adds a new proc that uses render steps to acomplish this, essentially
we're cutting out bits below X alpha and drawing what remains as an
emissive.

#### Modifies partial space showing to support glow

Essentially, alongside displaying space as an underlay, we also display
a light overlay colored like starlight.
That starlight overlay gets masked to only be visible in bits that do
not contain any alpha.

We also mask the turf lighting to not go into bits that have no alpha,
to ensure we get the effect we want.
This is done with that lighting layer thing I mentioned earlier.

#### Makes appearance realization's list output ordered

I want it output in order of overlay, sub overlay suboverlay, next
overlay
Need to use insert for that

## Why It's Good For The Game

Pretty!
Also having space be emissive is a very very good way to test for fucked
emissive blockers (If it's broken why are we even drawing the overlay)
I know for a fact mob blockers on lizards and socks are kinda yorked, I
think there's more

<details>
<summary>
Old
</summary>


![image](https://user-images.githubusercontent.com/58055496/213916157-d4b38aa7-3ab6-42a4-989f-7bfba2dc2cba.png)

![image](https://user-images.githubusercontent.com/58055496/213916077-637fa288-bbee-477d-aded-730d9683477e.png)

![image](https://user-images.githubusercontent.com/58055496/213916088-0657a8a2-5627-48e2-8c4b-870c90ef2072.png)

</details>


<details>
<summary>
New
</summary>


![image](https://user-images.githubusercontent.com/58055496/213916107-2af74e64-1817-4a44-b528-180a9160cb9e.png)

![image](https://user-images.githubusercontent.com/58055496/213916115-5fa36fcc-b988-4ccf-850e-21c26ed463d0.png)

![image](https://user-images.githubusercontent.com/58055496/213916120-6833187d-b12e-42a7-ac4b-63c56deb71e5.png)

</details>

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

🆑
add: Space now makes things in it starlight faintly blue
fix: Glass floors that display space now properly let space shine
through them, rather then hiding it in the dark
add: Glass floors above space now glow faintly depending on their glass
type
/🆑

<!-- 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: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2023-01-31 09:52:27 +00:00
NamelessFairy
c1c3632fd4 Malfunctioning AIs whos brain is removed from the core and rehomed in another core will retain their law 0. (#73047)
## About The Pull Request

Currently if you are able to deconstruct a malfunctioning AI, such as
through methods that gib AIs, rehoming the AI in a new core results in
it losing its law 0, but it retains its antagonist datum and combat
upgrades. This is due to the law 0 only being generated when the AIs
gains the antag datum, I've made it so that when a brain with the
malfunctioning AI datum is inserted into an AI core it will re-produce
its law 0.
## Why It's Good For The Game

"Exploit"(?) that could be used to de-malf AIs patched and should cause
less confusion for malf AI players since they wont end up in a situation
where they have no law 0 but have all other malf AI components.
## Changelog
🆑
fix: Removing a malf AIs brain and inserting it into a new core
no-longer clears its zeroth law
/🆑
2023-01-30 23:37:15 -07:00
OrionTheFox
d2cd957fe3 Fixes extinguisher cabinet examine saying to alt-click to toggle (it is now right-click) (#72955)
Fixed fire cabinet examine text falsely saying to alt-click to
open/close; it now has contextual screentips, and uses balloon alerts
when relevant
2023-01-30 08:19:42 +00: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
SyncIt21
3c908fc280 Some more RCD Designs & Patches (#72757)
## About The Pull Request
Adds some more stuff you can build with the RCD
1. Under structures you can now build/deconstruct catwalks & construct
Reflector Frames. Destorying a catwalk will cut any cable on it leaving
pieces of it behind
![Screenshot
(92)](https://user-images.githubusercontent.com/110812394/212850493-b7a5d25a-dab5-42e4-bd56-8e7045023984.png)


2. If you have the frames upgrade you can construct APC, Air Alarm &
Fire Alarm frames on walls & Flood light fixtures[fully wired]. It only
creates the wall mount and sticks it on the wall. Wiring, Circuits and
finishing the frame is still your job
![Screenshot
(94)](https://user-images.githubusercontent.com/110812394/214264787-188c7783-473a-4f34-84c1-00ad73520f22.png)

3. If you have the furnishing upgrade you can create racks & beds &
additional bar stool
![Screenshot
(95)](https://user-images.githubusercontent.com/110812394/214264893-96b52fc9-1502-45af-bee3-724cce1935af.png)


**Important Code Refractors**
1. `/turf/closed/wall/proc/try_wallmount()` will return true only after
you have successfully mounted the wallframe or stuck an poster on it &
not simply check if you are trying to mount a valid thing on it
2. `apc_tool_act/rcd_act()` was incorrectly checking passed_mode for the
simple circuit upgrade and not the `the_rcd.upgrade `flag. Thats fixed
now to
3. newly created APC's weren't assigning themselves to their areas
allowing multiple to be created in one area. Thats fixed now
4. Walls, Airlocks & other stuff could be built on tiles having
something dense that would block it. For example a wall could be build
on top of a machine frame!!. Thats also fixed now

## Why It's Good For The Game
More stuff you can build rapidly with the RCD

## Changelog
🆑
add: more designs for the rcd
refactor:` try_wallmount()` to return true only after successful mount
fix: `apc_tool_act/rcd_act()` incorrecly checking for simple circuits
upgrade in the wrong variable
fix: newly created APC's not assigning themselves to their areas.
fix: rcd building structures [walls, airlocks etc] on turf's that
already have structures on them
/🆑
2023-01-25 12:05:53 -08:00
John Willard
ae9241beae Moves mining points from the ID to the bank account (+credit type shown on order console) (#72726)
## About The Pull Request

Mining points are now stored on the ID's bank accounts instead of the
individual IDs, bringing them on-par with credits. This allows miners to
safely replace their ID and keep their mining points just like they can
for their credits.

I also added the cost type on Produce Consoles, so people using them
will know whether they're using mining points or credits.

Because all IDs have a bank account by default, this won't be a problem
to Golems or the like.

## Why It's Good For The Game

1. It's more clear to the player what type of credit is being used in
the order console
2. Mining points being tied to the ID is no longer needed as all IDs
have a bank account
3. Brings mining points up to the same standard as credits.

## Changelog

🆑
qol: Mining points is now tied to bank accounts instead of individual
IDs, so they transfer over in cases of an ID replacement.
/🆑
2023-01-25 12:04:26 -08:00
lessthanthree
0a49edaf83 Change typepath for tram hit counter [NO GBP] (#72896)
Minor change request from JohnFulpWillard. Changes the typepath added
in https://github.com/tgstation/tgstation/pull/72811
2023-01-24 18:59:51 +00:00
lessthanthree
088a93a51d Layering: Fixes wires and pipes on lattice catwalk, glass floor [NO GBP] (#72703)
## About The Pull Request
- Fixes https://github.com/tgstation/tgstation/issues/72894
- Fixes layering for wiring and disposal pipes on lattice-based catwalk.
(Goes on top.) Wiring and pipes on floor-based catwalk. (Goes
underneath.)
- Glass floor shifted to show wires/pipe underneath it.
- Moves tram plaque to the game plane, layered underneath tossed
objects.
## Why It's Good For The Game
Wiring the solars looks weird with the wrong layering.
## Changelog
🆑 LT3
fix: Wires and pipes again rest on top of lattice catwalk
/🆑
2023-01-24 01:14:09 -08:00
Bloop
c2f6a4408d Fixes toilet bongs, and fixes a serious bug in the crafting system (#72893)
## About The Pull Request

The PR everyone has been waiting for...fixed toilet bong crafting. Now
you can craft them just as before using the new crafting system.


![image](https://user-images.githubusercontent.com/13398309/213944308-74b3e50e-965d-4e69-9025-d011764b3247.png)

In attempting to fix this I encountered one of the gnarliest, nastiest,
meanest and most infuriatingly difficult to debug bugs I have come
across so far. And it's existed for as long as the crafting system has,
but due to unique circumstances it has been allowed to go unnoticed this
whole time.

Technical details below. Full list of changes here:

- crafting recipes can now contain structures as part of their
requirements
- removed deprecated var 'additional_req_tex' and changed text to use
the 'steps' list instead so they actually show in the gui
- toilet bongs are now passable terrain like normal toilets are
- fixed an atrocious bug with crafting that was by pure coincidence not
causing any problems
- this bug would prevent any recipes that did not contain a material
from deleting properly
- this bug would also cause any recipes that are supposed to use but not
consume machinery to consume them regardless

---

Basically, the bug that took me hours upon hours of debugging and
head-scratching to find is this:

from crafting.dm:
```
	main_loop:
		for(var/path_key in requirements)
			amt = R.reqs[path_key] || R.machinery[path_key]
			if(!amt)//since machinery can have 0 aka CRAFTING_MACHINERY_USE - i.e. use it, don't consume it!
				continue main_loop
```
specifically this line:

`amt = R.reqs[path_key] || R.machinery[path_key] `

The culprit ended up being that if you do machinery[path_key] on an
empty list, it can lead to very unexpected behavior (see: EXITING THE
FUNCTION without actually doing anything).

I spent so much time thinking that item deletion wasn't working because
amt was being set to 0, false, or null perhaps when no, it wasn't that.
The function was just exiting out even before the (!amt) check due to
the atrocities committed by someone before me.

Setting amt = `R.reqs[path_key] || R.machinery[path_key]` on the other
hand always evaluates to a positive integer (either the successfully
retrieved reqs amt, or a 1 from the OR expression). It was only by
coincidence that the code did what it was supposed to, because:

1) Every single recipe has R_reqs, so the first part will never cause
the function-exiting failure because the list is never empty.
2) As for the second part of the expression, there are no recipes that
make use of CRAFTING_MACHINERY_USE, so the fact that machinery[path_key]
was never actually being accessed and thus set to a var (which is what
causes the function to exit) didn't matter.

So these two things together have basically allowed a really bad bug to
go unnoticed this whole time. I only noticed it because when trying to
add a third part to the expression it just did not work at all how you
would expect.

The solution is rather simply to add a check like so:
```

	main_loop:
		for(var/path_key in requirements)
			amt = R.reqs?[path_key] || R.machinery?[path_key]
			if(!amt)//since machinery can have 0 aka CRAFTING_MACHINERY_USE - i.e. use it, don't consume it!
				continue main_loop
```

Fixes https://github.com/Skyrat-SS13/Skyrat-tg/issues/18732 .

## Why It's Good For The Game

Fixes a bug with crafting that would inevitably torment someone else as
soon as they tried to add the right kind of recipe, if that hasn't
already happened by now.

<details>
<summary>Toilet bongs are back baby!!</summary>


![image](https://user-images.githubusercontent.com/13398309/213941079-ae7d007a-ca92-4de3-9de6-7a156b4a0618.png)

</details>

## Changelog
🆑
fix: toilet bongs crafting recipes
fix: fixed crafting itself
refactor: cleaned up some old code in the recipes file, added support
for structures in recipes
/🆑
2023-01-23 12:53:28 +01:00
tattle
57e88e6091 Crafting fireaxe cabinets, mech removal cabinets, and mirrors (#72856)
## About The Pull Request
Breaking down #72371 because it's... unreasonably large.
So this PR splits the crafting recipe file, and adds 3 new recipes for
fireaxe cabinets, mech removal cabinets, and mirrors.

## Why It's Good For The Game
Wallening compliance, and more of me on my shit breaking down long
files.

## Changelog
🆑 Tattle
qol: fireaxe cabinets, mech removal cabinets, and mirrors can now all be
crafted
/🆑

Co-authored-by: tattle <article.disaster@gmail.com>
2023-01-23 10:45:27 +01:00
tattle
fd48108219 Crafting urinals, noticeboards, and pod controllers (#72861)
## About The Pull Request
Breaking down #72371 because it's... unreasonably large.
So this PR adds recipes for urinals and noticeboards, and a circuit for
pod computers.

The pod computers don't work, but you can certainly remove them without
smacking them like an animal until they fall to pieces.

## Why It's Good For The Game
Wallening compliance.

## Changelog
🆑 Tattle
qol: urinals and noticeboards can be handcrafted
qol: pod computers can be deconstructed
/🆑

Co-authored-by: tattle <article.disaster@gmail.com>
2023-01-23 10:29:31 +01:00
lessthanthree
2bd2cb6ecf Exempts horrible goose from tram hit counter (#72811)
Tram hitting the goose increments the hit counter, this fixes it so
mobs without clients don't increase the Tram's hit counter.
2023-01-23 02:27:35 +00:00
Ryll Ryll
8f972705e8 You can no longer climb ladders from anchored buckleables (#72808)
This PR prevents you from climbing ladders while buckled to something
that is anchored. You can still climb while buckled to non-anchored
things like wheelchairs or people.
2023-01-22 21:38:30 +00:00
Fikou
257dd62f8c Mannequins (#72830)
## About The Pull Request
you can now craft mannequins using 25 wood or plastic
they work with the mob stripping system letting you put items on em!

![image](https://user-images.githubusercontent.com/23585223/213600352-ad79cbaa-3ce0-4bf0-aa25-d31d01b5f51a.png)

![image](https://user-images.githubusercontent.com/23585223/213676239-065f266b-5874-43f1-81e6-2730e0a32fa7.png)

## Why It's Good For The Game
fun stuff for CARGO FASHION showcases.

## Changelog
🆑
add: You can now craft mannequins with wood or plastic.
/🆑
2023-01-21 19:09:29 -08:00
Time-Green
605ae9623f Fixes strange geyser and geyser regen (#72221)
Called the random reagent code after it was initialized
Registered the reagent del/remove signal on the geyser, not the reagent
datum of the geyser

Closes #72037 

🆑
fix: Strange geysers have random reagents again
fix: Geysers regen reagents again
/🆑
2023-01-18 12:13:04 -08:00