From 78948f204f5c38274ddec902350c4140b5e1da96 Mon Sep 17 00:00:00 2001 From: MNG-cataclysm <58958654+MNG-cataclysm@users.noreply.github.com> Date: Sun, 11 Dec 2022 11:23:39 -0500 Subject: [PATCH] Logging Camp managers will now take quest items (#62556) * Add the stuff * Specify globallity * Restart Tests --- data/json/effect_on_condition.json | 53 +++++++++++++++++++ .../lumbermill_missions.json | 5 +- 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/data/json/effect_on_condition.json b/data/json/effect_on_condition.json index e79a67e77cc45..573013cafb9fd 100644 --- a/data/json/effect_on_condition.json +++ b/data/json/effect_on_condition.json @@ -483,5 +483,58 @@ } } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_MISSION_GET_DRIVEBELTS_done", + "global": true, + "condition": { "u_has_items": { "item": "drivebelt", "count": 3 } }, + "effect": [ { "u_sell_item": "drivebelt", "count": 3 } ], + "false_effect": [ { "u_sell_item": "drivebelt_makeshift", "count": 3 } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_MISSION_LUMBERMILL_GET_6_BLANKETS_done", + "global": true, + "condition": { + "or": [ + { "u_has_items": { "item": "blanket", "count": 6 } }, + { "u_has_items": { "item": "fur_blanket", "count": 6 } }, + { "u_has_items": { "item": "electric_blanket", "count": 6 } }, + { "u_has_items": { "item": "quilt", "count": 6 } }, + { "u_has_items": { "item": "quilt_patchwork", "count": 6 } } + ] + }, + "effect": [ + { + "run_eocs": [ + { + "id": "sell_blanket", + "condition": { "u_has_items": { "item": "blanket", "count": 6 } }, + "effect": { "u_sell_item": "blanket", "count": 6 } + }, + { + "id": "sell_fur_blanket", + "condition": { "u_has_items": { "item": "fur_blanket", "count": 6 } }, + "effect": { "u_sell_item": "fur_blanket", "count": 6 } + }, + { + "id": "sell_electric_blanket", + "condition": { "u_has_items": { "item": "electric_blanket", "count": 6 } }, + "effect": { "u_sell_item": "electric_blanket", "count": 6 } + }, + { + "id": "sell_quilt", + "condition": { "u_has_items": { "item": "quilt", "count": 6 } }, + "effect": { "u_sell_item": "quilt", "count": 6 } + }, + { + "id": "sell_quilt_patchwork", + "condition": { "u_has_items": { "item": "quilt_patchwork", "count": 6 } }, + "effect": { "u_sell_item": "quilt_patchwork", "count": 6 } + } + ] + } + ] } ] diff --git a/data/json/npcs/lumbermill_employees/lumbermill_missions.json b/data/json/npcs/lumbermill_employees/lumbermill_missions.json index b90b382efc8b6..77eb485a6cae3 100644 --- a/data/json/npcs/lumbermill_employees/lumbermill_missions.json +++ b/data/json/npcs/lumbermill_employees/lumbermill_missions.json @@ -13,6 +13,7 @@ { "u_has_items": { "item": "drivebelt_makeshift", "count": 3 } } ] }, + "end": { "effect": { "run_eocs": "EOC_MISSION_GET_DRIVEBELTS_done" } }, "origins": [ "ORIGIN_SECONDARY" ], "followup": "MISSION_LUMBERMILL_GET_1000_NAILS", "has_generic_rewards": true, @@ -110,14 +111,14 @@ { "u_has_items": { "item": "blanket", "count": 6 } }, { "u_has_items": { "item": "fur_blanket", "count": 6 } }, { "u_has_items": { "item": "electric_blanket", "count": 6 } }, - { "u_has_items": { "item": "fur_blanket", "count": 6 } }, { "u_has_items": { "item": "quilt", "count": 6 } }, { "u_has_items": { "item": "quilt_patchwork", "count": 6 } } ] }, "origins": [ "ORIGIN_SECONDARY" ], "end": { - "update_mapgen": { "om_terrain": "lumbermill_1_1_ocu", "place_nested": [ { "chunks": [ "occupied_lum_hotel_1_1" ], "x": 0, "y": 0 } ] } + "update_mapgen": { "om_terrain": "lumbermill_1_1_ocu", "place_nested": [ { "chunks": [ "occupied_lum_hotel_1_1" ], "x": 0, "y": 0 } ] }, + "effect": { "run_eocs": "EOC_MISSION_LUMBERMILL_GET_6_BLANKETS_done" } }, "followup": "MISSION_LUMBERMILL_SET_TRADE_ROUTE", "has_generic_rewards": true,