Skip to content

Latest commit

 

History

History
304 lines (214 loc) · 23.6 KB

2021-10-15.md

File metadata and controls

304 lines (214 loc) · 23.6 KB

< 2021-10-15 >

1,078,130 events, 606,367 push events, 968,879 commit messages, 79,308,744 characters

Friday 2021-10-15 00:37:49 by Adria Ivanitsky

finally fixed that stupid fucking annoying ass problem driving me inSANE OMG. DONE i am done


Friday 2021-10-15 04:21:29 by ms-mirror-bot

[MIRROR] The mole counts in the min checks in reactions.dm will now be multiplied by the inverse of the consumption multiplier. (#936)

  • The mole counts in the min checks in reactions.dm will now be multiplied by the inverse of the consumption multiplier. (#61557)

The moles in the min checks in reactions.dm will be multiplied by the inverse of the consumption multiplier. This will allow reactions to fully react when it has available gasses. It also makes some of the code easier to read.

Fixes (#61380)

From the issue report above:

Alright. So there's this pattern in reaction code

Looks like this

tgstation/code/modules/atmospherics/gasmixtures/reactions.dm

Lines 597 to 604 in 00154ae var/nob_formed = min((cached_gases[/datum/gas/nitrogen][MOLES] + cached_gases[/datum/gas/tritium][MOLES]) * 0.01, cached_gases[/datum/gas/tritium][MOLES] * 0.1, cached_gases[/datum/gas/nitrogen][MOLES] * 0.2) var/energy_produced = nob_formed * (NOBLIUM_FORMATION_ENERGY / (max(cached_gases[/datum/gas/bz][MOLES], 1))) if ((cached_gases[/datum/gas/tritium][MOLES] - 5 * nob_formed < 0) || (cached_gases[/datum/gas/nitrogen][MOLES] - 10 * nob_formed < 0)) return NO_REACTION

cached_gases[/datum/gas/tritium][MOLES] -= 5 * nob_formed cached_gases[/datum/gas/nitrogen][MOLES] -= 10 * nob_formed cached_gases[/datum/gas/hypernoblium][MOLES] += nob_formed

We take the minimum of a few values, theoretically because we want the reaction to run with the lowest amount feasible. So if there's 20 plasma, 10 o2, and 2 n2, and the reaction takes 4 parts plasma, 2 part o2, and 1 part n2, we'll only end up using 8 plasma, 4 o2, and 2 n2. Since we can't react without the n2 and all.

The if check is there to serve as a backup and prevent negative outputs, theoretically because they wreck havoc, though honestly they don't really, so long as the right bitflag is returned the whole mix is garbage collected anyway. Alright sanity check though. that's fine.

You notice how here, because he removes 5x nob formed from tritium, he includes that in the if check? If you scroll out to the right you'll notice that he multiplies the inputs in the min by the inverse of their scalar. At least that's what we want trying to do, mixed the two up.

You get the picture. The min serves to get the lowest possible amount to remove so the reaction can go through, and the if check serves as a sanity check wrapping around it.

The issue is people have been misusing it, for a good while. (Including in this instance) They most commonly forget to include the inverse scaling in the min(), which leads to these weird fucked phantom gas minimums that aren't listed anywhere, but still stop the reaction.

See:

tgstation/code/modules/atmospherics/gasmixtures/reactions.dm

Lines 690 to 697 in 00154ae var/heat_efficency = min(temperature * 0.3, cached_gases[/datum/gas/freon][MOLES], cached_gases[/datum/gas/bz][MOLES]) var/energy_used = heat_efficency * 9000 ASSERT_GAS(/datum/gas/healium, air) if ((cached_gases[/datum/gas/freon][MOLES] - heat_efficency * 2.75 < 0 ) || (cached_gases[/datum/gas/bz][MOLES] - heat_efficency * 0.25 < 0)) //Shouldn't produce gas from nothing. return NO_REACTION cached_gases[/datum/gas/freon][MOLES] -= heat_efficency * 2.75 cached_gases[/datum/gas/bz][MOLES] -= heat_efficency * 0.25 cached_gases[/datum/gas/healium][MOLES] += heat_efficency * 3

They need to be updated to not do this, and use min() properly. It leads to dumb graphs like this https://www.desmos.com/calculator/xufgz8piqw (Healium formation graphed out. p is freon, b is bz. if either are reduced below 0, the reaction stops. If you notice this leads to really strange scaling deadspots, and a lot of frustrating behavior)

Thanks to @ GuillaumePrata for bringing this to my attention, love you man.

  • The mole counts in the min checks in reactions.dm will now be multiplied by the inverse of the consumption multiplier.

Co-authored-by: Pickle-Coding 58013024+Pickle-Coding@users.noreply.github.com


Friday 2021-10-15 08:25:30 by Yura

Update 01300-01399.xml

Servitor Cure, Servitor Blessing, Wild Magic, Advanced Block, Pa'agrio's Honor, Ritual of Life, Chant of Predator, Chant of Eagle, Chant of Vampire, Body of Avatar, Summon Nightshade, Wind Vortex, Dark Vortex, Warrior Servitor, Wizard Servitor, Assassin Servitor, Prophecy of Fire, Prophecy of Wind, Block Shield, Block Wind Walk, Chant of Spirit, Chant of Victory, Seal of Despair, Seal of Disease, Greater Might, Greater Shield, War Chant, Chant of Earth, Holy Attack Resistance, Dark Attack Resistance, Magical Backfire, Clarity, Mana Burn


Friday 2021-10-15 12:46:15 by Imeguras

Finnaly Fixed Connect and Disconnect

The Program however is still a bunch of spaghetti code and althought its the choosen structure. Honestly this is just a way for me to learn posix complaint shell scripting although if you are seeing this commit its most likely because i've made it "public". Anyway I might revisit this project to give it some optimizations. i believe that for now the program is more robust although less polished than the previous one (since the original used Bluetoothctl, while my fork uses busctl)

Also thanks to the SO user which gave me the tip to use busctl which although initially it was pretty vague the manual and the program is well made so was easy to see how everything works and to understand a more low level of it

I hope you don't cringe at my 30'000 errors on the description above and for now i have to eat, it wasn't easy writting this when i have like 30 flies just annoying me


Friday 2021-10-15 13:05:38 by Nate Graham

Guide users on what to do next if nothing was found in a search

When a new or relatively nontechnical user uses Discover to search for an app they know exists (like VLC, or Chrome, or TeamViewer) which just happens to not be in any configured repos due to distro packaging policies or lack of packaging resources, Discover says "Nothing found" and the user is left thinking one of two things:

"Man, Discover sure is stupid, it can't even find $APP!"

"Wow, this Linux thing sucks, they don't even have $APP!"

Neither is true, but by not showing the user the app they expect, Discover inadvertently creates these impressions in their minds, because they are not familiar with the concept of divergent and political distro packaging policies--and frankly, they probably don't care. As a result, Discover and KDE look stupid, and FOSS environments are tarnished in the user's mind. This user knows that the app in question exists, and they want to use it, so what are they going to do next? Search the web for it, just like they did on Windows or macOS, which is where they found it last time they needed to install it.

This commit attempts to improve the situation by having Discover show an extended message that helps to explain the situation in this case, and directs users to the web with a helpful button they can click on to perform a DuckDuckGo search for "Linux $SEARCH_TERM". This accomplishes several things:

  1. It helps the user understand that Discover isn't at fault here
  2. It blame-shifts the problem onto distros
  3. It makes Discover seem helpful and friendly for assisting the user in doing what they were going to do next anyway (search the web for it)
  4. It provides a warning that apps found on the web are more risky than apps in repos, as a simple CYA
  5. Introduces the concept of a non-Google search engine, planting the seed in the user's mind that it's possible to search the web without Google, in case they didn't already know this

Friday 2021-10-15 15:17:09 by Tristimdorion

Fixed: make sure so_relation / dick_pick / girl_friend nudes events are only active when requirements are met (unified checks in pure python). Modified: cousin_tease only active during day (no early morning or night time calls) Fixed: typo in morning_shower_criris => morning_shower_crisis


Friday 2021-10-15 18:54:04 by FoolsGold45

Hobbies Rebalance & Description Tweaks

  • Standardized most hobby names to all be in the format of a present participle-tense activity. Previously they were a mishmash of this format (such as "cooking", and "home gunsmithing"), professions ("Helicopter Pilot") and miscellaneous descriptions ("Loves Books"). Exceptions to this include the addiction "hobbies".

  • Changed the names of addiction "hobbies" to be "Dependences". The term "addiction" in substance abuse disorders refers to a pattern of use/behavior that continues despite clear negative effects on the individual, "dependence" is the chemical reaction leading to symptoms caused by withdrawal from the substance or behavior. The player character may have been in a pattern of addiction before the start of the game, or they may not have been. However, their withdrawal symptoms clearly show that they have a dependence on the various substances so I felt this was a more apt description.

  • Added the Insomniac trait to the Sleeping Pill Dependence and changed point cost from -1 to -2 to compensate (Insomniac itself is a -2 point cost trait, the sleeping pill dependence itself was previously -1 point). Also raised the addiction level from 10 to 20; in testing this leads to the player being unable to fall asleep without sleep meds even in a bed with a pillow if they're feeling "Tired". It will also make the dependence last longer and be a nuisance to the player from the start of the game, and even after the drug dependence is gone they will still need to contend with being an Insomniac.

  • Changed Crack, Painkiller, and Alcohol dependence from -1 to -2 points. Crack and Painkiller dependence are roughly as debilitating, for roughly the same amount of time, as Amphetamine dependence which is a -2 point hobby. Taking Alcohol Dependence includes the Disorganized trait, a -1 point trait, and I figured the alcohol dependence itself should be worth another -1.

  • Rebalance of various point values within hobbies. There are too many to practically list individually, but my thought process went as follows:

  1. The player should have a reason to pick a hobby over the raw skills/traits that the hobby provides. Sometimes this reason will be because the hobby grants access to a trait that otherwise cannot be taken at character creation. Other times it will be because the skills provided by a hobby will be worth 1 character creation point but split between two skills (for example in my rebalance of the Camping hobby, rather than 2 points in first aid the hobby provides 1 first aid and 1 cooking). In still other cases, the reason will be because the hobby grants one or more proficiencies, which are otherwise difficult to acquire at character creation.
  2. Skills granted by hobbies are given in the form of XP rather than raw skill points, so they are inherently less valuable than character creation points put into raw skills.
  3. Proficiencies are difficult to place point value on in their current iteration - they take a long time for a character to gain in-game, but their impact on gameplay is also arguably fairly minimal at this stage. As a result I've valued them on the lower end when it comes to hobby point costs, and been more generous giving them to different hobbies. For example I granted several new cooking-related proficiencies to the Cooking, Deep Frying, and Hombrewing hobbies. If a player is taking these hobbies to make their character strong at such a specific area of the game, their proficiencies should have a noticeable impact and affect enough recipes that their choice feels significant.

There are some hobbies (Target Shooting for example) that I couldn't find a way to make distinct from simply taking raw skill points or traits at character creation. I didn't want to go so far as to remove these hobbies from the list without further discussion with the community.

  • Went over the descriptions of various hobbies, trying to make them more standardized in length while better explaining the benefits and "playstyles" that they unlock, while avoiding making too many of them fit the mold of "You liked to X before the Cataclysm, maybe now this will be useful." Also removed some RP-unfriendly references within the hobbies (such as Chemical Cooking describing the character as a drug user who was cooking for themselves, or for Lockpicking describing the character as someone who got a thrill out of criminal lockpicking), and in cases where the description of a hobby was identical to an existing profession or trait, changing the description to be unique to the hobby.

Friday 2021-10-15 19:10:16 by sickcodes

Add The State of Missouri & St Louis Post-Dispath Incident (Started an HTML Decoding Meme)

When Entity Researcher(s) Topic Status
2021-10-15 The State of Missouri St. Louis Post-Dispatch State law vs. Good-faith research, alleged hacktivism. On October 12th, the Missouri Department of Elementary & Secondy Education was made aware of a vulnerability in a portal that was leaking personal information of Missouri educators. Missouri Gov. Mike Parson, in a press conference stated that at least 3 educators' data was specifically accessed. It is not know whether these 3 educators' data were used to validate the vulnerability, or whether they were specifically targeted by the researcher. It was stated that it would not be possible to download all of the personal data at once. Under 2017 Statute 569.095 of Missouri Law: "A person commits the offense of tampering with computer data if he or she knowingly and without authorization or without reasonable grounds to believe that he has such authorization: Accesses a computer, a computer system, or a computer network, and intentionally examines information about another person; a class A misdemeanor." The Gov. stated that this may cost at least $50 million dollars to patch, diverting Missouri State resources for Legal costs, the Cole County Prosecutor, and Missouri State Highway Patrol Digital Forensics Unit to investigate the alleged wrongdoing. Therein lies the issue, that had this vulnerability not been reported to the vendor, it would remain to be vulnerable. To complicate matters for both the researcher and the vendor (ITSD who programs & maintains the portal), it was alluded to during the press conference that the researcher was going to use the information for political gain, under the guise of research. In Missouri, it is unlawful to access "encoded" data, which may include viewing HTML source code and systems to Compromise to embarass the state and allegedly, "sell headlines," for their new outlet. Two issues that should be highlighted in this event is that is can be argued that is a Class A missdemeanour in Missouri to push the F12 key while browsing a website, but the researcher has also been alleged to either be employed by or have provided the data to a local news outlet, as a, "political vendetta," which could fall under bad-faith research, or hacktivism, if the data was published. Regardless, the embarassment of a leaky portal lies with the developer of the website, and the St. Louis Post-Dispath, stated "The newspaper delayed publishing this report to give the department time to take steps to protect teachers’ private information, and to allow the state to ensure no other agencies’ web applications contained similar vulnerabilities."

Friday 2021-10-15 19:46:39 by N. Taylor Mullen

Fix @using statement completion in _Imports.razor

  • This is part 2/2 to fix @using statement completion in Razor files. Part 1 is over in the dotnet/roslyn repo: PR
  • So the two components to this issue are as follows:
    1. C# was throwing whenever they'd be in the process of returning isIncomplete: true completion lists and filter down to 0 items. This typically happened at the n of @using. Therefore things would explode preventing us from being able to control the completion experience
    2. Found that the Razor compiler doesn't generate C# for @using statements. This means when we try to query what language exists at @using| it says "sorry nothing". My bet is that the compiler special cases C# keywords and preemptively doesn't generate C# for them. This means we bail out of our completion path entirely and return an empty completion list breaking the flow. That issue is tracked here: https://github.com/dotnet/aspnetcore/issues/37568
  • Razor tooling wasn't directly responsible for the second issue; however, wes till needed to come up with a low-risk fix. The fix I landed on was to special case the bug and call it out specifically in code. The special case consists of three components:
    1. Only check special cases if we failed to resolve a language. This is already a completion failure case so in the worst case we still don't provide completion
    2. Detecting if we're in an isIncomplete: true scenario by looking at the trigger kind and seeing if it's TriggerForIncompleteCompletionsnext we look at the word span that's currently active
    3. Detecting if the user is attempting to type a C# keyword (full match like using in @using|)
  • Given this fix is going to go through QB for dev17 I added insane amounts of tests/checks to ensure things are of the highest quality / we don't degrade functionality.

Before

UsingFixBefore

After

UsingFixAfter

Fixes #5606


Friday 2021-10-15 20:55:37 by Ævar Arnfjörð Bjarmason

refs/files: remove "name exist?" check in lock_ref_oid_basic()

In lock_ref_oid_basic() we'll happily lock a reference that doesn't exist yet. That's normal, and is how references are initially born, but we don't need to retain checks here in lock_ref_oid_basic() about the state of the ref, when what we're checking is either checked already, or something we're about to discover by trying to lock the ref with raceproof_create_file().

The improved diagnostics here were added in 5b2d8d6f218 (lock_ref_sha1_basic(): improve diagnostics for ref D/F conflicts, 2015-05-11), and then much of the surrounding code went away recently in my 245fbba46d6 (refs/files: remove unused "errno == EISDIR" code, 2021-08-23).

The refs_resolve_ref_unsafe() code being removed here looks like it should be tasked with doing that, but it's actually redundant to other code.

The reason for that is as noted in 245fbba46d6 this once widely used function now only has a handful of callers left, which all handle this case themselves.

To the extent that we're racy between their check and ours removing this check actually improves the situation, as we'll be doing fewer things between the not-under-lock initial check and acquiring the lock.

Why this is OK for all the remaining callers of lock_ref_oid_basic() is noted below. There are only two of those callers:

  • "git branch -[cm] ":

    In files_copy_or_rename_ref() we'll call this when we copy or rename refs via rename_ref() and copy_ref(). but only after we've checked if the refname exists already via its own call to refs_resolve_ref_unsafe() and refs_rename_ref_available().

    As the updated comment to the latter here notes neither of those are actually needed. If we delete not only this code but also refs_rename_ref_available() we'll do just fine, we'll just emit a less friendly error message if e.g. "git branch -m A B/C" would have a D/F conflict with a "B" file.

    Actually we'd probably die before that in case reflogs for the branch existed, i.e. when the try to rename() or copy_file() the relevant reflog, since if we've got a D/F conflict with a branch name we'll probably also have the same with its reflogs (but not necessarily, we might have reflogs, but it might not).

    As some #leftoverbits that code seems buggy to me, i.e. the reflog "protocol" should be to get a lock on the main ref, and then perform ref and/or reflog operations. That code dates back to c976d415e53 (git-branch: add options and tests for branch renaming, 2006-11-28) and probably pre-dated the solidifying of that convention. But in any case, that edge case is not our bug or problem right now.

  • "git reflog expire ":

    In files_reflog_expire() we'll call this without previous ref existence checking in files-backend.c, but that code is in turn called by code that's just finished checking if the refname whose reflog we're expiring exists.

    See ae35e16cd43 (reflog expire: don't lock reflogs using previously seen OID, 2021-08-23) for the current state of that code.

Signed-off-by: Ævar Arnfjörð Bjarmason avarab@gmail.com Signed-off-by: Junio C Hamano gitster@pobox.com


Friday 2021-10-15 23:39:49 by Alex Cruz

Restart with change only on exit

This change allow the user to change everything they have to inside the homescreen activity and only restart on exit. Previously this was a pain in the fucking ass because you had to go in and set each option one by one with a restart inbetween. At least now is not that big of a pain.

  • Restart on destroy (hitting the back button, actionbar arrow)
  • Restart when a chance is made and the home button is pressed

** Thanks "Jack" for code to detect home button https://stackoverflow.com/a/27956263

  • Cleaned up restart code

@eyosen adapted to 10

Change-Id: I4962916ae0bd59d08247b59de585a97a2b9da3a1


< 2021-10-15 >