Commit Graph

59 Commits

Author SHA1 Message Date
MrMelbert
8c1e35e1c0 Refactors mind language holders into non-existent, fixes new languages being deleted on species swap + tests (#76612)
## About The Pull Request

This PR refactors mind language holders into non-existence

As a result, `update_atom_languages` is no longer necessary

Mind-bound languages are transferred via `/mind/proc/transfer_to`

Species changing no longer deletes and re-creates the mob's language
holder, allowing them to keep any languages they have.

Species languages are sourced from `LANGUAGE_SPECIES` now, meaning they
are removed when they change species. If the mob is not a human with a
species datum, these are effectively just atom level languages.

Makes a bunch of unit tests to ensure language transfer over certain
events works as intended

## Why It's Good For The Game

Mobs with minds having two independent language holders results in a
good few bugs, and simply doesn't make sense when we have sources
(`LANGUAGE_MIND`).

Instead of tracking two language holders, we can simply use sources
better and only track one.

This means that the language holder you start with is your language
holder, period. It doesn't get deleted or re-instantiated or whatever.

## Changelog

🆑 Melbert
refactor: Refactored language holders, making species changes not delete
all of your known languages
/🆑
2023-07-10 18:34:57 +00:00
lessthanthree
25cfa0c03d Maptext 2023 tweaks 3 (#76552)
## About The Pull Request

Hopefully the last set of changes in this demonstration of the
[Goldilocks
principle](https://en.wikipedia.org/wiki/Goldilocks_principle).

Some more font changes, the big (hah) one being the context tooltips
again.

- Context tooltips smaller main line, more compact sublines.
- Improves documentation on the usage of the macros.
- Removes incorrect comment I added earlier in tgstation.dme
- Adds black outlines as default in the macros.
- Icon sized letters (Dwarf Fortress, credits).
- Deathrattle and other actions reduced spacing.
- Aligned cooldowns/countdowns.

<details>
<summary>Screenshots</summary>


![image](https://github.com/tgstation/tgstation/assets/83487515/9d704e77-619e-45d1-961e-48f48bec4577)


![image](https://github.com/tgstation/tgstation/assets/83487515/e6d07bc1-1c8f-41e1-bdb5-1241a04873c4)


![image](https://github.com/tgstation/tgstation/assets/83487515/cb3f3def-74b9-4872-be9b-76c4b412b2e2)


![image](https://github.com/tgstation/tgstation/assets/83487515/daab8376-edb6-4866-875b-28c7fb3b0a8a)


![image](https://github.com/tgstation/tgstation/assets/83487515/2242dab4-affe-4e9c-a10a-c668fa2555a5)


![image](https://github.com/tgstation/tgstation/assets/83487515/735280b2-4054-4588-bb59-b1d35e56b989)


![image](https://github.com/tgstation/tgstation/assets/83487515/ee44b961-452f-4407-9fdf-337a6e20ad37)

</details>

## Changelog

🆑 LT3
image: More maptext and font tweaks
spellcheck: Context tooltips too small, too big... just right?
/🆑

---------

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
2023-07-06 12:07:34 -07:00
lessthanthree
2b6f93d521 Maptext 2023 tweaks [NO GBP] (#76397)
## About The Pull Request

- In PR https://github.com/tgstation/tgstation/pull/76356 missed a few
bits of maptext around, such as shuttle signs and the supermatter. Small
text adjustments/fixes here.
- Large amount of feedback about the context tooltips. Increases size,
lightens default color as to not be too imposing.

🆑 LT3
qol: Context tooltip size increased
fix: Fixed remnants of old maptext code on various things
/🆑
2023-06-29 23:32:10 -07:00
LemonInTheDark
03c964ac45 Reworks Duffel Bags (Zippers) (#76313)
## About The Pull Request

Reworks duffel bags in line with oranges proposed plan.


![image](https://github.com/tgstation/tgstation/assets/58055496/126743dd-d7b8-47e0-bdd8-a0caec39c515)

Basically, instead of just making you slower all the time, they make you
slower while you have them open, but give you the same speed while
they're closed.
As a trade off, opening and closing them takes time, 2.1 seconds
(matches the sound) and 0.5 respectively.


https://github.com/tgstation/tgstation/assets/58055496/555d2cd0-038e-4b0b-a693-0c66dac16f5b

[Adds support for limiting extra storage, uses it to make syndie stuff
cool](d0b2bbf937)

[d0b2bbf](d0b2bbf937)

Syndicate bags currently ignore downsides by just ignoring the slowdown,
but that's kinda boring so let's just buff em instead.

They now support holding a limited amount of bulky items (3), filtered
down to things that would otherwise constitute going loud (or otherwise
be useful to carry around as a loudish traitor)

I may have gone a bit overboard on what I whitelisted here, lemme know
yeah?

I also did some fenangling with backpack uses of create_storage, I don't
like this pattern it was a bad idea I think.

## Why It's Good For The Game

I'm unsure if these delays enough, I think any length of time is decent
since it means you need to stop moving and focus on it for a bit.
My hope is this will make them a proper sidegrade, rather then something
that goes unused/acts as newbie bait

## Changelog
🆑
balance: Duffelbags will now only make you slow while they are unzipped.
As a tradeoff, you now need to stand still and zip/unzip them to access
their contents/not move real slow.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2023-06-29 21:44:09 +12:00
MrMelbert
09b7510d28 Fix colossus finale firing like 100 fewer projectiles than it should be (#76202)
## About The Pull Request


![image](https://github.com/tgstation/tgstation/assets/51863163/b7d831db-dd38-4a60-b8e3-9a02c0101d40)

## Changelog

🆑 Melbert
fix: The colossus's finale attack is now 100x more lethal, because it
was firing 100x fewer projectiles than intended
/🆑
2023-06-21 15:07:25 -04:00
MrMelbert
43f1a52223 Removes some boilerplate from transforming component (#75998)
## About The Pull Request

Removes some boilerplate from transforming component, uses traits in a
similar way to the two-handed component

Also fixes #74955 (If it's still broken?)

## Why It's Good For The Game

Makes it a bit cleaner to work with. Cause I wanna do something with
this in the future maybe.

## Changelog

🆑 Melbert
fix: Fixed e-cutlasses and bananium swords having invisible inhands
code: Removed boilerplate from transforming component
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-06-16 14:47:50 -06:00
John Willard
b5975bd915 Unit tests now catch decals in walls/space (#75189)
## About The Pull Request

Unit tests will now fail if there's a decal in a wall or open space
turf. Open space turf could be limiting to mappers but I don't think it
makes sense for decals (like dirt, glass shards, etc) to be floating
around in space in the exact same spot.

If there's a decal you want to put in space, decals have a
``turf_loc_check`` var that will bypass this.

**Important note: This is not changing existing behavior. Decals already
delete themselves when they spawn in these incorrect locations, we're
just avoiding them from spawning in the first place.**

### Changes I made

- Ash flora are now lava immune, rivers spawn after flora does, so I
decided that it would be easiest (and more flavorful) to have them be
lava-immune rather than to not have them spawn at all.
- Decals can now be spawned in non-turf locations. This is currently
done by mail, which can give you bones as part of the mail. Currently it
will just delete itself instead.
- Trading Card button is now on the same tile as their display, which
now uses an offset. Before it would spawn it on the tile next to it,
which could be a wall in some instances.
- Mirrors now have floating movement type. They ARE floating since
they're attached to the wall, and it prevents them from burning up due
to lava in the Pride ruin.
- I also added a broken mirror subtype because I thought the icon_state
check was terrible.
- Bubblegum called ``DestroySurroundings`` several times on the same
thing, I hopefully fixed some of that. Their charge ability also
registered ``COMSIG_MOB_STATCHANGE`` despite ``/datum/action`` doing it
by default, so I fixed that too.

## Why It's Good For The Game

Decals in walls is already a bad idea, but currently all it does is
delete it on Initialize. It would be better if we ensured they wouldn't
spawn in the first place.

## Changelog

🆑
fix: Lava will no longer burn 6 of the mirrors in pride ruin
fix: Lava will no longer burn plants that spawn in them.
/🆑
2023-06-15 16:39:22 -07: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
Hoolny
419dd2b754 Spider Infestation Balance Rebalance Expansion Part 1 (#75204)
## About The Pull Request
https://hackmd.io/dxhPOOdRRKW7siqPbpfmYQ?view The HackMD goes in-depth
into what this PR is about

## Content
### Ambush Spider

![image](https://user-images.githubusercontent.com/84478872/236697303-16fb5fee-7862-457f-a053-9e634873f205.png)

![image](https://user-images.githubusercontent.com/84478872/236697338-7908e9ba-07d2-4af6-9e0a-583e74d96634.png)
### Scout Spider

![image](https://user-images.githubusercontent.com/84478872/236697485-91560e01-365d-4a9e-8401-a52b412d865f.png)

![image](https://user-images.githubusercontent.com/84478872/236697489-a9f1d46d-1e65-4e9d-995e-335e4cf40f8c.png)

![dreamseeker_JtR1iVptrV](https://user-images.githubusercontent.com/84478872/236697538-4e9ac1a4-b2b7-463a-b4ff-75f8ae2d266a.png)
## Tangle

![image](https://github.com/tgstation/tgstation/assets/84478872/756de834-5470-4a2a-9e8e-55d6a3ca770d)

![TkK4NHc](https://github.com/tgstation/tgstation/assets/84478872/4fa15fa6-db11-46a5-9b56-8e5fce4bc1c0)

![XxcLU0z](https://github.com/tgstation/tgstation/assets/84478872/7a007a94-e9a4-4700-9a0e-f5e2a178c924)

### Spiderlings

![ruCweIc](https://user-images.githubusercontent.com/84478872/236697721-b96469df-e68b-47b7-9316-ec152629e9aa.png)

![SWE0bgo](https://user-images.githubusercontent.com/84478872/236697726-7753f363-99db-46b1-8181-0dc755c1804e.png)

![BYNLUQa](https://user-images.githubusercontent.com/84478872/236697753-48c1c5b0-064a-45e9-bf19-ad2e29cdb426.png)


## Why It's Good For The Game
Currently, spiders have plenty of issues that make them a very 2d
mentional antag they kill,die, and respawn which is boring and leads to
a bunch of balance issues for their current design this PR both fixes
the current issues spiders have and adds more depth into the antag.
## Changelog
🆑
add: Added 3 new spider types
add: Added more spider abilities
balance: Rebalanced spiders
fix: Fixes spiderlings having density
/🆑

---------

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-05-28 16:45:42 -07:00
Comxy
61795ee325 Cosmic Ascension Balance Patch (#74715)
## About The Pull Request
Now the stargazer does more damage to people in the area and prioritizes
mobs attacking them instead of random circuit bots 7 tiles away. It will
also slowly heal you. Makes some abilities create more carpet fields
when ascending. Increases combo times when ascending. Also makes the
Star Gazer die only when the owner dies. Star Gazer will explode when it
does die. Star Gazer has a damage aura that does heal the owner.
## Why It's Good For The Game
I have seen a lot of people complaining that the cosmic ascension isn't
good and not worth getting so I thought I would make it a little better.
## Changelog
🆑
balance: Star Gazer now explodes when it dies.
balance: Star Gazer will only die when the owner dies.
balance: Star Gazer will attack the most recent enemy that attacked him
when on autopilot.
balance: Star Gazer has an aura that slowly damages people and heals the
owner.
balance: Cosmic Ascension now buffs some spells.
/🆑
2023-04-27 19:11:13 +01:00
SMOSMOSMOSMOSMO
f3f274de5c refactors poles and trees into basic mobs (#74812)
## About The Pull Request
refactors poles and trees into basic mobs. If trees now see you holding
a chainsaw, hatchet, or some wood they will get angry and knock you out
for longer. Poles will run around giving some of their charge to APCs
they find along the way. i did them both in this PR coz poles were a
subtype of trees.

## Why It's Good For The Game
refactor

## Changelog
🆑
refactor: refactors trees into basic mobs
refactor: refactors poles into basic mobs
add: If trees now see you holding a chainsaw, hatchet, or some wood they
will get angry and knock you out for longer
add: Poles will run around giving some of their charge to APCs they find
along the way
fix: cells charged by the pole will now have their icon correctly
updated to reflect their charge
/🆑

---------

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2023-04-19 16:17:17 -06:00
Mey-Ha-Zah
9e11f73136 Lavaland Monster Sprite Update (#74299)
Updates most Lavaland mob sprites, merges some icon files and adjusts
the pathing.
## About The Pull Request

Updates Most Lavaland Mob Sprites with work provided by Sheets.
Merges, splits, and moves a few icon files and icons to adjust for the
new icons.
Repaths the dmi locations and pixel shifts for the adjusted sprites.

Examples:

![image](https://user-images.githubusercontent.com/28636915/228048074-2971537a-04b9-435c-b323-b5717ca20bdc.png)

![image](https://user-images.githubusercontent.com/28636915/228048092-8570a869-41d1-4229-971b-da96d852d397.png)

![image](https://user-images.githubusercontent.com/28636915/228048113-28809a4f-07cf-4487-a70e-b1e348c3affc.png)


## Why It's Good For The Game

Better quality sprites are better to look at.
Putting sprites that are the same type in the same file is much saner.

## Changelog
🆑
imageadd: added new lavaland sprites, moved some sprites to a new
location, adjusted pixel shift for the updated sprites, adjusted the
name of some sprites.
/🆑

---------

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
2023-04-06 00:58:38 +01:00
san7890
ccef887efe Lints Against Unmanaged Local Defines (#74333)
# MAINTAINER - USE THE BUTTON THAT SAYS "MERGE MASTER" THEN SET THE PR
TO AUTO-MERGE! IT'S MUCH EASIER FOR ME TO FIX THINGS BEFORE THEY SKEW
RATHER THAN AFTER THE FACT.

## About The Pull Request

Hey there,

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

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

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

Scenarios this PR corrects:

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

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

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

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

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

(I fixed up all this stuff using vscode, no regexes beyond what you see
in the python script. sorry downstreams)
2023-03-29 10:17:03 -07:00
san7890
bf6f81a9b5 Implements AddTraits and RemoveTraits procs for adding/removing multiple traits + swag unit test (#74037)
On the tin, doing it like this means we can reduce our overall line
fingerprint whenever we have to add two or more traits from the same
source on the same target. Especially helps when we get to the 4+ range
of traits, a breath of fresh air even.

Doesn't mean we have to do for loops, as that's already handled within
the define as well. I replaced some of the checks with `length()`
checks, let me know if I should switch it over to something else (maybe
`islist()`)? We stack_trace whenever we're not passed a list reference
on purpose, and sometimes var/lists are null by default (or just empty,
making this redundant).
## Why It's Good For The Game

I commonly feel the urge to write "use `AddTraits()`" or something in
reviews, then am sad when I remember it doesn't exist. I will no longer
be sad.

Can ensure a lot more trait safety as well by using static lists- when
both ADD_TRAIT_LIST and REMOVE_TRAIT_LIST re-use the same list, you are
confident (from a static point of view) that everything that you want to
be adding/removing works.

I may have missed a few things where this could be used, but both macros
implemented in this PR still use the same framework that was being used
in the last four years- so stuff won't break if left untouched. Just a
nifty new tool for developers.

also fixed up some code in the area, numerous bugs were found and
exploded
2023-03-18 01:57:06 +00:00
Jacquerel
296ca23aa1 Most actions cannot be used while incapacitated (#73513)
## About The Pull Request

Fixes #39775
The `TRAIT_INCAPACITATED` trait is intended to block you from acting but
does not inherently block actions. Actions only check for "conscious",
"has available hands", "immobile", or "lying down".
Most actions still _can't_ be used while incapacitated. This is because
most actions are spells, most spells have invocations, and you can't
talk while you are incapacitated. This is silly.

I have resolved this by adding a new flag which blocks actions while
incapacitated. This is somewhat redundant with "conscious" because most
sources of that also make you incapacitated but not _always_, you might
want the specificity.

I have tried to be discerning about where this flag is applied, it is
not in all cases (for instance you can still swallow implanted pills
while incapacitated and such), but it's not only possible but I can't
really avoid implementing this without it being a balance change in
_some_ cases,

Actions this effects are things such as:
Xenomorph Tail Sweep, Lesser Magic Missile (cult constucts), Heretic
Shadow Cloak, the Smoke spell in general, Conjuring (but not firing)
Infinite Guns, Mime spells

Times when these actions will no longer be available but were previously
are such times as when the mob is:
Stamina Crit, Stunned, Paralysis, and Time Stopped.

## Why It's Good For The Game

The incapacitated trait is applied by effects which should block acting
but still permits several actions which logically would be prevented.
This fortunately hasn't come up too often due to the high ratio of
actions with invocations, but it feels bad to stun someone and then have
them still able to perform an action they logically wouldn't be able to
take while stunned.
This is especially egregious in the case of Time Stop (the only way to
stun a lot of the mobs effected by this) but that's a rare pick on a
rare antagonist and would also rarely be used on these mobs, so a bit of
an edge case.

## Changelog

🆑
fix: Many spell-like abilities which could be stunned, paralysed, or
frozen in time now cannot be.
/🆑
2023-02-20 15:47:31 -07:00
Jacquerel
4599842d7c Makes Shake() proc work (#73480)
## About The Pull Request

Fixes #72321
Fixes #70388

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

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

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

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

## Why It's Good For The Game

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

## Changelog

🆑
fix: Lobstrosities and Tarantulas will once more vibrate to let you know
they're about to charge at you.
fix: The Savannah Ivanov will once more vibrate to let you know it's
about to jump into the air.
fix: The DNA infuser will now vibrate to let people know that it's busy
blending someone with a dead animal.
/🆑
2023-02-18 14:28:17 -07:00
LemonInTheDark
ab307032ed Nightvision Rework (In the name of color) (#73094)
## About The Pull Request

Relies on #72886 for some render relay expansion I use for light_mask
stuff.

Hello bestie! Night vision pissed me off, so I've come to burn this
place to the ground.
Two sections to discuss here. First we'll talk about see_in_dark and why
I hate it, second we'll discuss the lighting plane and how we brighten
it, plus introducing color to the party.

### `see_in_dark` and why it kinda sucks

https://www.byond.com/docs/ref/#/mob/var/see_in_dark

See in dark lets us control how far away from us a turf can be before we
hide it/its contents if it's dark (not got luminosity set)
We currently set it semi inconsistently to provide nightvision to mobs.

The trouble is stuff that produces light != stuff that sets luminosity.
The worst case of this can be seen by walking out of escape on icebox,
where you'll see this


![image](https://user-images.githubusercontent.com/58055496/215683654-587fb00f-ebb8-4c83-962d-a1b2bf429c4a.png)

Snow draws above the lighting plane, so the snow will intermittently
draw, depending on see_in_dark and the luminosity from tracking lights.
This would in theory be solvable by modifying the area, but the same
problem applies across many things in the codebase.
As things currently stand, to be emissive you NEED to have a light on
your tile. People are bad at this, and honestly it's a bit much to
expect of them. An emissive overlay on a canister shouldn't need an
element or something and a list on turfs to manage it.
This gets worse when you factor in the patterns I'm using to avoid
drawing lights above nothing, which leads to lights that should show,
but are misoffset because their parent pixel offsets.

It's silly. We do it so we can have things like mesons without just
handing out night vision, but even there the effect of just hiding
objects and mobs looks baddddddd when moving. It's always bothered me.
I'll complain about mesons more later, but really just like, they're too
bright as it is.

I'm proposing here that rather then manually hiding stuff based off
distance from the player, we can instead show/hide using just the
lighting plane. This means things like mesons are gonna get dimmer, but
that's fine because they suck.

It does have some side effects, things like view() on mobs won't hide
stuff in darkness, but that's fine because none actually thinks about
view like that, I think.

Oh and I added a case to prevent examining stuff that's in darkness, and
not right next to you when you don't have enough nightvision, to match
the old behavior `see_in_dark` gave us.

Now I'd like to go on a mild tangent about color, please bare with me

### Color and why `lighting_alpha` REALLY sucks

You ever walk around with mesons on when there's a fire going, or an
ethereal or firelocks down.
You notice how there isn't really much color to our lights? Doesn't that
suck?

It's because the way we go about brighting lighting is by making
everything on the lighting plane transparent.
This is fine for brightening things, but it ends up looking kinda crummy
in the end and leads to really washed out colors that should be bright.
Playing engineer or miner gets fucking depressing.

The central idea of this pr, that everything else falls out of, is
instead of making the plane more transparent, we can use color matrixes
to make things AT LEAST x bright.

https://www.byond.com/docs/ref/#/{notes}/color-matrix

Brief recap for color matrixes, fully expanded they're a set of 20
different values in a list
Units generally scale 0-1 as multipliers, though since it's
multiplication in order to make an rgb(1,1,1) pixel fullbright you would
need to use 255s.

A "unit matrix" for color looks like this:
```
list(1, 0, 0, 0,
     0, 1, 0, 0,
     0, 0, 1, 0,
     0, 0, 0, 1,
     0, 0, 0, 0
)
```

The first four rows are how much each r, g, b and a impact r, g, b and
well a.
So a first row of `(1, 0, 0, 0)` means 1 unit of r results in 1 unit of
r. and 0 units of green, blue and alpha, and so on.
A first row of `(0, 1, 0, 0)` would make 1 red component into 1 green
component, and leave red, blue and alpha alone, shifting any red of
whatever it's applied to a green.

Using these we can essentially color transform our world. It's a fun
tool. But there's more.

That last row there doesn't take a variable input like the others.
Instead, it ADDS some fraction of 255 to red, green, blue and alpha.

So a fifth row of `(1, 0, 0, 0)` would make every pixel as red as it
could possibly be.

This is what we're going to exploit here. You see all these values
accept negative multipliers, so we can lower colors down instead of
raising them up!
The key idea is using color matrix filters
https://www.byond.com/docs/ref/#/{notes}/filters/color to chain these
operations together.

Pulling alllll the way back, we want to brighten darkness without
affecting brighter colors.
Lower rgb values are darker, higher ones are brighter. This relationship
isn't really linear because of suffering reasons, but it's good enough
for this.
Let's try chaining some matrixes on the lighting plane, which is bright
where fullbright, and dark where dark.

Take a list like this

```
list(1, 0, 0, 0,
     0, 1, 0, 0,
     0, 0, 1, 0,
     0, 0, 0, 1,
     -0.2, -0.2, -0.2, 0
)
```
That would darken the lighting a bit, but negative values will get
rounded to 0
A subsequent raising by the same amount
```
list(1, 0, 0, 0,
     0, 1, 0, 0,
     0, 0, 1, 0,
     0, 0, 0, 1,
     0.2, 0.2, 0.2, 0
)
```
Will essentially threshold our brightness at that value.
This ensures we aren't washing out colors when we make things brighter,
while leaving higher values unaffected since they basically just had a
constant subtracted and then readded.

### But wait, there's more

You may have noticed, we gain access to individual color components
here.
This means not only can we darken and lighten by thresholds, we can
COLOR those thresholds.
```
list(1, 0, 0, 0,
     0, 1, 0, 0,
     0, 0, 1, 0,
     0, 0, 0, 1,
     0.1, 0.2, 0.1, 0
)
```
Something like the above, if applied with its inverse, would tint the
darkness green.
The delta between the different scalars will determine how vivid the
color is, and the actual value will impact the brightness.

Something that's always bothered me about nightvision is it's just
greyscale for the most part, there isn't any color to it.
There was an old idea of coloring the game plane to match their lenses,
but if you've ever played with the colorblind quirk you know that gets
headachey really fast.
So instead of that, lets color just the darkness that these glasses
produce.
It provides some reminder that you're wearing them, instead of just
being something you forget about while playing, and provides a reason to
use flashlights and such since they can give you a clearer, less tinted
view of things while retaining the ability to look around things.

I've so far applied this pattern to JUST headwear for humans (also those
mining wisps)
I'm planning on furthering it to mobs that use nightvision, but I wanted
to get this up cause I don't wanna pr it the day before the freeze.

Mesons are green, sec night vision is red, thermals orange, etc.

I think the effect this gives is really really nice. 
I've tuned most things to work for the station, though mesons works for
lavaland for obvious reasons.

I've tuned things significantly darker then we have them set currently,
since I really hate flat lighting and this system suffers when
interacting with it.

My goal with these is to give you a rough idea of what's around you,
without a good eye for detail.
That's the difference between say, mesons, and night vision. One helps
you see outlines, the other gives you detail and prevents missing
someone in the darkness.

It's hard to balance this precisely because of different colored
backgrounds (looking at you icebox)
More can be done on this front in future but I'm quite happy with things
as of now

### **EDIT**

I have since expanded to all uses of nightvision, coloring most all of
them.

Along the way I turned some toggleable nightvision into just one level. 
Fullbright sucks, and I'd rather just have one "good" value.

I've kept it for a few cases, mostly eyes you rip out of mobs.
Impacted mobs are nightmares, aliens, zombies, revenants, states and
sort of stands.

I've done a pass on all mobs and items that impact nightvision and added
what I thought was the right level of color to them. This includes stuff
like blobs and shuttle control consoles
As with glasses much of this was around reducing vision, though I kept
it stronger here, since many of these mobs rely on it for engaging with
the game

<details>
<summary>
Technical Changes
</summary>

#### Adds filter proc (the ones that act like templates) support to
filter transitions.
Found this when testing this pr, seemed silly.

#### Makes our emissive mask mask all light instead
This avoids dumbass overlay lighting lighting up wallmounts.
We switch modes if some turfflags are set, to accomplish the same thing
with more overhead, and support showing things through the darkness.

Also fixes a bug where you'd only get one fullscreen object per mob, so
opening and closing a submap would take it away

Also also fixes the lighting backdrop not actually spanning the screen. 
It doesn't actually do anything anymore because of the fullscreen light
we have, but just in case that's unsued.
Needs cleanup in future.

#### Moves openspace to its own plane that doesn't draw, maxing its
color with a sprite

This is to support the above
We relay this plane to lighting mask so openspace can like, have
lighting

#### Changes our definition of nightvision to the light cutoff of night
vision goggles and such
Side affect of removing see_in_dark. This logic is a bit weak atm, needs
some work.

#### Removes the nightvision spell
It's a dupe of the nightvision action button, and newly redundant since
I've removed all uses of it

#### Cleans up existing plane master critical defines, ensures
trasnparent won't render

These sucked
Also transparent stuff should never render, if it does you'll get white
blobs which suck

</details>

## Why It's Good For The Game

Videos! (Github doesn't like using a summary here I'm sorry)
<details>

Demonstration of ghost lighting, and color


https://user-images.githubusercontent.com/58055496/215693983-99e00f9e-7214-4cf4-a76a-6e669a8a1103.mp4

Engi-glass mesons and walking in maint (Potentially overtuned, yellow is
hard)


https://user-images.githubusercontent.com/58055496/215695978-26e7dc45-28aa-4285-ae95-62ea3d79860f.mp4

Diagnostic nightvision goggles and see_in_dark not hiding emissives


https://user-images.githubusercontent.com/58055496/215692233-115b4094-1099-4393-9e94-db2088d834f3.mp4

Sec nightvision (I just think it looks neat)


https://user-images.githubusercontent.com/58055496/215692269-bc08335e-0223-49c3-9faf-d2d7b22fe2d2.mp4

Medical nightvision goggles and other colors


https://user-images.githubusercontent.com/58055496/215692286-0ba3de6a-b1d5-4aed-a6eb-c32794ea45da.mp4

Miner mesons and mobs hiding in lavaland (This is basically the darkest
possible environment)


https://user-images.githubusercontent.com/58055496/215696327-26958b69-0e1c-4412-9298-4e9e68b3df68.mp4

Thermal goggles and coloring displayed mobs


https://user-images.githubusercontent.com/58055496/215692710-d2b101f3-7922-498c-918c-9b528d181430.mp4

</details>

I think it's pretty, and see_in_dark sucks butt.

## 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: The darkness that glasses and hud goggles that impact your
nightvision (think mesons, nightvision goggles, etc) lighten is now
tinted to match the glasses. S pretty IMO, and hopefully it helps with
forgetting you're wearing X.
balance: Nightvision is darker. I think bright looks bad, and things
like mesons do way too much
balance: Mesons (and mobs in general) no longer have a static distance
you can see stuff in the dark. If a tile is lit, you can now see it.
fix: Nightvision no longer dims colored lights, instead simply
thresholding off bits of darkness that are dimmer then some level.
/🆑
2023-02-17 18:10:39 -07:00
Jacquerel
728a0f1b91 Grand Ritual: Alternate Wizard objective (Wizard Events II) (#72918)
Adds an alternate greentext objective for Wizards known as the "Grand
Ritual". This was initially the gimmick of a different wizard-related
antagonist downstream. I didn't get permission to port it, so I'm
attaching it to regular Wizards instead.

Wizards will spawn in with a new Grand Ritual button next to their
antagonist info button. Pressing it will pinpoint them towards their
next Ritual Location (a randomly chosen region of the space station).
Once within that location, pressing it will summon a magic circle and
obliterate any dense objects which are in the way. This also puts the
ability on a two minute cooldown.
Clicking on the magic circle with an empty hand will begin a three-stage
invocation to gather magical power. You can interrupt this invocation at
any time and will resume from the last stage you completed (if you
finished two stages you only need to do one more).
Once you complete a ritual, a random event will be triggered based on
how many rituals you have performed so far. These tend to be ones which
annoy the crew in some manner, and Wizard Events are included in the
list. Additionally, something weird will usually happen to the room you
are in.
Then you are assigned a new location and can toddle off to do it again.

Once you have done this three times, you will be picked up by the
station's sensors every time you start a subsequent ritual and should
expect annoyed company to come investigate.
Once you have done this six times, you can finally spend all of that
accumulated power on the seventh Grand Finale ritual. Completing this
grants you victory at the end of the round and will have a larger,
flashier effect which you can pick from a list of options, think of it
like a wizard equivalent of a Traitor Final Objective or Heretic
Ascension.
After that you can still keep doing rituals if you want to pester the
crew further by summoning more random events, you've already "won" at
this point so now it's your job to make them want to go home.

I think it'd be more fun to just find out what the Finale ritual can do
by seeing it happen but maintainers will probably want a list of its
precise capabilities, so here it is:

Currently completing a ritual also has a chance to create Heretic
Reality Tears (of both varieties, available for Heretics to eat and
visible to crew) as a kind of cross-antagonist interaction which seemed
to make sense to me but if this seems thematically or mechanically
inappropriate it's easy to strip out.
2023-02-12 14:27:05 -06:00
1393F
31220b8e4f Fixes bubbles not doing the stage 1 version of the hallucination charge (#73119)
Bubblegum is once again capable of performing his 5 hallucination,
one real Bubblegum attack.
2023-02-02 16:06:16 -05:00
Fikou
e5de1c8ed5 you can now flip eyepatches + blindfolds mix eye colors (#71932)
## About The Pull Request
you can flip eyepatches using them inhand (or an action button)
white blindfolds now blend your eye colors, like the comment says it
should

## Why It's Good For The Game
not a great eyepatch if it only works for one eye.

## Changelog
🆑
add: you can flip eyepatches
fix: blindfolds now take into consideration both eye's colors for their
color
/🆑

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
2022-12-14 14:18:52 +00:00
LemonInTheDark
e766444468 Changes our map_format to SIDE_MAP (#70162)
## About The Pull Request

This does nothing currently, but will allow me to test for layering
issues on LIVE, rather then in just wallening.
Oh also I'm packaging in a fix to one of my macros that I wrote wrong,
as a joke

[removes SEE_BLACKNESS usage, because we actually cannot use it
effectively](c9a19dd7cc)

[c9a19dd](c9a19dd7cc)

Sidemap removes the ability to control it on a plane, so it basically
just means there's an uncontrollable black slate even if you have other
toggles set.

This just like, removes that, since it's silly

[fixes weird layering on solars and ai portraits. Pixel y was casuing
things to render below who
shouldn't](3885b9d9ed)

[3885b9d](3885b9d9ed)

[Fixes flicker
issues](2defc0ad20)

[2defc0a](2defc0ad20)

Offsetting the vis_contents'd objects down physically, and then up
visually resolves the confliciting that was going on between the text
and its display.

This resolves the existing reported flickering issues

[fixes plated food not appearing in
world](28a34c64f8)

[28a34c6](28a34c64f8)

pixel_y'd vis_contents strikes again. It's a tad hacky but we'll just
use pixel_z for this

[Adds wall and upper wall plane
masters](89fe2b4eb4)

[89fe2b4](89fe2b4eb4)

We use these + the floor and space planes to build a mask of all the
visible turfs.
Then we take that, stick it in a plane master, and mask the emissive
plane with it.

This solves the lighting fulldark screen object getting cut by emissives
Shifts some planes around to match this new layering. Also ensures we
only shift fullscreen objects if they don't object to it.

[compresses plane master
controllers](bd64cc196a)

[bd64cc1](bd64cc196a)

we don't use them for much rn, but we might in future so I'm keeping it
as a convienince thing

🆑
refactor: The logic of how we well, render things has changed. Make an
issue report if anything looks funky, particularly layers. PLEASE USE
YOUR EYES
/🆑

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-12-10 17:30:54 -08:00
MrMelbert
329921639a Rewrites how action buttons icons are generated, makes them layer nicer. Allows observers to see a mob's action buttons. (#71339)
## About The Pull Request

- Rewrites how action button icons are generated.
- Prior, generated an action button icon was fairly simplistic and
didn't allow for many changes. Someone recently added the option for
overlays to be generated over action buttons, but the framework was very
weak.
- Now, action button icon generation is split across multiple procs,
like atom icon updates.
      - The background of action buttons are underlays
- The actual icon of the action button is the icon and icon state of the
action button movable
- The rim / border of the button is an overlay, layered overtop the
button.

- Allows observers to see what action buttons a mob has. They even
update in real time! And no, the observers cannot click on them.

## Why It's Good For The Game

- Runechat text of action buttons are no longer hidden behind the actual
icon. This was very ugly with cooldown actions, as the cooldown text was
hidden behind a lot of spell icons.
- Cuts down on a lot of icon duplication. 
- Gives much finer control over action button icons
- Saves a bit of processing from generating full action button icons
when not necessary. Not implemented in many places, but is in some.


![image](https://user-images.githubusercontent.com/51863163/202816617-342e87e6-2cc6-488e-9af2-4b2053dc3dc6.png)


![image](https://user-images.githubusercontent.com/51863163/202816604-da8d4821-0e2b-45af-b289-7442367f98ce.png)

## Changelog

🆑 Melbert
add: Observers can now see what action buttons an observed mob has. No,
you can't click them. And no it doesn't show EVERY action.
refactor: Refactored how action button icons are generated. Some actions
will now use a colored border when active instead of just turning green.
Cooldown text will also appear on the top layer of actions too. If you
see any funky lookin' icons (namely their borders), let me know.
refactor: Bluespace Golem's teleport action is now a cooldown action.
fix: Construct actions go to the middle of the screen like expected. 
/🆑
2022-12-03 19:01:08 -08:00
Dani Glore
be1edab621 Sign Language Refactor & Bugfixes (#71265)
## About The Pull Request
This PR contains an intermediate refactor and a bug-fix for sign
language, which was originally from the Tongue Tied quirk/tongue. With
helpful advice from @MrMelbert and @LemonInTheDark, I have successfully
decoupled sign language from the tongue and ported it into a highly
modular DCS component, and then added an Action for toggling it. Big
thanks to @Wallemations, the original creator of Tongue Tied, for
creating the new Action sprite and helping me to complete this project!

The new sign language component is added to all new Carbon mobs, and
incrementally overrides several critical functions, variables, and
argument lists relevant to a mob's speech; the component primarily
listens for the addition/removal of trait `TRAIT_SIGN_LANG` in order to
function.

Additionally, fixed a bug in the original implementation of sign
language that caused its say verbs such as "emphatically signs" to stop
working. The bug was caused by an unsafe early removal of exclamation
points from the input string, causing a conflict with the `say_mod` proc
which requires such punctuation points to be present.

Here's a granular list of changes:
- Added a ubiquitous signal to extend the behavior of
`/atom/movable/proc/say_quote`.
- Added a ubiquitous signal to extend the behavior of
`/atom/movable/proc/lang_treat`.
- Fixed a bug in the original implementation of sign language that
caused its `verb_yell` to stop working.
- Refactored sign language into a Carbon-only DCS component.
- Refactored the Tongue Tied tongue to use `TRAIT_SIGN_LANG` and
`TRAIT_MUTE`.
- Removed the Tongue Tied quirk, in favor of two separate quirks.
- Added the Signer quirk for sign language, good, costs 4 points.
- Added the Mute quirk, negative, gives 4 points.
- Added a rare sign language Action granter book to maint and space
loot, "Galactic Standard Sign Language".

## Why It's Good For The Game
This PR tactfully re-implements Tongue Tied, re-introducing it as two
new quirks: For sign language itself, I added the Signer quirk, which is
a good quirk which allows you to use sign language for 4 quirk points. I
also added the Mute quirk, which grants 4 quirk points in exchange for
your audible voice. There is also a marked improvement in the code
health as a result of my changes.

Here's a preview of the sign language Action. If you're also mute, it
becomes invisible to reduce clutter:

![image](https://cdn.discordapp.com/attachments/326831214667235328/1041669853741858816/GIF_11-13-2022.gif)

In regard to how useful sign language is, it can be used as:
1. A way to communicate across a vacuum without a radio.
2. An easy way to communicate with deaf people.
3. An easy way to communicate as a Mute person.

## Changelog

🆑 A.C.M.O.
del: Removed the Tongue Tied quirk. The tongue can still be found and
used in-game.
refactor: Refactored Tongue Tied's tongue to use the Sign Language and
Mute traits.
add: Added Sign Language innate action. Granted by book or quirk.
add: Added the Galactic Common Sign Language book as rare maint and
space loot.
add: Added the Signer quirk, which teaches you sign language in exchange
for 4 quirk points.
add: Added the Mute quirk, which grants you 4 quirk points in exchange
for your voice.
fix: Fixed sign language say_yell verb, which allows you to emphatically
sign.
/🆑

Co-authored-by: Wallem <66052067+Wallemations@users.noreply.github.com>
2022-11-20 06:22:10 +00: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
Jacquerel
140c12b580 Giant Spider action fixes & Action feedback (#70848)
I went into this just planning on fixing some weird behaviour with
spider buttons and ended up touching a lot of files.

Specifically this is because some of the actions used by Giant Spiders
would print feedback messages in IsAvailable, which was bad because this
is called every time the button updates and so would (for example) print
a bunch of messages about eggs existing when you spawned as a
broodmother because the lay eggs button would be checking for that when
it was granted to you.
The feedback _is_ useful though so I've implemented a pattern used in
Spell where we just pass a flag describing whether we want to print it
or not, which is generally set to true in Trigger() or if the player
physically pressed the button.

A side effect of this is that any action with usability flags (such as
"not when handcuffed") will now tell you why it is failing if you click
it while it is unusable, which is nice.

The spider changes are largely to make sure that their buttons are
tinted at the correct time, they were previously tinted red as if
inactive at almost all times due to the icon not being updated when
relevant conditions changed.
This necessitated adding a new signal (two actually) sent when a
do_after begins and when it ends (for any reason, including premature
interruption).

I also fixed a quirk where the Wrap ability had a permanent 'active'
outline after using it once (the icon states were inverted).

I also fixed a bug where you could just lay infinite enriched eggs after
eating one guy, which is not how the game describes it as working.
I looked up the PR adding it
(https://github.com/tgstation/tgstation/pull/54451) and one egg per kill
seems to be how it is supposed to work.

And finally I changed a few nurse spider to_chats into balloon_messages,
on the principle that they're not information which needs to stick
around for more than a few seconds.
2022-11-05 22:09:17 -05:00
Fikou
34739b4565 Ash Drake attacks work again. (#71003)
Ash drakes check if Trigger worked before doing the meteors after a fire breath, or the fire breath and meteors after a swoop. Turns out, Trigger leads to PreActivate, which leads to Activate, which never returns TRUE. So we make it return TRUE for the stuff in the folder.
2022-11-03 10:37:39 -04:00
MrMelbert
704b81fcd8 Fixes cult dagger grant runtime. (#70703)
Fixes cult dagger grant runtime. Owner is not guaranteed to be non-null.
2022-10-22 16:06:46 -04:00
Tim
e710af88f8 Fix item icons for action buttons to be center aligned (#70477) 2022-10-19 00:51:18 -07:00
san7890
2878345ebb Swaps sleep() to use SECONDS define, changes some sleep(1) to sleep(1 TICKS) (#70452) 2022-10-18 21:25:23 -07:00
Zonespace
7394fd5512 Fixes charging destroying things they shouldn't (#70044) 2022-09-21 10:49:46 -07:00
ShizCalev
db9a24e0f9 Fixes a bunch of cult abilities not working (#70036) 2022-09-21 10:16:30 -07:00
Marina
fcaa0b24db Alphabetized, fixed spelling error, clarifying event descriptions. Polish (#69707)
About The Pull Request

Alphabetized several long lists of strings so its easier for us to look through them, just code polish, nothing the players would see.

Fixed some minor spelling errors as well.

Clarified door bolt state to be less ambiguous in the door wiring gui.
Originally it would say the door bolts have fallen, and the door bolts "Look up". i dont know about you but that was very not clear for me to read. Like where are the bolts? In the door or the frame? Arnt there bolts on top and bottom? Just didn't make sense to me.

Now it says "Have engaged!" & "Have disengaged"
hopefully that makes the state clearer at a glance.

I also added a small handful of funny texts to some string files. See changelog
Why It's Good For The Game

Well, who doesn't like a bit of polish? Just makes the game a little easier for people.
Also funny text funny text.
Changelog

spelling: improves spelling and adds more flavortext
2022-09-11 21:51:01 +12:00
skylord-a52
be0e6efdf6 [IDB IGNORE] [MDB IGNORE] Makes the icons/mob folder sane (#69302)
About The Pull Request

Reorganizes the entire icons/mob folder.

Added the following new subfolders:

    nonhuman-player (this was initially just called "antag", but then I realized guardians aren't technically antags)
    simplemob
    silicon
    effects (for bloodstains, fire, etc)
    simplemob/held-pets (for exactly that -- I wasn't sure if this should go in inhands instead)
    species/monkey

Moves the following stuff:

    All human parts moved into species, with moth, lizard, monkey, etc parts moved to corresponding subfolders. Previously, there were some moth parts in mob/species/moth, and others just loose in mob. Other species were similar.
    icemoon, lavaland, and jungle folders made into subfolders of simplemob
    All AI and silicon stuff, as well as Beepsky et al. into the silicon folder, simplemobs into the simplemob folder, aliens into the nonhuman-player folder, etc.
    Split up animal_parts.dmi into two bodyparts.dmi which were put in their respective folders (species/alien and species/monkey)

Code changes:

    Filepath changes to account for all of this
    Adds a check when performing surgery on monkeys and xenos, because we can no longer assume their limbs are in the same file
    Turns some hardcoded statues and showcases that were built into maps into objects instead

Things I'd like to do in the future but cant be assed right now:

    Remove primarily-antag sprites from simplemob/mob.dmi (Revenant, Morph, etc.) and put them in the nonhuman-player folder
    Split up mutant_bodyparts.dmi into different files for Tizirans, Felinids, monkeys, etc and put them in their own folders. Those may have once been meant primarily for mutated humans but that's now how they're being used right now.
2022-09-03 11:52:54 -07:00
ShizCalev
96430cde39 Fixes some missing signal overrides (#69419) 2022-09-02 10:03:38 +12:00
tattle
d91390a447 [IDB IGNORE] The Great Sweep: Moving dmis into subfolders (part 1) (#69416)
Moves singulo and supermatter dmis into obj/engine, renamed from obj/tesla_engine
Moves Halloween, Christmas, and misc holiday items to obj/holiday
Moves lollipops to obj/food
Moves crates, closets, and storage to obj/storage
Moves assemblies to obj/assemblies
Renames decals.dmi to signs.dmi ...because they're signs and not decals
Moves statues, cutouts, instruments, art supplies, and crayons to obj/art
Moves balloons, plushes, toys, cards, dice, the hourglass, and TCG to obj/toys
Moves guns, swords, shields to obj/weapons
2022-08-24 20:49:35 -03:00
Seth Scherer
f1a363c825 Converts a shitload of istypes to their more concise macros (#69260)
* Converts a lot of istypes() to use their istype macro helpers.
2022-08-18 22:08:44 -04:00
tralezab
4e97d03657 Bileworm post-merge feedback and qol (#69007)
* Bileworm now has a deathsound, and deathsounds now properly play on simplemobs.
* AI-controlled Bileworms now have night vision abilities
2022-08-08 17:40:46 -04:00
tralezab
0728fb3840 New Lavaland Monster: Bileworms (#68967)
Bileworms are a new lavaland monster, that has unique AI that should prove them.

Instead of moving normally, it periodically burrows underground and resurfaces nearby.
Its attack is an AOE acid spit.
2022-08-05 11:07:34 +02:00
MrMelbert
c9e16c44bf Fixes some alien actions not working. (#68625)
* Fixes alien actions bricking due to cooldowns.
- Sanity checking for availaibility failed due to being "on cooldown".
2022-07-27 15:09:27 -04:00
13spacemen
8e4327b290 Removes Internals HUD element (#68523) 2022-07-21 17:05:17 -07:00
Whoneedspacee
b92823ee46 Mob Ability Sequences Again Again (I swear this time) (#68382)
Adds the option for cooldown action sequences which has a list of sequence actions, the owner of the sequence doesn't have direct control over any of the actions in the sequence but is still considered the owner of the sequence actions, the main ability simply handles calling whatever those sub actions should do.

Adds melee cooldown times to cooldown actions.

Cooldown actions now use bitflags so an ability can share its cooldown to multiple other types of abilities

Cooldown times are now handled by the base activate proc, cleaning up copy paste of StartCooldown()

Reworks the admin verb for adding cooldown abilities to where it has significantly more customization (and tells you to mark the mob you want to modify instead of just doing nothing) and also allows for creation of the new sequences, allowing entirely new and unseen abilities to be formed out of existing ones. Also adds a verb for removal of mob abilities.
2022-07-19 18:08:05 -05:00
MrMelbert
cdc50e27eb Fixes some cases which references are used in trait sources, potentially causing hard deletes (#67974)
About The Pull Request

Fixes some cases in which actual references were used in trait sources instead of keys (or ref() keys).

This can cause some rare and difficult to find hard deletes.

Trait sources should be a string key relating to the source of it, not an actual reference to what added it. References within trait sources are never handled in Destroy(), because it's not expected behavior, meaning it can cause hanging references.

So, I went through with a regex to find some cases and replaced them.
I used the following and just picked through the few by hand to find erroneous ones.
ADD_TRAIT\(.+, .+, [a-z]+\)
REMOVE_TRAIT_TRAIT\(.+, .+, [a-z]+\)
Why It's Good For The Game

Less hard deletes, probably.
Changelog

cl Melbert
code: Some traits which mistakenly were sourced from a hard reference are no longer.
/cl
2022-07-04 12:02:17 +12: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
SmArtKar
5cef111088 Titan's Final Lament - Colossus and hierophant crusher trophy rework (#66793)
This is somewhat a port of BeeStation/BeeStation-Hornet#6805 with slight changes, credits to Rukofamicom for the original PR.

Kinetic crusher is supposed to be a high risk high reward weapon, but with current hiero wall trophy it just ends up with the player cheesing mob and boss AIs. To fix this, here we change hiero trophy to spawn a hierophant chaser instead of a wall, which will increase player's DPS without offering them any protection.

However, this creates another issue: right now colossus is unbeatable with crusher without cheesing it with the wall due to it's shotgun attack which kills and dusts you point blank or 1 tile away, which is extremely unfair and unfun. To fix this, I add what should've been done from the start - make colossus telegraph it's attacks before starting them. Player has 1.5 seconds to react(unlike 3 seconds in the original PR which made the fight much easier) and dodge the attack or at least get away from the colossus to have a chance to survive.

Since this does make the fight significantly easier, colossus gets a special final attack during which it shouts "Perish" and uses different attacks. Unlike in the original PR, he can only use it once, so it's not as deadly and bullshit. This should make the fight more epic and similar to other bossfights which get cool attacks near the end of the battle.

Goodbye 4 GBP, you served me well.
2022-05-09 09:47:31 -07:00
FinancialGoose
b867921f89 Bubblegum charge fix (#66373)
* test

* test

* Revert "Hypernob trit consumption will now be reduced with Bz"

* Fixes bubblegum charge
2022-04-24 23:45:47 +08:00
LemonInTheDark
0e904f7032 [MDB IGNORE] Moves non floor turfs off /floor. You can put lattices on lavaland edition (#65504)
About The Pull Request

Alternative to #65354

Ok so like, there was a lot of not floor types on /floor. They didn't actually want any of their parent type's functionality, except maybe reacting to breaking (which was easy to move down) and some other minor stuff.
Part of what we don't want them to have is "plateable" logic.
I should not be able to put floor tiles on the snow and be fine. It's dumb.

Instead, I've moved all non floor types down to a new type, called /misc.

It holds very little logic. Mostly allowing pipes and wires and preventing blob stuff.
It also supports lattice based construction, which is one of the major changes here. I think it makes more sense, and it fixes an assumption in shuttle code that assumed you couldn't place "a new tile" by just hitting some snow with a floor tile.
Oh and lattices don't smooth with asteroid tiles anymore, this looks nicer I think.

Moving on to commits, and minor changes

Changes clf3 to try and burn any turfs it's exposed to, instead of just floors
Moves break_tile down to the turf definition, alongside burn_tile
If you're in basic buildmode and click on anything that's not handled in a targeted way, you just build plating
FUNCTION CHANGE: you can't use cult pylons to convert misc tiles over anymore
Generalizes building floors on top of something into two helper procs on /turf/open, reducing copypasta
Adds a new turf flag, IS_SOLID, that describes if a turf is tangible or not.
Uses this alongside a carpet and open check to replace plating and floor checks in carpet code. This does mean that non iron tiles can be carpeted, but I think that's fine

Moves the /floor update_icon -> update_visuals call to /open
This change is horrificly old, dating back to 8e112f6 but that commit describes nothing about why it was done. Choosing to believe it was a newfriend mistake. Uncomfortable nuking it though, because of just how old it is. Moving down instead

Create a buildable "misc" type off open, moves /dirt onto it
Basically, we want a type we can use to make something support
construction, since that can be a messy bit of logic. Also enough
structure to set things up sanely.

I'm planning on moving most misc turfs onto it, if only because
constructing on a dirt tile with rods should be possible, and the same
applies to most things

Murders captain planet, disentangles /turf/open/floor/grass/snow/basalt

Adds a diggable component that applies the behavior of "digging"
something out from a turf.

Uses it to free the above pain typepath into something a bit more
sensible

The typepaths that aren't actually used by floor tiles are moved onto
/misc

The others are given names that better describe them, and kept in
fancy_floor

Oh and snowshoes don't work on basalt anymore, sorry

Snowed over platings now actually have broken/burned icon states, fixing black holes to nowhere

Misc turfs no longer smooth as floors, so lattices will ignore them

Placing a lattice will no longer scrape the tile it's on

Ok this is a really old one.
I believe this logic is a holdover from kor's baseturf pr
(97990c9)
It used to be that turfs didn't have a concept of "beneath" and instead
just decided what should be under them by induction. This logic of "if
it's being latticed scapeaway to space" made sense then, but has since
been somewhat distorted

We do want to scape away on lattice spawn sometimes, mostly when we're
being destroyed, but not always. We especially don't want to scape away
if someone is just placing a rod, that's dumb.

Adds a path updating script for this change

I've done my best to find all the errors this repathing will pull out, but I may have missed some. I'm sorry.
Why It's Good For The Game

Very old code made better, more consistent turfs for lavaland and icebox, better visuals, minor fix to snowed plating, demon banishment in lattice placement, fixes the icebox mining shuttle not being repairable
Changelog

cl
add: Rather then being tileable with just floor tiles, lavaland turfs, asteroid and snow (among other things) now support lattice -> floor tile construction
fix: Because of the above, you can now properly fix the icebox mining shuttle
refactor: Non floor turfs are no longer typed as floor. This may break things, please yell at me if it does
/cl
2022-03-16 15:55:56 +13:00
DTraitor
350108c1a7 Fixes possible charge issues in the future (#65309)
Replaced if(!parameter) checks with if(!isnull(parameter)). Right now you can't set destroy_objects to FALSE using the destroy argument in New() because the game will think value wasn't changed.
Fixed actively_moving being TRUE after first charge.

This PR will prevent tarantulas and other mobs that can charge from moving and destroying stuff during charge delay.
Also this PR will let us avoid problems in the future if someone decides to override destroy_objects in New()
2022-03-10 20:56:18 +00:00
Fikou
12245dd626 lobstrosities charge now (#65201)
lobstrosities didnt have ranged = TRUE, so they never ran OpenFire, never charging at people
also fixes their charges having less delay than they should, being pretty much instant, now brings it up to what it originally was
2022-02-28 17:17:01 -08:00
Ghom
c5d2b2e51e Fixes layering issues brought by the FoV PR. (#63903)
* Fixed most (not all) incorrect planes and layers detected by the unit test.
2022-02-09 19:40:00 +01:00