Added Glitch Room Source code to Gitty
This commit is contained in:
commit
1ac9eb5644
505 files changed
+28504
No files matched your search
@@ -0,0 +1,85 @@
|
||||
@tool
|
||||
class_name CabinetProfile
|
||||
extends Resource
|
||||
|
||||
|
||||
@export var cabinet_id: StringName = &""
|
||||
@export var display_name: String = ""
|
||||
|
||||
@export var capabilities: Array[StringName] = []
|
||||
|
||||
@export var hardware_config: HardwareConfig
|
||||
|
||||
const FEET_TO_METERS: float = 0.3048
|
||||
const METERS_TO_FEET: float = 1.0 / FEET_TO_METERS
|
||||
|
||||
|
||||
#
|
||||
# Stored internally in meters for compatibility with the
|
||||
# existing room/layout system.
|
||||
#
|
||||
@export_storage
|
||||
var footprint_width_m: float = 0.80
|
||||
|
||||
@export_storage
|
||||
var footprint_depth_m: float = 0.75
|
||||
|
||||
@export_storage
|
||||
var height_m: float = 1.80
|
||||
|
||||
|
||||
#
|
||||
# Designer-facing dimensions.
|
||||
#
|
||||
@export_group("Physical Dimensions")
|
||||
|
||||
@export_range(0.25, 12.0, 0.01, "suffix: ft")
|
||||
var footprint_width_ft: float:
|
||||
get:
|
||||
return (
|
||||
footprint_width_m
|
||||
* METERS_TO_FEET
|
||||
)
|
||||
set(value):
|
||||
footprint_width_m = (
|
||||
value
|
||||
* FEET_TO_METERS
|
||||
)
|
||||
|
||||
|
||||
@export_range(0.25, 12.0, 0.01, "suffix: ft")
|
||||
var footprint_depth_ft: float:
|
||||
get:
|
||||
return (
|
||||
footprint_depth_m
|
||||
* METERS_TO_FEET
|
||||
)
|
||||
set(value):
|
||||
footprint_depth_m = (
|
||||
value
|
||||
* FEET_TO_METERS
|
||||
)
|
||||
|
||||
|
||||
@export_range(0.25, 20.0, 0.01, "suffix: ft")
|
||||
var height_ft: float:
|
||||
get:
|
||||
return (
|
||||
height_m
|
||||
* METERS_TO_FEET
|
||||
)
|
||||
set(value):
|
||||
height_m = (
|
||||
value
|
||||
* FEET_TO_METERS
|
||||
)
|
||||
|
||||
@export_group("Physical Appearance")
|
||||
|
||||
@export var editor_texture: Texture2D = null
|
||||
|
||||
@export_range(0.1, 4.0, 0.05)
|
||||
var editor_texture_scale: float = 1.0
|
||||
|
||||
func has_capability(capability: StringName) -> bool:
|
||||
return capabilities.has(capability)
|
||||
Reference in new issue
Block a user