The brown rat (Rattus norvegicus), also known as the common rat, street rat, sewer rat, wharf rat, Hanover rat, Norway rat and Norwegian rat, is a widespread, common species of rat. One of the largest muroids, it is a brown or grey rodent with a body length of up to 28 cm (11 in) long, and a tail slightly shorter than that. It weighs between 140 and 500 g (4.9 and 17.6 oz). Thought to have originated in northern China and neighbouring areas, it has now spread to all continents except Antarctica, and is the dominant rat in Europe and much of North America, having become naturalised across the world. With rare exceptions, the brown rat lives wherever humans live, particularly in urban areas. It is omnivorous, reproduces rapidly, and can be a vector for several human diseases.
Studies of wild rats in New York City have shown that populations living in different neighborhoods can evolve distinct genomic profiles over time, by slowly accruing different traits.
Naming and etymology
The brown rat was originally called the "Hanover rat" by people wishing to link problems in 18th-century England with the House of Hanover. It is not known for certain why the brown rat is named Rattus norvegicus (Norwegian rat), as it did not originate from Norway. However, the English naturalist John Berkenhout, author of the 1769 book Outlines of the Natural History of Great Britain, is most likely responsible for popularizing the misnomer. Berkenhout gave the brown rat the binomial name Mus norvegicus, believing it had migrated to England from Norwegian ships in 1728.
Though the assumptions surrounding this species' origins were not yet the same as modern ones, by the 20th century, it was believed among naturalists that the brown rat did not originate in Norway, rather the species came from central Asia and (likely) China.
Distribution and habitat
Possibly originating from the plains of northern China and Mongolia, the brown rat spread to other parts of the world sometime in the Middle Ages. The question of when brown rats became commensal with humans remains unsettled, but as a species, they have spread and established themselves along routes of human migration and now live almost everywhere humans are.
As it spread from Asia, the brown rat generally displaced the black rat in areas where humans lived. In addition to being larger and more aggressive, the change from wooden structures and thatched roofs to bricked and tiled buildings favored the burrowing brown rats over the arboreal black rats. In addition, brown rats eat a wider variety of foods, and are more resistant to weather extremes.
In the absence of humans, brown rats prefer damp environments, such as river banks.[86] However, the great majority are now linked to man-made environments, such as sewage systems. In addition to sewers, rats are very comfortable living in alleyways and residential buildings, as there is usually a large and continuous food source in those areas.
It is often said that there are as many rats in cities as people, but this is considered an urban myth for most cities. Brown rats in cities tend not to wander extensively, often staying within 20 m (66 ft) of their nest if a suitable concentrated food supply is available, but they will range more widely where food availability is lower. It is difficult to determine the extent of their home range because they do not utilize a whole area but rather use regular runways to get from one location to another. Urban rat research is considered to be challenging due to their significant global population size and spatial distribution patterns. There is great debate over the size of the population of rats in New York City, with estimates from almost 100 million rats to as few as 250,000. Experts suggest that New York is a particularly attractive place for rats because of its aging infrastructure and high poverty rates. In 2023, the city appointed Kathleen Corradi as the first Rat Czar, a position created to address the city's rat population. The position focuses on instituting policies measures to curb the population such as garbage regulation and additional rat trapping. A 2024 study using data from Vancouver found that most municipal complaints about rats were related to garbage, and the rats were often viewed as a symptom of a community issue.

Megathreads and spaces to hang out:
- π» Link to all Hexbear comms https://hexbear.net/post/1403966
- πΌ Hexbear Matrix Chat https://matrix.to/#/#Hexbear:matrix.org
- π Come listen to music and Watch movies with your fellow Hexbears nerd, in Cy.tube](https://live.hexbear.net/c/movies
- π₯ Read and talk about a current topics in the News Megathread https://hexbear.net/post/8026521
- β Come talk in the New Weekly PoC thread https://hexbear.net/post/8030647
- π³οΈββ§οΈ Talk with fellow Trans comrades in the New Weekly Trans thread https://hexbear.net/post/8034428
- π New Weekly Improvement thread https://hexbear.net/post/8027723
- π§‘ Disabled comm megathread https://hexbear.net/post/7886148
- β Parenting Chat https://hexbear.net/post/8025314
- π Anime & Manga discussion thread https://hexbear.net/post/7546692
- π©Fashion megathread https://hexbear.net/post/7228810
- π¨ Art & Drawings megathread https://hexbear.net/post/8070591
reminders:
- π You nerds can join specific comms to see posts about all sorts of topics
- π Hexbearβs algorithm prioritizes comments over upbears
- π Sorting by new you nerd
- πΆ Join the unofficial Hexbear-adjacent Mastodon instance toots.matapacos.dog
Links To Resources (Aid and Theory):
Aid:
Theory:
- β€οΈFoundations of Leninism
- β€οΈAnarchism and Other Essays
Financial Support to the Bearsite
-
π¨π³ https://liberapay.com/hexbear
-
π·πΊ https://www.patreon.com/hexbear
Here's the code:
godot code
I removed the visibility commands from the code because no matter where I put it or how I formatted it or had spelling mistakes or not, it would not work; debugger says the var type returned is nil I think. However if I explicitly name the variable and set visibility, I get no errors, for example:
godot code
but typing:
godot code
I get a null error again. Idk what's happening.
I'm very new to this so I don't know what I'm doing entirely or how to implement your recs entirely, sorry.
Ah okay, I see what you're going for. Honestly if you're just starting out then don't worry about my earlier recommendations, just focus on making it work first of all.
I think what's happening here is the popping and pushing data between the two arrays is messing things up. The null error indicates that
plyr_display_invis[0]isn't referring to anything. In other words, the array is probably empty, because otherwisearray[0]wouldn't be null, right? Also, the vis and invis arrays don't really "know" how many players are in the game, they just add or remove one visible node whenever the player count is increased or decreased. That's probably not the problem here, but worth keeping in mind, because we can probably use the player count value to directly set the number of displayed nodes. The most likely point of failure I'd guess is the push/pop operations, though I can't tell at a glance what exactly is wrong with it. I don't have Godot installed on this computer so I can't test it myself either.Anyway, this isn't so much a problem in the code or syntax itself, but rather that the "architecture" or "structure" or whatever you wanna call it that you're using here is prone to errors like this. Having separate arrays for visible and invisible nodes is what I'd call a pretty obvious and pragmatic solution. It's usually how tutorials and intro-level computer science classes teach you how to deal with this sort of thing. Of course it's perfectly fine to do it like that, but as you might have noticed already it gets pretty complex and cumbersome having to push and pop them back and forth while mentally keeping track on what is first in which array etc. For a relatively simple feature like this, complexity is just frustrating and a pain in the ass, so it'd be nice to simplify this as much as possible, and save our brainpower for other more FUN features that might need more complexity.
So, how to simplify this? Personally I like to avoid using mutable (i.e. changeable, modifiable) arrays unless I have a particular reason to use them. This isn't like the absolute singular right way of doing things, it's just how I like to do it because it feels less fragile and easier to keep track of. So, what can we do if we want to avoid mutating (e.g. directly changing the contents of the array with push, pop) the arrays? Well, we could for instance keep
plyr_displayin one constant array, and redefine the visible/invisible arrays whenever the player count changes:Warning: this code might not work copy-pasted, it's been a while since I worked with Godot. But hopefully it gets the idea across.
godot code
Hmm, alright, we're not mutating the arrays any more, and the data stays constant in one place, but it's still kind of complicated with 3 separate arrays... What if we narrowed it down to a single array? I mean, the data's already there in the original array, so could we maybe just use that array?
more godot code
Now, instead of having separate arrays for visible/invisible nodes, we're directly showing and hiding them based on the value of plyrCount by looping through a single array. One little annoyance remains though: We've got the same code copy-pasted twice here, once for increasing and once for decreasing the number of players. Generally I like to avoid repeating the same code if it can be moved into its own function. Let's move the loop into its own function:
even more godot code
Or better yet, you could even trigger the
set_displayed_players()function with theplyrCount_changedsignal. I can't really remember how to hook signals up to functions, but you get the idea.Hopefully this helps, sorry if I got too technical! Hope you get it working.
Edit: lol oops you already solved it, didn't see your other reply, nevermind
No no, this is perfect, my solution was a lot more complex when I thought I was simplifying things. It's been frustrating trying to implement what looks like simple features and finding my code twisted into pretzels trying to do it, but it's still fun when it works. I'd like to get good enough at some point where I can learn to go through the process you just walked through to further simplify the code.