Commit Graph

2212 Commits

Author SHA1 Message Date
Pickle-Coding
c1f11f26ce Converts arbitrary energy units to the joule. Fixes conservation of energy issues relating to charging cells. (#81579)
## About The Pull Request
Removes all arbitrary energy and power units in the codebase. Everything
is replaced with the joule and watt, with 1 = 1 joule, or 1 watt if you
are going to multiply by time. This is a visible change, where all
arbitrary energy units you see in the game will get proper prefixed
units of energy.

With power cells being converted to the joule, charging one joule of a
power cell will require one joule of energy.

The grid will now store energy, instead of power. When an energy usage
is described as using the watt, a power to energy conversion based on
the relevant subsystem's timing (usually multiplying by seconds_per_tick
or applying power_to_energy()) is needed before adding or removing from
the grid. Power usages that are described as the watt is really anything
you would scale by time before applying the load. If it's described as a
joule, no time conversion is needed. Players will still read the grid as
power, having no visible change.

Machines that dynamically use power with the use_power() proc will
directly drain from the grid (and apc cell if there isn't enough)
instead of just tallying it up on the dynamic power usages for the area.
This should be more robust at conserving energy as the surplus is
updated on the go, preventing charging cells from nothing.

APCs no longer consume power for the dynamic power usage channels. APCs
will consume power for static power usages. Because static power usages
are added up without checking surplus, static power consumption will be
applied before any machine processes. This will give a more truthful
surplus for dynamic power consumers.

APCs will display how much power it is using for charging the cell. APC
cell charging applies power in its own channel, which gets added up to
the total. This will prevent invisible power usage you see when looking
at the power monitoring console.

After testing in MetaStation, I found roundstart power consumption to be
around 406kW after all APCs get fully charged. During the roundstart APC
charge rush, the power consumption can get as high as over 2MW (up to
25kW per roundstart APC charging) as long as there's that much
available.

Because of the absurd potential power consumption of charging APCs near
roundstart, I have changed how APCs decide to charge. APCs will now
charge only after all other machines have processed in the machines
processing subsystem. This will make sure APC charging won't disrupt
machines taking from the grid, and should stop APCs getting their power
drained due to others demanding too much power while charging. I have
removed the delays for APC charging too, so they start charging
immediately whenever there's excess power. It also stops them turning
red when a small amount of cell gets drained (airlocks opening and shit
during APC charge rush), as they immediately become fully charged
(unless too much energy got drained somehow) before changing icon.

Engineering SMES now start at 100% charge instead of 75%. I noticed
cells were draining earlier than usual after these changes, so I am
making them start maxed to try and combat that.

These changes will fix all conservation of energy issues relating to
charging powercells.
## Why It's Good For The Game
Closes #73438
Closes #75789
Closes #80634
Closes #82031

Makes it much easier to interface with the power system in the codebase.
It's more intuitive. Removes a bunch of conservation of energy issues,
making energy and power much more meaningful. It will help the
simulation remain immersive as players won't encounter energy
duplication so easily. Arbitrary energy units getting replaced with the
joule will also tell people more meaningful information when reading it.
APC charging will feel more snappy.
## Changelog
🆑
fix: Fixes conservation of energy issues relating to charging
powercells.
qol: APCs will display how much power they are using to charge their
cell. This is accounted for in the power monitoring console.
qol: All arbitrary power cell energy units you see are replaced with
prefixed joules.
balance: As a consequence of the conservation of energy issues getting
fixed, the power consumption for charging cells is now very significant.
balance: APCs only use surplus power from the grid after every machine
processes when charging, preventing APCs from causing others to
discharge while charging.
balance: Engineering SMES start at max charge to combat the increased
energy loss due to conservation of energy fixes.
/🆑

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-03-23 16:58:56 +01:00
Thunder12345
cc800323da Throws gangtools into a bottomless pit (#82145)
## About The Pull Request

Resprites everything that used to use the old gangtool sprites (door
remotes, augment choice beacon, landing zone designators, and nuke op
borg spawners.)


![image](https://github.com/tgstation/tgstation/assets/5479091/346d4a1b-59cc-47c3-b6ff-b66c75d7730b)

- Added a new non-gangtool generic choice beacon, and a specific
S.E.L.F. one.
- Door remotes are now fancy garage door openers.
- Landing designators have cannibalised the cell phone sprites from the
less old version of gang.
- Nuke op borg spawners use the same walkie talkie as other
reinforcements

Door remotes now have individual sprites for each mode, so you can see
the mode at a glance.

## Why It's Good For The Game

Having a range of very different items sharing the same old sprites is
pretty confusing, better to have them all be unique and up to date.

## Changelog
🆑
image: Everything that used the old gangtool sprites (door remotes,
landing field designators, some choice beacons, windicate borg
reinforcements) has been resprited.
image: Door remotes now visibly show their current mode.
/🆑
2024-03-22 13:27:45 -04:00
ArcaneMusic
dafacb8b4b Converts ore_mined talley into only recording typepaths. (#82098)
## About The Pull Request

This Pull request makes it so that the blackbox `ore_mined` talley will
now only record the mineral stack's typepath as opposed to a 50/50 mix
of names and typepaths.

## Why It's Good For The Game

Fixes #82042. Logging should be as descriptive as possible while also
avoiding the possibility for misunderstanding, so using the typepath for
logging on the blackbox is preferred.

## Changelog

🆑
code: Mineral logging now collects ore names more cleanly.
/🆑
2024-03-19 19:43:39 -06:00
John Willard
405d369694 Crushers and PKAs: Coop Upgrades (#81940)
## About The Pull Request

This PR makes 2 changes, one to the crusher and one to the PKA

Crushers: Their projectile no longer overrides eachother, so a mob can
have the blue bubble from several crushers. Triggering it will only
trigger the one that you own, so each player has to go hit the mob to
strike.

PKA: Fixed the minebot passthrough upgrade, and also adds a human
passthrough upgrade. They are incompatible with eachother, so you choose
between solo+minebot or coop, which is a compromise I thought as a
better alternative to taking mod space (the minebot passthrough
currently takes none). This upgrade is available solely at the mining
vendor, for 750 points.

## Why It's Good For The Game

The new mining has been great, and one thing I love is that it
encourages more coop play. Excavating boulders with other miners is much
more engaging and has good teamwork in it, and also is a good way to
encourage miners to stick together more and even fight megafauna in
pairs.
This hopes to make that easier to do, because currently having anyone
with a crusher is sort of a detriment to the whole team. Either the PKA
dude will accidentally shoot the crusher user while they're going in for
a melee kill, or 2 crusher users will be constantly erasing the mark of
the other. This will hopefully make that aspect better, and make mining
with friends a little better.

## Changelog

🆑
balance: Crusher marks no longer overwrite eachother, fauna can have one
from each crusher.
balance: Ash drake's crusher trophy no longer affects people the same
faction as you (like hiero trophy), so you won't friendly fire people
with it.
add: Added a new upgrade: Human Passthrough. You can shoot your PKA
without having to worry about friendly fire with this, for 750 mining
points at your mining vendor.
fix: Minebot passthrough upgrade now properly makes PKAs pass through
minebots.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-03-14 00:41:56 +00:00
Jacquerel
be2f292253 Gulag boulder mining adjustments (#81971)
## About The Pull Request

This PR does two fairly simple things.
Firstly, it triples the gulag point value of every material except
glass.
Secondly, it allows mining skill increases to effect the speed of
boulder breaking and reduce the stamina "exertion" you take.

I tried this out personally on Lavaland and Icebox and while this is
very much dependent on RNG (and storm timing) this got earning 1000
points purely from mining and smashing boulders down to _about_ ten
minutes of work, which I believe is the rough estimate of how much
effort it was before that. It may skew a bit higher than that if the ash
storm happens at a bad time or the game gives you predominantly iron,
but not a _lot_ higher.

The mining skill = faster smashing thing is... barely perceptible after
ten minutes of mining to be honest but it's saving _some_ time and I
think if it gives you the exp it might as well benefit from it too.

I didn't do anything for _glass_ because you can just pick that up off
the ground in Lavaland and I didn't want to make _that_ the ideal route
to getting your sentence finished.

## Why It's Good For The Game

Since ArcMining was merged, the gulag has changed to a system primarily
about digging up boulders and smashing them with a pickaxe for random
rewards. I think the chain gang thing is pretty flavourful, but the
inability to just target high-value materials (because you could see
them on the mining scanner) and the overall decrease in output has made
it take a lot longer to get a similar amount of points.

People are sending prisoners out to mine for 1000 points of materials
assuming this is about 10 minutes work, when in reality it was more like
30-35 minutes. Longer on Lavaland, where you need to take breaks for ash
storms.

This was not an intentional "nerf" to prisoner miners and should
hopefully bring it back down to somewhere closer to the previous level.

## Changelog

🆑
balance: All materials except glass are now worth more gulag points than
before.
balance: Mining skill decreases the time it takes to break boulders, and
makes it less tiring.
/🆑
2024-03-13 13:21:46 -04:00
LemonInTheDark
ef714c1c34 Overlay Lighting Color/Intensity Pass (#81425)
## About The Pull Request

I was looking at screenshots of the game and realized we had a lot of
light sources that were really... flat.

Medium intensity, not colored at all, cringe.

So I went over all the uses of overlay styled lighting (since I've done
matrix lighting already) and gave them more unique features. Colors that
match the sprite they're used with, intensity to produce vibes, that
sort of thing.

It's kinda impossible to go one by one cause there's a LOT.

I may have gone a bit overboard with a few, I'm messing around with some
things like giving bots colors based off their department, etc. We'll
see how this all turns out.

Oh also I tweaked how the cone of overlay lighting is drawn. It seemed a
bit too present to me so I dropped the alpha down from like 200 to 120
at max (so it's roughly half of the mask's alpha so it's less
overwhelming

## Why It's Good For The Game

Lighting should be impactful, subtle and colorful

<details>
<summary>
Old Lights
</summary>


![dreamseeker_QJ5bFZxd63](https://github.com/tgstation/tgstation/assets/58055496/8ae74a95-32cb-473f-830a-ab4e1073a581)

![dreamseeker_DPVgI8wOoN](https://github.com/tgstation/tgstation/assets/58055496/149095af-a08a-4038-bf18-9e3401327452)

![dreamseeker_pyEmTAb37x](https://github.com/tgstation/tgstation/assets/58055496/6dbb6cf8-2ed7-4bc0-9d19-c64849088a33)

![dreamseeker_aDfvnea6YD](https://github.com/tgstation/tgstation/assets/58055496/4ed983e1-6be3-4513-ba3b-cecde08ccd38)

![dreamseeker_RnkQSwmxmc](https://github.com/tgstation/tgstation/assets/58055496/63e0210e-e1b1-42f0-be64-53d67c43f689)

![dreamseeker_G8NSC3lzAk](https://github.com/tgstation/tgstation/assets/58055496/93001925-904d-4061-8874-1d17bb225a90)

![dreamseeker_yASfxtbHDR](https://github.com/tgstation/tgstation/assets/58055496/ce0ae9ad-9067-44e0-9491-3ef331bbbb84)

![dreamseeker_4ecBbG5urI](https://github.com/tgstation/tgstation/assets/58055496/ce82f471-15c7-40ce-bc08-be4f5dc8a3b7)

![dreamseeker_udYlv8uAce](https://github.com/tgstation/tgstation/assets/58055496/c516a278-852b-44b8-ba7c-1203cea3f845)

![dreamseeker_bc2120Fnmr](https://github.com/tgstation/tgstation/assets/58055496/87a1429a-2329-4dd5-8c7b-ff44f54a08bb)

</details>

<details>
<summary>
New Lights
</summary>


![dreamseeker_0H11TyhGgx](https://github.com/tgstation/tgstation/assets/58055496/75b68a25-055e-488c-af82-b062dbe7413e)

![dreamseeker_2B9AENHsfl](https://github.com/tgstation/tgstation/assets/58055496/b52d441c-6ed3-495b-9ebd-9b0c9f924f30)

![dreamseeker_3vOVRRMTSP](https://github.com/tgstation/tgstation/assets/58055496/b265578f-34cc-4a0a-80ea-3237fb83df33)

![dreamseeker_5bTLup65rx](https://github.com/tgstation/tgstation/assets/58055496/6fcd3dc0-5927-458a-9f77-5582ad57a954)

![dreamseeker_iZzxZv4nfW](https://github.com/tgstation/tgstation/assets/58055496/67c3af13-2305-4130-936b-19ded08ccc4e)

![dreamseeker_Lhe9TSA0Av](https://github.com/tgstation/tgstation/assets/58055496/a5310e58-0ff1-45ac-bb81-b4a0212eb0ce)

![dreamseeker_ngQJUv0tV4](https://github.com/tgstation/tgstation/assets/58055496/c3d7423a-ab32-4401-9ffa-c4c3b7811334)

![dreamseeker_PL0z6sU7by](https://github.com/tgstation/tgstation/assets/58055496/2947d828-3aee-48c2-903f-2bf0db9077d2)

![dreamseeker_xineFZDzPA](https://github.com/tgstation/tgstation/assets/58055496/095ff8b0-51cf-4f7c-a2ee-752d9d7e87bd)

![dreamseeker_zpXxbZZakS](https://github.com/tgstation/tgstation/assets/58055496/c4200d35-a2fa-4c3f-8e88-1fd87f44cd46)

</details>

## Changelog
🆑
add: Tweaked the saturation, color and intensity of a bunch of lights
/🆑
2024-03-09 23:57:19 +00:00
John Willard
9ac81e1a64 New station trait job: Human AI (#81681)
## About The Pull Request

This PR does many things, I'll try to explain the basic/background stuff
to the main thing first:

1. Adds a new remote that allows a human to function like an AI. It
controls a fly that will fly around the station slowly, and when it
reaches a machine then the person can interact with it as if they were
an AI. This required changing a lot of silicon/AI checks with one that
also checks for this remote, and some messing with shared ui state.
2. Moves req_access from the obj and bot to ``/atom/movable`` which lets
it be shared between the two, no more copy-paste and one side lacking
features/checks/signals the other has.
3. Adds a check for AI config for AI-related station traits, which was
lacking prior

Now for the good part...
Adds a new station trait that replaces the AI with a Human.
This person is equipped with an AI headset (including Binary), an
advanced camera console, an omni door wand, the machine controller, and
their laws.
They are immune to the SAT's turrets (even if set to target borgs) and
are slow outside of the SAT, mimicing the actions of the AI.

They interact with the world through their advanced camera console,
which allows them to do most AI stuff needed, and the holopad they can
connect to without having to ring first (like Command can).

They are given a paper with the laws they must follow, but since they
are human they are able to bend it. Cyborgs that run the default lawset
are "slaved" to them via an unremovable law 0, so the Human AI can bend
the laws if they really need to (for their own survival n such), and
make the cyborgs obey their commands above laws, but in general this
shouldn't be a frequent occurrence. This does take into account the
unique AI trait, so it's not guaranteed Asimov.

When this station trait rolls, all Intellicards, AI uploads, and AI core
boards are destroyed and are unresearchable. They can be spawned by
admins in-game if necessary. Maybe in the future we can also exclude
Oldstation from this but I haven't really decided.

Extra perks:

Human AI spawns with a Robotic voicebox (unless they are a body purist)
and teleport blocking implant, so they can't use teleporters to bypass
their on-station slowdown.
They also have an infinite laser pointer that can be used to blind
through their camera console. This is unfortunately nerfed from the
recent borg balance PR that removed its stun. This was meant to be the
alternative to no longer being able to permanently lock borgs down like
AIs can (or more than one, for that matter).
They aren't affected by Roburgers, Acid, and Fuel's toxicity.
Bots salute them like they do Beepsky (which is now a trait)
They spawn with SyndEye to replace the AI's tracking ability
They do not have a bank account

### The machine remote

The machine remote has a little fly in it that flies to the machines it
is pointed to, working as the arms and legs of the Human AI. It scans
the machine and punches in the action the AI does, and is how the AI
accesses basically anything. This fly slowly moves from one machine to
the next, and can be recalled with Alt Click.
It works on machines and bots.

### Video (Low quality to fit Github)


https://github.com/tgstation/tgstation/assets/53777086/e16509f8-8bed-42b5-9fbf-7e37165a11e8

## Why It's Good For The Game

I've seen a funny screenshot one day of a person replacing the AI by
using a bunch of door remotes, camera console, crew monitoring console,
and a few other things. I've been thinking about that for a few years
and really wanted to make it official if not easier to make possible,
because it is an incredibly funny interaction.
This makes it a reality, and while they aren't as powerful as regular
AIs, I think it makes for better and funnier in-game moments. With the
same weight as Cargorilla (1), I hope this wouldn't be rolling too often
and ruin rounds, but instead show off the different capabilities that
Humans and AIs can do, to do the job of an AI. You win some you lose
some.

## Changelog

🆑 JohnFulpWillard, Tattax
add: Adds a new station trait job: The Human AI.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-03-09 23:48:39 +01:00
SyncIt21
55ef6a6219 Use a common list for acceptable silo materials (#81790)
## About The Pull Request
This list containing the same material values was copy pasted all over.
It's already cached in the subsystem so let's just use that.

Renamed ore category into silo category.

## Changelog
🆑
code: Use a common list for acceptable silo materials for some stuff.
Renamed ore category into silo category.
/🆑
2024-03-09 05:24:33 +01:00
SyncIt21
62d74bc4d5 Minor cleanup for machine frames & boulder machines (#81706)
## About The Pull Request
- Moves call to `update_appearance(UPDATE_ICON_STATE)` to
`/obj/structure/frame/Initialize()` for both computer & machine frames
cause both do that anyway
- Fixes wrench screentip for machine frames
- Screw driving an incomplete machine frame won't display the "you need
to unsecure it first" along with "missing components" balloon alerts
- Moved boulder refinery code to `item_interaction()`
- Autodoc some golem procs for refineries
- Gives the secured machine frame an icon state of `box_1` so it looks
wired in the rcd menu as well
- Fixes screentips(like wrench act) for boulder machines

## Changelog
🆑
fix: fixes toolact screentips & balloon alerts for boulder machines &
machine frame
/🆑
2024-03-09 04:30:29 +01:00
Ben10Omintrix
6b6bd5ce95 fix ore vents spawning the wrong wolves and remove simple wolves (#81864)
## About The Pull Request
wolves got refactored but the ore vents were still spawning the old
versions, this fixes it and removes the old wolves from the code

## Why It's Good For The Game
fixes ore vents spawning old wolves

## Changelog
🆑
fix: fixes ore vent spawned wolves being untammable
/🆑
2024-03-07 11:10:07 -07:00
MrMelbert
8d599455d7 Boulder refineries can process golems (#81849)
## About The Pull Request

Golems (if lying down) can enter (and be processed by) boulder
refineries.

## Why It's Good For The Game

Rocks are rocks

## Changelog

🆑 Melbert
add: Boulder refineries and smelters can refine Golems. 
/🆑

---------

Co-authored-by: jimmyl <70376633+mc-oofert@users.noreply.github.com>
2024-03-06 16:08:58 -07:00
13spacemen
357799c8a5 Removes Orbit Polling Component, SSpolling improvement (#81748)
When I made SSpolling, jlsnow gave me his blessing to delete the orbit
polling component [where you orbit something for 20 seconds before it
chooses a ghost from the orbiters]
It's only used in a few places like soulstones replacing
jobbanned/inactive players, etc.

Also upgraded SSpolling; you can now place a little icon on the sides in
the chat message, chat message looks a lot nicer, the alert pic and the
jump target don't have to be the same anymore, and I made it be able to
pre-pick candidates since 90% of the use cases would just want 1
candidate

Also prints to chat who the chosen one was

Also made slime intelligence potions ask the user for a reason, which
will be displayed in the alert poll
2024-03-06 08:24:36 +00:00
ViktorKoL
d6319d2b87 Lots of description changes and grammar fixes for heretics (#81761)
## About The Pull Request

Changes a lot of text. Apart from grammar fixes, here are the notable
changes:

- Ash jaunt description just said it is a "short range jaunt" without
explaining what exactly a jaunt is. I believe it is better to describe
without comparing to another spell the player may not have experience
with.
- Cosmic grasp now explains what the deal is with star marks and cosmic
fields. It is still possible to crosspath into a star mark spell,
skipping this description, but I assume a player like that is
experienced enough to know what the star mark does anyway...
- The knowledge for ash spirits no longer refers to them as "Ash Men" -
"Ash Spirit" is the mob's actual name. If you think "Ash Man" is a
better name, I can change it around so that the mob gets renamed that
instead.
- Removes the lines from paradoxical curio's description about causing
brain damage on examination - many heretic items cause adverse effects
to heathens who try to interact with them, and there is never a need to
clutter the description with them.
- Changes the eldritch coin description, because the old one was, in my
opinion, awkward. I changed it to be more inline with the other items'
descriptions, and to not tell non-heretics what its purpose is. If you
liked the old one better, I can revert this change.
## Why It's Good For The Game

Grammar good. Accurate descriptions good.
## Changelog
🆑
fix: made some heretic descriptions more accurate
spellcheck: improved english of the heretical eldritch patrons
/🆑
2024-03-03 20:00:17 +01:00
ArcaneMusic
161b96c99d Fixes mining cyborg ore scanner shutting off when stored. (#81604) 2024-02-23 09:44:57 -07:00
John Willard
9fe36a193c Monster cores work while resting (#81548)
## About The Pull Request

Currently to use items like the regenerative core, you can either attack
yourself (or someone else), or use Z to use the item in-hand, unless you
are lying down in which case you have to specifically click, and can't
use in-hand. It's kinda dumb and this has been an issue I had since I've
started playing, and today I thought "wait why did I just never fix it
then?", so now I am.

## Why It's Good For The Game

Mostly explained in the about section, you can already use cores while
resting, this just means you can't use Z instead of having to click on
your character sprite.

## Changelog

🆑
fix: Regenerative cores (and other monster organs) now work when using
it in-hand while resting.
/🆑
2024-02-19 15:24:50 +01:00
SyncIt21
6c59996ef1 [NO GBP]Some BRM Fixes (#81551)
## About The Pull Request
- The time from which the boulder is picked to when it's teleported onto
the conveyer belt is 1.5 seconds. During that time the boulder could get
deleted due to many factors and we lose our materials. No one like's
that that so now both steps are combined into 1 proc so we no longer
loose boulders during teleportation.
- Batch processing cooldown was not working when
`boulder_processing_max` is > 1. Now it does

## Changelog
🆑
fix: boulders are no longer lost when teleported by the BRM
fix: batch processing cooldown works when teleporting multiple boulders
/🆑
2024-02-19 15:20:49 +01:00
SyncIt21
df2ce692ee General maintenance for all things boulder related. (#81358)
## About The Pull Request
**1. Qol**
- Adds screen tips & examines for screwdriver & crowbar acts on BRM,
Refinery & Smelter
- Adds examines to display number of boulders stored inside a refinery &
maximum number of boulders it can hold. Right click screentip to remove
boulders
- Adds examines to display maximum number of boulders than can be
teleported by a BRM & screentips for interacting with wires
- More audio & visual feedback for refinery processing. If a boulder
requires multiple steps you will get a balloon alert saying "crushing"
for refineries & "smelting" for smelters along with a sound per process
tick(which is every 2 seconds so no need for cooldown) giving you a
better idea of what's happening in the pipeline
- BRM now will display all lights when the "Automatic boulder retrieval"
is on & turn off the lights when disabled along with examines giving you
a visual indicator of its state

**2. Code Improvements**
- Splits types of boulders into its own file `boulder_types.dm` for easy
maintainability
- Moves beacon for refinery machines into its own file
`boulder_processing/beacon.dm` for easy maintainability
- Moves the cooldown for processing a boulder `processing_cooldown` into
the refinery machine itself. Since 100's of boulders can be created per
round this var can take up memory quickly so by moving them into the
refinery machine it gives us some savings
- Compressed & merged procs such as `create_mineral_contents()` ,
`flavour_boulder()` etc with the vent code. These procs were only used
by the vent 1 time & by merging the code we removed if conditions to
check if a parent vent was passed or not(since now that's always the
case). Helped in removing boilder plate code

**3. Fixes**
- **Fixes vents always spawning "Small size boulders" & not medium, nor
large boulders.**
 Once a vent generates a boulder it calls  `flavour_boulder()`

084f56938c/code/game/objects/structures/lavaland/ore_vent.dm (L385)
however this proc also accepts 2 more params `size` which would always
default to `BOULDER_SIZE_SMALL` and `is_artifact` which is simply unused
in the proc

fb83617ff9/code/modules/mining/boulder_processing/boulder.dm (L219)
Therefore vents would always generate small boulders giving us no
varity. Now the boulder size is set depending on the vent size &
durability for each boulder is set to a random value between 2 & the
boulder max size giving us the flavour we actually wanted

- **Fixes "Expanded Gulag boulders" using "normal gulag material list"
when setting its custom materials.**
If you look at the `add_gulag_minerals()` proc it always picks from the
`gulag_minerals` list & accepts no params

fb83617ff9/code/modules/mining/boulder_processing/boulder.dm (L235-L236)
So when we try to pass params to this proc which in reality doesn't
accept any we were wasting our time doing this

fb83617ff9/code/modules/mining/boulder_processing/boulder.dm (L274)
And for our case `expanded_gulag_minerals` list was simply unused
because our proc doesn't care about it and it went back to just using
`gulag_minerals` list thus ignoring our list

fb83617ff9/code/modules/mining/boulder_processing/boulder.dm (L282)
As i said in the "Code Improvement` section when i moved boulder types
into it's own unique file this was fixed & now expanded gulag boulders
actually has a chance to spawn with bluespace crystals inside them

- **Fixes manual tapping of ore vents by hand not using a cooldown**
`produce_boulder()` accepts a cooldown var for when you need to manually
tap the vent by hand.

e8b5b52d54/code/game/objects/structures/lavaland/ore_vent.dm (L374)
This var was always set to FALSE because we never passed `TRUE` into it.
Not once here

e8b5b52d54/code/game/objects/structures/lavaland/ore_vent.dm (L124)
Nor here

e8b5b52d54/code/game/objects/structures/lavaland/ore_vent.dm (L131)
Now we just pass `TRUE` so tapping these vents by hand have a cooldown

- **Fixes BRM off icon state never being used**
When the room ran out of power it would still look on. Now we use that
state correctly

- **Fixes Automatic Boulder Retrieval by the BRM not actually being
automatic**
You must have noticed that once you do "Right click" and wait for all
the boulders it can teleport (determined by `boulder_processing_max`) to
be teleported it stops permanently after that. Even if more boulders get
generated it won't do anything, You have to again "Right click" &
retoggle automatic boulder retrieval on again, thus forcing someone to
stand there & monitor the BRM

Now once you set Automatic Boulder Retrieval on you can leave & forget.
It will teleport boulders as & when available thus enabling automation
properly.

- **Fixes boulders ejected from refineries via right click from getting
teleported back into the machines loc**
Fixes
https://github.com/tgstation/tgstation/pull/78524#issuecomment-1911666995.
The problem is refinery machines & the BRM keep track of all the
boulders that entered into it via the `boulders_contained` list.

Now we directly check `contents` for boulders so we don't have to
maintain 2 seperate lists to keep track of boulders. It also now uses
`processed_by` var of boulders to ensure refinerries don't retake in the
same boulder it just processed. Not sure where exactly the problem got
fixed but implementing these 2 measures fixed it regardless.

- **Fixes boulders with 0 durability[a.k.a steps] from getting ejected
out**
Fixes
https://github.com/tgstation/tgstation/pull/78524#issuecomment-1914551952.
So inside `process()` we constantly decrease the durability of the
boulder till it becomes 0.

0a496f180c/code/modules/mining/boulder_processing/_boulder_processing.dm (L159)

  When it reaches 0 it calls `breakdown_boulder()`

0a496f180c/code/modules/mining/boulder_processing/_boulder_processing.dm (L164-L165)

This proc has a chance to reject the boulder if it could not process any
materials

0a496f180c/code/modules/mining/boulder_processing/_boulder_processing.dm (L219-L222)
  
  **"Without resetting its durability"** over here

0a496f180c/code/modules/mining/boulder_processing/_boulder_processing.dm (L241)

So it ends up rejecting a "0" or worse -1 durability boulder. Now we set
the durability in `remove_boulder()` so regardless of what circumstances
the boulder is ejected it always gets a positive durability

- **Fixes BRM & Refinery from rapidly spitting out boulders in their loc
which causes lag in the long terms**
Fixes #81404. Basically even if there is 1 boulder sitting at a BRM's
loc or an refineries loc. Operations are haulted i.e. the BRM will not
teleport any more boulders & the refinery will keep their already
processed boulders inside till their locs are cleared from boulders.
This prevents large number of boulders from pilling up in long rounds

- **[Priority : High] Fixes refineries incorrectly removing materials
from processed boulders**
Fixes #81109. This bug is quite serious because it can't literarily
affect any random item with custom materials in game. This one line of
code over here can break the entire material economy as we know it

0a496f180c/code/modules/mining/boulder_processing/_boulder_processing.dm (L217)
  
**"DONT DO THIS"**. The `custom_materials` list is a **"read only"**
list & if you ever want to change it call the `set_custom_materials()`
proc with your new values but do not edit this list manually as it is
done here.
  
All lists related to materials are cached by the `SSmaterials`
subsystem. List values are cached & shared across multiple objects so
when you edit those values like here, you might end up effecting an
item/multiple items in some random corner of the map that shares this
list.

This also causes boulders with empty list of materials to get spawned at
random so yeah again plzz don't do this

**4. Refactors**
- Repathes `obj/machinery/boulder_processing/brm` -> just
`obj/machinery/brm`.
Even though semantically it looks nice that the brm is a subtype of
`obj/machinery/boulder_processing` from a code & operation perspective
they have 0 similarities.

1) The BRM does not accept boulders feed into it from a conveyer belt
unlike a refinery but instead picks boulders from `SSore` subsystem &
put it on the conveyer belt. This means procs for accepting boulders
such `CanAllowThrough()`, `breakdown_boulder()`, `accept_boulder()` etc
have no use in the BRM. Their just code clutter at this point
2) The BRM overrides `process()` & does not call its parent proc making
that code wasted
3) It has no use for silo materials & mining points making those vars go
to waste

With so much wasted code its better to just let go off all of it & just
make it a basic instance of `obj/machinery` making maintainence easy

- BRM now teleports boulders in a batch (batch size determined by
`boulders_processing_max` max value from upgraded parts is 7) with a
boulder appearing every 1.5 seconds rather than spawning all at once.
After a batch is processed it has a cooldown of 3 seconds before
repeating the process if automatic boulder retrieval is on. This stops
the conveyer belt from getting crowded with boulders and makes the
refining process more efficient.

With this BRM wires are removed because only it had only 1 wire
responsible for toggling boulder retrieval but now since this process is
automatic, we have true control over the timing of boulders spawned &
don't want to leave it in the hands of players

## Changelog
🆑
qol: adds examines & screentips for crowbar, screwdriver acts to BRM &
refinery machines
qol: adds examines about the number of boulders stored & processed to
BRM & refinery machines
qol: BRM now has its lights turn on/off depending on wether automatic
boulder retrieval is on/off for visual clarity along with examines
qol: refinery machines now display ballon alerts & plays sounds more
frequently when processing boulders for better feedback
fix: vents now spawn boulders of all sizes & not just small ones
fix: expanded gulag boulders now have correct materials in them.
fix: manual tapping of vents now has a cooldown applied as intended.
fix: BRM has its light turned off when area power goes off
fix: boulders ejected from refineries by hand no longer teleport all
over the place occasionally.
fix: refineries no longer eject boulders with 0 durability
fix: Boulders & refineries no longer pile up on top of BRM's &
refineries in long rounds. Their locs have to be clear of boulders
before they spit out more boulders to prevent a large pile of boulders
from causing lag
fix: sheets ejected from lathes no longer get rejected when inserted
back which could happen at random, no more boulders with empty materials
code: splits boulder types into its own file along with other items
code: merges & autodocs procs, vars related to boulders
refactor: repaths BRM to a simpler subtype
refactor: BRM now spawns boulders in batches(batch size can be increased
with upgraded parts) with a boulder appearing every second. After a
batch is processed a 3 second cooldown is applied to stop the conveyer
belt from clogging up, With this BRM wires are removed as there is no
need for timers to be attached to wires which intefers without our batch
processing timings.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-02-18 03:40:57 +01:00
jimmyl
54192fda81 deathmatch (#81444)
## About The Pull Request


![image](https://github.com/tgstation/tgstation/assets/70376633/44f1d1af-2cd6-4e69-a13e-6d2a663d668d)

adds a deathmatch minigame, a port and slightly redone version of the
aetherstation deathmatch (by TheChosenEvilOne)
the goal is to kill everyone else with loadouts

## Why It's Good For The Game

CTF sucks and this is probably better to filter out the bloodthirsty
terry players anyway

## Changelog
🆑
add: deathmatch minigame
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-02-18 03:39:00 +01:00
SyncIt21
6b6a22ee71 General maintenance for ore box (#81459)
## About The Pull Request
**1. Qol**
- Adds examines & screentips for crowbar, ore & boulder insertion
- Empty button of ore box greys out when the box is empty

**2. Code**
- Cleaned up `dump_box_contents()` proc. It was doing way too much
excessive checking for if the box or its contents was deleted & was
setting the plane of the ore when dropped onto the turf via tick check?
Just completely unnecessary
- Removed `type` when sending ui data, use the `id` provided by the ui
instead. Boulders & ores are wrapped up in the same `materials` list &
we use only 1 for loop when checking for content types
- Corrected return value of `crowbar_act`
- `attack_hand()` & `attack_robot()` are unnecessary because
`ui_interact()` covers both cases

**3. Spellcheck**
- Corrected description & ui notice of ore box to specify it can carry
boulders as well

## Changelog
🆑
qol: adds examines & screentips for ore box
code: cleans up some procs for ore box
spellcheck: corrected description & ui notice of ore box to specify it
can hold boulders too
/🆑
2024-02-16 19:48:52 +01:00
Interception&?
2e0d6cec0c Fix lag when viewing ore silo long logs list (#81232)
![6OrHcTlN6Z](https://github.com/tgstation/tgstation/assets/137328283/89ed9091-e85b-4032-bae1-19200d5ad10d)


## About The Pull Request

- Logs tab is now using a virtual list that renders only visible
components, thus preventing lag when logs list grows too long. More
about it
[here](https://github.com/tgstation/tgstation/pull/81016#issuecomment-1921765723).
- Minor tweaks to Ore Silo UI to account for new backend changes and TG
style guide.

## Changelog

🆑
fix: Separated logs list into pages in ore silo UI, thus fixing lag when
logs list grows too long.
/🆑
2024-02-12 22:40:08 +01:00
LemonInTheDark
70651816c2 Fixes complex lights not handling moving well, renames lighting defines (#81423)
## About The Pull Request

[Fixes static lights not
moving](ffef43c05a)

Worked fine when the owner moved, but if the owner was inside something
else, it would try and trigger an update on the PARENT's lights, which
are obviously not us.

[Renames MOVABLE_LIGHT and STATIC_LIGHT to better describe what they
do](de73a63bd4)

People keep trying to change the lighting system of lamps and it makes
me mad.
I choose OVERLAY_LIGHT and COMPLEX_LIGHT here, I couldn't figure out a
better name for turf matrix lighting. Suggestions welcome

## Why It's Good For The Game

Closes #80005
Hopefully improves understanding of lighting at a glance
## Changelog
🆑
fix: Fixes fancy lights not updating their source location when picked
up and moved
/🆑
2024-02-12 20:50:20 +01:00
SyncIt21
4495ea2e4d Refactors how machines are deconstructed (#81291)
## About The Pull Request
This refactors how machines are deconstructed in the following ways

- You can no longer override `obj/machinery/deconstruct()`. If you want
customized behaviour then override `on_deconstruction()` instead.

This comes with the added benifit of no longer needing to check for the
`NO_DECONSTRUCTION` flag because the machine base proc does that for us
& if it finds that flag it won't proceed to call `on_deconstruction()`
meaning no machine will have a chance to spawn anything which is the
current behaviour.

This is required to make #81290 work for all machines at least so that
machine can send the `COMSIG_OBJ_DECONSTRUCT` signal without subtypes
overriding & forgetting to call the parent proc

- `dump_contents()` only gets called when the machine is deconstructed
not destroyed thus not leaving behind any of its contents inside. Fixes
https://github.com/tgstation/tgstation/pull/81290#issuecomment-1925752583

## Changelog
🆑
fix: machines that should not drop contents when deleted no longer do.
refactor: refactors how machines are deconstructed. report bugs on
github.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-02-11 14:52:19 +01:00
MrMelbert
3cc3ad3935 Mining Bluespace Survival Capsule's "Stand back!" alert now actually has meaning (#81193)
## About The Pull Request

- Standing in range of a Bluespace Survival Capsule being deployed will
now toss you away from the deployed location of the pod, to roughly 2
tiles away.

## Why It's Good For The Game

I always found it weird (and a little misleading) that triggering a
survival capsule alerts people to "Stand back!", but it's actually
harmless to stand on top of it and even smart in some contexts since you
phase into it like nothing happened.

So I added the missing flavor. 

This also has some potential shenanigans involving antagging, as you can
time it perfectly so that you toss it just in time to throw people away
from it.

Note: The Luxury Elite pod is so large, that even after being thrown
away, you may still end up inside the pod by the time it deploys, but I
think that's funny. So.

## Changelog

🆑 Melbert
add: Shaft Miner's Bluespace Survival Capsules will now throw people
away from it when it deploys. Be sure to heed the warning to "Stand
back".
/🆑
2024-02-11 00:13:19 +01:00
Jolly
084f56938c [MDB IGNORE] Adds a map lint against using dir-var and icon-var edited windoors (#81272)
## About The Pull Request
Title.

Another big updatepaths PR thats been on my radar for awhile.

The dir banned var edit is self explanatory. However, I banned
icon_state from them as well as there are a big handful of windoors that
are either regular, and look like security doors, OR are their mirrored
counter part (a south right door var edited to look like a south left
door).

## Why It's Good For The Game

Avoid mapping sins like this


![image](https://github.com/tgstation/tgstation/assets/70232195/e672f64f-5bba-46f2-9043-c702497d08b2)

## Changelog

N/A to players
2024-02-07 18:20:21 -07:00
ArcaneMusic
ed31397cc4 Fixes ore vents spawning without ores on icebox, sets up map specific ore configurations (#81103)
## About The Pull Request

In short, we used a static list previously within the ore_generation
subsystem that held the amount of each ore that we expected a single map
to uniformly need. We held this number constant, since we were spawning
15 vents per map.

**Pros:** This worked flawlessly for Lavaland since 15 vents on a single
Z level makes it pretty densely packed map with a good amount of
map-based ore spawns, and it worked consistently.

**Cons:** 15 vents did not work well on Icebox however, even when split
so that the majority of the ores were spawning on the lower levels,
players did not feel like icebox spawned nearly enough ores and reported
the map spawning empty.

**Result:** As a result, we adjusted the ratio, so that we spawned
vastly more ores on the lower levels, now up to 4 vents on the upper
level, and 21 vents on the lower level. However, as we were still using
the ore distribution list based on lavaland, icebox vents were quickly
running out of ores to distribute between them, resulting in empty vents
-> which produced empty boulders -> which not only don't really let you
process them properly, but also just result in a metric ton of runtimes.

Icebox now has it's own list of ore distributions. These distributions
are now moved to a set of global lists as opposed to being saved on the
subsystem as a static list, which will make going and setting up new ore
distribution lists very very easy. Additionally, we've moved the setting
and getting of those ore_distributions over to the seedRuins proc, so
that we're actually setting the list of ores right before we actually
place them to make sure that the order that it's set is roughly as it's
needed, while still setting the list at the same time the
map-appropriate ruin placements are dropped in.

**Plus some misc cleanup fixes:**
`var/list/ore_vent_sizes` in SSore_generation wasn't being treated as a
similar budget list as `ore_vent_minerals`, since it `pick()`s off it's
own static size list. Which is honestly fine for this five seconds, I
can handle that later while we make sure the rest of the code code is
stable. In the meantime, I've just tweak it so that it's easy to see at
a glance how many of each random vent has spawned into the map.

Tweaked the description to not include anything about chemical
processing, as I'm planning on hitting on that in a part 2 PR that I'll
be picking back up after the freeze.

## Why It's Good For The Game

Cleans up the code a bit, but primarily fixes ores not spawning on
icebox as they should.
Should fix #81058.
Improves description to not mention mechanics that aren't in game.
Also, cleans up a piece of code that currently isn't serving much of a
purpose.

## Changelog

🆑
fix: Icebox should have it's ore distribution and it's ore vents fixed,
so that vents should now produce ore.
spellcheck: Boulder processing machines now don't mention things they
don't do.
/🆑
2024-02-07 05:20:25 +01:00
MrMelbert
12afcb911e Comprehensive cleanup of storage datum, replaces the weakrefs with just refs (because they were managed already) (#81120)
## About The Pull Request

- Large amount of storage datum cleanup.
   - Documentation.
   - Maybe more consistent use of parent vs real_location. 
   - Removes the weakrefs, replaces it with just references.
      - These were already managed references anyways so why bother?
- Removes a bunch of arguments no one used and would ever used so only
the most useful args are left.
 
- Some bugfixes. 

## Why It's Good For The Game

Aiming to make storage easier to work with. The whole intent of this was
to bugfix the whole "weight class" thing that keeps popping up but I had
to do this first.

## Changelog

🆑 Melbert
fix: When placing an item into storage (such as backpacks), all nearby
mobs now get a message, rather than just the first mob.
fix: TGC decks of cards should act a bit less odd when looking inside.  
refactor: Refactored a bit of storage, cleaned up a fair bit of its
code. Let me know if you notice anything funky about storage (like
backpacks).
/🆑
2024-02-05 11:42:03 -08:00
MrMelbert
f1a3fc839f Replaces /obj:: -> parent_type:: (#81146)
## About The Pull Request

This just seemed like a minor error with the new syntax that popped up:

The intent of these seem to be "take our obj flags and add
`NO_DECONSTRUCTION` to it", which was perfectly serviceable in a
majority of places, as the parent type had the same obj flags as `/obj`.
But in a small handfull of places (such as any table subtypes) this was
not the case, and it caused some objects to have missing flags that they
were otherwise intended(?) to inherit.

So I replaced `/obj::` with `parent_type::` meaning rather than using
the base obj flags and then adding `NO_DECONSTRUCTION`, they use their
parent type's obj flags and then add `NO_DECONSTRUCTION`.

## Changelog

🆑 Melbert
fix: You can build on some niche tables again, such as the Wabbajack
Altar.
/🆑
2024-01-29 11:37:04 -05:00
MrMelbert
68bfc31a51 Fix runtime from triggering rush organ via goliath grab (#81101)
## About The Pull Request

`trigger_organ_action`'s first and only argument is trigger flags to
pass to `Trigger`

The first argument if signals is the datum sending the signal


![image](https://github.com/tgstation/tgstation/assets/51863163/ebde6e12-f5de-41f9-829e-0727cc8b3072)


## Changelog

🆑 Melbert
fix: Rush Gland now triggers correctly on being grabbed by a Goliath
/🆑
2024-01-26 22:25:05 +00:00
SyncIt21
9141bfb95b General maintainence for Ore Silo (#81016)
## About The Pull Request
1. **Qol**(Hopefully not an issue for feature freeze)
- Adds Screen tips & examines for screwdriver, crowbar & multitool acts
   - Examining ore silo will now display its stored materials
- Location name is attached to the machine name and it greys out when
pausing the machine to make it more noticable that it is paused
   - Made window wider

2. **Code Improvements**
   - Auto docs procs & vars for ore silo log entry
- Fixed return values of all tool acts i.e. no more returning
`TRUE/FALSE` but the actual item interaction flags
- UI no longer computes `REF` for each machine which is expensive but
instead uses the index value in the list
   - Moved global variables to their corresponding files
- Ore silo no longer starts processing round start. That proc just ended
itself anyway so why even bother registering

3. **Fixes**
- If a machine was disconnected via the ore silo UI, attempting to
reconnect that machine would cause a runtime at `RegisterSignal` in
`multitool_act` because it was already registered in `Initialize`. It
now unregisters the signal when disconnecting so that's fixed
- Each machine element in the UI does not have a unique key because it
used `key={machine.name}`. This meant after disconnecting a machine the
UI buttons would get grouped together and the pause & disconnect buttons
would not function properly. Now it uses `index` which is unique thus
fixing that problem

## Changelog
🆑
qol: added more screen tips & examines for ore silo, made UI wider,
attach location name to each machine & grey out paused machines to make
it more noticeable.
code: auto docs proc & vars for silo log entry. Fixed return values of
all tool acts
fix: ore silo UI now functions correctly after removing an entry from
the UI
fix: no runtimes when connecting a machine to silo that was previously
disconnected via the ore silo UI
/🆑
2024-01-25 09:08:27 -05:00
Interception&?
4748dca7d6 New Processing Unit UI (#81029)
Made a new TGUI for Ore Processing Unit, removed all `updateUsrDialog`
calls.
2024-01-25 11:04:02 +00:00
ArcaneMusic
82ca6da634 Fixes boulder processing mining point gain. (#81067)
## About The Pull Request

Due to a misplaced multiplier, arcmining machines were eating their own
point totals.
Now, the refinery and smelter should correctly only take the
MINING_POINT_MACHINE_MULTIPLIER define on the amount being added to the
points held, not on the total resting in the machine.

## Why It's Good For The Game

Simple, easy fix.
Fixes #81057.

## Changelog

🆑
fix: The smelter and refinery now properly hold mining points, only
taking a small amount out of net gained points.
/🆑

---------

Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
2024-01-24 15:01:35 +01:00
SyncIt21
7a1b8d502c Fixes runtime when mineral scanning (#81049)
## About The Pull Request
Fixes this

![Screenshot
(384)](https://github.com/tgstation/tgstation/assets/110812394/2ec17f1d-e69b-400a-a8ab-47c205af56ed)


## Changelog
🆑
fix: fixes runtime when mineral scanning, passes right argument for
scanner in golem eyes
/🆑
2024-01-24 15:00:52 +01:00
ArcaneMusic
002051a3d5 ArcMining Pr Beta: Version 1.2 (#78524)
This one's not like the last one, so much so that I'm not even going to
outsource the PR description to a robot this time!
Basically, **You should read the PR body before assuming that everything
is the same as last time. It's not.**

## Video Summary
Click the link below to see a video summary of the main features of this
pull request.
https://youtu.be/Aho2omR0mjY?feature=shared

## About The Pull Request
This pull request serves as a large rework of minerals produced by
mining, and by extension mining itself. I'll try and list each change
and it's associated nuance here.

### Ore Vents
The biggest addition to the game with ArcMining is **Ore Vents**. Ore
vents spawn as a ruin on the map, placing a randomized ore vent onto map
generation. Ore vents spawn in 3 different sizes, **Small, Medium, and
Large**. These vents will pick from a pool of materials they can
generate, and will hang out across the map. A player can use a mining
scanner to discover an ore vent, granting a small quantity of **mining
points** to begin with. Once scanned, ore vents will show what minerals
that ore vent will generate after they're fully tapped.

Scanning the vent again will trigger the extraction process. A small
drone will fly down, called the NODE drone, and buckle onto the vent.
Your job during wave defense is to protect the drone and to defeat waves
of randomly spawning mobs (dependent on if you're on lavaland or on
icebox). The quantity, duration, and time between waves is scaled to the
size of the vent you're protecting. Starting by scanning and protecting
lower tier vents earlier in the shift is a safer bet than doing a large
vent in the first few minutes. The drone has 500 health, and can take a
good few hits, but leaving it alone will cause it to meet an unfortunate
end quite quickly.

Cooperation can be your best asset, as mining with allies can greatly
help with wave defense, and mineral points are granted to anyone who
helps with defending the ore vent equally (So 500 * size tier,
regardless of how much help you receive). Once complete, the ore vent
will have a mining machine constructed on top of it, and will start to
dredge up **Boulders** from the earth automatically. More on boulders
later.

Ore vents can be located based on your mining scanner, and will provide
an appropriate audio cue based on if the ore vent has been discovered or
not, and once processed will no longer alert you to it's presence.

**Each station comes with a free vent that produces exclusively iron and
glass, free of charge.** This is to help with shifts where the station
may not have shaft miners to produce minerals, and to provide the
station with a baseline amount of minerals where none may exist
otherwise.

### Mineral Generation
Mineral generation has been completely reworked. Previously, Mineral
Generation had a flat 13% spawn rate in-game. Once minerals spawned,
they would also have a chance to propagate their minerals to nearby
tiles, resulting in a rather massive pool of minerals that could spawn
throughout lavaland on the whole.

This tweaks that, by making minerals in walls spawn based on their
proximity to ore vents on maps that use cave generation. Both the
probability, and quantity of ores spawning in walls is scaled based on
distance, with ore vents looking like large caches of ores found in
walls. This makes following ores found in walls and checking their
quantity of minerals spawned a good indicator of how close you are to a
nearby vent in-round.

This means you can collect some points form both discovering ore vents
first, as well as collecting their surrounding ores, turn those in for
mining points, and then trading them in for gear upgrades to more
effectively take on ore vents. As a result of tweaking the balance of
this, the total amount of ores spawned in walls overall has been
decreased. However, by making more of the process time based, we still
result in a mostly balanced finished product.

### Boulder Processing
On station, there are now three new machines. These are the BRM, the
Refinery, and the Smelter.

- The BRM acts as a teleporter. Instead of needing to carry boulders
back to the station, you can activate the BRM, and it will automatically
pick boulders to teleport back to itself. You can use this to teleport
boulders dredged up from lavaland onto the station for processing. **The
BRM will only lock on to boulders that are resting on an ore vent.**
Moving boulders back by hand will mean you'll have to haul it back by
hand.
- The refinery processes the non-metallic materials out of boulders.
This process sends the materials straight to the ORM, and collects
mining points from the ores smelted in the machine. Swiping with an ID
card lets you withdraw those points for your own personal account, but
remember that these points are for your whole team to share from. The
**Mining points obtained from this process is only 75% of the amount an
equivalent amount of ores would provide.**
- The smelter works nearly identically, however the smelter produces
metallic materials out of boulders instead.
- Once a boulder has had all of it's materials extracted, it's broken
down and deleted from the line. Otherwise, the boulder is spat out for
the next machine to process it (either the refinery or smelter).
- Once there's no minerals left in a boulder of any type, the refinery
or smelter will break the boulder down.
- Boulders **do not stack onto tiles with each other**, so they'll block
each other when pulled or when moving on a conveyor belt.

Boulders can also be processed by hand. Using a mining tool on a boulder
with right click will allow you to break down a boulder into it's
composite ores, but limits you to a maximum of 10 ore per boulder, where
the full amount can be extracted using the proper processing machines.
Also, processing by hand does deal small amounts of stamina damage over
time, do breaking a full large boulder can be particularly taxing.

Additional Boulder Processing Machines can be built, with the BRM board
being obtained from the Protolathe, while the Smelter and Refinery
boards being obtainable from the Autolathe instead. A _boulder
processing beacon_ can also be obtained from the mining points vendor as
a reward to assist with boulder processing. Boulder processing beacons
can be used to spawn in a new BRM, refinery, and smelter on the tile the
user is standing on, however **you'll still need to link them to the
ORM**!

All three machines can be upgraded with Stock Parts, allowing for **more
boulders to be processed at a time**. It does not, however, increase the
amount of minerals received from boulders, or points earned.

### Mining Borg Tweaks
Mining borgs have been given some minor adjustments to compensate for
the changes to mining. Their mineral scanner, which now has an active
component to gameplay, is now a module as opposed to built into the mob.
This module allows for the same ability to discover and start waves of
monsters to fight.

Mining modules will find that their PKA now has a total of 90% mod
capacity as compared to the 80% they had before, to allow for more
robust defense of ore vents.

In addition, all borgs and AIs can interact with the BRM for boulder
collection.

### Mining Mech Tweaks
Mining Mechs have had their utility tweaked as a result of these changes
as well. Mineral scanners to be used on mining mechs now have a larger
radius by comparison to their handheld cousins. Similarly, it now has an
active scanning button, which will actively discovery nearby ore vents.
To begin wave defense, you will need to hop out and scan a second time
however, so that you can properly accept the risks of drawing a horde of
bloodthirsty wildlife towards you and your companions.

Mechs can also manually process boulders, similar to mining tools using
their drill.

### Golem Tweaks
Golems, being more gentle and less aggressive than humans, while being
made out of LITERAL ROCKS, have a greater need to secure access to ores
and minerals to eat. As such, they have adapted to be able to do two new
things:

- Golems may now right click ore vents to be able to manually haul a
boulder out of the vent. This costs a hefty amount of stamina, but it
allows for golems to avoid combat during regular gameplay.
- Golems may now left click a boulder with an open hand in order to
manually process a boulder like a pickaxe. While not faster, it is
consistent and prevents golems from starving if they have access to a
vent, but no ores, somehow.

### Gulag Tweaks
The labor camp, being a camp for rehabilitation and ~~excessive manual
labor~~ has been tweaked. Boulders now replace the random minerals
located on their island, and to acquire their prizes inside, much be
excavated and then broken out of the rock. Now YOU TOO can excavate
minerals and become a true mineral hero by working your way to freedom.

### Mining Point Changes
As a result of fewer mining points being available across the map due to
the new ore spawning mechanics, and the shift in how and when ores will
be coming in, almost every progress based mining point cost has been
reduced by around 10-20%. Many numbers are still subject to change at
present, but the idea is that core progress unlocks should be made a bit
more available earlier in the round before players can start to solo or
duo larger or more difficult ore vents, after which they'll be rolling
in ores.

### Rarities
Every once in awhile, an unusual boulder will get hauled up from the
mineral rich depths of lavaland. These **Artifact boulders** can
occasionally produce rare items, but for now they've mostly just been
pulling up **Strange objects** for science. Nanotrasen Natural Sciences
department will reward you extra points to be collected by boulder
processing machines for successfully extracting one. In the future, this
opens up a passive reward space that mining can reward to the station,
like providing cytology DNA samples, ancient seeds, or other artifacts.

### Misc notes

- Boulders can be stored in all varieties of ore boxes (ground, mech)
should you choose, however as mentioned it's best to leave them where
they spawn and teleport them to the station for convenience.
- Maps that are not subject to cave generation will find that they are
largely untouched in terms of mineral balance.
- Future or existing ruins can now be tweaked to have a mineral balance
cost, as the ore vent ruin does. This will allow us to spawn in more
interesting ruins for pre-made combat challenges.
- There are unique ore vents that spawn across the map, that will summon
a boss mob relevant to that map. If the boss mob is defeated, that vent
will spawn large boulders pulling from every possible ore type that can
spawn. Not for the faint of heart!
- Similarly, the number of ore vents and mineral budget is now
adjustable in the cave generation procs, so maps may spawn with more or
less ore vents as desired for balance.
- Artifact boulders opens up a LOT of room for possible future content
like archaeology, xenoarch, artisci, and other design spaces!
- Megafauna STILL SPAWN ON THE MAP. They just happen to spawn in
addition to boss ore vents.
- **I'll add more to this as I get asked questions and remember things,
this is a huge PR and I'm confident I've missed at least something**

## Why It's Good For The Game

I outlined a lot of this in #78040, so I'll try and keep this relatively
snappy this time, while noting that I've made some concessions to make
the whole system a lot more playable while not trying to break out
design decisions that are at the end of the day, better for the game and
the overall resource balance in round.

Minerals are a very poorly balanced system, and have been since their
inception many years ago. We heavily rely on mineral balance in round,
and yet we've really only balanced it by introducing so much supply that
there's no equivalent exchange for materials that doesn't just heavily
flood the exchanged material. For example, items printed from materials
that are otherwise considered "rare" on master exist in such quantities
and they'll never practically run out in our allotted 90 minute time
slot design. This PR adjusts how ores spawn to a point where we can
minimize the amount of ores that need to exist on the map for mining to
be able to progress, while still providing enough resources for the
station that it covers the needs of the station adequately.

Miners will need to be more strategic about what resources they've
collected, and be able to make decisions about which vents are worth the
risk of attempting to fight, how to prepare for a wave defense, and when
to head back up for upgrades, while finally giving them at least some
kind of incentive to work together and use different equipment.
Resonators make cleaning up the caves around vent easy, sandbags set up
easy defenses for your vent, mechs can serve as a wider range radar
while mining, all while still providing a new gameplay loop to mining.

By limiting the amount of ores that can enter the round from the
massive, massive amounts that were coming into the round beforehand (see
#78346 ), we can make ore processing more meaningful by adding more
gameplay to the processing of minerals. I have some plans for that,
however this PR already got bloated really REALLY badly due to scope
creep and the number of intersecting systems that rammed into each other
to make this PR possible. So that'll be next. Plus, as I've mentioned,
we open up places for ore processing to find fossils, relics, and other
things that can implemented down the line.

Overall, I don't expect this PR to save or kill ore balance, but we gain
a LOT more control over it through the use of our mining defines
attached to this PR, and at the end of the day, that's a great place to
start off of.

## Changelog

🆑
add: Added ore vents. Scanning them with mining scanners shows what
minerals they contain. Scan again to fight off a horde of beasts as your
drone assistant excavates the vent, so the ore vent will produce mineral
boulders!
bal: Ores that spawn in walls now spawn based on their proximity to ore
vents, with their chance to spawn and their minerals contained scaling
from low to high.
add: Added the BRM, Refinery, and Smelter. These pieces of equipment are
used to process ore boulders into minerals for the station. Stock Part
upgrades allow more boulders to be processed at one time. They collect
mining points as well, to be redeemed with an ID card swipe.
add: Boulders are teleported to the station via the BRM if left
untouched. Boulders can also be cracked open for a reduced amount of ore
using pickaxes or golems hands.
add: All stations come equipt with a pre-excavated ore vent, which
produces a basic supply of iron and glass only. Scan other vents for
your critical resources!
add: Look there's a shit ton of changes on mining, for more detail check
out the Pull Request: https://github.com/tgstation/tgstation/pull/78524.
sound: New sounds and noises for your high octane factorio-like
gameplay!
image: All new boulder sprites for the new minerals and rocks added to
the mining gameplay loop, as well as mining machines!
image: Overlays appear over vents when scanned to let you know their
contents at a glance when actively scanned with any mining scanners.
/🆑

---------

Co-authored-by: Time-Green <7501474+Time-Green@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: SyncIt21 <110812394+SyncIt21@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@gmail.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-01-21 11:32:05 -05:00
Interception&?
9c2df71dc2 New Ore Silo UI (#80975)
![UI](https://github.com/tgstation/tgstation/assets/137328283/8a6f3645-32db-4700-8884-985cf7b3dd40)

## About The Pull Request

Made a new UI for Ore Silo, tweaked `MaterialAccessBar` component a bit
to properly display pop-ups over “wrapped” elements and actually wrap.

## Why It's Good For The Game

Ore Silo is one of the last machines that use browser on TG, we're
almost there!

Also, it helps @JohnFulpWillard to bring
https://hackmd.io/XLt5MoRvRxuhFbwtk4VAUA HackMD document to a closure.

## Changelog
🆑
refactor: Refactored Ore Silo Ui.
/🆑
2024-01-17 04:42:24 -05:00
necromanceranne
8e75c930c1 Fixes every instance of 'kenetic' in the codebase (#80782)
## About The Pull Request

There were several instances of this being misspelled as 'kenetic'
rather than kinetic. This fixes that.

## Why It's Good For The Game

oughe

## Changelog
🆑
spellcheck: Corrects every misspelled 'kenetic' in the codebase.
/🆑
2024-01-05 17:55:09 +00:00
SyncIt21
926d000d76 Some Processing improvements (#80693)
## About The Pull Request
Got the idea from #80682. A lot of parent procs don't do anything, some
are just formatted in a bad way, and others early return and do no ops,
it's bad in general but this should give us a head start.

Some good overhead saved here
2024-01-01 20:58:34 +01:00
Bloop
f34174414d Cleans up some extra args in Destroy() (#80642)
## About The Pull Request

After https://github.com/tgstation/tgstation/pull/80628, these shouldn't
be needed anymore right?

## Why It's Good For The Game

Cleans up some vestigial code

## Changelog
EDIT: Not player-facing.
2023-12-30 03:54:07 +01:00
SyncIt21
527ebc3451 Fixes for mat container & ORM (#80573)
## About The Pull Request
- Fixes #80559

1) The ORM now hooks onto the local container only if off station. The
ui act if statement was also messed up but that's fixed now too.

2) Creates a dedicated signal for items inserted into the silo for
clarity & uses the helper proc defined inside remote materials for
inserting items so we don't have to specify the `context` manually.

3) Properly updates the auto Doc for the container signal defines

## Changelog
🆑
fix: Off station ORM's can redeem points again.
/🆑
2023-12-28 14:58:22 +01:00
SyncIt21
d36a5af64f Removes material breakdown flags, traits & miscellaneous fixes. (#80389)
## About The Pull Request
1. Removes material breakdown flags i.e. all flags with the format
`BREAKDOWN_XXX`. These flags do nothing, there are no special checks to
transform materials based on these flags, they are passed around just
because certain procs require them for syntax purposes only.

Apparently there were plans to make these flags do something special
from the comment

302247c0d1/code/__DEFINES/construction/material.dm (L43)
But nobody got any ideas for years now. The only special thing we can do
with them now is remove them and reduce code clutter, so let's do that
    
The only flag that ever did something was the
`BREAKDOWN_INCLUDE_ALCHEMY` flag. This only worked when coupled together
with `TRAIT_MAT_TRANSMUTED` trait(which is only used by the reagent
metalgen) and when both this trait & flag are combined together... they
still do nothing

302247c0d1/code/game/atom/atom_materials.dm (L41-L42)
Yup they cancel out each other to prevent returning an empty list, the
traits only job was to prevent materials from being recycled (like why?
what's the benefit of that? nothing) and the flag was meant to bypass
this restriction so both the trait & the flag cancel out each other
therefore doing nothing meaningful. Best remove them both and call it a
day.

2. Fixes an error in displaying number of sheets inserted into a mat
container when that sheet is made up of alloy materials. it would count
as 2 or more because it would take the sum of total material amount
inserted and not the actual sheets. That's fixed now.

3. Remote materials now properly respect the `MATCONTAINER_NO_INSERT`
flag

4. Adds helper proc to insert materials via the remote material
component with proper context

## Changelog
🆑
fix: mat container displays correct number of sheets inserted for alloy
materials.
fix: remote materials now properly respect the `MATCONTAINER_NO_INSERT`
flag.
code: removes material breakdown flags and related traits.
code: adds helper proc to insert materials via the remote material
component with proper context.
/🆑
2023-12-25 02:29:26 +01:00
Ghom
260b98c277 Alien nests and some other stuf can be hit again. (#80418)
## About The Pull Request
Another small issue fixed. Thanks Melbert for telling us what's wrong
with it.

EDIT: other objects were rendered unhittable by that flags refactor PR.

## Why It's Good For The Game
Fixes #80311. I made the xmas tree indestructible because the comment to
the `NO_DECONSTRUCTION` flag didn't make a load of sense since that
doesn't stop it from getting destroyed anyway.

## Changelog

🆑 MrMelbert, Ghommie
fix: Alien nests, and some other stuff, can be physically attacked
again.
balance: x-mas trees (the ones with presents), are indestructibles.
Truly protected by a yuletide spirit.
/🆑
2023-12-19 20:06:34 +00:00
LemonInTheDark
0638b11dad Fire Alarm Lights (Lit version) (Also lumin cleanup) (#80384)
## About The Pull Request
[Removes redundant uses of
luminosity](dd4ec1fc73)

I had a bunch of these left over from an old pr, sweep sweep (Made
redundant because mobs can see through all byond darkness now)

[Starts working on the fire alarm
lighting](b555ba00c6)

Dimmer but wider fire alarms, dimmer but MUCH wider lights. The idea is
to highlight fire alarms while providing a not pitchblack but vibey
space.

## Why It's Good For The Game


https://github.com/tgstation/tgstation/assets/58055496/5058bab4-0b04-4891-82d7-e3130711e5d0

Looks nice

## Changelog
🆑
fix: Fire alarms no longer cause pitch blackness, instead creating a
dark but not black red light.
/🆑
2023-12-17 10:44:59 +01:00
SyncIt21
27635e7640 Mat container related refactors & patches (#80164)
## About The Pull Request
**1. Mat container `user_insert()` tweaks**
- Mat container will now skip over an item & its contents if that item
cannot be processed (not suitable for redemption or not an allowed type)
this is not only realistic(if an item has an tough outer shell you can't
crush it to access its contents) but also saves us computation time as
we can skip over contents quickly
- Mat container now properly respects the `MATCONTAINER_SILENT` flag
- You can now hit machines like autolathe, protolathe etc with iron
sheets (or any other material item type those machines accept) when in
combat mode rather than inserting them because it makes sense
- Mat container now has much reduced chat spam as it will sum up all the
items inserted, and the material collected rather than displaying them
individually.
![Screenshot
(365)](https://github.com/tgstation/tgstation/assets/110812394/1ff444c6-cb0d-4a15-bfd6-71b9e8dcce5a)
Much improved readability and overall faster as we do much less
`to_chat()` calls

**2. ORM Tweaks** 
- Fixes https://github.com/Skyrat-SS13/Skyrat-tg/issues/25329 .

ORM now generates points correctly always, regardless of how the ore is
inserted be it
  
  - Via hand
  - Thrown at the ORM
  - Ore Box
  - Some other bag containing ore

Points will always be generated at a common proc so no more checking
every inlet on how the ore enters the machine. Once the silo receives
the material it will inform the ORM about it, so it does not have to
check itself therefore reducing code bloat.

## Changelog
🆑
fix: ORM will generate points regardless of how the ore enters it.
fix: Machines like autolathe, techfab etc can now be hit with iron
sheets (or any other material item type those machines accept) when in
combat mode rather than inserting them because it makes sense.
fix: Mat container won't display chats fully if the
`MATCONTAINER_SILENT` flag is passed.
refactor: Machines like autolathe, techfab etc now display summed up
material inserts to chats rather than each item individually. Also, will
skip items & its contents if it cannot be processed thus saving time
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-12-14 15:12:04 +01:00
necromanceranne
8d77b1be89 Balance changes to swords, energy shields and modsuit shields. (#80072)
## About The Pull Request

### Sword Weaponry

Mundane sword weapons of all sorts do not block ``LEAP_ATTACK`` attacks
whatsoever. These attacks include tackles, xeno tackles and bodythrows.

Energy swords and double energy swords only gain 25% block probability
against such attacks.

### Double Energy Sword

No longer grants outright energy projectile immunity while employed.
Instead, it just has a high probability of reflecting (the typical 75%
to block any other attack). So, very solid defense against energy
projectiles, but not immunity.

Against non-reflectable projectiles, like ballistics or nanite bullets,
the desword only has 50% block, similar to an energy sword.

To compensate for the loss of defensive power, we'll make it all the
more rewarding for getting on top of someone with the sword by giving it
40 force while active. And also it costs 13 TC.

### Combat Energy Shield

This also lost outright energy projectile immunity, but gained the
standard blocking power of shields on top of the ability to reflect
energy projectiles when they block them. This significantly increases
the shields potential effectiveness while no longer pigeonholing the
shield to only energy weapons. (This makes them exceptionally good
against tackles and body throws, by the by).

Deathsquads still have the perfect deflection energy shield so that they
can continue to spam pulse shots with impunity.

### MODsuit Shield Module

Only has one charge instead of three, but it recharges in half the time.
This is no longer such a perfect defense, and does somewhat need you to
be thinking about how you're utilizing the shield rather than not
thinking about defense at all by barreling forward under three potential
hits worth of protection.

Also much cheaper, at almost half price of 8 TC. Because of how cheap it
is (and how much it still is necessary to keep you alive), I've put it
into the core equipment box (which brings the price up to 22 TC. As a
reminder, this is not meant to be at any discount, and is more aimed
towards teaching newer players which items contribute towards success.
If you don't want all the times within, don't buy this box, just buy
what you want separately.)

## Why It's Good For The Game

This is a doozy of an explanation, I hope you're ready for it under the
spoiler.
<details>
With my tackling and bodythrow prs, numerous people expressed
exasperation at the fact that these two tools may have been keeping some
outlier antagonist gear from becoming too easy to steamroll with if you
already knew what you were doing. My intent was to create consistent
rules and behaviours that both A) did not rely on bugs to keep the
balance of power from tipping one way or the other, and B) was at least
consistent or had consistent rules established.

This PR is tackling overperforming gear combinations for already
competent nukies that may have, over time, crept out of control, and
applying some consistency to the rules around similar equipment.

AND also deals with quite possibly the most braindead element of game
design we've tolerated for about a decade, and half a decade after it
was necessary to maintain that decision.

Part of the culprit of this issue is that, specifically in regards to
nukies, crew can't use the vast majority of their weapons effectively
against them. This largely is because this antagonist can gain
immunities to those types of equipment. And that is rapidly increasing
as we move closer towards outright ballistic removal. I don't think the
game is made healthier by everyone on the station having to fight armed
mercenaries with spears, and doesn't make much thematic sense either.
More so, most greener players probably just don't know this is how it
works, and so surprise Pikachu when their lasers bounce off nukies
harmlessly. (This bit reminds me of the problem of new players using
disablers against simple mobs)

But of course, that isn't the only part of the problem. The other half
is due to being able to be layered on a much more broad defensive tool
in the form of the MODsuit Shield Module, whose three charges could
render the mindful nukie near untouchable if they're pairing it with
some other layered defense, such as a desword. Notice that this doesn't
really address armor. The culprit is negation, and not mitigation, and
we should be sparing in how easily we hand out outright effect negation
simply because it isn't super obvious to a new player why it happened,
and how to resolve it. At the very least, we should look to find ways to
add options for players to overcome these problems. Especially with
teamwork.

Energy projectile immunity made sense while there floated around an
energy projectile that ostensibly would down you in a single shot.
Nukies ALSO had projectile weapons that worked much the same (c-20r stun
bullets, taser shot bulldogs, etc.), so it was predominantly
tit-for-tat. These immunity granting equipment pieces forced crew
members to get shotguns and ballistic guns to fight these dangers;
something more available at the time.

We've exercised large bits and pieces of this from the game a long time
ago, but we still have some remnants convinced we're still in a
taser-rich, ballistic available environment. We need to move the games
languishing tools into the modern era and re-established their place in
the game. Namely, the double-energy sword and the combat energy shield
are almost entirely unchanged besides refactors for the last decade or
so, even while the game around them have changed. They've been a
continuous sore point for me in all my time developing and a constant
nagging issue. I want to deal with it now.

MODsuit Shield Module is just kind of really good and only made stronger
the more defenses you have. It's good to have a defense like this, but I
think it is too brain dead. With only one charge, it will save you from
a lost joust here and there, but it won't make it as simple as running
right at every problem you encounter and eating a volley of attacks
while you kill someone with impunity.

**With regards to traitors**, since they also get double-energy swords;
I'm open to suggestions if this is hitting them far too hard, but I'm
not terribly concerned using this weapon for a few reasons. **Firstly**,
I think their presence amongst the crew make it a much better weapon for
tots than nukies (in isolation) simply because they can find ways to
exploit it via tools they gather from the station. It is a force
multiplier. Traitors also have a much bigger element of surprise
usually. **Secondly**, round-start traitors typically grow to be a bit
stronger over time, but I don't foresee many waiting to pay for the
double-energy sword unless they're already flush with TC. So if a
traitor is in a position after they've unlocked access to it to buy one
of these, they are probably doing pretty okay for themselves.
</details>

### TL;DR

Defense stacking and attack immunities are not particularly healthy
things to both design around, or experience in-game. They are kind of
just relics of the past made only sorer once I ripped off a few
bandaids. This is a source of a number of symptomatic issues in the
game, so let's fix that and make it easier on all of us going forward.

Much of the way these things worked operated on extremely outdated
design considerations. It doesn't make sense for them to work like this
today, and only makes things harder by keeping the status quo.

## Changelog
🆑
balance: Mundane sword-like and medieval weapons are not able to block
tackles, xenomorph tackles and body throws.
balance: The double-energy sword and energy sword have trouble blocking
physical projectiles, body throws and tackles.
balance: The double-energy sword also no longer has guaranteed energy
projectile deflection; only doing so on a successful block (75% chance
to block).
balance: But it does have 40 force now, so it is more lethal a weapon.
Traitors can purchase the sword for only 13 TC (down from 16 TC).
balance: The combat energy shield (The one you hold) now functions as a
normal shield (it used to only protect you against energy projectiles
and nothing else). It loses guaranteed energy projectile deflection, but
still reflects the projectile so on a block.
feature: Death commandos continue to have their energy shields deflect
all incoming energy projectiles. Because who cares about deathsquads
being balanced?
balance: The MODsuit shield module only has one charge, but recharges
every 10 seconds. It also costs 8 TC (down from 15). It is also now in
the Core Gear beginner box (bringing the total price up to 22 TC).
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-12-09 18:54:18 +01:00
Time-Green
54ab1e3936 Organ movement refactor *Un-nullspaces your organs* (#79687)
<!-- 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. -->

closes #53931, #70916, #53931

## About The Pull Request

Organs were previously stored in nullspace. Now they are stored in their
prospective bodyparts. Bodyparts are now stored in the mob.

I've also had to refactor a lot of code concerning organ movement.
Previously, organs were only moved into bodyparts once the bodyparts
were removed. To accomodate this change, two major distinctions have
been made:

**Bodypart removal/insertion**
Called only when an organ is taken out of a bodypart. Bodypart overlays,
damage modifiers or other changes that should affect a bodypart itself
goes here.

**Mob insertion/removal**
Called when an organ is removed from a mob. This can either be directly,
by taking the organ out of a mob, or by removing the bodypart that
contains the organ. This lets you add and remove organ effects safely
without having to worry about the bodypart.

Now that we controle the movement of bodyparts and organs, we can fuck
around with them more. Summoning someones head or chest or heart will
actually kill them now (and quite violently I must say (chest summoning
gibs lol)).


https://github.com/tgstation/tgstation/assets/7501474/5efc9dd3-cfd5-4ce4-b70f-d0d74894626e

I´ve also added a unit test that violently tears apart and reconstructs
a person in different ways to see if they get put toghether the right
way

This will definitely need a testmerge. I've done a lot of testing to
make sure interactions work, but more niche stuff or my own incompetence
can always slip through.

## Why It's Good For The Game

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

A lot of organ work is quite restricted. You can't C4 someones heart,
you cant summon their organs and a lot of exceptions have to be made to
keep organs in nullspace. This lets organs (and bodyparts) play more
nicely with the rest of the game. This also makes it a lot easier to
move away from extorgans since a lot of their unique movement code has
been removed and or generalized.

I don't like making PRs of this size (I'm so sorry reviewers), but I was
in a unique position to replace the entire system in a way I couldn't
have done conveniently in multiple PRs

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

🆑
refactor: Your organs are now inside your body. Please report any issues
with bodypart and organ movement, including exotic organ, on github and
scream at me
fix: Cases of unexpected organ movement, such as teleporting bodyparts
and organs with spells, now invokes a proper reaction (usually violent
death)
runtime: Fixes HARS runtiming on activation/deactivation
fix: Fixes lag when species swapping
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
2023-12-09 17:50:46 +00:00
Rhials
16bdcf409c "Security Implant" rework, prisoner management console updates (#79882)
## About The Pull Request

For the vernacular purposes of the following PR body -- "Security
Implant" refers to the existing subset of implants given, by security,
to captured prisoners and such as a punitive, controlling measure. This
includes the chemical, tracking, and maybe exile implants.

This revamps the functionality of how "security" implants are displayed
on huds, prisoner management console implant controls/readouts, and
their instrumentality. It was also, ultimately, an attempt at nerfing
the tracking implant that spiralled far out of control.

Rather than only displaying chemical on the right and tracking on the
left, all implants with the "security implant" flag will be trackable on
SecHuds. A maximum of two can be implanted at once. This is both due to
technical limitations, but also conveniently provides security a limit
to consider when choosing implants.

Implants now also occupy their HUD slot based on the order they were
implanted in, rather than always occupying the same spot. Neat!


![image](https://github.com/tgstation/tgstation/assets/28870487/68b17dbb-cda4-4c3b-96d4-b3bbcf49b80e)

From two (three if you count the exile implant), there are now five
security implants. _The tracker implant has been split into two of these
implants._

<details>
<summary>Summary of the implants, functions, changes:</summary>
<br>

- **Tracker (Red)** -- No longer grants teleporter beacon. Tracking
radius has been increased from 20 to 35 tiles. The Prisoner Management
Console will now list the area the prisoner is occupying as well.
Disables after the implantee is dead for 10 minutes.
- **Chemical (Blue)** -- No mechanical changes. The implant pad readout
has been modified slightly.
- **Exile (Green)** -- In addition to past functionality, station
shuttle controls (public, mining, etc.) will be unresponsive for the
implantee. Flimsy, but more effective than a stern warning not to come
back from lavaland.
- **Beacon (Yellow)** -- Implantee becomes a teleporter beacon. The
prisoner console will report if their currently occupied area is
hazardous or not, so half of the security team doesn't blindly teleport
into space or lava. Disables after the implantee is dead for 10 minutes.
Available from Cargo.
- **Teleport Blocker (Deep Blue, not shown)** -- Prevents the implantee
from being teleported. Ever wanted to keep a wizard or cultist in a
cell? This is where you can start. Available from Cargo, expensive and
scarce.

Each of the implants has some application that would benefit security if
used on a captured criminal. Their usefulness may overlap in some
places, but the overall range of control these implants give security is
broadened.

</details>

The implant control console has also been given a small facelift.
Certain implants provide more useful readouts that can help officers
locate, control, or capture an implantee, rewarding cooperation between
officers.

It has also been totally converted into TGUI by @MrMelbert. Kickass!

Also, You can now remotely destroy implants, either to relieve criminals
from their punishment or to make room for a different implant. Wardens
should keep hold of their ID and remember to log out, since a motivated
convict could use it to shed their implants!


![tgui](https://github.com/tgstation/tgstation/assets/28870487/3c2ae99f-9c1d-4b18-b4cb-942cc96bcafe)

Everything made in this PR _should_ be scaleable enough to allow for new
security implant types to be implemented with relative ease. The
teleport-blocker implant was a last minute attempt to prove it to
myself. I had a few more ideas for implants in my head, but figured this
PR was already getting big and ugly enough. That is all for another day.

I truly apologize if there's anything I've missed in here. I did a lot
of this over a long period of time and kind of just... sat on it for a
while. If there's any confusing our unexplained changes, feel free to
point them out and I'll try to give an explanation.
## Why It's Good For The Game

The goal of this PR is to give a bit more depth to security's armory
implants. The intent is to present a choice in what implants are given
(rather than just tracker and maybe chem if you're feeling spiteful),
and to make them more useful as punitive/monitoring tools.

The tracker implant needed a nerf (and probably still does regardless of
this PR's success). It's never used for tracking since the teleporter
beacon is much more direct (+ gives a virtually free attack
opportunity), and the tracking range was incredibly subpar. I'd rather
not take toys away from security, but having the best option not be
roundstart gear feels like a fair compromise.

Warden content. Wardens have more gear to budget for and use at their
own (or the HOSes) discretion. The changes to the prisoner console allow
them to coordinate with officers to get good value out of the implants
they've chosen for an implantee.

Gives antagonists an alternate way to get de-implanted, without external
help, that can only be granted at the fault of security. Wardens who
dish out implants must keep an eye on the people carrying them!
## Changelog
🆑 Rhials, MrMelbert
add: The Tracker implant has had its teleport beacon functionality
migrated to the new (cargo accessible) Beacon implant.
add: Teleport Blocker security implant, that prevents the implantee from
teleporting by any means. Purchasable from cargo.
add: Security implants may now be harmlessly self-destructed at the
Prisoner Management Console.
balance: The Tracker implant tracking radius has increased from 20 to 35
tiles. The Prisoner Management Console will track and display the area
the implantee is in as well.
balance: The exile implant now prevents implantees from operating
shuttle controls.
code: Various code improvements and removal of unused vars in the
Prisoner Management Console
code: The HUD slots for chem/tracking implants have been converted to
display any implant with the IMPLANT_TYPE_SECURITY flag and an
associated sprite.
spellcheck: Modifies various implant pad readouts, removing false
information and rewriting some sections.
/🆑

---------

Co-authored-by: MrMelbert <kmelbert4@gmail.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-12-09 17:15:19 +01:00
YesterdaysPromise
71a1fee2f1 Explodes device.dmi (#80025)
## About The Pull Request

I woke up today and thought 'what would be easy thing to do today so I
can say I've done something?'. Then I remembered I saw several gangtool
usages the time I split radio up, and I could remedy those. 7 hours
later, device.dmi is split in a folder of its own, and I've also given
unique sprites to door remotes and landing desginators.


## Why It's Good For The Game

The device.dmi was kind of a mess.

## Changelog

🆑
/🆑
2023-12-09 13:31:50 +01:00
MrMelbert
1e76fd70b4 Attack chain refactoring: Broadening tool_act into item_interact, moving some item interactions to... atom/item_interact / item/interact_with_atom (#79968)
## About The Pull Request

Implements half of this (with some minor changes): 


![image](https://github.com/tgstation/tgstation/assets/51863163/bf5cc4bb-5a1f-42e3-921d-9a57bc6096cc)

The ultimate goal of this is to split our attack chain in two: 
- One for non-combat item interactions
  - Health analyzer scanning
  - using tools on stuff
  - surgery
  - Niche other interactions
- One for combat attacking
  - Item hit thing, item deal damage. 
  - Special effects on attack would go here.  

This PR begins this by broadining tool act into item interact. 

Item interact is a catch-all proc ran at the beginning of attack chain,
before `pre_attack` and such, that handles the first part of the chain.

This allows us to easily catch item interaction and cancel the attack
part of the chain by using deliberate bitflag return values, rather than
`TRUE` / `FALSE`*.

*Because right now, `TRUE` = `cancel attack`, no matter what, which is
unclear to people.

Instead of moving as much as possible to the new proc in this PR, I
started by doing some easy, obvious things. More things can be moved in
the future, or technically they don't even need to move in a lot of
cases.

## Changelog

🆑 Melbert
refactor: Refactored some methods of items interacting with other
objects or mobs, such as surgery and health analzyers. Report if
anything seems wrong
/🆑
2023-12-08 23:50:19 -07:00
san7890
5ce9d5806d Scopes NODECONSTRUCT_1 from flags_1 to obj_flags (#80104)
This flag only worked on the `/obj/structure` and `/obj/machinery`
level, so let's rescope it from `flags_1` and put it where it belongs -
`obj_flags`.
Bitflag operators should be scoped to their subtype specific bitfield,
not really useful to have this take up a spot on the `/atom` level if
absolutely nothing other than `/obj`s use it.
2023-12-08 08:49:14 +00:00
MrMelbert
5af1479406 Replaces unused xeno "weed extract" item in abandoned crates with, well, weed (#80157)
## About The Pull Request

Rather than granting you an otherwise-entirely unused "weed extract"
item on a rare 1% roll, an abandoned crate will now give you a random
assortment of cannabis seeds and samples.

## Why It's Good For The Game

Getting an unusable do-nothing item as a reward is kinda lame, this is
at least smokable.

## Changelog

🆑 Melbert
qol: Replaces unused xeno weed extract item in abandoned crates with a
random assortment of cannabis.
/🆑
2023-12-06 19:57:56 -07:00
san7890
7f7688b60a Demotes the "electrical conductivity" flag from flags_1 to obj_flags (#80033)
## About The Pull Request

Code to handle this flag only ever existed on the `/obj` sublevel, so
there's no need for it to be on the `/atom` level `flags_1`. There was
probably a point in time in which mobs or turfs conducted electricity
but there's zero code for it anymore so we truly just live in a society
now.
## Why It's Good For The Game

Frees up a slot on `flags_1` (which is really nice actually), proper
scoping of certain bitflag stuff, etc.
## Changelog
Not relevant to players.

I may have screwed something up, will be doing a few passes on this
myself to ensure all the search and replaces went alright but we should
be good™️
2023-12-01 21:43:46 -05:00