configs/
vassals.rs

1use schemars::JsonSchema;
2
3use serde::{Deserialize, Serialize};
4use tsify_next::Tsify;
5
6#[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, Tsify)]
7pub struct VassalsSettings {
8    #[schemars(
9        title = "Длительность защиты вассала",
10        description = "Длительность времени пока вассал имеет защиту и не может быть перехвачен (сек.)"
11    )]
12    pub vassal_shield_duration_secs: i64,
13    /// Name of the registered `currencies` native fn computing the
14    /// suzerain's claim reward. Defaults to the shipped constant-stub port;
15    /// config that omits it keeps prod behavior.
16    #[serde(default = "default_suzerain_reward_fn")]
17    #[schemars(skip)]
18    pub suzerain_reward_fn: String,
19    /// Name of the registered `currencies` native fn computing the vassal's
20    /// claim reward. Defaults to the shipped constant-stub port.
21    #[serde(default = "default_vassal_reward_fn")]
22    #[schemars(skip)]
23    pub vassal_reward_fn: String,
24}
25
26fn default_suzerain_reward_fn() -> String {
27    "suzerain_reward_const".to_string()
28}
29
30fn default_vassal_reward_fn() -> String {
31    "vassal_reward_const".to_string()
32}