Commit Graph

33 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
MrMelbert beacfec8be Fixes some species keeping galcom because of shenanigans / codifies silverscales understanding but not speaking common (#76342)
## About The Pull Request

1. Default language holders understand GALCOM on their mind, but speak
it on their atom


https://github.com/tgstation/tgstation/blob/0a37898f4da161d6f45c209e1f88546e068a64fd/code/modules/language/language_holder.dm#L39-L43

2. Living mobs defer to their mind's language holder over their body's
language holder


https://github.com/tgstation/tgstation/blob/0a37898f4da161d6f45c209e1f88546e068a64fd/code/modules/mob/living/living_say.dm#L559-L562

3. Mind get_language_holder, an entirely different proc, makes a default
language holder when it is created


https://github.com/tgstation/tgstation/blob/0a37898f4da161d6f45c209e1f88546e068a64fd/code/datums/mind/_mind.dm#L169-L172

4. Setting species changes your language holder entirely


https://github.com/tgstation/tgstation/blob/0a37898f4da161d6f45c209e1f88546e068a64fd/code/datums/dna.dm#L490-L493
 
5. When your mind's default language holder is synced with your body's
species language holder's **ATOM LANGUAGES**, it will clear your
languages of all atom languages and then add in all the new ones. You
will notice that mind sourced languages are untouched. This leaves the
understood-via-mind galcom entry from default language holders there,
despite the mob, say, being unable to otherwise understand galcom.

I've fixed this weird chain of events by having mind language holders
default to your current species language holder or current body language
holder.

This is admittedly, kind of a bandaid. **Mind language holder should not
exist**. Mind sourced languages should just be passed around in mind
swaps as you would expect. But that's a larger refactor.

Closes #76330 , but keeps Silverscales as able to understand but not
speak galcom.
I think it's funny if they can hear the peasants but refuse to stoop to
their language no matter what.

## Why It's Good For The Game

People shouldn't able to understand common in some situations

## Changelog

🆑 Melbert
fix: Fixes some species / mobs keeping an understanding of galcom
despite not being intended to.
/🆑

---------

Co-authored-by: san7890 <the@san7890.com>
2023-07-04 17:19:13 +01:00
John Willard a4b4f738d0 Removes silicon's knowledge of non human languages (#76305)
## About The Pull Request

Silicon now only know Common, Uncommon (Humans with Foreigner quirk) and
Robotic.
I also made the indentation in languages consistent because it bugged me
lol.

## Why It's Good For The Game

1. There are currently many ways of learning languages, which devalues
the language system as a whole. There's no real reason to use a language
when anyone potentially understands what you're saying anyways.
2. Players of these non-human Species should be able to use their
language to have hidden discussions in the open (you know, what
languages were meant for), and Silicons should be included in this,
especially since Silicon are generally on Asimov where they do not care
for non-human life, giving non-humans SOMETHING over Silicon would be
nice.

## Changelog

🆑
balance: Silicon now only know Common, Uncommon and Robotic languages.
/🆑
2023-07-01 15:27:56 +01:00
MrMelbert 779fdb9816 Refactors how tongue languages are set (#72080)
## About The Pull Request

This static list business for cache wasn't very maintainable, as seen by
some languages which should've totally been speakable for some subtypes
not being speakable.

This generates the list via a proc and then caches it for similar
results without being annoying to update.

This also makes it much much easier to add a tongue that speaks unique
things, not being forced to follow the weird existing pattern

## Why It's Good For The Game

Flypeople and Ethereals couldn't speak uncommon if they were taught it
by "other circumstaces" because no one updated these lists

## Changelog

🆑 Melbert
fix: Ethereals and Flypeople and Aliens who learn Uncommon language can
speak it with their tongues like they could speak Common, no this
doesn't mean they can naturally speak or understand Uncommon
refactor: Refactored how tongues set up their languages lists
/🆑
2022-12-27 09:18:08 +01:00
Tim f6caf9a008 Add language variety to machines that speak (#71643)
## About The Pull Request
This builds on #70278 by giving other machines (vendors, newscasters,
computers, etc.) the ability to speak different languages. If the
station "Bot language malfunction" trait is rolled, then these machines
will select a random race starting language. If a machine is EMP'd then
it has a chance to change the language. There is also a language wire
that can be pulsed to change the language for vending machines.

Default language for machines is galactic common, but there are rare
exceptions:

- Beach vendors will now speak beachbum
- Syndicate vendors will now speak codespeak
- Changeling vendors will now speak a random language after each slogan 

## Why It's Good For The Game
More depth to the language feature.

## Changelog
🆑
add: Add language variety to machines that speak. You can also pulse the
vendor language wire to make it switch languages or EMP a machine to get
the same effect.
add: Shambling cola vendors will now speak a different language each
time they talk. Syndicate vendors will now speak codespeak. Beach
vendors will now speak beachbum.
/🆑
2022-12-21 14:18:52 -08:00
LemonInTheDark 85b2d5043d Optimizes qdel related things (slight init time savings) (#70729)
* Moves spawners and decals to a different init/delete scheme

Rather then fully creating and then immediately deleting these things,
we instead do the bare minimum.

This is faster, if in theory more fragile. We should be safe since any
errors should be caught in compile since this is very close to a
"static" action. It does mean these atoms cannot use signals, etc.

* Potentially saves init time, mostly cleans up a silly pattern

We use sleeps and INVOKE_ASYNC to ensure that handing back turfs doesn't
block a space reservation, but this by nature consumes up to the
threshold and a bit more of whatever working block we were in.

This is silly. Should just be a subsystem, so I made it one, with
support for awaiting its finish if you want to

* Optimizes garbage/proc/Queue slightly

Queue takes about 1.6 seconds to process 26k items right now.
The MASSIVE majority of this time is spent on using \ref
This is because \ref returns a string, and that string requires being
inserted into the global cache of strings we store

What I'm doing is caching the result of ANY \ref on the datum it's
applied to. This ensures previous uses will never decay from the string
tree.

This saves about 0.2 seconds of init
2022-10-30 00:09:15 -07:00
MrMelbert f9a7bdf8ca Station trait "Bot language malfunction" triggers on newly created station bots (#70278)
* Bot language malfunction triggers on new bots

* List
2022-10-03 23:54:39 -04:00
MrMelbert 7bb2f0b96c De-hardcodes the species preference pages, deleting the species pages and generating them in constant data on the DM side instead (#65140) 2022-02-26 19:04:34 -08:00
Krysonism aa9845db34 Da clownana update! Clownana rework, global hOnKeRbLaSt & monkey synergy. (#63899)
Since maintainer have expressed dissatisfaction with the state of clownanans, i've taken it upon myself to not only reduce their lag generation potential but to also make them more interesting.

All simplemob clowns now:
Are able to speak and understand the monkey language.
Are able to hit banana bunches to initiate the explosive ripening process.

The changes to clownananas speciecially are as follow;
Clownanas are able to rustle every 10 seconds to spawn 3 peels.
Clownanas have a speed of -1 rather than -10.
Clownanas gain the ability to spawn a banana bunch every minute.

Banana bunches are food items imbued with extra banana juice and monkey energy.

Hitting a banana bunch as a simplemob clown causes a honkerblast after a 3 seconds delay.

I've implemented a global honkerblast proc for future use, the honkerblast effects are similiar and inspired by the mech weapon, but less severe at light intensity and more severe at high intensity.

Maintainers are unhappy with the current state of the mob (It spawned enough bananas which never went away that when swept up into one place over 30 minutes, walking over the pile would cause minute long server freezes), and while the mob is popular and enjoyed by many players it is currently quite poorly designed and implemented by a novice coder.

These changes increase the strategic depth of playing this particular mob and rewards more active input from the player.

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2022-02-09 00:47:39 -08:00
Jeremiah a2fa7799f3 Removes swarmers from the game (#63989)
What the title says. But why?
I generally have a rule when making a contribution, that is "don't make the game less fun"
I'm not salting, I didn't die to a swarmer.
... Yet that's the problem. Swarmers are the griefiest antag in the game, but when you complain that they're annoying or unfun, you're doomed to hear "lol they can't even hurt you though."

WELL THAT ACTUALLY MAKES THEM WORSE. I would rather die to a hundred xenos and space dragons than be forced to untie myself in maintenance for 45 seconds while the shuttle leaves.
Why It's Good For The Game

Unfun game modes should be removed from the game.

    Being griefed by swarmers is annoying
    Playing as a swarmer is not very exciting either. Click on iron.

lastly, because oranges authorized it
Changelog

cl
del: Removes swarmers! The griefiest, lowest fun value antagonist is removed from the game.
/cl
2022-01-13 13:10:18 +13: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
LemonInTheDark c906c44393 Fixes a fuck ton more harddels (#58779)
Redoes how geese handle eating shit, it was fucking stupid and caused harddels, and while this method is technically slower in the best case, it's a fucking goose
Fixes action related harddels, I hate how they work but at least this way they won't hold refs.
Fixes the hierophont causing its beacon to harddel
Removes the M variable from megafauna actions, it was used like a typed owner and caused harddels, so I burned it
Fixes target and targets_from harddels, replaces all setters of target with LoseTarget and GiveTarget, which should help maintain behavior. I'm not sure if this breaks anything, but if it does we should fix the assumptions that code makes instead of reverting this change
Fixes more area_senstive_contents related harddels, we need to allow the mob to move before clearing out its list.
Fixes marked object harddels (I'm coming for you admin team)
Fixes a language based human harddel
Fixes managed overlay related harddels (This was just emissive blockers, but I think this is a good safety net to have. If we clear the overlay list we should clear this one as well)
Fixes bot core harddels, I hate the fact that this exists but it has no reason to know who its owner is
Adds a walk(src, 0) to simple_animal destroy, it's the best bang for the buck in terms of stopping spurious harddels. Walk related harddels aren't that expensive in the first place, since byond does the same thing I'm doing here, but this makes finding mob harddels easier, so let's go with it
I fixed another source of part harddels, I hate fullupgrade so much
Fixes all the sound loop harddels
2021-05-05 10:57:27 -04:00
Jonathan Rubenstein 456e475da5 Renews Maintenance Drones (#58249)
It's the second try! (First: #48456)

Drones are little robots inspired by Keepers from the Mass Effect games. With laws to maintain both the station, and their distance from the matters of others, they were a great ghost role that let you fix up the station when you were otherwise out of the round. They were in the game for quite a while, but were abused. The abusive players completely ignored the laws and did whatever they wanted. Being tiny ventcrawlers, this became a huge issue for admins.

I attempted to bring them back, this time with some gameplay restrictions to enforce their laws a bit better. It seemed to go well, but I required headmin approval, and this all happened near a headmin election, so the project died.

Recently, some people have wanted to bring drones back. So, they gave me a ring, and I started a discussion with the admin team to see what other changes they would want in addition to the previous ones.

Here are those changes:

    They can't interact at all when close to another being, living or dead
    Their binary chat has been removed to separate them from AI and borgs
    They can only hold a whitelist of items necessary to do their job
    They can only interact with machines necessary to do their job
    The drone satchel is gone, and drones now have built in basic tools
    They also can't interact in some blacklisted high risk areas
    Finally, you must play 40 hours total as a Silicon role in order to play as a drone

Additionally, the drone dispenser is not mapped, and the drones must be researched to be constructed.
Why It's Good For The Game

Drones are a fun way to pass the time, and this time they have a lot less freedom. You can still perform the basic function of maintaining the station, but not without difficulty and tedium. This will allow other station roles to perform much better than the drones, while still letting them chug along at their slower pace.
2021-04-13 13:10:36 +12:00
tralezab e09101cb4b Pirates are split into three different ghastly crews! (#56264)
Co-authored-by: DeAndre <robustness13@hotmail.com>
Co-authored-by: itseasytosee <55666666+itseasytosee@users.noreply.github.com>
Co-authored-by: tgstation-server <tgstation-server@tgstation13.org>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-02-14 16:55:37 -08: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
IndieanaJones 0279109cf9 Spider Rework (#54451)
Spider refactor and hostile animal stamina changes.
2020-11-10 15:31:08 +01:00
skoglol d4d754a107 Adds nekomimetic, the felinid language (#52958)
Currently felinids are the only roundstart species without a language, this sees to that.
Changelog

cl Skoglol
add: Adds nekomimetic.
/cl
2020-08-20 09:09:53 +12:00
Timberpoes 19c3bbde31 Cleanup up all instances of using var/ definitions in proc parameters. (#52728)
* var/list cleanup

* The rest of the owl

* plushvar bad

* Can't follow my own advice.
2020-08-07 12:23:42 -03:00
RaveRadbury fae34292a7 Foreigner Quirk, Adds Galactic Uncommon (#50701)
* Adds Foreigner Quirk

Blocks Galactic Common

* Exceptions for species without secondary languages.

Adds beachtongue for humans and felinids

* Adds Galactic Uncommon

* Adds uncommon include into the .dme

Gotta tick that box
2020-04-30 21:38:46 -03:00
IndieanaJones e99b50a7d5 [READY] Reworks the Venus Human Trap (#49736)
* Update venus_human_trap.dm

* Update venus_human_trap.dm

* Update spacevine.dm

* Update venus_human_trap.dm

* Update language_holder.dm

* Update venus_human_trap.dm

* Update spacevine.dm

* Update code/modules/events/spacevine.dm

Co-Authored-By: spookydonut <github@spooksoftware.com>

* Update code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm

Co-Authored-By: spookydonut <github@spooksoftware.com>

* Update code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm

Co-Authored-By: spookydonut <github@spooksoftware.com>

* Update code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm

Co-Authored-By: spookydonut <github@spooksoftware.com>

* Update code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm

Co-Authored-By: spookydonut <github@spooksoftware.com>

* Appease the Great Circular One

* Update code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm

Co-Authored-By: Rohesie <rohesie@gmail.com>

* Update code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm

Co-Authored-By: Rohesie <rohesie@gmail.com>

* Update code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm

Co-Authored-By: Rohesie <rohesie@gmail.com>

* Update code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm

Co-Authored-By: Rohesie <rohesie@gmail.com>

* Update venus_human_trap.dm

* Fix Spacing

* Update code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm

Co-Authored-By: Rohesie <rohesie@gmail.com>

Co-authored-by: spookydonut <github@spooksoftware.com>
Co-authored-by: Rohesie <rohesie@gmail.com>
2020-03-21 20:51:50 -03:00
EOBGames fb1b9127ce New racial languages (#48309)
* Racial Languages

Adds a whole bunch of racial languages.

* Travis you are a cruel mistress

Snarky comments will be the death of me

* Better names, better language distribution

Decided to take some suggestions from the github and discord

* 2001: A Space Indent Odyssey

Fixed that stuff for you, green name man
2019-12-24 16:08:43 +01:00
skoglol 4a487ca803 Refactors language holder (#48106)
* Language holder refactor

* Ironed out bugs, testing

* adds sourced language, blocking list. more useful helpers.

* Replaced old usage

* Adresses requests

* Autodoc attempt #1

* Fixed monkeyize (again)

* Travis happy

* Language menu updated

* Final pass
2019-12-18 22:22:12 +01:00
KomradeSpectre 9ff071af60 Clockcult Removal 2019 (#47057)
* Nanotrasen fires the Wave Motion Gun at the Clock Cult

* Fixes a random changelog appearing from the reebe void.

* Fixes a wrong type reference regarding the bronze sheets in the Lavaland Ruin for it.

* Fixes redundant cells after CC removal in ruin by populating them with varied ore chunks, or destruction clutter.

* why is it /obj/item/stack/sheet/metal but not /obj/item/stack/sheet/iron

* Fixes the lavaland ratvar ruin to have fluff variant structures of deleted shit it referenced instead what I thought was reasonable.
2019-10-15 10:13:41 +02:00
Cruix dedf5f5ed9 Disease antagonist (#35988)
* Virus antagonist initial commit

* Updated disease code

* Sentient virus improvements

* Renamed /mob/living/var/viruses to diseases, and /mob/living/var/resistances to disease_resistances

* Added sentient virus event

* Renamed VIRUS defines to DISEASE defines

* Fixed bugs in rewritten disease code

* Fixed advanced disease Copy()

* Finalized disease antagonist

* Made cooldown buttons stop processing if they are removed from an owner.
Made sentient disease active sneeze and cough not available if the host is unconscious.
Made sentient disease menu refresh when adaptations are ready or hosts are added or removed.
Made sentient disease following use movement signals instead of fastprocess.

* Added better icons to sentient disease abilities
2018-03-05 13:55:10 +01:00
XDTM f4847c230e [Ready]Minor Slime Update: slimepeople get the slime language, slimes speak slime instead of common (#33773)
* Minor Slime Update: slimepeople get the slime language, slimes speak the slime language instead of common

* shadow language

* shadows part 2
2018-01-25 08:47:21 +13:00
nicbn 77a2d3f5cd Replaces "istype"s with is_helpers macros (#28676) 2017-06-22 15:03:19 -03:00
Leo 6f8c3fdf29 Merge pull request #27676 from KorPhaeron/shade
Makes shades/constructs able to speak galcommon again
2017-05-26 20:03:47 -03:00
KorPhaeron c5b5939311 Language 2017-05-25 18:20:38 -04:00
Jack Edge 963e19dcdf A silicon will always be able to speak Galactic Common
🆑 coiax
add: Galactic Common has been added to silicon's internal language
database, meaning even if a cyborg is created from someone who
previously did not know Galactic Common, they will be able to speak it
as a silicon.
/🆑

An oversight on my part. Otherwise, when you borg xeno brains, they'll
only be able to speak xeno, Draconic and EAL, which is a little silly.
2017-05-21 13:14:41 +01:00
Jack Edge 401361bbfd Adds a proc for copying languages from another thing
This has been asked for by the design lead.

`bob.copy_known_languages_from(alice)` will grant Bob all of Alice's
known languages.

`bob.copy_known_languages_from(eve, replace=TRUE)` will replace all of
Bob's known languages with Eve's known language.

Valid arguments are language holders, mind datums, and atom/movables.
2017-05-15 16:22:27 +01:00
Cyberboss f71c042021 Fixes language_holder's Destroy (#27204) 2017-05-14 21:44:12 -03:00
Joan Lung 5ce91a8230 Cultists of Nar-sie have their own language (#26952) 2017-05-07 08:06:38 -03:00
coiax b633cd6ba2 Moves languages to a holder datum, gives mind its own language holder (#26776)
* Ghosts now have a language menu

🆑 coiax
add: Ghosts can now modify their own understood languages with the
language menu.
/🆑

- Language menu is now on /atom/movable, and can be opened by any atom
with the `open_language_menu` proc.
- Used for testing, and simulating what various station members hear.

* Language holders, I

* Language holder, II

* Dos line endings

* MIND LANGUAGES

* Fixes some mobs not having language holders in their minds

* Shadow languages

* How did you lose the holder?

* Mob level IC->Open Language Menu verb

* Gives draconic to silicons

* Lazy breeki

* Use of pre-initialized global lists for languages

* Fixes bugs with lazy holders
2017-05-05 15:12:27 +02:00