initial shit

This commit is contained in:
2026-06-04 16:53:41 -05:00
parent f019615187
commit d3779cff20
828 changed files with 512567 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
extends Node3D
signal incremented
signal decremented
signal switchUpdated
@export var State = 0
@export var isLoopingUpdate : bool = false
func _interact_press(is_alt_click: bool = false) -> void:
if is_alt_click:
if State != 0:
State -= 1
$Sound.play()
emit_signal("decremented")
emit_signal("switchUpdated")
else:
if State != 2:
State += 1
$Sound.play()
emit_signal("incremented")
emit_signal("switchUpdated")
func _process(delta: float) -> void:
if State == 0:
$StaticBody3D.rotation_degrees = Vector3(0, 45, 0)
elif State == 1:
$StaticBody3D.rotation_degrees = Vector3(0, 0, 0)
elif State == 2:
$StaticBody3D.rotation_degrees = Vector3(0, -45, 0)
if isLoopingUpdate:
emit_signal("switchUpdated")

View File

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

View File

@@ -0,0 +1,59 @@
extends Node
signal buttonPressed
signal buttonReleased
signal buttonUpdated
@export var isBeingPressed = false
@export var text : String
@export var isLoopingUpdate : bool = false
@export var color : Color
# FIX: Do not instantly assign an empty .new() if it might have been loaded
var material : StandardMaterial3D
func _ready() -> void:
# Reconstruct or override the material instance cleanly on load
material = StandardMaterial3D.new()
material.albedo_color = color
ButtonAnimation.loop_mode = Animation.LOOP_NONE
$StaticBody3D/Label3D.text = text
$StaticBody3D/MeshInstance3D.material_override = material
# Keep animation visually synced with the saved press state
if isBeingPressed:
$AnimationPlayer.play("interact")
$AnimationPlayer.advance(ButtonAnimation.length)
else:
$AnimationPlayer.play_backwards("interact")
@onready var ButtonAnimation = $AnimationPlayer.get_animation("interact")
func _press():
if not isBeingPressed:
emit_signal("buttonPressed")
isBeingPressed = true
$AnimationPlayer.play("interact")
$Sound.pitch_scale = 1.5
$Sound.play()
emit_signal("buttonUpdated")
func _release():
if isBeingPressed:
emit_signal("buttonReleased")
isBeingPressed = false
$AnimationPlayer.play_backwards("interact")
$Sound.pitch_scale = 1.3
$Sound.play()
emit_signal("buttonUpdated")
func _interact_press(is_alt_click: bool = false) -> void:
_press()
func _interact_release() -> void:
_release()
func _process(delta: float) -> void:
if isLoopingUpdate:
emit_signal("buttonUpdated")

View File

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

26
Objects/Scripts/ILed.gd Normal file
View File

@@ -0,0 +1,26 @@
extends Node3D
var LampMaterial = StandardMaterial3D.new();
@export var isLampOn = false;
@export_category("Lamp Config")
@export var onColor : Color;
@export var glowMultiplier : int;
func _ready() -> void:
$Light.material_override = LampMaterial;
func startGlowing():
LampMaterial.emission_enabled = true;
LampMaterial.emission = onColor;
LampMaterial.emission_energy_multiplier = glowMultiplier
func stopGlowing():
LampMaterial.emission_energy_multiplier = 0.0;
func _process(delta: float) -> void:
if isLampOn:
LampMaterial.albedo_color = onColor;
startGlowing();
else:
LampMaterial.albedo_color = Color(0.069, 0.069, 0.069, 1.0);
stopGlowing();

View File

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

View File

@@ -0,0 +1,45 @@
extends Node
signal turnedOn
signal turnedOff
signal switchUpdated
@export var isOn = false
@export var isLoopingUpdate : bool = false
@onready var ButtonAnimation = $AnimationPlayer.get_animation("interact")
func _ready() -> void:
ButtonAnimation.loop_mode = Animation.LOOP_NONE
# FIX: Look at the saved state before forcing the animation closed!
if isOn:
$AnimationPlayer.play("interact")
# Advance to the end immediately so it doesn't play the visual transition on load
$AnimationPlayer.advance(ButtonAnimation.length)
else:
$AnimationPlayer.play_backwards("interact")
func _press():
if not isOn:
isOn = true
$AnimationPlayer.play("interact")
$Sound.play()
emit_signal("turnedOn")
emit_signal("switchUpdated")
func _release():
if isOn:
isOn = false
$AnimationPlayer.play_backwards("interact")
$Sound.play()
emit_signal("turnedOff")
emit_signal("switchUpdated")
func _interact_press(is_alt_click: bool = false) -> void:
if isOn:
_release()
else:
_press()
func _process(delta: float) -> void:
if isLoopingUpdate:
emit_signal("switchUpdated")

View File

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

10
Objects/Scripts/SGauge.gd Normal file
View File

@@ -0,0 +1,10 @@
extends Node3D
@export var Value : int
func _process(delta: float) -> void:
# 1. Remap the value
var degree_value: float = remap(Value, 1.0, 100.0, 360.0 - 20, 25)
# 2. Assign a fresh Vector3 to rotation_degrees
$Node3D2.rotation_degrees = Vector3(0.0, degree_value, 0.0)

View File

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

View File

@@ -0,0 +1,8 @@
extends Node3D
@export var Text : String;
func _process(delta: float) -> void:
$Label3D.text = Text;

View File

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

View File

@@ -0,0 +1,9 @@
extends Node3D
signal castUpdate
@export var isActive:bool = false;
func _process(delta: float) -> void:
if isActive:
emit_signal("castUpdate")

View File

@@ -0,0 +1 @@
uid://7liu0n270lj0