feat: made sure the aspect ration fit a pixel art game and added useful addons
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 6s
Create tag and build when new code gets to main / Export (push) Successful in 3m16s

This commit is contained in:
2025-06-27 15:19:12 +02:00
parent 4ec91c1277
commit 9a79715e47
550 changed files with 18812 additions and 0 deletions

View File

@ -0,0 +1,39 @@
@tool
@icon("expression_guard.svg")
class_name ExpressionGuard
extends Guard
const ExpressionUtil = preload("expression_util.gd")
const DebugUtil = preload("debug_util.gd")
var expression:String = ""
func is_satisfied(context_transition:Transition, context_state:StateChartState) -> bool:
var root:StateChart = context_state._chart
if not is_instance_valid(root):
push_error("Could not find root state chart node, cannot evaluate expression")
return false
var result:Variant = ExpressionUtil.evaluate_expression("guard in " + DebugUtil.path_of(context_transition), root, expression, false)
if typeof(result) != TYPE_BOOL:
push_error("Expression: ", expression ," result: ", result, " is not a boolean. Returning false.")
return false
return result
func get_supported_trigger_types() -> int:
return StateChart.TriggerType.PROPERTY_CHANGE
func _get_property_list() -> Array[Dictionary]:
var properties:Array[Dictionary] = []
properties.append({
"name": "expression",
"type": TYPE_STRING,
"usage": PROPERTY_USAGE_DEFAULT,
"hint": PROPERTY_HINT_EXPRESSION
})
return properties