Commit Graph

104 Commits

Author SHA1 Message Date
Ghom
d4cdd6b63e Replaces lava and chasm's "safeties" and ignoring turf slowdown on catwalks with traits and a new element. (#76376)
## About The Pull Request
This adds a new element for movables that grants turfs they're in
traits, changes lava and the chasm component to check for traits
instead, ditto for turf slowdown. It also implements another trait that
prevents wet floor from slipping people, as well as some other changes
(feel free to opine on them really):
- Tables and conveyor belts now stop turf slowdown, much like catwalks,
as I imagine people walking on them are not really touching the floor.
(I'd include protection against lava too... until they melt, but that'd
mean finding a way to have these objects burn in the first place, and
lava code is still stupid despite a years old refactor I did)
- Tables also stop slippery turfs from slipping (bananas, soaps etc.
still apply). I wish there were a way to make some objects slippery by
coating them in water vapor or splashing water/lube, but that's outside
the scope of this PR.
- Fixed an edge case in which a mob standing on a lava turf would be
left permanently visually on fire if the lava is changed to another kind
of turf.
- Removed unused code from stone tiles.

I'm going to include these traits in that global list for admin-added
traits... tomorrow perhaps. 💤

## Why It's Good For The Game
Replacing some hard-coded mechanics with easier to use traits and an
element, which I also need for the submerge element PR.

## Changelog

🆑
refactor: Replaced hardcoded "safeties" for lava, chasms and ignoring
turf slowdowns on catwalks with traits.
balance: much like catwalks, tables and conveyors also disable turf
slowdowns.
balance: slippery turfs won't slip you when walking on a table.
fix: Fixed an edge case in which a mob standing on a lava turf would be
left visually but permanently on fire if the lava is changed to another
kind of turf.
/🆑
2023-07-07 10:04:33 +01:00
ChungusGamer666
4f2227baf3 Implements a macro for checking mind traits (#76548)
## About The Pull Request


![image](https://github.com/tgstation/tgstation/assets/82850673/f85d0556-1806-40bf-92b8-597e46ccb4af)
Seeing this pattern repeated over various sections of code was starting
to piss me off

## Why It's Good For The Game

Lessens chance to cause errors with mind traits, ensures consistent
behavior, makes it easier to change how mind traits work if necessary.

## Changelog

hopefully not player facing

---------

Co-authored-by: san7890 <the@san7890.com>
2023-07-06 11:45:46 -06:00
necromanceranne
2600f23ebb Coroner Update: Pickle-Eating Morbid Weirdo Obsessed with Death and Perfectionism (#76318)
This PR introduces a whole bunch of Coroner and Morbid related content.

Firstly, Morbid is now a mind trait, and specifically, coroners start
with it.

Coroners also have a liver trait that allows them to heal toxins (very
slowly) from eating pickles and drinking pickle juice. They also
can...drink formaldehyde. I guess. Dissections is thirsty work.

Coroners gain a whole set of special tools specifically for use in any
surgeries marked as interests of the Morbid. This is determined by the
``surgery_flag`` called ``SURGERY_MORBID_CURIOSITY``. Currently, these
surgeries are included;

dissections, autospies, revival surgery, plastic surgery, organ/feature
manipulations, amputations

To fit the theme, TRAIT_MORBID also applies the reduction to eye
snatchers.

While using their special tools, and the surgery is a morbid curiosity,
the coroner/anyone who is morbid gains a 30% speed boost! This stacks
with the dissection speed boost. Otherwise, the tools are just regular
tools with a special name (though the scalpel is better at killing
undead, because, you know, you're watching over the dead).

The coroner's special medkit, which is the only one you can get in a
round, can fit their autopsy scanners and tools. Anything that comes
standard with their kit can go back into it.

Anyone who is morbid can safely retrieve the secrets of the elephant
graveyard. The serrated shovel, notably, is a much better tool and
notably better at killing organics, but not inorganics (like the dead).

(Gives roboticists secure morgue access during skeleton crew pop totals)
2023-06-30 12:55:14 +00:00
Bloop
82fe5ef96e Makes puzzle elements unable to have their icons messed with (#76348)
## About The Pull Request

The hand labeler (and any other item that is capable of calling
`update_appearance` on an atom) was erasing the overlay icon when used
on a sliding puzzle piece. This just stops that from being able to
happen.

There should never be a case when the puzzle icon or overlays get
changed outside of during `set_puzzle_icon()`.

The puzzle is still able to be completed if any of the pieces get
labeled, by the way.

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

## Why It's Good For The Game

Fixes a bug/oversight

## Changelog

🆑
fix: sliding puzzles can no longer have their icons erased by the hand
labeler
/🆑
2023-06-27 16:48:25 -06:00
John Willard
5c0c095079 Makes decals only caught on mapload & removes turf_loc_check (#76130)
Theres one player-facing change in this PR and it's that I removed human
gibs from being valid in space turfs, making it more consistent with the
other gib decals.

I've cleaned up many instances of decals spawning in bad turfs on
mapload in https://github.com/tgstation/tgstation/pull/75189, but making
it error anytime in-game a decal is put over an invalid turf is bad as
it punishes contributors for not optimizing their decals properly.
This changes it so it only errors if it's on mapload, unit testing or
not.

I've also removed ``turf_loc_check`` and replaced instances of it with
overwriting ``NeverShouldHaveComeHere``, which gives us greater control
of where decals can be placed.
This let me remove 2 subtypes that were made to have decals in specific
places (which then got placed elsewhere, ruining it all).

Mappers are still able to set decals to be placed anywhere, they just
need to add it as a valid turf for that decal.
2023-06-24 20:16:38 +00:00
necromanceranne
64eae49042 Replaces the Reaper Scythe with the Vorpal Scythe (also the Morbid trait) (#75948)
adds the Vorpal Scythe, a special chaplain null rod variant, replacing
the Reaper Scythe, a not so special null rod variant.

When you choose the vorpal scythe, it comes as a shard that you implant
into your arm, similar to a cursed katana.

Once implanted, you can draw it at any time like an arm implant.
However, sheathing it again presents some problems. (Also, implanting
the organ gives you ``TRAIT_MORBID``, which I'll explain in a bit)

The Vorpal Scythe has 10 force, one of the weakest null rod variants for
force that isn't a joke null rod. However, it has exceptional armor pen
and also has 2 tiles of reach. So quite unique.

It also has a special beheading ability when you right-click someone.
This borrows some code from amputation shears, functioning pretty
similarly, except with a few additional ways to speed up the action and
restrictions. (It takes 15 seconds baseline to behead someone standing
and conscious, and speeds up or slows down based on factors such as
incapacitation and whether or not our scythe is already empowered)

When you successfully behead someone with a mind, the vorpal scythe
gains 20 force and can be safely stowed and drawn for 2 minutes.
Performing more death knells like this will reset the timer.

If it has not performed its 'death knell', or you haven't hit a living
mob, then it will cause severe damage to you if you ever try and stow it
(or its forced back into your arm). Just hitting a mob with the scythe
will sate it for 4 minutes. Unless it is a non-player monkey. Horrible
things. Just hitting mobs does not reset the timer on empowerment.

What this means is that the chaplain may be more hesitant to simply draw
their weapon on people. It also means that potentially, the chaplain
will not always have magic immunity, since they may end up stowing the
weapon away and be reluctant to draw it on a whim without either taking
damage for sheathing it without hitting something, or dealing with
having one less hand up until they can.

While empowerment only happens when you behead mobs with a mind,
beheading monkeyhumans and other mindless humans subtypes causes their
heads to become haunted! It's mostly harmless and largely just SpOoKy.
We don't want heads with actual players in them to go floating off to
space. (Does not work on monkey heads for sanity reasons)

When you have the Morbid trait, you think creepy stuff is cool and hate
saving peoples lives. You get a mood boost from graverobbing, autopsies,
dissections, amputations (including beheadings with the scythe and
amputations with the shears) and revival surgery. However, you get a
mood penalty when you tend wounds on the living, as well as a hefty
penalty when you perform CPR or defibrillate someone. I was thinking
Victor Frankenstein when I was choosing which actions had an associated
moodlet, so anything that I might have missed would be appreciated.

You also count as potentially cool with regards to haunted objects.
Ghosts think you're neat. (Revenants probably will still kill you if
they had the chance)
2023-06-21 04:37:18 +00:00
Ghom
22ad858d48 Yeets a duplicate ambience .ogg (#75909)
## About The Pull Request
Removed `ambigen2.ogg` and renamed all the generic ambience sounds after
`ambigen1.ogg` to account the fact we have one less generic ambience
sound file now.

## Why It's Good For The Game
This will close #75010

## Changelog
N/A, it wasn't even used in the code.
2023-06-08 23:12:57 -06:00
carlarctg
38e966014f Grammar pass on syndie SM shard (#75772)
## About The Pull Request

Fixes grammar error on syndie sm shard desc

## Why It's Good For The Game

gramar

## Changelog

🆑
spellcheck: Fixes grammar error on syndie sm shard desc
/🆑
2023-06-01 16:19:41 -04:00
Andrew
4318f9401b Oldstation QoL tweaks and minor fixes (#75259) 2023-05-30 17:31:41 -07:00
John Willard
0c99bd28f4 Makes gasses use defines (#75542)
## About The Pull Request

Adds defines for gasses and replaces uses I've found to instead use the
defines.

Can you believe I made this PR while trying to work with Xenos? This
sucks!

## Why It's Good For The Game

There's a lot of different uses of things like "o2" and "plasma", and
they are pretty inconsistent. In some places, it's "hydrogen", in others
it's "h2". In some it's "plasma", others "plasm". This unifies it all
under defines so it has a less chance of breaking in the future.

## Changelog

Nothing player-facing.
2023-05-27 19:45:22 -04:00
John Willard
8767ab709a removes all non-defined materials I found (#75659) 2023-05-26 15:45:09 -07:00
SyncIt21
5835efa614 [NO GBP]Grave Patches (#75563)
## About The Pull Request

1. Fixes #75553 You can put stuff in the grave normally by clicking that
item on the grave rather than throwing them in, this also means you can
destroy graves by attacking them with items or just dig the grave with a
shovel.
2. Graves can be closed again but "only" with a shovel and not instantly
by hand which was the previous behaviour (which was dumb and
nonsensical),
3. Add's examines & screentips for graves

## Changelog
🆑
fix: graves can be closed again, but only with a shovel and not by hand.
qol: you can put items in graves normally without throwing them in
qol: examines & screentips for graves
/🆑
2023-05-25 18:28:19 -06:00
Tim
1ddaa3e38e New basketball teams - Ash Gladiators and Beach Bums (#75361) 2023-05-22 17:56:01 -07:00
Rhials
05316726ec Ashwalker Tribe roundend reporting revamp (#75506)
## About The Pull Request

This PR changes how ashwalkers are listed in the roundend report.
Originally, they would be listed as individual "other" antagonists,
which isn't a particularly great way of handling it and leads to
weirdness like this:


![image](https://github.com/tgstation/tgstation/assets/28870487/c00a2cfc-3f08-46f6-a290-ef632cac0371)

_(That's an authentic ninja greentext from a live server, by the by)_

Now, the roundend report gives each ashwalker team their own section
within the report, whether or not they succeeded, and some bonus stats.


![image](https://github.com/tgstation/tgstation/assets/28870487/c2dc3c00-62a7-4784-90be-5a8bb5cc5a50)

This new roundend report handling also supports having multiple
Necropolises (Necropoli?) in the same round. Each tribe has their stats
and success reported individually.

This also slightly modifies the protect_object objective, preventing
hard deletes when linked to objects that don't clear their own
references.

## Why It's Good For The Game

Gives Ashwalkers a much better roundend report, and handles how the
reporting is done in a much more sensible manner.

Reduces how much space that large nests take up with their individual
listings.
## Changelog
🆑 Rhials
qol: Ashwalker roundend reporting has been revamped. Glory to the
Necropolis!
/🆑
2023-05-21 21:37:57 -06:00
ChungusGamer666
dff70625e7 Bible refactor (#75350)
## About The Pull Request

This started as a simple addition where burning a bible would curse you,
but then I realized... Bibles aren't even proper books, thus can't be
burned!
So yeah, since that is not necessary due to how atom_storage works, I
reworked that.

## Why It's Good For The Game

Because burning bibles and getting cursed for it is funny.

![image](https://github.com/tgstation/tgstation/assets/82850673/2a8489ce-ecd6-45ee-9eb9-168ff820af65)

![image](https://github.com/tgstation/tgstation/assets/82850673/ebe98ad6-2d0d-4d20-9ea1-5d472d6ca465)

## Changelog

🆑
add: You can burn bibles now! But heresy has a steep cost...
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-05-15 04:27:43 +00:00
ShizCalev
9c6a63872c Stops SSmachines processing lighting updates for lights stored inside a hilbert hotel storage container (#75301)
![image](https://github.com/tgstation/tgstation/assets/6209658/2616baa4-927f-4868-8a9e-1b5dd0ad20ff)

![image](https://github.com/tgstation/tgstation/assets/6209658/dd81498d-c043-48d0-97f0-b72303074b23)

this has been spamming runtime logs for yeaaaaaaarrrrrrrrrrrsssssssss.
above screenshot is from just the last week.
fixes #63850
closes #75305

🆑 ShizCalev
fix: Lighting inside of a Hilbert Hotel storage room no longer
constantly fails to update, clearing up some log spam and getting back
some free lag.
/🆑
2023-05-10 20:34:01 -06:00
Addust
47edb1fa7b Cere Whiteship Redo - Salvager's Heaven (#74994) 2023-05-09 11:02:59 -07:00
SyncIt21
2068ea9ab5 Crate, Closet Refactors & Access Secured Stuff (#74754)
## About The Pull Request
This PR is actually 2 parts, one that fixes runtimes with crates & the
other that allows secured closets to be crafted
along with a secured suit storage unit

**Crate Fixes**

Fixes #74708

The problem starts here

f117834208/code/game/objects/structures/crates_lockers/crates.dm (L31-L34)
Not only does this if condition look ugly but it's highly error prone
because one single call to `update_appearance()` can cause this to fail,
and sure enough if you look at the parent `Initialize()` proc it calls
just that

f117834208/code/game/objects/structures/crates_lockers/closets.dm (L81-L88)
Since we know the appearance is guaranteed to be changed in some way
before the if condition gets executed let's check what the final state
of the crate would be before this if check

f117834208/code/game/objects/structures/crates_lockers/crates.dm (L54-L56)
We see that the final icon state depends on the variable `opened` so if
we want to place/spawn a crate that is opened at round start we have to
ensure that `opened = TRUE` so the `if(icon_state ==
"[initial(icon_state)]open")` succeeds and does its job correctly.
Sadly we did dum shit like this
```
/obj/structure/closet/crate{
	icon_state = "crateopen"
}
```
throughout the entire code base, we thought backwards and were only
concerned in making the closet look open rather than setting its correct
variables to actually say that it is opened. because none of these
crates actually set `opened = TRUE` the final icon state becomes just
"crate" NOT "crateopen" therefore the if condition fails and we add the
component

f117834208/code/game/objects/structures/crates_lockers/crates.dm (L36-L37)
with the wrong parameters, so when closing the closet after_close()
removes the component with the wrong arguments

f117834208/code/game/objects/structures/crates_lockers/crates.dm (L81-L84)
that is does not unregister the signals and readds the component i.e.
re-registers the signals causing runtime.

The solution just do this
```
/obj/structure/closet/crate/open[mapping helper]
```
To clearly state that you want the closet to be open, that way you don't
have to memorize the icon_state for each different type of crate, it's
consistent across all crates & you don't get runtimes.

And that's exactly what i did everywhere

Another issue that is fixed is "Houdini crates" i.e. crates which are
open & appear empty but when you close & reopen them magical loot
appears, Go ahead walk upto to cargo and find any empty crate that is
open and do this

Fixes #69779


https://user-images.githubusercontent.com/110812394/232234489-0193acde-22c8-4c19-af89-e897f3c23d53.mp4

You will be surprised, This is seriously harmful to players because they
can just walk by a crate that appears to be open & empty only to realize
later that it had some awesome loot. Just mean

The reason this happens is because of the Late Initialization inside
closets

f117834208/code/game/objects/structures/crates_lockers/closets.dm (L85-L86)

What late initialization does is suck up all stuff on its turf

f117834208/code/game/objects/structures/crates_lockers/closets.dm (L97-L100)

In theory this is supposed to work perfectly, if the closet is closed
move everything on the turf into the closet and so when the player opens
it, they all pop back out.
But what happens if the closet is opened before ` LateInitialize()` is
called? This breaking behaviour is caused by object spawners

f117834208/code/game/objects/effects/spawners/random/structure.dm (L94-L100)
And maint crates

f117834208/code/game/objects/structures/crates_lockers/crates.dm (L141-L143)
These 2 spawners open up the crate based on random probability before `
LateInitialize()` is called on the crate and so what happens is the
crate is first opened and then stuff on the turf is sucked in causing an
open but empty crate to appear.

The solution is simple just check again in ` LateInitialize()` if our
crate is still closed before we proceed.That's fixed now too

**Code Refactors**
1. Introduced 2 new signals COMSIG_CLOSET_PRE/POST CLOSE which are the
counter parts for the open signals. hook into them if you ever need to
do stuff before & after closing the closet while return BLOCK_CLOSE for
COMSIG_CLOSET_PRE_CLOSE if you want to block closing the closet for some
reason
2. 2 new procs `before_open()` & `before_close()` which are the counter
parts for `after_open()` & `after_close()`. If you need to write checks
and do actions before opening the closet or before closing the closet
override these procs & not the `open()` & `close()` procs directly

**Secured Craftables** 
This is just a reopened version of #74115 after i accidently merged
another branch without resolving the conflicts first so i'll just
repaste everything here, since crates & closets are related might as
well do all in one

1. **Access secured closets**
   
   - **What about them?**
          **1. Existing System**
If you wanted to create a access secured closet with the existing system
its an 4 step process
            - First construct a normal closet
            - Weld it shut so you can install the airlock electronics
            - Install the electronics [4 seconds]
            - Unweld
This is a 4 step process which takes time & requires a welding tool
         **2. New system**
Combine the 4 steps into 1 by crafting the secure closet directly
                    
![Screenshot
(184)](https://user-images.githubusercontent.com/110812394/235904926-c2ea231c-eba7-45d0-a5af-e0456fdd40bc.png)

    - **Bonus Features**
              **1. Card reader**
The card reader acts as an interface between the airlock electronics &
the player. Usually if you want to change access on a locker you have to
                  - Weld the closet shut
                  - Screw driver out the electronics
                  - Change the settings
                  - Install it back
                  - Unweld
With a card reader there is no need of a welder & screwdriver. You can
change the access of the locker while its operational

        **How do i install the card reader?**
             1. Weld the closet shut
             3. Insert card reader with hand
4. To remove the card reader use crowbar or just deconstruct the whole
closet with a welding tool
             5. Unweld closet

         **How to change its access?**
This will overwrite the settings on your airlock electronics. To do this
1. make sure the closet is first unlocked. This is important so that no
random person who doesn't have access to the closet can change its
access while its locked. It would be like giving the privilege of
changing your current password without first confirming if you know the
old password
2. attack/swipe the closet with your PDA. Make sure your ID card is
inside the PDA for this to work. You can also just use your ID card
directly without a PDA
         3. You will get 3 options to decide the new access levels
           
![Screenshot
(174)](https://user-images.githubusercontent.com/110812394/233454364-d99a2fb6-9f26-4db3-9fac-a10689955484.png)


        They work as follows
- **Personal**: As the name implies only you can access this locker and
no one else. Make sure to have your ID on you at all times cause if you
loose it then no one can open it
- **Departmental**: This copies the access levels of your ID and will
allow people having those exact same access levels. Say you want to
create a closet accessible to only miners. Then have an miner choose
this option and now only miners can open this closet. If the Hop sets
custom access on your ID then only people with those specific access
levels can open this closet
         - **None**: No access, free for all just like a normal closet

**Security:** After you have set the access level it is important to
lock the access panel with a "multi-tool", so no one else can change it.
Unlock the panel again with the "multi-tool" to set the new access type

       **2. Give your own name & description**
To rename the closet or change its description you must first make the
closet access type as personel i.e. make it yours, then use an pen to
complete the job. You cannot change names of departmental or no access
closets because that's vandelism

       **3. Custom Paint Job**
    Use airlock painter. Not intuitive but does the job. 
   
![Screenshot
(181)](https://user-images.githubusercontent.com/110812394/234202905-00946b88-2513-489d-b0a2-d618a72f3e49.png)

      **4. Personal closets**
Round start personal closets can have their access overridden by a new
ID when in it's unlocked state. This is useful if the last person has no
use for the closet & someone else wants to use it.


    - **Why its good for the game?**      
1. Having your own personal closet with your own name & description
gives you more privacy & security for your belongings so people don't
steal your stuff. Personal access is more secure because it requires you
to have the physical ID card you used to set this access and not an ID
which has the same access levels as your previous ID
2. Make secure closets faster without an welding tool & screw driver
3. Bug fix where electronics could be screwed out from round start
secured closets countless times spawning a new airlock electronic each
time
      
2. **Access secured freezers**

    - **What about them?**
The craftable freezer from #73942 has been modified to support secure
access. These can be deconstructed with welders just as before

![Screenshot
(185)](https://user-images.githubusercontent.com/110812394/235905000-ba165feb-4384-4759-b46b-dba77c9e6ba3.png)


    - **How does it work?**
The access stuff works exactly the same as secure closets described
above. You can rename & change description with pen just like the above
described secure closets. No paint job for this. Install card reader
with the same steps described above.

    - **Why it's good for the game?**
1. Make access secured freezers faster without a welder and screwdriver
2. Your own personally named & locked freezer for storing dead bodies is
always a good thing

4. **Access secured suit storage unit**
   - **What about them?**
Suit storage units now require airlock electronics for construction. The
access levels you set on it will be used to decide
       1. If a player can unlock the unit
       2. If the player can open the unit after unlocking
       3. If the player can disinfect whatever is inside
       
      By default all round start suit storage units have free access

   - **Install card reader**
Provides the same functionality as secured closets described above. To
install it
     1. Open its panel with a screw driver
     2. Add a card reader to it with hand
     3. Close the panel
     
     When you deconstruct the machine the card reader pops back out

   - **Why it's good for the game?**
1. Having your own access protected and named suit storage unit so
random people don't steal your mod suits? Who wouldn't want that.?
Provides security for department storage units.
2. If you have the unit locked then you cannot deconstruct the machine
with a crowbar providing additional security
3. Fixes #70552 , random people can't open/unlock the suit storage unit
without access. You can set personal access to make sure only you can
access the unit

## Changelog
🆑
add: Access secured closets. Personal closets can have their access
overwritten by an new id in it's unlocked state
add: Access secured freezers.
add: Access secured suit storage units.
fix: Suit storage unit not having access restrictions.
fix: airlock electronics not properly getting removed after screwing
them out from round start lockers
fix: round spawned open crates run timing when closed
fix: open crates hiding stuff in plain sight
fix: open closets/crates sucking up contents during late initialize
causing them appear empty & open
/🆑

---------

Co-authored-by: Tim <timothymtorres@gmail.com>
2023-05-08 10:42:54 -07:00
Jacquerel
1a918a2e14 Golem Rework (#74197)
This PR implements this design document:
https://hackmd.io/@Y6uzGFDGSXKRaWDNicSiEg/BkRr176st
Put briefly, this will remove every existing golem subtype and
consolidate golems into a single species with cool new sprites.
NOT implemented from that PR is the ability to eat Telecrystals, I
couldn't come up with an appropriate visual that can stack with the
existing ones, but that should be a reasonably trivial add for a future
artist & developer.

New Golems have a food-based mechanic where their hunger decays pretty
quickly and can only be replenished by eating minerals. They start
moving slower as they get hungrier, until eventually they become
completely immobilised and need to be rescued.
Eating different kinds of minerals will visually change your sprite and
give you a special effect in a similar way to old golems, but temporary.
While transformed, you can't eat any other kind of mineral which would
transform you (but can still consume glass).
To see the full list of effects, look at the hackmd above.

In service of these sprites working I have refactored the
`species/offset_features` feature by killing it and delegating that
responsibility to limbs instead. Rather than applying an offset to items
due to your species, it is due to your weird head or arms. This makes
overall more sense to me, but it inflates the code changes in this PR
somewhat.
It doesn't make a lot of sense to atomise unfortunately because that
code also seemed to be entirely unused until I tried to use it in this
PR, so you wouldn't be able to tell if my changes broke anything. I
might make a downstream sad by doing this.

All of the actual numbers in this PR are made up and only loosely
tested, it will need some testmerges to gather feedback about whether it
sucks or not.

Other relevant changes:
I reworked how bioscrambling works based off bodypart bodytypes, to
automatically exclude golem limbs in either direction. There's really no
way to have those work on humans or vice versa. Organs still fly though.
2023-05-07 22:45:20 +00:00
Andrew
d3d2da52f9 Damaged window and broken machine helpers (#75132)
## About The Pull Request

Added a helper that makes it possible to spawn broken machines without
var-editing.

Removed the damaged reinforced window spawner and added a general
damaged window helper working on any first window found on a tile.

<img width="787" alt="2"
src="https://user-images.githubusercontent.com/3625094/235808169-c6143606-52e8-4bb7-bab4-e7ce3d359eb2.PNG">

<img width="787" alt="1"
src="https://user-images.githubusercontent.com/3625094/235808160-688f56eb-269a-4019-8c1c-2819cc3a4432.PNG">

## Why It's Good For The Game

Less var edits, better tools for mappers, more immersive ruins.

## Changelog

🆑
qol: Mapping: Added broken machine map helper
qol: Mapping: Replaced damaged window spawner with a universal helper
/🆑
2023-05-04 14:06:30 -06:00
ArcaneMusic
f2fd69a49a Minerals have been refactored so costs and minerals in items are now in terms of mineral defines. (#75052)
Ladies, Gentlemen, Gamers. You're probably wondering why I've called you
all here (through the automatic reviewer request system). So, mineral
balance! Mineral balance is less a balance and more of a nervous white
dude juggling spinning plates on a high-wire on his first day. The fact
it hasn't failed after going on this long is a miracle in and of itself.

This PR does not change mineral balance. What this does is moves over
every individual cost, both in crafting recipes attached to an object
over to a define based system. We have 3 defines:

`sheet_material_amount=2000` . Stock standard mineral sheet. This being
our central mineral unit, this is used for all costs 2000+.
`half_sheet_material_amount=1000` . Same as above, but using iron rods
as our inbetween for costs of 1000-1999.
`small_material_amount=100` . This hits 1-999. This covers... a
startlingly large amount of the codebase. It's feast or famine out here
in terms of mineral costs as a result, items are either sheets upon
sheets, or some fraction of small mats.

Shout out to riot darts for being the worst material cost in the game. I
will not elaborate.

Regardless, this has no functional change, but it sets the groundwork
for making future changes to material costs much, MUCH easier, and moves
over to a single, standardized set of units to help enforce coding
standards on new items, and will bring up lots of uncomfortable balance
questions down the line.

For now though, this serves as some rough boundaries on how items costs
are related, and will make adjusting these values easier going forward.

Except for foam darts.

I did round up foam darts.

Adjusting mineral balance on the macro scale will be as simple as
changing the aforementioned mineral defines, where the alternative is a
rats nest of magic number defines. ~~No seriously, 11.25 iron for a foam
dart are you kidding me what is the POINT WHY NOT JUST MAKE IT 11~~

Items individual numbers have not been adjusted yet, but we can
standardize how the conversation can be held and actually GET SOMEWHERE
on material balance as opposed to throwing our hands up or ignoring it
for another 10 years.
2023-05-03 14:44:51 +00:00
tattle
77aebb4c29 Audio File Cleanup (#74863)
## About The Pull Request
Removes a bunch of sound files that we don't use and moves some sound
files into better locations. I'm hoping to get an archive repo for
sounds going, much like the
[map_depot](https://github.com/tgstation/map_depot) and
[SS13-sprites](https://github.com/tgstation/SS13-sprites).

EDIT: The old sound files are being moved here:
https://github.com/tgstation/SS13-sounds

Also increased the volume of the clownana rustle sound and clipped off
some dead air from shockwave_explosion

## Why It's Good For The Game
Removes a total of 1.95MB worth of unused sound files from the codebase.

## Changelog
🆑 Tattle
soundadd: increased the volume of the clownana rustle
/🆑

---------

Co-authored-by: tattle <article.disaster@gmail.com>
2023-04-20 17:22:08 -06:00
Singul0
499c5533e6 New Space Ruin: The All-American Diner! (#74460) 2023-04-18 18:20:06 -07:00
Bloop
ac5236a251 Refactors sheet crafting to better support directional construction (#74572)
## About The Pull Request


0426f7ddba/code/game/objects/items/stacks/stack.dm (L449)

Ok, but can we not?

This PR refactors sheet crafting to generalize all the cases that were
previously locked behind grille/window type checks and such. In their
stead there are bitflags that can be set to achieve certain behaviors.

All the behavior from before should be preserved, but now it can be
extended to other items. E.g. if you want a railing that can be crafted
underneath directional windows, or an item that behaves like a grille
does--it's just a matter of setting the right obj_flags for it now.

This makes it very simple and painless to add new recipes that use
directional crafting! It's all modular now.

<details><summary>Details</summary>

---

### What I've done:

-Eliminated all the type checks, instead it will now be handled by
object flags and recipe vars, making for a much more configurable
system.

-Added two new obj_flags: `BLOCKS_CONSTRUCTION_DIR` and
`IGNORE_DENSITY`.
-Additionally, I renamed the existing flag `NO_BUILD` to
`BLOCKS_CONSTRUCTION`.

-Changes the proc `valid_window_location` to `valid_build_direction`,
and makes it work for things other than windows.

-Removed a deprecated `window_checks` var from the stack_recipe datum.
-Added three more vars to the stack_recipe datum: `check_direction` and
`check_density`, `is_fulltile`

-Decoupled `on_solid_ground` from the object density check. Now you can
set those separately, allowing you to make recipes that forbid/allow
building things over other things while in space.

---

### What the new flags do:

`BLOCKS_CONSTRUCTION` works as before---prevents objects from being
built on the object. I felt that the previous name was not descriptive
enough, you should know exactly what it does just from looking at the
name.
_example: dna scanner_

`BLOCKS_CONSTRUCTION_DIR` -- setting this on an object will prevent
objects from being built on it when their directions are the same.
_example: directional windows, windoors, railings_

`IGNORE_DENSITY` -- setting this on an object will cause its density to
be ignored when performing the construction density check. This could
have other potential uses as well in the future.
_example: grilles, directional windows, tables_

These three flags cover all the bases for the types of items that are
currently craftable, so there is no more need for any type checking or
weird snowflake window checks. Simply set the appropriate flag and it'll
work as you would expect.

---


### What the recipe vars do:
`check_direction` tells the recipe to check if there's something in that
direction with the `BLOCKS_CONSTRUCTION_DIR` flag set.

`check_density` tells the recipe to run the density check when set. This
is true by default. There are very few items in the game that currently
have this set to false--namely grilles. Setting this to false will make
it so that the object can be constructed regardless of what is in that
tile (unless `one_per_turf` is also set, which will make it so that you
can't craft the same thing twice in the same turf).

`is_fulltile` is used for fulltile windows, but it doesn't necessarily
have to be--you can give this to any recipe and it will adopt the same
properties as that of the fulltile window. Basically they have a special
case where they shouldn't be able to be built over directional
constructions, where normally things would be able to be. Setting this
makes check_direction true as well.

---

### In summary: 

Sheet crafting still works just as it did before. But the backend of it
has gotten a glow up and will be able to more easily support new
behaviors.

</details>

## Why It's Good For The Game

This makes the crafting system much more flexible to add recipes to, and
will prevent bad code practices of stacking more conditionals down the
line whenever someone wants to add an item that behaves like grilles or
directional windows in how they are constructed.

It had to be done. Those window checks were a mess.

## Changelog

🆑
qol: added fifty stack versions of remaining glass sheet stacks for ease
of debugging
refactor: refactored sheet crafting to better support directional
constructions that aren't windows
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-04-15 21:48:34 -06:00
jimmyl
170fd5d7ca Gives waystation cargo-techs shoes (#74558)
## About The Pull Request

gives shoes to waystation cargo technician corpses

## Why It's Good For The Game

fixes #74512

## Changelog


🆑
fix: waystation cargo techs get shoes now
/🆑
2023-04-07 21:19:17 -07:00
Donglesplonge
48beec0024 [Space Ruin] - The outlet (#74319) 2023-04-06 18:16:35 -07:00
Tim
4397d63a55 Split weapons_and_items.dmi icons into their own categories (#74363)
## About The Pull Request
This sprite file had been a dumping ground for miscellaneous sprites for
the past decade. It's bloated and full of random kinds of icons and even
has a few unused ones. It's time to reorganize them into their own
separate dmi's based on theme.

## Why It's Good For The Game
Better organization and easier access when looking for stuff.

## Changelog
🆑
imageadd: Split all icons in weapons_and_items.dmi to their own
categories
imagedel: Removed some unused icons
/🆑
2023-04-06 08:30:57 +12:00
DaydreamIQ
6440c2489a Abandoned Interdyne research base (#74263) 2023-04-04 19:53:11 -07:00
Time-Green
f13f979586 March Into Mapness: Anomaly Research Ruin (#74110)
## About The Pull Request
Adds a new ruin: Anomaly Research Center!
Researcher Anna Molly disappeared along with 20 anomaly cores, where
could she have gone?


![image](https://user-images.githubusercontent.com/7501474/228217881-6b510347-d37f-4713-841c-e2280b92f69c.png)

<details>
  <summary>Pictures</summary>

(a bit outdated but not that much)

![image](https://user-images.githubusercontent.com/7501474/226172256-1d29257e-0914-48da-b199-8ecb3d0b8d99.png)

![image](https://user-images.githubusercontent.com/7501474/226172318-f98d7402-0b3e-4797-b788-2085bfc6ac46.png)

![image](https://user-images.githubusercontent.com/7501474/226172341-b70ae4d6-c1e2-4cf7-8667-c64ac99252cf.png)

![image](https://user-images.githubusercontent.com/7501474/226172364-c7b4c78f-4ddd-4ded-8ca2-92cb74e05d86.png)

![image](https://user-images.githubusercontent.com/7501474/226172378-8cf579b3-c081-436b-8121-ac6e080d7af0.png)

![image](https://user-images.githubusercontent.com/7501474/226172387-ef67e32f-adb1-4d68-8e6a-a0beb7f0435d.png)

![image](https://user-images.githubusercontent.com/7501474/226172406-d735ce68-2bd6-4218-acc3-7efa0acdca06.png)

![image](https://user-images.githubusercontent.com/7501474/226172413-03c9bff7-2d96-4f51-be3a-ea738f92c04f.png)

![image](https://user-images.githubusercontent.com/7501474/226172448-ea19ced1-6f34-4cc4-ac98-6dbfd1481847.png)

![image](https://user-images.githubusercontent.com/7501474/226172454-a8df6a4d-7a14-4942-ab71-9baa03a948fd.png)
</details>

<details>
  <summary>Loot and hazards</summary>

**Loot**

- (1) Raw anomaly core
- NO ANOMALY CORES
- Empty anomaly armor, empty bag of holding
- Bunch of anomaly neutralizers
- 5u of wittel (guarded by anomaly)
- (5) New anomaly releaser, use on an anomaly core to release and
stabilize the anomaly, removing the decay timer

**Hazards**
Area is guarded with "hollow" anomalies, stable and coreless (flux,
bluespace, hallucination, delimber)
They cannot be signalled, but the anomaly neutralizes will make them go
away

BEEEG ANOMALIE: Spawns with a contained supermassive anomaly. There's
four possible big anomalies that can spawn:
- Mega Bluespace: Has a longer reach and can teleport further. On touch,
teleports you all over space for 10 seconds
- Mega gravity: Distorts the area around it, as strong as the rare
gravity anomaly, but with extreme moveforce
- Mega Pyro: Creates more plasma, turns the tile it's on into lava,
dusts on touch
- Mega Flux: Extra damage, dusts on touch, shoots lightning
  
</details>

### Mapping March
Ckey to receive rewards: timegreen

## Why It's Good For The Game
I think we're overdue for an anomaly ruin. The ruin has some unique loot
that could be really fun, but not devastating, to play around with on
the station. The mega-anomaly is also pretty cool.

## Changelog
🆑
add: Researcher Anna Nomally has disappeared into space, carrying 20
anomaly cores. What could she be up to?
/🆑

---------

Co-authored-by: Sealed101 <75863639+Sealed101@users.noreply.github.com>
2023-04-02 13:55:41 +12:00
Jacquerel
966b8e5fd8 March into Mapness: Meateor (#74070) 2023-03-31 19:40:29 -07:00
san7890
17e23fed64 Fixes "Atmos Asteroid" Active Turfs - Irony Edition (#74379) 2023-03-31 19:08:54 -07:00
Singul0
f00d9eca50 March into Mapness: The Waystation (#74192) 2023-03-30 00:07:43 +00:00
san7890
ccef887efe Lints Against Unmanaged Local Defines (#74333)
# MAINTAINER - USE THE BUTTON THAT SAYS "MERGE MASTER" THEN SET THE PR
TO AUTO-MERGE! IT'S MUCH EASIER FOR ME TO FIX THINGS BEFORE THEY SKEW
RATHER THAN AFTER THE FACT.

## About The Pull Request

Hey there,

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

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

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

Scenarios this PR corrects:

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

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

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

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

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

(I fixed up all this stuff using vscode, no regexes beyond what you see
in the python script. sorry downstreams)
2023-03-29 10:17:03 -07:00
John Willard
302060acda Removes bepis Techweb and reworks tech disks in general (#74147)
## About The Pull Request

Did you know that there's 2 types of disks Science can print?
One of them creates a whole new techweb and is used to transfer data to
and from techwebs (which used to be for Theft objective, but nowadays
all it's used for is Admin techweb).
The other one is these disks you can find from Lavaland & for the
Limbgrower which holds nodes on them directly, they don't need anything
else.

These are both printable and have very similar names which could easily
confuse people, especially since they are both printed and used at the
same place, being the R&D room and R&D console.

This will hopefully simplify it, by removing the base Tech disks from
being printable. The only one that can be printed now is for
Limbgrowers, which can't be easily mixed with the other type of Disk.
Outside of that, Lavaland disks are staying the same, but I've moved
Bepis disks to use this, which allows us to remove Bepis techwebs being
made every single time a new bepis disk is created.

Examples of it in-game

![image](https://user-images.githubusercontent.com/53777086/226496444-28b17134-526d-4fc8-969b-952f7afdc36f.png)

![image](https://user-images.githubusercontent.com/53777086/226496483-86969bf9-56db-4824-a495-594afd9f3912.png)

![image](https://user-images.githubusercontent.com/53777086/226496498-7c10f636-5588-4622-934c-11f019079d2e.png)

## Why It's Good For The Game

There's no reason why every single Bepis node should be making a whole
new techweb set with experiments to complete, roundstart nodes
researched, being constantly checked if it should gain research points,
have a list of papers to publish, and everything else that techwebs do.

Can you guess which disk does what in this screenshot?

![image](https://user-images.githubusercontent.com/53777086/226496856-10cf71b0-7469-4568-818f-ecadcf03e677.png)

## Changelog

🆑
balance: You can no longer print Technology data disks. You can still
print Tech disks, which hold techweb information on it, just not the one
that holds up to 5 nodes.
balance: ^ Because of this, there's no way to download nodes from an RD
console and upload them to an Autolathe to bypass departmental
restrictions, you have to go through a Techfab/Circuit imprinter for
your needs.
balance: Ones that are found cannot have anything uploaded/deleted off
of them either, you can only upload them to the Web.
code: Every individual Bepis disk no longer create an entire techweb
/🆑
2023-03-26 18:23:03 -04:00
Timberpoes
fcdbb85fc9 Fixes machines not releasing their contents when opened (such as mobs), when they otherwise should. (#74215)
## About The Pull Request

Broken by #74163

Various child procs of `/obj/machinery/proc/open_machine(drop = TRUE,
density_to_set = FALSE)` didn't have the same params as the parent proc.

This leads to the wrong arg being passed to the parent's `drop = TRUE`
param during the parent proc call.

In this case, 0 (FALSE). Leading to machines that never dropped their
contents when opened. This is a problem when a lot of the machines I've
fixed contain players, necessitating admin intervention to free them.
## Why It's Good For The Game

Feex.
## Changelog
🆑
fix: DNA Scanners, Sleepers, Abductor Experimentors, Skill Stations and
Mod Installers now appropriately release their contents when opened,
fixing an issue where they could permanently absorb players and items
until admins intervened.
/🆑
2023-03-24 20:07:54 +00:00
Antonio Tosti
0e1cedd354 Machines can now be pried open multiple times and maintain their initial densities (#74163)
## About The Pull Request
These changes fix how machines are pried open with crowbars. Currently,
most machines can be pried open, but many of them have no method for
being closed again. This means they can be pried once, and then never
again (as their internal logic has them stuck in an "open" state).

Additionally, the densities of these machines is also inconsistent, as
density is tied to the procs for opening/closing machines (open =
non-dense, closed = dense). Thus, these new changes allow desired
densities to be passed to `open_machine()` and `close_machine()`, as
well as `default_pry_open()`, meaning that atypical machine densities
can be maintained (e.g. machines that should remain dense when open, or
non-dense when closed).

I've also added a `close_after_pry` boolean parameter to the
`default_pry_open()` proc, which determines whether to immediately close
a machine after opening it. This is useful for machines that don't
really have a use case for remaining open, often lacking a sprite to
represent this state as well.
* Note: Opening and immediately closing machines with this boolean will
still drop their contents onto the floor, but will now immediately
"close" in their logic, allowing for further prying attempts in the
future.

It's worth noting that this implements default density values for these
procs, which match the existing behavior for machines, so as to
(hopefully) not disrupt existing or expected machine behavior.

Two caveats to these changes currently exist:
1. On machines that immediately close after prying, the prying action
can now be spammed to the chat with repeated clicking. I'm uncertain if
this needs some sort of spam protection or if it's fine as is.
2. I've only been able to manually test this code. I'd love to write
unit tests for it, as it affects a lot of different machines, but don't
know where to begin with DM Unit Testing (or which files would be good
examples to reference in the code base).
* Note: I did manually test each and every machine that calls
`default_pry_open()` and they all seem to be working correctly. (Except
for `obj/machinery/plumbing/sender`, but that doesn't seem to need
prying, as it has no contents to drop, only reagents.)

As always, let me know if any improvements/changes should be made.

This closes #26833.

## Why It's Good For The Game
These changes allow crowbar prying to correctly occur multiple times on
any machine, which is intended behavior. It prevents player confusion
that could occur when a machine couldn't be pried open a second time
during a shift, even though it had previously been pried before, forcing
players to question themselves. (Are they missing something? Did they
perform the action a different way last time? Is the machine actually
still powered on instead of off? Etc.)

These changes also maintain the correct density for machines after
prying, preventing scenarios where a machine might behave differently
once it had been pried open. (An example of this was being able to walk
through a smartfridge after prying it open.) Additionally, players are
no longer required to know/use workarounds (such as machine disassembly)
to retrieve a powered-off machine's contents.

Overall, these changes improve consistency around machines, creating
more scenarios where they behave as players would expect.

## Changelog
🆑
fix: machines can now be pried open more than once.
fix: machines now have the correct density when pried open.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-03-23 16:19:53 -06:00
lessthanthree
4ac4a0a70f Tram signal process/destination improvements (#74072)
## About The Pull Request

- Tram crossing signals now call process() much less often
- Tram crossing signals don't turn amber/red needlessly
- Tram destination landmarks are more generic to accommodate future
maps, like Birdshot
- Renames to_where and from_where, because those vars didn't always
match tram position to/from

## Why It's Good For The Game

Tram works better, uses less processing

## Changelog

🆑 LT3
code: Tram crossing signal/platform logic improvements
/🆑
2023-03-20 01:49:17 +00:00
Vile Beggar
9eaaeee06e Reworks the Sulaco ruin (#73840) 2023-03-18 13:10:30 -07:00
LemonInTheDark
60e85fa947 Polishes some side sources of light and color (#73936)
## About The Pull Request

[Circuit Floor
Polish](6b0ee98132)

Circuit floors glow! but it looks like crap cause it's dim and the
colors are washed out.
I'd like to make them look nicer. Let's make them more intense and
longer range, and change the colors over to more vivid replacements.

While I'm here, these should really use power and turn on and off based
off that.
Simple enough to do, just need to hook into a signal (and add a setter
for turf area, which cleans up other code too).

[Desklamp
Upgrade](8506b13b9c)

Desklamps look bad. They're fullwhite, have a way too large
range.Crummy.
Let's lower their lightrange from 5 to 3.5, and make the ornate ones
warmer, and the more utilitarian ones cooler. The clown one can be
yellow because it's funny

I'm renaming a color define here so I'm touching more files then you'd
expect

[Brightens
Niknacks](835bae28e9)

Increases the light range of request consoles, status displays,
newscasters, and air alarms (keycard machines too, when they're awaiting
input at least)
Increases the brightness of air alarms, I think they should be on par
with apcs, should be able to tell when they're good/bad.
Increases the brightness of vending machines (I want them to light up
the tiles around them very lightly, I think it's a vibe)

Fixes a bug with ai status displays where they'd display an emissive
even if they didn't have anything on their screen, looking stupid.
This was decently easy but required a define. Looked really bad tho

## Why It's Good For The Game

Pretty

<details>
<summary>
Circuit Floors
</summary>

Old

![image](https://user-images.githubusercontent.com/58055496/224534470-c6eac5f5-5de6-40e9-897d-3212b8796d81.png)

![image](https://user-images.githubusercontent.com/58055496/224534477-ad412ad9-f7c4-44ae-ad75-a1a2c9bd17be.png)

New

![image](https://user-images.githubusercontent.com/58055496/224534486-b7b408a3-546c-4f90-aa9f-0e58bf8128ad.png)

![image](https://user-images.githubusercontent.com/58055496/224534496-626458f7-ab63-429c-a5db-eae9c784d06a.png)
</details>

<details>
<summary>
Desk Lights
</summary>

Old

![image](https://user-images.githubusercontent.com/58055496/224534513-9868b0b8-bc73-4b45-b986-8445078a8653.png)

![image](https://user-images.githubusercontent.com/58055496/224534518-bbbc8c6d-b59e-4f28-a31c-6c6a7e2c2885.png)

New

![image](https://user-images.githubusercontent.com/58055496/224534529-7988f440-03be-42ef-894c-b9e77f577ae5.png)

![image](https://user-images.githubusercontent.com/58055496/224534532-c3f2c6bf-c925-4a59-a8f9-10bb955a9942.png)
</details>

The niknack changes are more minor so I'm not gonna grab photos for
them. I can if you'd like but I don't think it's necessary. Mostly a
vibes in dark spaces sorta thing
 
## Changelog

🆑
add: I made circuit floors brighter and more vivid.
add: Made air alarms, vending machines, newscasters, request consoles,
status displays and keycard machines slightly "brighter" (larger light
range, tho I did make air alarms a bit brighter too)
add: Tweaked desklamps. Lower range, and each type gets its own coloring
instead of just fullwhite.
fix: AI displays are no longer always emissive, they'll stop doing it if
they aren't displaying anything. Hopefully this'll look nicer
/🆑
2023-03-14 16:34:52 -06:00
Cheshify
40b8ecd456 Dangerous Research - The Alternate Sciences Research Center Space Ruin! (#73544) 2023-03-01 19:50:21 -07: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
MrMelbert
e8d209c6f4 Fixes runtime in golem body swap, Fixes some hard deletes assocaited with golems and mind masters (#73373)
## About The Pull Request

Fixes #73368 

Golems didn't mind transfer on body swap until after the body was
finished creating, this created an issue as golems also did mind
assignment business while creating the body. So the
`mind.enslave_to_creator()` part runtime error'd and caused the create
to fail, which in turn caused the shell to not be consumed.

While sorting this out, I noticed that shells and golems hold a hard
reference to their owner. Yep, hard deletes. Changes mind `enslaved_to`
to a weakref, changes golem `owner` to a weakref, straight up removes
golem `owner` tracking on species because it was ONLY used for card
board golems when it could've just grabbed mind master

## Why It's Good For The Game

No more infinite golem shells

## Changelog

🆑 Melbert
fix: Transferring golem shells no longer make you a free man and also
results in infinite golem shells
fix: Servant golems are considerably less free
fix: Fixes some hard deletes related to mob minds being enslaved to
other mobs
/🆑
2023-02-17 15:06:49 -07:00
carshalash
141b2cac1b Adds nutriment factor to liquid gibs. (#73033)
## About The Pull Request

Over the years I've heard quite a few lizard players scratch their heads
in confusion due to the lack of gibs filling you up. I gave it a fairly
low value of 2 so people don't end up trying to power game it.

## Why It's Good For The Game

Adding an alternative use to gibs is always nice, at the moment it's
mostly just used for soap and cytology (Which barely anyone does.)

## Changelog

🆑
balance: Gibs now provide a small amount of nutriment.
/🆑
2023-01-30 23:40:24 -07:00
MMMiracles
c9acb52c0e changes regular asteroid digResult to regular sand instead of basalt sand (#72956)
## About The Pull Request
makes it so the regular sand gives you regular sand when you dig up
regular sand
also changes the var name because fikou asked nicely

## Why It's Good For The Game
lavaland already uses a basalt variant did we forget that asteroids
exist in space too or something

![image](https://user-images.githubusercontent.com/9276171/214567563-48fa89e8-25e4-410d-839a-39b2472466dc.png)


## Changelog
🆑 MMMiracles
fix: Regular asteroid turfs now dig up regular asteroid sand instead of
the basalt variant from Lavaland.
/🆑
i don't know why this was changed or when or by who and i don't care i
just find it weird it was done in the first place since lavaland uses
its own variant anyway.
2023-01-26 10:44:47 -08:00
Fikou
519bf69869 Dynamic Human Icon Generation For Simple/Basic Mobs (& Cardboard Cutouts) (#72517)
## About The Pull Request
revive of #68760
this time a proc, not an element
this time supports cardboard cutouts
this time supports mob corpses

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

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

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

Co-authored-by: Time-Green <timkoster1@hotmail.com>
2023-01-18 20:04:10 +00:00
LemonInTheDark
858da9f19a Optimizes explosions (very slightly) (#71763)
## About The Pull Request

We do two major things here.
First, instead of having every turf need to ask all the turfs in "front"
of it for its blast resistance, we have blast resistance carry back in a
cache, so they only need to ask the one directly in front of them.
Much faster, such wow

The other thing we do is totally remove the idea of "building" a turf's
explosion resistance. Instead, a turf's full resistance is stored on it
at all times.
We use an element to manage objects that want to block explosives, and
that's it simple as.
As an optimization, turfs handle block differently, using a system where
we imply that a turf's own block is just the initial of their
explosive_resistance, unless proven otherwise
This also saves a significant amount of time

To be honest with you, I did this mostly cause I wanted to well make
explosions faster
This doesn't really fufil that. They are faster, but not by much
The bulk of explosion cost comes from actually exploding things, rather
then figuring out what/how to delete.
This code is much faster for larger blastwave sizes, because calculating
protection is constant.

We save maybe 60% of propogate_blastwave, but unfortunately
propogate_blastwave for one maxcap on the top left of icebox's chapel is
only 28ms, so while 11ms is good, it's not everything I could want when
the cost of explosion/fire is 555ms.

I'm happy about it still tho, because doing things like this means I can
expand on how explosive blocking works without needing to make things
seriously expensive in here.
Also it's faster for meme admin explosions and mega burgers

## Why It's Good For The Game

Speeds up explosives slightly, opens the door to better blast resistance
projection
2023-01-09 22:29:03 -08:00
Mothblocks
f54dcda1c0 afterattack now returns a flag if it's reasonable to suspect the user intends to act on an item (#72320)
Necessary for #72292 to work effectively, and probably not very useful
out of that context. Split out of its own PR because this is long and
boring.

I want to make sure that we're catching actual mistakes there, and not
just experiencing side effects of how shitty the attack chain is.
2023-01-04 21:10:41 -08:00
Zephyr
6a0c884410 [no gbp] removes all duplicate armor datums (#72354)
## About The Pull Request
closes #72348 
Title
## Why It's Good For The Game

My bad
## Changelog
Heres the script I used this time if you want to
```cs
var baseDir = Environment.CurrentDirectory;

var allFiles = Directory.EnumerateFiles($@"{baseDir}\code", "*.dm", SearchOption.AllDirectories).ToList();
var known = new Dictionary<string, List<KeyValuePair<string, int>>>();

foreach (var file in allFiles)
{
	var fileLines = File.ReadAllLines(file);
	for (var i = 0; i < fileLines.Length; i++)
	{
		var line = fileLines[i];
		if (line.StartsWith("/datum/armor/"))
		{
			var armorName = line.Replace("/datum/armor/", "").Trim();
			if (!known.ContainsKey(armorName))
				known[armorName] = new List<KeyValuePair<string, int>>();
			var knownList = known[armorName];
			knownList.Add(new KeyValuePair<string, int>(file, i));
		}
	}
}

Console.WriteLine($"There are {known.Sum(d => d.Value.Count)} duplicate armor datums.");

var duplicates = new Dictionary<string, List<int>>();
foreach (var (_, entries) in known)
{
	var actuals = entries.Skip(1).ToList();
	foreach (var actual in actuals)
	{
		if (!duplicates.ContainsKey(actual.Key))
			duplicates[actual.Key] = new List<int>();
		duplicates[actual.Key].Add(actual.Value);
	}
}

Console.WriteLine($"There are {duplicates.Count} files to update.");

foreach (var (file, idxes) in duplicates)
{
	var fileContents = File.ReadAllLines(file).ToList();
	foreach (var idx in idxes.OrderByDescending(i => i))
	{
		string line;
		do
		{
			line = fileContents[idx];
			fileContents.RemoveAt(idx);
		}
		while (!String.IsNullOrWhiteSpace(line));
	}
	File.WriteAllLines(file, fileContents);
}
```
2022-12-30 03:43:36 -05:00
Andrew
0818d6ae4c Crafting/Cooking menu update (#71779)
## About The Pull Request

Updated crafting menu, adding a lot of new functions and recipes that
were not in the crafting menu before.

<img alt="cult"
src="https://user-images.githubusercontent.com/3625094/206009533-aec3a1dd-cbe5-45eb-8515-1b75fabb65c5.PNG">

<img alt="nH77dLyyGx"
src="https://user-images.githubusercontent.com/3625094/206009786-b6706f70-0599-40bf-b051-8f499de43abd.png">


![image](https://user-images.githubusercontent.com/3625094/206623881-12d8abfc-de5e-458e-a01c-3daac8dbe9bd.png)


https://user-images.githubusercontent.com/3625094/206009841-738e4a03-0660-45b7-8d83-15eeb6501967.mp4

## Why It's Good For The Game

It is easier to use, and it has a lot of recipes that were spread
throughout the game, some of which weren't even on the wiki.
Crafting and cooking now count about 1200 recipes in total, including
conditionally available ones.

## Changelog

🆑
qol: Rewrote the crafting/cooking menu UI
qol: Split crafting and cooking menus in two different menus
qol: Crafting is no longer blocking the entire UI, only the "Make"
buttons are disabled
qol: Added stack crafting recipes to the crafting menu
qol: Added cooking recipes that were absent in the crafting menu before
(tool recipes, machine recipes, reactions)
qol: Added option to search recipes by title
qol: Added option to filter recipes by required materials/ingredients
qol: Added food types to the cooking menu, highlighting diet of your
species (liked, disliked foods)
qol: Added total nutrition value of the result to the cooking menu
qol: Added option to filter cooking recipes by the food type of the
resulting food
qol: Added "Can make" category that lists all currently craftable
recipes throughout all categories
refactor: changed categories and reshuffled some items in them
code: Reagents now have default container to get an icon from the
reagent datum
code: Objects now have `desc_controls` var for OOC information about
mouse controls that are visible on examine, but not in the description
fix: Fixed alignment on many food icons
fix: Fixed missing icon for beef stroganoff
/🆑

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
2022-12-25 12:27:49 -08:00
Zephyr
72add64520 Refactors armor into dedicated subtypes (#71986)
## About The Pull Request

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

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

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-12-23 16:21:22 -08:00