Commit Graph

126 Commits

Author SHA1 Message Date
grungussuss
58501dce77 Reorganizes the sound folder (#86726)
## About The Pull Request

<details>

- renamed ai folder to announcer

-- announcer --
- moved vox_fem to announcer
- moved approachingTG to announcer

- separated the ambience folder into ambience and instrumental
-- ambience --

- created holy folder moved all related sounds there
- created engineering folder and moved all related sounds there
- created security folder and moved ambidet there
- created general folder and moved ambigen there
- created icemoon folder and moved all icebox-related ambience there
- created medical folder and moved all medbay-related ambi there
- created ruin folder and moves all ruins ambi there
- created beach folder and moved seag and shore there
- created lavaland folder and moved related ambi there
- created aurora_caelus folder and placed its ambi there
- created misc folder and moved the rest of the files that don't have a
specific category into it

-- instrumental --

- moved traitor folder here
- created lobby_music folder and placed our songs there (title0 not used
anywhere? - server-side modification?)

-- items --

- moved secdeath to hailer
- moved surgery to handling

-- effects --

- moved chemistry into effects
- moved hallucinations into effects
- moved health into effects
- moved magic into effects

-- vehicles --

- moved mecha into vehicles


created mobs folder

-- mobs --

- moved creatures folder into mobs
- moved voice into mobs

renamed creatures to non-humanoids
renamed voice to humanoids

-- non-humanoids--

created cyborg folder
created hiss folder
moved harmalarm.ogg to cyborg

-- humanoids --




-- misc --

moved ghostwhisper to misc
moved insane_low_laugh to misc

I give up trying to document this.

</details>

- [X] ambience
- [x] announcer
- [x] effects
- [X] instrumental
- [x] items
- [x] machines
- [x] misc 
- [X] mobs
- [X] runtime
- [X] vehicles

- [ ] attributions

## Why It's Good For The Game

This folder is so disorganized that it's vomit inducing, will make it
easier to find and add new sounds, providng a minor structure to the
sound folder.

## Changelog
🆑 grungussuss
refactor: the sound folder in the source code has been reorganized,
please report any oddities with sounds playing or not playing
server: lobby music has been repathed to sound/music/lobby_music
/🆑
2024-09-23 22:24:50 -07:00
klorpa
69176298ed Spelling Fixes (#86056)
## About The Pull Request
Fixes several errors to spelling, grammar, and punctuation.
## Why It's Good For The Game
Improves readability and user experience.
## Changelog
🆑
spellcheck: fixed a few typos
/🆑
2024-09-10 17:04:59 +02:00
Jeremiah
9723b4b317 Replaces even more deciseconds with SECONDS (#82438)
## About The Pull Request
Using these search regexes:

Ending in 0:
`addtimer\((.*),\s?(\d{1,3})0\b\)`
replacement:
`addtimer($1, $2 SECONDS)`

Two digit ending in odd:
`addtimer\((.*), (\d)([1-9])\)$`
replacement:
`addtimer($1, $2.$3 SECONDS)`

Single digit ending odd:
`addtimer\((.*), ([1-9])\)$`
replacement:
`addtimer($1, 0.$2 SECONDS)`

## Why It's Good For The Game
Code readability

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2024-04-06 15:18:49 -06:00
Higgin
c071a61781 Changes flash Paralyze to Knockdown (#81676)
## About The Pull Request
picking up the dropped rifles of #78515 and #81618 and making only one
small, measurable change that should test the general principles while
making life better if they're proven true:

does what it says on the tin: makes flashes Knockdown rather than
Paralyze

this will be successful if people report more close fights where flashes
were involved and feel better about playing on both sides of
flashing/getting flashed

## Why It's Good For The Game

hardstun rocket-tag combat bad. opportunities for counterplay and combos
good.

Paralyzes
- basically prevent you from doing anything. anything.

Knockdowns
- let you try to deploy your flash protection before the follow-up if
the opponent's just trying to use the flash
- let you try to crawl, juke, and make your opponent's life a little
less simple
- give you an actual choice: do I try to scream HELP immediately after
the flash before I get taken out, or try to use an item, swing back, or
wriggle out?
- still disarm you if you're standing which is pretty cool I think
- still let you stamcrit some goofball crawling at you even if they keep
crawling


doesn't change how mounted flashes or portable flashers work. still 10
and 8s Paralyzes respectively.

not a moth buff because they still can't wear sunglasses to no-sell the
flash entirely ha ha goofy bug

## Changelog

🆑
balance: personal flashes now Knockdown rather than Paralyze direct
targets.
/🆑
2024-03-06 02:58:48 -06:00
LemonInTheDark
70651816c2 Fixes complex lights not handling moving well, renames lighting defines (#81423)
## About The Pull Request

[Fixes static lights not
moving](ffef43c05a)

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

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

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

## Why It's Good For The Game

Closes #80005
Hopefully improves understanding of lighting at a glance
## Changelog
🆑
fix: Fixes fancy lights not updating their source location when picked
up and moved
/🆑
2024-02-12 20:50:20 +01:00
YesterdaysPromise
71a1fee2f1 Explodes device.dmi (#80025)
## About The Pull Request

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


## Why It's Good For The Game

The device.dmi was kind of a mess.

## Changelog

🆑
/🆑
2023-12-09 13:31:50 +01:00
san7890
c52d688352 Retools IS_SPINNING_1 into a trait (#80060)
## About The Pull Request

This did NOT need to be on the `/atom` level `flags_1`- when on earth is
an area going to spin? Anyways, this was really only ever used on the
`/mob` sublevel in `spin()` code, but I think this would work far better
as a trait for source-management than moving it to a mob flag or
something. So, let's do that.
## Why It's Good For The Game

Frees up a slot on `flags_1`, which is neat, as well as makes the
framework for managing "things that make you spin" potentially better
for future expansion. It also properly scopes something that only works
for mobs right now to mobs (kinda), so it's a bit better that way too.
## Changelog
Nothing that concerns players.
2023-12-02 21:42:16 -05:00
Kubisopplay
b3ac4e1c7d A small pile of borg combat changes (#75819)
## About The Pull Request
This PR rebalances borg combat. It is first part of broader set of
changes that I talked about with armhullen, which was then discussed in
discord player project channel. Ultimately arm decided to rewrite the
complete rebalance and grab combat, but to help with testing, and to
measure reaction to that changes, I wrote this much smaller change, that
should be usable as a TMd test.
Main points that changed:

- Flashing cyborgs for the first time blinds them, and scrambles their
movement. Flashing them while they are blinded immobilizes them as it
used to, but still allows them to talk, and use radio.
- Emping cyborgs still turns them completely off, but the code behind is
_slightly_ changed, because of how utterly incomprehensible cyborg code
is
- Borg stunarm deals 60 stamina damage, costs 200 energy (SUBJECT TO
CHANGE AS SOON AS I DECIDE ON HOW TO), and applies confusion,
stuttering, and jittering.
- Robot consoles used by humans can now lock down only one borg at a
time, they exhibit increased power draw while doing so. The borg is also
informed of the location of the console. If left alone, the borg will
unlock itself in 10 minutes, to avoid leaving it permanently locked down
in some faraway place. If the console gets destroyed (or depowered), the
borg will get unlocked
- laser pointer only blinds borgs, without the paralyze component. If
you flash a borg blinded this way it will paralyze it, so comboing it is
possible.
- Throwing things at borgs slows them down 


Not planned, but possible if testing shows its required:
- Changing borg health to malfunctions
- Whatever people convince me to add
- Portable lockdown solution for sec, or a way for them to do basic
check on borg.
- Usage of bucket/something else to restrict radio usage of cyborg

If you have ideas what would make this change better please use [discord
channel](https://discord.com/channels/326822144233439242/1113145741788065924),
or comments. Almost everything that I wrote here is subject to change,
as requested or suggested.

### DISCLAIMER
I had to change few functions in background of how borgs work. This WILL
have changes I couldn't predict, since some of them aren't linked in any
obvious way in code. I am aware of that, and will try fixing what needs
fixing when pointed out.
PS: Borg code is a nightmare

## Why It's Good For The Game
Borg combat sucks. It is absolutely binary, there is 0 capacity for
talking, because both sides fear losing in one click. Sec can't really
feasibly ask the borg to state laws while flashed, so their only
solution is to kill it and revive it.

- Turning most instastun solutions into less lethal versions should
lessen the pressure, since it reduces the chance that person that reacts
first survives.
- It causes minor reduction in traitor's capacity to emag borgs with
only a flash, but EMPs still hardstun, and they are plentiful both in
uplink, and in ghetto form, so that shouldn't be a problem.
- Since it allows borgs to scream for help while being flashed, it also
increases the potential of AI helping it, or at least noticing its
death.
- Lockdown console changes reduce its capability in completely turning
off malf ai, and leave it still highly capable of being an useful tool
in stopping emagged cyborgs.


## Changelog
🆑
balance: Flashing borgs requires two consecutive flashes to fully
immobilize
balance: Flashed borgs can speak
balance: Remote lockdown on cyborgs lasts 180 seconds
balance: Cyborg stun arm works like normal baton, and costs less energy
/🆑

---------

Co-authored-by: ATH1909 <42606352+ATH1909@users.noreply.github.com>
Co-authored-by: Jacquerel <hnevard@gmail.com>
2023-07-26 22:09:19 +01:00
ArcaneMusic
f2fd69a49a Minerals have been refactored so costs and minerals in items are now in terms of mineral defines. (#75052)
Ladies, Gentlemen, Gamers. You're probably wondering why I've called you
all here (through the automatic reviewer request system). So, mineral
balance! Mineral balance is less a balance and more of a nervous white
dude juggling spinning plates on a high-wire on his first day. The fact
it hasn't failed after going on this long is a miracle in and of itself.

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

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

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

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

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

Except for foam darts.

I did round up foam darts.

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

Items individual numbers have not been adjusted yet, but we can
standardize how the conversation can be held and actually GET SOMEWHERE
on material balance as opposed to throwing our hands up or ignoring it
for another 10 years.
2023-05-03 14:44:51 +00:00
MrMelbert
b74311bc60 AOE flash fix (#74556)
## About The Pull Request

Fixes head revolutionaries being able to convert with the AOE mode

Why did AOE flash even have a targeted arg? Dumb

## Changelog

🆑 Melbert
fix: Head revs can no longer convert with the AOE flash mode
/🆑
2023-04-07 12:44:04 -07:00
MrMelbert
00f8bcfe75 Moves revolution code of out of flash code, fixes April Fool conversion forcesay never working in any cirumstances (#74411)
## About The Pull Request

- Signallizes head revolutionary flash conversion code, moving it out of
core flash code.
- Removes "tacticool" flashing from head revs, but they can still
convert from any direction
 
- Fixes April Fools "You son of a bitch! I'm in" force say never
working.
   - Revs are muted on conversion so they couldn't talk.
       - Fixed by only muting revs on non-holidays
   - Cultists are unconscious on conversion so they couldn't talk
       - Fixed by only unconscious-ing cultists on non-holidays
- Brainwash victims are more often than not unconscious / asleep so they
couldn't talk
       - Just left this one. 

- Reduced the chance of them occurring and limits it to April Fools only
- A 1% chance of the force says ocurring means they will happen pretty
much once a week, given multiple rev / cult rounds happen every week and
on average like, 20 people are converted. A little absurd, it's good
that it never worked?

## Why It's Good For The Game

Antag code in core item code is bad

It's funny this meme has existed for like 2, 3 years now? No one's
tested it, it's never worked

## Changelog

🆑 Melbert
refactor: Removes Rev code from core flash code
fix: Getting converted on April Fools now triggers the meme force say as
always intended
del: The meme force say can no longer trigger on any day (it didn't work
before anyways)
/🆑
2023-04-06 08:28:35 +12:00
MrMelbert
c3a1f21c1a Converts blindness and nearsightedness to status effects, scratches some VERY dumb blindness handling that resulted in mobs becoming "incurably" blind (#72267)
## About The Pull Request

- Nearsighted is now a grouped status effect.
- Blindness is now a grouped status effect.
   - Eye handling of blindness has improved. 
- When eyes are removed, they now cause you to become blind, rather than
handling it in `update_tint`.
- Being ahealed no longer blinds you for one tick, meaning that black
overlay on aheal is gone.
- Temporary Blindness is now a status effect.
- Both Nearsightedness and Blindness have been exorcised from mob vars
and life chains. This means that we've finally cut 2 procs from life,
`handle_status_effect` and `handle_traits`, and moved both to event
based processing. Wooo optimizations.
- Swapped pacifism status effect to use apply and set helpers. 
- Removed an unused admin toggle that disabled welding helmet tint but
also tint from every clothing item and also blindness from losing your
eyes.
- Clothes now generally all blind their mob more consistently.
- Oculine, eye surgery, and sensory restoration are now no longer the
only way to fix blindness from eye damage. If your eyes are healed
through any other means, it will also heal your blindness.
- Some things that made you blind, such as ling blind sting, no longer
just flat made you blind from eye damage forever. They now cause eye
damage directly, which in turn makes you blind from eye damage, as
expected.
- Pacifists can't eyestab anymore. Eyestabs now have a limit on the
amount of blur applied.
- Refactored some `is_x_covered` procs to accept flags rather than have
a lot of arguments for some silly reason.
- Unit tests for blindness. 

## Why It's Good For The Game

Blindness was exceptionally poorly handled prior, primarily due to the
fact that it was tied to the mob instead of separated out

On top of that the system put a LOT of faith in proper handling of
blindness on the coder's end which was misplaced evidently. Many places
didn't update or handle blindness correctly, or just let people
perma-blind.

Deferring it to a status effect improves this a lot

## Changelog

🆑 Melbert
refactor: Refactored blindness and nearsightedness. Important to note is
that all mobs are naturally blind until their eyes are actually created.
refactor: Refactored "is covered" procs
fix: Less sources of blindness now cause permanent blindness. Includes
the "Blind" Spell and "Blind Sting" from changelings.
admin: Ahealing someone no longer flashes the blind overlay for 1 tick.
admin: I removed an unused (sort of) inaccessible admin verb that
allowed you to toggle the tint from all welding helmets (and clothing)
(and lack of eyes) in existence, let me know if you want similar back
balance: Changeling "Blind Sting" now causes eye damage (enough to
blind) rather than arbitrarily forcing blindness.
balance: Visionloss virus symptom now causes eye damage (enough to
blind) rather than arbitrarily forcing blindness.
balance: Oculine has been reworked slightly. Prior, Oculine arbitrarily
healed blindness and nearsightedness from eye damage reagrdless of how
damaged the eyes were, and applied blur on success. Now, Oculine just
heals eye damage, and blindness / nearsightedness is restored in the
process. There is now a probability every tick that eye blur is applied
based on how pure the oculine is while healing very damaged eyes.
balance: Pacifists can no longer eyestab.
balance: Any clothing item that covers your eyes contributes to getting
the bonus while sleeping, and to removing temporary blindness faster
/🆑
2023-01-15 23:01:40 -08:00
MrMelbert
0d4b56435b Converts drowsy and eye blur to status effects, striking yet another two carbon level status vars (#71950)
## About The Pull Request

You know the deal by now.

- Drowsiness is now tracked via status effect.
- Eye blue is now tracked via status effect.

In converting these over, cleaned up a bit of code relating to some
other effects. Attempts to unify behavior between some of them, namely
certain biotypes or mob types shouldn't be experiencing certain effects.

## Why It's Good For The Game

More stuff moved to status effects, slightly more cleaner and better to
work with code. Allows for all mobs that can sleep to be able to get
drowsy, too.

## Changelog

🆑 Melbert
refactor: Drowsiness and Blurred Eyes are now tracked via status effect.
/🆑
2022-12-26 19:58:21 +01:00
AnturK
4d6a8bc537 515 Compatibility (#71161)
Makes the code compatible with 515.1594+

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

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

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

Co-authored-by: san7890 <the@san7890.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-11-15 03:50:11 +00:00
MrMelbert
a1ab0201ff Fix halloweens races (#70874)
* Fixes halloween races.
- Fixes a race condition involve checking for holidays befores SSevents is instantiated. Now, holiday checking is done through a helper, which will ensure the holidays list is created and filled before checked.
2022-10-31 16:01:31 +01:00
ShizCalev
c137b2f270 Fixes shields inhands (#70395)
Fixes #70377

Stobe shield has been broken for.... hell I don't even know how long lmao

cl ShizCalev
fix: Fixed some missing shield inhand icons.
fix: The strobe shield's inhand icon now plays the flashing animation when triggered again.
fix: The strobe shield will no longer blind the person holding it when it deflects a blow.
fix: The light from the strobe shield's flash no longer appears in your held inventory slot.
fix: Fixed the east facing left-handed strobe shield sprite being misaligned by two pixels.
/cl
2022-10-12 14:39:59 +13:00
MrMelbert
45516f4741 Adds macros to help with common set_- and adjust_timed_status_effect uses (#69951)
* Adds helpers for status effect application
2022-09-24 11:04:26 -04:00
itseasytosee
48250f603e Makes flash hyper vulnerability based on negative flash resistance modifier, removes snowflake trait. (#69530) 2022-09-16 19:27:08 -07:00
Mooshimi
a3121f15c4 [GBP No Update] Perish, individual logging runtime (#69024)
missed 2 or 3(lol it was more when I look back at the files), LOG_GAME tags on the log_message line, and did some cleaning up since i was looking through every log_message again

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>

Co-authored-by: tattle <66640614+dragomagol@users.noreply.github.com>
2022-08-10 07:56:40 -07:00
robbertapir
672858eb66 Prevents unsecuring photon projectors. (#67493)
Prevents unsecuring the photon projector

Co-authored-by: robbertapir <robbertapir@airmail.cc>
2022-06-05 23:34:44 -04:00
robbertapir
b2e5f6ab75 Fixes held memorizers being invisible (#67492)
Co-authored-by: robbertapir <robbertapir@airmail.cc>
2022-06-04 02:50:55 -07:00
Kapu1178
6d470992cb This tail refactor turned into an organ refactor. Funny how that works. (#67017)
* Fuck you (refactors ur tails)

* Errors

* Wow. Pain.

* Fixes up probably everything

* finish up here

* Fixes hard del maybe

* original owner hard del

* garbage collection runtime

* suck my peen byond

* Mapped tails

* motherfucker.

* motherrfucker. again.

* Whooopppppsie

* yeah bad idea

* Turns out external organs literally just sat in nullspace forever if their parent was deleted, and didnt Remove() themselves, causing harddels.

* So anyways I repathed all organs

* Fixes

* really.

* unit test... test

* unit test-test but it passes linters this time because im a moh-ron

* I've lost track of what im doing at this point

* Hopefully fixes hard del?

* meh

* Update code/datums/dna.dm

* things n stuff

* repath from master pull
2022-05-30 21:18:34 -07:00
MrMelbert
e63d556d83 Confusion status effect is now duration based instead of magic number based (#66801)
Refactors the confusion status effect. Removes "confusion strength" and replaces it with duration, which is measured in seconds.
This also allows them to use the adjust_timed_status_effect procs instead of their own.

Fun fact! 2 years ago when confusion was refactored into status effects, all confusion effects in the game were halved in duration. They were changed to status effects, which tick every 1 second by default, from life, which tick every 2 seconds by default, without any values changing.
2022-05-09 18:59:33 -07:00
MrMelbert
074da65fc7 Converts drunkness and dizziness to status effects. Refactors status effect examine text (and, subsequently, stabilized black extracts). (#66340)
* Refactors dizziness into a status effect

* Refactors the dizziness setter to use the new kind

* Drunkness.
- Should drunk continue to work off of a magic value or be swapped to duration? I've not yet decided: For understandability it's preferabale for "drunk" to use a timer (they are drunk for 3 more minutes), but both adding drunk and decreasing drunk currently use weird calculations which would be difficult to carry over.
- Ballmer is a liver trait

* Dizzy was a setter, not an adjuster

* Does all the drunk effects over
- refactors examine text fully
- refactors stabilized blacks because of this

* Removed

* repaths, fixes some issues

* Minor fixes

* Some erroneous changes

* Fixes some dizziness errors

* Consistency thing

* Warning

* Undoes this change, I dont like its implementation

* max_duration

* Max amount

* Should be a negative

* max duration

* drunk doesn't tick on death

* Rework dizziness strength

* Erroneous dizzy change

* Fixes return type
2022-05-04 23:33:59 -04:00
Ghom
b84ad2dde8 Removes useless status effect path defines. (#64490) 2022-01-30 01:26:04 -08:00
cacogen
f96330beb1 Burnt-out flash in-hands update again (#63289)
Burnt-out flash in-hands update again

- Prevents flashing going through if the flash burns out during the attempt
- Updates name when using the flash in case burnt_out was somehow reverted to 0 to reflect that
2021-12-08 16:15:44 -08:00
thatoneplebeian
2a826e7380 Drowsiness refactor (#62104)
Creates two procs in /mob/status_procs for handling drowsiness changes (with check for negative values), and refactors all code to use these procs instead of assigning values to the mob's drowsiness themselves.
2021-10-15 10:15:24 +01:00
Ghilker
b95c0366a4 _HELPERS/unsorted.dm has been sorted (#61882)
bring code up to latest standards, move many procs to named files inside _HELPERS
no idea where to put some of these procs, help is appreciated
made more files to contain some unique code, deleted unsorted.dm, we can rest now
2021-10-05 20:22:57 +01:00
John Willard
a86e939bd4 removes a useless check from organs and fixes maint eyes permanent blindness (#61541) 2021-09-19 03:20:21 -07:00
Watermelon914
375a20e49b Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs.
Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines.

Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing.
Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc.

(Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
2021-06-14 13:03:53 -07:00
LemonInTheDark
f90e8cf7a3 Fixes a bunch of harddels that are sourced from player action (#59371)
Sourced from #59118 and a cursed project I'll pr later, This pr contains a lot of harddel fixes for stuff that pops up after a player interacts with something. I'm not gonna list them all here because there's something like 60 130, check the commit log if you're curious

Oh and I moved ref tracking screaming to a separate define, and made some optimizations to the thing in general. I think that's it, this pr is a bit of a frankenstine
2021-06-10 21:44:23 -03:00
cacogen
f64b03ec22 Uses the update_icon_updates_onmob element to update the flash's onmob sprite (#58674) 2021-04-26 01:00:21 -07:00
cacogen
52cbeaf943 Burnt-out flashes are more obvious (#58628) 2021-04-23 23:09:18 -07:00
TemporalOroboros
e4079c87b8 update_appearance (#55468)
Creates update_name and update_desc
Creates the wrapper proc update_appearance to batch update_name, update_desc, and update_icon together
Less non-icon handling code in update_icon and friends
Signal hooks for things that want to change names and descriptions
99%+ of the changes in this are just from switching everything over to update_appearance from update_icon
2021-02-19 12:06:18 -03:00
Mothblocks
0f435d5dff Remove hideous inline tab indentation, and bans it in contributing guidelines (#56912)
Done using this command sed -Ei 's/(\s*\S+)\s*\t+/\1 /g' code/**/*.dm

We have countless examples in the codebase with this style gone wrong, and defines and such being on hideously different levels of indentation. Fixing this to keep the alignment involves tainting the blames of code your PR doesn't need to be touching at all. And ultimately, it's hideous.

There are some files that this sed makes uglier. I can fix these when they are pointed out, but I believe this is ultimately for the greater good of readability. I'm more concerned with if any strings relied on this.

Hi codeowners!

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2021-02-14 16:53:29 -08:00
Timberpoes
40c0123c46 Flash immune cyborgs are now immune to flash. (#56774) 2021-02-10 02:07:23 -08:00
John Willard
102fdf8f8f Flypeople can get flashed from any direction (#55724) 2021-01-09 12:10:30 -03:00
ATH1909
0192fd19e5 fixes high confusion levels blocking rev conversions and removes help intent disabling the usage of tacticool flashing (#55750) 2020-12-28 01:54:02 -08:00
TiviPlus
0eaab0bc54 Grep for space indentation (#54850)
#54604 atomizing
Since a lot of the space indents are in lists ill atomize those later
2020-11-30 12:48:40 -05:00
ZeWaka
9629feed35 Converts A && A.B into A?.B (#54342)
Implements the ?. operator, replacing code like A && A.B with A?.B

BYOND Ref:
When reading A?.B, it's equivalent to A && A.B except that A is only evaluated once, even if it's a complex expression like a proc call.
2020-10-13 16:43:53 -03:00
Timberpoes
94963c7489 Fixes oversight with "tactical combat spinning" and flashes (#53823)
Using the spin emote can no longer let you RNG your way out of new flash mechanics.

Mobs have a new flag that is set to when they start spinning and unset when they stop.

Flashes now use this new flag when calcing deviation.

Tactical combat spinning using the spin emote now results in a full deviation flash when it may previously have resulted in a failure or half-deviation flash.

Emotes should either not influence combat at all (spin on floor when both players share the same loc, this was already handled by same-loc code), or negatively influence combat for the emote user (spin in all other circumtances, which is what this PR addresses).
2020-09-20 06:51:08 -03:00
Timberpoes
6914d0c046 Fix flash runtime, improve flash logic (#53784)
image

Flash + Emp = Flash with no user = Runtime.

Additional logic has been put in place to handle this.

I've also robustified the calculate_deviation proc to have explicit returns in every code path and simplified it to only care about the direction the victim is facing compared to the attacker's position.
* Magic numbers are bad because wizards are bad

* Rohesie feex
2020-09-18 03:04:16 -03:00
EdgeLordExe
1765037329 Nerfs Flashes [Edge Awards 2020] (#53604)
Flashes now deal stamina damage and micro-stun, they deal higher damage than batons BUT they have a severe disadavntage in form of directionality. Stamina damage and the duration of the micro stun is determined by direction your enemy is facing.
2020-09-15 20:14:01 +01:00
Rohesie
eda7c6ca55 Overlay lighting component (#52413)
Sparks no longer lag, projectile beams move super smoothly, same with mobs and whatnot. This also allows for easy expansion into directional lights, field-of-view, wee-woo rotating lights or whatever.

It does have a downside: things right-clicked or checked through the alt+click tab will show the light overlay:


This is a BYOND limitation, very well worth it IMO.

🆑
add: Smooth movable lighting system implemented. Projectiles, sparks, thrown flashlights or moving mobs with lights should be much smoother and less laggy.
balance: Light sources no longer stack in range, though they still do in intensity.
/🆑
2020-08-22 14:56:38 +12:00
Jared-Fogle
7df16c595e Confusion will no longer continue to confuse after being cured (#52286)
* Confusion will no longer continue to confuse after being cured

* Grammar comment fix

* Move to status effect

* Remove test per request

* Make confusion a status effect, confusion curing now completely neuters the confusion

* set_confusion changes, get_confusion

* Fix confusion going down twice per tick

* Change strength = to proc

* Move procs to status_procs
2020-08-05 16:36:00 -03:00
Rohesie
6ff08e1c69 Color standardization, vars moved, and signals (#52574)
Defined all the existing light_color values.
    Moved their definitions to colors.dm
    Made white the default color. It was so already, but that was very obscured.
    Moved the atom light-related variables to the atom definition.
    Wrapped changes to variables such as light_color into procs that report the event through signals.
    Moved the light_on variable to the atom level, also adding a signal for its changing, to represent toggling lights.
    Cleaned up a little bit of code in where new variables were defined before redefinitions.

This is all atomization to reduce changes in #52413
None of this affect gameplay at all, it's all code cleaning and refactoring.

There's more colors to standardize, a search for color = will find lots of targets, and I see little need to have both the LIGHT_COLOR and COLOR patterns, but I don't want to make this PR bigger than it already is.
2020-08-04 13:59:48 +12: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
nemvar
6ef421be42 Renames a few variables. Also reorders icon fallback order again. (#51060)
* Renames a few variables. Also reorders fallback order again.
Renames item_state to inhand_icon_state
Renames mob_overlay_icon to worn_icon
Renames mob_overlay_state to worn_icon_state
worn_icon_state/mob_overlay_state now never gets used for inhands.

* Fixes some comments

* Fixes map issue

* Restart lints

* Properly resolves conflicts
2020-05-25 06:47:19 +02:00
ShizCalev
df81c5be4a Fixes blindfolds not properly counting as being blind 2020-02-24 01:10:34 -05:00
XDTM
ef5ef2d463 Adds a hypnotic flashbang to the uplink (#49137)
Adds a hypnotic flashbang, disguised as a regular flashbang, to the traitor/nuke op uplink. Pretty much an AoE one-use hypnotic flash, but it doesn't require weakening the targets as long as they can be affected by the sound of the grenade, since it causes minor hallucinations.
Why It's Good For The Game

Effectively this is a non-lethal, non-destructive chaos-making tool. Even without the hypnosis it's a better flashbang; if everything goes right you've got a roomful of followers obeying your orders, but on the other hand something might go wrong, and then Poly is the one with the roomful of followers.
Changelog

🆑
add: Added a hypnotic flashbang to the uplink for 12 TC. It can hypnotize people much like a hypnoflash, and the sound will automatically make victims vulnerable to the trance.
/🆑
2020-02-22 22:13:27 +13:00