Migrate to new JSON format
This commit is contained in:
BIN
animations/aeb17449-c342-4dab-9057-5fb05183fd03.png
Normal file
BIN
animations/aeb17449-c342-4dab-9057-5fb05183fd03.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
BIN
charsets/f529cbfc-c29d-470b-8804-e50d6a1efc98.png
Normal file
BIN
charsets/f529cbfc-c29d-470b-8804-e50d6a1efc98.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
7
data.sql
7
data.sql
@@ -56,10 +56,11 @@ CREATE MEMORY TABLE "PUBLIC"."OBJECT"(
|
||||
"INTERACT_SOUND" VARCHAR
|
||||
);
|
||||
ALTER TABLE "PUBLIC"."OBJECT" ADD CONSTRAINT "PUBLIC"."CONSTRAINT_C" PRIMARY KEY("ID");
|
||||
-- 2 +/- SELECT COUNT(*) FROM PUBLIC.OBJECT;
|
||||
-- 3 +/- SELECT COUNT(*) FROM PUBLIC.OBJECT;
|
||||
INSERT INTO "PUBLIC"."OBJECT" VALUES
|
||||
('plain_chest', 'Plain Chest', 'Chests', 0, 'Arrow punch'),
|
||||
('black_fsm_right_doors', 'Doors', 'FSM Doors', 0, 'Arrow punch');
|
||||
('black_fsm_right_doors', 'Doors', 'FSM Doors', 0, 'Arrow punch'),
|
||||
('enforced_chest_left', 'Enforced Chest', 'Chests', 3, 'Arrow punch'),
|
||||
('plain_chest_down', 'Plain Chest', 'Chests', 0, 'Arrow punch');
|
||||
CREATE MEMORY TABLE "PUBLIC"."JUNK"(
|
||||
"ID" VARCHAR NOT NULL,
|
||||
"NAME" VARCHAR NOT NULL,
|
||||
|
||||
File diff suppressed because one or more lines are too long
75
maps/8fbb151f-682a-4357-ba92-157e4097898f.json
Normal file
75
maps/8fbb151f-682a-4357-ba92-157e4097898f.json
Normal file
File diff suppressed because one or more lines are too long
Binary file not shown.
128
maps/b602601a-e9b0-44bf-bc0d-5f31c9964ba1.json
Normal file
128
maps/b602601a-e9b0-44bf-bc0d-5f31c9964ba1.json
Normal file
File diff suppressed because one or more lines are too long
Binary file not shown.
90
maps/d1b85d85-c52a-46f5-b81e-444847f8ddae.json
Normal file
90
maps/d1b85d85-c52a-46f5-b81e-444847f8ddae.json
Normal file
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"uid": "d1b85d85-c52a-46f5-b81e-444847f8ddae",
|
||||
"rows": 17,
|
||||
"columns": 20,
|
||||
"tileWidth": 32,
|
||||
"tileHeight": 32,
|
||||
"layers": [{
|
||||
"name": "Floor",
|
||||
"tileLayer": {
|
||||
"tilesetUID": "eb5bbf17-efaa-4213-90c3-2785a32f3c37",
|
||||
"tiles": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 0, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 0, 0, 33, 33, 33, 33, 33, 33, 33, 0, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 0, 0, 34, 34, 34, 0, 0, 0, 0, 0, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 0, 0, 34, 34, 34, 0, 0, 0, 0, 0, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 0, 0, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 0, 0, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 34, 0, 0, 0, 34, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
}
|
||||
}, {
|
||||
"name": "Carpets",
|
||||
"autoTileLayer": {
|
||||
"autotileUID": "f6bcd0ea-f293-4864-bd13-d1c4e8b79080",
|
||||
"tiles": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 0, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"animated": false,
|
||||
"animationDuration": 1.0,
|
||||
"connect": false
|
||||
}
|
||||
}, {
|
||||
"name": "Walls",
|
||||
"autoTileLayer": {
|
||||
"autotileUID": "b475367a-7bf8-44ee-b916-6e81a78f97d9",
|
||||
"tiles": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"animated": false,
|
||||
"animationDuration": 1.0,
|
||||
"connect": false
|
||||
}
|
||||
}, {
|
||||
"name": "Floor objects",
|
||||
"tileLayer": {
|
||||
"tilesetUID": "60362451-85ed-4bbe-8ac1-225056f48b40",
|
||||
"tiles": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 37, 52, 162, 163, 52, 215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 168, 68, 178, 179, 68, 10, 10, 0, 0, 81, 215, 141, 0, 0, 0, 0, 0, 0, 0, 0, 184, 147, 194, 195, 148, 26, 26, 0, 38, 6, 8, 45, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 132, 132, 0, 0, 0, 0, 23, 22, 24, 61, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 145, 212, 145, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 145, 244, 145, 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 142, 215, 0, 0, 0, 0, 0, 0, 0, 167, 0, 215, 126, 215, 0, 0, 0, 0, 12, 11, 13, 14, 13, 0, 170, 0, 0, 0, 0, 183, 0, 0, 0, 0, 168, 0, 0, 0, 28, 27, 29, 29, 29, 0, 186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 157, 0, 32, 215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 77, 0, 0, 0, 0, 153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 58, 0, 0, 93, 0, 0, 0, 0, 137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
}
|
||||
}, {
|
||||
"name": "Main",
|
||||
"objectLayer": {
|
||||
"passageMap": ["ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "ALLOW", "ALLOW", "BLOCK", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "ALLOW", "ALLOW", "BLOCK", "ALLOW", "ALLOW", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "ALLOW", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "BLOCK", "ALLOW", "ALLOW", "BLOCK", "ALLOW", "ALLOW", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "ALLOW", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "ALLOW", "BLOCK", "ALLOW", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "ALLOW", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "ALLOW", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "BLOCK", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "ALLOW", "ALLOW", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "ALLOW", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "ALLOW", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "ALLOW", "ALLOW", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "ALLOW", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "ALLOW", "BLOCK"],
|
||||
"objects": [{
|
||||
"x": 3,
|
||||
"y": 12,
|
||||
"code": "/* \n * Following final parameters are available to use:\n * x: int - the x coordinate of tile the object has been created on\n * y: int - the y coordinate of tile the object has been created on \n * layer: ObjectLayer - current object layer\n * map: GameMap - current map\n */\nwarp(here, A.maps.hero_house.main.home);"
|
||||
}, {
|
||||
"x": 11,
|
||||
"y": 7,
|
||||
"code": "/* \n * Following final parameters are available to use:\n * here: MapPin - the composite object containing current map UID, \n * layer\u0027s index and x,y coordinates of the current tile \n * x: int - the x coordinate of the current tile\n * y: int - the y coordinate of the current tile \n * layer: ObjectLayer - current object layer\n * map: GameMap - current map\n */\nfriend(here, \"grandma\")\n\t.randomMovementAI(4f, here.toCoordinates(), 5)\n\t.interaction(this::triggerGrandmaDialog);"
|
||||
}, {
|
||||
"x": 5,
|
||||
"y": 4,
|
||||
"code": "/* \n * Following final parameters are available to use:\n * here: MapPin - the composite object containing current map UID, \n * layer\u0027s index and x,y coordinates of the current tile \n * x: int - the x coordinate of the current tile\n * y: int - the y coordinate of the current tile \n * layer: ObjectLayer - current object layer\n * map: GameMap - current map\n */\nfriend(here, \"neko\")\n\t.randomMovementAI(4f)\n\t.interaction(this::triggerNekoDialog);"
|
||||
}, {
|
||||
"x": 7,
|
||||
"y": 9,
|
||||
"code": "/* \n * Following final parameters are available to use:\n * x: int - the x coordinate of tile the object has been created on\n * y: int - the y coordinate of tile the object has been created on \n * layer: ObjectLayer - current object layer\n * map: GameMap - current map\n * handler: HeroHomeHandler - current map handler\n * runner: DemoRunner - the game runner of the project\n * context: Context - the game context\n */\nchest(here, \"plain_chest_down\")\n\t.addItem(new MeleeWeapon(\"wooden_sword\"))\n\t.addItem(new Medicament(\"small_life_potion\", 4))\n\t.shuffle();"
|
||||
}, {
|
||||
"x": 18,
|
||||
"y": 12,
|
||||
"code": "/* \n * Following final parameters are available to use:\n * here: MapPin - the composite object containing current map UID, \n * layer\u0027s index and x,y coordinates of the current tile \n * x: int - the x coordinate of the current tile\n * y: int - the y coordinate of the current tile \n * layer: ObjectLayer - current object layer\n * map: GameMap - current map \n * handler: HeroHomeHandler - current map handler\n * runner: DemoRunner - the game runner of the project\n * context: Context - the game context\n */\nchest(here, \"enforced_chest_left\")\n\t.addItem(new MeleeWeapon(\"wooden_sword\"))\n\t.addItem(new Medicament(\"small_life_potion\", 4))\n\t.shuffle();"
|
||||
}],
|
||||
"labels": [{
|
||||
"label": "entry",
|
||||
"x": 3,
|
||||
"y": 11
|
||||
}, {
|
||||
"label": "Start",
|
||||
"x": 10,
|
||||
"y": 14
|
||||
}]
|
||||
}
|
||||
}, {
|
||||
"name": "Objects above",
|
||||
"tileLayer": {
|
||||
"tilesetUID": "60362451-85ed-4bbe-8ac1-225056f48b40",
|
||||
"tiles": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 168, 0, 0, 0, 0, 168, 0, 0, 0, 173, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 202, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 13, 0, 0, 13, 13, 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
}
|
||||
}, {
|
||||
"name": "Ceiling",
|
||||
"autoTileLayer": {
|
||||
"autotileUID": "6584a279-e937-497e-a056-b1e77bff2439",
|
||||
"tiles": [10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 10, 0, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 10, 10, 10, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 10, 0, 0, 10, 10, 10, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10],
|
||||
"animated": false,
|
||||
"animationDuration": 1.0,
|
||||
"connect": false
|
||||
}
|
||||
}],
|
||||
"handler": "com.bartlomiejpluta.demo.map.HeroHomeHandler",
|
||||
"javaImports": "import com.bartlomiejpluta.demo.world.weapon.*;\nimport com.bartlomiejpluta.demo.world.potion.*;\nimport com.bartlomiejpluta.base.lib.animation.*;"
|
||||
}
|
||||
BIN
project.bep
BIN
project.bep
Binary file not shown.
312
project.json
Normal file
312
project.json
Normal file
@@ -0,0 +1,312 @@
|
||||
{
|
||||
"name": "BASE Demo",
|
||||
"runner": "com.bartlomiejpluta.demo.runner.DemoRunner",
|
||||
"maps": [{
|
||||
"uid": "d1b85d85-c52a-46f5-b81e-444847f8ddae",
|
||||
"source": "d1b85d85-c52a-46f5-b81e-444847f8ddae.json",
|
||||
"name": "Hero Home"
|
||||
}, {
|
||||
"uid": "b602601a-e9b0-44bf-bc0d-5f31c9964ba1",
|
||||
"source": "b602601a-e9b0-44bf-bc0d-5f31c9964ba1.json",
|
||||
"name": "Hero House"
|
||||
}, {
|
||||
"uid": "8fbb151f-682a-4357-ba92-157e4097898f",
|
||||
"source": "8fbb151f-682a-4357-ba92-157e4097898f.json",
|
||||
"name": "Forrest"
|
||||
}],
|
||||
"tileSets": [{
|
||||
"uid": "eb5bbf17-efaa-4213-90c3-2785a32f3c37",
|
||||
"source": "eb5bbf17-efaa-4213-90c3-2785a32f3c37.png",
|
||||
"name": "FSM 1",
|
||||
"rows": 16,
|
||||
"columns": 8
|
||||
}, {
|
||||
"uid": "bf5a8b2c-4635-4433-8781-d8fed02c7197",
|
||||
"source": "bf5a8b2c-4635-4433-8781-d8fed02c7197.png",
|
||||
"name": "FSM 2",
|
||||
"rows": 16,
|
||||
"columns": 16
|
||||
}, {
|
||||
"uid": "fa940a9c-aa18-4037-9c20-ca660182d5f4",
|
||||
"source": "fa940a9c-aa18-4037-9c20-ca660182d5f4.png",
|
||||
"name": "FSM 3",
|
||||
"rows": 16,
|
||||
"columns": 16
|
||||
}, {
|
||||
"uid": "60362451-85ed-4bbe-8ac1-225056f48b40",
|
||||
"source": "60362451-85ed-4bbe-8ac1-225056f48b40.png",
|
||||
"name": "FSM 4",
|
||||
"rows": 16,
|
||||
"columns": 16
|
||||
}, {
|
||||
"uid": "6d5672b0-64e6-48a7-8b48-bf73d37ca7d2",
|
||||
"source": "6d5672b0-64e6-48a7-8b48-bf73d37ca7d2.png",
|
||||
"name": "FSM 5",
|
||||
"rows": 16,
|
||||
"columns": 16
|
||||
}, {
|
||||
"uid": "e62eb9ae-5b27-4062-a20e-3076732d450e",
|
||||
"source": "e62eb9ae-5b27-4062-a20e-3076732d450e.png",
|
||||
"name": "Forresta 1",
|
||||
"rows": 16,
|
||||
"columns": 8
|
||||
}, {
|
||||
"uid": "ed448c5f-ab4e-4531-97c6-8fc6c29b3b78",
|
||||
"source": "ed448c5f-ab4e-4531-97c6-8fc6c29b3b78.png",
|
||||
"name": "Forresta 2",
|
||||
"rows": 16,
|
||||
"columns": 16
|
||||
}, {
|
||||
"uid": "70e304dd-c2da-4b5a-8288-a75cc54962ca",
|
||||
"source": "70e304dd-c2da-4b5a-8288-a75cc54962ca.png",
|
||||
"name": "Forresta 3",
|
||||
"rows": 16,
|
||||
"columns": 16
|
||||
}, {
|
||||
"uid": "028377eb-6272-4c70-aa58-2a4b01af52ef",
|
||||
"source": "028377eb-6272-4c70-aa58-2a4b01af52ef.png",
|
||||
"name": "Forresta 4",
|
||||
"rows": 16,
|
||||
"columns": 16
|
||||
}, {
|
||||
"uid": "413e09cf-ba41-4fe8-ac47-9697b5ad0245",
|
||||
"source": "413e09cf-ba41-4fe8-ac47-9697b5ad0245.png",
|
||||
"name": "Candacis Spring",
|
||||
"rows": 35,
|
||||
"columns": 16
|
||||
}],
|
||||
"characterSets": [{
|
||||
"uid": "0dcbaf26-d634-4ca8-9691-7a8ff966f702",
|
||||
"source": "0dcbaf26-d634-4ca8-9691-7a8ff966f702.png",
|
||||
"name": "Garo",
|
||||
"rows": 4,
|
||||
"columns": 4
|
||||
}, {
|
||||
"uid": "61393836-8127-4277-853f-87b48022ae43",
|
||||
"source": "61393836-8127-4277-853f-87b48022ae43.png",
|
||||
"name": "Corpse",
|
||||
"rows": 4,
|
||||
"columns": 4
|
||||
}, {
|
||||
"uid": "e605b2b1-3cab-499f-882d-160ab65b49d8",
|
||||
"source": "e605b2b1-3cab-499f-882d-160ab65b49d8.png",
|
||||
"name": "Skeleton",
|
||||
"rows": 4,
|
||||
"columns": 4
|
||||
}, {
|
||||
"uid": "0ea0fe55-53b2-4eea-8fab-2011e694127b",
|
||||
"source": "0ea0fe55-53b2-4eea-8fab-2011e694127b.png",
|
||||
"name": "Luna",
|
||||
"rows": 4,
|
||||
"columns": 4
|
||||
}, {
|
||||
"uid": "92ac46ff-8cf2-4748-907f-873030c8e378",
|
||||
"source": "92ac46ff-8cf2-4748-907f-873030c8e378.png",
|
||||
"name": "Chests2",
|
||||
"rows": 4,
|
||||
"columns": 4
|
||||
}, {
|
||||
"uid": "fbea4628-e1d3-4acc-800a-ed54c1bb51b6",
|
||||
"source": "fbea4628-e1d3-4acc-800a-ed54c1bb51b6.png",
|
||||
"name": "Blanca",
|
||||
"rows": 4,
|
||||
"columns": 4
|
||||
}, {
|
||||
"uid": "7a723b64-e54a-4fff-852d-108349133111",
|
||||
"source": "7a723b64-e54a-4fff-852d-108349133111.png",
|
||||
"name": "Eagle2",
|
||||
"rows": 4,
|
||||
"columns": 4
|
||||
}, {
|
||||
"uid": "c7ec2341-e5fc-4285-9ecb-a2dfc8a0ed67",
|
||||
"source": "c7ec2341-e5fc-4285-9ecb-a2dfc8a0ed67.png",
|
||||
"name": "Turtle",
|
||||
"rows": 4,
|
||||
"columns": 4
|
||||
}, {
|
||||
"uid": "f1113db3-4a6c-4a07-9b64-32ba8e653e4f",
|
||||
"source": "f1113db3-4a6c-4a07-9b64-32ba8e653e4f.png",
|
||||
"name": "Silver Bat",
|
||||
"rows": 4,
|
||||
"columns": 4
|
||||
}, {
|
||||
"uid": "1779ae2b-474a-4599-8fc3-be34f7d66965",
|
||||
"source": "1779ae2b-474a-4599-8fc3-be34f7d66965.png",
|
||||
"name": "Deku",
|
||||
"rows": 4,
|
||||
"columns": 4
|
||||
}, {
|
||||
"uid": "a6863639-d563-4d88-af8e-c6d087ee2ffb",
|
||||
"source": "a6863639-d563-4d88-af8e-c6d087ee2ffb.png",
|
||||
"name": "FSM Doors",
|
||||
"rows": 4,
|
||||
"columns": 4
|
||||
}, {
|
||||
"uid": "35f770a6-5d94-4ddf-a132-dc3788a3adaf",
|
||||
"source": "35f770a6-5d94-4ddf-a132-dc3788a3adaf.png",
|
||||
"name": "Neko",
|
||||
"rows": 4,
|
||||
"columns": 4
|
||||
}, {
|
||||
"uid": "4a636044-2dbd-4ef3-8bdf-b63501c85ae3",
|
||||
"source": "4a636044-2dbd-4ef3-8bdf-b63501c85ae3.png",
|
||||
"name": "Grandma",
|
||||
"rows": 4,
|
||||
"columns": 4
|
||||
}, {
|
||||
"uid": "f529cbfc-c29d-470b-8804-e50d6a1efc98",
|
||||
"source": "f529cbfc-c29d-470b-8804-e50d6a1efc98.png",
|
||||
"name": "Chests",
|
||||
"rows": 4,
|
||||
"columns": 16
|
||||
}],
|
||||
"fonts": [{
|
||||
"uid": "2261c04f-b02e-4486-b388-8a0fa41622e9",
|
||||
"source": "2261c04f-b02e-4486-b388-8a0fa41622e9.ttf",
|
||||
"name": "Roboto Regular"
|
||||
}],
|
||||
"widgets": [{
|
||||
"uid": "ab9d40b4-eb28-45d7-bff2-9432a05eb41a",
|
||||
"source": "ab9d40b4-eb28-45d7-bff2-9432a05eb41a.xml",
|
||||
"name": "Start Menu"
|
||||
}, {
|
||||
"uid": "56ca6b39-f949-4212-9c23-312db25887e0",
|
||||
"source": "56ca6b39-f949-4212-9c23-312db25887e0.xml",
|
||||
"name": "Game Menu"
|
||||
}, {
|
||||
"uid": "00bd0625-b3b8-4abf-97b7-91f42bce28ec",
|
||||
"source": "00bd0625-b3b8-4abf-97b7-91f42bce28ec.xml",
|
||||
"name": "HUD"
|
||||
}, {
|
||||
"uid": "c473a91a-ff25-4e71-9bec-b35e48102aeb",
|
||||
"source": "c473a91a-ff25-4e71-9bec-b35e48102aeb.xml",
|
||||
"name": "Equipment"
|
||||
}, {
|
||||
"uid": "53ca3e54-0f8d-44fa-8281-acd9c5bba743",
|
||||
"source": "53ca3e54-0f8d-44fa-8281-acd9c5bba743.xml",
|
||||
"name": "Eq Item Menu"
|
||||
}, {
|
||||
"uid": "d78413cd-0dad-4b51-8dd1-54e33535fe53",
|
||||
"source": "d78413cd-0dad-4b51-8dd1-54e33535fe53.xml",
|
||||
"name": "Loot Menu"
|
||||
}, {
|
||||
"uid": "1c2b2ba2-66bf-40ee-97bf-6e5065b7b420",
|
||||
"source": "1c2b2ba2-66bf-40ee-97bf-6e5065b7b420.xml",
|
||||
"name": "Dialog"
|
||||
}, {
|
||||
"uid": "5a5aea0a-8c8b-4730-8e45-9ec6ccc5c4f6",
|
||||
"source": "5a5aea0a-8c8b-4730-8e45-9ec6ccc5c4f6.xml",
|
||||
"name": "Dialog Choice"
|
||||
}],
|
||||
"animations": [{
|
||||
"uid": "e6f067f1-eba0-4e62-99c3-2fd867e6f142",
|
||||
"source": "e6f067f1-eba0-4e62-99c3-2fd867e6f142.png",
|
||||
"name": "Poof",
|
||||
"rows": 4,
|
||||
"columns": 5
|
||||
}, {
|
||||
"uid": "312cc4e6-8c44-43e7-828a-e7e2a77836f3",
|
||||
"source": "312cc4e6-8c44-43e7-828a-e7e2a77836f3.png",
|
||||
"name": "Arrow",
|
||||
"rows": 2,
|
||||
"columns": 2
|
||||
}, {
|
||||
"uid": "54f657bd-8108-464c-9bbe-63944fc14f6b",
|
||||
"source": "54f657bd-8108-464c-9bbe-63944fc14f6b.png",
|
||||
"name": "Punch",
|
||||
"rows": 3,
|
||||
"columns": 5
|
||||
}, {
|
||||
"uid": "0ddac391-4086-4e9c-8310-59db649419ff",
|
||||
"source": "0ddac391-4086-4e9c-8310-59db649419ff.png",
|
||||
"name": "Slash",
|
||||
"rows": 2,
|
||||
"columns": 5
|
||||
}, {
|
||||
"uid": "c8883e76-ae93-4673-8893-d2ec72c1e199",
|
||||
"source": "c8883e76-ae93-4673-8893-d2ec72c1e199.png",
|
||||
"name": "Shuriken",
|
||||
"rows": 2,
|
||||
"columns": 3
|
||||
}, {
|
||||
"uid": "aeb17449-c342-4dab-9057-5fb05183fd03",
|
||||
"source": "aeb17449-c342-4dab-9057-5fb05183fd03.png",
|
||||
"name": "Heart Emoji",
|
||||
"rows": 6,
|
||||
"columns": 4
|
||||
}],
|
||||
"sounds": [{
|
||||
"uid": "1311327d-4b74-4252-94da-23ee4129e357",
|
||||
"source": "1311327d-4b74-4252-94da-23ee4129e357.ogg",
|
||||
"name": "Sword slash"
|
||||
}, {
|
||||
"uid": "e452e215-f581-40fe-a5cf-f555d3db83b8",
|
||||
"source": "e452e215-f581-40fe-a5cf-f555d3db83b8.ogg",
|
||||
"name": "Deku death"
|
||||
}, {
|
||||
"uid": "cd8a40f2-1e2e-4e1d-a13f-b4fe210a04df",
|
||||
"source": "cd8a40f2-1e2e-4e1d-a13f-b4fe210a04df.ogg",
|
||||
"name": "Arrow"
|
||||
}, {
|
||||
"uid": "7c33cfee-e6a8-42b8-8b1d-c801b242dcf0",
|
||||
"source": "7c33cfee-e6a8-42b8-8b1d-c801b242dcf0.ogg",
|
||||
"name": "Arrow punch"
|
||||
}],
|
||||
"iconSets": [{
|
||||
"uid": "ddc1e14f-0d1f-4291-a29d-0dc5d8e9242b",
|
||||
"source": "ddc1e14f-0d1f-4291-a29d-0dc5d8e9242b.png",
|
||||
"name": "Generic",
|
||||
"rows": 35,
|
||||
"columns": 12
|
||||
}],
|
||||
"autoTiles": [{
|
||||
"uid": "f6bcd0ea-f293-4864-bd13-d1c4e8b79080",
|
||||
"source": "f6bcd0ea-f293-4864-bd13-d1c4e8b79080.png",
|
||||
"name": "FSM 1",
|
||||
"rows": 4,
|
||||
"columns": 8,
|
||||
"layout": "LAYOUT_2X3"
|
||||
}, {
|
||||
"uid": "88042125-4c6d-4dfa-ad1d-8e78b6df9ee9",
|
||||
"source": "88042125-4c6d-4dfa-ad1d-8e78b6df9ee9.png",
|
||||
"name": "FSM 2",
|
||||
"rows": 4,
|
||||
"columns": 8,
|
||||
"layout": "LAYOUT_2X2"
|
||||
}, {
|
||||
"uid": "6584a279-e937-497e-a056-b1e77bff2439",
|
||||
"source": "6584a279-e937-497e-a056-b1e77bff2439.png",
|
||||
"name": "FSM 3",
|
||||
"rows": 3,
|
||||
"columns": 8,
|
||||
"layout": "LAYOUT_2X3"
|
||||
}, {
|
||||
"uid": "b475367a-7bf8-44ee-b916-6e81a78f97d9",
|
||||
"source": "b475367a-7bf8-44ee-b916-6e81a78f97d9.png",
|
||||
"name": "FSM 4",
|
||||
"rows": 3,
|
||||
"columns": 8,
|
||||
"layout": "LAYOUT_2X2"
|
||||
}, {
|
||||
"uid": "fb57775d-988d-42c4-85bf-9f415c1f9086",
|
||||
"source": "fb57775d-988d-42c4-85bf-9f415c1f9086.png",
|
||||
"name": "Forresta",
|
||||
"rows": 4,
|
||||
"columns": 8,
|
||||
"layout": "LAYOUT_2X3"
|
||||
}, {
|
||||
"uid": "04ac5ad8-4100-4016-97b3-a51a728ca49d",
|
||||
"source": "04ac5ad8-4100-4016-97b3-a51a728ca49d.png",
|
||||
"name": "Candacis Spring 1",
|
||||
"rows": 3,
|
||||
"columns": 2,
|
||||
"layout": "LAYOUT_2X3"
|
||||
}, {
|
||||
"uid": "fc294b9e-105a-4120-8caa-393d78fdf414",
|
||||
"source": "fc294b9e-105a-4120-8caa-393d78fdf414.png",
|
||||
"name": "Candacis Spring 2",
|
||||
"rows": 1,
|
||||
"columns": 3,
|
||||
"layout": "LAYOUT_2X3"
|
||||
}]
|
||||
}
|
||||
@@ -11,6 +11,7 @@ import com.bartlomiejpluta.base.util.random.DiceRoller;
|
||||
import com.bartlomiejpluta.demo.world.item.Item;
|
||||
import lombok.Getter;
|
||||
import lombok.NonNull;
|
||||
import org.joml.Vector2ic;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.function.Function;
|
||||
@@ -46,8 +47,14 @@ public class Friend extends Creature implements NPC {
|
||||
}
|
||||
|
||||
public CompletableFuture<Object> interact(Character trigger) {
|
||||
if(interaction != null && !interacting) {
|
||||
if (interaction != null && !interacting) {
|
||||
setFaceDirection(getDirectionTowards(trigger));
|
||||
|
||||
var movement = getMovement();
|
||||
if (movement != null) {
|
||||
movement.abort();
|
||||
}
|
||||
|
||||
priorStrategy = strategy;
|
||||
strategy = NoopAI.INSTANCE;
|
||||
interacting = true;
|
||||
@@ -67,8 +74,13 @@ public class Friend extends Creature implements NPC {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Friend asAnimal() {
|
||||
this.strategy = new RandomMovementAI<>(this, 4f);
|
||||
public Friend randomMovementAI(float intervalSeconds, Vector2ic origin, int radius) {
|
||||
this.strategy = new RandomMovementAI<>(this, intervalSeconds, origin, radius);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Friend randomMovementAI(float intervalSeconds) {
|
||||
this.strategy = new RandomMovementAI<>(this, intervalSeconds);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,10 +2,53 @@ package com.bartlomiejpluta.demo.map;
|
||||
|
||||
import com.bartlomiejpluta.base.api.context.Context;
|
||||
import com.bartlomiejpluta.base.api.map.model.GameMap;
|
||||
import com.bartlomiejpluta.demo.entity.Friend;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import static com.bartlomiejpluta.base.lib.animation.AnimationRunner.simple;
|
||||
|
||||
public class HeroHomeHandler extends BaseMapHandler {
|
||||
@Override
|
||||
public void onOpen(Context context, GameMap map) {
|
||||
dialog(player, "Ahhh, another beautiful day for an adventure... Let's go!");
|
||||
}
|
||||
|
||||
protected CompletableFuture<Object> triggerGrandmaDialog(Friend grandma) {
|
||||
return dialog(player, "Good morning Grandma, how are you doing?")
|
||||
.thenCompose(n -> dialog(grandma, "Hello Honey... I'm fine thank you. Have a sit, I will bring you a breakfast in a moment."))
|
||||
.thenCompose(n -> dialog(player, "Thank you Grandma."))
|
||||
.thenCompose(n -> dialog(grandma, "What are you going to do today, Luna?"))
|
||||
.thenCompose(n -> dialogChoice(player,
|
||||
"I'm going to fix your roof, Grandma",
|
||||
"I'd like to look for some hidden treasure around your house",
|
||||
"I'm going to kill the Dekus outside",
|
||||
"Hmm... I don't know yet..."
|
||||
)).thenCompose(o -> dialog(grandma, switch (o) {
|
||||
case 0 -> "Ohh, Luna! It would be amazing, thank you!";
|
||||
case 1 -> "It seems you are going to have a wonderful adventure. Good luck!";
|
||||
case 2 -> "Be careful! Dekus are capable to attack from a distance!";
|
||||
case 3 -> "Hmm... our roof requires urgent fix... also there are some dangerous Dekus around our house...";
|
||||
default -> null;
|
||||
}).thenApply(n -> o))
|
||||
.thenCompose(o -> dialog(player, switch (o) {
|
||||
case 0 -> "You're welcome Grandma!";
|
||||
case 1 -> "Thank you Grandma! Hopefully will found something interesting...";
|
||||
case 2 -> "Oh, thanks. I believe I also would need to have some ranged weapon...";
|
||||
case 3 -> "Okay, there is lot of things to be done then.";
|
||||
default -> null;
|
||||
}))
|
||||
.thenCompose(n -> dialog(player, "Okay, I need to go. Thank you Grandma!"))
|
||||
.thenCompose(n -> dialog(grandma, "Thank you Luna! Be careful!"));
|
||||
}
|
||||
|
||||
protected CompletableFuture<Object> triggerNekoDialog(Friend neko) {
|
||||
return dialog(player, "Ohhh, here you are Kitty...")
|
||||
.thenCompose(n -> CompletableFuture.allOf(
|
||||
simple(A.animations.heart_emoji.$).scale(0.4f).animationSpeed(1.7f).offset(0, -30).run(context, player),
|
||||
simple(A.animations.heart_emoji.$).scale(0.4f).animationSpeed(1.7f).offset(0, -15).delay(100).run(context, neko)
|
||||
))
|
||||
.thenCompose(n -> dialog(neko, "Meow, meow..."))
|
||||
.thenCompose(n -> dialog(neko, "Purr, purr..."));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user