Commit Graph

85 Commits

Author SHA1 Message Date
OrbisAnima
1767855cbb Fixes Research From Fishing (#84549)
## About The Pull Request

Fixes the fishing experiments from giving an outrageous amount of
points, bringing it in line with their tech work.

## Why It's Good For The Game

Minor Fishing experiments no longer give enough tech to replace 20
minutes of pasive tech generation, thus preventing fishermen from making
the entire science department irrelevant.

Fixes Downstream: https://github.com/NovaSector/NovaSector/issues/3233

## Changelog
🆑
fix: Brought the fishing rewards experiments to normal values.
/🆑
2024-07-02 19:01:23 +02:00
Watermelon914
0db2a23faf Adds a new power storage type: The Megacell. Drastically reduces power cell consumption/storage. [MDB Ignore] (#84079)
## About The Pull Request
As the title says. A standard power cell now only stores 10 KJ and
drains power similar to how it did before the refactor to all power
appliances.

The new standard megacell stock part stores 1 MJ (what cells store right
now). APCs and SMESs have had their power cells replaced with these
megacell stock parts instead. Megacells can only be used in APCs and
SMESs. It shouldn't be possible to use megacells in any typical
appliance.

This shouldn't change anything about how much 'use' you can get out of a
power cell in regular practice. Most should operate the same and you
should still get the same amount of shots out of a laser gun, and we can
look at expanding what can be switched over to megacells, e.g. if we
want mechs to require significantly more power than a typical appliance.

Thanks to Meyhazah for the megacell icon sprites.

## Why It's Good For The Game
Power cell consumption is way too high ever since the power appliance
refactor that converted most things to be in joules. It's a bit
ridiculous for most of our machinery to drain the station's power supply
this early on.

The reason it's like this is because regular appliances (laser guns,
borgs, lights) all have a cell type that is identical to the APC/SMES
cell type. And it means that if we want to provide an easy way to charge
these appliances without making it easy to charge APCs/SMESs through a
power bug exploit, we need to introduce a new cell type to differentiate
between what supplies power and regular appliances that use power. This
is primarily what the megacell stock part does.

This moves us back to what it was originally like before the power
refactor, where recharging power cells wouldn't drain an exorbitant
amount of energy. However, it maintains the goal of the original
refactor which was to prevent people from cheesing power generation to
produce an infinite amount of power, as the power that APCs and SMESs
operate at is drastically different from the power that a regular
appliance uses.

## Changelog
🆑 Watermelon, Mayhazah
balance: Drastically reduces the power consumption and max charge of
power cells
balance: Added a new stock part called the battery, used primarily in
the construction of APCs and SMESs.
add: Suiciding with a cell/battery will shock you and potentially dust
you/shock the people around you if the charge is great enough.
/🆑

---------

Co-authored-by: Watermelon914 <3052169-Watermelon914@users.noreply.gitlab.com>
Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com>
2024-06-25 00:32:19 +00:00
Andrew
881dd195f1 Techweb tweaks [NO GBP] (#84086)
## About The Pull Request

PR for collecting techweb feedback post merge and address valid issues
of #84024.

People seem to dislike the abundance of new experiments in the middle of
the tree, so reducing some requirements for those for now.

Also updated NT frontier app a bit, as people are confused with the
shell experiments.


![image](https://github.com/tgstation/tgstation/assets/3625094/8ce91935-c374-443c-84b4-ebee14d6bac1)

## Why It's Good For The Game

Balancing out the new tree.

## Changelog

🆑
balance: Added ordnance to extra access of geneticists and roboticists
balance: Reduced parts scanning tests' machine count to 4 from 8
balance: Reduced augmented organs scanning tests mob count to 1 from 2
balance: Reduced equipped mech scanning test count to 1 from 2
balance: Added polycrystal option to bluespace crystal scan test 
fix: Allowed NTNet relay in away circuit imprinter for NT Frontier app
qol: NT Frontier app installed on RD and Scientists` PDAs by default
qol: Updated NT Frontier app to be more user-friendly
/🆑

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
2024-06-20 19:15:30 +01:00
Andrew
5f36ef1d6e New Tech Tree (#84024)
## About The Pull Request

Reshuffles the tech tree nodes, adding reagent purity and cybernetic
organ scan experiments. The total point requirements barely changed.

Made the discount experiments unlock nodes for free, instead of
providing partial discounts, to provide more incentive to actually do
them.

Also devided all points by the amount generated per second, for
convenience. Now points correspond to seconds.

<details> 
  <summary>New tech tree</summary>
<img width="4320" alt="Tech New"
src="https://github.com/tgstation/tgstation/assets/3625094/77afdec7-9df3-47b7-8df0-5b9261e9e0d6">
</details>

## Why It's Good For The Game

- Breaks bloated general nodes into more specialized nodes, making the
tree more balanced
- Combines scattered nodes dedicated to a single design into specialized
nodes, reducing the number of nodes
- Reshuffles the unlocks within specialized tree to adjust progression
on some trees to follow the idead: Cheap nodes first, then nodes that
require experiments or nodes of neighbouring trees, then expensive nodes
with end-game tech.
- You no longer need a dissection experiment to unlock a microwave,
every experiment is relevant to the tree unlocked by it
- With specialized nodes, it is easier to pick a node for the new things
that people add
- Better foundation for potential per-department point system. It will
be easier to put it on top of a cleaner tree
- The nodes are separated in tiers, with progressively increasing costs,
so that early tech is cheap and easy to research with just points, but
later tech is more expensive, making the discount experiments for those
more likely to be performed.

## Changelog

🆑
balance: Reshuffled tech tree, making nodes more specialized
qol: Research points devided by the amount generated per second, so now
research points correspond to seconds
add: Introduced reagent purity scan experiments (required for Cryostasis
node)
add: Introduced synthetic organ scan experiment (required for top tier
cyber organs)
add: Added a variant of machinery scan experiment that accepts any
machines with upgraded parts (required for tier 3 parts)
del: Removed material scanning experiments from the tech tree
/🆑
2024-06-17 13:21:48 -04:00
MrMelbert
ff6b41aa07 Afterattack is dead, long live Afterattack (#83818)
## About The Pull Request

- Afterattack is a very simple proc now: All it does is this, and all
it's used for is for having a convenient place to put effects an item
does after a successful attack (IE, the attack was not blocked)


![image](https://github.com/tgstation/tgstation/assets/51863163/1e70f7be-0990-4827-a60a-0c9dd0e0ee49)

- An overwhelming majority of afterattack implementations have been
moved to `interact_with_atom` or the new `ranged_interact_with_atom`

I have manually tested many of the refactored procs but there was 200+
so it's kinda hard

## Why It's Good For The Game

Afterattack is one of the worst parts of the attack chain, as it
simultaneously serves as a way of doing random interactions NOT AT ALL
related to attacks (despite the name) while ALSO serving as the defacto
way to do a ranged interaction with an item

This means careless coders (most of them) may throw stuff in afterattack
without realizing how wide reaching it is, which causes bugs. By making
two well defined, separate procs for handing adjacent vs ranged
interactions, it becomes WAY WAY WAY more easy to develop for.

If you want to do something when you click on something else and you're
adjacent, use `interact_with_atom`
If you want to do something when you click on something else and you're
not adjacent, use 'ranged_interact_with_atom`

This does result in some instances of boilerplate as shown here:


![image](https://github.com/tgstation/tgstation/assets/51863163/a7e469dd-115e-4e5b-88e0-0c664619c878)

But I think it's acceptable, feel free to oppose if you don't I'm sure
we can think of another solution

~~Additionally it makes it easier to implement swing combat. That's a
bonus I guess~~

## Changelog

🆑 Melbert
refactor: Over 200 item interactions have been refactored to use a
newer, easier-to-use system. Report any oddities with using items on
other objects you may see (such as surgery, reagent containers like cups
and spray bottles, or construction devices), especially using something
at range (such as guns or chisels)
refactor: Item-On-Modsuit interactions have changed slightly. While on
combat mode, you will attempt to "use" the item on the suit instead of
inserting it into the suit's storage. This means being on combat mode
while the suit's panel is open will block you from inserting items
entirely via click (but other methods such as hotkey, clicking on the
storage boxes, and mousedrop will still work).
refactor: The detective's scanner will now be inserted into storage
items if clicked normally, and will scan the storage item if on combat
mode
/🆑
2024-06-11 21:58:09 -07:00
Jeremiah
8e3f635b98 Alt click refactor (#82656)
## About The Pull Request
Rewrites how alt click works. 
Based heavily on #82625. What a cool concept, it flows nicely with
#82533.

Fixes #81242 
(tm bugs fixed)
Fixes #82668

<details><summary>More info for devs</summary>

Handy regex used for alt click s&r:
`AltClick\((.*).*\)(\n\t.*\.\.\(\))?`
`click_alt($1)` (yes I am aware this only copies the first arg. there
are no other args!)

### Obj reskins
No reason for obj reskin to check on every single alt click for every
object. It applies to only a few items.
- Moved to obj/item
- Made into signal
- Added screentips

### Ventcrawling
Every single atmospherics machine checked for ventcrawling capability on
alt click despite only 3 objects needing that functionality. This has
been moved down to those individual items.
</details>

## Why It's Good For The Game
For players: 
- Alt clicking should work more logically, not causing double actions
like eject disk and open item window
- Added context menus for reskinnable items
- Removed adjacency restriction on loot panel

For devs:
- Makes alt click interactions easier to work with, no more click chain
nonsense and redundant guard clauses.
- OOP hell reduced
- Pascal Case reduced
- Glorious snake case

## Changelog
🆑
add: The lootpanel now works at range.
add: Screentips for reskinnable items.
fix: Alt click interactions have been refactored, which may lead to
unintentional changes to gameplay. Report any issues, please.
/🆑
2024-04-16 17:48:03 -06:00
John Willard
fa31403353 LateInitialize is not allowed to call parent anymore (#82540)
## About The Pull Request

I've seen a few cases in the past where LateInitialize is done cause of
the init return value being set to do so for no real reason, I thought I
should try to avoid that by ensuring LateInitialize isn't ever called
without overriding.

This fixes a ton of machine's LateInitialize not calling parent
(mechpad, door buttons, message monitor, a lot of tram machines,
abductor console, holodeck computer & disposal bin), avoiding having to
set itself up to be connected to power. If they were intended to not
connect to power, they should be using ``NO_POWER_USE`` instead.

Also removes a ton of returns to LateInit when it's already getting it
from parent regardless (many cases of that in machine code).

## Why It's Good For The Game

I think this is better for coding standard reasons as well as just
making sure we're not calling this proc on things that does absolutely
nothing with them. A machine not using power can be seen evidently not
using power with ``NO_POWER_USE``, not so much if it's LateInitialize
not calling parent.

## Changelog

🆑
fix: Mech pads, door buttons, message monitors, tram machines, abductor
consoles & holodeck computers now use power.
/🆑
2024-04-08 22:15:07 -06:00
Bilbo367
29ecfb7e56 fixes material scanning, so we can scan again (#82428)
I broke material scanning, This fixes it.
2024-04-04 14:22:48 +00:00
Bilbo367
e4de9efff6 handheld Experimenters give more helpful feedback (#82235)
## About The Pull Request

Handheld experimenters now will tell you if the machine parts are not
high enough tier, not the exact needed tier, if scanned mechs are
missing equipment in arms, and if scanned mech is not hand-crafted.

## Why It's Good For The Game

Helps players (me) understand why I can't scan the kiosk for the
experiment (I didn't read).

## Changelog

🆑
qol: some experiments now give you more helpful hints at why your
failing
code: changes around some experiment code to make it more understandable
/🆑
2024-04-02 05:32:27 -04:00
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
Bilbo367
466b3df048 Refactor removing unused defines. (#82115)
## About The Pull Request

Refactors a lot of the unused defines.

## Why It's Good For The Game

Refactors a lot of the unused defines.

## Changelog
Nothing player facing

---------

Co-authored-by: san7890 <the@san7890.com>
2024-03-22 21:29:35 -06:00
Mothblocks
c1d68698fb Micro-optimize qdel by only permitting one parameter (#80628)
Productionizes #80615.

The core optimization is this:

```patch
-	var/hint = to_delete.Destroy(arglist(args.Copy(2))) // Let our friend know they're about to get fucked up.
+	var/hint = to_delete.Destroy(force) // Let our friend know they're about to get fucked up.
```

We avoid a heap allocation in the form of copying the args over to a new
list. A/B testing shows this results in 33% better overtime, and in a
real round shaving off a full second of self time and 0.4 seconds of
overtime--both of these would be doubled in the event this is merged as
the new proc was only being run 50% of the time.
2023-12-28 13:52:44 -08:00
DATAxPUNGED
d077a391c8 Mech Stress Test Experiment is now SIGNIFICANTLY LESS ASS to do (#80220)
## About The Pull Request

The Stress Test 1 experiment now only requires ONE mech to be broken
down, and the margin of error of the percentage is much more lenient,
being 5% up or down (it was previously only 2%).
## Why It's Good For The Game

This experiment is painful to do right now, the process usually involves
making TWO mechs, damaging them *very close* to the arbitrary percentage
the experiment requires, scan it, realize you went too low so you gotta
weld it back up and start hitting it with your crowbar again, scan it,
get the experiment, pick up the SECOND experiment, kill the mechs, scan
THOSE. Everyone finds these a pain in the ass
## Changelog
🆑
balance: Exosuit Materials 1 now only requires one mech.
qol: Exosuit Materials 1 is much more lenient on the percentage it
requires.
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-12-16 12:36:07 +01:00
zxaber
bb4f09cd92 Replaces the Exosuit Materials 2 experiment with one about equipping mechs rather than destroying them. (#80267)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
Replaces "Exosuit Materials 2: Excessive Damage Test" with "Exosuit
Materials 2: Load Strain Test". Rather than building and then destroying
two exosuits, you now equip them with any two (compatible) main
equipment pieces. Once the experiment is done, you'll have two exosuits
still, so consider making exosuits that you can donate to other crew
afterwards.

Note that the exosuit *has* to be built by the crew. Round-start
exosuits (or those obtained through other means like the nuke ops'
uplink) will not work.
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game
The idea of creating and destroying a few rounds of mechs sounds like a
neat concept. But in practice, it burns through station resources for no
real good reason, and is somewhat antithetical to the idea of robotics
making mechs for other departments. With this change, you're still
required to make the two mechs if you want the discount, but now they'll
be available afterwards. If someone has requested a mech for their
department, for example, you can now accomplish that and part of this
experiment simultaneously.


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

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Be sure to properly
mark your PRs to prevent unnecessary GBP loss. You can read up on GBP
and it's effects on PRs in the tgstation guides for contributors. Please
note that maintainers freely reserve the right to remove and add tags
should they deem it appropriate. You can attempt to finagle the system
all you want, but it's best to shoot for clear communication right off
the bat. -->

🆑
add: Adds a new discount experiment for unlocking the combat exosuit
nodes - complete it by scanning two exosuits with equipment in the left
and right hand slots. This replaces the prior discount experiment about
destroying exosuits.
/🆑

<!-- 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-14 19:29:53 +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
Ben10Omintrix
ce6f2724cd basic cats and mini kitchen helpers (#79800)
## About The Pull Request
this pr transforms cats into basic pets! cats now have some new
behavior. they can carry fish and hunted mice in their mouths to deliver
it to kittens, and kittens will eat them.


![catmouse](https://github.com/tgstation/tgstation/assets/138636438/8f146be4-c7b2-41d3-8301-734be49b5efc)

![catfish](https://github.com/tgstation/tgstation/assets/138636438/f8df54f2-9183-406d-afbd-f90f415f7f3d)

if a kitten sees you holding food, it will point at you and meow loudly
until u give it the food.
becareful when putting male cats near each other, there is a small
chance they get into a heated argument and meow loudly at each other
until one of them flees.
also added a new small cat house for cats. cats will use these homes if
u build one near them (using 5 wood planks)


![cathouse](https://github.com/tgstation/tgstation/assets/138636438/9515a78c-fdfe-461b-bad2-6b497117c694)

Chefs can craft the cake cat and breadcat. these are useful cats because
they can help the chef around in the kitchen. they will turn stoves and
grills off when food is ready, so they dont burn. and the cake cat will
help the chef decorate his donuts

## Why It's Good For The Game
refactors cats into basic mobs and gives them a deeper ai

## Changelog
🆑
refactor: cats are now basic pets. please report any bugs.
add: the cake cat and bread cat can now help the chef around in the
kitchen
/🆑
2023-11-28 21:51:37 -07:00
Ghom
2a889a82c3 [NO GBP] fish analyzers can now be actually used for experiments. (#79030)
## About The Pull Request
I've forgot that, for some reasons, both experiments and experiment
handlers have an experiment(or) whitelist var.

## Why It's Good For The Game
This will fix #78921

## Changelog

🆑
fix: Fish analyzers can now be actually used for experiments.
/🆑
2023-10-17 16:48:53 -06:00
Ghom
18081b4b0c [NO GBP] Fixed a few more issues with fishing. (#78904)
## About The Pull Request
fix: Examining twice experiment handlers with an active fish-related
experiment now gives a comprehensible, correctly spaced list of scanned
species rather than something like "pufferfishguppyslimefishchasmchrab".
fix: No more "line snapped" balloon messages everytime the fishing
minigame is over
fix: Getting to the Master level of the fishing skill now correctly
gives you that slight helping hand to identify yet-to-be-caught fishes.

## Why It's Good For The Game
Taking care of some issues I've noticed just yesterday.

## Changelog

🆑
fix: Examining twice experiment handlers with an active fish-related
experiment now gives a comprehensible, correctly spaced list of scanned
species rather than something like "pufferfishguppyslimefishchasmchrab".
fix: No more "line snapped" balloon messages everytime the fishing
minigame is over
fix: Getting to the Master level of the fishing skill now correctly
gives you that slight helping hand to identify yet-to-be-caught fishes.
/🆑
2023-10-11 16:58:47 -06:00
Tim
d6f79f4427 Refactor gib code to use bitflags and have documentation (#78754)
## About The Pull Request
This takes all the gib related procs:
- `gib()`
- `spawn_gibs()` 
- `spill_organs()`
- `spread_bodyparts()`

And adds heavy documentation that communicates what the procs are used
for and how the different bitflags affect them. The difference is
noticeable:

`gib(TRUE, FALSE, FALSE, null)` vs `gib(DROP_ORGANS|DROP_BODYPARTS)`

The code is now much more legible which is important considering it's
used in a lot of places!

Another robust change, is that we had several places in the code where
there were double negatives like so:

```
/mob/living/carbon/spill_organs(no_brain, no_organs, no_bodyparts)
	if(!no_bodyparts) // DOUBLE NEGATIVES ARE BAD M'KAY?!?
		// do stuff here
```

This is a mindfuck to untangle. I inverted a lot of these parts so we
don't lose our sanity.

Last thing that was changed was a big `if()` loop in the `spill_organ()`
proc. This was refactored to just be a simple `for` loop with `continue`
statements where we needed to skip enabled bitflags. It's now shorter
and cleaner than before.

The only slight gameplay change this affects is that gibbing a mob now
guarantees to drop all items unless the `DROP_ITEMS` bitflag is
deliberately omitted. Some places like admin gib self, we don't want
this to happen.

## Why It's Good For The Game
Gib code is very old. (~15 years) People kept adding more arguments to
the procs when it should have been a bitflag initially. By doing it this
way, there is more flexibility and readability when it comes to adding
new code in the future.

## Changelog
🆑
refactor: Refactor gib code to be more robust.
qol: Gibbing a mob will result in all items being dropped instead of
getting deleted. There are a few exceptions (like admin gib self) where
this will not take place.
/🆑
2023-10-06 13:12:22 +01:00
Ghom
db8eca7bf3 The fishing portal generator expansion (plus skill-chip) (#78203)
## About The Pull Request
This is a PR I worked on last month, but had to put on hold while
dealing with some pressing issues with fishing feature, minigame and
other stuff, and because I had to atomize out some of the stuff
previously present here.

I've expanded on the fishing portal generator to do something other than
dispense guppies and goldfishes. It now has multiple settings,
unlockable by performing scanning experiments for fish types, available
from the get go, which also reward a meager amount of techweb points
upon completion. The generator can now be built too. No longer it has to
be ordered from cargo.
It can also be emagged for the syndicate setting, tho right now it only
dispenses donkfish and emulsijack, both otherwise impossible to get
outside of... exodrone adventures.

The advanced fishing rod now comes with an experiment handler component,
specific to the fish scanning experiment, that automatically scans
fished content. The node to get it now requires 2000 points and the
first fish scanning exp to be unock.

A new skillchip has been added, which adds a trait that changes the icon
of the fish shown in the minigame UI, giving some clues on what the
reward will be. The same trait is also gained by reaching the master
(penultimate) level of the fishing skill.

A new fish type has been added, with its own quirks. One of these quirks
included temporarily switching movement direction of the bait.
Currently, it can only be fished in the hyperspace and randomizer
setting of the fishing portal.

Screenshots:
![fuck
yea](https://github.com/tgstation/tgstation/assets/42542238/b4c75951-fa07-44ae-99ee-f602adf8a5a4)

![radial](https://github.com/tgstation/tgstation/assets/42542238/68ff21d8-69fd-4ba5-aa58-9976b6e3282f)

## Why It's Good For The Game
The fishing portal generator is but a stale and underdeveloped prototype
of the fishing feature right now, so much I was thinking of removing it
at first. However, we also have a lot of fishes which are pretty much
unfishable, so I came up with the idea of adding new portal settings
that allow people to actually get them.

As for the skillchip and trait, it's but an extra to both the vending
machine in the library and the fishing skill itself, which has an
overall humble impact on the minigame.

## Changelog

🆑
add: Expanded the fishing portal generator. It now comes with several
portal options that can be unlocked by performing fish scanning
experiments, which also award a modest amount of techweb points.
balance: The fishing portal generator is now buildable and no longer
orderable. The board can be printed from cargo, service and science
lathes.
balance: Advanced fishing tech is no longer a BEPIS design. It now
requires the base fish scanning experiment and 2000 points to be
unlocked.
add: The advanced fishing rod now comes with an incorporated
experiscanner specific for fish scanning.
add: Added a new skillchip that may change the icon of the "fish" shown
in the minigame UI to less generic ones. Reaching master level in
fishing also does that.
qol: The experiment handler UI no longer shows unselectable experiments.
/🆑
2023-10-01 04:11:55 +01:00
Ghilker
cf635800bb gas connector component (#78273) 2023-09-27 21:02:05 -04:00
san7890
24ee1a4681 Refactors Snakes into Basic Animals (#78612) 2023-09-27 20:55:34 -04:00
Jeremiah
a3849062b8 Feature: bitrunner, a new supply role (READY) (#77259)
## About The Pull Request
[Design doc](https://hackmd.io/@shadowh4nd/r1P7atPjn) 

Adds a new supply role centered on short dungeon-esque runs with a focus
on unifying the job with the fun part. Some virtual domains are combat
related, some are silly, some focus on "objectives". Avatar health is
linked to your physical presence and retries are limited.


<details>
<summary>Photos, WIP</summary>

Net pod stasis

![netpod](https://github.com/tgstation/tgstation/assets/42397676/d99073a4-2438-4600-83c0-cafb7b3fee55)

Server loaded

![](https://cdn.discordapp.com/attachments/1131433451841662996/1135304774976278759/dreamseeker_N14j6dwLcK.gif)

Server cooldown

![](https://cdn.discordapp.com/attachments/1131433451841662996/1135304775945179217/dreamseeker_NkIwWLJZma.gif)

the quantum console UI
![Screenshot 2023-08-05
105742](https://github.com/tgstation/tgstation/assets/42397676/3a45feaf-8c80-46b2-81c9-355932d1b014)

Cyber police antag page
![Screenshot 2023-08-16
205303](https://github.com/tgstation/tgstation/assets/42397676/fc28bcdd-2a2a-487b-927c-904f224c1b89)

A safehouse

![image](https://github.com/tgstation/tgstation/assets/42397676/c22ac115-4e00-432a-aeeb-b6afdb1ef750)

Domain info page, every domain gets this (and sometimes help text)
![Screenshot 2023-08-04
141859](https://github.com/tgstation/tgstation/assets/42397676/ba9ed6d9-a318-4466-b246-d2da0fa05676)

Me getting steamrolled in one of the missions

![syndicant](https://github.com/tgstation/tgstation/assets/42397676/3eb3099a-f9b2-4431-854d-50d8cad9b7f0)

Ghost roles getting notified that server is kicking them out
![Screenshot 2023-08-04
135454](https://github.com/tgstation/tgstation/assets/42397676/edab916c-6255-4b83-b2e7-155df2f03aab)

Players enjoying the new combat missions
![Screenshot 2023-08-05
005727](https://github.com/tgstation/tgstation/assets/42397676/e302a66f-610d-4fe1-82e0-7c8aec3913ea)

Players exploring some of the virtual maps
![Screenshot 2023-08-06
220919](https://github.com/tgstation/tgstation/assets/42397676/75a92a0b-6aa1-4bac-8fd1-c9fb47c955da)

(Not part of the PR, but)
![Screenshot 2023-08-06
221527](https://github.com/tgstation/tgstation/assets/42397676/012475ec-bfa5-4fd3-9dcb-31d222bb7bef)

New bitrunner vendor

![dreamseeker_V62h2BGdEl](https://github.com/tgstation/tgstation/assets/42397676/37ca8f69-f75e-45c9-b324-e6b31696c7b7)

</details>

## Why It's Good For The Game
Content, firstly, and moreso being supply department content.

The framework that this implements is a great (preauthorized)
replacement for two systems which are collecting dust: BEPIS and the
gateway. They integrate into this system and it's a direct upgrade.

This adds a way for the players on station to generate materials (if
that remains). The nice part about it is that I can throw balance and
believability to the wind, as unlike its unrelated predecessor VR or
away missions, bitrunning entirely washes its hands of the map and mobs
each reboot.

It offers a very expandable map framework to add content and it's all
fairly well documented.

I'd like to add a feature that represents the idea that jobs don't have
to be mundane and "external" jobs can stay tied to the main gameplay
loop.

## Changelog
jlsnow301, kinneb, mmmiracles, ical92, spockye
🆑
add: Adds Bitrunning to supply department- a semi-offstation role that
rewards teamwork.
add: Adds new machines to complement the job- net pod, quantum server,
quantum consoles, and the nexacache vendor.
add: Adds several new maps which can be loaded and unloaded at will.
add: Some flair for the new bitrunning vendor.
add: Adds a new antagonist for the virtual domain only. Short lived
ghost role that fights bitrunners.
del: Removes the BEPIS machine, moves its tech into the Bitrunning
vendor.
/🆑

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->

---------

Co-authored-by: MMMiracles <lolaccount1@hotmail.com>
Co-authored-by: Ical <wolfsgamingtips@gmail.com>
Co-authored-by: spockye <79304582+spockye@users.noreply.github.com>
Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
2023-09-23 11:14:12 +02:00
John Willard
aa820c08fe Oldstation now has their own RND (#78132)
## About The Pull Request

This PR does many things and I expect to be asked to atomize some stuff.

### Oldstation Additions

Oldstation now has their own research server, generating their own
points. To help alleviate major concerns, they have a few stuff to help
with this:
- They now have a pre-built operating computer
- They now have an Autopsy scanner
- They now have access to Experimental Dissection

Experimental Dissection is the old dissection, giving research points in
the form of paper notes on completion. They must be turned in to the RND
server (only works on the Oldstation one, so you can't abuse this) for
points. This was an idea I've had for some time, as Oldstation is used
somewhat as a representation of how ss13 used to be (through its use of
directional windows (before they got removed, but I'd like to bring them
back), old IDs, RTGs, and old engines before they got removed from the
game fully)

Considering there are 11 alien mobs in Oldstation, there is 27.5k
research points to get from alien corpses, enough to bring them up to
speed with whatever they wish to do. This is their 'alternative' for
experiments (which they can still do if they want, but it is very hard
to do, outside of dissection which is needed for the node).

This surgery isn't repeatable, isn't upgradable, and isn't removed by
being healed. It is not mutually exclusive with autopsy (so you can't
ruin yourself doing the wrong surgery).

### Other stuff

- Ninjas now drain RND points from the server they drain from, rather
than always hitting science
- Syncing machines to research roundstart is now a macro, and now
immediately syncs to a server on your Z-level. Machines will
automatically connect to the Science servers if none else are available.

### non-player facing

- Science, Admin, and Oldstation techwebs are now no longer vars on
research, but stored in research's list of techwebs.
- ``get_available_servers`` and ``find_valid_servers`` are now procs on
the research subsystem, rather than the experisci component.
- Oldstation code has been split into separate files.

## Why It's Good For The Game

Oldstation is one of my favorite ruins, but it is also one of the
largest complaints for RND (along with Golems) because they use the
station's Science nodes & points (I recently tried de-hardcoding Science
stuff to help prepare for this, but I didn't get everything in advance).

The complaint stems from these ghost roles, who are meant to be a fun
activity to do while waiting for the next round, using the station's
research points for their own stuff, completely untrackable unless
someone goes out of their way to grief a ghost spawn just for using
points to get things they need. These roles make their own servers to
drain the station, and I find that unfun and quite boring for everyone-
it's also not very flavorful, why would Charliestation know of the
station's RND to take advantage of it?

This hopes to fix those issues, make Charliestation more worthwhile, and
more flavorful.

## Changelog

🆑
fix: Getting a node researched now properly makes it no longer hidden.
fix: Ninjas draining RD servers now drains it from the connected
techweb, rather than sniping Science.
balance: Machines will first try to connect to a techweb with servers on
their z-level, with the Science techweb remaining as fallback.
add: Oldstation RND, comes with their own Techweb and special surgery to
gain research points through dissecting Xenomorphs.
/🆑
2023-09-07 17:59:17 +01:00
Jacquerel
b159edcc2f Anomaly gear: Polymorphic Field Inverter (#77383)
## About The Pull Request

Adds a new device you can research called the "Polymorphic Field Inverter".
It requires Advanced Biotechnology and Anomalous Research to unlock.

Completing that research lets you print out a fancy belt. Using it for 5
seconds on a mob (dead or alive) which is organic in nature and isn't
some kind of human or megafauna (monkeys are fine) will store a copy of
its DNA. Scanning another creature will replace the original stored DNA.
Storing DNA does absolutely nothing unless you have also inserted an
active Bioscrambler core.

If the item is activated with a Bioscrambler core then equipping it
grants you the ability to transform into the same kind of creature as
the one you scanned (and back). As in spells such as Wildshape you share
health with your transformed form and if you die while transformed then
you die, so be careful when turning into something like a cockroach
which has one hit point.

It has an associated experiment which makes the research free, which is
to scan two humans with (non-prosthetic) organs that they didn't have
when the round started. You can accomplish this through surgery, DNA
infusion, or a bioscrambler anomaly. You can do it on some monkeys if
nobody is cooperating with you.
I copied a teeny bit of this code from #73969 although I didn't actually
end up needing most of it.

These are absolutely codersprites so if anyone wanted to make cooler
ones, let me know.
2023-08-09 12:23:01 -05:00
necromanceranne
95ec0e6545 Dissection experiments are handled by autopsy surgery. Removes redundant dissection surgery. You can repeat an autopsy on someone who has come back to life. (#77386)
## About The Pull Request

TRAIT_DISSECTED has had the surgical speed boost moved over to
TRAIT_SURGICALLY_ANALYZED.

TRAIT_DISSECTED now tracks if we can do an autopsy on the same body
again, and blocks further autopsies if it is on the mob. A mob that
comes back to life loses TRAIT_DISSECTED. This allows for mobs to be
autopsied once again.

Since it is completely redundant now (and was the whole time TBH),
dissections have been removed in favour of just having the experiment
track autopsies.

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

## Why It's Good For The Game

Today I showed up to a round where someone autopsied all the bodies in
the morgue, not realizing they were using the wrong surgery. Since I
couldn't _redo_ the surgery, this rendered all these bodies useless.
This was not out of maliciousness, they just didn't know better. There
are two autopsies in the surgery list, but only one is valid for the
experiment and doing the wrong one blocks _both surgeries_. Dissection
is completely useless outside of experiments. This same issue also
prevents additional autopsies on the same person, even if they had come
back to life and died again after you had done the initial autopsy.
Surely you would want to do more than one autopsy, right? That's two
separate deaths!

This resolves that by giving you a method of redoing any screwups on the
same corpse if necessary. It only matters if the experiment is available
anyway, so there isn't much reason to punish players unduly just because
they weren't aware science hadn't hit a button on their side (especially
since it isn't communicated to the coroner in any way to begin with). It
also removes a completely useless surgery and ties in the experiment to
what the coroner is already going to be doing. They can dissect their
corpses to their hearts content without worrying about retribution from
science for doing so.

In addition, someone repeatedly dying can continue to have autopsies
done on them over the course of the round. The surgery bonus only
applies once, so the only reason to do autopsies after the first is to
discover what might have killed someone. No reason this should block
further surgeries, just block surgeries when the person remains a
corpse.

## Changelog
🆑
fix: You can do autopsies on people who were revived and died again
after they had already been dissected.
qol: Autopsies have become the surgery needed to complete the dissection
experiments. As a result, the dissection surgery has been removed as it
is now redundant.
qol: A coroner knows whether someone has been autopsied and recently
dissected (and thus hasn't been revived) by examining them.
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-08-08 11:39:20 +01:00
nikothedude
ccf547c142 Adds an extra malf AI ability: Remote emagging. Also tidies up emag code and coverts a lot of things to balloon alerts (#76669)
## About The Pull Request

New malf AI upgrade

Remote safety overrides: Mid-cost, Mid-supply. Allows the AI to remotely
emag things it can see and can access.
1. Very useful for psychological warfare (Emagging APCs to throw the
crew off their trail)
2. Logically makes sense - why, of all things, can the AI not emag
anything when it's fundumentally integrated with the station's
electronics?
3. Generally speaking can only access things that make sense for it to
access - it cannot emag ethereals, sadly

In order for this to work, emag_act now returns a boolean, designating
if the emag had any effect.
While I was in there, I also added args to every single emag_act I could
find and added far more feedback/converted a lot of things to balloon
alerts to allow the AI to see if its emag had any effect.
## Why It's Good For The Game

It just makes sense that the AI, the most electronically-sensitive
entity in the game, would be able to emag things. Plus, more options
given to malf that aren't strictly MURDER KILL MURDER are always a plus,
especially if they allow for fancier plays.
## Changelog
🆑
add: New malf ability: Remote safety overrides. Allows the AI to
remotely emag things it has access to.
code: emag_act() now returns a boolean designating it's success in
emagging
code: All instances of emag_act() now have the proper arguments
qol: Most usecases of emagging now have some kind of feedback, and
existing feedback has been sanity checked and converted to balloon
alerts.
/🆑
2023-07-15 15:35:14 +01:00
YesterdaysPromise
fb10121022 Icons folder cleaning wave two (#76788)
## About The Pull Request

Further continous organizing and cleaning the Icons folder. There are
still some minior nitpicks left to do, but I reached my daily sanity
expenses limit again, and the faster these get in the less issues for
both me and others later. Also cleans some mess I caused by my blindness
last PR.

## Why It's Good For The Game

Saner spriters = better sprites
2023-07-14 18:36:41 +00:00
san7890
83723acab0 Turns Chickens into Basic Mobs (#75592) 2023-05-24 15:04:27 -04:00
ArcaneMusic
f2fd69a49a Minerals have been refactored so costs and minerals in items are now in terms of mineral defines. (#75052)
Ladies, Gentlemen, Gamers. You're probably wondering why I've called you
all here (through the automatic reviewer request system). So, mineral
balance! Mineral balance is less a balance and more of a nervous white
dude juggling spinning plates on a high-wire on his first day. The fact
it hasn't failed after going on this long is a miracle in and of itself.

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

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

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

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

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

Except for foam darts.

I did round up foam darts.

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

Items individual numbers have not been adjusted yet, but we can
standardize how the conversation can be held and actually GET SOMEWHERE
on material balance as opposed to throwing our hands up or ignoring it
for another 10 years.
2023-05-03 14:44:51 +00:00
John Willard
4a1828ce86 Experisci now works if at least one RD server works on your z level (#74123)
## About The Pull Request

Experiment handlers now work if at least one RD server works on your
z-level, rather than only checking the first. It was originally done in
a lazy way, and I'm going back on that now to make it more responsive
for players.

## Why It's Good For The Game

This will allow things like off-station and Lavaland to be added to
experisci stuff, which I think would be nice as we can make
mining-related experiments for mining tech just as how there's medical
experiments for medical tech.

It also lets off-station ghost roles do experiments if they don't want
to be a jackass and just waste points, which I think is a positive until
off-station techwebs are added.

## Changelog

🆑
fix: Experimentors can connect to techwebs that have at least one RD
server on the level.
/🆑
2023-03-28 16:54:54 -04:00
Zephyr
ecbcef778d Refactors Regenerate Organs, and a few organ helpers (#74219)
## About The Pull Request

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

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

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

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-03-26 17:54:36 +01:00
MrMelbert
296c996434 Completing experiments after their associated nodes have been researched gives back a partial refund of the discount lost (#73814)
## About The Pull Request

So we're like simultaneously moving two vague directions with research.
One being "experisci grants discounts for prohibitively expensive nodes
so you want to do the experiments to discount them" and the other being
"Let's give Heads of Staff a way to research anything they want without
any communication to the research department, including the very
expensive nodes that scientists may be working on"

You already see the issue, right? You can't have your cake and eat it
too.

It sucks for scientists to be working on a complex experiment like
weapons tech for that huge 90% discount only for the HoS to stumble onto
the bridge and research it anyways. Your time is wasted and RND is
slowed down massively.

We can do something to assuage that.

This PR makes it so completing an experiment which discounts already
completed nodes will refund a partial amount of the discount that
would've applied.

For example, researching industrial engineering without scanning the
iron toilets will refund ~5000 points.

This can only apply once per experiment, so if an experiment discounts
multiple technologies, they will only get a refund based on the first
technology researched.

## Why It's Good For The Game

This accomplishes the following: 

- Expensive research nodes with difficult experiments remain expensive
without completing the experiments. If no one does the experiment, they
act the same as before.
- Expensive research nodes with very easy experiments (but time
consuming) no longer put RND on a time crunch to beat the itchy trigger
finger of the Heads of Staff. Stuff like scanning lathes allow the
scientists to work more at their own pace: they can talk to people or
maybe stop at the bar or kitchen between departments without feeling
pressure to get it done urgently.
- Scientists are able to complete experiments which previously were no
longer deemed relevant if they need a point injection. Experiments left
behind are no longer completely useless bricks. Maybe even gives
latejoin scientists something to do.
- Scientists mid experiment can still complete it to not feel like their
time is wasted.

Overall I think this has many benefits to the current science system
where many have complaints.

## Changelog

🆑 Melbert
qol: Completing an experiment which discounts a researched tech node
will give a partial refund of the discount lost. For example,
researching the industrial engineering research without scanning iron
toilets will refund ~5000 points if you complete it afterwards. This
only applies once per experiment, so experiments which discount multiple
nodes only refund the first researched.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-03-09 00:11:50 -07:00
Sealed101
40d4a19cf8 Makes datum stock parts work for Stock parts Experiment purposes 2: Electric Boogaloo (#72708)
## About The Pull Request
Fixes #72694
#72559 changed the requirements for pinpoint machine scanning
experiments to datums on accident, so to hopefully prevent further
mishaps I've commented the var further.

## Why This Speaks Volumes On The State Of Experi-Sci (Or Sybil RnD)

![image](https://user-images.githubusercontent.com/75863639/212465375-256fc9be-ef1f-4619-88cb-fb372b47ddc4.png)
____

![image](https://user-images.githubusercontent.com/75863639/212465379-dc48f1ab-6790-497b-b353-4bb8090feccb.png)


## Changelog
🆑
fix: pinpoint machine scanning experiments work again (again)
/🆑
2023-01-14 23:47:17 -08:00
John Willard
63d5ff6db8 Ties research servers to Techwebs and de-hardcodes research point gen (#72513)
## About The Pull Request

Research point generation is now done on all techwebs that have
``should_generate_points`` set to TRUE, which by default is only the
Science techweb.

I also entirely replaced the old 'servers' and 'master_servers' lists on
SSresearch with the individual 'techweb_servers' (that already existed
prior to this PR, the title is a little misleading) which are all stored
on the individual techwebs, so we no longer store these in 2-3 different
lists. Funnily enough, master server's list was unused as their behavior
was refactored a good while ago.

Sabotaging a master server now only affects the techweb the master
server is connected to, rather than cut everyone's by half

I also removed ``calculate_server_coefficient`` instead of reworked it
to work with techweb servers, because it was entirely unused.

## Why It's Good For The Game

Better consistency for several techwebs, as sabotaging one techweb won't
sabotage all of them.
This was also at the request of one of our contributors who wanted to
make use of this system but didn't know that non-science techwebs didn't
generate points, so here you go.

## Changelog

🆑
fix: If there are several techwebs, sabotaging the master server of one
of them will no longer cut research point generation of the rest.
/🆑
2023-01-15 02:33:29 +00:00
SyncIt21
ec5c9dfd10 Stock Part Datumization Complete (#72559)
So i accidently reverted all my commits in #72511 when resolving a merge
conflict So ummm yeah fuck my bad anyway

## About The Pull Request
Finishes what was started in #71693 and completes the
[initiative](https://github.com/tgstation/dev-cycles-initiative/issues/1)

Except for `obj/item/stock_parts/cell` and its subtypes. All machines
now use `datum/stock_part` for its requested components & component
parts

Not sure if i caught every machine & stuff in the game so merge with
caution
## Changelog
🆑
code: datum stock part for every obj stock part
refactor: all machines & dependent experiments to use datum stock parts
/🆑
2023-01-11 07:53:36 -08:00
Mothblocks
f54dcda1c0 afterattack now returns a flag if it's reasonable to suspect the user intends to act on an item (#72320)
Necessary for #72292 to work effectively, and probably not very useful
out of that context. Split out of its own PR because this is long and
boring.

I want to make sure that we're catching actual mistakes there, and not
just experiencing side effects of how shitty the attack chain is.
2023-01-04 21:10:41 -08:00
Jacquerel
b174af7661 Basic Mob Carp Part VIII: Basic Mob Carp (#72073)
## About The Pull Request

Wow we're finally here. This turns carp into Basic Mobs instead of
Simple Animals.
They use a variety of behaviours added in previous PRs to act in a
marginally more interesting way than they used to.
But don't worry there's still 2 or 3 PRs to follow this one until I'm
done with space fish.

Changes in this PR:
Carp will try to run away if they get below 50% health, to make use of
their "regenerate if not attacked" component.
Magicarp have different targetting behaviour for spells depending on
their spell;
- Ressurecting Carp will try to ressurect allied mobs.
- Animating Carp will try to animate nearby objects.
- Door-creating Carp will try to turn nearby walls into doors.

You can order Magicarp to cast their spell on something if you happen to
manage to tame one.
The eating element now has support for "getting hurt" when you eat
something. Carp eating can rings and hating it was too soulful not to
continue supporting.

## Why It's Good For The Game

Carp are iconic beasts and I think they should be more interesting.
Also we just want to turn mobs into basic mobs anyway.

## Changelog

🆑
add: Carp will now run away if their health gets low, meaning they may
have a chance to regenerate.
add: Lia will now fight back if attacked instead of letting herself get
killed, watch out!
balance: Magicarp will now aim their spells more intelligently.
add: Tame Magicarp can be ordered to use their spells on things.
refactor: Carp are now "Basic Mobs" instead of "Simple Mobs"
fix: Dehydrated carp no longer give you a bad feeling when they're your
friend and a good feeling when they're going to attack you.
balance: Tamed carp are now friendly only to their tamer rather than
their whole faction, which should make dehydrated carp more active.
Order them to stay or follow you if you want them to behave around your
friends.
/🆑
2022-12-25 18:24:18 -08:00
John Willard
02ba1fa2bf Better RND logs & Experiment handheld connects to techwebs directly (#71502)
## About The Pull Request

- Adds better feedback to the experiment handler's UI when it can't
connect to a techweb
- Experiment handlers now refs techwebs directly, instead of servers, so
if the server in question breaks there won't have some wonky stuff
happening.
- Adds logs when rnd machines (so techfabs & servers) are disconnected
from a techweb, either on the machine's destruction or when it gets
linked to another techweb.
- Disconnects experiment handlers if the techweb they're connected to
has no more research servers suddenly.

## Why It's Good For The Game

Better RnD logging, better user feedback, and connecting to techwebs
directly instead of servers makes it more resilient to bugs.

## Changelog

🆑
qol: Experiment handlers now give a more reasonable explanation for why
they can't find a server.
admin: Machines being disconnected from techwebs is now logged in
research.
/🆑
2022-12-13 15:00:51 +13:00
Sealed101
66d225a2c8 Makes datum stock parts work for Stock parts Experiment purposes (#71907)
## About The Pull Request
Fixes #71845
Sets the machinery scanning experiments up to check for datumised stock
parts.

## Why It's Good For The Game
Scanning module experiment is broken on live due to datumised scanning
modules, as the experiment was not modified to check for datum stock
parts.

## Changelog
🆑
fix: fixed Advanced Scanning Modules Calibration Experiment not
registering upgraded machines to its progress
/🆑
2022-12-12 13:03:33 -08:00
Tastyfish
ebc0227176 Makes dog a basic mob [MDB IGNORE] (#70799)
About The Pull Request

    Made a basic version of the pet base called /mob/living/basic/pet. It's significantly more stripped down from the old simple_animal one, because its half collar stuff and...

    Made the collar slot a component that you could theoretically remove from a pet to disable the behavior, or add to any other living mob as long as you set up the icon states for the collar (or not, the visuals are optional).
        The corgi's collar strippable slot is now generally the pet collar slot, and in theory could be used for other pet stripping screens.

    I also gutted the extra access card code from /mob/living/basic/pet as it's only being used by corgis. Having a physical ID is now just inherent to corgis, as they're the only ones that could equip it anyway.

    Ported the make_babies() function from simple_animals to a new subtree and associated behavior, called /datum/ai_planning_subtree/make_babies that uses blackboards to know the animal-specific info.
        Note that it's marginally improved, as the female walks to the male first instead of bluespace reproduction.

    Tweaked and improved the dog AI to work as a basic mob, including making /datum/idle_behavior/idle_dog fully functional.

    Made a /datum/ai_planning_subtree/random_speech/dog that pulls the dynamic speech and emotes to support dog fashion.

I've tested base collars across multiple pet types.

For dogs, I've tested general behavior, fetching, reproduction, dog fashion, and deadchat_plays, covering all the oddities I'm aware of.

image
Why It's Good For The Game

Very big mob converted to a basic mob.
Changelog

cl
fix: Lisa no longer uses bluespace when interacting with Ian.
refactor: A large portion of dog code was re-written; please report any strange bugs.
/cl
2022-12-06 09:13:13 +13:00
AnturK
84f69359a0 More horrible 515 proc compatibility. (#71333)
So i left over some basic `/whatever/proc/format` uses in the original
PR this fixes it.

Notable exceptions to the rule:
- Paths in add_verb/remove_verb, we need full path instead of a name
there to access verb metadata so we can't use proc ref macros there.
- regex.Replace, found out that it does not accept call by name. Instead
i added new REGEX_REPLACE_HANDLER so we can at least try to mark these.

There's still leftover global procs that do not use GLOBAL_PROC_REF but
they functionally equivalent so that's for later.

I don't see any reasonable way to grep for this. But if you got any
ideas please share.
2022-11-22 07:55:43 +00:00
John Willard
118299b70b More expanded multi-web support (#71402)
## About The Pull Request

This is a continuation of my previous PR
https://github.com/tgstation/tgstation/pull/71070

That one tackled techwebs and syncing it to machines, this one primarily
focuses on Generic techwebs and Experiment handlers.

### What it does

* Experiment handlers now only broadcast completed experiments over the
node they're connected to
* RD consoles once again no longer bluescreen if not connected to a
techweb
* RD servers now delete their techweb on deconstruction if they're the
creator of it
* 'Generic' techwebs are now capitalized
* Experiment handlers now see all techwebs instead of all servers being
listed under the same web, allowing there to have more than 1 techweb on
the same Z level but not list it as the same. They don't show the
location of the server anymore, I don't know if that's something that's
wanted or not.

In-game screenshot:

![image](https://user-images.githubusercontent.com/53777086/202935208-21b1fa15-e41d-4f85-b954-619252ecd504.png)

## Why It's Good For The Game

Mostly the same reason as my previous PR, this opens up more ways to
modularize techwebs and give more possibilities for ghost roles and
downstreams.

## Changelog

🆑
fix: Experisci handlers no longer show all servers as being on the same
techweb if they aren't.
fix: RnD consoles no longer bluescreen if they aren't connected to a
techweb, instead it will give an error message.
balance: Experisci handlers no longer show the location of RnD servers.
/🆑
2022-11-21 18:49:07 -08:00
John Willard
06197693a5 Adds support for non-science techwebs (+Config) (#71070)
## About The Pull Request

This is an expanding of
https://github.com/tgstation/tgstation/pull/69708

Adds a config to not connect machines to a techweb at the start of a
round
Adds the ability to multitool a server to get its techweb in its buffer,
which can then be used on machines to sync them.
Adds support for some machines to not cry when they don't have a techweb
linked to it, in case they actually don't.

If the config to not have machines connected to the science server is
enabled, research servers will make their own techwebs instead. This is
barebones though and would need more work if this option is used.

For misc stuff:
- I replaced checking ``GLOB.machines`` for research servers, to instead
check ``SSresearch.servers``, where we can use ``as anything``.
- Removed unused vars on the RD server control
- I renamed the operating computer's .dm file to remove the capitalized
letter from it. It's now operating_computer instead of Operations.

## Why It's Good For The Game

This is adding support for 2 different cases that can be used in the
future:
1. Off-station roles, we can make roles like Oldstation have their own
techweb so they don't ruin science's efforts, or use their advanced
research to get things we don't want, or even possibly have some
blacklist webs for ghost roles (like teleporters) so that way we don't
need to have this dance where we have to give them a very specific
amount of materials for them to do things while not being able to get a
teleporter and leaving. I heard discussions that people wanted this a
while back, and one of the main things preventing this from happening is
the lack of support. Hopefully this is encouragement to make it a
reality, because I think it would be a really cool expansion of ghost
roles and a good way to prevent them from messing with the round in
progress.
2. Downstreams who want to do different things with Science. Personally
I made this PR with voidcrew(shiptest) in mind and think this would make
their lives easier. I didn't expand too much on this because I'm leaving
up mostly to the downstreams to figure out what they want to do with
these systems.

## Changelog

This generally isn't really player facing, since most of the changes
would only come into effect if the config is enabled??

🆑
fix: Research servers now only show servers connected to their techweb.
/🆑
2022-11-20 15:34:53 +01:00
AnturK
4d6a8bc537 515 Compatibility (#71161)
Makes the code compatible with 515.1594+

Few simple changes and one very painful one.
Let's start with the easy:
* puts call behind `LIBCALL` define, so call_ext is properly used in 515
* Adds `NAMEOF_STATIC(_,X)` macro for nameof in static definitions since
src is now invalid there.
* Fixes tgui and devserver. From 515 onward the tmp3333{procid} cache
directory is not appened to base path in browser controls so we don't
check for it in base js and put the dev server dummy window file in
actual directory not the byond root.
* Renames the few things that had /final/ in typepath to ultimate since
final is a new keyword

And the very painful change:
`.proc/whatever` format is no longer valid, so we're replacing it with
new nameof() function. All this wrapped in three new macros.
`PROC_REF(X)`,`TYPE_PROC_REF(TYPE,X)`,`GLOBAL_PROC_REF(X)`. Global is
not actually necessary but if we get nameof that does not allow globals
it would be nice validation.
This is pretty unwieldy but there's no real alternative.
If you notice anything weird in the commits let me know because majority
was done with regex replace.

@tgstation/commit-access Since the .proc/stuff is pretty big change.

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-15 03:50:11 +00:00
tattle
ad5debaaa1 Add investigate_deaths (#71112)
## About The Pull Request
Adds INVESTIGATE_DEATHS, an investigate category intended to better show
causes of death.


![image](https://user-images.githubusercontent.com/66640614/200142461-c17b5e51-1116-4eef-bbfb-49bc024c0953.png)


![image](https://user-images.githubusercontent.com/66640614/200147306-09bef76e-68c6-4f0a-bdf9-0211eb274e66.png)

Also makes suicide_act take a `mob/living` as an argument instead of a
`mob`, and some minor style improvements since apparently I hate
atomicity.

## Why It's Good For The Game
Inspired by a mysterious death and dusting. More logging and leads for
admins investigating deaths.

Also fixes #59028

## Changelog
🆑 Tattle
admin: added investigate deaths to shed some more light on unusual
demises, dustings, and gibbings
/🆑

Co-authored-by: tattle <article.disaster@gmail.com>
2022-11-07 16:22:37 -08:00
Sealed101
232a643410 Adds a special suicide to the Experi-Scanner (#71103)
## About The Pull Request
Adds a `suicide_act` to the Experi-Scanner.

<details>
<summary>LiveLeak footage</summary>


https://user-images.githubusercontent.com/75863639/200129319-d112c8ea-e9f6-49a2-872b-8c2625f97e67.mp4

</details>

The victim's brain also gets placed into the resulting toilet's cistern.

<details>
<summary>Bodycam footage from the clean-up crew</summary>


https://user-images.githubusercontent.com/75863639/200129302-4b9b37fe-9c02-4712-8502-e4732b9258f5.mp4

</details>

The resulting toilet will not drop meat sheets when deconstructed,
leaving only a pile of bones behind.

_might add some bone crunching sounds later_

## Why It's Good For The Game
More variety is nice. A use for the experiscanner-closed icon. An
ultimate sacrifice for a single toilet that you can scan towards an
experiment.

## Changelog
🆑
add: Added a special suicide to the Experi-Scanner
/🆑
2022-11-06 12:37:16 -08:00
MrMelbert
70db96c46f Convert mouse and rat to basic mobs (#70728)
* Converts mice and rats to basic mobs

* Update paths

* Fixes

* Tweaks

* .

* Use helpers

* Unit test

* Correct the targeting

* Fixes the unit test?

* Fixes the unit test

* Docs

* update the path script with pr id

* Faction check tweak

* Review

* AHH
2022-10-28 08:49:17 -04:00
ike709
094a58d79d Fix an invalid string macro (#70274) 2022-10-03 22:19:55 -04:00
ShizCalev
4cbdc3a2db Adds more multiz support (#69420)
* Adds more multiz support by making use of ``is_valid_z_level`` instead of simply checking if z is the same.
2022-09-01 00:07:14 -04:00