Commit Graph

119 Commits

Author SHA1 Message Date
SkyratBot
03298fddfd [MIRROR] Fixes split personality switching (#1488)
* Merge pull request #54610 from YPOQ/splitpersonalityfix

Fixes split personality switching

* Fixes split personality switching

Co-authored-by: Jordan Brown <Cyberboss@users.noreply.github.com>
2020-10-27 09:08:34 +00:00
SkyratBot
b8d9874c27 [MIRROR] Converts all A && A.B into A?.B (#1292)
* 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.

* Converts all A && A.B into A?.B

Co-authored-by: ZeWaka <zewakagamer@gmail.com>
2020-10-13 23:19:25 +02:00
SkyratBot
970a2b03d6 [MIRROR] Mobility refactor: no more update_mobility() (#1233)
* Mobility refactor: no more update_mobility()

* Update robot.dm

Fixes robots.

* megadumb

* Update robot.dm

* weh

* Update gunpoint_datum.dm

Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-10-10 02:31:35 +02:00
SkyratBot
7eeaefe645 [MIRROR] Fixes some potential sleeps as detected by SpacemanDMM improvements (#1216)
* Fix some potential sleeps as detected by SpacemanDMM improvements (#54230)

overrides weren't detected by should not sleep, i think i've mostly
fixed that with SpaceManiac/SpacemanDMM#214

Some of these are wacky but overall this pr is harmless

signals shouldnt sleep even in weird 1 in a million situations or due
to other people adding bad code

overrides of changeling can_sting() use alert() and input() and that's
just too fucked for me to fix in this pr

* Fixes some potential sleeps as detected by SpacemanDMM improvements

Co-authored-by: spookydonut <github@spooksoftware.com>
2020-10-09 18:28:59 +02:00
SkyratBot
35cbcf8a8b [MIRROR] replaces a cursed proc in trauma code with a blessed signal (#1184)
* replaces a cursed proc in trauma code with a blessed signal (#54208)

code: some cursed snowflake proc call now uses a blessed signal in trauma code

* replaces a cursed proc in trauma code with a blessed signal

Co-authored-by: Qustinnus <Floydje123@hotmail.com>
2020-10-07 15:58:16 +02:00
Azarak
5e78d0615b Update mild.dm (#1104) 2020-10-01 21:04:38 +01:00
SkyratBot
7c4b7cdb9a [MIRROR] limb disabled refactor (#757)
* limb disabled refactor (#53374)

    Fixes #53219
    Nukes is_disabled()
    Turns several variable value changes into events.
    bodypart_disabled turned into a boolean value.
    BODYPART_DISABLED_WOUND turned into TRAIT_DISABLED_BY_WOUND. Not the cleanest thing out there, but it works.
    Cleans some code and reduces number of updates, as only the extremities have a disabled effect.

* limb disabled refactor

Co-authored-by: Rohesie <rohesie@gmail.com>
2020-09-11 23:21:46 +02:00
SkyratBot
24502daba9 [MIRROR] Reenables SHOULD_NOT_SLEEP on initialize (#650)
* Reenables SHOULD_NOT_SLEEP on initialize (#53378)

* Reenables SHOULD_NOT_SLEEP on initialize

Co-authored-by: TiviPlus <57223640+TiviPlus@users.noreply.github.com>
2020-09-06 05:15:19 +02:00
SkyratBot
7f3a2027cc [MIRROR] Polling ghost candidates now uses real names (#480)
* Polling ghost candidates now uses real names (#53122)

* Polling ghost candidates now uses real names

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-08-23 20:43:25 +02:00
SkyratBot
e65a48e91f [MIRROR] Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking (#430)
* Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking (#52761)

Adds SIGNAL_HANDLER, a macro that sets SHOULD_NOT_SLEEP(TRUE). This should ideally be required on all new signal callbacks.

Adds BLOCKING_SIGNAL_HANDLER, a macro that does nothing except symbolize "this is an older signal that didn't necessitate a code rewrite". It should not be allowed for new work.

This comes from discussion around #52735, which yields by calling input, and (though it sets the return type beforehand) will not properly return the flag to prevent attack from slapping.

To fix 60% of the yielding cases, WrapAdminProcCall no longer waits for another admin's proc call to finish. I'm not an admin, so I don't know how many behinds this has saved, but if this is problematic for admins I can just make it so that it lets you do it anyway. I'm not sure what the point of this babysitting was anyway.

Requested by @optimumtact.
Changelog

cl
admin: Calling a proc while another admin is calling one will no longer wait for the first to finish. You will simply just have to call it again.
/cl

* Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-08-19 20:17:28 -04:00
SkyratBot
c5c00fc6ff [MIRROR] Confusion will no longer continue to confuse after being cured (#213)
* 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

* Confusion will no longer continue to confuse after being cured

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-08-06 01:02:19 +01:00
RaveRadbury
11fda03cc4 Insect phobia (#52261)
* Add insect phobia

applies to moths, flies, and cockroaches

* Adds bee content
2020-07-20 18:27:55 -03:00
LemonInTheDark
d3f9b70c0f Adds a message modification packet to saycode to allow for unordered parsing of operator chars, like ;, #, :, or % (#51790) 2020-07-18 18:18:23 +02:00
skoglol
d513b14a58 Catatonics no longer get split personalities. (#52118)
* Catatonics no longer get split personalities.

* No switching to ssd either
2020-07-13 11:38:17 +02:00
Ryll Ryll
4a481bc861 Adds eye contact (#52108)
* doesn't do it for me

* signal and hijinx

* creep stare

* less lazy code
2020-07-12 03:39:57 +10:00
Ryll Ryll
0f6496a55c [READY] Adds Medical Wounds: Bamboo Bones and the Skin of Your Teeth (#50558)
About The Pull Request

This PR adds medical wounds, new forms of injuries that people can suffer that cause debilitation and complications, and often require more than what can be found in a medkit to treat. But let's be honest, big complicated walls of text about medical changes make people's eyes glaze over easily- so I created a handy infograph to explain the basics!

Also there's a full guide here!

dreamseeker_2020-04-18_20-42-19.png

The infograph may not be fully up to date with the specifics of the PR's status, but it'll be updated along with major changes so people have something to use as a crash course for familiarizing themselves with how wounds function. I also have another infograph with all 9 of the possible initial wounds coming, and will be up soon. You can also find the longform design doc here with more info on the broad details, including descriptions of treatments: hackmd whee
What this does

There's a lot to cover, but here's the bullet points of the main features and changes:

    Getting lots of damage on a limb can result in wounds, with more damage causing worse wounds. These can range from dislocated joints and minor cuts to compound fractures and fourth degree burns, and can affect you in different ways depending on what bodypart they're applied to (namely with broken bones).
    You can damage individual bodyparts on clothing (only jumpsuits for now) through the use of lasers and sharp weapons. Bodyparts that reach max damage are considered "shredded" and will not apply any protection for that zone until it is repaired with cloth. If all zones are disabled, the entire piece of clothing is shredded and unwearable until repaired with 3 cloth. Jumpsuits give a small amount of wound protection, and since sharp weapons and lasers generally get extra wound bonuses against bare flesh, even a plain jumpsuit provides decent protection from a few laser shots or scalpel stabs.
    Lasers gain a powerful niche versus unarmored/lightly armored carbons! As noted above, lasers can shred clothing and burn away zones of jumpsuits in 2 shots each, after which the target's bare flesh is exposed (barring other clothing), and lasers excel at dealing burn wounds against uncovered skin. Think big, nasty charring!
    Bleeding is now totally limb based, and gauze is as well. Bleeding is also 95% cut wound based, meaning sharp weapons make you bleed rather than just having 40+ brute on a limb.
    The more wounds and damage you get on a bodypart, the easier it'll be to gain more severe wounds. Wounds are arranged from Moderate, to Severe, to Critical in increasing severity, and you'll generally have to suffer the lesser ones before getting the worse ones.

dreamseeker_2020-05-15_03-15-59.png
Above: Someone having an incredibly bad day from bloodloss

dreamseeker_2020-05-04_22-29-29.png
Above: Scars from healed wounds

ShareX_2020-05-15_06-55-20.png
Above: Actual combat involving someone's head getting cracked

Here's a quick, if non-exhaustive, list of things I have left to do before I consider it feature complete

Finish adding treatments for each wound type/severity (mostly surgeries/triage for critical wounds)
Add second winds for bad injuries to give the victim a chance to get away
Flesh out severe & critical injuries in general
Find sprites for the bonesetter, bone gel, and anything else that might be needed
Add the medical items for treating the less severe wounds to the station
Polish code and remove any redundancies I left behind

    Quick balance pass to make sure nothing is horribly abuseable

Why It's Good For The Game

Adds a flexible new system for representing damage on carbons with injuries that can be treated in different ways. Moderate wounds from getting toolboxed or sliced with a scalpel can usually be treated by a buddy or even by yourself with the right tools, but getting flayed with a fireaxe or a laser gun emptied into your bare skin may require extra attention or even surgery in bad cases! Also makes laser guns cooler and more like 40k lasguns that can flash fry people (cool!)

This should also make spessmen more resilient and harder to kill outright, while still adding consequences and complications to getting hurt. Wounds aren't immediately fatal, but they can do things like slow down interactions, deal damage over time through infections, and generally make you more fragile until fixed. They can also give you a "second wind" on being applied that gives you a small adrenaline boost (or whatever) to help disengage and escape immediate danger.
Changelog

🆑 Ryll/Shaps
add: Introduces medical wounds, new injuries that can happen to fleshy carbons when they sustain lots of damage on a bodypart. There's quite a lot of change here, but you can read the guide at: https://tgstation13.org/wiki/Guide_to_wounds and an extended changelog is available here: https://hackmd.io/l_FI9b3tSqa_woDadewJXA
add: Introduces scars and temporal scarring! Healing a wound leaves a scar behind that can be seen by examining someone twice rapidly, and if Temporal Scarring is enabled in character prefs, surviving a round with scars will save them to be granted at roundstart another round! Let your body tell stories!
tweak: Bleeding is now fully bodypart-focused, and 95% of bleeding comes from cut wounds from sharp weapons. Gauze is applied on a limb-by-limb basis, and helps staunch bloodflow rather than totally stop it. Notably, you no longer bleed just from having 40+ brute damage on a limb.
del: Organic bodyparts are no longer disabled at maximum damage, but are easier to cause wounds to
add: O2 medkits in emergency lockers have been replaced with new emergency medkits with basic tools for diagnosing and treating wounds and basic damage
tweak: Herapin now rapidly increases bleeding on all open cuts, rather than causing bleeding by itself. The more cuts on the target, the more it will affect them.
tweak: Neckgrab table slams now hit the targeted limb rather than just the head, with a large chance to dislocate or break a bone
tweak: Sharp weapons and burning weapons can now shred zones on jumpsuits, disabling protection on that limb. Damaged clothes can be repaired with cloth.
tweak: Slaughter demons now deal less raw damage, but gain the ability to cause cut wounds, which becomes more powerful with each attack on a humanoid but resets when bloodcrawling.
/🆑
2020-06-12 23:47:33 +12:00
William Wallace
ecdf74a329 phobias use less regular expressions and don't instantiate them all the time (#50631)
* individual phobia types now use a single regex that is cached

* move suffix out of phobia class
2020-04-26 19:54:21 +08:00
RaveRadbury
30444ee210 Fixes phobia issue, tweaks some phobia triggers (#50630)
Fixes phobia issue, tweaks some phobia triggers
2020-04-25 16:56:07 -07:00
Bobbahbrown
6578479184 [READY] Runechat: 'Runescape-like' Chat Message Overlays (It's back!) (#50608)
* first-version

* let's do those recommendations first

* color moment

* reorganization, prefs

* certified layer moment

* virtual speakers BEGONNE

* remove naughty bits, better sizing

* gimme the message mode

* rename that pesky pref and hide chat bubbles

* exponential decay moment

* async moment

* fixes

* fixes

* the players have decided they don't want to hear themselves on radio

* Fix bug with holograms incorrectly rendering messages

* rohesie's suggestion

* Color tweaks

* hallucinating now shows message properly

* pref moment

* updates

* rohesie's suggestions

* fix moment number 5

* less smelly more epic

* unfix the fixes and refix them

* a conscious change

* return of the prefs
2020-04-25 15:48:10 -03:00
Rohesie
0738549b5b Client loss on Login() handling (#50073)
The client variable can be nulled at any point between proc calls during Login(), at the very least between parent calls for sure. That can produce dirty additions to mob lists among other less problematic runtimes.
This attempts to handle it.
2020-04-07 08:13:38 +12:00
ShizCalev
0228bc2fbe Call the proper proc 2020-02-24 01:31:38 -05:00
ShizCalev
df81c5be4a Fixes blindfolds not properly counting as being blind 2020-02-24 01:10:34 -05:00
81Denton
3858591c78 Merge pull request #48965 from XDTM/MorQuantum
Adds the quantum alignment special brain trauma
2020-02-17 23:46:26 +01:00
XDTM
99500d05e0 Adds the Enhanced Interrogation Chamber as a BEPIS tech node (#49047)
About The Pull Request

Adds the Enhanced Interrogation Chamber as a BEPIS reward.

This security-only machine is able to implant a deep-rooted trigger phrase onto a subject; if they hear that phrase after the procedure, they will immediately enter a state of hypnotic trance, which can be used to demand truthful answers for your ongoing investigation.

The enslavement of criminal and non-criminal subjects is frowned upon by space law. Do not abuse the Enhanced Interrogation Chamber for personal gain.
Bad choice or mishandling of trigger words may lead to loss of control over the subject.

Side effects include dizziness, nausea, confusion, vomit, loss of eyesight, violent tendencies, loss of sanity, depression, oppression, loss of free will, spontaneous hypnotic trance, loss of hair, death.
Use with care.
Why It's Good For The Game

Make your own Manchurian Candidate!

Allows "rehabilitation" of dangerous criminals by security, which is more interesting than straight-up execution.
Could lead to fun situations if a team antag is caught and forced to be a mole.
It could also be used by any antag who manages to get to the sec protolathe.

However, the "conversion" is still shaky! The main cure is surgery, as the triggered trance is effectively just a brain trauma, healable with surgery. On top of this, even if the subject is unable to hear their trigger phrase, if someone else knows it they can override commands at any time. Even if that doesn't happen, it's possible that another message sneaks in before you can give your command, intercepting the hypnosis.
On top of this, the chamber has a 10% chance of giving the hypnotic stupor trauma instead of the triggered trance, making the subject even more of a wildcard.

Effectively, this is a very powerful tool in the antag-vs-security conflict, but over-reliance on it will probably bite back in amusing ways.
Changelog

cl
add: Added the Enhanced Interrogation Chamber as a BEPIS researchable tech.
add: The EIC can be used to implant trigger phrases in subjects that cause an instant hypnotic trance.
/cl
2020-02-18 09:34:14 +13:00
skoglol
a28b24f149 Completely removes cloning (#48668)
* Removed from code

* Removes cloners from maps

* Some more references, now compiles.

* Reduces availability of replica pods

* DNA scanner and tech disk rebranding

* pubby door name, cargo pack description
2020-02-04 16:04:06 -05:00
XDTM
c73edf0687 Update code/datums/brain_damage/special.dm
Co-Authored-By: trollbreeder <trollbreeder@users.noreply.github.com>
2020-02-02 02:35:49 +01:00
XDTM
bc80153456 Update code/datums/brain_damage/special.dm
Co-Authored-By: trollbreeder <trollbreeder@users.noreply.github.com>
2020-02-02 02:35:36 +01:00
AnturK
fa4297dbbe Fixes hypnosis regex. 2020-01-27 08:07:41 +01:00
XDTM
8f86156f9d Adds the quantum alignment special brain trauma 2020-01-23 21:07:09 +01:00
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