Kazetsukai / onetech

Automated Crafting Guide for One Hour One Life
MIT License
31 stars 24 forks source link

Add Insulation Value for Structures (also floors don't have Ground Heat) #145

Closed betalpha8 closed 5 years ago

betalpha8 commented 5 years ago

retrieve rValue from objects. (i.e. walls, floors, doors).

This seems to be happening for floors, but it's being presented as Ground Heat, not Insulation.

ryanb commented 5 years ago

I'll add this for walls and doors, thanks for the suggestion!

Doesn't the rValue for floors add to the ground heat of the biome tile underneath? In that case "Ground Heat" seems like an acceptable word for floors.

betalpha8 commented 5 years ago

Found the server.cpp line for what I was talking about. https://github.com/jasonrohrer/OneLife/blob/master/server/server.cpp#L1989

rValue is separate from heatValue. The heat code puts them in separate matrices and uses the two matrices to calculate player->heat using a finite element heat transfer model where rValue is the resistance to heat spreading. So a wall will block heat from spreading, but doesn't produce heat; same with floors.

Standing on a floor does increase the player's heat, but it does so by trapping the player's heat of 1 (https://github.com/jasonrohrer/OneLife/blob/master/server/server.cpp#L2113) like clothes do.

ryanb commented 5 years ago

Oh interesting, I didn't realize the floor worked by trapping players heat. I'll change the name to insulation then. Thanks.

ryanb commented 5 years ago

@betalpha8 do you think it makes sense to represent the ground/wall insulation as a percentage? Not certain how the rValue is used for those.

betalpha8 commented 5 years ago

A percentage would make sense; Their rValue is intended to range from 0-1.

Similar to clothing rValue % insulation, objects with rValues help stop heat from spreading to/from its tile. (clothes have a weighting system but floors/walls don't, their rValue is their %insulation)

Idk if this helps, but I'm working on a forum thread about heat anyway, and: Imgur (noting some walls have floors behind them)

ryanb commented 5 years ago

Awesome thanks for the info. I will make it a percentage