From 3cf5327620caa8964cf8fb29f64171023b1e6f45 Mon Sep 17 00:00:00 2001 From: andrei Date: Wed, 31 Jan 2024 00:23:15 +0200 Subject: [PATCH] robofac/json: fix prototype dialogue checks Co-authored-by: Andrew Rosa Co-authored-by: Anton Simakov <67688115+GuardianDll@users.noreply.github.com> --- .../robofac_intercom/robofac_intercom.json | 2 +- .../robofac_intercom_prototypes.json | 33 +++++++++---------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/data/json/npcs/robofac/robofac_intercom/robofac_intercom.json b/data/json/npcs/robofac/robofac_intercom/robofac_intercom.json index 82432435a91b1..40a99325abdf0 100644 --- a/data/json/npcs/robofac/robofac_intercom/robofac_intercom.json +++ b/data/json/npcs/robofac/robofac_intercom/robofac_intercom.json @@ -772,7 +772,7 @@ "id": "TALK_ROBOFAC_INTERCOM_ARMOR_POSITIVE", "type": "talk_topic", "dynamic_line": "We've solved that issue with our more recent prototypes.\" There is a brief pause. \"You seem like a good candidate. We will transfer over the additional pieces to complete that prototype set, with the goal of collecting additional field data. The core armor platform is solid, and we have been iterating on supplementary pieces we would be willing to trade to you. Any feedback on their performance would be appreciated.", - "speaker_effect": { "effect": { "math": [ "u_hub01_good_candidate", "++" ] } }, + "speaker_effect": { "effect": { "math": [ "u_hub01_good_candidate", "=", "1" ] } }, "responses": [ { "text": "Thank you.", diff --git a/data/json/npcs/robofac/robofac_intercom/robofac_intercom_prototypes.json b/data/json/npcs/robofac/robofac_intercom/robofac_intercom_prototypes.json index 43bde1e05558b..411c3efa335c4 100644 --- a/data/json/npcs/robofac/robofac_intercom/robofac_intercom_prototypes.json +++ b/data/json/npcs/robofac/robofac_intercom/robofac_intercom_prototypes.json @@ -21,7 +21,7 @@ "condition": { "and": [ { "math": [ "time_since(u_timer_hub_rnd_u_waiting_on_armor)", ">", "time('1 d')" ] }, - { "math": [ "hub01_uhmwpe_researched", "==", "1" ] }, + { "math": [ "hub01_uhmwpe_researched", "!=", "1" ] }, { "u_has_var": "u_gave_armor_disk", "type": "dialogue", "context": "hub_rnd", "value": "yes" } ] }, @@ -60,10 +60,8 @@ "text": "How goes work on the HWP?", "condition": { "and": [ + { "math": [ "has_var(u_timer_hub_rnd_u_waiting_on_gun)" ] }, { "math": [ "time_since(u_timer_hub_rnd_u_waiting_on_gun)", "<", "time('7 d')" ] }, - { - "not": { "u_has_var": "u_has_researched_gun", "type": "dialogue", "context": "hub_rnd", "value": "yes" } - }, { "u_has_var": "robofac_merc_1_HWP", "type": "dialogue", "context": "robofac_merc_1", "value": "yes" } ] }, @@ -184,7 +182,7 @@ "text": "How is my ordered armor going? It should be done by now.", "condition": { "and": [ - { "math": [ "time_since(u_timer_hub_rnd_u_waiting_on_hub)", "<", "time('1 d')" ] }, + { "math": [ "time_since(u_timer_hub_rnd_u_waiting_on_hub)", ">", "time('1 d')" ] }, { "or": [ { "u_has_var": "u_armor_type", "value": "robofac_armor_pieces_rig", "type": "dialogue", "context": "hub_rnd" }, @@ -228,10 +226,8 @@ "text": "The HWP should be complete by now, right?", "condition": { "and": [ + { "math": [ "has_var(u_timer_hub_rnd_u_waiting_on_gun)" ] }, { "math": [ "time_since(u_timer_hub_rnd_u_waiting_on_gun)", ">", "time('7 d')" ] }, - { - "not": { "u_has_var": "u_has_researched_gun", "type": "dialogue", "context": "hub_rnd", "value": "yes" } - }, { "u_has_var": "robofac_merc_1_HWP", "type": "dialogue", "context": "robofac_merc_1", "value": "yes" } ] }, @@ -573,7 +569,7 @@ "effect": [ { "u_sell_item": "RobofacCoin", "count": 2 }, { "u_add_var": "u_project_ongoing", "type": "dialogue", "context": "hub_rnd", "value": "yes" }, - { "math": [ "u_timer_hub_rnd_u_waiting_on_gun", "=", "time('now')" ] }, + { "math": [ "u_timer_hub_rnd_u_waiting_on_hub", "=", "time('now')" ] }, { "u_add_var": "u_current_project", "type": "dialogue", "context": "hub_rnd", "value": "yes" } ], "topic": "TALK_ROBOFAC_INTERCOM_SERVICES" @@ -595,7 +591,7 @@ "effect": [ { "u_sell_item": "RobofacCoin", "count": 4 }, { "u_add_var": "u_project_ongoing", "type": "dialogue", "context": "hub_rnd", "value": "yes" }, - { "math": [ "u_timer_hub_rnd_u_waiting_on_gun", "=", "time('now')" ] }, + { "math": [ "u_timer_hub_rnd_u_waiting_on_hub", "=", "time('now')" ] }, { "u_add_var": "u_current_project", "type": "dialogue", "context": "hub_rnd", "value": "yes" } ], "topic": "TALK_ROBOFAC_INTERCOM_SERVICES" @@ -617,7 +613,7 @@ "effect": [ { "u_sell_item": "RobofacCoin", "count": 4 }, { "u_add_var": "u_project_ongoing", "type": "dialogue", "context": "hub_rnd", "value": "yes" }, - { "math": [ "u_timer_hub_rnd_u_waiting_on_gun", "=", "time('now')" ] }, + { "math": [ "u_timer_hub_rnd_u_waiting_on_hub", "=", "time('now')" ] }, { "u_add_var": "u_current_project", "type": "dialogue", "context": "hub_rnd", "value": "yes" } ], "topic": "TALK_ROBOFAC_INTERCOM_SERVICES" @@ -639,7 +635,7 @@ "effect": [ { "u_sell_item": "RobofacCoin", "count": 4 }, { "u_add_var": "u_project_ongoing", "type": "dialogue", "context": "hub_rnd", "value": "yes" }, - { "math": [ "u_timer_hub_rnd_u_waiting_on_gun", "=", "time('now')" ] }, + { "math": [ "u_timer_hub_rnd_u_waiting_on_hub", "=", "time('now')" ] }, { "u_add_var": "u_current_project", "type": "dialogue", "context": "hub_rnd", "value": "yes" } ], "topic": "TALK_ROBOFAC_INTERCOM_SERVICES" @@ -661,7 +657,7 @@ "effect": [ { "u_sell_item": "RobofacCoin", "count": 12 }, { "u_add_var": "u_project_ongoing", "type": "dialogue", "context": "hub_rnd", "value": "yes" }, - { "math": [ "u_timer_hub_rnd_u_waiting_on_gun", "=", "time('now')" ] }, + { "math": [ "u_timer_hub_rnd_u_waiting_on_hub", "=", "time('now')" ] }, { "u_add_var": "u_current_project", "type": "dialogue", "context": "hub_rnd", "value": "yes" } ], "topic": "TALK_ROBOFAC_INTERCOM_SERVICES" @@ -816,6 +812,7 @@ "effect": [ { "u_add_var": "u_has_researched_gun", "type": "dialogue", "context": "hub_rnd", "value": "yes" }, { "u_add_var": "u_project_ongoing", "type": "dialogue", "context": "hub_rnd", "value": "no" }, + { "u_lose_var": "u_waiting_on_gun", "type": "timer", "context": "hub_rnd" }, { "u_spawn_item": "robofac_gun" }, { "u_spawn_item": "robofac_gun_ar" }, { "u_spawn_item": "robofac_gun_smg" }, @@ -844,7 +841,7 @@ { "u_sell_item": "RobofacCoin", "count": 1 }, { "u_consume_item": "phase_immersion_suit", "count": 1, "popup": true }, { "u_add_faction_trust": 1 }, - { "math": [ "u_timer_hub_rnd_u_waiting_on_gun", "=", "time('now')" ] }, + { "math": [ "u_timer_hub_rnd_u_waiting_on_hub", "=", "time('now')" ] }, { "u_add_var": "u_project_ongoing", "type": "dialogue", "context": "hub_rnd", "value": "yes" }, { "u_add_var": "u_current_project", @@ -890,7 +887,7 @@ { "u_sell_item": "RobofacCoin", "count": 1 }, { "u_consume_item": "rm13_armor", "count": 1, "popup": true }, { "u_add_faction_trust": 1 }, - { "math": [ "u_timer_hub_rnd_u_waiting_on_gun", "=", "time('now')" ] }, + { "math": [ "u_timer_hub_rnd_u_waiting_on_hub", "=", "time('now')" ] }, { "u_add_var": "u_project_ongoing", "type": "dialogue", "context": "hub_rnd", "value": "yes" }, { "u_add_var": "u_current_project", "type": "dialogue", "context": "hub_rnd", "value": "rm13_armor" } ], @@ -936,7 +933,7 @@ { "u_sell_item": "RobofacCoin", "count": 2 }, { "u_consume_item": "dimensional_anchor", "count": 1, "popup": true }, { "u_add_faction_trust": 1 }, - { "math": [ "u_timer_hub_rnd_u_waiting_on_gun", "=", "time('now')" ] }, + { "math": [ "u_timer_hub_rnd_u_waiting_on_hub", "=", "time('now')" ] }, { "u_add_var": "u_project_ongoing", "type": "dialogue", "context": "hub_rnd", "value": "yes" }, { "u_add_var": "u_current_project", "type": "dialogue", "context": "hub_rnd", "value": "anchor_pt_1" } ], @@ -985,7 +982,7 @@ { "u_consume_item": "dimensional_anchor", "count": 1, "popup": true }, { "u_consume_item": "robofac_armor_rig", "count": 1, "popup": true }, { "u_add_faction_trust": 1 }, - { "math": [ "u_timer_hub_rnd_u_waiting_on_gun", "=", "time('now')" ] }, + { "math": [ "u_timer_hub_rnd_u_waiting_on_hub", "=", "time('now')" ] }, { "u_add_var": "u_project_ongoing", "type": "dialogue", "context": "hub_rnd", "value": "yes" }, { "u_add_var": "u_current_project", "type": "dialogue", "context": "hub_rnd", "value": "anchor_pt_2" } ], @@ -1085,7 +1082,7 @@ "speaker_effect": { "effect": [ { "u_add_faction_trust": 1 }, - { "math": [ "u_timer_hub_rnd_u_waiting_on_gun", "=", "time('now')" ] }, + { "math": [ "u_timer_hub_rnd_u_waiting_on_hub", "=", "time('now')" ] }, { "u_add_var": "u_project_ongoing", "type": "dialogue", "context": "hub_rnd", "value": "yes" }, { "u_add_var": "u_current_project", "type": "dialogue", "context": "hub_rnd", "value": "hwp_exodii" } ],