Commit Graph

28 Commits

Author SHA1 Message Date
SkyratBot
8fd896e1ca [MIRROR] Fixes projectiles facing north if ricocheting, deflected or homing (#29057)
* Fixes projectiles facing north if ricocheting, deflected or homing (#85216)

## About The Pull Request
It **turns** out that `TurnTo` doesn't re**turn** `Turn`, but the angle
(number, not matrix) it's **turn**ed to (used nowhere in the code), and
`transform` is built-in variable that default to an identity matrix if
set to an invalid value (anything but another matrix)

The only thing keeping the projectiles facing the right direction when
fired up to one of the aforementioned situations was another `Turn` call
(not `turnTo`) called on `projectile/fire`, which I apparently didn't
fully grasp the redundancy of (if there were no such issue to begin
with) at the time.

This PR also cleans up and rearranges the related code a little,
including a fallback that was never reached because the projectile
`Angle` variable is never null (unless something theorically fucky wucky
happens with projectile code but that'd be an even bigger issue).

## Why It's Good For The Game
Fixing an old issue caused by the author of this PR in #80599, me.

## Changelog

🆑
fix: Fixes projectiles facing north if ricocheting, deflected or homing
/🆑

* Fixes projectiles facing north if ricocheting, deflected or homing

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2024-07-26 21:03:10 +05:30
Useroth
7bb2f5055e [MIRROR] 81182 81367 81399 (#26492)
* Implements rgb2num, uses it to replace all our manual rgb reading. Redoes HSV management (#81182)

[Converts all manual extraction of rbg with rgb2num. It's just
better](ae798eabd5)

[Yanks out old HSV management, replaces it with list
stuff](4997e86051)

There's this old lummy era clunky code that passed HSV as text

We can now cleanly replace it with passing hsv as lists from a rgb2hsv
proc

So let's just do that.

Also, cleans up spraytan code (and ethereal lighting)

Code better

* Refactors fire overlays once again to make it not get stuck so often (#81367)

Maybe finally fixes #77701

A big reason why this kept happening is because fire uses standing
overlays. But fire isn't managed by mobs anymore. Meaning in some
situations, fire can cease to exist but the overlay can still be on the
mob. So it gets stuck.

So like, why use standing overlays anymore? We can just hook
`update_overlays` signal.
Isn't that neat.

🆑 Melbert
refactor: Fire effects get added to mobs in a different way now. Maybe
it will get stuck less. Report any oddities.
/🆑

* Fix Flaky Failure From Fire  (#81399)

## About The Pull Request

Closes #81396 , Closes #81391 , Closes #81403, Closes #81402

I don't know why but I thought this proc was only called once, when the
mob entered the turf. That was silly.

And going back at it, I'm not entirely sure why I tied
`TRAIT_NO_EXTINGUISH` to the element anyways, rather than the lava like
it originally was.

While going back over this, I cleaned up the proc a bit. 

## Changelog

Not necessary

* There we go?

* Bruh moment

---------

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-02-12 19:03:58 -05:00
SkyratBot
0f1761fa40 [MIRROR] Color matrix defines for filters and identity [MDB IGNORE] (#25823)
* Color matrix defines for filters and identity (#80320)

This PR converts the procs `color_matrix_identity`,
`color_matrix_lightness` and `color_matrix_contrast` into
defines/macros. Also adds in defines for common color matrix filters.

I don't like how `color_matrix_identity` is a one-line proc with no arg.
Also these help people identify the sort of color matrix filter is being
used.

* Color matrix defines for filters and identity

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-12-24 20:58:26 +00:00
SkyratBot
fac322455a [MIRROR] Adds a unit test for client colours. [MDB IGNORE] (#23038)
* Adds a unit test for client colours. (#77484)

## About The Pull Request
I'm adding a unit test for the sanity of client colours, ancient datums
which I had refactored a long time ago. This also affects the
`color_to_full_rgba_matrix()` proc, which I had also worked on.

## Why It's Good For The Game
Ever since that aforementioned years old refactor, there have always
been a few issues with client colours.
The most annoying one being the monochromacy client color lingering even
after the blindness status effect is ok.
It's unlikely this will fix that. However, this should clear a few other
runtimes with the feature.

## Changelog
N/A.

* Adds a unit test for client colours.

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2023-08-12 10:15:53 -04:00
SkyratBot
5230b612b6 [MIRROR] Adds an element to water turfs that makes things... look like they're actually immersed in water. [MDB IGNORE] (#22623)
* Adds an element to water turfs that makes things... look like they're actually immersed in water.

* Update init_signals.dm

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
2023-07-24 00:28:58 -04:00
SkyratBot
fcacebfe38 [MIRROR] Adds Roach Infusion to the DNA infuser [MDB IGNORE] (#22190)
* Adds Roach Infusion to the DNA infuser

* Icons

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Giz <vinylspiders@gmail.com>
2023-07-14 23:11:18 -04:00
SkyratBot
c5ca08fd01 [MIRROR] Adds spaces around logical operators [MDB IGNORE] (#18776)
* Adds spaces around logical operators

* Update code/modules/admin/verbs/admingame.dm

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
2023-01-21 22:16:43 -08:00
SkyratBot
b540761c23 [MIRROR] New solar panel and tracker sprites [MDB IGNORE] (#11875)
* New solar panel and tracker sprites (#65167)

* New solar panel and tracker sprites

Co-authored-by: Tastyfish <crazychris32@gmail.com>
2022-03-04 11:03:29 -05:00
SkyratBot
ec6ddbe758 [MIRROR] Remove code/__DEFINES/misc.dm [MDB IGNORE] (#10945)
* Remove code/__DEFINES/misc.dm

* agagagagagaga

Co-authored-by: Tim <timothymtorres@gmail.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
2022-01-27 02:40:25 +00:00
SkyratBot
0d5a5ec91c [MIRROR] [Ready] Makes the admin-only high frequency blade !FUN! and adds it to the spellbook [MDB IGNORE] (#10550)
* [Ready] Makes the admin-only high frequency blade !FUN! and adds it to the spellbook (#63861)

* makes the vibro sword fun

* AND IT WILL COME LIKE A FLOOD OF PAIN

* POURING DOWN ON ME

* AND IT WILL NOT LET UP

* UNTIL THE END IS HERE

* AND IT WILL COME THROUGH THE DARKEST DAY

* IN MY FINAL HOUR

* AND IT WILL NEVER REST UNTIL THE CLOUDS ARE CLEAR

* only love is with us now

* something warm and pure

* find the peace within ourselves

* no need for a cure

* MAKING WHOLE THE FABRIC OF SOCIETY

* COLLECTIVE CONSCIOUSNESS CONTROLLED AS YOU WILL SEE

* MIND CONTROL

* WOOOOOOOOOOOOOOOOOOOO

* YEAAAAAAAH

Co-authored-by: Urumasi <Urumasi@ email.cz>

* decompose that matrix bitch ass

* sord

* you will die

Co-authored-by: Urumasi <Urumasi@ email.cz>

* [Ready] Makes the admin-only high frequency blade !FUN! and adds it to the spellbook

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: Urumasi <Urumasi@ email.cz>
2022-01-10 12:10:40 -05:00
SkyratBot
c487c73f39 [MIRROR] Grep for space indentation (#1969)
* Grep for space indentation

* aa

* Update species.dm

* Update species.dm

* Update maps.dm

* Update examine.dm

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-12-01 12:26:41 +01:00
SkyratBot
0d18113bc3 [MIRROR] datum/client_colour refactor. (#1550)
* datum/client_colour refactor. (#54741)

* datum/client_colour refactor.

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2020-11-02 22:12:28 +00:00
SkyratBot
d30384f831 [MIRROR] Makes cameras process transforms instead of reading mob angles (#1138)
* Merge pull request #53976 from nicbn/something-refactor

Makes cameras process transforms instead of reading mob angles

* Makes cameras process transforms instead of reading mob angles

Co-authored-by: nemvar <47324920+nemvar@users.noreply.github.com>
2020-10-03 18:20:44 +02:00
jdawg1290
62676e72a8 Force LF line endings with gitattributes and convert repo (#52266)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-07-16 03:02:40 +03:00
spookydonut
4e8ff18b07 Fix Travis grep script to use PCRE to actually match things (#47065)
Several of the greps were missing the `-P` switch which caused them to 
fail to match things. The EOL grep also wasn't working right so I 
replaced it with the one I added to TGMC.
2019-10-19 10:21:05 -07:00
AnturK
85871da5c9 Fixes ghost seizures. 2019-06-10 11:19:47 +02:00
AnturK
e0824114db Adds hourglass (#44384)
* Adds hourglass

* Proper icon and animation.

* Makes throwing not break animate.

* Adds hourglass to library game vendor.
2019-06-10 10:31:24 +12:00
Robustin
4a4c2a498c Big finalized update 2017-04-30 16:30:35 -04:00
Robustin
06c3116c2d Still debugging 2017-04-28 19:41:57 -04:00
Remie Richards
9dc819f151 Skewium: It'll fuck you up. (#23742)
* Skewium: It'll fuck you up.
Adds some matrix helpers for dealing with skews
Adds Skewium, it's like rotatium, but for skews instead of rotation, it's horrible

* switches back to boxstation from runtimestation
2017-02-07 16:36:07 -06:00
MrPerson
3bd240663c Improved color matrix helpers
Better comments explaining the purpose of everything
Better name scheme: color_matrix_foo() instead of just color_foo()
Contrast was completely wrong. Total derpage, formula is now right
A few examples of interesting and useful matrices. And by "a few" I mean 3, but whatever
Addition and multiplication
Single-axis rotations
color_matrix2color_hex and color_hex2color_matrix in case anybody wants to convert back and forth for whatever reason
All values within the matrix are rounded to the thousandths place to cut down on floating point error and 1.000000001 type values
2016-09-15 03:38:51 -07:00
MrPerson
3ec39d369b Some basic color matrix helpers
Contrast, saturation, brightness, and rotation. Still need to do multiplication, addition, and negation, but this is a start.

Here's the testing snippet I used to play around with these: http://pastebin.com/BgBtmhMN
2016-01-24 23:27:45 -06:00
Remie Richards
673afecc8e get_turf_pixel() is now more accurate:
* returns a turf closer to the center in even multiples of world.icon_size (64,128, etc.)
* Handles irregular (non-world.icon_size sized objects) better
* Now handles Matrix X/Y shifts
2015-12-18 20:41:26 +00:00
Remie Richards
163c84344b Orbit improvements:
* Orbit is now less reliant on Animate(), for most ghosts this means 36 calls to Animate, vs the previous INFINITE, for those of you with potato computers, this should ease the pain and crashing.
* Orbits can now be something different to circles!
* Ghosts Byond Members can now choose between orbits! (Circle, Triangle, Square, Hexagon)
2015-12-18 16:12:42 +00:00
Cheridan
43f9e78493 Casing rotation
Spent casings ejected from firearms will spin as they 'tumble' towards the ground.
Improved sprites for shotgun shells
Improved sprite for bullet projectile.
2014-06-07 01:23:49 -05:00
Cheridan
2d547d4d82 Refactors space dust
Meteors spin

renames meateors
2014-04-23 15:01:19 -05:00
Mloc-Hibernia
8af8a43d6f Initial pass to convert LF to CRLF
Signed-off-by: Mloc-Hibernia <colmohici@gmail.com>
2014-03-24 08:53:40 +00:00
MrPerson
0483800e24 update_icons() uses animate() and transforms to actually turn the sprite rather than needing them pre-turned. Mobs that lie down do so with an animation rather than appearing on their side. You can lie down facing THE LEFT OH SHIT.
Cloakers still don't work well. The fix is probably just finding a proc that runs on equip/uequip/when bagged/when dropped. Fuck that. Ninjas work. Things that are cloaked fade to the cloaked alpha, it's pretty cool.

The "lying down" icon_states for everything you could equip are all now unnecessary. They aren't removed yet though.

The dmi changes are to make xenos all face upward so when they turn, they're lying down rather than facing south and looking like they're doing a handstand. They're not terribly good when facing the wrong way. I expect WJohnson to have a fix for this by New Year's.

Comments aren't changed. The overlays_standing list is still around because overlays is not a normal list, and BYOND's normal list functions are worth the extra cost of keeping a spare list of images.
2013-12-23 02:19:15 -08:00