commit 83698fedef574cc65b7e947c68b2bc401905d2c4 Author: iisaev Date: Thu Sep 10 10:59:40 2026 +0300 init diff --git a/interactives/kitchen_lamp.json b/interactives/kitchen_lamp.json new file mode 100644 index 0000000..b6e4eb0 --- /dev/null +++ b/interactives/kitchen_lamp.json @@ -0,0 +1,28 @@ +{ + "Items": [{ + "id": "kitchen_lamp", + "texture": "lamp", + "layer": "foreground", + "zIndex": 10, + "hitArea": { + "type": "rect", + "x": 0.68, + "y": 0.40, + "width": 0.08, + "height": 0.08 + }, + "highlight": { + "color": "#FFFF0033", + "scale": 1.1, + "duration": 0.12 + }, + "cursor": "PointingHand", + "actions": { + "onClick": { + "scenario": "scenarios/kitchen_clicked.scenario" + }, + "onHoverEnter": "set cursor_hint=Кликни_лампу", + "onHoverLeave": "set cursor_hint=" + } + }] +} diff --git a/locale/scenarios_en.properties b/locale/scenarios_en.properties new file mode 100644 index 0000000..c81b1da --- /dev/null +++ b/locale/scenarios_en.properties @@ -0,0 +1,3 @@ +test_interactive/click = You clicked the lamp! The interactive object works. +mod_test_interactives_name = Test Interactives +mod_test_interactives_desc = Test mod demonstrating the interactive object system — clickable elements on scene with highlight diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..57a4d8f --- /dev/null +++ b/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "test_interactives", + "name": "Test Interactives", + "version": "1.0.0", + "author": "ct", + "description": "Test mod demonstrating the interactive object system — clickable elements on scene with highlight", + "depends": [ + "core>=1", + "interface>=1" + ] +} diff --git a/scenarios/kitchen_add_interactive.scenario b/scenarios/kitchen_add_interactive.scenario new file mode 100644 index 0000000..7ce33bb --- /dev/null +++ b/scenarios/kitchen_add_interactive.scenario @@ -0,0 +1,10 @@ +scene: start_scene +priority: 10 +is_one_run: true +--- + +text "test" +interactive_add kitchen_lamp + +text "wait" +end diff --git a/scenarios/kitchen_clicked.scenario b/scenarios/kitchen_clicked.scenario new file mode 100644 index 0000000..5017ac1 --- /dev/null +++ b/scenarios/kitchen_clicked.scenario @@ -0,0 +1,2 @@ +text "Вы кликнули по лампе! Интерактивный объект работает." key=test_interactive/click +end