Jump to content

Player may not be dried in the vicinity of two oscillating fans if the closest is turned off

Faintly Macabre
  • Version: PC/MAC/Linux Fixed

This isn't a super likely scenario, but if in the event the player is in range of two oscillating fans the closest one is off, even if the second one is on the player won't dry. Offending code is here in the moisture component's script:

function Moisture:GetDryingRate()
    local x, y, z = GetPlayer().Transform:GetWorldPosition()

    local ents = TheSim:FindEntities(x, y, z, 30, {"blows_air"})
    local fanNearby = (#ents > 0)

    if fanNearby and ents[1].components.machine:IsOn() then

It only checks if the first discovered entity with the "blows_air" tag is on instead of checking entities until it finds one that is.

Steps to Reproduce
Build two fans, turn the furthest one on and leave the closest off, and start some rain.

User Feedback

A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.

  • Create New...