First commit 🎉

This commit is contained in:
Tony Bark 2025-07-17 01:49:18 -04:00
commit 43ea213f9b
728 changed files with 37080 additions and 0 deletions

View file

@ -0,0 +1,41 @@
@tool
extends "res://addons/popochiu/editor/popups/create_object/create_room_object.gd"
## Creates a new hotspot in the room.
var _new_hotspot_name := ""
var _factory: PopochiuHotspotFactory
#region Godot ######################################################################################
func _ready() -> void:
_group_folder = "hotspots"
_info_files = _info_files.replace("&t", "hotspot")
super()
#endregion
#region Virtual ####################################################################################
func _create() -> Object:
# Setup the region helper and use it to create the hotspot -------------------------------------
_factory = PopochiuHotspotFactory.new()
var param := PopochiuHotspotFactory.PopochiuHotspotFactoryParam.new()
param.obj_name = _new_hotspot_name
param.room = _room
if _factory.create(param) != ResultCodes.SUCCESS:
# TODO: show a message in the popup!
return null
await get_tree().create_timer(0.1).timeout
return _factory.get_obj_scene()
func _set_info_text() -> void:
_new_hotspot_name = _name.to_snake_case()
_target_folder = _group_folder % _new_hotspot_name
info.text = _info_text.replace("&n", _new_hotspot_name)
#endregion

View file

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

View file

@ -0,0 +1,14 @@
[gd_scene load_steps=3 format=3 uid="uid://b7nvdcut38577"]
[ext_resource type="PackedScene" uid="uid://c1pfl2gwjjot5" path="res://addons/popochiu/editor/popups/create_object/create_object.tscn" id="1_feyc5"]
[ext_resource type="Script" path="res://addons/popochiu/editor/popups/create_object/create_hotspot/create_hotspot.gd" id="2_hf5i2"]
[node name="CreateHotspotConfirmation" instance=ExtResource("1_feyc5")]
script = ExtResource("2_hf5i2")
title = "Create PopochiuHotspot"
[node name="Label" parent="PanelContainer/VBoxContainer/InputContainer" index="0"]
text = "Hotspot name:"
[node name="Guide" parent="PanelContainer/VBoxContainer" index="3"]
text = "Use a descriptive name in PascalCase (e.g. Sky, CaveEntrance)."