Closed Koriath closed 8 years ago
Also, this one was throughly tested to figure out the right spawn rate and infection chances. All vars are exposed and it's easy to configure. Plus: allows us to make infectious animals in the future. Clowns (the npc) who infect with Pierrot's throat, for instance.
I am a little worried about running all these `for(var/x in orange(y))
loops every tick on every vent. Have you tested how CPU intensive this might be?
I tested it, didn't notice lag nor any kind of error. As far as I can see, it only goes through a list of stuff the vent can "see", so it's not like it runs on EVERYTHING. Only on mobs, trash and the like. BTW: is the changelog.yml stuff working? Because this is the sort of change that should REALLY be announced. And not just in the thread.
I don't have the changelog working consistently.
Could you maybe tone it down from oview(7)? also view doesn't work in the dark.
Damn, isn't there something that works liek onview but ignores darkness?
Wait, I just remembered. I made it so it runs once every 500 ticks. Actually, that part of the Code IS costumizable. Too much lag? Just attribute more ticks to it by changing "pest_ticker_max". I'll toss in a "rand()" to the ticker though, so vents don't try to spawn pests all at the same time. THAT might cause a bit of lag. This way, vents will only run the "pest_ticker ++" and test the if clause every 499 ticks, with the actual spawning attempt occuring once every 500 ticks. Btw: the passive spread chance follows similiar rules. Even with 200 pests on the station, they wouldn't trigger the spread_infection code all at the same time.
A quick check suggests there are 418 vents on metastation. I think that means we would average more than 1 vermin per 2 atmos tick. That seems a bit high to me.
Also orange is oview without a visibility check.
Nay, nay, vermin only spawn if there's trash/blood/corpses. Without those things, they'll never appear in the first place. For instance: kill a guy in the bar. The vents in the kitchen/bar will spawn flies and bats (from the blood). Only vents with "acess" to corpses/blood/trash spawn pests. Drag him to medbay? Hallway vents from the bar to medbay spawn bats. Let the corpse in genetics? It spawns flies in genetics vents.
And pests are annoying enough to players will want to clear them. Even then, each vent is limited to spawning only if there's less than 3 pests around it. If two vents are nearby, they only spawn 3 pests maximum aswell. To prevent having medbay filled with 50 rats.
Test it out, the spawn chance is low enough that pests only actually end up spawning if one of the factors is present for a long time.
Are corpses inside containers checked? If so, might want to ignore corpses in morgue trays.
Add a vent/sanitary type or varedit for the morgue ones, if not surgery, maybe kitchen. Preferences?
I'll finish this one once I get my desktop back from repairs. Meanwhile, what's the Travis CI thing? I noticed all my recent pulls failed it. What can I do to fix it?
Travis CI is only half-setup, so they're nothing to worry about right now.
It's mainly a compile test.
There it is. Surgery, Kitchen coldroom and Surgery are now immune, and vents have a var called "pest_enable" that defaults to 1 to prevent pest altogether spawning. It also checks if the vent is welded or not now, aswell as having the pest spawner code in it's own proc for organization.
Let me know if there's anything else. Btw: either the map merger is broke, or it only suports whole tile changes. varedited those vents, and no matter what I do, it keeps saying there's 8000 lines changed.
I like it. Sorry about the delay; I've been updating master to catch up to sparestation
No worries. We might also have to tweak the mouse chewing thing, or the pest spawner thing, but that's why I left all those exposed vars. We'll see about feedback.
Can I trouble you to re-submit this PR for master instead of Sparestation, please?
Sure, I'll pull it tomorrow after I set Git on this computer.
Vents spawn pests based on trash/blood/corpses around them. Pests passively spread diseases around them. Rats can bite if you step over them. Bats and Flies will also spread when they bite people.
Exposed vars to easily create "infected" animals, can configure the passive infections or infected bite. Can configure virus list that the Pests infect with.
Minor change to lungs & kidneys desc. Added a neat sound effect to shadowpeople (taken from the shadowling gamemode species)