Files
Cinderwild/scripts/building/hearth.gd

22 lines
747 B
GDScript

extends "res://scripts/building/campfire.gd"
## Stone hearth: an indoor fire (docs/PROGRESSION_DESIGN.md §3). Everything a
## campfire does (fuel, cooking, keeping wolves off), but it warms a bigger
## room (1.5x the radius), its chimney keeps the rain off so it never burns
## faster in a storm, and its stone doesn't need a floor of its own.
const HEARTH_RADIUS := HEAT_RADIUS * 1.5
func display_name() -> String:
return "Stone Hearth"
func heat_at(pos: Vector3) -> float:
if not _lit:
return 0.0
return 1.0 - smoothstep(2.0, HEARTH_RADIUS, pos.distance_to(global_position))
func burn_rate() -> float:
return 1.0
func interact_prompt(player: Node) -> String:
return super.interact_prompt(player).replace("Campfire", "Stone hearth")