P2 stone: stonecutter, cut stone, stone floors/walls/pillars/stairs/windows/doorway, hearth; wooden stairs, windows, posts, palisade and gate; stone support rules
This commit is contained in:
21
scripts/building/hearth.gd
Normal file
21
scripts/building/hearth.gd
Normal file
@@ -0,0 +1,21 @@
|
||||
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")
|
||||
Reference in New Issue
Block a user