Revised alarm/relay interactions

This commit is contained in:
Rob Kelly 2025-03-15 19:00:37 -06:00
parent 3031daae39
commit a6a411b060
14 changed files with 79 additions and 35 deletions

View File

@ -230,6 +230,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.3, -1.96701e-08, -0.45)
[node name="GunkAlarm" parent="PulseNetWall" instance=ExtResource("10_l8xa5")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -4.37114e-08, -1)
[node name="GunkRelay7" parent="PulseNetWall" instance=ExtResource("9_d4a3d")]
[connection signal="destroyed" from="TriggerNetWall/GunkTrigger" to="TriggerNetWall/GunkRelay" method="trigger"]
[connection signal="triggered" from="TriggerNetWall/GunkRelay" to="TriggerNetWall/GunkRelay2" method="trigger"]
[connection signal="triggered" from="TriggerNetWall/GunkRelay2" to="TriggerNetWall/GunkRelay3" method="trigger"]
@ -245,3 +247,4 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -4.37114e-08, -1)
[connection signal="pulsed" from="PulseNetWall/GunkRelay4" to="PulseNetWall/GunkRelay6" method="pulse"]
[connection signal="pulsed" from="PulseNetWall/GunkRelay5" to="PulseNetWall/GunkAlarm" method="pulse"]
[connection signal="pulsed" from="PulseNetWall/GunkRelay6" to="PulseNetWall/GunkAlarm" method="pulse"]
[connection signal="pulsed" from="PulseNetWall/GunkRelay7" to="TriggerNetWall/GunkRelay" method="pulse"]

View File

@ -1,4 +1,4 @@
class_name GunkAlarm extends GunkNode
class_name GunkAlarm extends SignalNode
## Raises the grunk alert when triggered.
const ALERT_DELTA := 1

View File

@ -1,4 +1,5 @@
class_name GunkRelay extends GunkNode
@tool
class_name GunkRelay extends SignalNode
## Gunk node that rebroadcasts triggers to the network after a delay.
## Emitted when `trigger` is called, after a short delay.
@ -7,6 +8,9 @@ signal triggered
## Emitted when `pulse` is called, after a short delay.
signal pulsed
@export var quick_connect_to: SignalNode:
set = _editor_connect
var _busy := false
@onready var animation_player: AnimationPlayer = %AnimationPlayer
@ -60,3 +64,9 @@ static func find_path(
if path:
return [current] + path
return []
func _editor_connect(node: SignalNode) -> void:
self.connect("triggered", node.trigger, CONNECT_PERSIST)
self.connect("pulsed", node.pulse, CONNECT_PERSIST)
self.notify_property_list_changed()

View File

@ -46,33 +46,6 @@ tracks/1/keys = {
"values": [Color(1, 0, 0, 1)]
}
[sub_resource type="Animation" id="Animation_rdv5j"]
resource_name = "trigger"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("MeshInstance3D:mesh:material:emission_energy_multiplier")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.166667, 1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [0.0, 2.0, 0.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("MeshInstance3D:mesh:material:emission")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 0, 0, 1)]
}
[sub_resource type="Animation" id="Animation_nfkbq"]
resource_name = "pulse"
step = 0.1
@ -101,6 +74,33 @@ tracks/1/keys = {
"values": [Color(0.25098, 0.878431, 1, 1)]
}
[sub_resource type="Animation" id="Animation_rdv5j"]
resource_name = "trigger"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("MeshInstance3D:mesh:material:emission_energy_multiplier")
tracks/0/interp = 2
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.166667, 1),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 0,
"values": [0.0, 2.0, 0.0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("MeshInstance3D:mesh:material:emission")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 0, 0, 1)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ipm58"]
_data = {
&"RESET": SubResource("Animation_ipm58"),

View File

@ -0,0 +1,10 @@
class_name SignalNode extends GunkNode
## Specialized gunk node capable of handling standardized signals
func trigger() -> void:
pass # Implemented by derived type
func pulse() -> void:
pass # Implemented by derived type

View File

@ -0,0 +1 @@
uid://dfavgd5w66stl

View File

@ -17,14 +17,16 @@
- [ ] #mechanics
- [x] [[grunk alert]]
- [x] [[alarm]]
- [ ] [[watchdog]]
- [x] [[trigger]]
- [x] [[heart]]
- [x] [[relay]]
- [ ] [[tripwire]]
- [ ] [[looker]]
- [ ] [[listener]]
- [ ] [[grunk beast]]
- [ ] Design
- [ ] Model
- [ ] Animation
- [x] Model
- [x] Animation
- [ ] Controller
- [ ] Nav/logic?
- [ ] [[level]]

View File

@ -2,6 +2,8 @@ Does nothing on its own, but increases the [[grunk alert]] when activated by a c
Will activate if the player tries to remove with the spray beam. Can be safely deactivated & harvested with the [[toothbrush]].
Will be triggered automatically if it stops getting a pulse signal from a [[heart]]. If it doesn't get a pulse in the first place, it won't trigger. Therefore we can make puzzles without pulses by simply not including a [[heart]] in the network.
For flavor, maybe screeches or something when activated?
tags: #mechanics

3
vault/elements/heart.md Normal file
View File

@ -0,0 +1,3 @@
Dead-man switch. Emits a pulse every few seconds which travels through the relay network to alarms. If an alarm stops receiving a pulse, it triggers automatically.
tags: #mechanics

1
vault/elements/manual.md Normal file
View File

@ -0,0 +1 @@
Instead of a tutorial proper, I want the main source of information to be a shitty manual you carry around with you at all times. I like the idea of it being equipment, so the game isn't paused while you read it.

5
vault/elements/relay.md Normal file
View File

@ -0,0 +1,5 @@
Rebroadcasts trigger and pulse signals. The backbone "connection" of grunk component networks.
Visually these should light up when passing along a signal, with red to indicate trigger signals & cyan to indicate pulse.
tags: #mechanics

View File

@ -0,0 +1,3 @@
The most basic grunk mechanic. Emits a trigger signal when destroyed, setting off any connected [alarms](alarm).
tags: #mechanics

View File

@ -1,3 +0,0 @@
Dead-man switch. Triggers a connected [[alarm]] when the player interrupts the [[grunk]] connection to the alarm.
tags: #mechanics

7
vault/manual content.md Normal file
View File

@ -0,0 +1,7 @@
tags: #lore
# _GRUNKER'S COMPANION_
_A guide to grunkin' for the rest of us!_
### 1. What the Grunk!?
(NOTE: basic loredump)