Commit Graph

57 Commits

Author SHA1 Message Date
msgerbs
f91dd961aa Adds NO_ALERT flag to areas, refactors area alerts slightly (#53487)
Adds a NO_ALERTS flag for areas and adds it to most off-station area types. Up until now, whether or not an area should trigger alerts has been a snowflakey mix of ALWAYS_UNPOWERED and outdoors, with some smattering of other conditions thrown in. This unifies it all behind a single bitflag so it's easy to make sure an area does not send alerts to the station consoles. I also refactored alerts slightly so they make sense (state = 1 means not alerting? Seriously??), removed an unnecessary override of poweralm from some lavaland areas which probably doesn't do what somebody thought it does, and removes an old snowflaky override of power alarms in engineering which is a leftover from the singulo days. As an additional side effect, off-station fire alarms can now properly work locally (previously, the entire fire alarm did not work if it wasn't on the station. Now they work but just won't send alarms)
2020-09-11 04:31:42 +01:00
LemonInTheDark
2c20897f00 Readds the tesla, reworks it a bit (#53072)
* Makes tesla movement nicer, fixes some atmos concerns, changes how energy is handled, and readds the tesla

* readds delam and desc

* I fucked it

* flags

* holy fuck

* Constricts the zaps that can generate power from a tesla coil

* *kick?
2020-09-08 20:16:42 -07:00
TiviPlus
d4cdb49133 Mecha followup one (#53470)
fixes #53384
fixes #53327
fixes a bug where mechs could move too fast
fixes cooldown being inconsistent
makes strafe behavior better
fixes lights being very small

fixes #50639
fixes #47373
fixes #43605

Moved some code to the correct spots and did the varedit bitfield thing
2020-09-07 17:44:54 -03:00
Jared-Fogle
921d11bec8 Refactor bitfields global, improve turret_flags debugging (#53239) 2020-09-01 04:35:39 -03:00
nemvar
e32c22489f Merge pull request #52895 from MrMelbert/blindmanwalking
Prevents blinded people from using camera consoles perfectly fine
2020-08-18 18:45:13 +02:00
Rohesie
b0726e032b Icon smooth refactor (#52864)
bitflag list construct added: an associative list of bitflags for cheap and quick element comparison between two lists using the same system.

    canSmoothWith list turned into a bitflag list.

    smoothing_groups list added to substitute the type path list.

    smoothing procs turned into atom procs, refactored and optimized a bit.

    smooth directions redefined in order to fit in 8 bits for a future smoothing system

    some variable names changed, foreseeing a second smoothing system

    SMOOTH_OBJ flag added, for things that need to scan turfs for smoothing. The old locate() optimization has the risk of returning false negatives by finding a child and returning null while there might be one of the wanted type as well, as it doesn't match the type exactly.

    SMOOTH_TRUE and SMOOTH_MORE condensed into SMOOTH_CORNERS. The old behavior can be replicated using smoothing groups without loss.

    Does very minor code cleanup.

    Processing-wise didn't find a noticeable difference. The system loses on init a bit by setting the bitflag_lists, and by scanning whole turf contents for object smoothing (increasing accuracy), and gains by making less checks per target to smooth, through the same bitflag_lists.

    Memory-wise there should be a small improvement, given that on the old system we had 63512 canSmoothWith lists (a few typelists, most unique), and on this new system canSmoothWith + smoothing_groups are both bitflag_lists from the same pool, totaling 46 in number.

Could be tested a bit to see if I missed any icons not properly smoothing.
2020-08-13 14:03:49 +12:00
MrMelbert
f21c7ae24f i can't see anything 2020-08-12 13:59:49 -05:00
TiviPlus
b4fe4f717b Refactors area stuff (#52751)
-bitfielded a bunch of bools on /area, I left some untouched cus they get called a lot
-Unused vars
-Fixed a var pretending to be a fake bool
-Probably more
2020-08-10 16:31:59 -03: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
LemonInTheDark
a773eebed6 Indent moment 2020-07-09 00:24:23 -07:00
LemonInTheDark
f59207ec83 Converts rad_flags to flags_1, holy shit why 2020-07-09 00:20:46 -07:00
Ryll Ryll
5c174800fb Grenades and projectiles can have shrapnel and embed, all carbons can suffer embeds, some bullets can ricochet, sizable refactor of embedding (#49634)
About The Pull Request

It annoyed me that we have a perfectly good frag grenade item, and a perfectly good shrapnel component, but no crossover episode between the two. This remedies that, and does a lot, lot more.

dreamseeker_2020-03-30_05-01-13.png

dreamseeker_2020-03-30_05-01-26.png

Big points:

    Adds new component: pellet_cloud, which can be used by ammo casings, guns, and landmines to spray shrapnel and display aggregate hit messages ("You're hit by 6 buckshot pellets!" vs "You're hit by the buckshot pellet in the X" x6). All gun ammo that shoot multiple pellets now use this component on firing.
    Adds stingbangs, premium less-lethal grenades that shoot off lots of stinger pellets, to cargo. Frag grenades are also reworked to have smaller booms, but shoot off lots of shrapnel shards. You can jump on top of these grenades to absorb a portion of the shrapnel to save those around you! There's an achievement for dying this way, called "Look Out, Sir!"
    Projectiles can now embed items/shrapnel. Adds .38 DumDum ammo to cargo that does less damage and has negative armor pen, but can embed in people. This is the only ammo that currently embeds.
    Bullets can now ricochet off walls, structures, and machinery (harder surfaces are more likely to ricochet). Only standard .38 and Match Grade .38/.357/L6 ammo can ricochet, with Match Grade being much better at ricocheting. You can buy Match Grade .38 from cargo and Match Grade L6 ammo from the nuke uplink, while Match .357 is admin only.
    Armor now protects you from harmful embeds, taking the better of the bullet/bomb armor on the affected limb. Armor penetration can modify this of course, and many blunt embeds like stingbangs and DumDum bullets are significantly worse if you have even 1 armor.

Other misc fixes/changes

    Refactored the embed element a bunch and fixed it creating new elements for every instance rather than expected bespoke behavior. There are new /obj/item helpers for modifying and adding embedding.
    Fixes #49989: Spears can no longer embed in turfs cause their sprite is annoying to me, it's generally harder for most things to embed in turfs
    Fixes #49741: New carbon helpers for removing embedded objects
    Fixes #46416: Handles embedded objects getting qdel'd or moved while embedded
    Renamed the old shrapnel component for RPG loot to MIRV to avoid confusion
    Repathed frag grenades from under minibombs to under base grenades, and added explosion vars to base grenades

Why It's Good For The Game

Fixes a bunch of janky design with embeds, adds lots of new avenues for projectile and grenade variety, ricochets and collateral damage are fun!
Changelog

🆑 Ryll/Shaps
add: Adds stingbangs to cargo (and one in the sec vendor premium), premium less-lethal grenades that shoot off a giant swarm of stingball pellets to help incapacitate swarms of people in tight quarters. You can jump on top of a live one to be a hero and absorb a bunch of shrapnel, same with frag grenades. There's even an achievement for dying to a grenade you jumped on!
add: Projectiles can now embed in people! Or at least grenade shrapnel and the new .38 DumDum ammo, now available in cargo, can. DumDum rounds excel against unarmored targets, but are pricey and do poorly against armored targets.
add: Bullets can now ricochet! Or at least, standard .38 and the new .38/L6 Match Grade ammo can. Match Grade ammo is finely tuned to ricochet easier and seek targets off bounces better, and can be purchased from cargo (for the .38) or nuke ops uplink (for the L6), but standard .38 ammo has a chance to ricochet as well.
tweak: Frag grenades now have smaller explosions but shoot off a bunch of devastating shrapnel, excellent for soft targets!
tweak: Shotguns and other multi-pellet guns now print aggregate messages, so you'll get one "You've been hit by 6 buckshot pellets!" rather than 6 "You've been hit by the buckshot pellet in the X!" messages. Bye bye lag!
balance: Armor can now protect against embedding weapons, taking the best of either the bullet or bomb armor for the limb in question away from the embed chance. Some weapons are better at piercing armor than others!
/🆑
2020-04-03 16:58:38 +13:00
actioninja
637d251e26 icon fixes 2020-03-03 19:50:25 -08:00
LemonInTheDark
df9d859da8 Fixes tesla bugs, makes code better (#49260)
* Cleans shit up, adds some upper limits on zap count, makes explosions less commen. Need to fix apc issue before
I test how it plays

* Mood, buffs and nerfs tesla

* Cherry-Picking

* eyyo

* back to basics

* aight

* broooooooooooooooooo

* adds else

* range

* fixes shit

* Sure

* Cleans shit up

* Fixes prob issue

* Gee I like this spooky guy

* I swear to god if prob picks just makes a list I am gonna blow a gasket
2020-02-27 12:06:52 +01:00
Rohesie
7bef84f009 Mass-replacement of stat to machine_stat (#48758)
Living and machine stat vars are pretty different, one uses flags and other number-defines.
This should make some other mass-replacements and searches a bit easier.
2020-01-24 12:37:17 +13:00
LemonInTheDark
f4f8a686df Makes grounding rods consistent, changes the supermatters bolts a great deal. (#48472)
* Goof I will find you and I will berate you

holy hell

Calm and peaceful ahhhhh

I swear goofs pc failing was the biggest tragedy in gaming

Fixes some flags

More touchups

Now to squash

Goofs PC failing was the biggest tragady in GAMING

* Fixing some misspellings before the bee gets me

* GOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

* Full vehicle support

* Changes some flags around, "fixes" some bugs, makes being shocked less insane

* Makes spliting more reasonable, unfucks some shitty tesla code I copypasta'd into the sm, godspeed shitcode,
none noticed you.

* Removes my tesla_ignore_1 fix, another pr is up that should solve things, so we're just leaving it in for now,
gonna have to deal with merge conflicts when it gets merged, but that won't be too bad

* tfw

* Nothing to see here folks

* I'm a boomer
2020-01-10 23:25:11 +11:00
ShizCalev
0432f132fb Fixes tesla immunity being lost if you have reactive armor and refund the lighting bolt spell / vice versa 2020-01-06 21:04:44 -05:00
81Denton
1a0428f031 Fixes cult space bases (again) (#47041)
* Fixes cult space bases (again)

* h

* Fixes duplicate definition

* Lets cultists draw runes at the Lavaland cult altar ruin

* Adds CULT_PERMITTED_1 flag to check if cultists can summon/buld structures here

* h
2019-10-20 14:47:14 +02:00
nemvar
fd214c52a4 Turns mob biotypes into flags instead of lists. (#45905)
About The Pull Request

title.

Also renames INORGANIC to MINERAL and removes it from simplemobs (never used for simplemobs) where it doesn't fit. Doesn't make sense to have both ORGANIC and INORGANIC as a flag.
Why It's Good For The Game

There's no reason to use a list for this.
Changelog

cl
code: Changed mob biotypes from lists to flags.
/cl
2019-08-21 11:28:30 +12:00
MMMiracles
cded323274 Adds Hat Throwing (#45355)
* adds hat throwing on people and borgs

* clothing flags, hats can knock off non-items, borg hat blacklist check

* prevents hats with items in them from being able to land on heads

* removes extra equip, hats can go on the hatless again, tinfoil fix

* if

* bit flag
2019-07-26 15:23:56 -04:00
nemvar
66af98e75a blocks shove knockdown is now a clothing flag. (#45107)
* blocks shove knockdown is now a clothing flag.

* comment only commit
2019-07-11 12:21:22 -04:00
Garen Crownguard
534a9140aa merge 2019-07-05 17:59:38 -05:00
nemvar
53d4c3f25a Refactor mob can_see_reagents (#44934)
Turns the scan_reagents var into a clothing flag.
2019-07-04 00:09:01 -07:00
Garen Crownguard
3a37d0322c merge 2019-06-23 20:39:24 -05:00
Arkatos1
e82707a8cc Examine tooltips now work on items put into storage (#44311)
* Examine tooltips now work in items put into storage

* IN_STORAGE define

* IN_STORAGE bitfield and proper parenthesis
2019-06-09 18:15:12 -04:00
vuonojenmustaturska
2d74a86353 [READY] Cleans up saycode by removing random hook stubs and using a signal where relevant (#44320)
About The Pull Request

This PR removes speech message and span hooks from dna, mutations, pierrot throat disease, species, tongues, masks, hats, held items, brain traumas and a carbon proc overload handling tonguelessness.

Tonguelessness is now handled by tongue removal registering for the speech signal and the hook being deregistered by having a tongue put in.

Also cleans up some /atom/movable/proc/get_spans() overloads that called the empty parent or overloaded the parent to do the exact same thing as the parent proc did.

Also cleans up calls to radio.talk_into() where the caller would often, as a result of copypasta, provide the proc with fresh copies of the proc's default values for proc args, and makes say_quote() better by giving it a default spans value so that none of the callers have to provide the same default one.
Why It's Good For The Game
Changelog

cl Naksu
code: Cleaned up saycode
/cl

* start with this

* oh man this looks so good

* hats are dead

* /obj/item/proc/speechModification is dead

* brain traumas and get_held_item_speechspans() are dead

* these should be static

* unfortunately we still need this

* /mob/living/carbon/treat_message(message) is kill

* clean up get_spans()

* dunk get_spans, modifies_speech for brain traumas, some superfluous static stuff

* move stuff around

* return values
2019-06-06 18:35:06 +12:00
Garen Crownguard
4b2fc4cc05 Removes Hygiene 2019-06-04 06:25:51 -05:00
Tad Hardesty
9b57639f1c Add MOBILITY_PULL to the bitfields list (#43318) 2019-03-28 01:56:47 -04:00
coiax
881e8c1ab9 Refactors NODROP flag into TRAIT_NODROP (#42109)
* Refactors NODROP flag into TRAIT_NODROP

🆑 coiax
fix: Anti-drop implants can no longer be used to drop objects that they
were not responsible for sticking to a person's hand.
fix: Backfiring with a Barnyard spellbook will now play a spooky horse sound.
refactor: Refactors the way that "NODROP" items work to a new system,
there should be no change in functionality.
/🆑

Various items in the codebase were doing weird hoop jumps in order to
preserve the nodrop flag's state when it also wanted to change it, so I
moved it to a trait system.

I may have gone overboard with the type of unique trait sources, but
those can be changed later. My long term plan is make a general "CURSED"
nodrop origin, which means you can unlock cursed items by being hit with
a bolt of door opening or something. But that's for another PR, this has
no functionality changes, apart from some slightly modified descriptions
on cursed masks.

- Removed a bunch of redundant voice changing code for all the voice
changing animal masks, used two new clothing flags for this purpose.
- Also refactored a bit the animal masks, making new cursed subtypes that play
the sound when created.

* Drop location
2019-01-17 15:24:30 -05:00
kevinz000
7456587ed5 UNSTOPPABLE flag is now checked every time something tries to pass something instead of just once in the Move() proc (#41994)
UNSTOPPABLE flag is now checked every time something tries to pass something instead of just once in the Move() proc #41994
2019-01-04 00:08:09 +13:00
Qustinnus
0de28b726a [READY]Humans now have hygiene (DOES NOT AFFECT MOOD GO AWAY MOODPOSTERS) (#41986)
cl Floyd / Qustinnus
tweak: You now have to be naked to get the nice shower moodlet, if you shower with clothes you get a bad moodie
add: Hygiene, you slowly become dirty over time, the more covered in blood you are the faster you will lose hygiene. When you are too dirty you will have a stink overlay. (Hygiene doesn't affect mood currently) It also spawns miasma slowly if you smell like shit.
add: adds NEET and neat traits. NEET's get 20 bucks social welfare extra and like being unhygienic, while neat people dislike being unhygienic and like being hygienic
/cl

This doesn't affect mood so plssss dont strawman in this PR about how I'm forcing you to shower or die or whatever

This PR is mostly visual and will allow for people to judge others for literaly being smelly as hell.

also NEET and neat traits which interact with being smelly. (neat likes hygiene, dislikes lack of it. NEETs like lack of hygiene and get some social welfare (20 bucks))
2019-01-02 01:04:51 +13:00
Jordan Brown
4c3053d5eb Merge pull request #42041 from Jordie0608/alliwantforchristmasisaspaceinGameMaster
Rework of admin rank loading to support punctuation
2018-12-24 15:26:17 -05:00
Jordie0608
b9fb0388f7 rework of legacy admin loading to support punctuation with new format 2018-12-22 18:35:50 +11:00
Jack Edge
054647c382 Refactors container_type into reagents.flags 2018-12-18 13:47:11 +00:00
kevinz000
3e7184c975 Combat/Stun (slip) overhaul staging, mobility flags, adds crawling (#39967)
Aiming to implement the framework oranges has detailed in https://tgstation13.org/phpBB/viewtopic.php?f=10&t=19102
Moves canmove to a bitflag in a new variable called mobility_flags, that will allow finer grain control of what someone can do codewise, for example, letting them move but not stand up, or stand up but not move.

Adds Immobilize()d status effect that freezes movement but does not prevent anything else.
Adds Paralyze()d which is oldstun "You can't do anything at all and knock down).
Stun() will now prevent any item/UI usage and movement (which is similar to before).
Knockdown() will now only knockdown without preventing item usage/movement.
People knocked down will be able to crawl at softcrit-speeds
Refactors some /mob variables and procs to /mob/living.
update_canmove() refactored to update_mobility() and will handle mobility_flags instead of the removed canmove

cl
rscadd: Crawling is now possible if you are down but not stunned. Obviously, you will be slower.
/cl
Refactors are done. I'd rather get this merged faster than try to fine tune stuff like slips. The most obvious gameplay effect this pr has will be crawling, and I believe I made tiny tweaks but I can't find it Anything I missed or weird behavior should be reported.
2018-10-11 11:22:21 +13:00
vuonojenmustaturska
a287380797 Stops using the rad insulation component to provide default rad insulation features in order to save a bit of memory (#40662)
* henk

* oh yeah this

* undo this meme

* stuff
2018-10-06 14:28:28 +02:00
Jordan Brown
3a73bb5046 Adds a bitfield helper (#40295) 2018-09-16 15:51:04 -04:00
Tad Hardesty
6750962a17 Fix cyborg radio and module UIs being noninteractive (#39412)
* Fix cyborg radio and module UIs being noninteractive

* Fix AIs not being able to access their internals
2018-07-28 14:23:02 +02:00
Tad Hardesty
9a5684556a Fix flags_1 overlap and VV, remove CTF deathrattle (#38711) 2018-06-26 16:38:04 -04:00
Tad Hardesty
05107047dc Merge pull request #38098 from kevinz000/transit_space_refactor
Transit space refactor
2018-06-16 12:40:37 -07:00
vuonojenmustaturska
9c0b5fa881 Turn /datum.isprocessing into a datum flag (#38193) 2018-06-05 15:59:46 -07:00
kevinz000
3b0072602a typo 2018-06-04 16:30:15 -07:00
kevinz000
7bf86ed53f Refactors transit requests to turf_reservations. 2018-06-04 16:30:15 -07:00
vuonojenmustaturska
c65a99f130 Move NODROP_1, DROPDEL_1, ABSTRACT_1 and NOBLUDGEON_1 to item_flags where they belong (#38171)
* (mostly) nodrop

* (mostly) dropdel

* (mostly) abstract

* nobludgeon

* things i missed

* forgot one

* unintended changes

* energy handcuffs
2018-06-01 11:36:31 +02:00
Tad Hardesty
f82e00ff80 Add container_type to VV bitfields 2018-05-26 20:09:45 -07:00
Tad Hardesty
21c9dd86a5 Fix ambient occlusion on xeno weeds and wall corners (#37987) 2018-05-24 12:28:51 +03:00
vuonojenmustaturska
4f0b0b7ec1 Replaces /atom.initialized and .admin_spawned with flags (#37981)
kill .initialized and .admin_spawned from /atom
2018-05-24 02:20:50 -07:00
kevinz000
8023d94b20 tesla_act refactors and balancing (#37369)
experimental: Tesla damage has been reworked to structures and objects have been worked with a linear scaling.

experimental: All tesla weapons now no longer need to hit a mob to arc lightning; however, they will no longer stun, and only hit each target once.

tesla_zap vars are now a single bitfield.
2018-05-23 13:40:03 +12:00
vuonojenmustaturska
1eccbcca18 Adds an EMP protection component, allowing ANYTHING to be protected from EMP (#37671)
The component is initialized with any combination of three flags, EMP_PROTECT_SELF protects against effects that target the object itself, EMP_PROTECT_WIRES protects against wires being messed with similar to the NO_EMP_WIRES_1 flag which this PR removes, EMP_PROTECT_CONTENTS protects against things that are inside the object like organs, internal "non-virtual" power cells and the like

This enables (but doesn't introduce) new mechanics such as adding EMP shielding at runtime to any atom, or taking it away.
2018-05-22 11:38:02 +12:00
vuonojenmustaturska
fd4c753a04 replaces BANG_PROTECT_2 with a component, also kills OMNITONGUE_2 and flags_2 (#37597)
* kill BANG_PROTECT_2

* let's put this back in

* dirty

* kill OMNITONGUE_2

This is a write-only variable, probably leftover from some refactor years ago

* kill flags_2
2018-05-02 14:13:41 -04:00