Commit Graph

61 Commits

Author SHA1 Message Date
MrMelbert
9800fd4855 Suit Storage Units / Inducers can charge MODsuits without necessitating them be screwdrivered opened (#82194)
## About The Pull Request

So MODsuits do this thing here with `get_cell` in that they don't return
anything when they're closed


![image](https://github.com/tgstation/tgstation/assets/51863163/416f8ef5-3bfc-4d2c-a12f-029f051d6692)

And I... can't tell why they do this. 

I looked through every use of `get_cell` and the only things affected by
this are
A. Suit Storage Units, which I believe have always been intended to
charge MODsuits?
and
B. Inducers

So I removed the `open` check. Allowing both Inducers and Suit Storage
Units to charge mods without needing you screwdriver their panel open
first.

I also took the opportunity to allow SSUs to charge multiple items at
once (divvying charge accross all items)

## Why It's Good For The Game

I asked Fikou and they said it was "probably not" intended that you need
to screwdriver them open so yeah.

I think I remember charging my MODs during the original test merges
years back but I can't remember if I opened the suit first when I did or
not.

Either way, it's not super intuitive. Though it's already not very
intuitive that SSUs charge things.

## Changelog

🆑 Melbert
qol: Suit Storage Units charge MODsuits while their cell panel is closed
or open, rather than only when screwed open
qol: Inducers can charge MODsuits while their cell panel is closed or
open, rather than only when screwed open
qol: Suit Storage Units will charge all items within simultaneously (if
possible)
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2024-03-27 16:44:13 -06: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
MrMelbert
c1a6867a80 MODsuit now uses spacesuit cell hud element (#81985)
## About The Pull Request

Rather than using screen alerts, MODsuits will now use the spacesuit
cell hud element, which normal space suits use to show how much cell is
left.

Also adds some new states to the cell hud icon to accommodate. 

## Why It's Good For The Game

1. Less clutter in the alerts tab. Allows for higher priority screen
alerts to be displayed, such as being on fire.
2. Less confusing for Ethereals using MODsuits. 
3. Consistency with normal space suits. 

## Changelog

🆑 Melbert
add: MODsuits now use the "suit charge" HUD element to show how much
charge they have left, rather than a screen alert
/🆑
2024-03-16 21:26:40 +01:00
Y0SH1M4S73R
95f01c9620 Circuit action button refactor (#80379)
## About The Pull Request

This PR makes several changes to how circuit action buttons work:
- The MOD action and BCI action components have been merged into a
single component.
- MOD circuit actions can be pinned from the configuration menu. This
works the same way as pinning individual modules, and can be done both
by the wearer and a suit AI.
- Action components have an output pin for the user of the action. This
allows MOD module circuits to distinguish between the wearer and an AI.
- Creates a supertype for `/datum/action/item_action/mod/pinned_module`
named `/datum/action/item_action/mod/pinnable`, which implements common
functionality for pinned modules and pinned circuit module actions.

## Why It's Good For The Game

The prior functionality of circuit MOD actions was somewhat unintuitive,
requiring the user to select an action from a radial menu *after*
activating the module, whether from a pinned action or from the module
radial. Providing similar pinning functionality to modules themselves
makes MOD actions more readily usable.

Merging the two different types of circuit components into one was made
with the idea that adding new types of shells with equipment actions
would inflate the number of subtypes of
`/obj/item/circuit_component/equipment_action` without adding much
meaningful functionality.

## Changelog

🆑
qol: MOD wearers and internal AIs can pin the individual actions in a
MOD circuit module in a similar way to how they can pin modules. Circuit
module actions can be pinned from the configuration menu of the circuit
refactor: The MOD action and BCI action components have been merged into
one component - the Equipment Action component.
/🆑
2023-12-23 18:52:33 +00:00
Jeremiah
9090795000 Disables mod links from virtual modsuits [NO GBP] (#80038)
## About The Pull Request
Via discussion in discord:

![image](https://github.com/tgstation/tgstation/assets/42397676/b1990bce-35c3-4266-9ee1-3f6abde846bb)
## Why It's Good For The Game
Virtual entities, however suited up they are, shouldn't be able to
communicate station side with crew or with syndicate entities.
## Changelog
🆑
fix: Mod links are now disabled in the virtual realm.
/🆑
2023-12-01 21:33:03 +01:00
Fikou
b77c1c85ea MODLink System (+ NWTLMM) (#77639)
## About The Pull Request
A pact made with `@Kapu1178`
Small changes you should not care about:
RD MODsuit outfit (admin only) no longer has a beret that blocks the
activation of the suit
The beret used by death squad officers no longer is blocked from being
put on a hat stabilizer module
Admins can now Shear matrices of objects in Modify Transform
Multitool buffers have been a little refactored to use a setter proc
that saves them from causing hard dels
Cooler stuff:
A revival and remake of [Nobody Wants To Learn Matrix
Math](https://github.com/tgstation/tgstation/pull/59103), this time with
additional tooling for quick matrix calculations.

![image](https://github.com/tgstation/tgstation/assets/23585223/eb387738-0839-463a-aed8-4703d139b11a)
The MODLink system, available through every MODsuit and MODLink scryers
(a neck item obtainable from advanced modsuit research or
charliestation)
Let's you make a holographic call with any other MODLink user, where you
can chat in realtime and see what's up with em

![image](https://github.com/tgstation/tgstation/assets/23585223/5a822f9f-e823-497e-b766-40055f2fc0d6)
![image](https://github.com/tgstation/tgstation/assets/23585223/062983ee-6058-4e78-a3aa-bccda1a3e224)


## Why It's Good For The Game
Adds a fun way for the crew to communicate with each other that can be
done in real-time with relative privacy compared to radio.

## Changelog
🆑 Fikou, Armhulen, Sheets (+rep for Mothblocks and Potato)
fix: RD MODsuit outfit (admin only) no longer has a beret that blocks
the activation of the suit
fix: The beret used by death squad officers no longer is blocked from
being put on a hat stabilizer module
admin: Admins can now Shear matrices of objects in Modify Transform
admin: Admins now have access to Test Matrices in the VV dropdown, an
all-in-one tool for editing transforms.
add: MODLink system, available through scryers (from RnD and Charlie
Station) and through MODsuits. Lets you call people with holographs!
/🆑
2023-08-19 06:24:57 +00:00
Jacquerel
a148379092 pAIs can be inserted into a MODsuit (#77212)
## About The Pull Request

Ressurects this old concept from (#64530), if we're making pAIs conform
to being personal assistants more often then they should be better at
assisting your person.

You can insert a pAI into a MODsuit simply by using the card on a
MODsuit with an open panel. You can eject it again from the MODsuit
control panel UI (though the maintenance panel still needs to be
unscrewed).

Inserted pAIs can:
- Deploy and undeploy suit parts.
- Turn the suit on and off.
- Monitor any stats on the MODsuit panel.
- Activate any of your suit actions.

Inserted pAIs cannot:
- Move the suit.

This does not remove the ability to place AIs into your suit. AIs can do
all of the above but can _also_ move the suit around while you are
critically injured.
You can't have _both_ an AI and a pAI in your suit at the same time.

Additionally I had to mess around with the backend for pinning actions a
little bit.
AIs who tried to pin MODsuit actions to their screen would pin them to
the UI of the person wearing the suit instead, because it passed through
`grant_item_action`. We _want_ to use that interface for the other stuff
it does, but we need to catch and override who is _actually_ being
granted the action so it goes to the person who pinned it rather than
the person wearing the suit.

## Why It's Good For The Game

Gives more things for your pAI to do, now you can delegate manging some
suit functions to your little buddy.

## Changelog

🆑
add: pAIs can be inserted into MODsuits and can control suit modules
(but are not capable of moving the suit).
fix: AIs/pAIs in MODsuits can properly pin actions
/🆑
2023-08-03 11:01:15 +02: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
Jacquerel
973a76b29a Makes hoods into a component (#75977)
## About The Pull Request

Refactors the behaviour of "one clothing item deploying another clothing
item" from `/obj/item/clothing/suit/hooded` and makes it into a
component.
This allows you to make hooded items which are not part of that
typepath. It also means you could make (for instance) a hat which can
deploy a pair of sunglasses into the eye slot or a jumpsuit with
deployable clown shoes or something.

I need to pass in an assload of callbacks because we have a bunch of
special hoodies that want to do things when you raise and lower the
hood, but for a normal item you would not need these.

## Why It's Good For The Game

Frees people from the tyrrany of typepaths, mostly.
Plausibly you could use it to do something fun we don't currently do.

## Changelog

Not player facing, hopefully. As long as I did this all right.
2023-06-28 18:58:30 -06:00
Ghom
f2fc2fbd30 The Debug and Admin MODsuits now take a lot less time to (de)activate. (#76261)
## About The Pull Request
Read the title. An equivalent 'activation_step_time' variable has been
added to the mod theme datum to accomplish that.

## Why It's Good For The Game
Why do we have to wait over 10 seconds for a debug suit to activate or
deactivate on top of everything else that comes with coding,
programming, bugfixing etc? It now takes about 2 seconds to do so, which
should be enough to notice the effects of modules such as the springlock
anyway. The admin one takes 0.5 seconds, as it's by all means a better
debug suit.

## Changelog

🆑
admin: The Debug and Admin MODsuits now take a lot less time to
(de)activate. 2 and 0.5 seconds respectively, compared to the default of
10s.
/🆑

---------

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
2023-06-23 20:19:47 -06:00
LemonInTheDark
830d2e50b4 Fixes some stupid airlock sleeps (#75961)
## About The Pull Request

[A common problem with explosions is an overabundance of
sleeping](6499077a09)

In an attempt to solve this issue, let's not continue to sleep and do
work in door closing if the door is already deleted

(This is caused by firelocks activating due to other adjacent objects
deleting, triggering an atmos update, and closing the firelocks before
they get bombed. I don't have a elegant way of resolving that core
problem, so let's just minimize the impact)

[Nukes a stupid sleep loop in airlock
code](5b16360520)

When an airlock was depowered, it would enter a sleep loop, decrementing
its delay by 1 second every well, one second, so long as it had the
right wires flipped
This is very stupid

Instead, let's use signals off wire changes and a combo of timer and
remaining time var to do this with JUST a timer

Most of the changes here are just swapping over wires to a setter to
make signal registration work\

## Why It's Good For The Game

Less sleeping around explosions means less dropped ticks after a bomb
goes off. Good just in general
Also this excises dumb boomer code and adds some hooks for other devs to
use (we should use wires more man)
2023-06-19 02:18:48 +00:00
LemonInTheDark
ae5a4f955d Pulls apart the vestiges of components still hanging onto signals (#75914)
## About The Pull Request

Signals were initially only usable with component listeners, which while
no longer the case has lead to outdated documentation, names, and a
similar location in code.

This pr pulls the two apart. Partially because mso thinks we should, but
also because they really aren't directly linked anymore, and having them
in this midstate just confuses people.

[Renames comp_lookup to listen_lookup, since that's what it
does](102b79694f)

[Moves signal procs over to their own
file](33d07d01fd)

[Renames the PREQDELETING and QDELETING comsigs to drop the parent bit
since they can hook to more then just comps
now](335ea4ad08)

[Does something similar to the attackby comsigs (PARENT ->
ATOM)](210e57051d)

[And finally passes over the examine
signals](65917658fb)

## Why It's Good For The Game

Code makes more sense, things are better teased apart, s just good imo

## Changelog
🆑
refactor: Pulled apart the last vestiges of names/docs directly linking
signals to components
/🆑
2023-06-09 06:14:31 +00:00
oranges
4c48966ff8 Renames delta time to be a more obvious name (#74654)
This tracks the seconds per tick of a subsystem, however note that it is
not completely accurate, as subsystems can be delayed, however it's
useful to have this number as a multiplier or ratio, so that if in
future someone changes the subsystem wait time code correctly adjusts
how fast it applies effects

regexes used

git grep --files-with-matches --name-only 'DT_PROB' | xargs -l sed -i
's/DT_PROB/SPT_PROB/g'
git grep --files-with-matches --name-only 'delta_time' | xargs -l sed -i
's/delta_time/seconds_per_tick/g'
2023-04-11 21:31:07 -07:00
Fikou
a11517e3df worn overlays proc sends a signal (#73101)
what the title says, it sends the list of overlays to be edited and some
other stuff
makes modsuits use this
2023-02-02 16:32:03 -05:00
Mothblocks
54eae1e713 Fix signal override merge skew (#72882)
Caused by https://github.com/tgstation/tgstation/pull/72517, with
https://github.com/tgstation/tgstation/pull/72561 raising an error that
was being hidden before

This changes equip logic somewhat so that set_wearer was being called
twice.

I don't think this should be being run in visualsOnly at all, as it does
a ton of stuff like registering signals, updating UI, etc etc etc. Don't
have time to investigate further.
2023-01-22 10:34:56 +00:00
Fikou
519bf69869 Dynamic Human Icon Generation For Simple/Basic Mobs (& Cardboard Cutouts) (#72517)
## About The Pull Request
revive of #68760
this time a proc, not an element
this time supports cardboard cutouts
this time supports mob corpses

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

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

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

Co-authored-by: Time-Green <timkoster1@hotmail.com>
2023-01-18 20:04:10 +00:00
Fikou
3630c3f497 modules attached to active modsuits act as if the suit was activated, removed modules properly unequip themselves (#72341)
this seems neat for backend even if players cant use it right now also bug fix
2022-12-29 21:17:47 -06:00
Fikou
0151eb46b9 some modsuits now have some modules pinned by default (#72258)
## About The Pull Request
cleans up some modsuit code i dont like about their modules
removes mod theme blacklists, they are unused and weve not needed them
at all so far
adds support for premade suits to have modules they pin by default
the default pins currently are:

advanced suit: jetpack
loader suit: clamp, magnet, hydraulic arms
mining suit: sphere transformation
safeguard suit: jetpack
magnate suit: advanced jetpack
traitor suit: armor booster, jetpack
elite traitor suit: armor booster, advanced jetpack
nukie suit: armor booster, advanced jetpack
elite nukie suit: armor booster, advanced jetpack
spetsnaz pyro suit: armor booster, advanced jetpack, flamethrower
prototype suit: tether, kinesis
apocryphal suit: jetpack
chrono suit: timestopper, rewinder, timeline jumper, kinesis plus,
timeline eradication
ninja suit: advanced stealth, star dispenser, emp pulse, weapon recall,
adrenaline boost, energy net

## Why It's Good For The Game
quickens some stuff up

## Changelog
🆑
qol: some modsuits now have some modules pinned by default
/🆑
2022-12-28 04:37:36 -08:00
Zephyr
72add64520 Refactors armor into dedicated subtypes (#71986)
## About The Pull Request

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

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

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-12-23 16:21:22 -08:00
Fikou
e79d3bc1c4 fixes modsuit icons (#71998)
## About The Pull Request
#71908 this pr breaks modsuit icons before the first time they seal by
making the icon state be skin-standard-part
this fixes that by making them use base_icon_state instead of initial,
and also puts that in other places to reduce hardcoded stuff

## Why It's Good For The Game
le bug is le fix

## Changelog
🆑
fix: fixes modsuit icons
/🆑
2022-12-14 13:51:04 +00:00
tralezab
83f475aa7e Adds the DNA Infuser, a genetics machine you feed corpses to infuse their DNA with yours! What could go wrong?! (#71351)
## About The Pull Request  
Adds the "DNA Infuser" to genetics. One person enters, a corpse is added
to the machine, and you can activate the machine to "infuse" the subject
with the DNA. This converts one random organ from a set into the
mob-related organ.

### Rat mutation 🐀

Rats can be fed in to turn you into a rat-creature-thing!
```diff
+See better in the dark
+Can pretty much eat anything! Toxic foods, gross foods, whatever works!
+Smaller, and can climb tables
?Randomly squeaks occasionally?
-Take twice as much damage
-Vulnerable to flashes
-Gets hungry MUCH quicker.
-Yes, eat anything, but only ENJOY dairy.
```
Having every rat organ at once allows you to ventcrawl nude!

### Carp mutation 🐟 

Carp work for a mutation as well!
```diff
+Strong jaws, that drop teeth over time!
+Space immunity! Breathe in space, unbothered by pressure or cold!
+Smaller, and can climb tables
-Can't block your jaws with a mask
-Can't take the heat, overheats easily
-Can only breathe in environments that have minimal or no oxygen
-Nomadic. If you don't enter a new zlevel for awhile, you'll start feeling anxious.
```
Having every carp organ at once allows you to swim through space!

### Fly mutation 🪰 

Any corpses without organs to turn into turn into fly organs! Fly organs
now have a bonus for collecting them all, transforming you into a fly,
when you pass the threshold. But even without those, fly organs are
technically... organs. They most of the time work like normal ones.

## Todo 🐦 

- [x] Finish the infuser code
- [x] Create a little booklet that shows what kind of shit you can turn
into, hopefully i can autogenerate this based off of organ set subtypes
list
- [x] sprite/slap a color on rat mutant organs
- [x] Maybe make a *few* more organ sets

## Why It's Good For The Game 🐑 

Oops, I forgor to fill this out! My hackmd is here.

https://hackmd.io/@bazelart/ByFkhuUIi

## Changelog 🧬 

🆑 Tralezab code, Azlan + Azarak (Az gaaang) for the organs
add: Added the DNA infuser to genetics! Person goes in, corpse goes in,
and they combine!
add: Try not to turn yourself into a fly, OK?
/🆑

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-11-29 02:05:44 +00:00
MrMelbert
928b902b9e Small optimization for allowed lists (#71562)
## About The Pull Request

Removes typecaching from allowed lists. 

`allowed` uses `is_type_in_list`, it's not a typecache.
Making it a typecache makes it scale very poorly. 

Before: 488 `istype`s

![image](https://user-images.githubusercontent.com/51863163/204115121-725ea813-3369-4eb5-9bd8-fd6b80efb5ca.png)

After: 5 `istype`s

![image](https://user-images.githubusercontent.com/51863163/204115127-65c17653-8c1e-406f-baf5-0a78c604d4b6.png)

You may ask "Why not make allowed lists typecaches instead, it's also
faster than is type in list"
Yes, but it's a lot more work than just getting this out of the way, and
plus you need to account for stuff like adding allowed lists together
and meh. This is just easier.

## Why It's Good For The Game

Code goes faster

## Changelog

🆑 Melbert
code: Cuts some uses of allowed list as a typecache. Allowed lists are
not typecaches, don't make them typecaches
/🆑
2022-11-27 23:00:41 -08: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
Dani Glore
0a81ea5bf9 Internals Bugfixes & Internals-Compatible Helmets (#70750)
* Core internals refactor. Add open/close_internals procs to /obj/item/tank. Add open/close_internals, can_breathe_internals, and invalid_internals procs to /mob/living/carbon. Fixed bug in human_stripping.dm preventing changing internals for breathing tube users. Fixed bug in /obj/item/tank/toggle_internals that was auto-adjusting non-internals masks. Fixed bug in slements/strippable that caused two mobs to breathe from the same internals.
2022-10-31 12:04:52 +01:00
RikuTheKiller
a2577296e6 Upgrades the Modsuit Adapter Shell (#70286)
Code improvements are much appreciated as some things may be rather hacky.

Adds more options to the currently very limited modsuit adapter shell. Right now you can only select a module and activate (not deploy) the suit.

This has some major problems as you literally can't even deploy the suit to activate it so that's rendered useless and selecting a module is like... kind of a weird input anyways but I won't judge so I left it in. Please comment down below if you'd like for me to add an "Activate Selected Module" input and "On Module Activated" output as those are certainly possible to do. I was just a little torn on how balanced that would be.

Changes:

"Module to Select" input is now an option. You can still use a string input, but simply inserting it into the suit and activating it, then accessing the circuit that way will give you a list of all modules that the modsuit has.
Modsuit quick deploy (RMB) no longer tries to deploy the rest of the pieces when used while the suit is only partially deployed. It will now instead retract the extended pieces. This makes the "Toggle Deployment" input less prone to errors. (Why was it like this in the first place? Having to manually retract the already extended pieces sucks ass.)
Added Inputs:

"Toggle Deployment" is a new signal input that does exactly what it says it does. It simply tries to extend or retract all pieces of the modsuit depending on it's current state.
Added Outputs:

"Activated" is a new number output that outputs 1 if the suit is activated and 0 if it's not.
"Deployed" is a new number output that outputs 1 if all parts of the suit are extended and 0 if they aren't.
"Deployed Parts" is a new string list output that outputs a list of the names of all currently deployed parts.
"On Deploy" is a new signal output that outputs a signal whenever all parts of the suit are deployed or retracted, regardless of the method used.
"Finished Toggling" is a new signal output that outputs a signal whenever the suit has finished activating or deactivating, regardless of the method used.
2022-10-05 17:16:19 +01:00
John Willard
243231eb48 Properly checks flags with & instead of == (#70130)
* Makes flags properly check themselves

Byond ref: https://www.byond.com/docs/ref/#/operator/&
Basically, flags should use & instead of ==
We can have more than 1 slot on any item, so it's preferred that we do this instead. Even if it doesn't immediately fix any problems, it's something that should be the standard anyways to prevent it from ever being a problem.

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2022-09-27 21:51:45 +00:00
Xander3359
63d8a2cb49 Captain Jetpack now fits on suit storage slot. (#70107)
* Adds a base modsuit chestplate allow list, cutting down on copy paste
* Allows Jetpacks to work while equipped to a de-hardcoded slot_flags list
* Allows the Captain's jetpack to fit on space suits and MODsuits by default
* Makes the Captain's jetpack fit on the Suit storage slot.
2022-09-25 16:11:55 -04:00
Fikou
79ca96d8bc fixes a few small modsuit bugs (#69618)
the admin suit now has the advanced jetpack instead of the normal one
fixes chestplate unequipping no longer retracting the suit storage item
fixes the surgical processor causing runtimes with medborgs after the modsuit pr
fixes #68166
fixes #68574
2022-09-02 13:52:21 +01:00
Kylerace
fe7513d282 addresses reviews on the tram pr made after merge, fixes diagonal movement bugs (#68033) 2022-07-16 21:44:41 -07:00
MrMelbert
f8f3dbed98 Completely removes proc_holders from existence. Refactors all wizard, xeno, spider, and genetics powers to be actions. Also refactors and sorts ton of accompanying code. (#67083)
* destroy proc holder pt1
- change proc_holder/spell to action/cooldown/spell
- docs all the spell vars, renames some of them
- removes some useless vars
- start with pointed spells, as they're easy

* kill proc_holder pt2
- kill a buncha vars and replace it with flags
- convert a ton over
- general code improvements

* kill proc_holders pt3
- convert a good few more spells
- rename some signals
- handle statpanel
- better docs

* kiill proc_holder pt4:
- restructure the file system of action.dm, separating a good amount of item actions and miscellaneous garbage into files where they belong slightly better. Also splits off item actions, cooldown actions, innate actions, etc. into their own files, overlal making it much better to work with
- converts touch attacks to actions
- converts blood crawl, jaunt subtype

* kills proc_holder pt5
- clears up some icon issues so all the currently converted pages don't have errors
- shapeshift
- some more action cleanup

* kills proc_holder pt5.5:
- some documentation
- reworks feedback to prevent oversight with teleports and stuff

* kills proc_holder pt6:
- converted cult spells
- converted magic missile
- converted mime spells
- chipped away at the errors
- removed some vars which were too general, replaced them with more locally applicable vars. for example "range" which could mean "projectile range" or "aoe radius" or whatever - instead of having a broad net which everyone applies to in a confusing matter, instead lets each spell delegate on their own.
- merged magic/spell and magic/aoe, as the comment intended
- more unified behavior for spell levelling

* kill proc_holders pt 6.5:
- replacing a buncha old proc_holders that have been updated to reduce some errors. sub 900 baby

* kills proc_holder pt 6.75:
- minor fixes

* kills proc_holder pt7:
- cuts down on some errors
- refactors some wiz events

* kills proc_holder pt 7.5:
- malf ranged modules
- some minor errors

* kills proc_holder pt 7.75:
- mor eminor error handling, cleaning up changes

* kill proc_holder pt8:
- refactors spell book
- refactors spell implant
- some more minor error fixing

* kill proc_holder pt 8.5:
- scan ability

* Adds some robust documentation

* kill proc_holder pt9:
- converts some / most mutations over

* kill proc_holder pt10:
- sort out all the granters
- refactor them slightly
- fix some compile errors

* Some set-unset sanity - going to need to test removing Share()

* Removes transfer actions. It doesn't seem to do anything.
- Transfer_actions was called when current = new_character so locially speaking the early return in Grant() should cause it to NOOP. Test this in the future though

* Removes sharing from actions, docs actions better

* Some better documentation for spell and spell components

* Kills proc_holder pt11:
- Finally finishes ALL THE SPELLS IN THE SPELL FOLDER
- Fixes some more errors

* kills proc_holder pt11.5:
- minor error fixing and sanity

* Method of sharing actions. Can be improved  in the future, needs testing

* Implements a way to update the stat panel entry for a spell. Also gets rid of VV stuff, as you can update the bigflags directly in VV now.

* Curse of madness bug I put in.

* kills proc_holder pt12:
- sub 500 errors!
- converts cytology mobs
- converts and refactors spiders slightly
- some minor fixing around the place as usual

* kill proc_holder pt13
- Finishes heretic spells
- Sub 300 errors!
- some touch refactoring to account for mansus grasp

* kills proc_holder pt14:
- revenant
- minor bugfixing for heretic stuff

* kills proc_holder pt14.5:
- some missed stuff for revenant + heretic

* kills proc_holder pt15:
- alien abilities
- more minor fixing
- sub 100 errors. The end is nigh

* kill proc_holder pt16? 17:
- Finishes cult spells
- sub 50 errors!
- refactors the way charge works
- renames / moves some signals

* kills proc_holder pt final:
- sdql spells
- no more errors!

* Bugfixes round 1

* Various bugfixing
- documentation done
- give spell works
- can cast spell gives feedback conditionally
- is available takes into account casting ability

* Some accidental reversions + fixes

* Unit tests

* Completely refactors jaunting
- All bloodcrawling is now handled on the action itself instead of across various living procs
- slaughter demons have their own blood crawls
- jaunting dummies don't have side effects on destroy() anymore

* Wizard spell logging and even more refactoring
2022-07-01 02:01:02 -04:00
Fikou
748fa2164f fixes modsuits fucking up when unequipping every item (wabbajack) (#67533)
sad
2022-06-05 23:07:50 -04:00
Fikou
ee3ab47e01 Adds the Ninja MODsuit (#67220)
Why It's Good For The Game

Ninja code is pretty bad, I think it's best to move away into nice modular stuff instead.
Changelog

cl Fikou, PositiveEntropy, Nerevar, InfraRedBaron
refactor: the ninja space suit is now a modsuit
fix: fixes dash beams not working
/cl
2022-06-01 09:25:27 +12:00
Fikou
f2a153833e Puts emp shields on some syndie and admin modsuits, adds advanced emp shields (#67152) 2022-05-22 17:22:18 -05:00
Fikou
f501b1e49e MODsuit module update: new stuff and improved old stuff (#67042)
Doubles the range of the MOD Pathfinder AI
Fixes modules rendering below the suit.
Adds the ability for modules to be used when inactive.
Documents/cleans up some code.
Updates some old descriptions and explains some concepts better.
Armor Booster and Ash Accretion can no longer boost your speed over no slowdown at all.
Makes flashlight module start with 4 instead of 3 range, so it's better for people that don't know about configuration.
Doubles t-ray module range, from 2 to 4 (t-ray scanner is 3).
Puts the noslip module lower in progression, lowers its' price to 2.
New sprites for the magnetic harness module by Onule.
Brings back the holster module, it can now be used when the suit is inactive, can be printed with security suit research.
Adds the power kick module for the ERT Commander. It's a powerful kick.
2022-05-18 01:19:31 -04:00
Fikou
a6ae1fb78a removes permeability, rolling it into bio armor (#66742)
refactors our disease code a tiny bit
removes permeability_coefficient variable from clothing, it decided how much stuff like chems or disease passed through your clothes, while BIO armor only decided how much you could spread diseases yourself, making it pretty much laughable
permeability_coefficient is now fully rolled into bio armor, so your bio protecting stuff will now protect you from other biological hazards like blobs
2022-05-08 10:10:54 -07:00
John Willard
8c90eb87b4 Allows modsuits to be set to wear on other slots. (#66667)
Allows for MODsuit control units to be worn on slots that isn't the bag slot and actually work.
So far no MODsuits will actually use this, but I would like to add one in the future, I'm just not motivated to do the MODsuit itself, so I'm adding the support for it at least to see if it would be approved.

Lawyer tie modsuit will be real in 2023.

This doesn't really change the game much so I don't know how much I actually have to explain here.
2022-05-06 00:53:10 -07:00
Fikou
8b6bdc87b4 fixes some modsuit bugs (#66574) 2022-04-29 14:14:46 -07:00
Fikou
1f6b7b328d genericizes modsuit parts more (#66520)
Refactors handling of overlapping modsuit parts.
2022-04-27 19:38:19 +02:00
Fikou
4fa85a37c1 [NO GBP] modsuits now retract if summoned through summon items or some other hijinx (#66208)
* modsuits now retract if summoned through summon items or some other hijinx
2022-04-17 13:03:37 +02:00
Fikou
db89670d3b makes modsuit locks a bit more clear (#66190) 2022-04-17 01:22:30 -04:00
Fikou
c614507dc9 MODsuit module update: clamp nerf, replacement of holster and pepper spray modules, some tweaks to suit starting modules (#66170)
* part 1

* Merge branch 'master' of https://github.com/tgstation/tgstation into magnet-holster

* modsuit module update: replacement of holster and pepper spray, nerf to clamp

* fixes

* this for some reason renders shit badly

* h

* test

* handles deleting as an arg, hopefully fixing the runtimes

* dusk to dawn

* fucking idiot

* you too

* slight speedup

* stiupid

* less capsaicin

* Apply suggestions from code review

use the typecache

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>

* Update code/modules/mod/modules/_module.dm

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>

* w

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2022-04-15 13:16:54 -07:00
Fikou
5bce3744f0 Syndicate MODsuit resprite - sleek edition (#66087)
Sorts MODsuit icon files into clothing and modules
Makes it so modules (specifically armor booster here, but also the loader arms and ash accretion) can be colored like the control unit. and also lets them use any icon file for the overlay, so downstreams dont suffer
Resprites the Syndicate MODsuit to a sleeker design, also abandoning the armor booster cutting like a third of the sprite out, instead its similar to the elite suit, where being in space mode just gives you a different helmet design, being slits rather than eyes
2022-04-11 12:31:26 -07:00
Zonespace
b62df3a2df MODSuit clothing icon files can be overridden by its skin (#65733)
This allows the MODSuit skin to change the icon and worn icon files of the modsuit pieces.
2022-04-05 14:02:54 -04:00
Fikou
db0c8a039c MODsuit painting (#65445)
Adds modsuit painting.
2022-03-27 13:50:07 +02:00
John Willard
234d4c1217 makes most alerts, defines (#65086) 2022-02-25 00:37:01 -08:00
Fikou
b272f1aa74 Fixes modsuit charging and sphere transformation in 0 gravity (#64857)
Handles modsuit borg recharging on the standard core itself instead of the modsuit modsuit, as it should.
2022-02-13 17:09:50 -06:00
Fikou
0d34bc7798 Mining MODsuit Rework (#64688)
makes dropkey deactivate device modules
fixes speed potion being fucky
fixes doubled up balloon alerts
makes some cell code better i think
makes the gps module open the gps tgui for you, instead of putting a gps in your hand
the loader suit can now hold mailbags

Reworks the mining modsuit.
The suit is no longer cold-proof (this can be mitigated by using module space for thermal regulators)
The suit fits less modules than standard suits, but cant burn in lava.
In suit storage it can carry ore bags, resonators and kinetic crushers.
It features a storage, gps, ore bag, drill, clamp and by default comes with a plasma core, being recharged with plasma ore rather than by power cell.
Features two new modules:

Ash Accretion, it gathers dust from basalt (or snow) you walk on to create a layer of ash around the suit, acting as armor and a speed up that quickly drains when you walk on other terrain.
Sphere Transform, turns you into a fast moving ball that can travel past lava, you cannot use your hands when in this form, but you can launch aoe mining bombs to attack or mine
2022-02-06 15:46:21 -08:00
LemonInTheDark
b48cda6afa Fixes harddels in pinned module code, cleans up a musty pattern that I want to die (#64674)
* Please stop typecasting target, noooooooooooooooooo

* Fixes harddels in pinned module code

The logic for pinned modules was intentionally hanging references to the
mob that pinned the action button. I have depression.

The pinned_to list also was never fully cleared, but that would have
just exasperated the issue. I've converted its use of mobs to refs, and
its use of the module var into something better managed

(Friendly reminder that actions will persist in your nightmares forever
unless they are manually qdel'd, this code wasn't doing that.

Also cleaned up how the pinned_to list is managed, hopefully it's a bit
more action centered now
2022-02-06 13:32:09 -06:00
Fikou
62add6c9a8 Loader Class MODsuit (#64359)
* loader modsuit
2022-01-28 15:10:02 +01:00