P3 bear: one bear per island raids unattended food, palisades and closed huts keep it out, warns then charges, hide/fat/meat, fur rug (Cozy), death saved (protocol 8)
This commit is contained in:
@@ -63,7 +63,7 @@ func add_fuel(seconds: float) -> void:
|
||||
_set_lit(true)
|
||||
|
||||
func interact_prompt(player: Node) -> String:
|
||||
var has_fuel: bool = player.inventory.count("wood") + player.inventory.count("stick") > 0
|
||||
var has_fuel: bool = player.inventory.count("wood") + player.inventory.count("stick") + player.inventory.count("bear_fat") > 0
|
||||
if _lit:
|
||||
var left := "%d:%02d" % [int(fuel) / 60, int(fuel) % 60]
|
||||
var hiss := ", hissing in the rain" if burn_rate() > 1.2 else ""
|
||||
|
||||
22
scripts/building/rug.gd
Normal file
22
scripts/building/rug.gd
Normal file
@@ -0,0 +1,22 @@
|
||||
extends "res://scripts/building/piece.gd"
|
||||
## Fur rug: a bearskin on the floor. In a sheltered room it makes you Cozy
|
||||
## (survival.gd): a little warmer, and Rested twice as fast. Flat, so you
|
||||
## walk over it (it's only on the interactables layer, for X to take it up).
|
||||
|
||||
const COZY_RADIUS := 4.0
|
||||
|
||||
func _make_collision(mi: MeshInstance3D) -> void:
|
||||
var aabb := mi.mesh.get_aabb()
|
||||
var cs := CollisionShape3D.new()
|
||||
var box := BoxShape3D.new()
|
||||
box.size = Vector3(aabb.size.x, 0.06, aabb.size.z)
|
||||
cs.shape = box
|
||||
cs.position = Vector3(aabb.get_center().x, 0.03, aabb.get_center().z)
|
||||
add_child(cs)
|
||||
collision_layer = 2
|
||||
|
||||
func _build() -> void:
|
||||
add_to_group("rug")
|
||||
|
||||
func interact_prompt(_player: Node) -> String:
|
||||
return "Fur rug (cozy in a sheltered room)"
|
||||
Reference in New Issue
Block a user