Commit Graph

90 Commits

Author SHA1 Message Date
MrPerson
f7eb2c905b Unicode awareness Part 2 -- copytext() (#48512)
* Unicode support Part 2 -- copytext()

This is the transition of all copytext() calls to be unicode aware and also some nearby calls in the same functions. Most things are just replacing copytext() with copytext_char() as a terrible character limiter but a few others were slightly more involved.

I replaced a ton of
````
var/something = sanitize(input())
something = copytext(something, 1, MAX_MESSAGE_LEN)
````

with a single stripped_input() call. stripped_input() already calls html_encode(), trim(), and some other sanitization so there shouldn't be any major issues there.

This is still VERY rough btw; DNA is a mess, the status displays are complete ass, there's a copytext() in code\datums\shuttles.dm that I'm not sure what to do with, and I didn't touch anything in the tools folder. I haven't tested this much at all yet, I only got it to compile earlier this morning. There's also likely to be weird bugs until I get around to fixing length(), findtext(), and the rest of the string procs.

* Makes the code functional

* Assume color hex strings are always # followed by ascii.
Properly encodes and decodes the stuff in mob_helpers.dm which fixes some issues there.

* Removes ninjaspeak since it's unused
2020-01-18 13:07:22 +13:00
Jordie
3ef6beb0d9 Merge pull request #48637 from Ghommie/Ghommie-tg14
Fixes traitor codewords highlight and some other hear signal hooks.
2020-01-10 22:26:18 +11:00
MrPerson
d5b98c4d8d Unicode support Part 1 (#48304)
* Unicode support Part 1

Makes all calls to ascii2text() and text2ascii() unicode aware as well as all calls in code/__HELPERS/text.dm.

Adds defines for the footext_char() procs to maintain 512 support.

I did some cleanup on the text helpers since a lot of them were really, really bad.

reject_bad_text() and reject_bad_name() have an arg to reject non-ascii chars which defaults to TRUE.

* Give travis a more recent beta

* Ultimate compat
Added the _char procs I was missing
Test the build instead of the version because Lummox is a goddamn moron

* Suggested fixes, removes the last of the dd_ helpers

* Reading the reference is very important!

* Minor code improvements and a comment

* Typo
2020-01-07 09:25:47 +01:00
Ghommie
ba9122d606 Fixes traitor codewords highlight and some other hear signal hooks. 2020-01-06 17:06:59 +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
Emmett Gaines
53952e7622 Keybindable emotes followup (#47868)
Keybindable emotes followup
2019-11-19 16:54:30 -08:00
skoglol
1be2774ee5 Gives body back to owner on split personality death (#47809) 2019-11-16 20:34:14 -05:00
spookydonut
2591ce17a6 Travis EOF newline detection v3 (#47539)
* scream

* aaa

* aaa

* new one
2019-11-04 19:16:50 -08:00
kingofkosmos
228b4282ca Merge branch 'master' of https://github.com/tgstation/tgstation into misc_span_fixes1
# Conflicts:
#	code/game/objects/items/devices/PDA/PDA.dm
#	code/modules/mob/dead/new_player/new_player.dm
2019-10-13 15:21:17 +03:00
James
a05d954b45 Split personalities can now communicate directly (#46875)
About The Pull Request

This PR allows people with the split personality trauma to communicate with the stranger and vice versa through an action button. I also considered adding an option for the active player to release control but I felt that would be breaking the spirit of brain traumas a bit much.
Why It's Good For The Game

Split personality has always been a situation where the second player's only real option is "How many times can I shout "I'm Gay"/WGW over radio and try and avoid surgery until I inevitably get removed?" Don't get me wrong, you can still do that, but I aim in this PR to give players another option to get some of that sweet RP in. The main argument I can see coming up against this change is that traumas are supposed to be negatives, but how I see it, this doesn't make Split Personality a positive trauma so much as it allows roleplay similar to how you can roleplay as a paraplegic war veteran or as an ex-security officer who developed a phobia following an 'incident'. I'm happy to add a cooldown to the action if it proves to be an issue.
Changelog

cl
add: Split personalities can now communicate with an action button
/cl
2019-10-13 16:54:12 +13:00
kingofkosmos
280d416d4f Adds missing spans, missing periods and missing span endings. Also changes spans to suit the situation better. 2019-10-12 19:34:11 +03:00
nemvar
c38a7a3bb5 Removes a bunch of var/ in procs (#46946)
* Removes a bunch of /var in procs

* reset this

* Why wasn't this already?
2019-10-10 04:20:27 -07:00
Rob Bailey
2029163d33 playsound vary boolean define conversion (#46254)
About The Pull Request

Converts every single usage of playsound's vary parameter to use the boolean define instead of 1 or 0. I'm tired of people copypasting the incorrect usage.
Also changes a couple of places where a list was picked from instead of using get_sfx internal calls

This was done via regex:
(playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\)) to match 1
(playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\)) to match 0
full sed commands:
/(playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\))/\1TRUE\2/ 1 to TRUE
/(playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\))/\1FALSE\2/ 0 to FALSE

I'm not very good with regex and these could probably be optimized, but they worked.
Why It's Good For The Game

Code usability
2019-08-30 18:45:20 +12:00
RandolfTheMeh
319c2cf52b Imaginary Friend/Split Personality Trauma Fixes (#45681)
* no more dead friends

* Removed client check on split_personality because I for one would like to see a genetics test subject gain sentience
2019-08-05 18:58:29 -07:00
Rob Bailey
1a24447a82 forced doesn't trigger spam detection (#45571)
* eminence

* imaginary friend

* blob overmind

* say
2019-07-30 19:08:08 +12:00
XDTM
df501cdb12 Adds two new traumas, Mind Echo and Existential Crisis (#44865)
About The Pull Request

Re-opening of #42644

Adds two new traumas in the trauma pool.
Mind Echo: a mild trauma that records what the patient hears and says, and occasionally replaces heard or spoken messages with one of the recorded ones.
Existential Crisis: a special trauma that causes spontaneous temporary non-existence, which works like a desynchronizer does.
Why It's Good For The Game

More variety in traumas!
Changelog

cl XDTM
add: Added two new traumas in the trauma pool: Mind Echo (mild) and Existential Crisis (special).
/cl
2019-07-19 22:45:47 +12:00
XDTM
5dde55dd7d . 2019-06-19 18:45:18 +02:00
XDTM
b5f1d36287 Hypnosis and Abductor mind control now have alerts 2019-06-19 18:28:44 +02:00
YPOQ
94d1203276 Fix obsessed not respecting player preferences (#44609)
Also fixes a runtime due to a missing early return
2019-06-18 13:29:07 -07:00
XDTM
020f51dc08 Makes beepsky smash less real (#44591) 2019-06-18 12:06:34 -04:00
nemvar
77ead28940 Fixes autophobia. (the fear of oneself) (#44392)
* autophobia

* Much better.
2019-06-11 13:50:31 +02:00
vuonojenmustaturska
0254559eca Replaces hear_intercept with signals, refactors MOVABLE_HEAR, touches up nanites and to_chat (#44391)
hear_intercept is removed in favor of having the things that care register for the COMSIG_MOVABLE_HEAR signal instead.

The signal has been changed to be like the speech one with an args list.

Nanite datums no longer register for the hearing signal just in case, only the voice sensor nanite program does.

Dead code has been removed from to_chat, the savefile/sound checks being just-in-case boilerplate checks made during the conversion to to_chat, the replacetexts sidestepping a byond bug that was fixed in 512.1420.
2019-06-10 10:43:12 +12: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
Emmett Gaines
c3f95024b2 Gets rid of the GetComponent macros (#44220)
* Removes the GetComponent macros

* Regex replacement for GET_COMPONENT

Search: `GET_COMPONENT\( *(.+?) *, *(.+?) *\)`
Replace: `var$2/$1 = GetComponent($2)`

* Regex replacement for GET_COMPONENT_FROM

Search: `GET_COMPONENT_FROM\( *(.+?) *, *(.+?) *, *(.+?) *\)`
Replace: `var$2/$1 = $3.GetComponent($2)`
2019-06-04 17:39:58 +02:00
skoglol
f781e649c7 Adds "Never for this round" to a few more ghost rolls. 2019-05-29 23:25:56 +02:00
vuonojenmustaturska
fb45b7a017 Turns trait accessors into defines, fixes some bugs (#43820)
It's free performance.
2019-05-06 19:44:05 -04:00
Strommer Kilian
9529063aa3 New brain trauma: expressive aphasia (#43608)
* new mutation: simple speech

* finalize simple speech and fix word list apostrophes

* Is now a brain trauma instead

* fix merge conflict

* grammer fix

* cleanup cause I'm an idiot

* made the suffix list a bit easier to read

* fix traits.dm
2019-05-02 19:48:38 +12:00
nemvar
73eb5d88af Fixes bathsalt brawling and beepsky smash (#43746) 2019-04-29 23:52:19 +02:00
Tlaltecuhtli
85c1485bab [ready] beepsky smash change (#43228)
* 1

* 2

* 3

* temp

* r

* rogue space

* e

* e

Co-Authored-By: Tlaltecuhtli <33834933+Tlaltecuhtli@users.noreply.github.com>

* restarts appveyor
2019-03-25 12:03:51 -04:00
tralezab
9e4856d55d [READY] dilutes the staff of chaos pool with some more bolts (#42719)
* staves

* projectiles

* sapped event

* last of the staves (need to sprite and get sounds)

* last of the projectiles

* Squash is a single-use plant in Plants vs. Zombies and returns as a premium plant in Plants vs. Zombies 2.

* removes staff of cooperation, adds fly magic status effect

* a couple things with flight + tweaks

* removes old bolts/staves, finishes and adds parts of the new set

* fixes

* fetching + flying fixes, added chill and wipe

* and done

* cobblestone's review
2019-03-08 08:24:57 -05:00
tralezab
86a6ead838 My summoning begins your debt, reviewer. 2019-02-26 09:03:36 -08:00
oranges
fca3d16576 Hypnosis code improvements
Hypnosis no longer runtimes forever if it can't generate a valid regex
from the user phrase

Hypnosis also no longer constantly regenerates the regex and instead
just matches using the existing regex
2019-02-25 05:31:44 +00:00
tralezab
46e3894bb2 Creep fluff completely rewritten (#42675)
* hang in there!

* Apply suggestions from code review - rewrite P1

Co-Authored-By: tralezab <40974010+tralezab@users.noreply.github.com>

* most creep > obsessed - rewrite P2

* removes creep_inlove, last edit to greet
2019-02-08 11:26:41 -05:00
PKPenguin321
cefe4a6a51 [Ready] Adds 5 new negative/minor negative mutations, mutation conflict system (#42524)
* adds 5 new (minor) negative mutations
also adds a mutation conflict system

* removes debug comments and to_chat(world)s

* addresses reviews

* further review addressing, new message
and a message given to the subject when a mutation fails to manifest because of conflicts

* cooldown on acid flesh message
2019-02-07 23:08:29 -05:00
coiax
2ed34af9c0 Adds Paraplegic quirk (#42503)
🆑
add: Adds the Paraplegic quirk for -3 points. You start with unhealable leg paralysis
(persists through cloning), and have a wheelchair to move around the station.
/🆑

This is really popular for some reason.

This required a surprising amount of small code tweaks for it to "feel"
right in edge cases like being a job that had items in their hands or
joining on the arrivals shuttle.

Justification for -3 points: You move REALLY slowly, in a game that's
about generally running from security/the guy with the esword. And if
you die and get cloned and don't have your chair, you move even slower.
2019-01-30 12:08:54 -05:00
coiax
e65e50e8d9 Traumas are copied when a person is cloned (#41852)
* Traumas are copied when a person is cloned

🆑 coiax
add: When a person is cloned, any mental traumas are cloned as well.
/🆑

If the cloner is going to recreate your delicate personality, it's going
to have to recreate anything wrong with your brain as well. After all,
where does one greytider's legitimate fear of security end, and another
one's irrational fear begin?

Essentially, traumas could be easily gotten rid of by cloning, or death
would rob a person of a rare positive trauma. Now you're stuck with them
until you get rid of them.

* Suggested changes
2019-01-30 11:36:20 -05:00
tralezab
b7c5559146 [READY] fixes roles that shouldn't be creepy being creepy and the jealousy objective asking you to assassinate the obsession + missed sanity (#42389)
* adds station positions global list

* She don't believe in shootin' stars But she believe in shoes and cars Wood floors in the new apartment Couture from the store's department

* missed comma

* embarassing

* Update code/modules/antagonists/creep/creep.dm

Co-Authored-By: tralezab <40974010+tralezab@users.noreply.github.com>

* parentheses

* shiver me timbers

* Hey, great work Mac! Now let's take down the next circuit!

* a plethora of fixes
2019-01-22 22:15:02 +11:00
coiax
dd22f63ca8 Fix communication disorder plus mutadone causing chat spam (#42340) 2019-01-15 17:18:22 -08:00
Jack Edge
356c960ceb Gaining the creep trauma no longer happens via brain damage
🆑 coiax
tweak: The creep trauma/antagonist is no longer gained via brain damage.
/🆑

Stops self-antaging from repeated brain damage/healing, and also just
generally leaves it only assigned via the event or admins.
2019-01-10 21:28:35 +00:00
coiax
00b53b276a Improves quality of flavoured cigarettes (#42181)
* Improves quality of flavoured cigarettes

* Menthol cigs taste equally of smoke and mint while still buffing
2019-01-09 14:00:54 -05:00
tralezab
240cb31e12 [READY] New Side Antagonist: The Creep! (#42021)
cl
add: Added a new antagonist, the Creep!
add: Chosen from a random event, the Creep will become obsessed with one person, feeling amazing around them and terrible when they aren't. They will have objectives to steal heirlooms, take pictures, hug, and kill coworkers. They also have to kill the obsession but some objectives can only be completed while the obsession is alive, requiring you to protect the obsession!
/cl

There really is no reason to betray people, generally. Maybe some stuff with security and traitors working things out, but a traitor based around betrayal and the general insane creep idea is just cool.

One Creep can show up, and they get objectives to mess with their obsession leading to the obsession's death. Here is their objectives:

    A random creepy objective. It could be taking a photo with them in it, hugging them, etc
    After your are done with your objectives, kill them. you can't complete the objectives when they are dead!

Creeps do not get the determination mood. Instead, when they are around their obsession, they feel AMAZING! If they are around too long, they will stutter, cough, and generally spaghetti out when talking near their obsession. So if you are going to talk near them, do it when you aren't entranced.
2019-01-07 19:18:35 +13:00
coiax
99db213f69 Change concussion scan_desc from 'a concussion' to 'concussion' (#42077)
This person has a "deep-rooted a concussion".
2018-12-27 11:41:25 -08:00
coiax
9f3e9a6960 Trauma bug fixes, stalking phantom balance (#42020)
* Traumas are copied when a person is cloned

🆑 coiax
add: When a person is cloned, any mental traumas are cloned as well.
/🆑

If the cloner is going to recreate your delicate personality, it's going
to have to recreate anything wrong with your brain as well. After all,
where does one greytider's legitimate fear of security end, and another
one's irrational fear begin?

Essentially, traumas could be easily gotten rid of by cloning, or death
would rob a person of a rare positive trauma. Now you're stuck with them
until you get rid of them.

* Suggested changes

* Removes cloning traumas

* No more cloning traumas
2018-12-23 16:52:47 +11:00
Jack Edge
c41e233631 Fixes bug where monophobia would rarely affect its sufferer
🆑 coiax
fix: Fixes bug where sufferers of monophobia would enter negative
stress levels when around people.
/🆑
2018-12-13 18:48:24 +00:00
Time-Green
29ecfa47bf [READY] Goon Genetics (#41258)
GENETICS

    The random hexadecimal rng game has been replaced with gene sequencing from goon.

    Adds mutation activators and mutators

    You can now store mutations

    Everyone now has their own set of unique mutations

    Limited mutations per person to 8 (including one always being monkey)

    Adds race specific mutations (See fire breathing for lizads)

    You can inspect discovered mutations, undiscovered mutations use an alias to recognize them by

    Adds a sequence analyzer. Can be used to scan someones genes sequence. Useful for determing what mutations they can safely have and or collecting data for very difficult sequences

    Adds mutation combining. It's currently only RADIOACTIVE + STRONG = HULK (So yes you will now need 2 mutations for to get hulk)

    Adds several other mutations. Telepathy, firebreath, glowy, radioactive and strength

cl Time-Green
add: Goon genetics!
add: More mutations! Fire breath for lizards! Radioactive! Telepathy! Glowy! Strength, though its cosmetic and should be combined with radioactivity instead! Fiery sweat!
add: Adds void magnet mutation by @tralezab !
/cl
2018-12-09 23:26:04 +13:00
tralezab
e68ad1829c Fix "severe severe monophobia" (#41850)
He's got more finesse than most goblins. He smashes windows with his fist
rather than his forehead.
2018-12-08 14:57:40 -08:00
XDTM
334a1d44f2 Adds the Curse of Madness to wizard spellbooks (#41496)
* Adds the Curse of Madness to the wizard's spellbook

* anti-magic check

* Update code/modules/antagonists/wizard/equipment/spellbook.dm

Co-Authored-By: XDTM <heliumt@yahoo.it>

* Magic traumas + magic immunity prevents spellcasting

* feedback

* fix

* fax

* Added two new special traumas

* I'm not mad, everyone else is

* New minor trauma, godwoken gives holy

* stalking phantom trauma

* math

* heartbeat

* Custom message
2018-12-02 09:46:10 -05:00
XDTM
e31d4f5d26 Makes paralysis trauma more modular, allows paralyzing single limbs (#41140)
* Makes paralysis more modular, allows paralyzing single limbs

* it begins

* Update bodyparts.dm

* damn webeditor
2018-11-15 12:38:01 +01:00
AnturK
2d80976068 Fixes some parlyze nonsense. (#41314) 2018-11-06 08:27:45 -05:00
Mickyan
c0ac8d514f Adds new moodlets, psychotropic drugs (#41207)
cl Mickyan
add: Added various new moodlets
add: Most notably, the Laughter chemical and breathing small quantities of N2O can improve mood
add: Psicodine: a new chemical that can restore sanity levels to normal and temporarily suppress phobias
add: Happiness: a homemade drug that supposedly gives a feeling of total bliss and.. emptiness? That can't be healthy... watch out for side effects.
fix: The suffocation moodlet now triggers correctly
fix: The drunk moodlet now clears as soon as the drunkenness wears off
/cl

Fixes #41170

List of new moodlets:
Jittery
Vomiting, vomiting all over yourself (gross)
Painful medicine application (silver sulfazine/styptic powder/syntflesh) - very short duration
Chemical euphoria (breathing N2O)
Laughter/Superlaughter reactions
Happiness drug related reactions

Psicodine: keeps your sanity at least above neutral level and suppresses phobias as long as it's in your system. Also available from pill bottles at the medivend at a premium.

Happiness: loosely inspired by Joy from LISA, very addictive, does minor brain damage, withdrawal makes you slowly go insane and overdose makes your mood jump all over the place. Also suppresses phobias. Good if you need a very quick and powerful boost but not very practical for keeping your mood up for long periods.
2018-11-04 15:01:05 +13:00