Skip to content

Commit

Permalink
Merge pull request #77425 from Uwuewsky/refactor-cody
Browse files Browse the repository at this point in the history
Armor order refactoring
  • Loading branch information
Maleclypse authored Oct 30, 2024
2 parents aad7acc + d109bcd commit df6ebc8
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 333 deletions.
86 changes: 16 additions & 70 deletions data/json/npcs/isolated_road/isolated_road_cody_dialogue.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@
"text": "Could you make me a weapon?",
"condition": {
"and": [
{ "not": { "u_has_var": "dialogue_artisans_gunsmith_mentioned_quest", "value": "yes" } },
{ "not": { "u_has_var": "dialogue_artisans_blacksmith_crafting", "value": "yes" } },
{ "u_has_var": "dialogue_artisans_blacksmith_heard_the_deal", "value": "yes" }
{ "not": { "compare_string": [ "yes", { "u_val": "dialogue_artisans_gunsmith_mentioned_quest" } ] } },
{ "not": { "compare_string": [ "yes", { "u_val": "dialogue_artisans_blacksmith_crafting" } ] } },
{ "compare_string": [ "yes", { "u_val": "dialogue_artisans_blacksmith_heard_the_deal" } ] }
]
},
"topic": "TALK_BLACKSMITH_NOT_INTERESTED_FABRICATE"
Expand All @@ -144,11 +144,10 @@
"text": "Could you make me a weapon?",
"condition": {
"and": [
{ "not": { "u_has_var": "dialogue_artisans_blacksmith_crafting", "value": "yes" } },
{ "not": { "compare_string": [ "yes", { "u_val": "dialogue_artisans_blacksmith_crafting" } ] } },
{
"//": "this variable means that you have completed quest 1 for Cody and shown Jay",
"u_has_var": "dialogue_artisans_gunsmith_mentioned_quest",
"value": "yes"
"compare_string": [ "yes", { "u_val": "dialogue_artisans_gunsmith_mentioned_quest" } ]
}
]
},
Expand All @@ -158,68 +157,6 @@
"text": "How is my armor coming?",
"condition": {
"and": [
{ "math": [ "time_since(u_timer_artisans_u_waiting_on_armor)", "<", "time('21 d')" ] },
{ "math": [ "u_number_artisans_blacksmith_wait", "==", "3" ] },
{ "compare_string": [ "yes", { "u_val": "dialogue_artisans_blacksmith_crafting" } ] },
{ "compare_string": [ "armor", { "u_val": "dialogue_artisans_u_current_project" } ] }
]
},
"topic": "TALK_BLACKSMITH_ARMOR_NOT_READY"
},
{
"text": "How is my armor coming?",
"condition": {
"and": [
{ "math": [ "time_since(u_timer_artisans_u_waiting_on_armor)", ">=", "time('21 d')" ] },
{ "math": [ "u_number_artisans_blacksmith_wait", "==", "3" ] },
{ "compare_string": [ "yes", { "u_val": "dialogue_artisans_blacksmith_crafting" } ] },
{ "compare_string": [ "armor", { "u_val": "dialogue_artisans_u_current_project" } ] }
]
},
"topic": "TALK_BLACKSMITH_ARMOR_READY"
},
{
"text": "How is my armor coming?",
"condition": {
"and": [
{ "math": [ "time_since(u_timer_artisans_u_waiting_on_armor)", "<", "time('28 d')" ] },
{ "math": [ "u_number_artisans_blacksmith_wait", "==", "4" ] },
{ "compare_string": [ "yes", { "u_val": "dialogue_artisans_blacksmith_crafting" } ] },
{ "compare_string": [ "armor", { "u_val": "dialogue_artisans_u_current_project" } ] }
]
},
"topic": "TALK_BLACKSMITH_ARMOR_NOT_READY"
},
{
"text": "How is my armor coming?",
"condition": {
"and": [
{ "math": [ "time_since(u_timer_artisans_u_waiting_on_armor)", ">=", "time('28 d')" ] },
{ "math": [ "u_number_artisans_blacksmith_wait", "==", "4" ] },
{ "compare_string": [ "yes", { "u_val": "dialogue_artisans_blacksmith_crafting" } ] },
{ "compare_string": [ "armor", { "u_val": "dialogue_artisans_u_current_project" } ] }
]
},
"topic": "TALK_BLACKSMITH_ARMOR_READY"
},
{
"text": "How is my armor coming?",
"condition": {
"and": [
{ "math": [ "time_since(u_timer_artisans_u_waiting_on_armor)", "<", "time('35 d')" ] },
{ "math": [ "u_number_artisans_blacksmith_wait", "==", "5" ] },
{ "compare_string": [ "yes", { "u_val": "dialogue_artisans_blacksmith_crafting" } ] },
{ "compare_string": [ "armor", { "u_val": "dialogue_artisans_u_current_project" } ] }
]
},
"topic": "TALK_BLACKSMITH_ARMOR_NOT_READY"
},
{
"text": "How is my armor coming?",
"condition": {
"and": [
{ "math": [ "time_since(u_timer_artisans_u_waiting_on_armor)", ">=", "time('35 d')" ] },
{ "math": [ "u_number_artisans_blacksmith_wait", "==", "5" ] },
{ "compare_string": [ "yes", { "u_val": "dialogue_artisans_blacksmith_crafting" } ] },
{ "compare_string": [ "armor", { "u_val": "dialogue_artisans_u_current_project" } ] }
]
Expand All @@ -230,8 +167,8 @@
"text": "How is my weapon coming?",
"condition": {
"and": [
{ "u_has_var": "dialogue_artisans_blacksmith_crafting", "value": "yes" },
{ "u_has_var": "dialogue_artisans_u_current_project", "value": "weapon" }
{ "compare_string": [ "yes", { "u_val": "dialogue_artisans_blacksmith_crafting" } ] },
{ "compare_string": [ "weapon", { "u_val": "dialogue_artisans_u_current_project" } ] }
]
},
"topic": "TALK_BLACKSMITH_WEAPON_READY"
Expand Down Expand Up @@ -449,5 +386,14 @@
"topic": "TALK_DONE"
}
]
},
{
"id": "TALK_BLACKSMITH_NOT_INTERESTED_FABRICATE",
"//": "If you haven't completed the opening quest yet Cody will blow you off",
"type": "talk_topic",
"dynamic_line": [
"Sorry, I don't really have the time to work on something like that. I've got lots of pieces for sale on the shelves."
],
"responses": [ { "text": "Alright.", "topic": "TALK_BLACKSMITH_SERVICES" } ]
}
]
Loading

0 comments on commit df6ebc8

Please sign in to comment.