From a884e0e058a3ac474f296b2afbd330654690cfeb Mon Sep 17 00:00:00 2001 From: Isse Date: Sat, 3 Jun 2023 22:14:18 +0000 Subject: [PATCH] Various rtsim related stuff --- CHANGELOG.md | 2 + assets/voxygen/i18n/en/npc.ftl | 4 + client/src/lib.rs | 4 +- common/net/src/msg/server.rs | 6 +- common/src/cmd.rs | 7 + common/src/comp/body.rs | 26 ++ common/src/comp/inventory/item/modular.rs | 1 + common/src/mounting.rs | 22 +- common/src/resources.rs | 7 + common/state/src/state.rs | 11 +- rtsim/src/ai/mod.rs | 397 +++++++++++++++------- rtsim/src/ai/predicate.rs | 93 +++++ rtsim/src/data/mod.rs | 2 +- rtsim/src/data/npc.rs | 2 +- rtsim/src/event.rs | 10 +- rtsim/src/lib.rs | 5 +- rtsim/src/rule/npc_ai.rs | 300 +++++++++------- rtsim/src/rule/simulate_npcs.rs | 67 +++- server/src/client.rs | 2 +- server/src/cmd.rs | 77 ++++- server/src/events/interaction.rs | 30 +- server/src/rtsim/mod.rs | 31 +- server/src/sys/entity_sync.rs | 5 +- world/src/sim/mod.rs | 3 +- world/src/site2/plot/bridge.rs | 2 +- 25 files changed, 824 insertions(+), 292 deletions(-) create mode 100644 rtsim/src/ai/predicate.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index 47900be019..2d53a3d006 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -87,6 +87,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Underwater fall damage - The scale component now behaves properly - Multiple model support for dropped items (orichalcum armor) +- Made rtsim monsters not go into too deep water, and certainly not outside the map. +- Fixed bug where npcs would be dismounted from vehicles if loaded/unloaded in a certain order. ## [0.14.0] - 2023-01-07 diff --git a/assets/voxygen/i18n/en/npc.ftl b/assets/voxygen/i18n/en/npc.ftl index c07d12b26b..d80f37e8a8 100644 --- a/assets/voxygen/i18n/en/npc.ftl +++ b/assets/voxygen/i18n/en/npc.ftl @@ -269,6 +269,10 @@ npc-speech-witness_death = .a0 = No! .a1 = This is terrible! .a2 = Oh my goodness! +npc-speech-welcome-aboard = + .a0 = Welcome aboard! + .a1 = Can I see your ticket... just kidding it's free! + .a2 = Have a nice ride! npc-speech-dir_north = north npc-speech-dir_north_east = north-east npc-speech-dir_east = east diff --git a/client/src/lib.rs b/client/src/lib.rs index 1e073b9848..0e2dc2c0f4 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -2233,7 +2233,7 @@ impl Client { return Err(Error::Other("Failed to find entity from uid.".into())); } }, - ServerGeneral::TimeOfDay(time_of_day, calendar, new_time) => { + ServerGeneral::TimeOfDay(time_of_day, calendar, new_time, time_scale) => { self.target_time_of_day = Some(time_of_day); *self.state.ecs_mut().write_resource() = calendar; let mut time = self.state.ecs_mut().write_resource::