diff --git a/.github/workflows/matrix.yml b/.github/workflows/matrix.yml index 7b9d58ce18dce..868d8893b4588 100644 --- a/.github/workflows/matrix.yml +++ b/.github/workflows/matrix.yml @@ -235,7 +235,12 @@ jobs: CCACHE_FILECLONE: true CCACHE_HARDLINK: true CCACHE_NOCOMPRESS: true - SKIP: ${{ ( github.event.pull_request.draft == true && matrix.title != 'Basic Build and Test (Clang 10, Ubuntu, Curses)' ) || ( matrix.dont_skip_data_only_changes == 0 && needs.skip-duplicates.outputs.should_skip_code == 'true' ) || ( matrix.dont_skip_data_only_changes != 0 && needs.skip-duplicates-mods.outputs.should_skip_data == 'true' ) }} + SKIP: >- + ${{ + ( github.event.pull_request.draft == true && matrix.title != 'Basic Build and Test (Clang 10, Ubuntu, Curses)' ) || + ( matrix.dont_skip_data_only_changes == 0 && needs.skip-duplicates.outputs.should_skip_code == 'true' ) || + ( matrix.dont_skip_data_only_changes != 0 && needs.skip-duplicates-mods.outputs.should_skip_data == 'true' ) + }} SKIP_TESTS: ${{ needs.matrix-variables.outputs.skip_tests }} steps: - name: Maximize build space @@ -356,7 +361,7 @@ jobs: if-no-files-found: ignore retention-days: 9 emscripten: - needs: [ varied_builds ] + needs: [ skip-duplicates-code, varied_builds ] uses: ./.github/workflows/emscripten.yml - if: ${{ success() && github.event.pull_request.draft == false }} + if: ${{ needs.skip-duplicates.outputs.should_skip_code != 'true' && success() && github.event.pull_request.draft == false }} secrets: inherit diff --git a/data/json/construction/furniture_tools.json b/data/json/construction/furniture_tools.json index fd6cf2b65b362..c4a4c82f45d7f 100644 --- a/data/json/construction/furniture_tools.json +++ b/data/json/construction/furniture_tools.json @@ -489,7 +489,7 @@ "qualities": [ [ { "id": "HAMMER", "level": 2 } ], [ { "id": "SAW_M", "level": 1 } ] ], "using": [ [ "welding_standard", 5 ] ], "//1": "5cm of weld to join the faucet to the pipe", - "components": [ [ [ "metal_tank", 4 ] ], [ [ "water_faucet", 1 ] ] ], + "components": [ [ [ "metal_tank", 5 ] ], [ [ "water_faucet", 1 ] ] ], "pre_special": "check_empty", "post_terrain": "f_standing_tank" }, diff --git a/data/json/effects.json b/data/json/effects.json index 4d773fe334f59..67dcbe289b171 100644 --- a/data/json/effects.json +++ b/data/json/effects.json @@ -4975,40 +4975,6 @@ "removes_effects": [ "invisibility" ], "show_in_info": true }, - { - "id": "star_vampire_blood_drink", - "type": "effect_type", - "name": [ "Exsanguination" ], - "desc": [ "The monster is greedily drinking your blood!" ], - "rating": "bad", - "resist_traits": [ "BLEED_IMMUNE" ], - "show_in_info": true, - "max_intensity": 2, - "show_intensity": false, - "int_decay_step": -2, - "int_decay_tick": 1, - "vitamins": [ - { "vitamin": "blood", "rate": [ [ -250, -650 ] ], "tick": [ "1 s" ] }, - { "vitamin": "redcells", "rate": [ [ -250, -650 ] ], "tick": [ "1 s" ] } - ] - }, - { - "id": "star_vampire_blood_drink", - "type": "effect_type", - "name": [ "Hemorrhage" ], - "desc": [ "The monster is sucking up your blood!" ], - "rating": "bad", - "resist_traits": [ "BLEED_IMMUNE" ], - "show_in_info": true, - "max_intensity": 2, - "show_intensity": false, - "int_decay_step": -2, - "int_decay_tick": 1, - "vitamins": [ - { "vitamin": "blood", "rate": [ [ -125, -325 ] ], "tick": [ "1 s" ] }, - { "vitamin": "redcells", "rate": [ [ -125, -325 ] ], "tick": [ "1 s" ] } - ] - }, { "id": "star_vampire_blood_drink_feral", "type": "effect_type", diff --git a/data/json/effects_on_condition/addictions_eocs.json b/data/json/effects_on_condition/addictions_eocs.json index d0be2bae356fd..3c2f04d319b00 100644 --- a/data/json/effects_on_condition/addictions_eocs.json +++ b/data/json/effects_on_condition/addictions_eocs.json @@ -21,7 +21,7 @@ { "math": [ "rand(10) < u_addiction_intensity('caffeine')" ] } ] }, - "then": { "math": [ "u_val('stim')", "--" ] } + "then": { "math": [ "u_val('stim')--" ] } }, { "if": { @@ -42,7 +42,7 @@ "id": "EOC_SLEEP_ADDICTION", "//": "Actual effects processed in player::can_sleep(). Here, only prolong this addiction longer than usual.", "condition": { "and": [ { "one_in_chance": 2 }, { "math": [ "u_addiction_turns('sleeping pill') < 0" ] } ] }, - "effect": { "math": [ "u_addiction_turns('sleeping pill')", "++" ] } + "effect": { "math": [ "u_addiction_turns('sleeping pill')++" ] } }, { "type": "effect_on_condition", @@ -51,7 +51,7 @@ "effect": [ { "u_add_morale": "morale_craving_marloss", "bonus": -5, "max_bonus": -30 }, { "u_message": "You daydream about luscious pink berries as big as your fist.", "type": "info" }, - { "if": { "math": [ "u_val('focus') > 40" ] }, "then": { "math": [ "u_val('focus')", "--" ] } } + { "if": { "math": [ "u_val('focus') > 40" ] }, "then": { "math": [ "u_val('focus')--" ] } } ] }, { @@ -61,7 +61,7 @@ "effect": [ { "u_add_morale": "morale_craving_marloss", "bonus": -5, "max_bonus": -30 }, { "u_message": "You daydream about nutty cyan seeds as big as your hand.", "type": "info" }, - { "if": { "math": [ "u_val('focus') > 40" ] }, "then": { "math": [ "u_val('focus')", "--" ] } } + { "if": { "math": [ "u_val('focus') > 40" ] }, "then": { "math": [ "u_val('focus')--" ] } } ] }, { @@ -71,7 +71,7 @@ "effect": [ { "u_add_morale": "morale_craving_marloss", "bonus": -5, "max_bonus": -30 }, { "u_message": "You daydream about succulent, pale golden gel, sweet but light.", "type": "info" }, - { "if": { "math": [ "u_val('focus') > 40" ] }, "then": { "math": [ "u_val('focus')", "--" ] } } + { "if": { "math": [ "u_val('focus') > 40" ] }, "then": { "math": [ "u_val('focus')--" ] } } ] }, { diff --git a/data/json/effects_on_condition/bionic_eocs.json b/data/json/effects_on_condition/bionic_eocs.json index db2173bd02f7a..824367a517142 100644 --- a/data/json/effects_on_condition/bionic_eocs.json +++ b/data/json/effects_on_condition/bionic_eocs.json @@ -42,7 +42,7 @@ "effect": [ { "u_message": "Your malfunctioning bionic causes you to spasm and fall to the floor!", "type": "bad" }, { "sound_effect": "elec_crackle_high", "id": "bionics", "volume": 100 }, - { "math": [ "u_pain()", "++" ] }, + { "math": [ "u_pain()++" ] }, { "u_add_effect": "stunned", "duration": 1 }, { "u_add_effect": "downed", "duration": 1, "force": true } ] @@ -84,7 +84,7 @@ "recurrence": [ "25 minutes", "1 hours 15 minutes" ], "condition": { "and": [ { "u_has_bionics": "bio_sleepy" }, { "not": { "u_has_effect": "sleep" } } ] }, "deactivate_condition": { "not": { "u_has_bionics": "bio_sleepy" } }, - "effect": { "math": [ "u_val('sleepiness')", "++" ] } + "effect": { "math": [ "u_val('sleepiness')++" ] } }, { "type": "effect_on_condition", diff --git a/data/json/effects_on_condition/misc_effect_on_condition.json b/data/json/effects_on_condition/misc_effect_on_condition.json index bfddef828f4fc..0313b746ed635 100644 --- a/data/json/effects_on_condition/misc_effect_on_condition.json +++ b/data/json/effects_on_condition/misc_effect_on_condition.json @@ -48,7 +48,7 @@ "id": "EOC_mininuke_record", "eoc_type": "EVENT", "required_event": "activates_mininuke", - "effect": [ { "math": [ "u_mininuke_activated", "++" ] } ] + "effect": [ { "math": [ "u_mininuke_activated++" ] } ] }, { "id": "EOC_DEATH_SWITCH", diff --git a/data/json/effects_on_condition/mutation_eocs/mutation_effect_eocs.json b/data/json/effects_on_condition/mutation_eocs/mutation_effect_eocs.json index 305411f8a5954..2a88ccc358857 100644 --- a/data/json/effects_on_condition/mutation_eocs/mutation_effect_eocs.json +++ b/data/json/effects_on_condition/mutation_eocs/mutation_effect_eocs.json @@ -73,7 +73,7 @@ { "u_forget_recipe": "prac_unmute_bird" } ], "false_effect": [ - { "math": [ "u_progress_unmute_bird", "++" ] }, + { "math": [ "u_progress_unmute_bird++" ] }, { "u_message": "Restricting your range to the apes' feels demeaning, and you decide to take a break before you start plucking out your feathers in frustration." } @@ -92,7 +92,7 @@ { "u_forget_recipe": "prac_unmute_ceph" } ], "false_effect": [ - { "math": [ "u_progress_unmute_ceph", "++" ] }, + { "math": [ "u_progress_unmute_ceph++" ] }, { "u_message": "Draw air into your mantle, close your throat, rehearse your sentence, exhale and contort your beak just so." } @@ -111,7 +111,7 @@ { "u_forget_recipe": "prac_unmute_gastropod" } ], "false_effect": [ - { "math": [ "u_progress_unmute_gastropod", "++" ] }, + { "math": [ "u_progress_unmute_gastropod++" ] }, { "u_message": "If you rub your tongue against your palate like this is makes a `th` - or at least, a `thrksrkkk`, but it's a start. Ignore the taste of blood, there's work to be done." } @@ -130,7 +130,7 @@ { "u_forget_recipe": "prac_unmute_insect" } ], "false_effect": [ - { "math": [ "u_progress_unmute_insect", "++" ] }, + { "math": [ "u_progress_unmute_insect++" ] }, { "u_message": "You have all these new moving parts in your not-mouth, but they are struggling under the strain you put them under." } @@ -149,7 +149,7 @@ { "u_forget_recipe": "prac_unmute_slime" } ], "false_effect": [ - { "math": [ "u_progress_unmute_slime", "++" ] }, + { "math": [ "u_progress_unmute_slime++" ] }, { "u_message": "Do you need teeth, lungs? You fall back into your resting shape in exasperation. This will take long." } diff --git a/data/json/effects_on_condition/nether_eocs/portal_storm_effect_on_condition.json b/data/json/effects_on_condition/nether_eocs/portal_storm_effect_on_condition.json index 5a6e495f90383..15fefe7721797 100644 --- a/data/json/effects_on_condition/nether_eocs/portal_storm_effect_on_condition.json +++ b/data/json/effects_on_condition/nether_eocs/portal_storm_effect_on_condition.json @@ -242,7 +242,7 @@ { "remove_active_mission": "MISSION_INVESTIGATE_PORTAL_DUNGEON" }, { "remove_active_mission": "MISSION_INVESTIGATE_PORTAL_STORM_CENTER" }, { "alter_timed_events": "portal_dungeon_entrance" }, - { "math": [ "u_counter_portal_storm_counter", "++" ] }, + { "math": [ "u_counter_portal_storm_counter++" ] }, { "math": [ "talked_to_storm = 0" ] }, { "trigger_event": "u_var_changed", @@ -275,9 +275,9 @@ "id": "EOC_PORTAL_EXPAND", "condition": { "math": [ "portal_storm_distance != 0" ] }, "effect": [ - { "math": [ "portal_storm_distant_distance", "++" ] }, - { "math": [ "portal_storm_close_distance", "++" ] }, - { "math": [ "portal_storm_distance", "++" ] } + { "math": [ "portal_storm_distant_distance++" ] }, + { "math": [ "portal_storm_close_distance++" ] }, + { "math": [ "portal_storm_distance++" ] } ], "false_effect": [ { "math": [ "portal_storm_distant_distance = 201" ] }, @@ -379,7 +379,7 @@ "or": [ { "is_weather": "distant_portal_storm" }, { "is_weather": "near_portal_storm" }, { "is_weather": "portal_storm" } ] } }, - "effect": [ { "math": [ "u_ire", "++" ] }, { "u_message": "PORTAL_STORM_WITNESSED", "snippet": true } ] + "effect": [ { "math": [ "u_ire++" ] }, { "u_message": "PORTAL_STORM_WITNESSED", "snippet": true } ] }, { "type": "effect_on_condition", @@ -974,7 +974,7 @@ "type": "effect_on_condition", "id": "EOC_PORTAL_STORM_DUNGEON_NEXT_LEVEL", "effect": [ - { "math": [ "portal_dungeon_level", "++" ] }, + { "math": [ "portal_dungeon_level++" ] }, { "mapgen_update": "portal_dungeon_cleanup", "target_var": { "global_val": "dungeon_loc" } }, { "u_teleport": { "global_val": "dungeon_start" }, "fail_message": "Something is very wrong!", "force": true }, { "run_eocs": [ "EOC_PORTAL_STORM_DUNGEON_REFLECTION_SPAWN", "capture_generic_nre_anomaly" ] }, @@ -1276,7 +1276,7 @@ } }, "effect": [ - { "math": [ "u_portal_storm_record", "++" ] }, + { "math": [ "u_portal_storm_record++" ] }, { "run_eocs": [ { @@ -1315,10 +1315,7 @@ "id": "capture_generic_nre_anomaly", "global": true, "condition": { "u_has_items": { "item": "nre_recorder", "charges": 1 } }, - "effect": [ - { "math": [ "u_generic_nre_anomaly", "++" ] }, - { "u_message": "The NRE recorder emits a sharp beep!", "type": "info" } - ] + "effect": [ { "math": [ "u_generic_nre_anomaly++" ] }, { "u_message": "The NRE recorder emits a sharp beep!", "type": "info" } ] }, { "type": "effect_on_condition", @@ -1352,10 +1349,7 @@ } ] }, - "effect": [ - { "math": [ "u_generic_nre_anomaly", "++" ] }, - { "u_message": "The NRE recorder emits a sharp beep!", "type": "info" } - ] + "effect": [ { "math": [ "u_generic_nre_anomaly++" ] }, { "u_message": "The NRE recorder emits a sharp beep!", "type": "info" } ] }, { "type": "effect_on_condition", diff --git a/data/json/effects_on_condition/nether_eocs/vitrification_effect_on_condition.json b/data/json/effects_on_condition/nether_eocs/vitrification_effect_on_condition.json index e3fbf51607cbb..6f9db63b6e461 100644 --- a/data/json/effects_on_condition/nether_eocs/vitrification_effect_on_condition.json +++ b/data/json/effects_on_condition/nether_eocs/vitrification_effect_on_condition.json @@ -207,7 +207,7 @@ "case": 1, "effect": [ { "u_message": "Vitrifaction_Ambient_1", "snippet": true, "type": "good" }, - { "math": [ "u_vitri_glassed", "++" ] }, + { "math": [ "u_vitri_glassed++" ] }, { "u_add_morale": "morale_vitri_placid", "bonus": 3, "max_bonus": 50 }, { "run_eocs": "EOC_queue_vitrified_int_drain" } ] @@ -216,7 +216,7 @@ "case": 2, "effect": [ { "u_message": "Vitrifaction_Ambient_2", "snippet": true, "type": "good" }, - { "math": [ "u_vitri_glassed", "++" ] }, + { "math": [ "u_vitri_glassed++" ] }, { "u_add_morale": "morale_vitri_placid", "bonus": 5, "max_bonus": 99 }, { "run_eocs": "EOC_queue_vitrified_int_drain" } ] @@ -225,7 +225,7 @@ "case": 3, "effect": [ { "u_message": "Vitrifaction_Ambient_3", "snippet": true, "type": "good" }, - { "math": [ "u_vitri_glassed", "++" ] }, + { "math": [ "u_vitri_glassed++" ] }, { "u_add_morale": "morale_vitri_placid", "bonus": 7, "max_bonus": 99 }, { "run_eocs": "EOC_queue_vitrified_int_drain" } ] @@ -234,7 +234,7 @@ "case": 4, "effect": [ { "u_message": "Vitrifaction_Ambient_4", "snippet": true, "type": "good" }, - { "math": [ "u_vitri_glassed", "++" ] }, + { "math": [ "u_vitri_glassed++" ] }, { "u_add_morale": "morale_vitri_placid", "bonus": 10, "max_bonus": 99 }, { "run_eocs": "EOC_queue_vitrified_int_drain" } ] @@ -243,7 +243,7 @@ "case": 5, "effect": [ { "u_message": "Vitrifaction_Ambient_5", "snippet": true, "type": "good" }, - { "math": [ "u_vitri_glassed", "++" ] }, + { "math": [ "u_vitri_glassed++" ] }, { "u_add_morale": "morale_vitri_placid", "bonus": 15, "max_bonus": 99 }, { "run_eocs": "EOC_queue_vitrified_int_drain" } ] @@ -252,7 +252,7 @@ "case": 6, "effect": [ { "u_message": "Vitrifaction_Ambient_6", "snippet": true, "type": "good" }, - { "math": [ "u_vitri_glassed", "++" ] }, + { "math": [ "u_vitri_glassed++" ] }, { "u_add_morale": "morale_vitri_placid", "bonus": 20, "max_bonus": 99 }, { "run_eocs": "EOC_queue_vitrified_int_drain" } ] @@ -301,7 +301,7 @@ "id": "EOC_vitrified_int_drain", "condition": { "and": [ { "x_in_y_chance": { "x": 1, "y": 2 } }, { "math": [ "u_vitri_glassed >= 5" ] } ] }, "effect": [ - { "math": [ "u_vitri_vitrified", "++" ] }, + { "math": [ "u_vitri_vitrified++" ] }, { "u_add_effect": "VITRIFYING", "duration": "PERMANENT", "intensity": { "math": [ "u_vitri_vitrified" ] } }, { "math": [ "u_vitri_glassed = 0" ] } ] diff --git a/data/json/effects_on_condition/npc_eocs/generic_npc_eocs.json b/data/json/effects_on_condition/npc_eocs/generic_npc_eocs.json index f490ff60fa508..f7134d4692dcf 100644 --- a/data/json/effects_on_condition/npc_eocs/generic_npc_eocs.json +++ b/data/json/effects_on_condition/npc_eocs/generic_npc_eocs.json @@ -153,7 +153,7 @@ }, "effect": [ { "u_spawn_npc": "hells_raiders_assassin", "real_count": 1, "min_radius": 15, "max_radius": 25 }, - { "math": [ "u_bandit_assassins_sent", "++" ] } + { "math": [ "u_bandit_assassins_sent++" ] } ] }, { diff --git a/data/json/effects_on_condition/npc_eocs/isherwood_barry_rescue_eocs.json b/data/json/effects_on_condition/npc_eocs/isherwood_barry_rescue_eocs.json index 6c7434e48f664..cb4e0006d6180 100644 --- a/data/json/effects_on_condition/npc_eocs/isherwood_barry_rescue_eocs.json +++ b/data/json/effects_on_condition/npc_eocs/isherwood_barry_rescue_eocs.json @@ -434,7 +434,7 @@ "deactivate_condition": { "math": [ "isherwood_luke_truck_status > 1" ] }, "effect": [ { "mapgen_update": "LUKE_REMOVE_TRUCK", "om_terrain": "trailhead_shack_z0" }, - { "math": [ "isherwood_luke_truck_status", "++" ] } + { "math": [ "isherwood_luke_truck_status++" ] } ], "false_effect": [ { "run_eocs": "EOC_LUKE_RETRIEVE_TRUCK_END", "time_in_future": 100 } ] }, diff --git a/data/json/furniture_and_terrain/furniture-storage.json b/data/json/furniture_and_terrain/furniture-storage.json index 763e4c9ae2f32..fc9baa64f3713 100644 --- a/data/json/furniture_and_terrain/furniture-storage.json +++ b/data/json/furniture_and_terrain/furniture-storage.json @@ -1267,7 +1267,7 @@ "coverage": 90, "required_str": -1, "flags": [ "CONTAINER", "LIQUIDCONT", "NOITEM", "SEALED", "TRANSPARENT" ], - "deconstruct": { "items": [ { "item": "metal_tank", "count": 4 }, { "item": "water_faucet", "count": 1 } ] }, + "deconstruct": { "items": [ { "item": "metal_tank", "count": 5 }, { "item": "water_faucet", "count": 1 } ] }, "examine_action": "keg", "keg_capacity": 1200, "bash": { diff --git a/data/json/furniture_and_terrain/terrain-traps.json b/data/json/furniture_and_terrain/terrain-traps.json index 401916ba2639f..a67c740900207 100644 --- a/data/json/furniture_and_terrain/terrain-traps.json +++ b/data/json/furniture_and_terrain/terrain-traps.json @@ -140,7 +140,7 @@ "and": [ { "u_has_items": { "item": "human_sample", "count": 1 } }, { "u_has_mission": "BEM_human_sample_mission" } ] }, "effect": [ - { "math": [ "u_counter_BEM_BEM_human_sample_reward_owed", "++" ] }, + { "math": [ "u_counter_BEM_BEM_human_sample_reward_owed++" ] }, { "u_message": "You prepare the drop as instructed", "popup": true }, { "u_consume_item": "human_sample", "count": 1 }, { "finish_mission": "BEM_human_sample_mission", "success": true } diff --git a/data/json/itemgroups/Clothing_Gear/clothing.json b/data/json/itemgroups/Clothing_Gear/clothing.json index b25bc078e4525..1c04bb50411cd 100644 --- a/data/json/itemgroups/Clothing_Gear/clothing.json +++ b/data/json/itemgroups/Clothing_Gear/clothing.json @@ -1610,11 +1610,7 @@ { "group": "superglue", "prob": 20 }, [ "firecracker_pack", 5 ], [ "firecracker", 5 ], - [ "wolfsuit", 3 ], - [ "dinosuit", 2 ], - [ "sharksuit", 2 ], - [ "felinesuit", 3 ], - [ "dragonsuit", 2 ], + [ "fursuit", 5 ], [ "zentai", 5 ], { "item": "vibrator", "prob": 5, "charges": [ 0, 100 ] }, { "item": "condom", "prob": 30, "count": [ 1, 5 ] }, @@ -4161,16 +4157,12 @@ "items": [ { "item": "bondage_suit", "prob": 10 }, { "item": "bodysuit_lycra", "prob": 10 }, - { "item": "dinosuit", "prob": 5 }, - { "item": "sharksuit", "prob": 5 }, { "item": "yukata", "prob": 20 }, { "item": "leotard", "prob": 40 }, { "item": "motorbike_armor", "prob": 15 }, { "item": "suit", "prob": 70 }, { "item": "touring_suit", "prob": 20 }, - { "item": "wolfsuit", "prob": 3 }, - { "item": "felinesuit", "prob": 3 }, - { "item": "dragonsuit", "prob": 1 }, + { "item": "fursuit", "prob": 3 }, { "item": "wool_suit", "prob": 40 }, { "item": "wool_suit_devil", "prob": 15 }, { "item": "unitard", "prob": 60 }, diff --git a/data/json/itemgroups/Clothing_Gear/costumes.json b/data/json/itemgroups/Clothing_Gear/costumes.json index eb25b18c6d788..92d54ac101ace 100644 --- a/data/json/itemgroups/Clothing_Gear/costumes.json +++ b/data/json/itemgroups/Clothing_Gear/costumes.json @@ -342,7 +342,7 @@ { "item": "bodysuit_lycra", "prob": 25 }, { "item": "suit", "prob": 10 }, { "item": "tux", "prob": 10 }, - { "item": "wolfsuit", "prob": 10 }, + { "item": "fursuit", "prob": 15 }, { "item": "clown_suit", "prob": 10 }, { "item": "dragonsuit", "prob": 10 }, { "item": "felinesuit", "prob": 10 }, diff --git a/data/json/itemgroups/Locations_MapExtras/locations.json b/data/json/itemgroups/Locations_MapExtras/locations.json index 1ced6fe7c09cc..3f3924d3bc415 100644 --- a/data/json/itemgroups/Locations_MapExtras/locations.json +++ b/data/json/itemgroups/Locations_MapExtras/locations.json @@ -1972,8 +1972,7 @@ { "prob": 20, "group": "caffeine_bottle_plastic_pill_supplement_1_10" }, [ "cola_meth", 1 ], [ "picklocks", 10 ], - [ "wolfsuit", 4 ], - [ "dinosuit", 4 ], + [ "fursuit", 4 ], [ "jedi_cloak", 4 ], { "item": "glowstick", "prob": 60, "charges": 1400 }, [ "blanket", 10 ], @@ -2818,7 +2817,11 @@ "collection": [ { "item": "oxy_torch", "prob": 100 }, { - "distribution": [ { "item": "weldtank", "prob": 100, "count": [ 1, 2 ] }, { "item": "tinyweldtank", "prob": 100, "count": [ 1, 3 ] } ], + "distribution": [ + { "item": "weldtank", "prob": 100, "count": [ 1, 2 ] }, + { "item": "tinyweldtank", "prob": 100, "count": [ 1, 3 ] }, + { "item": "smallweldtank", "prob": 100, "count": [ 1, 3 ] } + ], "prob": 100 }, { @@ -2832,6 +2835,7 @@ }, [ "oxy_torch", 25 ], { "item": "weldtank", "prob": 12, "count": [ 1, 2 ] }, + { "item": "smallweldtank", "prob": 12, "count": [ 1, 3 ] }, { "item": "tinyweldtank", "prob": 12, "count": [ 1, 3 ] }, { "item": "oxygen_cylinder", "prob": 10, "count": [ 1, 2 ] }, { "item": "polisher", "prob": 15, "charges": [ 0, 100 ] }, diff --git a/data/json/itemgroups/Locations_MapExtras/locations_commercial.json b/data/json/itemgroups/Locations_MapExtras/locations_commercial.json index 4e83db75d674d..f9e31826e1299 100644 --- a/data/json/itemgroups/Locations_MapExtras/locations_commercial.json +++ b/data/json/itemgroups/Locations_MapExtras/locations_commercial.json @@ -895,6 +895,8 @@ { "item": "folded_bicycle", "prob": 3 }, { "item": "sunglasses", "prob": 25 }, { "item": "cowboy_hat", "prob": 25 }, + { "item": "mp3", "prob": 35, "charges": [ 0, 100 ] }, + { "item": "fursuit", "prob": 5 }, { "item": "mp3", "prob": 20, "charges": [ 0, 100 ] }, { "item": "wolfsuit", "prob": 5 }, { "item": "dinosuit", "prob": 5 }, diff --git a/data/json/itemgroups/Locations_MapExtras/mall_item_groups.json b/data/json/itemgroups/Locations_MapExtras/mall_item_groups.json index 8bedc96f23009..768fcf2a4070f 100644 --- a/data/json/itemgroups/Locations_MapExtras/mall_item_groups.json +++ b/data/json/itemgroups/Locations_MapExtras/mall_item_groups.json @@ -96,6 +96,7 @@ [ "folded_bicycle", 5 ], [ "sunglasses", 25 ], [ "cowboy_hat", 25 ], + [ "fursuit", 5 ], { "item": "mp3", "prob": 20, "charges": 100 }, [ "wolfsuit", 5 ], [ "dinosuit", 5 ], diff --git a/data/json/itemgroups/SUS/garage.json b/data/json/itemgroups/SUS/garage.json index 6d285a7958c80..f14cae1e8950a 100644 --- a/data/json/itemgroups/SUS/garage.json +++ b/data/json/itemgroups/SUS/garage.json @@ -12,6 +12,7 @@ "collection": [ { "item": "oxy_torch" }, { "item": "weldtank", "count": [ 1, 3 ], "prob": 95 }, + { "item": "smallweldtank", "count": [ 1, 3 ], "prob": 95 }, { "item": "tinyweldtank", "count": [ 1, 3 ], "prob": 95 }, { "item": "oxygen_cylinder", "count": [ 1, 2 ], "prob": 95 }, { diff --git a/data/json/itemgroups/collections_domestic.json b/data/json/itemgroups/collections_domestic.json index 011806b92e485..6770f37b94e20 100644 --- a/data/json/itemgroups/collections_domestic.json +++ b/data/json/itemgroups/collections_domestic.json @@ -1163,8 +1163,7 @@ { "prob": 65, "group": "chips_bag_plastic_3" }, { "group": "softdrinks_canned", "prob": 380 }, { "item": "picklocks", "prob": 10 }, - { "item": "wolfsuit", "prob": 4 }, - { "item": "dinosuit", "prob": 4 }, + { "item": "fursuit", "prob": 6 }, { "item": "zentai", "prob": 4 }, { "item": "glowstick", "prob": 60, "charges": 1400 }, { "item": "handflare", "prob": 40, "charges": 300 }, diff --git a/data/json/itemgroups/food_service.json b/data/json/itemgroups/food_service.json index ce36bac415df8..160d4d9382ad9 100644 --- a/data/json/itemgroups/food_service.json +++ b/data/json/itemgroups/food_service.json @@ -369,7 +369,7 @@ { "item": "detergent", "prob": 15, "charges": [ 1, 20 ] }, { "item": "bleach", "prob": 15, "charges": [ 1, -1 ] }, [ "broom", 13 ], - [ "dinosuit", 7 ], + { "item": "fursuit", "variant": "dinosuit", "prob": 7 }, [ "hat_ball", 19 ], [ "jacket_light", 15 ], [ "mbag", 10 ], diff --git a/data/json/itemgroups/misc.json b/data/json/itemgroups/misc.json index bed87e98b39c6..44f531e9b5510 100644 --- a/data/json/itemgroups/misc.json +++ b/data/json/itemgroups/misc.json @@ -34,7 +34,7 @@ "id": "stoner", "type": "item_group", "//": "Processed weed and weed accessories", - "items": [ [ "joint", 100 ], [ "joint_roach", 20 ], [ "pipe_glass", 10 ] ] + "items": [ [ "joint", 100 ], [ "joint_roach", 20 ], [ "pipe_glass", 10 ], [ "pipe_water", 10 ] ] }, { "id": "butane_lighter_and_fuel", diff --git a/data/json/itemgroups/shops_trades.json b/data/json/itemgroups/shops_trades.json index 4dfdd99601a0a..b27280d392148 100644 --- a/data/json/itemgroups/shops_trades.json +++ b/data/json/itemgroups/shops_trades.json @@ -50,7 +50,11 @@ "collection": [ { "item": "oxy_torch", "prob": 100 }, { - "distribution": [ { "item": "weldtank", "prob": 100, "count": [ 1, 2 ] }, { "item": "tinyweldtank", "prob": 100, "count": [ 1, 3 ] } ], + "distribution": [ + { "item": "weldtank", "prob": 100, "count": [ 1, 2 ] }, + { "item": "tinyweldtank", "prob": 100, "count": [ 1, 3 ] }, + { "item": "smallweldtank", "prob": 100, "count": [ 1, 3 ] } + ], "prob": 100 }, { diff --git a/data/json/itemgroups/stashes.json b/data/json/itemgroups/stashes.json index a0424fea3e13c..5a067241a223e 100644 --- a/data/json/itemgroups/stashes.json +++ b/data/json/itemgroups/stashes.json @@ -76,6 +76,7 @@ { "prob": 1, "group": "heroin_bag_zipper_1_4" }, { "prob": 4, "group": "crack_bag_zipper_1_4" }, [ "crackpipe", 7 ], + [ "pipe_water", 5 ], { "prob": 1, "group": "antifungal_bottle_plastic_pill_prescription_1_5" }, { "prob": 2, "group": "antiparasitic_bottle_plastic_pill_prescription_1_10" }, { "prob": 1, "group": "diazepam_bottle_plastic_pill_prescription_1_10" }, diff --git a/data/json/itemgroups/tools.json b/data/json/itemgroups/tools.json index d1708b744be43..94968fd3e4014 100644 --- a/data/json/itemgroups/tools.json +++ b/data/json/itemgroups/tools.json @@ -380,7 +380,11 @@ "collection": [ { "item": "oxy_torch", "prob": 100 }, { - "distribution": [ { "item": "weldtank", "prob": 100, "count": [ 1, 2 ] }, { "item": "tinyweldtank", "prob": 100, "count": [ 1, 3 ] } ], + "distribution": [ + { "item": "weldtank", "prob": 100, "count": [ 1, 2 ] }, + { "item": "tinyweldtank", "prob": 100, "count": [ 1, 3 ] }, + { "item": "smallweldtank", "prob": 100, "count": [ 1, 3 ] } + ], "prob": 100 }, { @@ -394,6 +398,7 @@ }, [ "oxy_torch", 60 ], { "item": "weldtank", "prob": 60, "count": [ 1, 2 ] }, + { "item": "smallweldtank", "prob": 60, "count": [ 1, 3 ] }, { "item": "tinyweldtank", "prob": 60, "count": [ 1, 3 ] }, { "item": "polisher", "prob": 70, "charges": [ 0, 100 ] }, { "item": "angle_grinder", "prob": 5, "charges": [ 0, 500 ] }, diff --git a/data/json/items/armor/storage.json b/data/json/items/armor/storage.json index 45f5710624cef..015ab97305c53 100644 --- a/data/json/items/armor/storage.json +++ b/data/json/items/armor/storage.json @@ -121,6 +121,7 @@ "max_contains_weight": "2 kg", "max_item_length": "70 cm", "moves": 40, + "holster": true, "flag_restriction": [ "SHEATH_KNIFE", "SHEATH_SWORD" ] }, { @@ -129,6 +130,7 @@ "max_contains_weight": "2 kg", "max_item_length": "70 cm", "moves": 40, + "holster": true, "flag_restriction": [ "SHEATH_KNIFE", "SHEATH_SWORD" ] }, { @@ -406,6 +408,20 @@ "looks_like": "backpack", "color": "brown", "pocket_data": [ + { + "//": "tucked against back", + "pocket_type": "CONTAINER", + "holster": true, + "max_contains_volume": "5 L", + "max_contains_weight": "4 kg", + "max_item_length": "150 cm", + "min_item_length": "60 cm", + "moves": 200, + "extra_encumbrance": 10, + "description": "Tucked between your back and the backpack.", + "ripoff": 3, + "transparent": true + }, { "pocket_type": "CONTAINER", "max_contains_volume": "25 L", diff --git a/data/json/items/armor/suits_clothes.json b/data/json/items/armor/suits_clothes.json index 77800b865b04f..d4f6fbbc637a4 100644 --- a/data/json/items/armor/suits_clothes.json +++ b/data/json/items/armor/suits_clothes.json @@ -834,10 +834,10 @@ "flags": [ "VARSIZE", "SKINTIGHT" ] }, { - "id": "wolfsuit", + "id": "fursuit", "type": "ARMOR", - "name": { "str": "wolf suit" }, - "description": "A full-body fursuit in the form of an anthropomorphic wolf. It is quite encumbering and has little storage but is very warm.", + "name": { "str": "fursuit" }, + "description": "A full-body fursuit in the form of an anthropomorphic animal. It is quite encumbering and has little storage but is very warm.", "weight": "7033 g", "volume": "12 L", "price": "2 kUSD 500 USD", @@ -857,7 +857,86 @@ "warmth": 50, "material_thickness": 2, "environmental_protection": 2, - "flags": [ "OUTER" ] + "flags": [ "OUTER" ], + "variant_type": "generic", + "variants": [ + { + "id": "wolfsuit", + "name": { "str": "wolf fursuit" }, + "description": "A cartoonish full-body fursuit made to resemble an anthropomorphic wolf. It is quite encumbering and has little storage but is very warm.", + "weight": 35 + }, + { + "id": "dogsuit", + "name": { "str": "dog fursuit" }, + "description": " A fuzzy full-body fursuit made to resemble an anthropomorphic domestic canine of unknown breed. It is quite encumbering and has little storage but is very warm.", + "color": "brown", + "weight": 30 + }, + { + "id": "tigersuit", + "name": { "str": "tiger fursuit" }, + "description": "An intricately designed full-body fursuit made to resemble an anthropomorphic bengal tiger, you can't imagine how long it took for it's maker to sew all those stripes onto it. It is quite encumbering and has little storage but is very warm.", + "color": "light_red", + "weight": 15 + }, + { + "id": "felinesuit", + "name": { "str": "feline fursuit" }, + "description": "A fluffy full-body fursuit made to resemble an anthropomorphic feline of indistinguishable breed. It is quite encumbering and has little storage but is very warm.", + "color": "light_green", + "weight": 30 + }, + { + "id": "ottersuit", + "name": { "str": "otter fursuit" }, + "description": "A dopey-looking full-body fursuit made to resemble an anthropomorphic otter. It is quite encumbering and has little storage but is very warm.", + "color": "light_red", + "weight": 15 + }, + { + "id": "beaversuit", + "name": { "str": "beaver fursuit" }, + "description": "A full-body fursuit made to resemble a nervous-looking anthropomorphic beaver. It is quite encumbering and has little storage but is very warm.", + "color": "brown", + "weight": 10 + }, + { + "id": "dragonsuit", + "name": { "str": "dragon fursuit" }, + "description": "A detailed full-body fursuit made to resemble a western dragon, complete with a set of small stubby wings on its back. It is quite encumbering and has little storage but is very warm.", + "color": "light_green", + "weight": 20 + }, + { + "id": "lizardsuit", + "name": { "str": "lizard fursuit" }, + "description": "A sleek full-body fursuit made to resemble an anthropomorphic lizard. It is quite encumbering and has little storage but is very warm.", + "color": "light_green", + "weight": 20 + }, + { + "id": "sharksuit", + "name": { "str": "shark fursuit" }, + "description": "A gnarly looking full-body costume in the form of an anthropomorphic bull shark. It is quite encumbering and has little storage but is very warm.", + "color": "light_blue", + "weight": 20 + }, + { + "id": "orcasuit", + "name": { "str": "orca fursuit" }, + "description": "A sleek looking full-body costume in the form of an anthropomorphic orca whale. It is quite encumbering and has little storage but is very warm.", + "color": "dark_gray", + "weight": 15 + }, + { + "id": "dinosuit", + "name": { "str": "dinosaur fursuit" }, + "description": "A full-body costume in the form of an anthropomorphic dinosaur. It is quite encumbering and has little storage but is very warm.", + "color": "light_green", + "weight": 10 + } + ] }, { "id": "wool_suit", diff --git a/data/json/items/furniture/seating.json b/data/json/items/furniture/seating.json index 5c45caa69cffd..c282ec66c658b 100644 --- a/data/json/items/furniture/seating.json +++ b/data/json/items/furniture/seating.json @@ -4,6 +4,7 @@ "id": "chair_wood", "name": { "str": "wooden chair" }, "description": "A simple wooden chair, with four legs, a seat, and a back. It's nice to rest your feet for once, and if coupled with a suitable table, you could eat a meal properly and almost pretend that things were normal again.", + "category": "other", "symbol": "#", "color": "brown", "flags": [ "NO_SALVAGE", "FRAGILE_MELEE" ], @@ -21,6 +22,7 @@ "id": "armchair", "name": { "str": "armchair" }, "description": "A simple upholstered chair with armrests. Soft and fairly warm, it definitely beats the ground for sleeping on, though not by much.", + "category": "other", "symbol": "H", "color": "green", "flags": [ "NO_SALVAGE" ], @@ -38,6 +40,7 @@ "id": "stool_wood", "name": { "str": "wooden stool" }, "description": "A simple stool, with four legs and a seat. While it's a touch more maneuverable to sit on, the lack of back support means it's significantly less comfortable than a normal chair.", + "category": "other", "symbol": "#", "color": "brown", "flags": [ "NO_SALVAGE", "FRAGILE_MELEE" ], @@ -55,6 +58,7 @@ "id": "stool_log", "name": { "str": "log stool" }, "description": "A short section from a tree trunk with one of the flat ends smoothed down. Makes for a decent place to sit, but not quite a real chair.", + "category": "other", "symbol": "#", "color": "brown", "flags": [ "NO_SALVAGE" ], @@ -72,6 +76,7 @@ "id": "barstool", "name": { "str": "bar stool" }, "description": "A bar stool with a leather seat on a steel support. Not practical for sleeping at all but it does feel nicer than sitting on the ground.", + "category": "other", "symbol": "p", "color": "light_gray", "price": "50 USD", @@ -89,6 +94,7 @@ "id": "chair_plywood", "name": { "str": "plywood chair" }, "description": "A simple chair made of plywood on a steel frame. Quite uncomfortable but works for sleeping if it's the only option available.", + "category": "other", "symbol": "#", "color": "brown", "flags": [ "FRAGILE_MELEE" ], diff --git a/data/json/items/items_holiday.json b/data/json/items/items_holiday.json index 3fdc0106e990b..77327522b7a7c 100644 --- a/data/json/items/items_holiday.json +++ b/data/json/items/items_holiday.json @@ -12,7 +12,14 @@ "symbol": "0", "color": "yellow", "looks_like": "pumpkin", - "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 22 } } ], + "pocket_data": [ + { + "pocket_type": "MAGAZINE_WELL", + "rigid": true, + "flag_restriction": [ "BATTERY_LIGHT" ], + "default_magazine": "light_battery_cell" + } + ], "charges_per_use": 1, "flags": [ "WATER_BREAK" ], "ammo": [ "battery" ], diff --git a/data/json/items/magazine/weldgas.json b/data/json/items/magazine/weldgas.json index 3869cf3f19dec..ceeefd406d01b 100644 --- a/data/json/items/magazine/weldgas.json +++ b/data/json/items/magazine/weldgas.json @@ -1,6 +1,27 @@ [ { "id": "tinyweldtank", + "looks_like": "pressurized_canister", + "type": "MAGAZINE", + "category": "tool_magazine", + "name": { "str": "tiny welding tank" }, + "description": "A tiny acetylene tank. It can pressurize up to 1 liter of welding gas.", + "weight": "500 g", + "volume": "1 L", + "longest_side": "20 cm", + "price": "100 USD", + "price_postapoc": "1 USD", + "material": [ "steel" ], + "symbol": "#", + "color": "brown", + "ammo_type": [ "weldgas" ], + "capacity": 100, + "count": 100, + "flags": [ "NO_UNLOAD", "NO_RELOAD" ], + "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "weldgas": 100 }, "watertight": true } ] + }, + { + "id": "smallweldtank", "//": "Hot Max 24012 Acetylene Cylinder", "looks_like": "pressurized_tank", "type": "MAGAZINE", diff --git a/data/json/items/tool/cooking.json b/data/json/items/tool/cooking.json index 4c4c24e812aa8..84cf1f7a93903 100644 --- a/data/json/items/tool/cooking.json +++ b/data/json/items/tool/cooking.json @@ -1108,8 +1108,8 @@ "pocket_data": [ { "pocket_type": "MAGAZINE_WELL", - "item_restriction": [ "tinyweldtank", "weldtank" ], - "default_magazine": "tinyweldtank" + "item_restriction": [ "tinyweldtank", "smallweldtank", "weldtank" ], + "default_magazine": "smallweldtank" } ], "qualities": [ [ "HOTPLATE", 2 ] ], diff --git a/data/json/items/tool/lighting.json b/data/json/items/tool/lighting.json index d570457674ed8..3ed0300afbe96 100644 --- a/data/json/items/tool/lighting.json +++ b/data/json/items/tool/lighting.json @@ -653,7 +653,7 @@ "armor_data": { "armor": [ { "covers": [ "torso" ], "coverage": 5, "encumbrance": 2, "specifically_covers": [ "torso_hanging_front" ] } ] }, - "flags": [ "NO_UNLOAD", "NO_RELOAD", "BELT_CLIP", "BELTED" ], + "flags": [ "BELT_CLIP", "BELTED" ], "use_action": [ { "type": "transform", @@ -665,7 +665,14 @@ }, { "type": "link_up", "cable_length": 3, "charge_rate": "20 W" } ], - "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 112 } } ], + "pocket_data": [ + { + "pocket_type": "MAGAZINE_WELL", + "rigid": true, + "flag_restriction": [ "BATTERY_MEDIUM" ], + "default_magazine": "medium_battery_cell" + } + ], "melee_damage": { "bash": 8 } }, { @@ -846,7 +853,7 @@ "need_charges": 1, "need_charges_msg": "The %s must be attached to a gas cylinder to light." }, - "pocket_data": [ { "pocket_type": "MAGAZINE_WELL", "item_restriction": [ "weldtank", "tinyweldtank" ] } ] + "pocket_data": [ { "pocket_type": "MAGAZINE_WELL", "item_restriction": [ "tinyweldtank", "weldtank", "smallweldtank" ] } ] }, { "id": "oxylamp_on", diff --git a/data/json/items/tool/science.json b/data/json/items/tool/science.json index 7c4ed25576bea..a51373785f617 100644 --- a/data/json/items/tool/science.json +++ b/data/json/items/tool/science.json @@ -1339,7 +1339,7 @@ "condition": { "not": { "one_in_chance": 3 } }, "effect": [ { "u_message": "You have a slight feeling of being watched." }, - { "math": [ "u_migo_interest_interest_migo_interest", "++" ] } + { "math": [ "u_migo_interest_interest_migo_interest++" ] } ] }, { diff --git a/data/json/items/tool/smoking.json b/data/json/items/tool/smoking.json index e36a0b22fb409..1428d048fdd4f 100644 --- a/data/json/items/tool/smoking.json +++ b/data/json/items/tool/smoking.json @@ -58,6 +58,81 @@ "qualities": [ [ "SMOKE_PIPE", 1 ] ], "melee_damage": { "bash": 1 } }, + { + "id": "pipe_water", + "type": "TOOL", + "name": { "str": "water pipe" }, + "looks_like": "bottle_plastic", + "description": "A mass-manufactured water pipe, otherwise known as a 'bong'. Head shops often insist these are used solely for tobacco, despite their iconic status as cannabis paraphernalia.", + "weight": "750 g", + "volume": "900 ml", + "longest_side": "30 cm", + "flags": [ "FRAGILE_MELEE", "NONCONDUCTIVE" ], + "price": "40 USD", + "price_postapoc": "50 cent", + "pocket_data": [ + { + "pocket_type": "CONTAINER", + "watertight": true, + "rigid": true, + "max_contains_volume": "500 ml", + "max_item_volume": "500 ml", + "max_contains_weight": "1 kg", + "moves": 400 + } + ], + "to_hit": { "grip": "bad", "length": "hand", "surface": "any", "balance": "clumsy" }, + "material": [ "glass" ], + "symbol": ",", + "color": "cyan", + "qualities": [ [ "SMOKE_PIPE", 1 ], [ "BOIL", 2 ], [ "CONTAIN", 1 ] ], + "melee_damage": { "bash": 4 }, + "variant_type": "generic", + "variants": [ + { + "id": "pipe_water_normal", + "name": { "str": "bong" }, + "description": "A mass-manufactured water pipe, otherwise known as a 'bong'. This one is made of plain, clear, glass.", + "color": "light_gray" + }, + { + "id": "pipe_water_cartoon", + "name": { "str": "cartoon bong" }, + "description": "A mass-manufactured water pipe, otherwise known as a 'bong'. It is covered in copyrighted cartoon characters, all smoking marijuana.", + "color": "green" + }, + { + "id": "pipe_water_rasta", + "name": { "str": "rasta bong" }, + "description": "A mass-manufactured water pipe, otherwise known as a 'bong'. It is colored with the 'rasta' pattern of red, yellow, and green.", + "color": "red" + }, + { + "id": "pipe_water_handblown", + "name": { "str": "handblown bong" }, + "description": "A handblown water pipe, also known as a 'bong'. Lovingly crafted by an artisan, a true fusion of aesthetic sensibilities and stoner functionalities.", + "color": "green" + }, + { + "id": "pipe_water_psychedelic", + "name": { "str": "psychedelic bong" }, + "description": "A mass-manufactured water pipe, also known as a 'bong'. It is covered in stickers depicting 'psychedelic' art.", + "color": "blue" + }, + { + "id": "pipe_water_frosted", + "name": { "str": "frosted bong" }, + "description": "A mass-manufactured water pipe, also known as a 'bong'. It is made out of frosted glass.", + "color": "white" + }, + { + "id": "pipe_water_fakegold", + "name": { "str": "gold bong" }, + "description": "A mass-manufactured water pipe, also known as a 'bong'. Though it looks like it's made out of gold it is, in fact, just metallic paint.", + "color": "yellow" + } + ] + }, { "id": "pipe_tobacco", "type": "TOOL", diff --git a/data/json/items/tool/workshop.json b/data/json/items/tool/workshop.json index 12560ea226f19..a84b321ef9e38 100644 --- a/data/json/items/tool/workshop.json +++ b/data/json/items/tool/workshop.json @@ -835,7 +835,7 @@ "use_action": [ "OXYTORCH" ], "charged_qualities": [ [ "WELD", 2 ] ], "flags": [ "ALLOWS_REMOTE_USE" ], - "pocket_data": [ { "pocket_type": "MAGAZINE_WELL", "item_restriction": [ "weldtank", "tinyweldtank" ] } ], + "pocket_data": [ { "pocket_type": "MAGAZINE_WELL", "item_restriction": [ "weldtank", "smallweldtank", "tinyweldtank" ] } ], "to_hit": { "grip": "solid", "length": "short", "surface": "any", "balance": "neutral" }, "melee_damage": { "bash": 3 } }, diff --git a/data/json/items/tool_armor.json b/data/json/items/tool_armor.json index a27727ced3cef..60cc8653ffa93 100644 --- a/data/json/items/tool_armor.json +++ b/data/json/items/tool_armor.json @@ -882,7 +882,7 @@ "volume": "141 ml", "longest_side": "136 mm", "charges_per_use": 1, - "ammo": "battery", + "ammo": [ "battery" ], "use_action": { "type": "transform", "msg": "You turn the headlamp on.", @@ -1005,7 +1005,7 @@ "weight": "300 g", "volume": "750 ml", "charges_per_use": 1, - "ammo": "battery", + "ammo": [ "battery" ], "use_action": { "type": "transform", "msg": "You turn the headlamp on.", @@ -1015,7 +1015,14 @@ "need_charges_msg": "The headlamp batteries are dead." }, "material_thickness": 1, - "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 112 } } ], + "pocket_data": [ + { + "pocket_type": "MAGAZINE_WELL", + "rigid": true, + "flag_restriction": [ "BATTERY_MEDIUM" ], + "default_magazine": "medium_battery_cell" + } + ], "armor": [ { "encumbrance": 2, "coverage": 50, "covers": [ "head" ], "specifically_covers": [ "head_crown", "head_forehead" ] } ], "melee_damage": { "bash": 1 }, "looks_like": "wearable_light" diff --git a/data/json/mapgen/headshop.json b/data/json/mapgen/headshop.json index 4ae6953964b6a..c1434f6f9a206 100644 --- a/data/json/mapgen/headshop.json +++ b/data/json/mapgen/headshop.json @@ -86,6 +86,8 @@ { "item": "pipe_glass", "repeat": [ 1, 4 ], "x": 4, "y": 10 }, { "item": "pipe_glass", "repeat": [ 1, 4 ], "x": 7, "y": 10 }, { "item": "pipe_glass", "repeat": [ 1, 4 ], "x": 18, "y": 10 }, + { "item": "pipe_water", "repeat": [ 1, 2 ], "x": 4, "y": 10 }, + { "item": "pipe_water", "repeat": [ 1, 2 ], "x": 4, "y": 10 }, { "item": "crackpipe", "repeat": [ 1, 2 ], "x": 21, "y": 10 } ], "place_items": [ diff --git a/data/json/mapgen/military/mil_base/mil_base_z0.json b/data/json/mapgen/military/mil_base/mil_base_z0.json index 879a2dbb141ba..530bb84a01898 100644 --- a/data/json/mapgen/military/mil_base/mil_base_z0.json +++ b/data/json/mapgen/military/mil_base/mil_base_z0.json @@ -749,8 +749,8 @@ { "item": "turret_mount", "x": 79, "y": 20, "chance": 50, "repeat": [ 1, 5 ] }, { "item": "weldtank", "x": 71, "y": [ 17, 18 ], "chance": 50, "repeat": [ 5, 10 ] }, { "item": "weldtank", "x": 72, "y": [ 17, 18 ], "chance": 50, "repeat": [ 5, 10 ] }, - { "item": "tinyweldtank", "x": 71, "y": [ 19, 20 ], "chance": 50, "repeat": [ 5, 10 ] }, - { "item": "tinyweldtank", "x": 72, "y": [ 19, 20 ], "chance": 50, "repeat": [ 5, 10 ] }, + { "item": "smallweldtank", "x": 71, "y": [ 19, 20 ], "chance": 50, "repeat": [ 5, 10 ] }, + { "item": "smallweldtank", "x": 72, "y": [ 19, 20 ], "chance": 50, "repeat": [ 5, 10 ] }, { "item": "motor_oil", "x": 75, "y": [ 17, 18 ], "chance": 50, "repeat": [ 20, 40 ] }, { "group": "fuel_jp8", "x": 75, "y": 19, "chance": 80, "repeat": [ 1, 10 ] }, { "item": "jerrycan", "x": 75, "y": 20, "chance": 80, "repeat": [ 1, 10 ] }, diff --git a/data/json/mapgen/nested/aux_nested.json b/data/json/mapgen/nested/aux_nested.json index bdf57a74d623d..4de1b9d869e33 100644 --- a/data/json/mapgen/nested/aux_nested.json +++ b/data/json/mapgen/nested/aux_nested.json @@ -173,6 +173,11 @@ } ] }, + { + "type": "ter_furn_transform", + "id": "glass_door_wall_2_floor", + "terrain": [ { "result": "t_floor", "valid_terrain": [ "t_wall_glass", "t_door_glass_c" ] } ] + }, { "type": "ter_furn_transform", "id": "destroyed_window", diff --git a/data/json/mapgen/s_grocery.json b/data/json/mapgen/s_grocery.json index 6298793de1bf5..97248f821ad98 100644 --- a/data/json/mapgen/s_grocery.json +++ b/data/json/mapgen/s_grocery.json @@ -31,41 +31,9 @@ "sssL***+**************#_", "sss####################_" ], - "palettes": [ "parametrized_linoleum_palette", "parametrized_carpets_palette", "parametrized_walls_palette" ], "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_white" }, - "terrain": { - " ": { "param": "linoleum_color", "fallback": "t_linoleum_white" }, - "*": "t_thconc_floor", - "+": "t_door_c", - "g": "t_wall_glass", - "C": "t_thconc_floor", - "I": "t_door_locked_interior", - "L": "t_door_locked", - "S": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, - "T": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, - "W": "t_chainfence", - "[": "t_door_glass_c", - "]": "t_thconc_floor", - "_": "t_region_groundcover_urban", - "l": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, - "s": "t_concrete", - "w": "t_chainfence", - "4": "t_gutter_downspout" - }, - "furniture": { - "A": "f_atm_off", - "-": "f_counter", - "7": "f_bookcase", - "C": "f_crate_c", - "S": "f_sink", - "]": "f_rack", - "^": "f_indoor_plant", - "b": "f_stool", - "f": "f_glass_fridge", - "r": "f_rack", - "t": "f_table" - }, - "toilets": { "T": { } }, + "palettes": [ "grocery_store_palette" ], + "terrain": { "l": { "param": "linoleum_color", "fallback": "t_linoleum_gray" } }, "place_items": [ { "item": "produce", "x": [ 3, 6 ], "y": 5, "chance": 85, "repeat": [ 1, 10 ] }, { "item": "produce", "x": [ 8, 12 ], "y": 5, "chance": 85, "repeat": [ 1, 10 ] }, @@ -95,24 +63,11 @@ { "item": "groce_dairyegg", "x": [ 18, 21 ], "y": 21, "chance": 80, "repeat": [ 1, 12 ] }, { "item": "cash_register_random", "x": [ 18, 20 ], "y": 6, "chance": 100 } ], - "place_vehicles": [ - { "vehicle": "shopping_cart", "x": 3, "y": 2, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 4, "y": 2, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 5, "y": 2, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 6, "y": 2, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 7, "y": 2, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 8, "y": 2, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 9, "y": 2, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 3, "y": 3, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 4, "y": 3, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 5, "y": 3, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 6, "y": 3, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 7, "y": 3, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 8, "y": 3, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 9, "y": 3, "chance": 10 }, - { "vehicle": "shopping_cart", "x": [ 4, 21 ], "y": 13, "chance": 15 }, - { "vehicle": "grocery_cart", "x": [ 19, 22 ], "y": 3, "chance": 10, "repeat": [ 1, 3 ], "rotation": 90 } - ], + "vehicles": { + " ": { "vehicle": "shopping_cart", "chance": 10, "rotation": [ 0, 90, 180, 270 ] }, + "s": { "vehicle": "shopping_cart", "chance": 10, "rotation": [ 0, 90, 180, 270 ] } + }, + "place_vehicles": [ { "vehicle": "grocery_cart", "x": [ 19, 22 ], "y": 3, "chance": 10, "repeat": [ 1, 3 ], "rotation": 90 } ], "place_monster": [ { "monster": [ "mon_grocerybot", "mon_grocerybot_busted" ], "x": [ 19, 22 ], "y": 2, "chance": 15, "repeat": [ 1, 3 ] } ] @@ -151,38 +106,8 @@ "sss####################_" ], "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_white" }, - "palettes": [ "parametrized_linoleum_palette", "parametrized_carpets_palette", "parametrized_walls_palette" ], - "terrain": { - " ": { "param": "linoleum_color", "fallback": "t_linoleum_white" }, - "*": "t_thconc_floor", - "+": [ [ "t_door_b", 20 ], [ "t_door_frame", 10 ], [ "t_door_o", 70 ], [ "t_door_c", 5 ], [ "t_door_locked_interior", 3 ] ], - "g": "t_wall_glass", - "A": { "param": "linoleum_color", "fallback": "t_linoleum_white" }, - "C": "t_thconc_floor", - "S": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, - "T": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, - "W": "t_chainfence", - "[": "t_door_glass_c", - "]": "t_thconc_floor", - "_": "t_region_groundcover_urban", - "l": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, - "s": "t_concrete", - "w": "t_chainfence", - "4": "t_gutter_downspout" - }, - "furniture": { - "-": "f_counter", - "7": "f_bookcase", - "C": [ [ "f_crate_c", 20 ], [ "f_crate_o", 80 ] ], - "S": "f_sink", - "]": "f_rack", - "^": "f_indoor_plant", - "b": "f_stool", - "f": "f_glass_fridge", - "r": "f_rack", - "t": "f_table" - }, - "toilets": { "T": { } }, + "terrain": { "l": { "param": "linoleum_color", "fallback": "t_linoleum_white" } }, + "palettes": [ "grocery_store_palette" ], "fields": { "T": { "field": "fd_bile", "intensity": 1, "age": 10 }, "S": { "field": "fd_bile", "intensity": 1, "age": 10 } }, "liquids": { " ": [ @@ -249,24 +174,10 @@ { "item": "styrofoam_cup", "chance": 1 } ] }, - "place_vehicles": [ - { "vehicle": "shopping_cart", "x": 3, "y": 2, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 4, "y": 2, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 5, "y": 2, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 6, "y": 2, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 7, "y": 2, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 8, "y": 2, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 9, "y": 2, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 3, "y": 3, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 4, "y": 3, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 5, "y": 3, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 6, "y": 3, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 7, "y": 3, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 8, "y": 3, "chance": 10 }, - { "vehicle": "shopping_cart", "x": 9, "y": 3, "chance": 10 }, - { "vehicle": "shopping_cart", "x": [ 4, 21 ], "y": 13, "chance": 15 }, - { "vehicle": "grocery_cart", "x": [ 19, 22 ], "y": 3, "chance": 10, "repeat": [ 1, 3 ], "rotation": 90 } - ], + "vehicles": { + " ": { "vehicle": "shopping_cart", "chance": 10, "rotation": [ 0, 90, 180, 270 ] }, + "s": { "vehicle": "shopping_cart", "chance": 10, "rotation": [ 0, 90, 180, 270 ] } + }, "place_monster": [ { "monster": [ "mon_grocerybot", "mon_grocerybot_busted" ], "x": [ 19, 22 ], "y": 2, "chance": 15, "repeat": [ 1, 3 ] } ], @@ -315,43 +226,14 @@ "sssL***+**************#_", "sss####################_" ], - "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_white" }, - "palettes": [ "parametrized_linoleum_palette", "parametrized_carpets_palette", "parametrized_walls_palette" ], + "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, + "palettes": [ "grocery_store_palette" ], "terrain": { - " ": { "param": "linoleum_color", "fallback": "t_linoleum_white" }, - "*": "t_thconc_floor", "+": "t_door_boarded", - "g": "t_wall_glass", - "C": "t_thconc_floor", + "l": { "param": "linoleum_color", "fallback": "t_linoleum_white" }, "I": "t_door_boarded", - "L": "t_door_boarded", - "S": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, - "T": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, - "W": "t_chainfence", - "[": "t_door_glass_c", - "]": "t_thconc_floor", - "_": "t_region_groundcover_urban", - "l": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, - "s": "t_concrete", - "w": "t_chainfence", - "4": "t_gutter_downspout", - "Ю": "t_concrete" - }, - "furniture": { - "A": "f_atm_off", - "-": "f_counter", - "7": "f_bookcase", - "C": "f_crate_c", - "S": "f_sink", - "]": "f_rack", - "^": "f_indoor_plant", - "b": "f_stool", - "f": "f_glass_fridge", - "r": "f_rack", - "t": "f_table", - "Ю": "f_sandbag_half" + "L": "t_door_boarded" }, - "toilets": { "T": { } }, "place_items": [ { "item": "produce", "x": [ 3, 6 ], "y": 5, "chance": 1, "repeat": [ 1, 10 ] }, { "item": "produce", "x": [ 8, 12 ], "y": 5, "chance": 1, "repeat": [ 1, 10 ] }, @@ -438,42 +320,32 @@ "object": { "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, "rows": [ - " ss ", - " ss ", - " ###:::###++###:::### ", - " #..................# ", - " #..................# ", - " #..-..{-..{-..{-..{# ", - " #..-..{-..{-..{-..{# ", - " #..-..{-..{-..{-..{# ", - " #..................# ", - " #..................# ", - " #&..{{..{{..{{....{# ", - " #&..{{..{{..{{..{{{# ", - " #&..{{..{{..{{....{# ", - " #&..{{..{{..{{....{# ", - " #&..{{..{{..{{..{{{# ", - " #&..{{..{{..{{....{# ", - " #..................# ", - " #..................# ", - " #||||.........-----# ", - " #T.S|.........-.b..# ", - " #L..+.&&&&&&&....&&# ", - " #################### ", - " 4 ", - " " + "___________ss___________", + "___________ss___________", + "__###:::###++###:::###__", + "__# #__", + "__# #__", + "__# - r- r- r- r#__", + "__# - r- r- r- r#__", + "__# - r- r- r- r#__", + "__# #__", + "__# #__", + "__#f rr rr rr r#__", + "__#f rr rr rr rrr#__", + "__#f rr rr rr r#__", + "__#f rr rr rr r#__", + "__#f rr rr rr rrr#__", + "__#f rr rr rr r#__", + "__# #__", + "__# #__", + "__#|||| -----#__", + "__#T S| - b #__", + "__#L + fffffff ff#__", + "__####################__", + "___4____________________", + "________________________" ], - "palettes": [ "parametrized_linoleum_palette", "parametrized_walls_palette" ], - "terrain": { - " ": "t_region_groundcover_urban", - "s": "t_concrete", - "+": "t_door_c", - ".": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, - ":": "t_window", - "4": "t_gutter_downspout" - }, - "furniture": { "-": "f_counter", "&": "f_glass_fridge", "{": "f_rack", "b": "f_stool", "S": "f_sink", "L": "f_locker" }, - "toilets": { "T": { } }, + "palettes": [ "grocery_store_palette" ], "place_items": [ { "item": "fridgesnacks", "x": 3, "y": [ 10, 15 ], "chance": 80, "repeat": [ 1, 12 ] }, { "item": "fridge", "x": [ 8, 14 ], "y": 20, "chance": 80, "repeat": [ 1, 12 ] }, @@ -506,7 +378,7 @@ { "monster": "GROUP_PLAGUE_ROACH", "x": [ 2, 21 ], "y": [ 2, 21 ], "chance": 20 }, { "monster": "GROUP_ROACH", "x": [ 2, 21 ], "y": [ 2, 21 ], "chance": 20 } ], - "vehicles": { ".": { "vehicle": "shopping_cart", "chance": 1, "status": 1 } } + "vehicles": { " ": { "vehicle": "shopping_cart", "chance": 10, "rotation": [ 0, 90, 180, 270 ] } } } }, { @@ -517,42 +389,33 @@ "object": { "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, "rows": [ - " ss ", - " ss ", - " ###:::###++###:::### ", - " #..................# ", - " #..................# ", - " #..-..{-..{-..{-..{# ", - " #..-..{-..{-..{-..{# ", - " #..-..{-..{-..{-..{# ", - " #..................# ", - " #..................# ", - " #&..{{..{{..{{....{# ", - " #&..{{..{{..{{..{{{# ", - " #&..{{..{{..{{....{# ", - " #&..{{..{{..{{....{# ", - " #&..{{..{{..{{..{{{# ", - " #&..{{..{{..{{....{# ", - " #..................# ", - " #..................# ", - " #||||.........-----# ", - " #T.S|.........-.b..# ", - " #L..+.&&&&&&&....&&# ", - " #################### ", - " 4 ", - " " + "___________ss___________", + "___________ss___________", + "__###:::###++###:::###__", + "__# #__", + "__# #__", + "__# - r- r- r- r#__", + "__# - r- r- r- r#__", + "__# - r- r- r- r#__", + "__# #__", + "__# #__", + "__#f rr rr rr r#__", + "__#f rr rr rr rrr#__", + "__#f rr rr rr r#__", + "__#f rr rr rr r#__", + "__#f rr rr rr rrr#__", + "__#f rr rr rr r#__", + "__# #__", + "__# #__", + "__#|||| -----#__", + "__#T S| - b #__", + "__#L + fffffff ff#__", + "__####################__", + "___4____________________", + "________________________" ], - "palettes": [ "parametrized_linoleum_palette", "parametrized_walls_palette" ], - "terrain": { - " ": "t_region_groundcover_urban", - "s": "t_concrete", - "+": [ [ "t_door_b", 20 ], [ "t_door_frame", 10 ], [ "t_door_o", 70 ], [ "t_door_c", 5 ], [ "t_door_locked_interior", 3 ] ], - ".": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, - ":": [ [ "t_window_frame", 70 ], [ "t_window_empty", 20 ], [ "t_window", 5 ] ], - "4": "t_gutter_downspout" - }, - "furniture": { "-": "f_counter", "&": "f_glass_fridge", "{": "f_rack", "b": "f_stool", "S": "f_sink", "L": "f_locker" }, - "toilets": { "T": { } }, + "palettes": [ "grocery_store_palette" ], + "terrain": { ":": [ [ "t_window_frame", 70 ], [ "t_window_empty", 20 ], [ "t_window", 5 ] ] }, "fields": { "T": { "field": "fd_bile", "intensity": 1, "age": 10 }, "S": { "field": "fd_bile", "intensity": 1, "age": 10 } }, "liquids": { ".": [ @@ -600,7 +463,7 @@ { "item": "cash_register_random_ransacked", "x": 17, "y": 5, "chance": 100 } ], "item": { - ".": [ + " ": [ { "item": "bottle_glass", "chance": 1 }, { "item": "bottle_plastic", "chance": 1 }, { "item": "can_drink", "chance": 1 }, @@ -620,7 +483,7 @@ { "monster": "GROUP_PLAGUE_ROACH", "x": [ 2, 21 ], "y": [ 2, 21 ], "chance": 20 }, { "monster": "GROUP_ROACH", "x": [ 2, 21 ], "y": [ 2, 21 ], "chance": 20 } ], - "vehicles": { ".": { "vehicle": "shopping_cart", "chance": 1, "status": 1 } }, + "vehicles": { " ": { "vehicle": "shopping_cart", "chance": 10, "rotation": [ 0, 90, 180, 270 ] } }, "nested": { "|": { "chunks": [ [ "bile_field", 1 ], [ "shelter_graffiti", 10 ], [ "general_graffiti", 20 ], [ "null", 75 ] ] }, "#": { "chunks": [ [ "bile_field", 1 ], [ "shelter_graffiti", 10 ], [ "general_graffiti", 20 ], [ "null", 75 ] ] }, @@ -637,42 +500,33 @@ "object": { "fill_ter": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, "rows": [ - " ss ", - " ss ", - " ###:::###++###:::### ", - " #..................# ", - " #..................# ", - " #..-..{-..{-..{-..{# ", - " #..-..{-..{-..{-..{# ", - " #..-..{-..{-..{-..{# ", - " #..................# ", - " #..................# ", - " #&..{{..{{..{{....{# ", - " #&..{{..{{..{{..{{{# ", - " #&..{{..{{..{{....{# ", - " #&..{{..{{..{{....{# ", - " #&..{{..{{..{{..{{{# ", - " #&..{{..{{..{{....{# ", - " #..................# ", - " #..................# ", - " #||||.........-----# ", - " #T.S|.........-.b..# ", - " #L..+.&&&&&&&....&&# ", - " #################### ", - " 4 ", - " " + "___________ss___________", + "___________ss___________", + "__###:::###++###:::###__", + "__# #__", + "__# #__", + "__# - r- r- r- r#__", + "__# - r- r- r- r#__", + "__# - r- r- r- r#__", + "__# #__", + "__# #__", + "__#f rr rr rr r#__", + "__#f rr rr rr rrr#__", + "__#f rr rr rr r#__", + "__#f rr rr rr r#__", + "__#f rr rr rr rrr#__", + "__#f rr rr rr r#__", + "__# #__", + "__# #__", + "__#|||| -----#__", + "__#T S| - b #__", + "__#L + fffffff ff#__", + "__####################__", + "___4____________________", + "________________________" ], - "palettes": [ "parametrized_linoleum_palette", "parametrized_walls_palette" ], - "terrain": { - " ": "t_region_groundcover_urban", - "s": "t_concrete", - "+": "t_door_boarded", - ".": { "param": "linoleum_color", "fallback": "t_linoleum_gray" }, - ":": "t_window_boarded", - "4": "t_gutter_downspout" - }, - "furniture": { "-": "f_counter", "&": "f_glass_fridge", "{": "f_rack", "b": "f_stool", "S": "f_sink", "L": "f_locker" }, - "toilets": { "T": { } }, + "palettes": [ "grocery_store_palette" ], + "terrain": { "+": "t_door_boarded", ":": "t_window_boarded" }, "place_items": [ { "item": "fridgesnacks", "x": 3, "y": [ 10, 15 ], "chance": 1, "repeat": [ 1, 12 ] }, { "item": "fridge", "x": [ 8, 14 ], "y": 20, "chance": 1, "repeat": [ 1, 12 ] }, @@ -705,7 +559,7 @@ { "monster": "GROUP_PLAGUE_ROACH", "x": [ 2, 21 ], "y": [ 2, 21 ], "chance": 20 }, { "monster": "GROUP_ROACH", "x": [ 2, 21 ], "y": [ 2, 21 ], "chance": 20 } ], - "vehicles": { ".": { "vehicle": "shopping_cart", "chance": 1, "status": 1 } } + "vehicles": { " ": { "vehicle": "shopping_cart", "chance": 10, "rotation": [ 0, 90, 180, 270 ] } } } }, { @@ -751,10 +605,5 @@ } ] } - }, - { - "type": "ter_furn_transform", - "id": "glass_door_wall_2_floor", - "terrain": [ { "result": "t_floor", "valid_terrain": [ "t_wall_glass", "t_door_glass_c" ] } ] } ] diff --git a/data/json/mapgen_palettes/grocery_palette.json b/data/json/mapgen_palettes/grocery_palette.json new file mode 100644 index 0000000000000..d3a9fd3293372 --- /dev/null +++ b/data/json/mapgen_palettes/grocery_palette.json @@ -0,0 +1,41 @@ +[ + { + "type": "palette", + "id": "grocery_store_palette", + "palettes": [ "parametrized_linoleum_palette", "parametrized_carpets_palette", "parametrized_walls_palette" ], + "terrain": { + "*": "t_thconc_floor", + "+": [ [ "t_door_b", 2 ], [ "t_door_o", 7 ], [ "t_door_c", 5 ], [ "t_door_locked_interior", 3 ] ], + "g": "t_wall_glass", + "C": "t_thconc_floor", + "I": "t_door_locked_interior", + "L": "t_door_locked", + "W": "t_chainfence", + "[": "t_door_glass_c", + "]": "t_thconc_floor", + "_": "t_region_groundcover_urban", + "s": "t_concrete", + "w": "t_chainfence", + "4": "t_gutter_downspout", + ":": "t_window", + "Ю": "t_concrete" + }, + "furniture": { + "A": "f_atm_off", + "-": "f_counter", + "7": "f_bookcase", + "C": [ [ "f_crate_c", 30 ], [ "f_crate_o", 70 ] ], + "S": "f_sink", + "]": "f_rack", + "^": "f_indoor_plant", + "b": "f_stool", + "f": "f_glass_fridge", + "r": "f_rack", + "t": "f_table", + "Ю": "f_sandbag_half", + "L": "f_locker" + }, + "items": { }, + "toilets": { "T": { } } + } +] diff --git a/data/json/martialarts_fictional.json b/data/json/martialarts_fictional.json index 2d2604262879a..bcdd6796f5fff 100644 --- a/data/json/martialarts_fictional.json +++ b/data/json/martialarts_fictional.json @@ -376,7 +376,7 @@ "chance": 100, "duration": 400, "on_damage": true, - "message": "The weapon of %s has been forced out ot their hands!" + "message": "The weapon of %s has been forced out of their hands!" } ], "stun_dur": 1, @@ -686,7 +686,7 @@ "chance": 100, "duration": 400, "on_damage": true, - "message": "The weapon of %s has been forced out ot their hands!" + "message": "The weapon of %s has been forced out of their hands!" } ], "attack_vectors": [ "vector_grasp" ] diff --git a/data/json/monster_special_attacks/spells.json b/data/json/monster_special_attacks/spells.json index 1070e56799617..3d8de1f502ced 100644 --- a/data/json/monster_special_attacks/spells.json +++ b/data/json/monster_special_attacks/spells.json @@ -702,7 +702,7 @@ ], "false_effect": [ { "math": [ "u_pain()", "+=", "3" ] }, - { "math": [ "u_madness", "++" ] }, + { "math": [ "u_madness++" ] }, { "u_message": "You can't look away from the impossible shape, staring at it is making you feel sick, you have to get away!" } @@ -910,7 +910,7 @@ "effect": [ { "u_message": "Your reflection uses your bond to feast on your essence." }, { "math": [ "u_val('sleepiness') = min(u_val('sleepiness') + portal_dungeon_reflect_strength, 1200)" ] }, - { "math": [ "portal_dungeon_reflect_strength", "++" ] } + { "math": [ "portal_dungeon_reflect_strength++" ] } ] }, { diff --git a/data/json/monsterdrops/clothing_halloween.json b/data/json/monsterdrops/clothing_halloween.json index 84e3a92a51345..52fa8d94ff174 100644 --- a/data/json/monsterdrops/clothing_halloween.json +++ b/data/json/monsterdrops/clothing_halloween.json @@ -1629,15 +1629,7 @@ { "group": "shirts_unisex", "prob": 65, "damage": [ 1, 4 ] }, { "group": "pants_unisex", "damage": [ 1, 4 ] }, { "group": "socks_unisex", "damage": [ 1, 4 ] }, - { - "distribution": [ - { "item": "wolfsuit", "prob": 20, "damage": [ 1, 4 ] }, - { "item": "dragonsuit", "prob": 20, "damage": [ 1, 4 ] }, - { "item": "felinesuit", "prob": 20, "damage": [ 1, 4 ] }, - { "item": "dinosuit", "prob": 20, "damage": [ 1, 4 ] }, - { "item": "sharksuit", "prob": 20, "damage": [ 1, 4 ] } - ] - }, + { "distribution": [ { "item": "fursuit", "prob": 20, "damage": [ 1, 4 ] } ] }, { "distribution": [ { "item": "flip_flops", "prob": 35, "damage": [ 1, 4 ] }, diff --git a/data/json/monsterdrops/zombie.json b/data/json/monsterdrops/zombie.json index 4872efa7ddb8c..6c684df3d9f90 100644 --- a/data/json/monsterdrops/zombie.json +++ b/data/json/monsterdrops/zombie.json @@ -130,13 +130,7 @@ "type": "item_group", "id": "zombie_fursuits", "subtype": "distribution", - "entries": [ - { "item": "wolfsuit", "prob": 50, "damage": [ 2, 3 ] }, - { "item": "dragonsuit", "prob": 50, "damage": [ 2, 3 ] }, - { "item": "felinesuit", "prob": 50, "damage": [ 2, 3 ] }, - { "item": "dinosuit", "prob": 50, "damage": [ 2, 3 ] }, - { "item": "sharksuit", "prob": 50, "damage": [ 2, 3 ] } - ] + "entries": [ { "item": "fursuit", "prob": 50, "damage": [ 2, 3 ] } ] }, { "type": "item_group", diff --git a/data/json/monstergroups/wilderness.json b/data/json/monstergroups/wilderness.json index 8336c85311bff..29e1b74608173 100644 --- a/data/json/monstergroups/wilderness.json +++ b/data/json/monstergroups/wilderness.json @@ -275,8 +275,7 @@ { "monster": "mon_zeindeer", "weight": 1, "cost_multiplier": 15, "pack_size": [ 2, 5 ], "event": "christmas" }, { "monster": "mon_zombie_dog", "weight": 1, "cost_multiplier": 2 }, { "monster": "mon_zombie_horse", "weight": 1, "cost_multiplier": 15, "pack_size": [ 1, 4 ] }, - { "monster": "mon_zoose", "weight": 1, "cost_multiplier": 10 }, - { "monster": "mon_zpider_mass", "weight": 1, "cost_multiplier": 10 } + { "monster": "mon_zoose", "weight": 1, "cost_multiplier": 10 } ] }, { diff --git a/data/json/monsters/bird.json b/data/json/monsters/bird.json index 7ed52fab2bc2c..94a42580cd4e5 100644 --- a/data/json/monsters/bird.json +++ b/data/json/monsters/bird.json @@ -37,7 +37,6 @@ "HEARS", "ANIMAL", "PATH_AVOID_DANGER", - "PATH_AVOID_FIRE", "WARM", "FLIES", "SWARMS", diff --git a/data/json/monsters/nether.json b/data/json/monsters/nether.json index c36b2fd1cb1fe..f5f3ef48425a9 100644 --- a/data/json/monsters/nether.json +++ b/data/json/monsters/nether.json @@ -661,7 +661,7 @@ } ] }, - "effects": [ { "id": "star_vampire_blood_drink", "duration": 2, "chance": 100 } ], + "eoc": [ "EOC_STAR_VAMPIRE_FANGED_DRINK_BLOOD" ], "self_effects_ondmg": [ { "id": "star_vampire_blood_drank", "duration": 10 } ], "cooldown": 1, "move_cost": 100, @@ -724,6 +724,31 @@ ], "armor": { "bash": 8, "electric": 3 } }, + { + "type": "effect_on_condition", + "id": "EOC_STAR_VAMPIRE_FANGED_DRINK_BLOOD", + "effect": [ + { "math": [ "u_star_vampire_amount_drained", "=", "rng(250,650)" ] }, + { + "if": { "npc_has_flag": "BLEEDSLOW2" }, + "then": [ + { "math": [ "n_vitamin('blood')", "-=", "u_star_vampire_amount_drained / 3" ] }, + { "math": [ "n_vitamin('redcells')", "-=", "u_star_vampire_amount_drained / 3" ] } + ], + "else": { + "if": { "npc_has_flag": "BLEEDSLOW" }, + "then": [ + { "math": [ "n_vitamin('blood')", "-=", "u_star_vampire_amount_drained / 1.5" ] }, + { "math": [ "n_vitamin('redcells')", "-=", "u_star_vampire_amount_drained / 1.5" ] } + ], + "else": [ + { "math": [ "n_vitamin('blood')", "-=", "u_star_vampire_amount_drained" ] }, + { "math": [ "n_vitamin('redcells')", "-=", "u_star_vampire_amount_drained" ] } + ] + } + } + ] + }, { "id": "mon_star_vampire_coiling", "type": "MONSTER", @@ -831,7 +856,7 @@ } ] }, - "effects": [ { "id": "star_vampire_blood_drink", "duration": 2, "chance": 100 } ], + "eoc": [ "EOC_STAR_VAMPIRE_COILING_DRINK_BLOOD" ], "self_effects_ondmg": [ { "id": "star_vampire_blood_drank", "duration": 5 } ], "cooldown": 1, "move_cost": 100, @@ -871,6 +896,31 @@ } ] }, + { + "type": "effect_on_condition", + "id": "EOC_STAR_VAMPIRE_COILING_DRINK_BLOOD", + "effect": [ + { "math": [ "u_star_vampire_amount_drained", "=", "rng(125,325)" ] }, + { + "if": { "npc_has_flag": "BLEEDSLOW2" }, + "then": [ + { "math": [ "n_vitamin('blood')", "-=", "u_star_vampire_amount_drained / 3" ] }, + { "math": [ "n_vitamin('redcells')", "-=", "u_star_vampire_amount_drained / 3" ] } + ], + "else": { + "if": { "npc_has_flag": "BLEEDSLOW" }, + "then": [ + { "math": [ "n_vitamin('blood')", "-=", "u_star_vampire_amount_drained / 1.5" ] }, + { "math": [ "n_vitamin('redcells')", "-=", "u_star_vampire_amount_drained / 1.5" ] } + ], + "else": [ + { "math": [ "n_vitamin('blood')", "-=", "u_star_vampire_amount_drained" ] }, + { "math": [ "n_vitamin('redcells')", "-=", "u_star_vampire_amount_drained" ] } + ] + } + } + ] + }, { "id": "mon_unseen_hunter", "type": "MONSTER", diff --git a/data/json/monsters/zed-animal.json b/data/json/monsters/zed-animal.json index c35dceb17749e..adfb1cb2126fd 100644 --- a/data/json/monsters/zed-animal.json +++ b/data/json/monsters/zed-animal.json @@ -672,51 +672,6 @@ "flags": [ "SEES", "HEARS", "SMELLS", "STUMBLES", "WARM", "POISON", "NO_BREATHE", "REVIVES", "FILTHY" ], "armor": { "bash": 1, "cut": 3, "electric": 1 } }, - { - "id": "mon_zpider_mass", - "type": "MONSTER", - "name": { "str": "mass of zombie spiders", "str_pl": "masses of zombie spiders" }, - "description": "Thousands, maybe millions of spiders piled up high, each slowly oozing sticky green pus, struggling to keep the fetid mass together and moving.", - "default_faction": "zombie", - "bodytype": "blob", - "species": [ "ZOMBIE", "SPIDER" ], - "volume": "18 L", - "weight": "23 kg", - "hp": 40, - "speed": 70, - "attack_cost": 70, - "material": [ "iflesh" ], - "symbol": "s", - "color": "light_green", - "aggression": 100, - "morale": 100, - "melee_skill": 4, - "melee_dice": 2, - "melee_dice_sides": 3, - "melee_damage": [ { "damage_type": "cut", "amount": 2 } ], - "dodge": 1, - "families": [ "prof_gross_anatomy", "prof_intro_biology", "prof_physiology" ], - "vision_day": 5, - "vision_night": 5, - "harvest": "arachnid_tainted", - "flags": [ - "SEES", - "HEARS", - "SMELLS", - "STUMBLES", - "WARM", - "NOHEAD", - "VENOM", - "CLIMBS", - "WEBWALK", - "POISON", - "NO_BREATHE", - "REVIVES", - "FILTHY", - "INSECTICIDEPROOF" - ], - "armor": { "cut": 3, "stab": 3, "bullet": 2, "electric": 1 } - }, { "id": "mon_zeindeer", "type": "MONSTER", diff --git a/data/json/npcs/Lighthouse_Family/NPC_lighthouse_man.json b/data/json/npcs/Lighthouse_Family/NPC_lighthouse_man.json index 31d43813be0e1..55a34c85ca94e 100644 --- a/data/json/npcs/Lighthouse_Family/NPC_lighthouse_man.json +++ b/data/json/npcs/Lighthouse_Family/NPC_lighthouse_man.json @@ -134,7 +134,7 @@ { "npc_at_om_location": "lighthouse_ground" } ] }, - "effect": { "math": [ "n_count_cleaning_lighthouse_man", "++" ] } + "effect": { "math": [ "n_count_cleaning_lighthouse_man++" ] } }, { "text": "Yes. First floor is clear.", @@ -146,7 +146,7 @@ { "npc_at_om_location": "lighthouse_z1" } ] }, - "effect": { "math": [ "n_count_cleaning_lighthouse_man", "++" ] } + "effect": { "math": [ "n_count_cleaning_lighthouse_man++" ] } }, { "text": "Yes. Second floor is clear.", @@ -158,7 +158,7 @@ { "npc_at_om_location": "lighthouse_z2" } ] }, - "effect": { "math": [ "n_count_cleaning_lighthouse_man", "++" ] } + "effect": { "math": [ "n_count_cleaning_lighthouse_man++" ] } }, { "text": "Yes. Third floor is clear.", @@ -170,7 +170,7 @@ { "npc_at_om_location": "lighthouse_z3" } ] }, - "effect": { "math": [ "n_count_cleaning_lighthouse_man", "++" ] } + "effect": { "math": [ "n_count_cleaning_lighthouse_man++" ] } }, { "text": "Yes. Fourth floor is clear.", @@ -182,7 +182,7 @@ { "npc_at_om_location": "lighthouse_z4" } ] }, - "effect": { "math": [ "n_count_cleaning_lighthouse_man", "++" ] } + "effect": { "math": [ "n_count_cleaning_lighthouse_man++" ] } }, { "text": "Yes. Top floor is clear.", @@ -193,7 +193,7 @@ { "npc_at_om_location": "lighthouse_z5" } ] }, - "effect": { "math": [ "n_count_cleaning_lighthouse_man", "++" ] }, + "effect": { "math": [ "n_count_cleaning_lighthouse_man++" ] }, "topic": "TALK_lighthouse_man_cleaned_done" }, { @@ -205,7 +205,7 @@ { "npc_at_om_location": "lighthouse_ground" } ] }, - "effect": { "math": [ "n_count_cleaning_lighthouse_man", "++" ] }, + "effect": { "math": [ "n_count_cleaning_lighthouse_man++" ] }, "topic": "TALK_MISSION_INQUIRE" }, { "text": "Not yet.", "topic": "TALK_DONE" } diff --git a/data/json/npcs/TALK_TEST.json b/data/json/npcs/TALK_TEST.json index 8a71626d94c11..0a1a51624a96e 100644 --- a/data/json/npcs/TALK_TEST.json +++ b/data/json/npcs/TALK_TEST.json @@ -875,7 +875,7 @@ { "text": "This is a math test response that increments by 1.", "topic": "TALK_DONE", - "effect": { "math": [ "u_test_var_compare_test_test", "++" ] } + "effect": { "math": [ "u_test_var_compare_test_test++" ] } }, { "text": "This is an math test response that increments by 2.", diff --git a/data/json/npcs/computers/TALK_MSU14.json b/data/json/npcs/computers/TALK_MSU14.json index 122b11f65fdbd..db73904fd3d88 100644 --- a/data/json/npcs/computers/TALK_MSU14.json +++ b/data/json/npcs/computers/TALK_MSU14.json @@ -114,7 +114,7 @@ "effect": [ { "run_eocs": [ "capture_generic_nre_anomaly" ] }, { "u_spawn_item": "melchior_science_doc", "count": 1 }, - { "math": [ "u_counter_robofac_knowledge_dimensional_heuristics", "++" ] } + { "math": [ "u_counter_robofac_knowledge_dimensional_heuristics++" ] } ], "topic": "TALK_DONE" } diff --git a/data/json/npcs/exodii/exodii_merchant_itemlist.json b/data/json/npcs/exodii/exodii_merchant_itemlist.json index db75c99650111..a2ffd67d5da0d 100644 --- a/data/json/npcs/exodii/exodii_merchant_itemlist.json +++ b/data/json/npcs/exodii/exodii_merchant_itemlist.json @@ -69,6 +69,7 @@ [ "plastic_sheet", 10 ], [ "oxy_torch", 45 ], { "item": "weldtank", "prob": 15, "count": [ 1, 2 ] }, + { "item": "smallweldtank", "prob": 45, "count": [ 1, 3 ] }, { "item": "tinyweldtank", "prob": 45, "count": [ 1, 3 ] }, { "item": "oxygen_cylinder", "prob": 10, "count": [ 1, 2 ] } ] diff --git a/data/json/npcs/godco/members/NPC_Katherine_Weaver.json b/data/json/npcs/godco/members/NPC_Katherine_Weaver.json index 7ba627959bd11..d4886c44c2785 100644 --- a/data/json/npcs/godco/members/NPC_Katherine_Weaver.json +++ b/data/json/npcs/godco/members/NPC_Katherine_Weaver.json @@ -321,7 +321,7 @@ "type": "talk_topic", "id": "TALK_GODCO_Katherine_Angry_Pressed", "dynamic_line": "&Katherine scowls with anger at you. \"This is the exact reason I don't want to talk to you, now go away!\"", - "speaker_effect": [ { "effect": { "math": [ "n_npc_anger()", "++" ] } } ], + "speaker_effect": [ { "effect": { "math": [ "n_npc_anger()++" ] } } ], "responses": [ { "text": "Fuck's sake , I'm leaving!", "topic": "TALK_DONE" } ] } ] diff --git a/data/json/npcs/godco/shared_effects.json b/data/json/npcs/godco/shared_effects.json index 5eeafd15a3267..873c4bd554fa5 100644 --- a/data/json/npcs/godco/shared_effects.json +++ b/data/json/npcs/godco/shared_effects.json @@ -29,10 +29,7 @@ { "//": "Just coming and saying hi regularly will give you a small boost to value.", "condition": { "not": { "npc_has_effect": "npc_value_interaction_timer_short" } }, - "effect": [ - { "npc_add_effect": "npc_value_interaction_timer_short", "duration": "30 hours" }, - { "math": [ "n_npc_value()", "++" ] } - ] + "effect": [ { "npc_add_effect": "npc_value_interaction_timer_short", "duration": "30 hours" }, { "math": [ "n_npc_value()++" ] } ] } ], "responses": [ diff --git a/data/json/npcs/isherwood_farm/NPC_Chris_Isherwood.json b/data/json/npcs/isherwood_farm/NPC_Chris_Isherwood.json index 7d66c1e41b0e7..580da0df6fd26 100644 --- a/data/json/npcs/isherwood_farm/NPC_Chris_Isherwood.json +++ b/data/json/npcs/isherwood_farm/NPC_Chris_Isherwood.json @@ -414,7 +414,7 @@ "effect": [ { "math": [ "isherwood_family_coming = 0" ] }, { "run_eocs": "isherwood_mission_initialization_eoc" }, - { "math": [ "npc_isherwood_barry_rescue_attempts", "++" ] } + { "math": [ "npc_isherwood_barry_rescue_attempts++" ] } ], "topic": "TALK_DONE" }, @@ -450,7 +450,7 @@ "effect": [ { "math": [ "isherwood_family_coming = 0" ] }, { "run_eocs": "isherwood_mission_initialization_eoc" }, - { "math": [ "npc_isherwood_barry_rescue_attempts", "++" ] } + { "math": [ "npc_isherwood_barry_rescue_attempts++" ] } ], "topic": "TALK_DONE" } @@ -479,7 +479,7 @@ { "math": [ "isherwood_family_coming = 0" ] }, { "run_eocs": "isherwood_mission_lisa_coming", "time_in_future": "1 hour" }, { "run_eocs": "isherwood_mission_initialization_eoc" }, - { "math": [ "npc_isherwood_barry_rescue_attempts", "++" ] } + { "math": [ "npc_isherwood_barry_rescue_attempts++" ] } ], "topic": "TALK_DONE" }, @@ -574,7 +574,7 @@ "effect": [ { "math": [ "isherwood_family_coming = 1" ] }, { "run_eocs": "isherwood_mission_initialization_eoc" }, - { "math": [ "npc_isherwood_barry_rescue_attempts", "++" ] } + { "math": [ "npc_isherwood_barry_rescue_attempts++" ] } ], "topic": "TALK_DONE" }, @@ -637,25 +637,25 @@ { "text": "[5 Riot Armor] I've got enough riot armor for everyone.", "condition": { "and": [ { "u_has_item": "armor_riot" }, { "math": [ "isherwood_gear_retrival_armor_body_count < 5" ] } ] }, - "effect": [ { "u_consume_item": "armor_riot" }, { "math": [ "isherwood_gear_retrival_armor_body_count", "++" ] } ], + "effect": [ { "u_consume_item": "armor_riot" }, { "math": [ "isherwood_gear_retrival_armor_body_count++" ] } ], "topic": "TALK_ISHERWOOD_CHRIS_RESCUE_BARRY_PLAN_Gear_Turn_Over" }, { "text": "[5 Riot Helmet] These crowd control helmets should help a lot.", "condition": { "and": [ { "u_has_item": "helmet_riot" }, { "math": [ "isherwood_gear_retrival_helmet_count < 5" ] } ] }, - "effect": [ { "u_consume_item": "helmet_riot" }, { "math": [ "isherwood_gear_retrival_helmet_count", "++" ] } ], + "effect": [ { "u_consume_item": "helmet_riot" }, { "math": [ "isherwood_gear_retrival_helmet_count++" ] } ], "topic": "TALK_ISHERWOOD_CHRIS_RESCUE_BARRY_PLAN_Gear_Turn_Over" }, { "text": "[5 Riot Arm Guard] I hope these armguards won't interfere with people's aim.", "condition": { "and": [ { "u_has_item": "armor_riot_arm" }, { "math": [ "isherwood_gear_retrival_armor_arm_count < 5" ] } ] }, - "effect": [ { "u_consume_item": "armor_riot_arm" }, { "math": [ "isherwood_gear_retrival_armor_arm_count", "++" ] } ], + "effect": [ { "u_consume_item": "armor_riot_arm" }, { "math": [ "isherwood_gear_retrival_armor_arm_count++" ] } ], "topic": "TALK_ISHERWOOD_CHRIS_RESCUE_BARRY_PLAN_Gear_Turn_Over" }, { "text": "[5 Riot Leg Guard] I've got these leg guards to keep people from getting hobbled.", "condition": { "and": [ { "u_has_item": "armor_riot_leg" }, { "math": [ "isherwood_gear_retrival_armor_leg_count < 5" ] } ] }, - "effect": [ { "u_consume_item": "armor_riot_leg" }, { "math": [ "isherwood_gear_retrival_armor_leg_count", "++" ] } ], + "effect": [ { "u_consume_item": "armor_riot_leg" }, { "math": [ "isherwood_gear_retrival_armor_leg_count++" ] } ], "topic": "TALK_ISHERWOOD_CHRIS_RESCUE_BARRY_PLAN_Gear_Turn_Over" }, { @@ -765,7 +765,7 @@ "responses": [ { "text": "All right. Let's kick some alien butt.", - "effect": [ { "run_eocs": "isherwood_mission_initialization_eoc" }, { "math": [ "npc_isherwood_barry_rescue_attempts", "++" ] } ], + "effect": [ { "run_eocs": "isherwood_mission_initialization_eoc" }, { "math": [ "npc_isherwood_barry_rescue_attempts++" ] } ], "topic": "TALK_DONE" }, { @@ -848,7 +848,7 @@ "end": { "effect": [ { "run_eocs": "isherwood_mission_wall_finished", "time_in_future": "24 hours" }, - { "math": [ "isherwood_wall_status", "++" ] } + { "math": [ "isherwood_wall_status++" ] } ] }, "origins": [ "ORIGIN_SECONDARY" ], diff --git a/data/json/npcs/isherwood_farm/NPC_Luke_Isherwood.json b/data/json/npcs/isherwood_farm/NPC_Luke_Isherwood.json index 376199e529f7e..8a21e7a0ceb8c 100644 --- a/data/json/npcs/isherwood_farm/NPC_Luke_Isherwood.json +++ b/data/json/npcs/isherwood_farm/NPC_Luke_Isherwood.json @@ -548,7 +548,7 @@ "place_vehicles": [ { "vehicle": "truck_trailer_explosives", "chance": 100, "rotation": 270, "x": [ 7 ], "y": [ 7 ] } ] } }, - "end": { "effect": [ { "math": [ "isherwood_luke_truck_coming", "++" ] } ] }, + "end": { "effect": [ { "math": [ "isherwood_luke_truck_coming++" ] } ] }, "origins": [ "ORIGIN_SECONDARY" ], "//2": "Dialogue for this mission is handled externally.", "dialogue": { diff --git a/data/json/npcs/random_encounters/john_bailey.json b/data/json/npcs/random_encounters/john_bailey.json index 09a0ea83a3765..24685d179965a 100644 --- a/data/json/npcs/random_encounters/john_bailey.json +++ b/data/json/npcs/random_encounters/john_bailey.json @@ -574,7 +574,7 @@ "text": "Sure, let's talk trade.", "topic": "TALK_TRAIN", "condition": { "math": [ "npc_John_Bailey_taught <= 3" ] }, - "effect": { "math": [ "npc_John_Bailey_taught", "++" ] } + "effect": { "math": [ "npc_John_Bailey_taught++" ] } }, { "text": "I'll bear that in mind. What did you say you were doing here?", "topic": "TALK_RC_John_Bailey_2" }, { "text": "Thanks, I'll think about it. ", "topic": "TALK_NONE" }, diff --git a/data/json/npcs/refugee_center/beggars/BEGGAR_2_Dino_Dave.json b/data/json/npcs/refugee_center/beggars/BEGGAR_2_Dino_Dave.json index 6e31aecd5cb38..1027f72ca0045 100644 --- a/data/json/npcs/refugee_center/beggars/BEGGAR_2_Dino_Dave.json +++ b/data/json/npcs/refugee_center/beggars/BEGGAR_2_Dino_Dave.json @@ -49,7 +49,7 @@ "entries": [ { "item": "boxer_shorts" }, { "item": "socks_wool" }, - { "item": "dinosuit" }, + { "item": "fursuit", "variant": "dinosuit" }, { "item": "cardboard_crown_loose" }, { "item": "boots_winter" }, { "item": "coat_winter" } @@ -408,8 +408,8 @@ "//": "todo2: migrate u refugee happiness to global", "end": { "effect": [ - { "math": [ "dave_castle_stage", "++" ] }, - { "math": [ "u_counter_refugee_center_refugee_happiness", "++" ] }, + { "math": [ "dave_castle_stage++" ] }, + { "math": [ "u_counter_refugee_center_refugee_happiness++" ] }, { "mapgen_update": "refcenter_unlock_roofstairs", "om_terrain": "evac_center_13" }, { "mapgen_update": "beggar_2_remove_lobbycardboard", "om_terrain": "evac_center_18" } ] diff --git a/data/json/npcs/refugee_center/surface_refugees/NPC_Alonso_Lautrec.json b/data/json/npcs/refugee_center/surface_refugees/NPC_Alonso_Lautrec.json index e53f00b8becb1..0c230b90562a1 100644 --- a/data/json/npcs/refugee_center/surface_refugees/NPC_Alonso_Lautrec.json +++ b/data/json/npcs/refugee_center/surface_refugees/NPC_Alonso_Lautrec.json @@ -258,7 +258,7 @@ "topic": "TALK_REFUGEE_Alonso_CalledOut3", "effect": [ { "npc_add_var": "general_none_Alonso_accent", "value": "accepted" }, - { "math": [ "u_counter_refugee_center_refugee_happiness", "++" ] } + { "math": [ "u_counter_refugee_center_refugee_happiness++" ] } ] }, { "text": "", "topic": "TALK_NONE" }, diff --git a/data/json/npcs/refugee_center/surface_refugees/NPC_Boris_Borichenko.json b/data/json/npcs/refugee_center/surface_refugees/NPC_Boris_Borichenko.json index 6ab68e4e681f0..abca854b8bea2 100644 --- a/data/json/npcs/refugee_center/surface_refugees/NPC_Boris_Borichenko.json +++ b/data/json/npcs/refugee_center/surface_refugees/NPC_Boris_Borichenko.json @@ -496,7 +496,7 @@ "responses": [ { "text": "Good to hear. I'm sure everyone will appreciate that place being cleaned up.", "topic": "TALK_DONE" } ], "speaker_effect": { "effect": [ - { "math": [ "u_mission_cleanup_promises_Boris_mission_1", "++" ] }, + { "math": [ "u_mission_cleanup_promises_Boris_mission_1++" ] }, { "npc_add_var": "mission_Boris_mission_1_cleanup_asked", "value": "yes" } ] } diff --git a/data/json/npcs/refugee_center/surface_refugees/NPC_Fatima_Al_Jadir.json b/data/json/npcs/refugee_center/surface_refugees/NPC_Fatima_Al_Jadir.json index 60400e09bbf88..4bd067f2db293 100644 --- a/data/json/npcs/refugee_center/surface_refugees/NPC_Fatima_Al_Jadir.json +++ b/data/json/npcs/refugee_center/surface_refugees/NPC_Fatima_Al_Jadir.json @@ -305,7 +305,7 @@ "effect": [ { "u_spawn_item": "FMCNote", "count": 5 }, { "u_add_var": "mission_flag_Fatima_Mission1", "value": "yes" }, - { "math": [ "u_counter_refugee_center_refugee_happiness", "++" ] } + { "math": [ "u_counter_refugee_center_refugee_happiness++" ] } ] } } diff --git a/data/json/npcs/refugee_center/surface_refugees/NPC_Jenny_Forcette.json b/data/json/npcs/refugee_center/surface_refugees/NPC_Jenny_Forcette.json index cad748809d8fe..6483dafd04bbf 100644 --- a/data/json/npcs/refugee_center/surface_refugees/NPC_Jenny_Forcette.json +++ b/data/json/npcs/refugee_center/surface_refugees/NPC_Jenny_Forcette.json @@ -619,7 +619,7 @@ "effect": [ { "u_spawn_item": "FMCNote", "count": 4 }, { "u_add_var": "mission_completed_Jenny_mission_2", "value": "yes" }, - { "math": [ "u_counter_refugee_center_refugee_happiness", "++" ] } + { "math": [ "u_counter_refugee_center_refugee_happiness++" ] } ] } }, @@ -649,7 +649,7 @@ "effect": [ { "u_spawn_item": "FMCNote", "count": 5 }, { "u_add_var": "mission_completed_Jenny_mission_2", "value": "yes" }, - { "math": [ "u_counter_refugee_center_refugee_happiness", "++" ] } + { "math": [ "u_counter_refugee_center_refugee_happiness++" ] } ] } }, @@ -680,7 +680,7 @@ { "u_spawn_item": "FMCNote", "count": 5 }, { "u_add_var": "mission_completed_Jenny_mission_3", "value": "yes" }, { "math": [ "n_timer_flag_Jenny_project_timer = time('now')" ] }, - { "math": [ "u_counter_refugee_center_refugee_happiness", "++" ] } + { "math": [ "u_counter_refugee_center_refugee_happiness++" ] } ] } } diff --git a/data/json/npcs/refugee_center/surface_refugees/NPC_Uyen_Tran.json b/data/json/npcs/refugee_center/surface_refugees/NPC_Uyen_Tran.json index eea127f4724da..f08f70908ed05 100644 --- a/data/json/npcs/refugee_center/surface_refugees/NPC_Uyen_Tran.json +++ b/data/json/npcs/refugee_center/surface_refugees/NPC_Uyen_Tran.json @@ -293,7 +293,7 @@ "effect": [ { "u_spawn_item": "FMCNote", "count": 8 }, { "u_add_var": "mission_flag_Uyen_Mission1", "value": "yes" }, - { "math": [ "u_counter_refugee_center_refugee_happiness", "++" ] } + { "math": [ "u_counter_refugee_center_refugee_happiness++" ] } ] } }, @@ -325,7 +325,7 @@ "effect": [ { "u_spawn_item": "FMCNote", "count": 7 }, { "u_add_var": "mission_flag_Uyen_Mission2", "value": "yes" }, - { "math": [ "u_counter_refugee_center_refugee_happiness", "++" ] } + { "math": [ "u_counter_refugee_center_refugee_happiness++" ] } ] } }, diff --git a/data/json/npcs/refugee_center/surface_refugees/shared_dialogue.json b/data/json/npcs/refugee_center/surface_refugees/shared_dialogue.json index 78ec529fb3a6b..4e073acbbad17 100644 --- a/data/json/npcs/refugee_center/surface_refugees/shared_dialogue.json +++ b/data/json/npcs/refugee_center/surface_refugees/shared_dialogue.json @@ -34,7 +34,7 @@ "speaker_effect": { "effect": [ { "npc_add_var": "mission_Boris_mission_1_cleanup_asked", "value": "yes" }, - { "math": [ "u_mission_cleanup_promises_Boris_mission_1", "++" ] } + { "math": [ "u_mission_cleanup_promises_Boris_mission_1++" ] } ] }, "responses": [ diff --git a/data/json/npcs/refugee_center/surface_staff/NPC_free_merchant_teamster.json b/data/json/npcs/refugee_center/surface_staff/NPC_free_merchant_teamster.json index 5f52cb57f3a60..32b426f9f56d8 100644 --- a/data/json/npcs/refugee_center/surface_staff/NPC_free_merchant_teamster.json +++ b/data/json/npcs/refugee_center/surface_staff/NPC_free_merchant_teamster.json @@ -292,7 +292,7 @@ "speaker_effect": { "effect": [ { "npc_add_var": "mission_Boris_mission_1_cleanup_asked", "value": "yes" }, - { "math": [ "u_mission_cleanup_promises_Boris_mission_1", "++" ] } + { "math": [ "u_mission_cleanup_promises_Boris_mission_1++" ] } ] }, "responses": [ diff --git a/data/json/npcs/refugee_center/surface_staff/Smokes/free_merchant_shopkeep_missions.json b/data/json/npcs/refugee_center/surface_staff/Smokes/free_merchant_shopkeep_missions.json index eeff4735cace2..9f1be85582a29 100644 --- a/data/json/npcs/refugee_center/surface_staff/Smokes/free_merchant_shopkeep_missions.json +++ b/data/json/npcs/refugee_center/surface_staff/Smokes/free_merchant_shopkeep_missions.json @@ -342,7 +342,7 @@ "text": "[5 merch] Five merch for someone sounds fair to me.", "condition": { "u_has_items": { "item": "FMCNote", "count": 5 } }, "effect": [ - { "math": [ "u_mission_cleanup_promises_Boris_mission_1", "++" ] }, + { "math": [ "u_mission_cleanup_promises_Boris_mission_1++" ] }, { "npc_add_var": "mission_Boris_mission_1_cleanup_asked", "value": "yes" }, { "u_consume_item": "FMCNote", "count": 5, "popup": true } ], diff --git a/data/json/npcs/robofac/NPC_Cranberry_Foster.json b/data/json/npcs/robofac/NPC_Cranberry_Foster.json index fdb5ab1853fa2..3cc9e0970b017 100644 --- a/data/json/npcs/robofac/NPC_Cranberry_Foster.json +++ b/data/json/npcs/robofac/NPC_Cranberry_Foster.json @@ -697,8 +697,8 @@ "effect": [ { "u_consume_item": "gold_small", "count": 200 }, { "u_spawn_item": "RobofacCoin", "count": 8 }, - { "math": [ "n_npc_trust()", "++" ] }, - { "math": [ "n_npc_value()", "++" ] } + { "math": [ "n_npc_trust()++" ] }, + { "math": [ "n_npc_value()++" ] } ], "topic": "TALK_ROBOFAC_MERC_1_GOLD_MISSION_TRADE" }, @@ -768,7 +768,7 @@ "end": { "effect": [ "stop_following", - { "math": [ "u_favor_owed_to_u_robofac_merc_1_favor", "++" ] }, + { "math": [ "u_favor_owed_to_u_robofac_merc_1_favor++" ] }, { "npc_lose_var": "general_robofac_merc_1_temporal_follower" }, { "u_add_var": "general_robofac_merc_1_helped_with_missions", "value": "yes" }, { "math": [ "n_npc_trust()", "+=", "2" ] }, diff --git a/data/json/npcs/robofac/robofac_ancilla_npcs/NPC_ANCILLA_BARKEEP.json b/data/json/npcs/robofac/robofac_ancilla_npcs/NPC_ANCILLA_BARKEEP.json index da6058374ff81..8a21f0a5c33b6 100644 --- a/data/json/npcs/robofac/robofac_ancilla_npcs/NPC_ANCILLA_BARKEEP.json +++ b/data/json/npcs/robofac/robofac_ancilla_npcs/NPC_ANCILLA_BARKEEP.json @@ -168,7 +168,7 @@ "dynamic_line": "Oh yes of course, think this should be all, well that's all there is anyhow.", "speaker_effect": { "effect": [ - { "math": [ "u_counter_BEM_BEM_human_sample_reward_owed", "--" ] }, + { "math": [ "u_counter_BEM_BEM_human_sample_reward_owed--" ] }, { "u_add_faction_trust": 1 }, { "u_spawn_item": "RobofacCoin", "count": 2 } ] diff --git a/data/json/npcs/robofac/robofac_intercom/robofac_intercom_missions.json b/data/json/npcs/robofac/robofac_intercom/robofac_intercom_missions.json index 29147a9e1e25f..761a861cbc6a4 100644 --- a/data/json/npcs/robofac/robofac_intercom/robofac_intercom_missions.json +++ b/data/json/npcs/robofac/robofac_intercom/robofac_intercom_missions.json @@ -246,7 +246,7 @@ "monster": { "M": { "monster": "mon_robofac_prototype" } } } }, - "end": { "effect": { "math": [ "u_hub01_completed_missions", "++" ] } }, + "end": { "effect": { "math": [ "u_hub01_completed_missions++" ] } }, "origins": [ "ORIGIN_SECONDARY" ], "has_generic_rewards": false, "dialogue": { @@ -367,7 +367,7 @@ "effect": [ { "u_spawn_item": "RobofacCoin", "count": 4 }, { "u_add_var": "dialogue_intercom_completed_robofac_intercom_2", "value": "yes" }, - { "math": [ "u_hub01_completed_missions", "++" ] } + { "math": [ "u_hub01_completed_missions++" ] } ] }, "origins": [ "ORIGIN_SECONDARY" ], @@ -464,7 +464,7 @@ "effect": [ { "u_spawn_item": "RobofacCoin", "count": 8 }, { "u_add_var": "dialogue_intercom_completed_robofac_intercom_3", "value": "yes" }, - { "math": [ "u_hub01_completed_missions", "++" ] } + { "math": [ "u_hub01_completed_missions++" ] } ] }, "origins": [ "ORIGIN_SECONDARY" ], @@ -708,7 +708,7 @@ "end": { "effect": [ { "u_add_var": "dialogue_intercom_completed_robofac_intercom_robot_sm_1", "value": "yes" }, - { "math": [ "u_hub01_completed_missions", "++" ] } + { "math": [ "u_hub01_completed_missions++" ] } ] }, "fail": { "effect": [ { "u_add_var": "dialogue_intercom_completed_robofac_intercom_robot_sm_1", "value": "no" } ] }, @@ -819,7 +819,7 @@ "end": { "effect": [ { "u_add_var": "dialogue_intercom_completed_robofac_intercom_portal_sm_1", "value": "yes" }, - { "math": [ "u_hub01_completed_missions", "++" ] } + { "math": [ "u_hub01_completed_missions++" ] } ] }, "origins": [ "ORIGIN_SECONDARY" ], @@ -919,7 +919,7 @@ "effect": [ { "u_spawn_item": "RobofacCoin", "count": 5 }, { "u_add_var": "dialogue_intercom_completed_robofac_intercom_lixa_sm_1", "value": "yes" }, - { "math": [ "u_hub01_completed_missions", "++" ] } + { "math": [ "u_hub01_completed_missions++" ] } ] }, "origins": [ "ORIGIN_SECONDARY" ], diff --git a/data/json/npcs/robofac/robofac_intercom/robofac_intercom_trades.json b/data/json/npcs/robofac/robofac_intercom/robofac_intercom_trades.json index 6654ddb83529a..304ee0f28cb0c 100644 --- a/data/json/npcs/robofac/robofac_intercom/robofac_intercom_trades.json +++ b/data/json/npcs/robofac/robofac_intercom/robofac_intercom_trades.json @@ -58,7 +58,7 @@ "condition": { "u_has_items": { "item": "nre_anomaly_printout_data", "count": 1 } }, "effect": [ { "u_consume_item": "nre_anomaly_printout_data", "count": 1, "popup": true }, - { "math": [ "u_portal_storm_recordings_sold", "++" ] }, + { "math": [ "u_portal_storm_recordings_sold++" ] }, { "u_spawn_item": "RobofacCoin", "count": 10 } ], "topic": "TALK_ROBOFAC_INTERCOM_SELL_PORTAL_STORM_DATA_Large" @@ -68,7 +68,7 @@ "condition": { "u_has_items": { "item": "large_printout_portal_storm_data", "count": 1 } }, "effect": [ { "u_consume_item": "large_printout_portal_storm_data", "count": 1, "popup": true }, - { "math": [ "u_portal_storm_recordings_sold", "++" ] }, + { "math": [ "u_portal_storm_recordings_sold++" ] }, { "u_spawn_item": "RobofacCoin", "count": 18 } ], "topic": "TALK_ROBOFAC_INTERCOM_SELL_PORTAL_STORM_DATA_Large" @@ -83,8 +83,8 @@ }, "effect": [ { "u_consume_item": "medium_printout_portal_storm_data", "count": 1, "popup": true }, - { "math": [ "portal_storm_medium_data_sold", "++" ] }, - { "math": [ "u_portal_storm_recordings_sold", "++" ] }, + { "math": [ "portal_storm_medium_data_sold++" ] }, + { "math": [ "u_portal_storm_recordings_sold++" ] }, { "u_spawn_item": "RobofacCoin", "count": 5 } ], "topic": "TALK_ROBOFAC_INTERCOM_SELL_PORTAL_STORM_DATA_Medium" @@ -100,8 +100,8 @@ }, "effect": [ { "u_consume_item": "small_printout_portal_storm_data", "count": 1, "popup": true }, - { "math": [ "portal_storm_small_data_sold", "++" ] }, - { "math": [ "u_portal_storm_recordings_sold", "++" ] }, + { "math": [ "portal_storm_small_data_sold++" ] }, + { "math": [ "u_portal_storm_recordings_sold++" ] }, { "u_spawn_item": "RobofacCoin", "count": 1 } ], "topic": "TALK_ROBOFAC_INTERCOM_SELL_PORTAL_STORM_DATA_Small" @@ -255,7 +255,7 @@ "condition": { "u_has_items": { "item": "broken_yrax_trifacet", "count": 1 } }, "effect": [ { "u_consume_item": "broken_yrax_trifacet", "count": 1, "popup": true }, - { "math": [ "u_broken_yrax_trifacet_sold", "++" ] }, + { "math": [ "u_broken_yrax_trifacet_sold++" ] }, { "u_spawn_item": "RobofacCoin", "count": 1 } ], "topic": "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_YRAX_TRIFACET" @@ -265,7 +265,7 @@ "condition": { "and": [ { "u_has_items": { "item": "broken_yrax_triakis", "count": 1 } } ] }, "effect": [ { "u_consume_item": "broken_yrax_triakis", "count": 1, "popup": true }, - { "math": [ "u_broken_yrax_triakis_sold", "++" ] }, + { "math": [ "u_broken_yrax_triakis_sold++" ] }, { "u_spend_cash": -1000 } ], "topic": "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_YRAX_TRIAKIS" @@ -275,7 +275,7 @@ "condition": { "and": [ { "u_has_items": { "item": "broken_golden_monolith", "count": 1 } } ] }, "effect": [ { "u_consume_item": "broken_golden_monolith", "count": 1, "popup": true }, - { "math": [ "u_broken_golden_monolith_sold", "++" ] }, + { "math": [ "u_broken_golden_monolith_sold++" ] }, { "u_spawn_item": "RobofacCoin", "count": 7 } ], "topic": "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_GOLDEN_MONOLITH" @@ -285,7 +285,7 @@ "condition": { "and": [ { "u_has_items": { "item": "broken_yrax_delta", "count": 1 } } ] }, "effect": [ { "u_consume_item": "broken_yrax_delta", "count": 1, "popup": true }, - { "math": [ "u_broken_yrax_delta_sold", "++" ] }, + { "math": [ "u_broken_yrax_delta_sold++" ] }, { "u_spend_cash": -200 } ], "topic": "TALK_ROBOFAC_INTERCOM_BROKEN_YRAX_DELTA" @@ -295,7 +295,7 @@ "condition": { "u_has_items": { "item": "broken_yrax_quadraphract_leg", "count": 1 } }, "effect": [ { "u_consume_item": "broken_yrax_quadraphract_leg", "count": 1, "popup": true }, - { "math": [ "u_broken_yrax_quadraphract_leg_sold", "++" ] }, + { "math": [ "u_broken_yrax_quadraphract_leg_sold++" ] }, { "u_spawn_item": "RobofacCoin", "count": 5 } ], "topic": "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_YRAX_QUADRAPHRACT_LEG" @@ -305,7 +305,7 @@ "condition": { "u_has_items": { "item": "broken_yrax_quadraphract", "count": 1 } }, "effect": [ { "u_consume_item": "broken_yrax_quadraphract", "count": 1, "popup": true }, - { "math": [ "u_broken_yrax_quadraphract_sold", "++" ] }, + { "math": [ "u_broken_yrax_quadraphract_sold++" ] }, { "u_spawn_item": "RobofacCoin", "count": 25 } ], "topic": "TALK_ROBOFAC_INTERCOM_SELL_BROKEN_YRAX_QUADRAPHRACT" @@ -315,7 +315,7 @@ "condition": { "u_has_items": { "item": "bot_yrax_trifacet", "count": 1 } }, "effect": [ { "u_consume_item": "bot_yrax_trifacet", "count": 1, "popup": true }, - { "math": [ "u_bot_yrax_trifacet_sold", "++" ] }, + { "math": [ "u_bot_yrax_trifacet_sold++" ] }, { "u_spawn_item": "RobofacCoin", "count": 2 } ], "topic": "TALK_ROBOFAC_INTERCOM_SELL_BOT_YRAX_TRIFACET" @@ -325,7 +325,7 @@ "condition": { "u_has_items": { "item": "bot_yrax_triakis", "count": 1 } }, "effect": [ { "u_consume_item": "bot_yrax_triakis", "count": 1, "popup": true }, - { "math": [ "u_bot_yrax_triakis_sold", "++" ] }, + { "math": [ "u_bot_yrax_triakis_sold++" ] }, { "u_spawn_item": "RobofacCoin", "count": 1 } ], "topic": "TALK_ROBOFAC_INTERCOM_SELL_BOT_YRAX_TRIAKIS" @@ -335,7 +335,7 @@ "condition": { "u_has_items": { "item": "bot_golden_monolith", "count": 1 } }, "effect": [ { "u_consume_item": "bot_golden_monolith", "count": 1, "popup": true }, - { "math": [ "u_bot_golden_monolith_sold", "++" ] }, + { "math": [ "u_bot_golden_monolith_sold++" ] }, { "u_spawn_item": "RobofacCoin", "count": 16 } ], "topic": "TALK_ROBOFAC_INTERCOM_SELL_BOT_GOLDEN_MONOLITH" @@ -345,7 +345,7 @@ "condition": { "u_has_items": { "item": "bot_yrax_delta", "count": 1 } }, "effect": [ { "u_consume_item": "bot_yrax_delta", "count": 1, "popup": true }, - { "math": [ "u_bot_yrax_delta_sold", "++" ] }, + { "math": [ "u_bot_yrax_delta_sold++" ] }, { "u_spawn_item": "RobofacCoin", "count": 1 } ], "topic": "TALK_ROBOFAC_INTERCOM_SELL_BOT_YRAX_DELTA" diff --git a/data/json/npcs/tacoma_ranch/Nunez/Arrival_code.json b/data/json/npcs/tacoma_ranch/Nunez/Arrival_code.json index ec07e9e4ef03f..88710ab29f262 100644 --- a/data/json/npcs/tacoma_ranch/Nunez/Arrival_code.json +++ b/data/json/npcs/tacoma_ranch/Nunez/Arrival_code.json @@ -3,7 +3,7 @@ "id": "EOC_Nunez_Travel_To_Tacoma", "type": "effect_on_condition", "effect": [ - { "math": [ "u_counter_refugee_center_refugee_happiness", "++" ] }, + { "math": [ "u_counter_refugee_center_refugee_happiness++" ] }, { "mapgen_update": "tacoma_nunez_trailer_arrive", "om_terrain": "ranch_camp_55", diff --git a/data/json/obsoletion_and_migration_0.I/migration_items.json b/data/json/obsoletion_and_migration_0.I/migration_items.json index f1cf3b8b5a81d..0007ca30afe0f 100644 --- a/data/json/obsoletion_and_migration_0.I/migration_items.json +++ b/data/json/obsoletion_and_migration_0.I/migration_items.json @@ -4,6 +4,36 @@ "type": "MIGRATION", "replace": "combat_exoskeleton_light_salvaged" }, + { + "type": "MIGRATION", + "id": "dinosuit", + "replace": "fursuit", + "variant": "dinosuit" + }, + { + "type": "MIGRATION", + "id": "wolfsuit", + "replace": "fursuit", + "variant": "wolfsuit" + }, + { + "type": "MIGRATION", + "id": "felinesuit", + "replace": "fursuit", + "variant": "felinesuit" + }, + { + "type": "MIGRATION", + "id": "dragonsuit", + "replace": "fursuit", + "variant": "dragonsuit" + }, + { + "type": "MIGRATION", + "id": "sharksuit", + "replace": "fursuit", + "variant": "sharksuit" + }, { "id": "depowered_helmet", "type": "MIGRATION", diff --git a/data/json/obsoletion_and_migration_0.I/obsolete_effect.json b/data/json/obsoletion_and_migration_0.I/obsolete_effect.json index 6d917921ac7cb..a013e50069aed 100644 --- a/data/json/obsoletion_and_migration_0.I/obsolete_effect.json +++ b/data/json/obsoletion_and_migration_0.I/obsolete_effect.json @@ -121,5 +121,39 @@ "type": "effect_type", "id": "lumbermill_waiting_for_wood_beam", "//": "Applied as a timer while waiting for wood beams to refresh from the lumbermill shop. If you're seeing this, it's a bug." + }, + { + "id": "star_vampire_blood_drink", + "type": "effect_type", + "name": [ "Exsanguination" ], + "desc": [ "The monster is greedily drinking your blood!" ], + "rating": "bad", + "resist_traits": [ "BLEED_IMMUNE" ], + "show_in_info": true, + "max_intensity": 2, + "show_intensity": false, + "int_decay_step": -2, + "int_decay_tick": 1, + "vitamins": [ + { "vitamin": "blood", "rate": [ [ -250, -650 ] ], "tick": [ "1 s" ] }, + { "vitamin": "redcells", "rate": [ [ -250, -650 ] ], "tick": [ "1 s" ] } + ] + }, + { + "id": "star_vampire_blood_drink", + "type": "effect_type", + "name": [ "Hemorrhage" ], + "desc": [ "The monster is sucking up your blood!" ], + "rating": "bad", + "resist_traits": [ "BLEED_IMMUNE" ], + "show_in_info": true, + "max_intensity": 2, + "show_intensity": false, + "int_decay_step": -2, + "int_decay_tick": 1, + "vitamins": [ + { "vitamin": "blood", "rate": [ [ -125, -325 ] ], "tick": [ "1 s" ] }, + { "vitamin": "redcells", "rate": [ [ -125, -325 ] ], "tick": [ "1 s" ] } + ] } ] diff --git a/data/json/overmap/multitile_city_buildings.json b/data/json/overmap/multitile_city_buildings.json index 122ece5b3a1fe..d93c790b847db 100644 --- a/data/json/overmap/multitile_city_buildings.json +++ b/data/json/overmap/multitile_city_buildings.json @@ -4749,7 +4749,8 @@ { "point": [ 0, 0, 0 ], "overmap": "pawn_pf_north" }, { "point": [ 0, 0, -1 ], "overmap": "pawn_pf_under_north" }, { "point": [ 0, 0, 1 ], "overmap": "pawn_pf_roof_north" } - ] + ], + "flags": [ "GLOBALLY_UNIQUE" ] }, { "type": "city_building", diff --git a/data/json/professions.json b/data/json/professions.json index 6c29972f2ce22..39a29e605b0c2 100644 --- a/data/json/professions.json +++ b/data/json/professions.json @@ -1703,7 +1703,7 @@ { "item": "pliers" }, { "item": "goggles_welding", "custom-flags": [ "no_auto_equip" ] }, { "item": "jack" }, - { "item": "tinyweldtank", "charges": 60, "container-item": "oxy_torch" } + { "item": "smallweldtank", "charges": 60, "container-item": "oxy_torch" } ] }, "male": { "entries": [ { "item": "boxer_shorts" } ] }, diff --git a/data/json/recipes/ammo/weldgas.json b/data/json/recipes/ammo/weldgas.json index 1303a4c836719..ece916b8c3d7c 100644 --- a/data/json/recipes/ammo/weldgas.json +++ b/data/json/recipes/ammo/weldgas.json @@ -40,10 +40,23 @@ "subcategory": "CSC_OTHER_OTHER", "skill_used": "fabrication", "difficulty": 2, + "time": "10 m", + "book_learn": [ [ "welding_book", 2 ] ], + "qualities": [ { "id": "PRESSURIZATION", "level": 1 } ], + "components": [ [ [ "tinyweldtank", 1 ] ], [ [ "oxyacetylene", 30 ] ] ] + }, + { + "result": "smallweldtank", + "type": "recipe", + "activity_level": "LIGHT_EXERCISE", + "category": "CC_OTHER", + "subcategory": "CSC_OTHER_OTHER", + "skill_used": "fabrication", + "difficulty": 2, "time": "20 m", "book_learn": [ [ "welding_book", 2 ] ], "qualities": [ { "id": "PRESSURIZATION", "level": 1 } ], - "components": [ [ [ "tinyweldtank", 1 ] ], [ [ "oxyacetylene", 60 ] ] ] + "components": [ [ [ "smallweldtank", 1 ] ], [ [ "oxyacetylene", 60 ] ] ] }, { "result": "weldtank", diff --git a/data/json/requirements/cooking_components.json b/data/json/requirements/cooking_components.json index 223530dba8a0c..60fc11905cc86 100644 --- a/data/json/requirements/cooking_components.json +++ b/data/json/requirements/cooking_components.json @@ -210,6 +210,7 @@ [ "egg_pbass", 1 ], [ "egg_perch", 1 ], [ "egg_walleye", 1 ], + [ "egg_warmouth", 1 ], [ "egg_sunfish", 1 ], [ "egg_pumpkinseed", 1 ], [ "egg_bluegill", 1 ], diff --git a/data/json/snippets/schizophrenia.json b/data/json/snippets/schizophrenia.json index 725d225574fb8..b793afb18ca54 100644 --- a/data/json/snippets/schizophrenia.json +++ b/data/json/snippets/schizophrenia.json @@ -67,7 +67,7 @@ }, { "type": "snippet", - "category": "schizo_weapon_talk_monster", + "category": "", "text": [ "Hey, let's go kill that %1$s!", "Did you see that %1$s!? Be careful.", @@ -113,7 +113,7 @@ }, { "type": "snippet", - "category": "schizo_weapon_talk_bleeding", + "category": "", "text": [ "Hey, you're hurt.", "Your wound looks pretty bad.", @@ -158,7 +158,7 @@ }, { "type": "snippet", - "category": "schizo_weapon_talk_damaged", + "category": "", "text": [ "Hey, fix me up will ya?", "I need healing!", @@ -202,7 +202,7 @@ }, { "type": "snippet", - "category": "schizo_weapon_talk_misc", + "category": "", "text": [ "Let me kill something already!", "I'm bored.", diff --git a/data/json/starting_missions.json b/data/json/starting_missions.json index e1cd93fe2b41b..8133b2ee27b6a 100644 --- a/data/json/starting_missions.json +++ b/data/json/starting_missions.json @@ -472,13 +472,9 @@ { "u_has_item": "jumpsuit_skeleton" }, { "u_has_item": "mummy_jumpsuit" }, { "u_has_item": "bodysuit_lycra" }, - { "u_has_item": "wolfsuit" }, - { "u_has_item": "dragonsuit" }, - { "u_has_item": "felinesuit" }, - { "u_has_item": "dinosuit" }, + { "u_has_item": "fursuit" }, { "u_has_item": "bondage_suit" }, { "u_has_item": "clown_suit" }, - { "u_has_item": "sharksuit" }, { "u_has_item": "jumpsuit_skeleton_zipped" }, { "u_has_item": "maid_dress" }, { "u_has_item": "mummy_dress" }, diff --git a/data/json/techniques.json b/data/json/techniques.json index 5b9e498f2466b..d181b1bb9720b 100644 --- a/data/json/techniques.json +++ b/data/json/techniques.json @@ -328,7 +328,7 @@ "chance": 100, "duration": 400, "on_damage": true, - "message": "The weapon of %s has been forced out ot their hands!" + "message": "The weapon of %s has been forced out of their hands!" } ], "attack_vectors": [ "vector_null" ] @@ -473,7 +473,7 @@ "chance": 100, "duration": 400, "on_damage": true, - "message": "The weapon of %s has been forced out ot their hands!" + "message": "The weapon of %s has been forced out of their hands!" } ], "//condition": "Humanoids of similar size and no flying", @@ -525,7 +525,7 @@ "chance": 100, "duration": 400, "on_damage": true, - "message": "The weapon of %s has been forced out ot their hands!" + "message": "The weapon of %s has been forced out of their hands!" } ], "//condition": "Humanoids of similar size and no flying", diff --git a/data/mods/Aftershock/effects_on_condition.json b/data/mods/Aftershock/effects_on_condition.json index b758c8f4294e2..d6572d643574d 100644 --- a/data/mods/Aftershock/effects_on_condition.json +++ b/data/mods/Aftershock/effects_on_condition.json @@ -38,7 +38,7 @@ } ] }, - { "math": [ "u_flag_motion_sensor_afs_motion_sensor_ping", "++" ] }, + { "math": [ "u_flag_motion_sensor_afs_motion_sensor_ping++" ] }, { "run_eocs": "afs_motion_sensor_eoc_end_ping", "time_in_future": "2 seconds" } ] }, diff --git a/data/mods/Aftershock/items/armor/energy_shield.json b/data/mods/Aftershock/items/armor/energy_shield.json index c2f6109992102..c61ade6bed45b 100644 --- a/data/mods/Aftershock/items/armor/energy_shield.json +++ b/data/mods/Aftershock/items/armor/energy_shield.json @@ -211,7 +211,7 @@ { "if": { "math": [ "u_proceed_shield", "==", "1" ] }, "then": [ - { "math": [ "n_shield_turn", "++" ] }, + { "math": [ "n_shield_turn++" ] }, { "if": { "and": [ { "math": [ "n_SHIELD_REGEN", "!=", "0" ] }, { "math": [ "n_shield_turn/n_SHIELD_REGEN_RATE", ">", "1" ] } ] diff --git a/data/mods/Aftershock/player/bionic_eocs.json b/data/mods/Aftershock/player/bionic_eocs.json index 11064d94ad63f..ad28e8894ff08 100644 --- a/data/mods/Aftershock/player/bionic_eocs.json +++ b/data/mods/Aftershock/player/bionic_eocs.json @@ -84,7 +84,7 @@ "type": "effect_on_condition", "id": "afs_eoc_chemhealing_pkill", "condition": { "one_in_chance": 40 }, - "effect": [ { "math": [ "u_pain()", "--" ] } ] + "effect": [ { "math": [ "u_pain()--" ] } ] }, { "type": "effect_on_condition", diff --git a/data/mods/Aftershock/spells/psionics/electrokinesis_concentration_eocs.json b/data/mods/Aftershock/spells/psionics/electrokinesis_concentration_eocs.json index 27cb44fc35a8c..6534423d3be1c 100644 --- a/data/mods/Aftershock/spells/psionics/electrokinesis_concentration_eocs.json +++ b/data/mods/Aftershock/spells/psionics/electrokinesis_concentration_eocs.json @@ -235,7 +235,7 @@ { "id": "EOC_AFS_ELECTROKIN_PERSONAL_BATTERY_INV_SCANNER_COUNTER", "condition": { "math": [ "n_val('power') < n_val('power_max')" ] }, - "effect": [ { "math": [ "u_afs_electrokin_personal_battery_count", "++" ] } ] + "effect": [ { "math": [ "u_afs_electrokin_personal_battery_count++" ] } ] } ] }, diff --git a/data/mods/BombasticPerks/corefiles/core_eocs.json b/data/mods/BombasticPerks/corefiles/core_eocs.json index 39c06b4567cf1..fd114289c5e95 100644 --- a/data/mods/BombasticPerks/corefiles/core_eocs.json +++ b/data/mods/BombasticPerks/corefiles/core_eocs.json @@ -74,6 +74,6 @@ { "type": "effect_on_condition", "id": "EOC_give_perk_point", - "effect": [ { "math": [ "u_num_perks", "++" ] } ] + "effect": [ { "math": [ "u_num_perks++" ] } ] } ] diff --git a/data/mods/BombasticPerks/perkmenu.json b/data/mods/BombasticPerks/perkmenu.json index 67bfde2d7d06d..a3b5700e9cbd3 100644 --- a/data/mods/BombasticPerks/perkmenu.json +++ b/data/mods/BombasticPerks/perkmenu.json @@ -2015,7 +2015,7 @@ "failure_topic": "TALK_PERK_MENU_FAIL", "effect": [ { "u_mutate_towards": { "context_val": "trait_id" }, "category": "ANY", "use_vitamins": false }, - { "math": [ "u_num_perks", "--" ] } + { "math": [ "u_num_perks--" ] } ] }, { diff --git a/data/mods/Defense_Mode/dialogue/menu_screen.json b/data/mods/Defense_Mode/dialogue/menu_screen.json index 44fd3a6e5a354..bc8f56535766f 100644 --- a/data/mods/Defense_Mode/dialogue/menu_screen.json +++ b/data/mods/Defense_Mode/dialogue/menu_screen.json @@ -474,7 +474,7 @@ "responses": [ { "text": "Increase by 1", - "effect": { "math": [ "diffulty_modifier", "++" ] }, + "effect": { "math": [ "diffulty_modifier++" ] }, "topic": "TALK_DEFENSE_MODE_CUSTOM_DIFFICULTY_MENU" }, { @@ -484,7 +484,7 @@ }, { "text": "Decrease by 1", - "effect": { "math": [ "diffulty_modifier", "--" ] }, + "effect": { "math": [ "diffulty_modifier--" ] }, "topic": "TALK_DEFENSE_MODE_CUSTOM_DIFFICULTY_MENU" }, { diff --git a/data/mods/Defense_Mode/effects_on_condition/backend_eocs.json b/data/mods/Defense_Mode/effects_on_condition/backend_eocs.json index c069c966142ef..adec2409dd0aa 100644 --- a/data/mods/Defense_Mode/effects_on_condition/backend_eocs.json +++ b/data/mods/Defense_Mode/effects_on_condition/backend_eocs.json @@ -90,7 +90,7 @@ { "math": [ "u_pain() = 0" ] }, { "math": [ "u_val('sleepiness') = 0" ] }, { "math": [ "u_val('stamina') = 8500" ] }, - { "math": [ "revivication_counter", "--" ] }, + { "math": [ "revivication_counter--" ] }, { "u_cast_spell": { "id": "remove_opponents" } }, { "u_message": "For an instant that is also an eternity, you exist only in an empty void. Then you feel something vast, alien, and merciless reach through a preexisting connection to give you just enough energy to exist. Its motives for doing so are not likely to be benign.", diff --git a/data/mods/Defense_Mode/effects_on_condition/wave_eocs.json b/data/mods/Defense_Mode/effects_on_condition/wave_eocs.json index b2228a8096d46..294c017181ae3 100644 --- a/data/mods/Defense_Mode/effects_on_condition/wave_eocs.json +++ b/data/mods/Defense_Mode/effects_on_condition/wave_eocs.json @@ -6,7 +6,7 @@ "global": true, "effect": [ { "u_teleport": { "global_val": "your_spawnpoint" } }, - { "math": [ "wave_number", "++" ] }, + { "math": [ "wave_number++" ] }, { "u_message": "Welcome to wave !", "type": "bad", "popup": false }, { "run_eocs": "DEFENSE_MODE_WAVE_SPECIAL_DECIDER" } ] diff --git a/data/mods/Defense_Mode/mod_interactions/bombastic_perks/perks.json b/data/mods/Defense_Mode/mod_interactions/bombastic_perks/perks.json index e15f0bc14f625..dc719001c6ebe 100644 --- a/data/mods/Defense_Mode/mod_interactions/bombastic_perks/perks.json +++ b/data/mods/Defense_Mode/mod_interactions/bombastic_perks/perks.json @@ -69,7 +69,7 @@ "points": 0, "description": "You're like a cat, and it always seemed to you like you've had nine lives. When things get rough, by pure luck or divine intervention, you can get out of it.", "category": [ "perk" ], - "processed_eocs": [ { "id": "extra_life_addup", "effect": { "math": [ "revivication_counter", "++" ] } } ] + "processed_eocs": [ { "id": "extra_life_addup", "effect": { "math": [ "revivication_counter++" ] } } ] }, { "type": "mutation", diff --git a/data/mods/DinoMod/monsters/dinosaur_CBM.json b/data/mods/DinoMod/monsters/dinosaur_CBM.json index d30c396928ca6..47e45e33dab0d 100644 --- a/data/mods/DinoMod/monsters/dinosaur_CBM.json +++ b/data/mods/DinoMod/monsters/dinosaur_CBM.json @@ -2,7 +2,7 @@ { "type": "MONSTER", "id": "mon_spinosaurus_bio_op", - "name": { "str_sp": "spinosaurus bio-operator" }, + "name": { "str": "spinosaurus bio-operator" }, "copy-from": "mon_spinosaurus", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, @@ -56,7 +56,7 @@ { "type": "MONSTER", "id": "mon_tyrannosaurus_bio_op", - "name": { "str_sp": "tyrannosaurus bio-operator" }, + "name": { "str": "tyrannosaurus bio-operator" }, "copy-from": "mon_tyrannosaurus", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, @@ -87,7 +87,7 @@ { "type": "MONSTER", "id": "mon_compsognathus_bio_op", - "name": { "str_sp": "compsognathus bio-operator" }, + "name": { "str": "compsognathus bio-operator" }, "copy-from": "mon_compsognathus", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, @@ -136,7 +136,7 @@ { "type": "MONSTER", "id": "mon_gallimimus_bio_op", - "name": { "str_sp": "gallimimus bio-operator" }, + "name": { "str": "gallimimus bio-operator" }, "copy-from": "mon_gallimimus", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, @@ -211,7 +211,7 @@ { "type": "MONSTER", "id": "mon_albertonykus_bio_op", - "name": { "str_sp": "albertonykus bio-operator" }, + "name": { "str": "albertonykus bio-operator" }, "copy-from": "mon_albertonykus", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, @@ -236,7 +236,7 @@ { "type": "MONSTER", "id": "mon_saurornitholestes_bio_op", - "name": { "str_sp": "saurornitholestes bio-operator" }, + "name": { "str": "saurornitholestes bio-operator" }, "copy-from": "mon_saurornitholestes", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, @@ -263,7 +263,7 @@ { "type": "MONSTER", "id": "mon_velociraptor_bio_op", - "name": { "str_sp": "velociraptor bio-operator" }, + "name": { "str": "velociraptor bio-operator" }, "copy-from": "mon_velociraptor", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, @@ -290,7 +290,7 @@ { "type": "MONSTER", "id": "mon_deino_bio_op", - "name": { "str_sp": "deinonychus bio-operator" }, + "name": { "str": "deinonychus bio-operator" }, "copy-from": "mon_deinonychus", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, @@ -318,7 +318,7 @@ { "type": "MONSTER", "id": "mon_dromaeosaurus_bio_op", - "name": { "str_sp": "dromaeosaurus bio-operator" }, + "name": { "str": "dromaeosaurus bio-operator" }, "copy-from": "mon_dromaeosaurus", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, @@ -345,7 +345,7 @@ { "type": "MONSTER", "id": "mon_stenonychosaurus_bio_op", - "name": { "str_sp": "stenonychosaurus bio-operator" }, + "name": { "str": "stenonychosaurus bio-operator" }, "copy-from": "mon_stenonychosaurus", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, @@ -372,7 +372,7 @@ { "type": "MONSTER", "id": "mon_eoraptor_bio_op", - "name": { "str_sp": "eoraptor bio-operator" }, + "name": { "str": "eoraptor bio-operator" }, "copy-from": "mon_eoraptor", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, @@ -396,7 +396,7 @@ { "type": "MONSTER", "id": "mon_amargasaurus_bio_op", - "name": { "str_sp": "amargasaurus bio-operator" }, + "name": { "str": "amargasaurus bio-operator" }, "copy-from": "mon_amargasaurus", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, @@ -426,7 +426,7 @@ { "type": "MONSTER", "id": "mon_dryosaurus_bio_op", - "name": { "str_sp": "dryosaurus bio-operator" }, + "name": { "str": "dryosaurus bio-operator" }, "copy-from": "mon_dryosaurus", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, @@ -450,7 +450,7 @@ { "type": "MONSTER", "id": "mon_stegoceras_bio_op", - "name": { "str_sp": "stegoceras bio-operator" }, + "name": { "str": "stegoceras bio-operator" }, "copy-from": "mon_stegoceras", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, @@ -474,7 +474,7 @@ { "type": "MONSTER", "id": "mon_pachycephalosaurus_bio_op", - "name": { "str_sp": "pachycephalosaurus bio-operator" }, + "name": { "str": "pachycephalosaurus bio-operator" }, "copy-from": "mon_pachycephalosaurus", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, @@ -499,7 +499,7 @@ { "type": "MONSTER", "id": "mon_aquilops_bio_op", - "name": { "str_sp": "aquilops bio-operator" }, + "name": { "str": "aquilops bio-operator" }, "copy-from": "mon_aquilops", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, @@ -524,7 +524,7 @@ { "type": "MONSTER", "id": "mon_trice_bio_op", - "name": { "str_sp": "triceratops bio-operator" }, + "name": { "str": "triceratops bio-operator" }, "copy-from": "mon_triceratops", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, @@ -549,7 +549,7 @@ { "type": "MONSTER", "id": "mon_nanosaurus_bio_op", - "name": { "str_sp": "nanosaurus bio-operator" }, + "name": { "str": "nanosaurus bio-operator" }, "copy-from": "mon_nanosaurus", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, @@ -573,7 +573,7 @@ { "type": "MONSTER", "id": "mon_oryctodromeus_bio_op", - "name": { "str_sp": "oryctodromeus bio-operator" }, + "name": { "str": "oryctodromeus bio-operator" }, "copy-from": "mon_oryctodromeus", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, @@ -597,7 +597,7 @@ { "type": "MONSTER", "id": "mon_dimorphodon_bio_op", - "name": { "str_sp": "dimorphodon bio-operator" }, + "name": { "str": "dimorphodon bio-operator" }, "copy-from": "mon_dimorphodon", "diff": 5, "proportional": { "hp": 1.2, "speed": 1.15 }, diff --git a/data/mods/DinoMod/monsters/zinosaur_upgrade.json b/data/mods/DinoMod/monsters/zinosaur_upgrade.json index 08bf284fd0f06..e85ae247606b9 100644 --- a/data/mods/DinoMod/monsters/zinosaur_upgrade.json +++ b/data/mods/DinoMod/monsters/zinosaur_upgrade.json @@ -1823,426 +1823,219 @@ "type": "MONSTER", "id": "mon_zilophosaurus_shady", "name": { "str": "shady dilophosaurus zombie" }, - "description": "An uncanny shadow envelops this creature. You can make out the outline of a bipedal dinosaur with sharp teeth and bulges on the head.", - "upgrades": { "half_life": 15, "into": "mon_zilophosaurus_nightstalker" }, - "copy-from": "mon_zallimimus_shady", + "copy-from": "mon_zilophosaurus", "looks_like": "mon_dilophosaurus", - "volume": "400 L", - "weight": "400 kg", - "speed": 75, - "attack_cost": 75, - "melee_skill": 4, - "melee_dice": 2, - "melee_dice_sides": 3, - "melee_damage": [ { "damage_type": "cut", "amount": 2 } ], - "families": [ "prof_gross_anatomy", "prof_intro_biology", "prof_physiology", "prof_wp_zombie" ], - "weakpoint_sets": [ "wps_dinosaur_body" ], - "hp": 120, - "burn_into": "mon_zilophosaurus_scorched", - "fungalize_into": "mon_zilophosaurus_fungus", - "categories": [ "DINOSAUR" ], - "armor": { "bash": 4, "cut": 4, "bullet": 2 } + "upgrades": { "half_life": 15, "into": "mon_zilophosaurus_nightstalker" }, + "description": "An uncanny shadow envelops this creature. You can make out the outline of a bipedal dinosaur with sharp teeth and bulges on the head.", + "color": "light_gray", + "vision_day": 3, + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zeratosaurus_shady", "name": { "str": "shady ceratosaurus zombie" }, - "copy-from": "mon_zilophosaurus_shady", - "description": "An uncanny shadow envelops this creature. You can make out the outline of an enormous, bipedal dinosaur with horns, spikes, and big sharp teeth.", + "copy-from": "mon_zeratosaurus", "upgrades": { "half_life": 15, "into": "mon_zeratosaurus_nightstalker" }, - "volume": "540 L", - "weight": "540 kg", - "speed": 65, - "attack_cost": 65, - "melee_dice_sides": 2, - "hp": 135, - "burn_into": "mon_zeratosaurus_scorched", - "fungalize_into": "mon_zeratosaurus_fungus", - "armor": { "bash": 2, "bullet": 2, "cut": 5 } + "description": "An uncanny shadow envelops this creature. You can make out the outline of an enormous, bipedal dinosaur with horns, spikes, and big sharp teeth.", + "color": "light_gray", + "vision_day": 3, + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zpinosaurus_shady", "name": { "str": "shady spinosaurus zombie" }, - "color": "light_gray", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a huge, bipedal dinosaur with a tattered sail. The head is long and narrow, with a V-shaped snout.", + "copy-from": "mon_zpinosaurus", "upgrades": { "half_life": 15, "into": "mon_zpinosaurus_nightstalker" }, + "description": "An uncanny shadow envelops this creature. You can make out the outline of a huge, bipedal dinosaur with a tattered sail. The head is long and narrow, with a V-shaped snout.", + "color": "light_gray", "vision_day": 3, - "vision_night": 30, - "looks_like": "mon_spinosaurus", - "species": [ "ZOMBIE" ], - "default_faction": "zombie", - "symbol": "Z", - "volume": "1000 L", - "weight": "1000 kg", - "bodytype": "elephant", - "material": [ "flesh" ], - "aggression": 100, - "morale": 100, - "speed": 40, - "attack_cost": 40, - "melee_skill": 4, - "melee_dice": 4, - "melee_dice_sides": 5, - "melee_damage": [ { "damage_type": "cut", "amount": 4 } ], - "families": [ "prof_gross_anatomy", "prof_intro_biology", "prof_physiology", "prof_wp_zombie" ], - "weakpoint_sets": [ "wps_dinosaur_body" ], - "hp": 430, - "special_attacks": [ [ "scratch", 10 ], { "id": "bite_grab", "cooldown": 7 }, { "id": "teeth_zino_max", "cooldown": 5 } ], - "burn_into": "mon_zpinosaurus_scorched", - "fungalize_into": "mon_zpinosaurus_fungus", - "flags": [ - "SEES", - "HEARS", - "POISON", - "STUMBLES", - "BASHES", - "DESTROYS", - "NO_BREATHE", - "REVIVES", - "FILTHY", - "WARM", - "SWIMS", - "NIGHT_INVISIBILITY" - ], - "harvest": "zed_dino_leather", - "dissect": "dissect_dino_large_pred", - "categories": [ "DINOSAUR" ], - "armor": { "bash": 6, "cut": 8 } + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zorvosaurus_shady", "name": { "str": "shady torvosaurus zombie" }, - "color": "light_gray", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a large, bipedal dinosaur with a large head and a tail.", + "copy-from": "mon_zorvosaurus", "upgrades": { "half_life": 15, "into": "mon_zorvosaurus_nightstalker" }, + "description": "An uncanny shadow envelops this creature. You can make out the outline of a large, bipedal dinosaur with a large head and a tail.", + "color": "light_gray", "vision_day": 3, - "vision_night": 30, - "looks_like": "mon_torvosaurus", - "species": [ "ZOMBIE" ], - "default_faction": "zombie", - "symbol": "Z", - "volume": "1000 L", - "weight": "1000 kg", - "bodytype": "ostrich", - "material": [ "flesh" ], - "aggression": 100, - "morale": 100, - "speed": 40, - "attack_cost": 40, - "melee_skill": 4, - "melee_dice": 4, - "melee_dice_sides": 7, - "melee_damage": [ { "damage_type": "cut", "amount": 12 } ], - "families": [ "prof_gross_anatomy", "prof_intro_biology", "prof_physiology", "prof_wp_zombie" ], - "weakpoint_sets": [ "wps_dinosaur_body" ], - "hp": 260, - "special_attacks": [ [ "scratch", 10 ], { "id": "bite_grab", "cooldown": 7 }, { "id": "teeth_zino_mid", "cooldown": 5 } ], - "burn_into": "mon_zorvosaurus_scorched", - "fungalize_into": "mon_zorvosaurus_fungus", - "flags": [ - "SEES", - "HEARS", - "POISON", - "STUMBLES", - "BASHES", - "DESTROYS", - "NO_BREATHE", - "REVIVES", - "FILTHY", - "WARM", - "NIGHT_INVISIBILITY" - ], - "harvest": "zed_dino_leather", - "dissect": "dissect_dino_large_pred", - "categories": [ "DINOSAUR" ], - "armor": { "bash": 4, "cut": 3, "bullet": 2 } + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zallosaurus_shady", "name": { "str": "shady allosaurus zombie" }, - "description": "An uncanny shadow envelops this creature. You can make out the outline of a large, bipedal dinosaur with big, sharp teeth.", - "upgrades": { "half_life": 15, "into": "mon_zallosaurus_nightstalker" }, - "copy-from": "mon_zyrannosaurus_shady", + "copy-from": "mon_zallosaurus", "looks_like": "mon_allosaurus", - "speed": 90, - "attack_cost": 90, - "melee_dice": 2, - "melee_dice_sides": 2, - "melee_damage": [ { "damage_type": "cut", "amount": 2 } ], - "families": [ "prof_gross_anatomy", "prof_intro_biology", "prof_physiology", "prof_wp_zombie" ], - "weakpoint_sets": [ "wps_dinosaur_body" ], - "hp": 190, - "special_attacks": [ [ "scratch", 10 ], { "id": "bite_grab" }, { "id": "teeth_zino_mid", "cooldown": 5 } ], - "burn_into": "mon_zallosaurus_scorched", - "fungalize_into": "mon_zallosaurus_fungus", - "flags": [ "SEES", "HEARS", "POISON", "STUMBLES", "BASHES", "NO_BREATHE", "REVIVES", "FILTHY", "WARM", "NIGHT_INVISIBILITY" ], - "armor": { "bash": 4, "cut": 4, "bullet": 2 } + "upgrades": { "half_life": 15, "into": "mon_zallosaurus_nightstalker" }, + "description": "An uncanny shadow envelops this creature. You can make out the outline of a large, bipedal dinosaur with big, sharp teeth.", + "color": "light_gray", + "vision_day": 3, + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zacrocanthosaurus_shady", "name": { "str": "shady acrocanthosaurus zombie" }, - "copy-from": "mon_zallosaurus_shady", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a large, bipedal dinosaur with big, sharp teeth.", + "copy-from": "mon_zacrocanthosaurus", "upgrades": { "half_life": 15, "into": "mon_zacrocanthosaurus_nightstalker" }, - "speed": 60, - "attack_cost": 60, - "melee_dice": 4, - "melee_dice_sides": 5, - "melee_damage": [ { "damage_type": "cut", "amount": 4 } ], - "hp": 270, - "special_attacks": [ { "id": "bite_grab" }, { "id": "teeth_zino_mid", "cooldown": 10 }, [ "LUNGE", 20 ] ], - "burn_into": "mon_zacrocanthosaurus_scorched", - "fungalize_into": "mon_zacrocanthosaurus_fungus", - "armor": { "cut": 4, "bullet": 2, "bash": 11 } + "description": "An uncanny shadow envelops this creature. You can make out the outline of a large, bipedal dinosaur with big, sharp teeth.", + "color": "light_gray", + "vision_day": 3, + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_ziganotosaurus_shady", "name": { "str": "shady giganotosaurus zombie" }, - "copy-from": "mon_zallosaurus_shady", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a huge, bipedal dinosaur with big, sharp teeth.", + "copy-from": "mon_ziganotosaurus", "upgrades": { "half_life": 15, "into": "mon_ziganotosaurus_nightstalker" }, - "speed": 90, - "attack_cost": 90, - "melee_dice": 4, - "melee_dice_sides": 5, - "melee_damage": [ { "damage_type": "cut", "amount": 4 } ], - "hp": 400, - "special_attacks": [ { "id": "bite_grab" }, { "id": "teeth_zino_mid", "cooldown": 10 }, [ "LUNGE", 20 ] ], - "burn_into": "mon_ziganotosaurus_scorched", - "fungalize_into": "mon_ziganotosaurus_fungus", - "armor": { "cut": 4, "bullet": 2, "bash": 4 } + "description": "An uncanny shadow envelops this creature. You can make out the outline of a huge, bipedal dinosaur with big, sharp teeth.", + "color": "light_gray", + "vision_day": 3, + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_ziats_shady", "name": { "str": "shady siats zombie" }, - "copy-from": "mon_zallosaurus_shady", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a large, bipedal dinosaur with big, sharp teeth.", + "copy-from": "mon_ziats", "upgrades": { "half_life": 15, "into": "mon_ziats_nightstalker" }, - "speed": 60, - "attack_cost": 60, - "hp": 365, - "special_attacks": [ - { "id": "bio_op_takedown", "cooldown": 20 }, - { "id": "ranged_pull", "cooldown": 20 }, - { "id": "grab_drag" }, - { "id": "drag_followup" } - ], - "burn_into": "mon_ziats_scorched", - "fungalize_into": "mon_ziats_fungus", - "categories": [ "DINOSAUR" ] + "description": "An uncanny shadow envelops this creature. You can make out the outline of a large, bipedal dinosaur with big, sharp teeth.", + "color": "light_gray", + "vision_day": 3, + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zryptosaurus_shady", "name": { "str": "shady dryptosaurus zombie" }, - "copy-from": "mon_zappalachiosaurus_shady", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a large, bipedal dinosaur with feathery edges. The head looks big and the claws look long.", + "copy-from": "mon_zryptosaurus", "upgrades": { "half_life": 15, "into": "mon_zryptosaurus_nightstalker" }, - "hp": 200, - "special_attacks": [ - { "id": "teeth_zino_mid", "cooldown": 15 }, - { "id": "bite_grab", "cooldown": 15 }, - { "type": "leap", "cooldown": 20, "max_range": 5, "allow_no_target": true } - ], - "burn_into": "mon_zryptosaurus_scorched", - "fungalize_into": "mon_zryptosaurus_fungus", - "categories": [ "DINOSAUR" ] + "description": "An uncanny shadow envelops this creature. You can make out the outline of a large, bipedal dinosaur with feathery edges. The head looks big and the claws look long.", + "color": "light_gray", + "vision_day": 3, + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zappalachiosaurus_shady", "name": { "str": "shady appalachiosaurus zombie" }, - "copy-from": "mon_zorgosaurus_shady", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a huge, bipedal dinosaur with feathery edges. The head looks big, like it could hold many enormous sharp teeth.", + "copy-from": "mon_zappalachiosaurus", "upgrades": { "half_life": 15, "into": "mon_zappalachiosaurus_nightstalker" }, - "speed": 100, - "melee_damage": [ { "damage_type": "cut", "amount": 14 } ], - "hp": 220, - "special_attacks": [ - { "id": "teeth_zino_mid", "cooldown": 15 }, - { "id": "bite_grab", "cooldown": 15 }, - [ "scratch", 20 ], - [ "LUNGE", 20 ] - ], - "burn_into": "mon_zappalachiosaurus_scorched", - "fungalize_into": "mon_zappalachiosaurus_fungus", - "categories": [ "DINOSAUR" ] + "description": "An uncanny shadow envelops this creature. You can make out the outline of a huge, bipedal dinosaur with feathery edges. The head looks big, like it could hold many enormous sharp teeth.", + "color": "light_gray", + "vision_day": 3, + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zorgosaurus_shady", "name": { "str": "shady gorgosaurus zombie" }, - "copy-from": "mon_zalbertosaurus_shady", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a huge, bipedal dinosaur with feathery edges. The head looks big, like it could hold many enormous sharp teeth.", + "copy-from": "mon_zorgosaurus", "upgrades": { "half_life": 15, "into": "mon_zorgosaurus_nightstalker" }, - "speed": 50, - "attack_cost": 50, - "melee_damage": [ { "damage_type": "cut", "amount": 13 } ], - "hp": 250, - "special_attacks": [ - { "id": "teeth_zino_mid", "cooldown": 10 }, - { "id": "bite_grab", "cooldown": 15 }, - [ "scratch", 20 ], - [ "LUNGE", 15 ] - ], - "burn_into": "mon_zorgosaurus_scorched", - "fungalize_into": "mon_zorgosaurus_fungus", - "categories": [ "DINOSAUR" ] + "description": "An uncanny shadow envelops this creature. You can make out the outline of a huge, bipedal dinosaur with feathery edges. The head looks big, like it could hold many enormous sharp teeth.", + "color": "light_gray", + "vision_day": 3, + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zalbertosaurus_shady", "name": { "str": "shady albertosaurus zombie" }, - "copy-from": "mon_zyrannosaurus_shady", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a huge, bipedal dinosaur with feathery edges. The head looks big, and below are long, grasping claws.", + "copy-from": "mon_zalbertosaurus", "upgrades": { "half_life": 15, "into": "mon_zalbertosaurus_nightstalker" }, - "melee_dice": 3, - "melee_dice_sides": 4, - "melee_damage": [ { "damage_type": "cut", "amount": 14 } ], - "hp": 270, - "special_attacks": [ - { "id": "teeth_zino_mid", "cooldown": 5 }, - { "id": "bite_grab", "cooldown": 7 }, - [ "scratch", 20 ], - [ "LUNGE", 5 ], - { "id": "longswipe", "cooldown": 25 } - ], - "burn_into": "mon_zalbertosaurus_scorched", - "fungalize_into": "mon_zalbertosaurus_fungus", - "categories": [ "DINOSAUR" ], - "armor": { "bash": 5, "cut": 5, "bullet": 3 } + "description": "An uncanny shadow envelops this creature. You can make out the outline of a huge, bipedal dinosaur with feathery edges. The head looks big, and below are long, grasping claws.", + "color": "light_gray", + "vision_day": 3, + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zianzhousaurus_shady", "name": { "str": "shady qianzhousaurus zombie" }, - "copy-from": "mon_zyrannosaurus_shady", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a huge, bipedal dinosaur with feathery edges and a large head.", - "special_attacks": [ [ "scratch", 10 ], { "id": "bite_grab", "cooldown": 7 }, { "id": "teeth_zino_mid", "cooldown": 5 } ], + "copy-from": "mon_zianzhousaurus", "upgrades": { "half_life": 15, "into": "mon_zianzhousaurus_nightstalker" }, - "volume": "550 L", - "weight": "770 kg", - "speed": 60, - "attack_cost": 60, - "melee_dice": 3, - "melee_dice_sides": 4, - "melee_damage": [ { "damage_type": "cut", "amount": 13 } ], - "hp": 160, - "burn_into": "mon_zianzhousaurus_scorched", - "fungalize_into": "mon_zianzhousaurus_fungus", - "categories": [ "DINOSAUR" ], - "armor": { "bash": 5, "cut": 5, "bullet": 3 } + "description": "An uncanny shadow envelops this creature. You can make out the outline of a huge, bipedal dinosaur with feathery edges and a large head.", + "color": "light_gray", + "vision_day": 3, + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zanuqsaurus_shady", "name": { "str_sp": "shady nanuqsaurus zombie" }, - "copy-from": "mon_zyrannosaurus_shady", - "special_attacks": [ [ "scratch", 10 ], { "id": "bite_grab", "cooldown": 7 }, { "id": "teeth_zino_mid", "cooldown": 5 } ], + "copy-from": "mon_zanuqsaurus", "upgrades": { "half_life": 15, "into": "mon_zanuqsaurus_nightstalker" }, - "melee_dice": 4, - "melee_dice_sides": 5, - "melee_damage": [ { "damage_type": "cut", "amount": 4 } ], - "hp": 270, - "burn_into": "mon_zanuqsaurus_scorched", - "fungalize_into": "mon_zanuqsaurus_fungus", - "categories": [ "DINOSAUR" ] + "description": "An uncanny shadow envelops this creature. You can make out the outline of a huge, bipedal dinosaur with feathery edges and a large head.", + "color": "light_gray", + "vision_day": 3, + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zaspletosaurus_shady", "name": { "str_sp": "shady daspletosaurus zombie" }, - "copy-from": "mon_zyrannosaurus_shady", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a huge, bipedal dinosaur with feathery edges and a large head.", + "copy-from": "mon_zaspletosaurus", "upgrades": { "half_life": 15, "into": "mon_zaspletosaurus_nightstalker" }, - "melee_dice": 4, - "melee_dice_sides": 5, - "melee_damage": [ { "damage_type": "cut", "amount": 4 } ], - "hp": 300, - "burn_into": "mon_zaspletosaurus_scorched", - "fungalize_into": "mon_zaspletosaurus_fungus", - "categories": [ "DINOSAUR" ] + "description": "An uncanny shadow envelops this creature. You can make out the outline of a huge, bipedal dinosaur with feathery edges and a large head.", + "color": "light_gray", + "vision_day": 3, + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zyrannosaurus_shady", - "name": { "str": "shady T-Rex zombie" }, - "looks_like": "mon_zyrannosaurus", - "color": "light_gray", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a huge, bipedal dinosaur with feathery edges. The head looks large - lots of big teeth would fit in it.", + "name": { "str": "shady tyrannosaurus zombie" }, + "copy-from": "mon_zyrannosaurus", "upgrades": { "half_life": 15, "into": "mon_zyrannosaurus_nightstalker" }, + "description": "An uncanny shadow envelops this creature. You can make out the outline of a huge, bipedal dinosaur with feathery edges. The head looks large - lots of big teeth would fit in it.", + "color": "light_gray", "vision_day": 3, - "vision_night": 30, - "species": [ "ZOMBIE" ], - "default_faction": "zombie", - "symbol": "Z", - "volume": "1000 L", - "weight": "1000 kg", - "bodytype": "ostrich", - "material": [ "flesh" ], - "aggression": 100, - "morale": 100, - "speed": 40, - "attack_cost": 40, - "melee_skill": 5, - "melee_dice": 5, - "melee_dice_sides": 8, - "melee_damage": [ { "damage_type": "cut", "amount": 10 } ], - "families": [ "prof_gross_anatomy", "prof_intro_biology", "prof_physiology", "prof_wp_zombie" ], - "weakpoint_sets": [ "wps_lg_theropod_body" ], - "hp": 400, - "special_attacks": [ [ "scratch", 10 ], { "id": "bite_grab", "cooldown": 7 }, { "id": "teeth_zino_max", "cooldown": 5 } ], - "burn_into": "mon_zyrannosaurus_scorched", - "fungalize_into": "mon_zyrannosaurus_fungus", - "flags": [ - "SEES", - "HEARS", - "PET_MOUNTABLE", - "POISON", - "GRABS", - "STUMBLES", - "BASHES", - "DESTROYS", - "NO_BREATHE", - "REVIVES", - "FILTHY", - "WARM", - "NIGHT_INVISIBILITY" - ], - "harvest": "zed_dino_feather", - "dissect": "dissect_dino_large_pred", - "categories": [ "DINOSAUR" ], - "armor": { "bash": 6, "cut": 8 } + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zedcolbertia_shady", - "name": { "str": "shady nedcolbertia zombie" }, - "color": "light_gray", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a bipedal dinosaur with feathery edges.", + "name": { "str": "shady nedcolbertia zombie" }, + "copy-from": "mon_zedcolbertia", "upgrades": { "half_life": 15, "into": "mon_zedcolbertia_nightstalker" }, + "description": "An uncanny shadow envelops this creature. You can make out the outline of a bipedal dinosaur with feathery edges.", + "color": "light_gray", "vision_day": 3, "vision_night": 40, - "copy-from": "mon_zedcolbertia", - "looks_like": "mon_gallimimus", + "looks_like": "mon_zallimimus_shady", "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zallimimus_shady", "name": { "str": "shady gallimimus zombie" }, - "color": "light_gray", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a bipedal dinosaur with feathery edges and a beak.", + "copy-from": "mon_zallimimus", "upgrades": { "half_life": 15, "into": "mon_zallimimus_nightstalker" }, + "description": "An uncanny shadow envelops this creature. You can make out the outline of a bipedal dinosaur with feathery edges and a beak.", + "color": "light_gray", "vision_day": 3, "vision_night": 40, - "copy-from": "mon_zallimimus", "looks_like": "mon_gallimimus", "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, @@ -2250,11 +2043,11 @@ "type": "MONSTER", "id": "mon_ztruthiomimus_shady", "name": { "str_sp": "shady struthiomimus zombie" }, - "color": "light_gray", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a bipedal dinosaur with feathery edges and a beak.", "copy-from": "mon_ztruthiomimus", "looks_like": "mon_gallimimus", "upgrades": { "half_life": 15, "into": "mon_ztruthiomimus_nightstalker" }, + "description": "An uncanny shadow envelops this creature. You can make out the outline of a bipedal dinosaur with feathery edges and a beak.", + "color": "light_gray", "vision_day": 3, "vision_night": 40, "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } @@ -2265,8 +2058,8 @@ "name": { "str_sp": "shady ornithomimus zombie" }, "copy-from": "mon_zornithomimus", "upgrades": { "half_life": 15, "into": "mon_zornithomimus_nightstalker" }, - "color": "light_gray", "description": "An uncanny shadow envelops this creature. You can make out the outline of a bipedal dinosaur with feathery edges and a beak.", + "color": "light_gray", "vision_day": 3, "vision_night": 40, "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } @@ -2275,212 +2068,97 @@ "type": "MONSTER", "id": "mon_zalcarius_shady", "name": { "str": "shady falcarius zombie" }, - "copy-from": "mon_zeinonychus_shady", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a bipedal dinosaur with feathery edges. Long claws protrude from its hands.", + "copy-from": "mon_zalcarius", "upgrades": { "half_life": 15, "into": "mon_zalcarius_nightstalker" }, - "volume": "100 L", - "weight": "100 kg", - "speed": 100, - "attack_cost": 100, - "melee_skill": 3, - "melee_dice": 2, - "melee_dice_sides": 6, - "hp": 120, - "special_attacks": [ [ "scratch", 10 ], { "id": "bite_grab" }, { "type": "bite", "cooldown": 10 }, { "id": "longswipe", "cooldown": 40 } ], - "burn_into": "mon_zalcarius_scorched", - "fungalize_into": "mon_zalcarius_fungus", - "categories": [ "DINOSAUR" ] + "description": "An uncanny shadow envelops this creature. You can make out the outline of a bipedal dinosaur with feathery edges. Long claws protrude from its hands.", + "color": "light_gray", + "vision_day": 3, + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zerizinosaurus_shady", "name": { "str": "shady therizinosaurus zombie" }, - "copy-from": "mon_zeinonychus_shady", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a bipedal dinosaur with feathery edges. Long claws protrude from its hands.", + "copy-from": "mon_zerizinosaurus", "upgrades": { "half_life": 15, "into": "mon_zerizinosaurus_nightstalker" }, - "volume": "1000 L", - "weight": "1000 kg", - "//": "When large weights and volumes are fixed this should be 4000 L and 4000 kg", - "speed": 120, - "attack_cost": 120, - "melee_skill": 3, - "melee_dice": 3, - "melee_dice_sides": 6, - "hp": 320, - "special_attacks": [ [ "scratch", 10 ], { "id": "bite_grab" }, { "type": "bite", "cooldown": 10 }, { "id": "longswipe", "cooldown": 20 } ], - "burn_into": "mon_zerizinosaurus_scorched", - "fungalize_into": "mon_zerizinosaurus_fungus", - "categories": [ "DINOSAUR" ] + "description": "An uncanny shadow envelops this creature. You can make out the outline of a bipedal dinosaur with feathery edges. Long claws protrude from its hands.", + "color": "light_gray", + "vision_day": 3, + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zothronychus_shady", "name": { "str": "shady nothronychus zombie" }, - "copy-from": "mon_zeinonychus_shady", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a bipedal dinosaur with feathery edges. Long curved claws protrude from its hands.", + "copy-from": "mon_zothronychus", "upgrades": { "half_life": 15, "into": "mon_zothronychus_nightstalker" }, - "volume": "800 L", - "weight": "800 kg", - "speed": 50, - "attack_cost": 50, - "melee_skill": 3, - "melee_dice": 4, - "melee_dice_sides": 4, - "hp": 160, - "special_attacks": [ [ "scratch", 10 ], { "id": "bite_grab" }, { "type": "bite", "cooldown": 5 }, { "id": "longswipe", "cooldown": 30 } ], - "burn_into": "mon_zothronychus_scorched", - "fungalize_into": "mon_zothronychus_fungus", - "categories": [ "DINOSAUR" ], - "armor": { "bash": 4, "cut": 4, "bullet": 2 } + "description": "An uncanny shadow envelops this creature. You can make out the outline of a bipedal dinosaur with feathery edges. Long curved claws protrude from its hands.", + "color": "light_gray", + "vision_day": 3, + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zanzu_shady", "name": { "str": "shady anzu zombie" }, - "copy-from": "mon_zeinonychus_shady", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a large bipedal dinosaur with feathery edges. Long claws protrude from its hands.", + "copy-from": "mon_zanzu", "upgrades": { "half_life": 15, "into": "mon_zanzu_nightstalker" }, - "volume": "250 L", - "weight": "250 kg", - "speed": 100, - "melee_skill": 3, - "melee_dice": 4, - "melee_dice_sides": 4, - "hp": 120, - "special_attacks": [ [ "scratch", 10 ], { "id": "bite_grab" }, { "type": "bite", "cooldown": 5 }, { "id": "longswipe", "cooldown": 30 } ], - "burn_into": "mon_zanzu_scorched", - "fungalize_into": "mon_zanzu_fungus", - "categories": [ "DINOSAUR" ], - "armor": { "bash": 4, "cut": 4, "bullet": 2 } + "description": "An uncanny shadow envelops this creature. You can make out the outline of a large bipedal dinosaur with feathery edges. Long claws protrude from its hands.", + "color": "light_gray", + "vision_day": 3, + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zeinonychus_shady", "name": { "str_sp": "shady deinonychus zombie" }, - "color": "light_gray", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a bipedal dinosaur with feathery edges. Both feet brandish a large, sickle-shaped claw.", + "copy-from": "mon_zeinonychus", "upgrades": { "half_life": 15, "into": "mon_zeinonychus_nightstalker" }, + "description": "An uncanny shadow envelops this creature. You can make out the outline of a bipedal dinosaur with feathery edges. Both feet brandish a large, sickle-shaped claw.", + "color": "light_gray", "vision_day": 3, "vision_night": 40, - "species": [ "ZOMBIE" ], - "default_faction": "zombie", - "symbol": "Z", - "volume": "70 L", - "weight": "70 kg", - "bodytype": "ostrich", - "material": [ "flesh" ], - "aggression": 100, - "morale": 100, - "speed": 65, - "attack_cost": 65, - "melee_skill": 5, - "melee_dice": 1, - "melee_dice_sides": 8, - "melee_damage": [ { "damage_type": "cut", "amount": 4 } ], - "families": [ "prof_gross_anatomy", "prof_intro_biology", "prof_physiology", "prof_wp_zombie" ], - "weakpoint_sets": [ "wps_dinosaur_body" ], - "hp": 45, - "special_attacks": [ - { "type": "leap", "cooldown": 5, "max_range": 5, "allow_no_target": true }, - [ "scratch", 10 ], - { "id": "bite_grab" }, - { "id": "teeth_zino_mid", "cooldown": 5 } - ], - "burn_into": "mon_zeinonychus_scorched", - "fungalize_into": "mon_zeinonychus_fungus", - "flags": [ - "SEES", - "SMELLS", - "HEARS", - "KEENNOSE", - "POISON", - "STUMBLES", - "NO_BREATHE", - "REVIVES", - "FILTHY", - "WARM", - "NIGHT_INVISIBILITY" - ], - "harvest": "zed_dino_feather", - "categories": [ "DINOSAUR" ], - "armor": { "bash": 4, "cut": 4, "bullet": 2 } + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zutahraptor_shady", "name": { "str": "shady utahraptor zombie" }, - "copy-from": "mon_zeinonychus_shady", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a big, bipedal dinosaur with feathery edges. Both feet brandish a large, sickle-shaped claw.", + "copy-from": "mon_zutahraptor", "upgrades": { "half_life": 15, "into": "mon_zutahraptor_nightstalker" }, - "volume": "500 L", - "weight": "500 kg", - "speed": 65, - "attack_cost": 65, - "melee_skill": 5, - "melee_dice": 2, - "melee_dice_sides": 6, - "melee_damage": [ { "damage_type": "cut", "amount": 8 } ], - "hp": 130, - "burn_into": "mon_zutahraptor_scorched", - "fungalize_into": "mon_zutahraptor_fungus", - "categories": [ "DINOSAUR" ], - "armor": { "bash": 3, "cut": 4, "bullet": 2 } + "description": "An uncanny shadow envelops this creature. You can make out the outline of a big, bipedal dinosaur with feathery edges. Both feet brandish a large, sickle-shaped claw.", + "color": "light_gray", + "vision_day": 3, + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zankylosaurus_shady", "name": { "str": "shady ankylosaurus zombie" }, - "color": "light_gray", - "description": "An uncanny shadow envelops this creature. You can make out the outline of a large, heavily-armored, four-legged dinosaur with a spiked tail.", + "copy-from": "mon_zankylosaurus", "upgrades": { "half_life": 15, "into": "mon_zankylosaurus_nightstalker" }, + "description": "An uncanny shadow envelops this creature. You can make out the outline of a large, heavily-armored, four-legged dinosaur with a spiked tail.", + "color": "light_gray", "vision_day": 3, "vision_night": 40, - "species": [ "ZOMBIE" ], - "default_faction": "zombie", - "symbol": "Z", - "volume": "1000 L", - "weight": "1000 kg", - "bodytype": "elephant", - "material": [ "flesh" ], - "aggression": 100, - "morale": 100, - "speed": 20, - "melee_skill": 3, - "melee_dice": 2, - "melee_dice_sides": 4, - "melee_damage": [ { "damage_type": "stab", "amount": 1 } ], - "families": [ "prof_gross_anatomy", "prof_intro_biology", "prof_physiology", "prof_wp_zombie", "prof_wp_nat_armored" ], - "weakpoint_sets": [ "wps_ankylosaurid_body" ], - "hp": 375, - "special_attacks": [ [ "scratch", 10 ], { "id": "bite_grab" }, { "type": "bite", "cooldown": 5 }, [ "tailsmash_DinoMod", 30 ] ], - "burn_into": "mon_zankylosaurus_scorched", - "fungalize_into": "mon_zankylosaurus_fungus", - "flags": [ "SEES", "HEARS", "GRABS", "POISON", "STUMBLES", "NO_BREATHE", "REVIVES", "FILTHY", "BASHES", "NIGHT_INVISIBILITY" ], - "harvest": "zed_dino_leather", - "categories": [ "DINOSAUR" ], - "armor": { "bash": 16, "cut": 21, "bullet": 7 } + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", "id": "mon_zescelosaurus_shady", "name": { "str": "shady thescelosaurus zombie" }, - "copy-from": "mon_zallimimus_shady", - "looks_like": "mon_zallimimus_shady", - "volume": "250 L", - "weight": "250 kg", - "speed": 120, - "attack_cost": 120, - "melee_skill": 4, - "melee_dice": 2, - "melee_dice_sides": 6, - "melee_damage": [ { "damage_type": "stab", "amount": 1 } ], - "families": [ "prof_gross_anatomy", "prof_intro_biology", "prof_physiology", "prof_wp_zombie" ], - "weakpoint_sets": [ "wps_dinosaur_body" ], - "hp": 135, - "burn_into": "mon_zescelosaurus_scorched", - "fungalize_into": "mon_zescelosaurus_fungus", + "copy-from": "mon_zescelosaurus", "upgrades": { "half_life": 15, "into": "mon_zescelosaurus_nightstalker" }, - "armor": { "bash": 5, "cut": 7, "bullet": 3 } + "description": "An uncanny shadow envelops this creature. You can make out the outline of a bipedal dinosaur with feathery edges and a beak.", + "color": "light_gray", + "vision_day": 3, + "vision_night": 40, + "extend": { "flags": [ "NIGHT_INVISIBILITY" ] } }, { "type": "MONSTER", @@ -2500,8 +2178,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2522,8 +2199,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2544,8 +2220,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2566,8 +2241,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2588,8 +2262,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2610,8 +2283,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2632,8 +2304,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2654,8 +2325,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2676,8 +2346,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2698,8 +2367,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2720,8 +2388,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2742,8 +2409,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2764,8 +2430,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2786,8 +2451,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2808,8 +2472,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2830,8 +2493,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2850,8 +2512,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2870,8 +2531,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2892,8 +2552,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2914,8 +2573,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2936,8 +2594,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2958,8 +2615,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -2980,8 +2636,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -3002,8 +2657,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -3024,8 +2678,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -3046,8 +2699,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -3068,8 +2720,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", @@ -3090,8 +2741,7 @@ "bleed_rate": 50, "special_attacks": [ [ "SMASH", 30 ] ], "extend": { "flags": [ "GROUP_BASH", "PUSH_MON", "PUSH_VEH", "SMELLS" ] }, - "upgrades": false, - "categories": [ "DINOSAUR" ] + "upgrades": false }, { "type": "MONSTER", diff --git a/data/mods/Isolation-Protocol/EOC/danger_clock_eoc.json b/data/mods/Isolation-Protocol/EOC/danger_clock_eoc.json index 9f884d82811b0..5c41a4fb00f21 100644 --- a/data/mods/Isolation-Protocol/EOC/danger_clock_eoc.json +++ b/data/mods/Isolation-Protocol/EOC/danger_clock_eoc.json @@ -5,7 +5,7 @@ "recurrence": "3 minutes", "global": true, "condition": { "not": { "or": [ { "u_at_om_location": "iso_hallway_safe" }, { "u_at_om_location": "iso_elevator_safe" } ] } }, - "effect": [ { "math": [ "u_ISO_CURRENT_LEVEL_DANGER", "++" ] }, { "math": [ "u_ISO_DANGER", "++" ] } ] + "effect": [ { "math": [ "u_ISO_CURRENT_LEVEL_DANGER++" ] }, { "math": [ "u_ISO_DANGER++" ] } ] }, { "type": "effect_on_condition", diff --git a/data/mods/Isolation-Protocol/EOC/elevator_eoc.json b/data/mods/Isolation-Protocol/EOC/elevator_eoc.json index c2847e9dc9c7e..ece5dc784edfb 100644 --- a/data/mods/Isolation-Protocol/EOC/elevator_eoc.json +++ b/data/mods/Isolation-Protocol/EOC/elevator_eoc.json @@ -11,7 +11,7 @@ "type": "effect_on_condition", "id": "EOC_ISO_ELEVATOR", "effect": [ - { "math": [ "ISO_CURRENT_LEVEL", "++" ] }, + { "math": [ "ISO_CURRENT_LEVEL++" ] }, { "math": [ "u_ISO_CURRENT_LEVEL_DANGER = 0" ] }, { "u_message": "The elevator starts moving before you can touch the panel.", "popup": true }, { "run_eocs": [ "EOC_ISO_DECIDE_LEVEL" ] } diff --git a/data/mods/Limb_WIP/mutation_eocs/limb_changing_eocs.json b/data/mods/Limb_WIP/mutation_eocs/limb_changing_eocs.json index a469617c529ac..f26d2bfba8bf6 100644 --- a/data/mods/Limb_WIP/mutation_eocs/limb_changing_eocs.json +++ b/data/mods/Limb_WIP/mutation_eocs/limb_changing_eocs.json @@ -93,7 +93,7 @@ "then": [ { "u_message": "", "snippet": true }, { "u_lose_effect": "sleep" }, - { "math": [ "u_progress_pre_eyes_insect", "++" ] }, + { "math": [ "u_progress_pre_eyes_insect++" ] }, { "math": [ "u_limb_progress_timer = time('now')" ] } ], "else": [ @@ -146,7 +146,7 @@ "then": [ { "u_message": "", "snippet": true }, { "u_lose_effect": "sleep" }, - { "math": [ "u_progress_eyes_insect", "++" ] }, + { "math": [ "u_progress_eyes_insect++" ] }, { "math": [ "u_limb_progress_timer = time('now')" ] } ], "else": [ @@ -206,7 +206,7 @@ "then": [ { "u_message": "", "snippet": true, "popup": true }, { "u_lose_effect": "sleep" }, - { "math": [ "u_progress_pre_arm_feathers", "++" ] }, + { "math": [ "u_progress_pre_arm_feathers++" ] }, { "math": [ "u_limb_progress_timer = time('now')" ] } ], "else": [ @@ -265,7 +265,7 @@ "then": [ { "u_message": "", "snippet": true }, { "u_lose_effect": "sleep" }, - { "math": [ "u_progress_wings_bird", "++" ] }, + { "math": [ "u_progress_wings_bird++" ] }, { "math": [ "u_limb_progress_timer = time('now')" ] } ], "else": [ diff --git a/data/mods/MMA/techniques.json b/data/mods/MMA/techniques.json index bf05883fa88e9..77bda943e5ebe 100644 --- a/data/mods/MMA/techniques.json +++ b/data/mods/MMA/techniques.json @@ -525,7 +525,7 @@ "chance": 100, "duration": 400, "on_damage": true, - "message": "The weapon of %s has been forced out ot their hands!" + "message": "The weapon of %s has been forced out of their hands!" } ], "attack_vectors": [ "vector_null" ] diff --git a/data/mods/Magiclysm/mod_interactions/bombastic_perks/perkmenu.json b/data/mods/Magiclysm/mod_interactions/bombastic_perks/perkmenu.json index 7d92c033ca354..764c5b1e95972 100644 --- a/data/mods/Magiclysm/mod_interactions/bombastic_perks/perkmenu.json +++ b/data/mods/Magiclysm/mod_interactions/bombastic_perks/perkmenu.json @@ -55,7 +55,7 @@ "topic": "TALK_PERK_MENU_MAIN", "condition": { "math": [ "u_num_perks > 0" ] }, "failure_topic": "TALK_PERK_MENU_FAIL", - "effect": [ { "u_add_trait": "perk_caster_level_up_animist" }, { "math": [ "u_num_perks", "--" ] } ] + "effect": [ { "u_add_trait": "perk_caster_level_up_animist" }, { "math": [ "u_num_perks--" ] } ] }, { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" }, { "text": "Quit.", "topic": "TALK_DONE" } @@ -71,7 +71,7 @@ "topic": "TALK_PERK_MENU_MAIN", "condition": { "math": [ "u_num_perks > 0" ] }, "failure_topic": "TALK_PERK_MENU_FAIL", - "effect": [ { "u_add_trait": "perk_caster_level_up_magus" }, { "math": [ "u_num_perks", "--" ] } ] + "effect": [ { "u_add_trait": "perk_caster_level_up_magus" }, { "math": [ "u_num_perks--" ] } ] }, { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" }, { "text": "Quit.", "topic": "TALK_DONE" } @@ -87,7 +87,7 @@ "topic": "TALK_PERK_MENU_MAIN", "condition": { "math": [ "u_num_perks > 0" ] }, "failure_topic": "TALK_PERK_MENU_FAIL", - "effect": [ { "u_add_trait": "perk_caster_level_up_stormshaper" }, { "math": [ "u_num_perks", "--" ] } ] + "effect": [ { "u_add_trait": "perk_caster_level_up_stormshaper" }, { "math": [ "u_num_perks--" ] } ] }, { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" }, { "text": "Quit.", "topic": "TALK_DONE" } @@ -103,7 +103,7 @@ "topic": "TALK_PERK_MENU_MAIN", "condition": { "math": [ "u_num_perks > 0" ] }, "failure_topic": "TALK_PERK_MENU_FAIL", - "effect": [ { "u_add_trait": "perk_caster_level_up_kelvinist" }, { "math": [ "u_num_perks", "--" ] } ] + "effect": [ { "u_add_trait": "perk_caster_level_up_kelvinist" }, { "math": [ "u_num_perks--" ] } ] }, { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" }, { "text": "Quit.", "topic": "TALK_DONE" } @@ -119,7 +119,7 @@ "topic": "TALK_PERK_MENU_MAIN", "condition": { "math": [ "u_num_perks > 0" ] }, "failure_topic": "TALK_PERK_MENU_FAIL", - "effect": [ { "u_add_trait": "perk_caster_level_up_earthshaper" }, { "math": [ "u_num_perks", "--" ] } ] + "effect": [ { "u_add_trait": "perk_caster_level_up_earthshaper" }, { "math": [ "u_num_perks--" ] } ] }, { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" }, { "text": "Quit.", "topic": "TALK_DONE" } @@ -135,7 +135,7 @@ "topic": "TALK_PERK_MENU_MAIN", "condition": { "math": [ "u_num_perks > 0" ] }, "failure_topic": "TALK_PERK_MENU_FAIL", - "effect": [ { "u_add_trait": "perk_caster_level_up_technomancer" }, { "math": [ "u_num_perks", "--" ] } ] + "effect": [ { "u_add_trait": "perk_caster_level_up_technomancer" }, { "math": [ "u_num_perks--" ] } ] }, { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" }, { "text": "Quit.", "topic": "TALK_DONE" } @@ -151,7 +151,7 @@ "topic": "TALK_PERK_MENU_MAIN", "condition": { "math": [ "u_num_perks > 0" ] }, "failure_topic": "TALK_PERK_MENU_FAIL", - "effect": [ { "u_add_trait": "perk_caster_level_up_druid" }, { "math": [ "u_num_perks", "--" ] } ] + "effect": [ { "u_add_trait": "perk_caster_level_up_druid" }, { "math": [ "u_num_perks--" ] } ] }, { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" }, { "text": "Quit.", "topic": "TALK_DONE" } @@ -167,7 +167,7 @@ "topic": "TALK_PERK_MENU_MAIN", "condition": { "math": [ "u_num_perks > 0" ] }, "failure_topic": "TALK_PERK_MENU_FAIL", - "effect": [ { "u_add_trait": "perk_caster_level_up_biomancer" }, { "math": [ "u_num_perks", "--" ] } ] + "effect": [ { "u_add_trait": "perk_caster_level_up_biomancer" }, { "math": [ "u_num_perks--" ] } ] }, { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" }, { "text": "Quit.", "topic": "TALK_DONE" } diff --git a/data/mods/MindOverMatter/effectoncondition/eoc_premonition_instances.json b/data/mods/MindOverMatter/effectoncondition/eoc_premonition_instances.json index 391b1342048ef..5717f60ff830b 100644 --- a/data/mods/MindOverMatter/effectoncondition/eoc_premonition_instances.json +++ b/data/mods/MindOverMatter/effectoncondition/eoc_premonition_instances.json @@ -43,7 +43,7 @@ "type": "effect_on_condition", "id": "EOC_LIEUTENANT_SPAWN_SHADOW_ACTUAL", "effect": [ - { "math": [ "u_Shadow_Lurking", "--" ] }, + { "math": [ "u_Shadow_Lurking--" ] }, { "u_spawn_monster": "mon_lieutenant_shadow", "real_count": 1, "min_radius": 10, "max_radius": 15 }, { "run_eocs": "EOC_LIEUTENANT_SPAWN_SHADOW_MESSAGE", "time_in_future": 1 } ] @@ -157,7 +157,7 @@ "max_radius": 25, "spawn_message": "A rough-looking person steps out of hiding and begins rapidly approaching you." }, - { "math": [ "u_bandit_assassins_sent", "++" ] } + { "math": [ "u_bandit_assassins_sent++" ] } ] }, { @@ -172,7 +172,7 @@ "max_radius": 40, "spawn_message": "A rough-looking person steps out of hiding and begins rapidly approaching you." }, - { "math": [ "u_bandit_assassins_sent", "++" ] } + { "math": [ "u_bandit_assassins_sent++" ] } ] }, { @@ -231,7 +231,7 @@ "spawn_message": "A rough-looking person steps out of hiding and begins rapidly approaching you.", "spawn_message_plural": "Rough-looking people step out of hiding and begin rapidly approaching you." }, - { "math": [ "u_bandit_assassins_sent", "++" ] } + { "math": [ "u_bandit_assassins_sent++" ] } ] }, { @@ -247,7 +247,7 @@ "spawn_message": "A rough-looking person steps out of hiding and begins rapidly approaching you.", "spawn_message_plural": "Rough-looking people step out of hiding and begin rapidly approaching you." }, - { "math": [ "u_bandit_assassins_sent", "++" ] } + { "math": [ "u_bandit_assassins_sent++" ] } ] }, { @@ -305,7 +305,7 @@ "spawn_message": "A rough-looking person steps out of hiding and begins rapidly approaching you.", "spawn_message_plural": "Rough-looking people step out of hiding and begin rapidly approaching you." }, - { "math": [ "u_bandit_assassins_sent", "++" ] } + { "math": [ "u_bandit_assassins_sent++" ] } ] }, { @@ -321,7 +321,7 @@ "spawn_message": "A rough-looking person steps out of hiding and begins rapidly approaching you.", "spawn_message_plural": "Rough-looking people step out of hiding and begin rapidly approaching you." }, - { "math": [ "u_bandit_assassins_sent", "++" ] } + { "math": [ "u_bandit_assassins_sent++" ] } ] }, { diff --git a/data/mods/MindOverMatter/mod_interactions/defense_mode/premonition_instances.json b/data/mods/MindOverMatter/mod_interactions/defense_mode/premonition_instances.json index 89e0ef95e76e1..b90eec61c5391 100644 --- a/data/mods/MindOverMatter/mod_interactions/defense_mode/premonition_instances.json +++ b/data/mods/MindOverMatter/mod_interactions/defense_mode/premonition_instances.json @@ -36,7 +36,7 @@ "global": true, "effect": [ { "u_teleport": { "global_val": "your_spawnpoint" } }, - { "math": [ "wave_number", "++" ] }, + { "math": [ "wave_number++" ] }, { "u_message": "Welcome to wave !", "type": "bad", "popup": false }, { "run_eocs": "DEFENSE_MODE_WAVE_SPECIAL_DECIDER" } ] diff --git a/data/mods/MindOverMatter/powers/electrokinesis_concentration_eocs.json b/data/mods/MindOverMatter/powers/electrokinesis_concentration_eocs.json index 915b63ca571b9..24e2345649010 100644 --- a/data/mods/MindOverMatter/powers/electrokinesis_concentration_eocs.json +++ b/data/mods/MindOverMatter/powers/electrokinesis_concentration_eocs.json @@ -426,7 +426,7 @@ { "id": "EOC_ELECTROKIN_PERSONAL_BATTERY_GET_ITEM_COUNT_2", "condition": { "math": [ "n_val('power')", "<", "n_val('power_max')" ] }, - "effect": [ { "math": [ "u_electrokin_personal_battery_item_count", "++" ] } ] + "effect": [ { "math": [ "u_electrokin_personal_battery_item_count++" ] } ] } ] } @@ -446,7 +446,7 @@ ] }, "effect": [ - { "math": [ "u_electrokin_personal_battery_item_count", "--" ] }, + { "math": [ "u_electrokin_personal_battery_item_count--" ] }, { "run_eocs": "EOC_ELECTROKIN_PERSONAL_BATTERY_EFFECT_AMMEND_ITEM_COUNT" } ] }, diff --git a/data/mods/No_Hope/monster_groups.json b/data/mods/No_Hope/monster_groups.json index 089d6f04be506..edf557f89299a 100644 --- a/data/mods/No_Hope/monster_groups.json +++ b/data/mods/No_Hope/monster_groups.json @@ -134,5 +134,10 @@ "type": "monstergroup", "name": "GROUP_NETHER_PORTAL", "monsters": [ { "monster": "mon_staring_eye", "weight": 200, "cost_multiplier": 0 } ] + }, + { + "type": "monstergroup", + "name": "GROUP_WILDERNESS_FOREST_ZOMBIE", + "monsters": [ { "monster": "mon_zpider_mass", "weight": 1, "cost_multiplier": 10 } ] } ] diff --git a/data/mods/No_Hope/monsters.json b/data/mods/No_Hope/monsters.json index ebe1677881dbe..6bb7185db9cc1 100644 --- a/data/mods/No_Hope/monsters.json +++ b/data/mods/No_Hope/monsters.json @@ -837,5 +837,50 @@ "families": [ "prof_wp_syn_armored" ], "flags": [ "ELECTRIC" ] } + }, + { + "id": "mon_zpider_mass", + "type": "MONSTER", + "name": { "str": "mass of zombie spiders", "str_pl": "masses of zombie spiders" }, + "description": "Thousands, maybe millions of spiders piled up high, each slowly oozing sticky green pus, struggling to keep the fetid mass together and moving.", + "default_faction": "zombie", + "bodytype": "blob", + "species": [ "ZOMBIE", "SPIDER" ], + "volume": "18 L", + "weight": "23 kg", + "hp": 40, + "speed": 70, + "attack_cost": 70, + "material": [ "iflesh" ], + "symbol": "s", + "color": "light_green", + "aggression": 100, + "morale": 100, + "melee_skill": 4, + "melee_dice": 2, + "melee_dice_sides": 3, + "melee_damage": [ { "damage_type": "cut", "amount": 2 } ], + "dodge": 1, + "families": [ "prof_gross_anatomy", "prof_intro_biology", "prof_physiology" ], + "vision_day": 5, + "vision_night": 5, + "harvest": "arachnid_tainted", + "flags": [ + "SEES", + "HEARS", + "SMELLS", + "STUMBLES", + "WARM", + "NOHEAD", + "VENOM", + "CLIMBS", + "WEBWALK", + "POISON", + "NO_BREATHE", + "REVIVES", + "FILTHY", + "INSECTICIDEPROOF" + ], + "armor": { "cut": 3, "stab": 3, "bullet": 2, "electric": 1 } } ] diff --git a/data/mods/Perk_melee/EOC/leveling.json b/data/mods/Perk_melee/EOC/leveling.json index 1c6b327362330..69ec988bd0fb3 100644 --- a/data/mods/Perk_melee/EOC/leveling.json +++ b/data/mods/Perk_melee/EOC/leveling.json @@ -52,6 +52,6 @@ { "type": "effect_on_condition", "id": "EOC_give_ma_perk_point", - "effect": [ { "math": [ "u_num_ma_perks", "++" ] } ] + "effect": [ { "math": [ "u_num_ma_perks++" ] } ] } ] diff --git a/data/mods/Perk_melee/menu.json b/data/mods/Perk_melee/menu.json index 3824717209b4b..a931e0bed5310 100644 --- a/data/mods/Perk_melee/menu.json +++ b/data/mods/Perk_melee/menu.json @@ -696,7 +696,7 @@ "failure_topic": "TALK_NONE", "effect": [ { "u_mutate_towards": { "context_val": "trait_id" }, "category": "ANY", "use_vitamins": false }, - { "math": [ "u_num_ma_perks", "--" ] } + { "math": [ "u_num_ma_perks--" ] } ] }, { diff --git a/data/mods/Sky_Island/EOCs.json b/data/mods/Sky_Island/EOCs.json index a55a9c9f9742e..2a3140d0a3476 100644 --- a/data/mods/Sky_Island/EOCs.json +++ b/data/mods/Sky_Island/EOCs.json @@ -85,7 +85,7 @@ }, { "u_teleport": { "global_val": "OM_HQ_origin" }, "force": true }, { "u_remove_item_with": "warphome" }, - { "math": [ "raidstotal", "++" ] }, + { "math": [ "raidstotal++" ] }, { "u_lose_trait": "awayfromhome" }, { "u_lose_effect": "warpsickness" }, { "u_lose_effect": "warpdisintegration" }, @@ -199,7 +199,7 @@ "u_query": "This will teleport you back to your sky island. Any items inside the room will be teleported home alongside you. Are you ready to leave?", "default": false }, - "effect": [ { "math": [ "raidswon", "++" ] }, { "math": [ "gettokens = 1" ] }, { "run_eocs": [ "EOC_return_OM_teleport_item" ] } ] + "effect": [ { "math": [ "raidswon++" ] }, { "math": [ "gettokens = 1" ] }, { "run_eocs": [ "EOC_return_OM_teleport_item" ] } ] }, { "type": "effect_on_condition", @@ -217,7 +217,7 @@ "default": false }, "effect": [ - { "math": [ "raidswon", "++" ] }, + { "math": [ "raidswon++" ] }, { "math": [ "gettokens = 1" ] }, { "u_consume_item": "warp_vortex_token", "count": 1 }, { "run_eocs": [ "EOC_return_OM_teleport_item" ] } @@ -231,7 +231,7 @@ "u_query": "This will teleport you back to your sky island. Any items not on your person WILL BE LOST. Are you ready to leave?", "default": false }, - "effect": [ { "math": [ "raidswon", "++" ] }, { "math": [ "gettokens = 1" ] }, { "run_eocs": [ "EOC_return_OM_teleport" ] } ] + "effect": [ { "math": [ "raidswon++" ] }, { "math": [ "gettokens = 1" ] }, { "run_eocs": [ "EOC_return_OM_teleport" ] } ] }, { "type": "effect_on_condition", @@ -292,7 +292,7 @@ { "u_add_effect": "downed", "duration": 1 }, { "run_eocs": [ "EOC_death_heal" ] }, { "u_spawn_item": "corpse_painful" }, - { "math": [ "raidslost", "++" ] }, + { "math": [ "raidslost++" ] }, { "run_eocs": "EOC_return_OM_teleport", "time_in_future": "1 s" }, { "u_message": "You feel the icy grip of death begin to take you, and the world whirls and rushes past. Reality bends and at the peak of your last mortal moment, something snags you and hauls you through space and time. Your mind has been preserved, at cost, and your body is not far behind.", diff --git a/data/mods/Sky_Island/missions_and_mapgen.json b/data/mods/Sky_Island/missions_and_mapgen.json index d622f8b348bec..10280d0494fd6 100644 --- a/data/mods/Sky_Island/missions_and_mapgen.json +++ b/data/mods/Sky_Island/missions_and_mapgen.json @@ -460,7 +460,7 @@ "assign_mission_target": { "var": { "global_val": "OM_missionspot" } }, "update_mapgen": { "place_nested": [ { "chunks": [ "mx_treasuregoal" ], "x": [ 0, 13 ], "y": [ 0, 13 ] } ] } }, - "end": { "effect": [ { "run_eocs": "EOC_bonuspulse" }, { "math": [ "u_missionswon", "++" ] } ] } + "end": { "effect": [ { "run_eocs": "EOC_bonuspulse" }, { "math": [ "u_missionswon++" ] } ] } }, { "id": "MISSION_BONUS_KILL_LIGHT", @@ -480,7 +480,7 @@ }, "end": { "effect": [ - { "math": [ "u_missionswon", "++" ] }, + { "math": [ "u_missionswon++" ] }, { "math": [ "totalbonus = 3 + total_difficulty_bonus" ] }, { "u_message": "It's done. They're all dead. Warp shards filter in from seams in reality. Your reward rains down on you.", @@ -509,7 +509,7 @@ }, "end": { "effect": [ - { "math": [ "u_missionswon", "++" ] }, + { "math": [ "u_missionswon++" ] }, { "math": [ "totalbonus = 4 + total_difficulty_bonus" ] }, { "u_message": "It's done. They're all dead. Warp shards filter in from seams in reality. Your reward rains down on you.", @@ -546,7 +546,7 @@ }, "end": { "effect": [ - { "math": [ "u_missionswon", "++" ] }, + { "math": [ "u_missionswon++" ] }, { "math": [ "totalbonus = 4 + total_difficulty_bonus" ] }, { "u_message": "It's done. They're all dead. Warp shards filter in from seams in reality. Your reward rains down on you.", @@ -583,7 +583,7 @@ }, "end": { "effect": [ - { "math": [ "u_missionswon", "++" ] }, + { "math": [ "u_missionswon++" ] }, { "math": [ "totalbonus = 5 + total_difficulty_bonus" ] }, { "u_message": "It's done. They're all dead. Warp shards filter in from seams in reality. Your reward rains down on you.", @@ -628,7 +628,7 @@ }, "end": { "effect": [ - { "math": [ "u_missionswon", "++" ] }, + { "math": [ "u_missionswon++" ] }, { "math": [ "totalbonus = 5 + total_difficulty_bonus" ] }, { "u_message": "It's done. They're all dead. Warp shards filter in from seams in reality. Your reward rains down on you.", @@ -673,7 +673,7 @@ }, "end": { "effect": [ - { "math": [ "u_missionswon", "++" ] }, + { "math": [ "u_missionswon++" ] }, { "math": [ "totalbonus = 8 + total_difficulty_bonus" ] }, { "u_message": "It's done. They're all dead. Warp shards filter in from seams in reality. Your reward rains down on you.", @@ -700,7 +700,7 @@ }, "end": { "effect": [ - { "math": [ "u_missionswon", "++" ] }, + { "math": [ "u_missionswon++" ] }, { "math": [ "totalbonus = 10 + total_difficulty_bonus" ] }, { "u_message": "It's done. They're all dead. Warp shards filter in from seams in reality. Your reward rains down on you.", @@ -729,7 +729,7 @@ }, "end": { "effect": [ - { "math": [ "u_missionswon", "++" ] }, + { "math": [ "u_missionswon++" ] }, { "math": [ "totalbonus = 10 + total_difficulty_bonus" ] }, { "u_message": "It's done. They're all dead. Warp shards filter in from seams in reality. Your reward rains down on you.", @@ -766,7 +766,7 @@ }, "end": { "effect": [ - { "math": [ "u_missionswon", "++" ] }, + { "math": [ "u_missionswon++" ] }, { "math": [ "totalbonus = 12 + total_difficulty_bonus" ] }, { "u_message": "It's done. They're all dead. Warp shards filter in from seams in reality. Your reward rains down on you.", @@ -803,7 +803,7 @@ }, "end": { "effect": [ - { "math": [ "u_missionswon", "++" ] }, + { "math": [ "u_missionswon++" ] }, { "math": [ "totalbonus = 12 + total_difficulty_bonus" ] }, { "u_message": "It's done. They're all dead. Warp shards filter in from seams in reality. Your reward rains down on you.", @@ -830,7 +830,7 @@ }, "end": { "effect": [ - { "math": [ "u_missionswon", "++" ] }, + { "math": [ "u_missionswon++" ] }, { "math": [ "totalbonus = 9 + total_difficulty_bonus" ] }, { "u_message": "It's done. They're all dead. Warp shards filter in from seams in reality. Your reward rains down on you.", @@ -860,7 +860,7 @@ }, "end": { "effect": [ - { "math": [ "u_missionswon", "++" ] }, + { "math": [ "u_missionswon++" ] }, { "math": [ "totalbonus = 12 + total_difficulty_bonus" ] }, { "u_message": "It's done. They're all dead. Warp shards filter in from seams in reality. Your reward rains down on you.", @@ -885,7 +885,7 @@ }, "end": { "effect": [ - { "math": [ "u_missionswon", "++" ] }, + { "math": [ "u_missionswon++" ] }, { "math": [ "totalbonus = 9 + total_difficulty_bonus" ] }, { "u_message": "It's done. They're all dead. Warp shards filter in from seams in reality. Your reward rains down on you.", @@ -910,7 +910,7 @@ }, "end": { "effect": [ - { "math": [ "u_missionswon", "++" ] }, + { "math": [ "u_missionswon++" ] }, { "math": [ "totalbonus = 6 + total_difficulty_bonus" ] }, { "u_message": "It's done. They're all dead. Warp shards filter in from seams in reality. Your reward rains down on you.", @@ -941,7 +941,7 @@ }, "end": { "effect": [ - { "math": [ "u_missionswon", "++" ] }, + { "math": [ "u_missionswon++" ] }, { "math": [ "totalbonus = 12 + total_difficulty_bonus" ] }, { "u_message": "It's done. They're all dead. Warp shards filter in from seams in reality. Your reward rains down on you.", @@ -962,7 +962,7 @@ "monster_kill_goal": 10, "difficulty": 0, "value": 0, - "end": { "effect": [ { "math": [ "slaughterswon", "++" ] }, { "u_spawn_item": "warptoken", "count": 1 } ] } + "end": { "effect": [ { "math": [ "slaughterswon++" ] }, { "u_spawn_item": "warptoken", "count": 1 } ] } }, { "id": "MISSION_BONUS_SLAUGHTER_ZED2", @@ -974,7 +974,7 @@ "monster_kill_goal": 50, "difficulty": 0, "value": 0, - "end": { "effect": [ { "math": [ "slaughterswon", "++" ] }, { "u_spawn_item": "warptoken", "count": 3 } ] } + "end": { "effect": [ { "math": [ "slaughterswon++" ] }, { "u_spawn_item": "warptoken", "count": 3 } ] } }, { "id": "MISSION_BONUS_SLAUGHTER_ZED3", @@ -986,7 +986,7 @@ "monster_kill_goal": 100, "difficulty": 0, "value": 0, - "end": { "effect": [ { "math": [ "slaughterswon", "++" ] }, { "u_spawn_item": "warptoken", "count": 5 } ] } + "end": { "effect": [ { "math": [ "slaughterswon++" ] }, { "u_spawn_item": "warptoken", "count": 5 } ] } }, { "id": "MISSION_BONUS_SLAUGHTER_MIGO", @@ -998,7 +998,7 @@ "monster_kill_goal": 1, "difficulty": 0, "value": 0, - "end": { "effect": [ { "math": [ "slaughterswon", "++" ] }, { "u_spawn_item": "warptoken", "count": 3 } ] } + "end": { "effect": [ { "math": [ "slaughterswon++" ] }, { "u_spawn_item": "warptoken", "count": 3 } ] } }, { "id": "MISSION_BONUS_SLAUGHTER_NETHER", @@ -1010,7 +1010,7 @@ "monster_kill_goal": 3, "difficulty": 0, "value": 0, - "end": { "effect": [ { "math": [ "slaughterswon", "++" ] }, { "u_spawn_item": "warptoken", "count": 4 } ] } + "end": { "effect": [ { "math": [ "slaughterswon++" ] }, { "u_spawn_item": "warptoken", "count": 4 } ] } }, { "id": "MISSION_BONUS_SLAUGHTER_BIRD", @@ -1022,7 +1022,7 @@ "monster_kill_goal": 5, "difficulty": 0, "value": 0, - "end": { "effect": [ { "math": [ "slaughterswon", "++" ] }, { "u_spawn_item": "warptoken", "count": 1 } ] } + "end": { "effect": [ { "math": [ "slaughterswon++" ] }, { "u_spawn_item": "warptoken", "count": 1 } ] } }, { "id": "MISSION_BONUS_SLAUGHTER_MAMMAL", @@ -1034,7 +1034,7 @@ "monster_kill_goal": 5, "difficulty": 0, "value": 0, - "end": { "effect": [ { "math": [ "slaughterswon", "++" ] }, { "u_spawn_item": "warptoken", "count": 1 } ] } + "end": { "effect": [ { "math": [ "slaughterswon++" ] }, { "u_spawn_item": "warptoken", "count": 1 } ] } }, { "type": "mapgen", diff --git a/data/mods/Sky_Island/sickness_checks.json b/data/mods/Sky_Island/sickness_checks.json index 4be02267a6f7a..8c75e0d19458b 100644 --- a/data/mods/Sky_Island/sickness_checks.json +++ b/data/mods/Sky_Island/sickness_checks.json @@ -7,7 +7,7 @@ "condition": { "u_has_trait": "awayfromhome" }, "deactivate_condition": { "not": { "u_has_trait": "awayfromhome" } }, "effect": [ - { "math": [ "timeawayfromhome", "++" ] }, + { "math": [ "timeawayfromhome++" ] }, { "math": [ "readablepulsesleft = 9 - timeawayfromhome" ] }, { "math": [ "readablesicknessintervals = currentpulselength / 60" ] }, { "run_eocs": [ "EOC_sicknesscheck" ] } diff --git a/data/mods/TEST_DATA/EOC.json b/data/mods/TEST_DATA/EOC.json index c70b520b0c7a0..e4a0a77f69559 100644 --- a/data/mods/TEST_DATA/EOC.json +++ b/data/mods/TEST_DATA/EOC.json @@ -206,7 +206,7 @@ { "type": "effect_on_condition", "id": "EOC_until_nested", - "effect": [ { "math": [ "u_context", "++" ] }, { "math": [ "key1 = u_context" ] } ] + "effect": [ { "math": [ "u_context++" ] }, { "math": [ "key1 = u_context" ] } ] }, { "type": "effect_on_condition", @@ -520,7 +520,7 @@ "id": "EOC_math_test_greater_increment", "condition": { "math": [ "math_test > 0" ] }, "effect": [ { "math": [ "math_test", "+=", "1" ] } ], - "false_effect": [ { "math": [ "math_test", "--" ] } ] + "false_effect": [ { "math": [ "math_test--" ] } ] }, { "type": "effect_on_condition", @@ -592,7 +592,7 @@ "type": "effect_on_condition", "id": "EOC_increment_var", "//": "tests adding a variable to the player", - "effect": [ { "math": [ "u_activitiy_incrementer", "++" ] } ] + "effect": [ { "math": [ "u_activitiy_incrementer++" ] } ] }, { "type": "effect_on_condition", diff --git a/data/mods/TEST_DATA/addictions.json b/data/mods/TEST_DATA/addictions.json index 27735f9080ee0..f06b42b3d6e7b 100644 --- a/data/mods/TEST_DATA/addictions.json +++ b/data/mods/TEST_DATA/addictions.json @@ -12,7 +12,7 @@ { "math": [ "rand(10) < u_addiction_intensity('test_caffeine') * -10" ] } ] }, - "then": { "math": [ "u_val('stim')", "--" ] } + "then": { "math": [ "u_val('stim')--" ] } }, { "if": { diff --git a/data/mods/TEST_DATA/effect_on_condition.json b/data/mods/TEST_DATA/effect_on_condition.json index 67baea0281c22..5f33dc36880a9 100644 --- a/data/mods/TEST_DATA/effect_on_condition.json +++ b/data/mods/TEST_DATA/effect_on_condition.json @@ -51,12 +51,12 @@ { "type": "effect_on_condition", "id": "EOC_A", - "effect": [ { "math": [ "run_eocs_1", "++" ] } ] + "effect": [ { "math": [ "run_eocs_1++" ] } ] }, { "type": "effect_on_condition", "id": "EOC_B", - "effect": [ { "math": [ "run_eocs_1", "++" ] } ] + "effect": [ { "math": [ "run_eocs_1++" ] } ] }, { "type": "effect_on_condition", @@ -67,12 +67,12 @@ { "type": "effect_on_condition", "id": "EOC_C", - "effect": [ { "math": [ "run_eocs_2", "++" ] } ] + "effect": [ { "math": [ "run_eocs_2++" ] } ] }, { "type": "effect_on_condition", "id": "EOC_D", - "effect": [ { "math": [ "run_eocs_2", "++" ] } ] + "effect": [ { "math": [ "run_eocs_2++" ] } ] }, { "type": "effect_on_condition", @@ -83,12 +83,12 @@ { "type": "effect_on_condition", "id": "EOC_E", - "effect": [ { "math": [ "run_eocs_3", "++" ] } ] + "effect": [ { "math": [ "run_eocs_3++" ] } ] }, { "type": "effect_on_condition", "id": "EOC_F", - "effect": [ { "math": [ "run_eocs_3", "++" ] } ] + "effect": [ { "math": [ "run_eocs_3++" ] } ] }, { "type": "effect_on_condition", @@ -99,12 +99,12 @@ { "type": "effect_on_condition", "id": "EOC_I", - "effect": [ { "math": [ "run_eocs_5", "++" ] } ] + "effect": [ { "math": [ "run_eocs_5++" ] } ] }, { "type": "effect_on_condition", "id": "EOC_J", - "effect": [ { "math": [ "run_eocs_5", "++" ] } ] + "effect": [ { "math": [ "run_eocs_5++" ] } ] }, { "type": "effect_on_condition", @@ -168,17 +168,11 @@ "type": "effect_on_condition", "id": "EOC_compare_string_test", "effect": [ - { "if": { "compare_string": [ "yes", "yes" ] }, "then": { "math": [ "eoc_compare_string_test_1", "++" ] } }, - { "if": { "compare_string": [ "yes", "no" ] }, "else": { "math": [ "eoc_compare_string_test_2", "++" ] } }, - { - "if": { "compare_string": [ "yes", "yes", "yes" ] }, - "then": { "math": [ "eoc_compare_string_test_3", "++" ] } - }, - { - "if": { "compare_string": [ "yes", "yes", "no" ] }, - "then": { "math": [ "eoc_compare_string_test_4", "++" ] } - }, - { "if": { "compare_string": [ "yes", "no", "eh" ] }, "else": { "math": [ "eoc_compare_string_test_5", "++" ] } } + { "if": { "compare_string": [ "yes", "yes" ] }, "then": { "math": [ "eoc_compare_string_test_1++" ] } }, + { "if": { "compare_string": [ "yes", "no" ] }, "else": { "math": [ "eoc_compare_string_test_2++" ] } }, + { "if": { "compare_string": [ "yes", "yes", "yes" ] }, "then": { "math": [ "eoc_compare_string_test_3++" ] } }, + { "if": { "compare_string": [ "yes", "yes", "no" ] }, "then": { "math": [ "eoc_compare_string_test_4++" ] } }, + { "if": { "compare_string": [ "yes", "no", "eh" ] }, "else": { "math": [ "eoc_compare_string_test_5++" ] } } ] }, { @@ -187,23 +181,23 @@ "effect": [ { "if": { "compare_string_match_all": [ "yes", "yes" ] }, - "then": { "math": [ "eoc_compare_string_match_all_test_1", "++" ] } + "then": { "math": [ "eoc_compare_string_match_all_test_1++" ] } }, { "if": { "compare_string_match_all": [ "yes", "no" ] }, - "else": { "math": [ "eoc_compare_string_match_all_test_2", "++" ] } + "else": { "math": [ "eoc_compare_string_match_all_test_2++" ] } }, { "if": { "compare_string_match_all": [ "yes", "yes", "yes" ] }, - "then": { "math": [ "eoc_compare_string_match_all_test_3", "++" ] } + "then": { "math": [ "eoc_compare_string_match_all_test_3++" ] } }, { "if": { "compare_string_match_all": [ "yes", "yes", "no" ] }, - "else": { "math": [ "eoc_compare_string_match_all_test_4", "++" ] } + "else": { "math": [ "eoc_compare_string_match_all_test_4++" ] } }, { "if": { "compare_string_match_all": [ "yes", "no", "eh" ] }, - "else": { "math": [ "eoc_compare_string_match_all_test_5", "++" ] } + "else": { "math": [ "eoc_compare_string_match_all_test_5++" ] } } ] } diff --git a/data/mods/TropiCataclysm/items/comestibles/egg.json b/data/mods/TropiCataclysm/items/comestibles/egg.json index 74520d115e312..e3f015bf18bc3 100644 --- a/data/mods/TropiCataclysm/items/comestibles/egg.json +++ b/data/mods/TropiCataclysm/items/comestibles/egg.json @@ -1,20 +1,12 @@ [ - { - "type": "COMESTIBLE", - "id": "egg_quail", - "name": "quail egg", - "copy-from": "egg_guinea_fowl", - "rot_spawn": { "group": "GROUP_EGG_QUAIL" } - }, { "type": "COMESTIBLE", "id": "egg_rhea", - "name": "rhea egg", - "copy-from": "egg_guinea_fowl", - "volume": "600 ml", - "weight": "600 g", - "calories": 1000, - "rot_spawn": { "group": "GROUP_EGG_RHEA" } + "name": { "str": "greater rhea egg" }, + "spoils_in": "25 days", + "copy-from": "egg_chicken", + "proportional": { "volume": 12, "weight": 12, "calories": 12 }, + "rot_spawn": { "monster": "mon_rhea_chick" } }, { "type": "COMESTIBLE", @@ -22,7 +14,7 @@ "name": { "str": "toco toucan egg" }, "spoils_in": "9 days", "copy-from": "egg_crow", - "rot_spawn": { "group": "GROUP_EGG_TOUCAN" } + "rot_spawn": { "monster": "mon_toucan_chick" } }, { "type": "COMESTIBLE", @@ -30,7 +22,7 @@ "name": { "str": "white-eyed parakeet egg" }, "spoils_in": "13 days", "copy-from": "egg_bluejay", - "rot_spawn": { "group": "GROUP_EGG_PARROT" } + "rot_spawn": { "monster": "mon_parrot_chick" } }, { "type": "COMESTIBLE", @@ -38,63 +30,66 @@ "name": { "str": "blue-and-yellow macaw egg" }, "spoils_in": "13 days", "copy-from": "egg_crow", - "rot_spawn": { "group": "GROUP_EGG_MACAW" } + "rot_spawn": { "monster": "mon_macaw_chick" } }, { "type": "COMESTIBLE", "id": "egg_finch_saffron", "name": { "str": "saffron finch egg" }, "copy-from": "egg_waxwing", - "rot_spawn": { "group": "GROUP_EGG_FINCH_SAFFRON" } + "rot_spawn": { "monster": "mon_finch_saffron_chick" } }, { "type": "COMESTIBLE", "id": "egg_great_kiskadee", "name": { "str": "great kiskadee egg" }, "copy-from": "egg_bluejay", - "rot_spawn": { "group": "GROUP_EGG_GREAT_KISKADEE" } + "rot_spawn": { "monster": "mon_great_kiskadee_chick" } }, { "type": "COMESTIBLE", "id": "egg_rufous_hornero", "name": { "str": "rufous hornero egg" }, "copy-from": "egg_waxwing", - "rot_spawn": { "group": "GROUP_EGG_RUFOUS_HORNERO" } + "rot_spawn": { "monster": "mon_rufous_hornero_chick" } }, { "type": "COMESTIBLE", "id": "egg_tinamou", - "name": "tinamou egg", - "copy-from": "egg_chicken", - "rot_spawn": { "group": "GROUP_EGG_TINAMOU", "chance": 70 } + "name": { "str": "small-billed tinamou egg" }, + "copy-from": "egg_bluejay", + "rot_spawn": { "monster": "mon_tinamou_chick" } }, { "type": "COMESTIBLE", "id": "egg_seriema", - "name": "seriema egg", - "copy-from": "egg_chicken", - "rot_spawn": { "group": "GROUP_EGG_SERIEMA", "chance": 70 } + "name": { "str": "red-legged seriema egg" }, + "spoils_in": "15 days", + "copy-from": "egg_guinea_fowl", + "rot_spawn": { "monster": "mon_seriema_chick" } }, { "type": "COMESTIBLE", "id": "egg_chachalaca", - "name": "chachalaca egg", - "copy-from": "egg_chicken", - "rot_spawn": { "group": "GROUP_EGG_CHACHALACA", "chance": 70 } + "name": { "str": "Chaco chachalaca egg" }, + "spoils_in": "12 days", + "copy-from": "egg_crow", + "rot_spawn": { "monster": "mon_chachalaca_chick" } }, { "type": "COMESTIBLE", "id": "egg_guan", - "name": "guan egg", + "name": { "str": "dusky-legged guan egg" }, + "spoils_in": "14 days", "copy-from": "egg_chicken", - "rot_spawn": { "group": "GROUP_EGG_GUAN", "chance": 70 } + "rot_spawn": { "monster": "mon_guan_chick" } }, { "type": "COMESTIBLE", "id": "egg_curassow", - "name": "curassow egg", - "copy-from": "egg_chicken", - "rot_spawn": { "group": "GROUP_EGG_CURASSOW", "chance": 70 } + "name": { "str": "bare-faced curassow egg" }, + "copy-from": "egg_crow", + "rot_spawn": { "monster": "mon_curassow_chick" } }, { "type": "COMESTIBLE", diff --git a/data/mods/TropiCataclysm/monstergroups/eggs.json b/data/mods/TropiCataclysm/monstergroups/eggs.json index 8a5badad3637c..96f3f4182f3b8 100644 --- a/data/mods/TropiCataclysm/monstergroups/eggs.json +++ b/data/mods/TropiCataclysm/monstergroups/eggs.json @@ -1,69 +1,4 @@ [ - { - "name": "GROUP_EGG_QUAIL", - "type": "monstergroup", - "monsters": [ { "monster": "mon_quail_chick" } ] - }, - { - "name": "GROUP_EGG_RHEA", - "type": "monstergroup", - "monsters": [ { "monster": "mon_rhea_chick" } ] - }, - { - "name": "GROUP_EGG_TOUCAN", - "type": "monstergroup", - "monsters": [ { "monster": "mon_toucan_chick" } ] - }, - { - "name": "GROUP_EGG_PARROT", - "type": "monstergroup", - "monsters": [ { "monster": "mon_parrot_chick" } ] - }, - { - "name": "GROUP_EGG_MACAW", - "type": "monstergroup", - "monsters": [ { "monster": "mon_macaw_chick" } ] - }, - { - "name": "GROUP_EGG_FINCH_SAFFRON", - "type": "monstergroup", - "monsters": [ { "monster": "mon_finch_saffron_chick" } ] - }, - { - "name": "GROUP_EGG_GREAT_KISKADEE", - "type": "monstergroup", - "monsters": [ { "monster": "mon_great_kiskadee_chick" } ] - }, - { - "name": "GROUP_EGG_RUFOUS_HORNERO", - "type": "monstergroup", - "monsters": [ { "monster": "mon_rufous_hornero_chick" } ] - }, - { - "name": "GROUP_EGG_TINAMOU", - "type": "monstergroup", - "monsters": [ { "monster": "mon_tinamou_chick" } ] - }, - { - "name": "GROUP_EGG_SERIEMA", - "type": "monstergroup", - "monsters": [ { "monster": "mon_seriema_chick" } ] - }, - { - "name": "GROUP_EGG_CHACHALACA", - "type": "monstergroup", - "monsters": [ { "monster": "mon_chachalaca_chick" } ] - }, - { - "name": "GROUP_EGG_GUAN", - "type": "monstergroup", - "monsters": [ { "monster": "mon_guan_chick" } ] - }, - { - "name": "GROUP_EGG_CURASSOW", - "type": "monstergroup", - "monsters": [ { "monster": "mon_curassow_chick" } ] - }, { "name": "GROUP_EGG_CONSTRICTOR", "type": "monstergroup", diff --git a/data/mods/TropiCataclysm/monstergroups/misc.json b/data/mods/TropiCataclysm/monstergroups/misc.json index f78a706d1dc90..81e9059056c25 100644 --- a/data/mods/TropiCataclysm/monstergroups/misc.json +++ b/data/mods/TropiCataclysm/monstergroups/misc.json @@ -7,8 +7,7 @@ "monsters": [ { "monster": "mon_llama", "weight": 50, "cost_multiplier": 25, "pack_size": [ 1, 8 ] }, { "monster": "mon_camel", "weight": 50, "cost_multiplier": 25, "pack_size": [ 1, 4 ] }, - { "monster": "mon_guinea_pig", "weight": 10, "cost_multiplier": 25, "pack_size": [ 1, 6 ] }, - { "monster": "mon_quail", "weight": 50, "cost_multiplier": 10, "pack_size": [ 1, 16 ] } + { "monster": "mon_guinea_pig", "weight": 10, "cost_multiplier": 25, "pack_size": [ 1, 6 ] } ] }, { @@ -21,7 +20,6 @@ { "monster": "mon_capybara", "weight": 10 }, { "monster": "mon_guinea_pig", "weight": 10 }, { "monster": "mon_bushdog", "weight": 10 }, - { "monster": "mon_quail", "weight": 10 }, { "monster": "mon_camel", "weight": 10 }, { "monster": "mon_boa", "weight": 10 }, { "monster": "mon_anaconda", "weight": 10 } diff --git a/data/mods/TropiCataclysm/monstergroups/wilderness.json b/data/mods/TropiCataclysm/monstergroups/wilderness.json index ae49b34f86085..e2513bd16893c 100644 --- a/data/mods/TropiCataclysm/monstergroups/wilderness.json +++ b/data/mods/TropiCataclysm/monstergroups/wilderness.json @@ -37,7 +37,6 @@ { "monster": "mon_guinea_pig", "weight": 12, "cost_multiplier": 2, "pack_size": [ 1, 6 ] }, { "monster": "mon_rhea", "weight": 12, "cost_multiplier": 2, "pack_size": [ 1, 10 ] }, { "monster": "mon_kangaroo_wallaby", "weight": 12, "cost_multiplier": 2, "pack_size": [ 1, 10 ] }, - { "monster": "mon_quail", "weight": 15, "cost_multiplier": 0, "pack_size": [ 1, 7 ] }, { "monster": "mon_iguana", "weight": 15, "cost_multiplier": 10 }, { "monster": "mon_basiliscus", "weight": 15, "cost_multiplier": 10 }, { "monster": "mon_corytophanes", "weight": 15, "cost_multiplier": 10 }, diff --git a/data/mods/TropiCataclysm/monsters/tropical_bird.json b/data/mods/TropiCataclysm/monsters/tropical_bird.json index 80c8052e36cef..e44f7cb877f86 100644 --- a/data/mods/TropiCataclysm/monsters/tropical_bird.json +++ b/data/mods/TropiCataclysm/monsters/tropical_bird.json @@ -2,83 +2,42 @@ { "id": "mon_rhea", "type": "MONSTER", - "name": { "str": "rhea" }, - "description": "A distant relative of the Ostrich and the Emu. Found only on the grasslands and other dry places of South America.", - "default_faction": "small_animal", - "bodytype": "bird", - "categories": [ "WILDLIFE" ], - "species": [ "BIRD" ], - "volume": "40 L", - "weight": "40750 g", - "hp": 30, - "speed": 140, + "name": { "str": "greater rhea" }, + "description": "A distant relative of emus and African ostriches. Found in the grasslands and various other open regions of South America.", + "copy-from": "mon_bird_flightless_base", + "default_faction": "herbivore", + "volume": "42670 ml", + "weight": "32 kg", + "hp": 50, + "speed": 150, "material": [ "flesh" ], - "symbol": "r", + "symbol": "R", "color": "brown", - "aggression": -10, - "morale": 25, - "melee_dice": 1, - "melee_dice_sides": 1, - "melee_damage": [ { "damage_type": "cut", "amount": 1 } ], - "dodge": 3, + "aggression": 0, + "morale": 40, + "melee_dice": 3, + "melee_dice_sides": 3, + "melee_damage": [ { "damage_type": "cut", "amount": 4 } ], + "dodge": 2, "harvest": "bird_large", - "vision_day": 50, - "fear_triggers": [ "PLAYER_CLOSE", "FRIEND_DIED", "FIRE", "HURT" ], - "reproduction": { "baby_type": { "baby_egg": "egg_rhea" }, "baby_count": 22, "baby_timer": 10 }, - "biosignature": { "biosig_item": "feces_bird", "biosig_timer": 8 }, - "petfood": { - "food": [ "BIRDFOOD" ], - "feed": "The %s seems to like you! It runs around your legs and seems friendly.", - "pet": "The %s runs around your leg." - }, - "flags": [ "SEES", "HEARS", "SMELLS", "ANIMAL", "PATH_AVOID_DANGER", "WARM" ] - }, - { - "id": "mon_quail", - "type": "MONSTER", - "name": { "str": "quail" }, - "description": "The common quail is one of the smallest domestic birds used for meat and eggs. It originated in Eurasia but can be found worldwide and is raised sometimes for hunting or as an ornamental bird.", - "bodytype": "bird", - "default_faction": "small_animal", - "categories": [ "WILDLIFE" ], - "species": [ "BIRD" ], - "volume": "1 L", - "weight": "96 g", - "hp": 4, - "speed": 150, - "material": [ "flesh" ], - "symbol": "v", - "color": "dark_gray", - "aggression": -99, - "morale": 10, - "melee_dice": 1, - "melee_dice_sides": 1, - "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], - "dodge": 4, - "harvest": "bird_tiny", - "fear_triggers": [ "SOUND", "PLAYER_CLOSE", "FRIEND_ATTACKED", "FRIEND_DIED", "FIRE", "HURT" ], - "reproduction": { "baby_type": { "baby_egg": "egg_quail" }, "baby_count": 7, "baby_timer": 10 }, - "biosignature": { "biosig_item": "feces_bird", "biosig_timer": 4 }, - "petfood": { - "food": [ "BIRDFOOD" ], - "feed": "The %s seems to like you! It runs around your legs and seems friendly.", - "pet": "The %s runs around your leg." - }, - "flags": [ "SEES", "HEARS", "SMELLS", "ANIMAL", "PATH_AVOID_DANGER", "WARM", "FLIES", "SWARMS" ] - }, - { - "id": "mon_quail_chick", - "type": "MONSTER", - "copy-from": "mon_chicken_chick", - "name": { "str": "brown chick" }, - "upgrades": { "age_grow": 12, "into": "mon_quail" } + "dissect": "dissect_bird_sample_small", + "anger_triggers": [ "PLAYER_NEAR_BABY" ], + "reproduction": { "baby_type": { "baby_egg": "egg_rhea" }, "baby_count": 10, "baby_timer": 40 }, + "//": "Clutch sizes are higher, but those are clutch sizes for nests, and nests can contain eggs from multiple females.", + "baby_flags": [ "SUMMER", "AUTUMN" ], + "delete": { "flags": [ "SWARMS", "SMALL_HIDER" ] } }, { "id": "mon_rhea_chick", "type": "MONSTER", - "copy-from": "mon_chicken_chick", - "name": { "str": "brown chick" }, - "upgrades": { "age_grow": 18, "into": "mon_rhea" } + "copy-from": "mon_generic_chick", + "name": { "str": "greater rhea chick" }, + "description": "A miniature rhea. The appearance of it is distinct enough to easily identify.", + "volume": "600 ml", + "weight": "450 g", + "//1": "Sources say day-1 hatchlings weigh around 75% of their egg mass.", + "upgrades": { "age_grow": 180, "into": "mon_rhea" }, + "//2": "6 months to reach adult size." }, { "id": "mon_toucan", @@ -88,7 +47,6 @@ "copy-from": "mon_bird_flying_base", "volume": "867 ml", "weight": "650 g", - "hp": 6, "color": "brown", "reproduction": { "baby_type": { "baby_egg": "egg_toucan" }, "baby_count": 4, "baby_timer": 63 } }, @@ -105,6 +63,7 @@ "name": { "str": "white-eyed parakeet" }, "description": "A small bird with bright green-colored plumage and a short hooked beak. This species is widespread throughout all of South America, on top of being quite intelligent and sometimes kept as pets.", "copy-from": "mon_bird_flying_base", + "default_faction": "bird_tiny_flying", "volume": "220 ml", "weight": "165 g", "color": "light_green", @@ -130,7 +89,7 @@ "copy-from": "mon_bird_flying_base", "volume": "1800 ml", "weight": "1350 g", - "hp": 8, + "hp": 3, "color": "light_blue", "reproduction": { "baby_type": { "baby_egg": "egg_macaw" }, "baby_count": 3, "baby_timer": 116 } }, @@ -152,6 +111,7 @@ "name": { "str": "saffron finch", "str_pl": "saffron finches" }, "description": "A tiny, golden bird bopping around in the canopy of trees. Its cone-shaped bill tells you it s a seed eater.", "copy-from": "mon_bird_flying_base", + "default_faction": "bird_tiny_flying", "color": "yellow", "volume": "27 ml", "weight": "20 g", @@ -170,6 +130,7 @@ "name": { "str": "great kiskadee" }, "description": "This large flycatcher has a black crown, prominent white eye stripe and a dominantly yellow body. At almost a foot long, it swoops up a variety of flying insects.", "copy-from": "mon_bird_flying_base", + "default_faction": "bird_tiny_flying", "color": "yellow", "volume": "80 ml", "weight": "60 g", @@ -188,6 +149,7 @@ "name": { "str": "rufous hornero" }, "description": "A drab, robin-sized ground bird with startling red eyes. More often spotted are their odd oven shaped nests.", "copy-from": "mon_bird_flying_base", + "default_faction": "bird_tiny_flying", "volume": "60 ml", "weight": "45 g", "reproduction": { "baby_type": { "baby_egg": "egg_rufous_hornero" }, "baby_count": 4, "baby_timer": 44 } @@ -201,131 +163,100 @@ { "id": "mon_tinamou", "type": "MONSTER", - "name": { "str": "tinamou" }, - "description": "One of several species of the Tinamidae family. These birds converged into shapes similar to fowl but are actually more closely related to the extinct moas.", - "default_faction": "small_animal", - "bodytype": "bird", - "categories": [ "WILDLIFE" ], - "species": [ "BIRD" ], - "volume": "2 L", - "weight": "1100 g", - "hp": 5, - "speed": 110, - "material": [ "flesh" ], - "symbol": "v", - "color": "brown", - "aggression": -15, - "morale": 25, - "melee_dice": 1, - "melee_dice_sides": 1, - "melee_damage": [ { "damage_type": "cut", "amount": 1 } ], - "dodge": 3, - "harvest": "bird_small", - "vision_day": 50, - "fear_triggers": [ "PLAYER_CLOSE", "FRIEND_DIED", "FIRE", "HURT" ], - "reproduction": { "baby_type": { "baby_egg": "egg_tinamou" }, "baby_count": 6, "baby_timer": 10 }, - "biosignature": { "biosig_item": "feces_bird", "biosig_timer": 8 }, - "flags": [ "SEES", "HEARS", "SMELLS", "ANIMAL", "PATH_AVOID_DANGER", "WARM" ] + "name": { "str": "small-billed tinamou" }, + "description": "One of several species of tinamous present in Brazil. Although these birds converged into shapes similar to domestic fowl, they are more closely related to the extinct moas, though unlike them, tinamous are capable of flight.", + "copy-from": "mon_bird_flying_base", + "default_faction": "bird_tiny_flying", + "volume": "135 ml", + "weight": "100 g", + "reproduction": { "baby_type": { "baby_egg": "egg_tinamou" }, "baby_count": 4, "baby_timer": 45 }, + "//": "4 broods a year, and we're assuming they're breeding only for half a year. Clutch sizes per nest can reach 16 eggs, but these can be eggs from up to 4 females, so we're taking an average." + }, + { + "id": "mon_tinamou_chick", + "type": "MONSTER", + "copy-from": "mon_generic_chick_tiny", + "upgrades": { "age_grow": 21, "into": "mon_tinamou" }, + "//": "3 weeks to reach independence." }, { "id": "mon_seriema", "type": "MONSTER", - "name": { "str": "seriema" }, + "name": { "str": "red-legged seriema" }, "description": "A medium sized bird with long legs and a small crest. It lives on the grasslands of South America and is considered the only living relative of the extinct terror birds.", - "default_faction": "small_animal", - "bodytype": "bird", - "categories": [ "WILDLIFE" ], - "species": [ "BIRD" ], - "volume": "3000 ml", - "weight": "3000 g", - "hp": 15, - "speed": 140, - "material": [ "flesh" ], + "copy-from": "mon_bird_flightless_base", + "volume": "2467 ml", + "weight": "1850 g", + "hp": 5, + "speed": 180, "symbol": "s", "color": "brown", - "aggression": -50, - "morale": 60, - "melee_skill": 5, - "melee_dice": 1, - "melee_dice_sides": 4, - "melee_damage": [ { "damage_type": "cut", "amount": 4 } ], - "dodge": 3, "harvest": "bird_small", "vision_day": 50, - "anger_triggers": [ "HURT", "PLAYER_CLOSE" ], - "fear_triggers": [ "PLAYER_CLOSE" ], - "reproduction": { "baby_type": { "baby_egg": "egg_seriema" }, "baby_count": 6, "baby_timer": 10 }, - "biosignature": { "biosig_item": "feces_bird", "biosig_timer": 8 }, - "flags": [ "SEES", "HEARS", "SMELLS", "ANIMAL", "PATH_AVOID_DANGER", "WARM" ] - }, - { - "id": "mon_chachalaca", - "type": "MONSTER", - "copy-from": "mon_tinamou", - "name": { "str": "chachalaca" }, - "description": "A bird belonging to the Cracidae family. They resemble turkeys to a degree and live on scrubby habitats.", - "volume": "2 L", - "weight": "1100 g", - "hp": 5, - "speed": 110, - "color": "brown", - "reproduction": { "baby_type": { "baby_egg": "egg_chachalaca" }, "baby_count": 2, "baby_timer": 6 }, - "baby_flags": [ "SPRING", "SUMMER" ], - "biosignature": { "biosig_item": "feces_bird", "biosig_timer": 8 } + "reproduction": { "baby_type": { "baby_egg": "egg_seriema" }, "baby_count": 3, "baby_timer": 150 }, + "//": "2-3 eggs. 30 days of incubation + 4-5 months for the chick to reach adult plumage." }, { - "id": "mon_guan", + "id": "mon_seriema_chick", "type": "MONSTER", - "copy-from": "mon_tinamou", - "name": { "str": "guan" }, - "description": "A bird belonging to the Cracidae family. They resemble turkeys to a degree and live on forested areas.", - "reproduction": { "baby_type": { "baby_egg": "egg_guan" }, "baby_count": 2, "baby_timer": 6 }, - "baby_flags": [ "SPRING", "SUMMER" ], - "biosignature": { "biosig_item": "feces_bird", "biosig_timer": 8 } + "copy-from": "mon_generic_chick", + "upgrades": { "age_grow": 120, "into": "mon_seriema" }, + "//": "4-5 months to reach adult plumage." }, { - "id": "mon_curassow", + "id": "mon_chachalaca", "type": "MONSTER", - "copy-from": "mon_tinamou", - "name": { "str": "curassow" }, - "description": "A bird belonging to the Cracidae family. They resemble turkeys to a degree and live on forested areas, easily distinguished by their crested heads.", - "reproduction": { "baby_type": { "baby_egg": "egg_curassow" }, "baby_count": 2, "baby_timer": 6 }, - "baby_flags": [ "SPRING", "SUMMER" ], - "biosignature": { "biosig_item": "feces_bird", "biosig_timer": 8 } + "name": { "str": "Chaco chachalaca" }, + "description": "Though its face looks oddly like a chicken's, complete with red wattle, this tan bird sounds nothing like one as it lets out raucous cries of 'chata-ra-ta.'", + "copy-from": "mon_bird_flying_base", + "volume": "767 ml", + "weight": "575 g", + "color": "brown", + "reproduction": { "baby_type": { "baby_egg": "egg_chachalaca" }, "baby_count": 4, "baby_timer": 175 }, + "//": "2-4 eggs per clutch. No info I could get on anything else for this species so we're going with plain chachalacas' values instead." }, { - "id": "mon_tinamou_chick", + "id": "mon_chachalaca_chick", "type": "MONSTER", - "copy-from": "mon_chicken_chick", - "name": { "str": "brown chick" }, - "upgrades": { "age_grow": 10, "into": "mon_tinamou" } + "copy-from": "mon_generic_chick", + "upgrades": { "age_grow": 150, "into": "mon_chachalaca" }, + "//": "Nothing about this species specifically, but plain chachalacas' breed between March and September with chicks staying with their parents until October -> we're taking an average of about 5 months to reach independence." }, { - "id": "mon_chachalaca_chick", + "id": "mon_guan", "type": "MONSTER", - "copy-from": "mon_chicken_chick", - "name": { "str": "brown chick" }, - "upgrades": { "age_grow": 10, "into": "mon_chachalaca" } + "name": { "str": "dusky-legged guan" }, + "description": "A medium-sized speckled bird. Its bright orange wattle contrasts sharply with the rest of its brown body.", + "copy-from": "mon_bird_flying_base", + "volume": "1600 ml", + "weight": "1200 g", + "hp": 3, + "harvest": "bird_small", + "reproduction": { "baby_type": { "baby_egg": "egg_guan" }, "baby_count": 2, "baby_timer": 208 } }, { "id": "mon_guan_chick", "type": "MONSTER", - "copy-from": "mon_chicken_chick", - "name": { "str": "brown chick" }, - "upgrades": { "age_grow": 10, "into": "mon_guan" } + "copy-from": "mon_generic_chick", + "upgrades": { "age_grow": 180, "into": "mon_guan" }, + "//": "Some sources say 6-8 months to reach independence for most guan chicks (others say 2 years, who do I trust?)" }, { - "id": "mon_curassow_chick", + "id": "mon_curassow", "type": "MONSTER", - "copy-from": "mon_chicken_chick", - "name": { "str": "brown chick" }, - "upgrades": { "age_grow": 10, "into": "mon_curassow" } + "name": { "str": "bare-faced curassow" }, + "description": "This black bird carries itself oddly proudly, despite the ridiculous mohawk-like fringe on the top of its head.", + "copy-from": "mon_bird_flying_base", + "volume": "2667 ml", + "weight": "2 kg", + "hp": 5, + "harvest": "bird_small", + "reproduction": { "baby_type": { "baby_egg": "egg_curassow" }, "baby_count": 2, "baby_timer": 395 } }, { - "id": "mon_seriema_chick", + "id": "mon_curassow_chick", "type": "MONSTER", - "copy-from": "mon_chicken_chick", - "name": { "str": "brown chick" }, - "upgrades": { "age_grow": 10, "into": "mon_seriema" } + "copy-from": "mon_generic_chick", + "upgrades": { "age_grow": 365, "into": "mon_curassow" } } ] diff --git a/data/mods/TropiCataclysm/obsoletion_and_migration_0.I/migration_items.json b/data/mods/TropiCataclysm/obsoletion_and_migration_0.I/migration_items.json index aea58015da2ae..0479306e8f90b 100644 --- a/data/mods/TropiCataclysm/obsoletion_and_migration_0.I/migration_items.json +++ b/data/mods/TropiCataclysm/obsoletion_and_migration_0.I/migration_items.json @@ -13,5 +13,10 @@ "id": "egg_flamingo", "type": "MIGRATION", "replace": "egg_duck" + }, + { + "id": "egg_quail", + "type": "MIGRATION", + "replace": "egg_guinea_fowl" } ] diff --git a/data/mods/TropiCataclysm/requirements.json b/data/mods/TropiCataclysm/requirements.json index c36166ca233d0..83f148e6f19dd 100644 --- a/data/mods/TropiCataclysm/requirements.json +++ b/data/mods/TropiCataclysm/requirements.json @@ -5,12 +5,18 @@ "extend": { "components": [ [ + [ "egg_rhea", 1 ], + [ "egg_seriema", 1 ], + [ "egg_guan", 1 ], + [ "egg_curassow", 1 ], [ "egg_toucan", 3 ], - [ "egg_parrot", 6 ], [ "egg_macaw", 3 ], + [ "egg_chachalaca", 3 ], + [ "egg_parrot", 6 ], + [ "egg_great_kiskadee", 6 ], + [ "egg_tinamou", 6 ], [ "egg_rufous_hornero", 20 ], - [ "egg_finch_saffron", 20 ], - [ "egg_great_kiskadee", 6 ] + [ "egg_finch_saffron", 20 ] ] ] } diff --git a/data/mods/Xedra_Evolved/enchantments/armor.json b/data/mods/Xedra_Evolved/enchantments/armor.json index 7df85a9ffcec7..1aa2cf9859b2e 100644 --- a/data/mods/Xedra_Evolved/enchantments/armor.json +++ b/data/mods/Xedra_Evolved/enchantments/armor.json @@ -107,7 +107,7 @@ "id": "INCREASE_BERSERKER", "condition": { "u_has_items": { "item": "dreamforged_knuckle_berserk", "count": 1 } }, "deactivate_condition": { "not": { "u_has_items": { "item": "dreamforged_knuckle_berserk", "count": 1 } } }, - "effect": [ { "u_message": "BERSERK +1.", "type": "debug" }, { "math": [ "BERSERKER", "++" ] } ] + "effect": [ { "u_message": "BERSERK +1.", "type": "debug" }, { "math": [ "BERSERKER++" ] } ] }, { "type": "effect_on_condition", @@ -142,13 +142,20 @@ "ench_effects": [ { "effect": "effect_subtle_spell_flag", "intensity": 1 } ] }, { - "id": "ench_verdant_boots", + "id": "ench_verdant_legs", "type": "enchantment", "has": "WORN", "condition": "ALWAYS", "values": [ { "value": "FOOTSTEP_NOISE", "multiply": -0.6 } ], "ench_effects": [ { "effect": "effect_steady_flag", "intensity": 1 }, { "effect": "effect_sludge_immune_flag", "intensity": 1 } ] }, + { + "id": "ench_verdant_boots", + "type": "enchantment", + "has": "WORN", + "condition": "ALWAYS", + "values": [ { "value": "REGEN_STAMINA", "multiply": 0.25 } ] + }, { "id": "ench_verdant_cloak", "type": "enchantment", diff --git a/data/mods/Xedra_Evolved/eocs/abyssal_hunger_eocs.json b/data/mods/Xedra_Evolved/eocs/abyssal_hunger_eocs.json index 3bb26cb1903d2..eed7fe5613e0a 100644 --- a/data/mods/Xedra_Evolved/eocs/abyssal_hunger_eocs.json +++ b/data/mods/Xedra_Evolved/eocs/abyssal_hunger_eocs.json @@ -41,7 +41,7 @@ "id": "EOC_ENTER_ABYSSAL_HUNGER_NEXT_LEVEL", "condition": { "math": [ "abyssal_hunger_level < 5" ] }, "effect": [ - { "math": [ "abyssal_hunger_level", "++" ] }, + { "math": [ "abyssal_hunger_level++" ] }, { "mapgen_update": "abyssal_hunger_cleanup", "target_var": { "global_val": "dungeon_loc" } }, { "u_teleport": { "global_val": "dungeon_start" }, "fail_message": "Something is very wrong!", "force": true }, { "mapgen_update": "abyssal_hunger_dungeon", "target_var": { "global_val": "dungeon_loc" } }, @@ -66,7 +66,7 @@ { "u_message": "You move through the monster's innards and reach another empty space." } ], "false_effect": [ - { "math": [ "abyssal_hunger_level", "++" ] }, + { "math": [ "abyssal_hunger_level++" ] }, { "mapgen_update": "abyssal_hunger_cleanup", "target_var": { "global_val": "dungeon_loc" } }, { "u_teleport": { "global_val": "dungeon_start" }, "fail_message": "Something is very wrong!", "force": true }, { "mapgen_update": "abyssal_hunger_brain", "target_var": { "global_val": "dungeon_loc" } }, diff --git a/data/mods/Xedra_Evolved/eocs/dreamsmith.json b/data/mods/Xedra_Evolved/eocs/dreamsmith.json index be42cbadeb765..fcc68c54a498a 100644 --- a/data/mods/Xedra_Evolved/eocs/dreamsmith.json +++ b/data/mods/Xedra_Evolved/eocs/dreamsmith.json @@ -36,9 +36,9 @@ "condition": { "and": [ { "u_has_trait": "DREAMSMITH" }, { "test_eoc": "EOC_CONDITION_BANNED_DREAM_MAGIC_TRAITS" } ] }, "effect": [ { "math": [ "DREAMSMITH_RECIPE_SCORE", "+=", "DREAMSMITH_RECIPE_SCORE_TRAINS" ] }, - { "math": [ "DREAMSMITH_RECIPE_SCORE_TRAINS", "++" ] }, + { "math": [ "DREAMSMITH_RECIPE_SCORE_TRAINS++" ] }, { "math": [ "DREAMSMITH_RECIPE_SCORE_SUPER", "+=", "DREAMSMITH_RECIPE_SCORE_TRAINS_SUPER" ] }, - { "math": [ "DREAMSMITH_RECIPE_SCORE_TRAINS_SUPER", "++" ] }, + { "math": [ "DREAMSMITH_RECIPE_SCORE_TRAINS_SUPER++" ] }, { "run_eocs": "EOC_DREAMSMITHS_RECIPES_ENCH" }, { "run_eocs": "EOC_DREAMSMITHS_RECIPES_SUPER" } ], diff --git a/data/mods/Xedra_Evolved/eocs/eoc_mod_overrides.json b/data/mods/Xedra_Evolved/eocs/eoc_mod_overrides.json index 49d1812be6cf5..a24f69288f245 100644 --- a/data/mods/Xedra_Evolved/eocs/eoc_mod_overrides.json +++ b/data/mods/Xedra_Evolved/eocs/eoc_mod_overrides.json @@ -2,11 +2,13 @@ { "type": "effect_on_condition", "id": "EOC_CONDITIONS_LILIN_DINOMOD_RUACH_DRAIN", + "condition": { "math": [ "false" ] }, "effect": [ ] }, { "type": "effect_on_condition", "id": "EOC_CONDITIONS_LILIN_FANTASY_SPECIES_RUACH_DRAIN", + "condition": { "math": [ "false" ] }, "effect": [ ] } ] diff --git a/data/mods/Xedra_Evolved/eocs/eoc_riddles.json b/data/mods/Xedra_Evolved/eocs/eoc_riddles.json index f53400578b46b..b709d9099dc6e 100644 --- a/data/mods/Xedra_Evolved/eocs/eoc_riddles.json +++ b/data/mods/Xedra_Evolved/eocs/eoc_riddles.json @@ -34,7 +34,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_01", "effect": [ - { "math": [ "xe_riddle_01", "--" ] }, + { "math": [ "xe_riddle_01--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "All or Nothing?", "names": [ "All", "Nothing" ] } ] }, @@ -42,7 +42,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_02", "effect": [ - { "math": [ "xe_riddle_02", "--" ] }, + { "math": [ "xe_riddle_02--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "Dead or Alive?", "names": [ "Dead", "Alive" ] } ] }, @@ -50,7 +50,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_03", "effect": [ - { "math": [ "xe_riddle_03", "--" ] }, + { "math": [ "xe_riddle_03--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "Deep or Shallow?", "names": [ "Deep", "Shallow" ] } ] }, @@ -58,7 +58,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_04", "effect": [ - { "math": [ "xe_riddle_04", "--" ] }, + { "math": [ "xe_riddle_04--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "Dusk or Dawn?", "names": [ "Dusk", "Dawn" ] } ] }, @@ -66,7 +66,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_05", "effect": [ - { "math": [ "xe_riddle_05", "--" ] }, + { "math": [ "xe_riddle_05--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "Enemy or Friend?", "names": [ "Enemy", "Friend" ] } ] }, @@ -74,7 +74,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_06", "effect": [ - { "math": [ "xe_riddle_06", "--" ] }, + { "math": [ "xe_riddle_06--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "Even or Odd?", "names": [ "Even", "Odd" ] } ] }, @@ -82,7 +82,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_07", "effect": [ - { "math": [ "xe_riddle_07", "--" ] }, + { "math": [ "xe_riddle_07--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "Fail or Success?", "names": [ "Fail", "Success" ] } ] }, @@ -90,7 +90,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_08", "effect": [ - { "math": [ "xe_riddle_08", "--" ] }, + { "math": [ "xe_riddle_08--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "Guilty or Innocent?", @@ -102,7 +102,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_09", "effect": [ - { "math": [ "xe_riddle_09", "--" ] }, + { "math": [ "xe_riddle_09--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "Hero or Coward?", "names": [ "Hero", "Coward" ] } ] }, @@ -110,7 +110,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_10", "effect": [ - { "math": [ "xe_riddle_10", "--" ] }, + { "math": [ "xe_riddle_10--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "Hope or Despair?", "names": [ "Hope", "Despair" ] } ] }, @@ -118,7 +118,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_11", "effect": [ - { "math": [ "xe_riddle_11", "--" ] }, + { "math": [ "xe_riddle_11--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "Inner or Outer?", "names": [ "Inner", "Outer" ] } ] }, @@ -126,7 +126,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_12", "effect": [ - { "math": [ "xe_riddle_12", "--" ] }, + { "math": [ "xe_riddle_12--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "Victory or Defeat?", @@ -138,7 +138,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_13", "effect": [ - { "math": [ "xe_riddle_13", "--" ] }, + { "math": [ "xe_riddle_13--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "Madness or Sanity?", @@ -150,7 +150,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_14", "effect": [ - { "math": [ "xe_riddle_14", "--" ] }, + { "math": [ "xe_riddle_14--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "Oppressed or Oppressor?", @@ -162,7 +162,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_15", "effect": [ - { "math": [ "xe_riddle_15", "--" ] }, + { "math": [ "xe_riddle_15--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "Rapid or Slow?", "names": [ "Rapid", "Slow" ] } ] }, @@ -170,7 +170,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_16", "effect": [ - { "math": [ "xe_riddle_16", "--" ] }, + { "math": [ "xe_riddle_16--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "Remember or Forget?", @@ -182,7 +182,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_17", "effect": [ - { "math": [ "xe_riddle_17", "--" ] }, + { "math": [ "xe_riddle_17--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "The Beginning or The End?", @@ -194,7 +194,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_18", "effect": [ - { "math": [ "xe_riddle_18", "--" ] }, + { "math": [ "xe_riddle_18--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "Truth or Lie?", "names": [ "Truth", "Lie" ] } ] }, @@ -202,7 +202,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_19", "effect": [ - { "math": [ "xe_riddle_19", "--" ] }, + { "math": [ "xe_riddle_19--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "War or Peace?", "names": [ "War", "Peace" ] } ] }, @@ -210,7 +210,7 @@ "type": "effect_on_condition", "id": "EOC_XE_RIDDLE_20", "effect": [ - { "math": [ "xe_riddle_20", "--" ] }, + { "math": [ "xe_riddle_20--" ] }, { "run_eoc_selector": [ "EOC_NONE", "EOC_NONE" ], "title": "Yes or No?", "names": [ "Yes", "No" ] } ] }, diff --git a/data/mods/Xedra_Evolved/eocs/give_a_class_eoc.json b/data/mods/Xedra_Evolved/eocs/give_a_class_eoc.json index 71cc40e0e662a..1828af00591d4 100644 --- a/data/mods/Xedra_Evolved/eocs/give_a_class_eoc.json +++ b/data/mods/Xedra_Evolved/eocs/give_a_class_eoc.json @@ -33,7 +33,7 @@ { "math": [ "inventor_dreamsmith_sequence == 0" ] } ] }, - "then": [ { "math": [ "allow_sequence = 0" ] }, { "math": [ "eater_dreamer_sequence", "++" ] } ] + "then": [ { "math": [ "allow_sequence = 0" ] }, { "math": [ "eater_dreamer_sequence++" ] } ] }, { "if": { @@ -45,7 +45,7 @@ { "math": [ "inventor_dreamsmith_sequence == 0" ] } ] }, - "then": [ { "math": [ "allow_sequence = 0" ] }, { "math": [ "inventor_dreamsmith_sequence", "++" ] } ] + "then": [ { "math": [ "allow_sequence = 0" ] }, { "math": [ "inventor_dreamsmith_sequence++" ] } ] } ] }, @@ -72,7 +72,7 @@ { "if": { "and": [ { "not": { "u_has_trait": "EATER" } }, { "not": { "u_has_trait": "DREAMER" } } ] }, "then": [ - { "math": [ "eater_dreamer_sequence", "++" ] }, + { "math": [ "eater_dreamer_sequence++" ] }, { "switch": { "math": [ "eater_dreamer_sequence" ] }, "cases": [ @@ -134,7 +134,7 @@ "required_event": "character_wakes_up", "condition": { "math": [ "inventor_dreamsmith_sequence > 0" ] }, "effect": [ - { "math": [ "inventor_dreamsmith_sequence", "++" ] }, + { "math": [ "inventor_dreamsmith_sequence++" ] }, { "if": { "and": [ { "not": { "u_has_trait": "INVENTOR" } }, { "not": { "u_has_trait": "DREAMSMITH" } } ] }, "then": [ diff --git a/data/mods/Xedra_Evolved/eocs/magic_potential_eoc.json b/data/mods/Xedra_Evolved/eocs/magic_potential_eoc.json index 04d9e9cb039c2..ca354ca74b920 100644 --- a/data/mods/Xedra_Evolved/eocs/magic_potential_eoc.json +++ b/data/mods/Xedra_Evolved/eocs/magic_potential_eoc.json @@ -7,7 +7,7 @@ { "if": { "math": [ "u_hp('ALL') / 6 == u_hp_max('torso') / 2" ] }, "then": [ - { "math": [ "magic_potential", "++" ] }, + { "math": [ "magic_potential++" ] }, { "u_message": "Got magic potential from wounds, magic_potential: ", "type": "debug" @@ -17,7 +17,7 @@ { "if": { "math": [ "u_pain() > 250" ] }, "then": [ - { "math": [ "magic_potential", "++" ] }, + { "math": [ "magic_potential++" ] }, { "u_message": "Got magic potential from pain, magic_potential: ", "type": "debug" @@ -27,7 +27,7 @@ { "if": { "math": [ "u_val('morale') < -100" ] }, "then": [ - { "math": [ "magic_potential", "++" ] }, + { "math": [ "magic_potential++" ] }, { "u_message": "Got magic potential from depression, magic_potential: ", "type": "debug" @@ -37,7 +37,7 @@ { "if": { "and": [ { "math": [ "u_counter_portal_storm_counter > 0" ] }, { "math": [ "magic_potential_from_ps == 0" ] } ] }, "then": [ - { "math": [ "magic_potential", "++" ] }, + { "math": [ "magic_potential++" ] }, { "math": [ "magic_potential_from_ps = 1" ] }, { "u_message": "Got magic potential from witnessing the portal storm, magic_potential: ", @@ -48,7 +48,7 @@ { "if": { "u_has_effect": "taint" }, "then": [ - { "math": [ "magic_potential", "++" ] }, + { "math": [ "magic_potential++" ] }, { "u_message": "Got magic potential from tainted mind, magic_potential: ", "type": "debug" diff --git a/data/mods/Xedra_Evolved/eocs/misc_eoc.json b/data/mods/Xedra_Evolved/eocs/misc_eoc.json index c31ed09dac217..0cf3767005523 100644 --- a/data/mods/Xedra_Evolved/eocs/misc_eoc.json +++ b/data/mods/Xedra_Evolved/eocs/misc_eoc.json @@ -142,7 +142,7 @@ } }, "effect": [ - { "math": [ "u_stormwrought_blood_charge", "++" ] }, + { "math": [ "u_stormwrought_blood_charge++" ] }, { "run_eocs": [ { diff --git a/data/mods/Xedra_Evolved/eocs/playable_changeling_advancement_eocs.json b/data/mods/Xedra_Evolved/eocs/playable_changeling_advancement_eocs.json index db0d04261b0ce..ef923af2fe31e 100644 --- a/data/mods/Xedra_Evolved/eocs/playable_changeling_advancement_eocs.json +++ b/data/mods/Xedra_Evolved/eocs/playable_changeling_advancement_eocs.json @@ -16,7 +16,7 @@ } ] }, - "effect": { "math": [ "u_changeling_advancement_dreams_counter", "++" ] } + "effect": { "math": [ "u_changeling_advancement_dreams_counter++" ] } }, { "type": "effect_on_condition", @@ -102,7 +102,7 @@ { "u_mutate": 0 }, { "math": [ "u_vitamin('mutagen_fair_folk_noble')", "-=", "2500" ] }, { "math": [ "u_vitamin('mutagen')", "-=", "1000" ] }, - { "math": [ "u_changeling_advancement_dreams_counter", "--" ] } + { "math": [ "u_changeling_advancement_dreams_counter--" ] } ] }, { @@ -123,7 +123,7 @@ { "u_mutate": 0 }, { "math": [ "u_vitamin('mutagen_fair_folk_commoner_brownie')", "-=", "2500" ] }, { "math": [ "u_vitamin('mutagen')", "-=", "1000" ] }, - { "math": [ "u_changeling_advancement_dreams_counter", "--" ] } + { "math": [ "u_changeling_advancement_dreams_counter--" ] } ] }, { @@ -144,7 +144,7 @@ { "u_mutate": 0 }, { "math": [ "u_vitamin('mutagen_fair_folk_commoner_pooka')", "-=", "2500" ] }, { "math": [ "u_vitamin('mutagen')", "-=", "1000" ] }, - { "math": [ "u_changeling_advancement_dreams_counter", "--" ] } + { "math": [ "u_changeling_advancement_dreams_counter--" ] } ] }, { @@ -165,7 +165,7 @@ { "u_mutate": 0 }, { "math": [ "u_vitamin('mutagen_fair_folk_commoner_selkie')", "-=", "2500" ] }, { "math": [ "u_vitamin('mutagen')", "-=", "1000" ] }, - { "math": [ "u_changeling_advancement_dreams_counter", "--" ] } + { "math": [ "u_changeling_advancement_dreams_counter--" ] } ] }, { @@ -186,7 +186,7 @@ { "u_mutate": 0 }, { "math": [ "u_vitamin('mutagen_fair_folk_commoner_trow')", "-=", "2500" ] }, { "math": [ "u_vitamin('mutagen')", "-=", "1000" ] }, - { "math": [ "u_changeling_advancement_dreams_counter", "--" ] } + { "math": [ "u_changeling_advancement_dreams_counter--" ] } ] } ] diff --git a/data/mods/Xedra_Evolved/eocs/shapeshifter_eocs.json b/data/mods/Xedra_Evolved/eocs/shapeshifter_eocs.json index dea355e89e01e..eab055f2cdc4f 100644 --- a/data/mods/Xedra_Evolved/eocs/shapeshifter_eocs.json +++ b/data/mods/Xedra_Evolved/eocs/shapeshifter_eocs.json @@ -139,12 +139,12 @@ "type": "effect_on_condition", "id": "EOC_WEREWOLF_HYBRID_FORM_healing", "effect": [ - { "math": [ "u_werewolf_healing_tick_counter", "++" ] }, + { "math": [ "u_werewolf_healing_tick_counter++" ] }, { "if": { "math": [ "u_werewolf_healing_tick_counter >= 6" ] }, "then": [ { "math": [ "u_werewolf_healing_tick_counter", "-=", "6" ] }, - { "if": { "math": [ "u_pain() >= 1" ] }, "then": { "math": [ "u_pain()", "--" ] } }, + { "if": { "math": [ "u_pain() >= 1" ] }, "then": { "math": [ "u_pain()--" ] } }, { "if": { "math": [ "u_vitamin('redcells') < 0" ] }, "then": { "math": [ "u_vitamin('redcells')", "+=", "150" ] } diff --git a/data/mods/Xedra_Evolved/eocs/spell_learning_eoc.json b/data/mods/Xedra_Evolved/eocs/spell_learning_eoc.json index 13f9e84eef618..743fbba1acd90 100644 --- a/data/mods/Xedra_Evolved/eocs/spell_learning_eoc.json +++ b/data/mods/Xedra_Evolved/eocs/spell_learning_eoc.json @@ -33,7 +33,7 @@ { "if": { "and": [ { "u_has_trait": "EATER" }, { "compare_string": [ "EATER", { "context_val": "school" } ] } ] }, "then": [ - { "math": [ "xe_eater_leveling", "++" ] }, + { "math": [ "xe_eater_leveling++" ] }, { "u_message": "Got a new level for eater, xe_eater_leveling: ", "type": "debug" @@ -43,7 +43,7 @@ { "if": { "and": [ { "u_has_trait": "DREAMER" }, { "compare_string": [ "DREAMER", { "context_val": "school" } ] } ] }, "then": [ - { "math": [ "xe_dreamer_leveling", "++" ] }, + { "math": [ "xe_dreamer_leveling++" ] }, { "u_message": "Got a new level for dreamer, xe_dreamer_leveling: ", "type": "debug" @@ -105,7 +105,7 @@ } ] }, - { "math": [ "xe_eater_leveling", "--" ] }, + { "math": [ "xe_eater_leveling--" ] }, { "run_eocs": [ "EOC_XE_GIVE_SPELL_SELECTOR" ] } ] }, @@ -149,7 +149,7 @@ } ] }, - { "math": [ "xe_dreamer_leveling", "--" ] }, + { "math": [ "xe_dreamer_leveling--" ] }, { "run_eocs": [ "EOC_XE_GIVE_SPELL_SELECTOR" ] } ] }, @@ -179,25 +179,25 @@ { "type": "effect_on_condition", "id": "EOC_XE_GIVE_SPELL_1", - "effect": [ { "math": [ "u_spell_level(_xe_spell_1)", "++" ] } ] + "effect": [ { "math": [ "u_spell_level(_xe_spell_1)++" ] } ] }, { "type": "effect_on_condition", "id": "EOC_XE_GIVE_SPELL_2", "condition": { "math": [ "u_skill('deduction') >= 3" ] }, - "effect": [ { "math": [ "u_spell_level(_xe_spell_2)", "++" ] } ] + "effect": [ { "math": [ "u_spell_level(_xe_spell_2)++" ] } ] }, { "type": "effect_on_condition", "id": "EOC_XE_GIVE_SPELL_3", "condition": { "math": [ "u_skill('deduction') >= 6" ] }, - "effect": [ { "math": [ "u_spell_level(_xe_spell_3)", "++" ] } ] + "effect": [ { "math": [ "u_spell_level(_xe_spell_3)++" ] } ] }, { "type": "effect_on_condition", "id": "EOC_XE_GIVE_SPELL_4", "condition": { "math": [ "u_skill('deduction') >= 8" ] }, - "effect": [ { "math": [ "u_spell_level(_xe_spell_4)", "++" ] } ] + "effect": [ { "math": [ "u_spell_level(_xe_spell_4)++" ] } ] }, { "type": "effect_on_condition", diff --git a/data/mods/Xedra_Evolved/furniture_and_terrain/furniture.json b/data/mods/Xedra_Evolved/furniture_and_terrain/furniture.json index f6462013c0142..55ae28b31d579 100644 --- a/data/mods/Xedra_Evolved/furniture_and_terrain/furniture.json +++ b/data/mods/Xedra_Evolved/furniture_and_terrain/furniture.json @@ -254,7 +254,7 @@ "id": "f_sylph_translocator_location", "name": "open to the sky", "symbol": "+", - "description": "The rock of the living earth. You could travel here in moments as long as you are high above the earth or surrounded by the blowing wind.", + "description": "Above the base earth and beneath the firmament. You could travel here in moments as long as you are high above the earth or surrounded by the blowing wind.", "color": "white", "required_str": -1, "move_cost_mod": 0, diff --git a/data/mods/Xedra_Evolved/itemgroups/itemgroups.json b/data/mods/Xedra_Evolved/itemgroups/itemgroups.json index c70568ff7748b..537d1195e3b33 100644 --- a/data/mods/Xedra_Evolved/itemgroups/itemgroups.json +++ b/data/mods/Xedra_Evolved/itemgroups/itemgroups.json @@ -248,7 +248,9 @@ { "item": "moons_tears_estoc", "prob": 20 }, { "item": "moons_tears_spear", "prob": 30 }, { "item": "moons_tears_battleaxe", "prob": 20 }, - { "item": "moons_tears_katana", "prob": 20 } + { "item": "moons_tears_katana", "prob": 20 }, + { "item": "treesung_spear", "prob": 3 }, + { "item": "treesung_pike", "prob": 3 } ] }, { @@ -288,7 +290,9 @@ { "item": "moons_tears_mace", "prob": 20 }, { "item": "moons_tears_scimitar", "prob": 20 }, { "item": "moons_tears_spear", "prob": 20 }, - { "item": "moons_tears_battleaxe", "prob": 20 } + { "item": "moons_tears_battleaxe", "prob": 20 }, + { "item": "treesung_mace", "prob": 3 }, + { "item": "treesung_warhammer", "prob": 3 } ] }, { @@ -354,7 +358,8 @@ { "item": "moons_tears_broadsword", "prob": 20 }, { "item": "moons_tears_arming_sword", "prob": 20 }, { "item": "moons_tears_estoc", "prob": 20 }, - { "item": "moons_tears_katana", "prob": 20 } + { "item": "moons_tears_katana", "prob": 20 }, + { "item": "treesung_mace", "prob": 3 } ] }, { diff --git a/data/mods/Xedra_Evolved/items/armor/armor.json b/data/mods/Xedra_Evolved/items/armor/armor.json index 823a2e1965492..3b7185da289f0 100644 --- a/data/mods/Xedra_Evolved/items/armor/armor.json +++ b/data/mods/Xedra_Evolved/items/armor/armor.json @@ -1258,6 +1258,40 @@ "melee_damage": { "bash": 2 }, "relic_data": { "passive_effects": [ { "id": "ench_verdant_gauntlets" } ] } }, + { + "id": "leg_guards_verdant", + "//": "Derived from chitin leg guards", + "type": "ARMOR", + "category": "armor", + "name": { "str": "pair of verdant leg guards", "str_pl": "pairs of verdant leg guards" }, + "description": "A pair of leg guards made from living plant matter, with bark covering the outer surface. This is definitely not anything that could have existed before the Cataclysm.", + "weight": "510 g", + "volume": "5000 ml", + "price": "250 USD", + "price_postapoc": "7 USD 50 cent", + "material": [ "mut_wood", "veggy" ], + "symbol": "[", + "looks_like": "legguard_hard", + "color": "green", + "warmth": 20, + "material_thickness": 4, + "environmental_protection": 2, + "flags": [ "STURDY", "OUTER", "BLOCK_WHILE_WORN", "WATER_FRIENDLY", "PADDED" ], + "armor": [ + { + "breathability": "AVERAGE", + "material": [ + { "type": "mut_wood", "covered_by_mat": 95, "thickness": 3 }, + { "type": "veggy", "covered_by_mat": 100, "thickness": 1.0 } + ], + "coverage": 100, + "covers": [ "leg_l", "leg_r" ], + "specifically_covers": [ "leg_lower_r", "leg_lower_l", "leg_knee_r", "leg_knee_l" ], + "encumbrance": 3 + } + ], + "relic_data": { "passive_effects": [ { "id": "ench_verdant_legs" } ] } + }, { "id": "boots_verdant", "//": "Derived from chitinous boots", diff --git a/data/mods/Xedra_Evolved/items/melee_treesung.json b/data/mods/Xedra_Evolved/items/melee_treesung.json new file mode 100644 index 0000000000000..ffbd474ab4558 --- /dev/null +++ b/data/mods/Xedra_Evolved/items/melee_treesung.json @@ -0,0 +1,85 @@ +[ + { + "type": "GENERIC", + "id": "treesung_spear", + "copy-from": "spear_wood", + "looks_like": "spear_wood", + "name": { "str": "treesung spear" }, + "description": "A stout wooden pole sharpened on one end, all formed from a single piece of wood, with twists and curves like it grew in place rather than being made.", + "color": "green", + "proportional": { "melee_damage": { "stab": 1.5 } }, + "extend": { "flags": [ "WOODEN_WEAPON", "NO_REPAIR", "DURABLE_MELEE" ] } + }, + { + "type": "GENERIC", + "id": "treesung_pike", + "copy-from": "pike_wood", + "looks_like": "pike_wood", + "name": { "str": "treesung long spear" }, + "description": "A giant spear over three meters long, all formed from a single piece of wood, with twists and curves like it grew in place rather than being made.", + "color": "green", + "proportional": { "melee_damage": { "stab": 1.5 } }, + "extend": { "flags": [ "WOODEN_WEAPON", "NO_REPAIR" ] } + }, + { + "type": "GENERIC", + "id": "treesung_mace", + "copy-from": "mace", + "looks_like": "mace", + "name": { "str": "treesung mace" }, + "description": "A weapon with a long wooden handle connected to a knobby wooden head, all formed from a single piece of wood, with twists and curves like it grew in place rather than being made.", + "color": "green", + "material": [ { "type": "wood", "portion": 1 } ], + "proportional": { "melee_damage": { "bash": 0.9 } }, + "extend": { "flags": [ "WOODEN_WEAPON", "NO_REPAIR" ] } + }, + { + "type": "GENERIC", + "id": "treesung_q_staff", + "copy-from": "q_staff", + "looks_like": "q_staff", + "name": { "str": "treesung quarterstaff", "str_pl": "treesung quarterstaves" }, + "description": "A sturdy staff all formed from a single piece of wood, with twists and curves like it grew in place rather than being carved.", + "color": "green", + "material": [ { "type": "wood", "portion": 1 } ], + "proportional": { "melee_damage": { "bash": 1.1 } }, + "extend": { "flags": [ "WOODEN_WEAPON", "NO_REPAIR", "DURABLE_MELEE" ] } + }, + { + "type": "GENERIC", + "id": "treesung_warhammer", + "copy-from": "warhammer", + "looks_like": "warhammer", + "name": { "str": "treesung warhammer" }, + "description": "A long hammer with a spike on one end, all formed from a single piece of wood, with twists and curves like it grew in place rather than being carved.", + "color": "green", + "material": [ { "type": "wood", "portion": 1 } ], + "proportional": { "melee_damage": { "bash": 1.1, "stab": 0.9 } }, + "extend": { "flags": [ "WOODEN_WEAPON", "NO_REPAIR" ] } + }, + { + "type": "GENERIC", + "id": "treesung_naginata", + "copy-from": "naginata", + "looks_like": "naginata", + "name": { "str": "treesung sword-spear" }, + "description": "A sturdy polearm with a curved blade, all formed from a single piece of wood, with twists and curves like it grew in place rather than being carved. You're not sure how long it will hold its edge, but it's surprisingly sharp.", + "color": "green", + "material": [ { "type": "wood", "portion": 1 } ], + "proportional": { "melee_damage": { "cut": 0.9 } }, + "extend": { "flags": [ "WOODEN_WEAPON", "NO_REPAIR" ] }, + "delete": { "flags": [ "DURABLE_MELEE" ] } + }, + { + "type": "GENERIC", + "id": "treesung_baselard", + "copy-from": "knife_baselard", + "looks_like": "knife_baselard", + "name": { "str": "treesung baselard" }, + "description": "A large knife, all formed from a single piece of wood, with twists and curves like it grew in place rather than being carved. You're not sure how long it will hold its edge, but it's surprisingly sharp.", + "color": "green", + "material": [ { "type": "wood", "portion": 1 } ], + "proportional": { "melee_damage": { "stab": 0.9 } }, + "extend": { "flags": [ "WOODEN_WEAPON", "NO_REPAIR" ] } + } +] diff --git a/data/mods/Xedra_Evolved/items/range_treesung.json b/data/mods/Xedra_Evolved/items/range_treesung.json new file mode 100644 index 0000000000000..dd98d69c7bbf5 --- /dev/null +++ b/data/mods/Xedra_Evolved/items/range_treesung.json @@ -0,0 +1,34 @@ +[ + { + "type": "GUN", + "id": "treesung_bow", + "copy-from": "shortbow", + "looks_like": "shortbow", + "name": { "str": "treesung bow" }, + "description": "A wooden shortbow with a thin vine for a string, all formed from a single piece of wood, with twists and curves like it grew in place rather than being made.", + "color": "green", + "range": 14, + "extend": { "flags": [ "WOODEN_WEAPON", "NO_REPAIR" ] } + }, + { + "type": "GUN", + "id": "treesung_greatbow", + "copy-from": "woodgreatbow", + "looks_like": "woodgreatbow", + "name": { "str": "treesung greatbow" }, + "description": "A truly enormous wooden bow with a thin vine for a string, all formed from a single piece of wood, with twists and curves like it grew in place rather than being made.", + "color": "green", + "range": 26, + "extend": { "flags": [ "WOODEN_WEAPON", "NO_REPAIR" ] } + }, + { + "type": "AMMO", + "id": "arrow_treesung", + "copy-from": "arrow_fire_hardened_fletched", + "name": { "str": "treesung arrow" }, + "description": "An arrow all formed from a single piece of wood, with twists and curves like it grew in place rather than being made. It even has leaves for fletching.", + "color": "green", + "damage": { "damage_type": "stab", "armor_penetration": 4, "constant_damage_multiplier": 1.25 }, + "recovery_chance": 85 + } +] diff --git a/data/mods/Xedra_Evolved/items/vehicle_parts.json b/data/mods/Xedra_Evolved/items/vehicle_parts.json index 5f67dc8f4ca8d..408a08287f9a7 100644 --- a/data/mods/Xedra_Evolved/items/vehicle_parts.json +++ b/data/mods/Xedra_Evolved/items/vehicle_parts.json @@ -10,5 +10,17 @@ "color": "yellow", "material": [ "steel" ], "price": "8 kUSD" + }, + { + "type": "GENERIC", + "id": "floral_base_item", + "name": { "str": "floral vessel" }, + "symbol": "v", + "description": { "str": "The parts of the floral vehicle that have to exist for code reasons.", "//~": "NO_I18N" }, + "volume": "1 L", + "weight": "2 kg", + "color": "green", + "material": [ "veggy" ], + "price": "8 kUSD" } ] diff --git a/data/mods/Xedra_Evolved/mod_interactions/bombastic_perks/perks/perk_menu.json b/data/mods/Xedra_Evolved/mod_interactions/bombastic_perks/perks/perk_menu.json index 32ca8b3186e87..5863ddcdd9c09 100644 --- a/data/mods/Xedra_Evolved/mod_interactions/bombastic_perks/perks/perk_menu.json +++ b/data/mods/Xedra_Evolved/mod_interactions/bombastic_perks/perks/perk_menu.json @@ -21,7 +21,7 @@ "condition": { "math": [ "u_num_perks > 0" ] }, "failure_explanation": "Requirements Not Met", "failure_topic": "TALK_PERK_MENU_FAIL", - "effect": [ { "u_add_trait": "perk_ALCHEMY1" }, { "math": [ "u_num_perks", "--" ] } ] + "effect": [ { "u_add_trait": "perk_ALCHEMY1" }, { "math": [ "u_num_perks--" ] } ] }, { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" }, { "text": "Quit.", "topic": "TALK_DONE" } @@ -49,7 +49,7 @@ "condition": { "math": [ "u_num_perks > 0" ] }, "failure_explanation": "Requirements Not Met", "failure_topic": "TALK_PERK_MENU_FAIL", - "effect": [ { "u_add_trait": "perk_ALCHEMY2" }, { "math": [ "u_num_perks", "--" ] } ] + "effect": [ { "u_add_trait": "perk_ALCHEMY2" }, { "math": [ "u_num_perks--" ] } ] }, { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" }, { "text": "Quit.", "topic": "TALK_DONE" } @@ -77,7 +77,7 @@ "condition": { "math": [ "u_num_perks > 0" ] }, "failure_explanation": "Requirements Not Met", "failure_topic": "TALK_PERK_MENU_FAIL", - "effect": [ { "u_add_trait": "perk_ALCHEMY3" }, { "math": [ "u_num_perks", "--" ] } ] + "effect": [ { "u_add_trait": "perk_ALCHEMY3" }, { "math": [ "u_num_perks--" ] } ] }, { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" }, { "text": "Quit.", "topic": "TALK_DONE" } @@ -111,7 +111,7 @@ "condition": { "math": [ "u_num_perks > 0" ] }, "failure_explanation": "Requirements Not Met", "failure_topic": "TALK_PERK_MENU_FAIL", - "effect": [ { "u_add_trait": "perk_ALCHEMY3_COLD_IRON" }, { "math": [ "u_num_perks", "--" ] } ] + "effect": [ { "u_add_trait": "perk_ALCHEMY3_COLD_IRON" }, { "math": [ "u_num_perks--" ] } ] }, { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" }, { "text": "Quit.", "topic": "TALK_DONE" } @@ -139,7 +139,7 @@ "condition": { "math": [ "u_num_perks > 0" ] }, "failure_explanation": "Requirements Not Met", "failure_topic": "TALK_PERK_MENU_FAIL", - "effect": [ { "u_add_trait": "perk_ALCHEMY4" }, { "math": [ "u_num_perks", "--" ] } ] + "effect": [ { "u_add_trait": "perk_ALCHEMY4" }, { "math": [ "u_num_perks--" ] } ] }, { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" }, { "text": "Quit.", "topic": "TALK_DONE" } @@ -167,7 +167,7 @@ "condition": { "math": [ "u_num_perks > 0" ] }, "failure_explanation": "Requirements Not Met", "failure_topic": "TALK_PERK_MENU_FAIL", - "effect": [ { "u_add_trait": "perk_ALCHEMY5" }, { "math": [ "u_num_perks", "--" ] } ] + "effect": [ { "u_add_trait": "perk_ALCHEMY5" }, { "math": [ "u_num_perks--" ] } ] }, { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" }, { "text": "Quit.", "topic": "TALK_DONE" } @@ -195,7 +195,7 @@ "condition": { "math": [ "u_num_perks > 0" ] }, "failure_explanation": "Requirements Not Met", "failure_topic": "TALK_PERK_MENU_FAIL", - "effect": [ { "u_add_trait": "perk_LOW_INT_MANA" }, { "math": [ "u_num_perks", "--" ] } ] + "effect": [ { "u_add_trait": "perk_LOW_INT_MANA" }, { "math": [ "u_num_perks--" ] } ] }, { "text": "Go Back.", "topic": "TALK_PERK_MENU_MAIN" }, { "text": "Quit.", "topic": "TALK_DONE" } diff --git a/data/mods/Xedra_Evolved/monsters/elementals.json b/data/mods/Xedra_Evolved/monsters/elementals.json index 477478d4dd40c..df3e8c91ca9ef 100644 --- a/data/mods/Xedra_Evolved/monsters/elementals.json +++ b/data/mods/Xedra_Evolved/monsters/elementals.json @@ -541,6 +541,7 @@ "monster_message": "%1$s gestures and you hear the creak of growing wood!" } ], + "death_drops": { "subtype": "collection", "items": [ { "item": "treesung_pike", "prob": 30, "damage": [ 1, 5 ] } ] }, "anger_triggers": [ "FRIEND_DIED", "PLAYER_CLOSE", "FRIEND_ATTACKED", "HURT", "FIRE" ], "dissect": "dissect_arvore_huge", "flags": [ diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_eocs.json b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_eocs.json index ec9c77eddecd2..2dfbf9aa872b3 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_eocs.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_eocs.json @@ -284,6 +284,30 @@ } ] }, + { + "type": "effect_on_condition", + "id": "EOC_ARVORE_SUMMON_FLORAL_BOAT_CHECK", + "effect": [ + { + "u_map_run_eocs": [ + { + "id": "EOC_ARVORE_SUMMON_FLORAL_BOAT_ACTION", + "effect": [ { "u_cast_spell": { "id": "arvore_summon_floral_boat_real" }, "targeted": true } ], + "false_effect": { "u_message": "You need a nearby tree to transform it into the viridescent vessel.", "type": "bad" } + } + ], + "range": 1, + "store_coordinates_in": { "context_val": "arvore_floral_boat_tree" }, + "stop_at_first": true, + "condition": { "map_terrain_with_flag": "TREE", "loc": { "context_val": "arvore_floral_boat_tree" } } + }, + { + "u_transform_radius": 0, + "target_var": { "context_val": "arvore_floral_boat_tree" }, + "ter_furn_transform": "ter_arvore_tree_to_grass" + } + ] + }, { "type": "effect_on_condition", "id": "EOC_ARVORE_SEED_BEARER_activated", @@ -761,8 +785,18 @@ { "not": { "u_know_recipe": "create_verdant_helm" } }, { "not": { "u_know_recipe": "create_verdant_cuirass" } }, { "not": { "u_know_recipe": "create_verdant_gauntlets" } }, + { "not": { "u_know_recipe": "create_verdant_leg_guards" } }, { "not": { "u_know_recipe": "create_verdant_boots" } }, - { "not": { "u_know_recipe": "create_verdant_cloak" } } + { "not": { "u_know_recipe": "create_verdant_cloak" } }, + { "not": { "u_know_recipe": "create_shortbow_treesung" } }, + { "not": { "u_know_recipe": "create_greatbow_treesung" } }, + { "not": { "u_know_recipe": "create_arrow_treesung" } }, + { "not": { "u_know_recipe": "create_spear_treesung" } }, + { "not": { "u_know_recipe": "create_pike_treesung" } }, + { "not": { "u_know_recipe": "create_mace_treesung" } }, + { "not": { "u_know_recipe": "create_q_staff_treesung" } }, + { "not": { "u_know_recipe": "create_naginata_treesung" } }, + { "not": { "u_know_recipe": "create_baselard_treesung" } } ] }, { @@ -800,8 +834,18 @@ "create_verdant_helm", "create_verdant_cuirass", "create_verdant_gauntlets", + "create_verdant_leg_guards", "create_verdant_boots", - "create_verdant_cloak" + "create_verdant_cloak", + "create_shortbow_treesung", + "create_greatbow_treesung", + "create_arrow_treesung", + "create_spear_treesung", + "create_pike_treesung", + "create_mace_treesung", + "create_q_staff_treesung", + "create_naginata_treesung", + "create_baselard_treesung" ], "type": "recipe" }, diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutation_spells.json b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutation_spells.json index 72e76c267d072..8cb2701accba4 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutation_spells.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_mutation_spells.json @@ -341,7 +341,7 @@ "base_energy_cost": 800, "final_energy_cost": 500, "energy_increment": -40, - "learn_spells": { "arvore_create_living_tent_spell": 4 } + "learn_spells": { "arvore_create_living_tent_spell": 4, "arvore_summon_floral_boat": 10 } }, { "id": "arvore_verdant_infusion", @@ -452,7 +452,8 @@ "energy_increment": -30, "base_casting_time": 6000, "final_casting_time": 1500, - "casting_time_increment": -250 + "casting_time_increment": -250, + "learn_spells": { "arvore_create_living_tent_spell": 6, "arvore_summon_floral_boat": 12 } }, { "id": "arvore_summon_preservation_container_real", @@ -483,6 +484,55 @@ "base_energy_cost": 350, "base_casting_time": 400 }, + { + "id": "arvore_summon_floral_boat", + "type": "SPELL", + "name": "Viridescent Vessel", + "description": "Trees require water but will still drown if submerged. This spell allows the Arvore to create a floral boat with the help of a nearby tree, letting them travel safely across water.\n\nYou must be standing next to a tree and near the water for the spell to be effective.", + "message": "", + "valid_targets": [ "self" ], + "skill": "deduction", + "flags": [ "VERBAL", "SOMATIC", "SILENT" ], + "effect": "effect_on_condition", + "effect_str": "EOC_ARVORE_SUMMON_FLORAL_BOAT_CHECK", + "shape": "blast", + "difficulty": 7, + "spell_class": "ARVORE", + "teachable": false, + "max_level": { "math": [ "per_to_level(1)" ] }, + "energy_source": "MANA", + "base_energy_cost": 1000, + "energy_increment": -40, + "final_energy_cost": 600, + "base_casting_time": 3000, + "casting_time_increment": 75, + "final_casting_time": 100 + }, + { + "id": "arvore_summon_floral_boat_real", + "type": "SPELL", + "name": { "str": "Viridescent Vessel Real", "//~": "NO_I18N" }, + "description": { "str": "The actual spell to summon the boat. If you have it, it's a bug.", "//~": "NO_I18N" }, + "message": "", + "valid_targets": [ "ground" ], + "skill": "deduction", + "flags": [ "SILENT", "NO_PROJECTILE", "RANDOM_DURATION" ], + "effect": "summon_vehicle", + "effect_str": "arvore_floral_boat", + "shape": "blast", + "min_range": 8, + "max_range": 8, + "min_duration": { + "math": [ + "( 45000 + (u_spell_level('arvore_summon_floral_boat') * 10000) ) * scaling_factor(u_val('perception') ) * paraclesian_post_threshold_doubler(1)" + ] + }, + "max_duration": { + "math": [ + "( 90000 + (u_spell_level('arvore_summon_floral_boat') * 32000 ) ) * scaling_factor(u_val('perception') ) * paraclesian_post_threshold_doubler(1)" + ] + } + }, { "id": "arvore_summon_briars", "type": "SPELL", @@ -810,7 +860,7 @@ "base_casting_time": 150, "final_casting_time": 75, "casting_time_increment": -5, - "learn_spells": { "arvore_roots_spell": 8, "arvore_create_living_tent_spell": 10 } + "learn_spells": { "arvore_roots_spell": 8, "arvore_create_living_tent_spell": 10, "arvore_summon_floral_boat": 16 } }, { "type": "SPELL", @@ -835,7 +885,8 @@ "energy_increment": -20, "base_casting_time": 12000, "final_casting_time": 1500, - "casting_time_increment": -150 + "casting_time_increment": -150, + "learn_spells": { "arvore_summon_floral_boat": 8 } }, { "id": "arvore_summon_grass_field_spell", diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_spell_learning_eocs.json b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_spell_learning_eocs.json index 58ac4160fce60..4ed7789c0d65c 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_spell_learning_eocs.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/arvore_spell_learning_eocs.json @@ -71,6 +71,7 @@ { "math": [ "u_spell_level('arvore_cause_decay') < per_to_level(1)" ] }, { "math": [ "u_spell_level('arvore_create_living_tent_spell') < int_to_level(1)" ] }, { "math": [ "u_spell_level('arvore_summon_preservation_container') < per_to_level(1)" ] }, + { "math": [ "u_spell_level('arvore_summon_floral_boat') < per_to_level(1)" ] }, { "math": [ "u_spell_level('arvore_summon_wood_spirit') < 35" ] }, { "math": [ "u_spell_level('arvore_roots_crack_the_foundation') < per_to_level(1)" ] }, { "math": [ "u_spell_level('arvore_forest_translocate') < per_to_level(1)" ] }, @@ -98,6 +99,7 @@ [ "EOC_LEVELER_ARVORE_FOREST_TELEPORT", 7 ], [ "EOC_LEVELER_ARVORE_CAUSE_DECAY", 2 ], [ "EOC_LEVELER_ARVORE_SUMMON_PRESERVATION_CONTAINER", 7 ], + [ "EOC_LEVELER_ARVORE_SUMMON_FLORAL_BOAT", 4 ], [ "EOC_LEVELER_ARVORE_SUMMON_WOOD_SPIRIT", 8 ], [ "EOC_LEVELER_ARVORE_TERRAIN_BASH_SPELL", 4 ], [ "EOC_LEVELER_ARVORE_FOREST_TRANSLOCATION", 2 ], @@ -261,6 +263,24 @@ ], "false_effect": [ { "run_eocs": "EOC_ARVORE_SPELL_EXPERIENCE_INCREASER_SELECTOR" } ] }, + { + "type": "effect_on_condition", + "id": "EOC_LEVELER_ARVORE_SUMMON_FLORAL_BOAT", + "condition": { + "and": [ + { "math": [ "u_spell_level('arvore_summon_floral_boat') >= 0" ] }, + { "math": [ "u_spell_level('arvore_summon_floral_boat') < per_to_level(1)" ] } + ] + }, + "effect": [ + { + "u_message": "Your time spent under the shadows of the trees has increased your facility with your fae magicks.", + "type": "good" + }, + { "math": [ "u_spell_exp('arvore_summon_floral_boat')", "+=", "paraclesian_passive_spell_exp(1)" ] } + ], + "false_effect": [ { "run_eocs": "EOC_ARVORE_SPELL_EXPERIENCE_INCREASER_SELECTOR" } ] + }, { "type": "effect_on_condition", "id": "EOC_LEVELER_ARVORE_SUMMON_WOOD_SPIRIT", diff --git a/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_eocs.json b/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_eocs.json index 5ee7873981e92..815e9e54b67b8 100644 --- a/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_eocs.json +++ b/data/mods/Xedra_Evolved/mutations/paraclesians/ierde_eocs.json @@ -667,10 +667,10 @@ "required_event": "character_takes_damage", "condition": { "u_has_trait": "IERDE_NO_BROKEN_BONES" }, "effect": [ - { "if": { "math": [ "u_hp('arm_r')", "==", "0" ] }, "then": { "math": [ "u_hp('arm_r')", "++" ] } }, - { "if": { "math": [ "u_hp('arm_l')", "==", "0" ] }, "then": { "math": [ "u_hp('arm_l')", "++" ] } }, - { "if": { "math": [ "u_hp('leg_r')", "==", "0" ] }, "then": { "math": [ "u_hp('leg_r')", "++" ] } }, - { "if": { "math": [ "u_hp('leg_l')", "==", "0" ] }, "then": { "math": [ "u_hp('leg_l')", "++" ] } } + { "if": { "math": [ "u_hp('arm_r')", "==", "0" ] }, "then": { "math": [ "u_hp('arm_r')++" ] } }, + { "if": { "math": [ "u_hp('arm_l')", "==", "0" ] }, "then": { "math": [ "u_hp('arm_l')++" ] } }, + { "if": { "math": [ "u_hp('leg_r')", "==", "0" ] }, "then": { "math": [ "u_hp('leg_r')++" ] } }, + { "if": { "math": [ "u_hp('leg_l')", "==", "0" ] }, "then": { "math": [ "u_hp('leg_l')++" ] } } ] } ] diff --git a/data/mods/Xedra_Evolved/mutations/playable_changeling_eocs.json b/data/mods/Xedra_Evolved/mutations/playable_changeling_eocs.json index 7621b70da6089..c02a5ee5b6785 100644 --- a/data/mods/Xedra_Evolved/mutations/playable_changeling_eocs.json +++ b/data/mods/Xedra_Evolved/mutations/playable_changeling_eocs.json @@ -559,7 +559,7 @@ ] }, "deactivate_condition": { "not": { "u_has_trait": "BROWNIE_HOMEBODY" } }, - "effect": [ { "math": [ "u_brownie_homebody_speed_bonus", "++" ] }, { "math": [ "u_brownie_sense_intruders", "++" ] } ] + "effect": [ { "math": [ "u_brownie_homebody_speed_bonus++" ] }, { "math": [ "u_brownie_sense_intruders++" ] } ] }, { "type": "effect_on_condition", @@ -663,7 +663,7 @@ } ] }, - "effect": [ { "math": [ "u_brownie_homebody_speed_bonus", "--" ] }, { "math": [ "u_brownie_sense_intruders = 0" ] } ] + "effect": [ { "math": [ "u_brownie_homebody_speed_bonus--" ] }, { "math": [ "u_brownie_sense_intruders = 0" ] } ] }, { "type": "effect_on_condition", @@ -792,7 +792,7 @@ "1 + u_has_trait('POOKA_SHAPESHIFT_GOOD') + (u_has_trait('POOKA_SHAPESHIFT_GOOD2') * 2) + (u_has_trait('POOKA_SHAPESHIFT_GOOD3') * 4) + (u_sum_traits_of_category_char_has('FAIR_FOLK_COMMONER_POOKA') / 50)" ] }, - "effect": [ { "math": [ "u_val('mana')", "--" ] } ] + "effect": [ { "math": [ "u_val('mana')--" ] } ] } ] } diff --git a/data/mods/Xedra_Evolved/mutations/shapeshifters.json b/data/mods/Xedra_Evolved/mutations/shapeshifters.json index c35ffd89d2e0d..441642cf49b85 100644 --- a/data/mods/Xedra_Evolved/mutations/shapeshifters.json +++ b/data/mods/Xedra_Evolved/mutations/shapeshifters.json @@ -101,7 +101,10 @@ { "value": "STAMINA_REGEN_MOD", "add": 0.2 }, { "value": "MELEE_STAMINA_CONSUMPTION", "multiply": -0.33 }, { "value": "SOCIAL_PERSUADE", "add": -50 }, - { "value": "SOCIAL_INTIMIDATE", "add": 40 } + { "value": "SOCIAL_INTIMIDATE", "add": 40 }, + { "value": "METABOLISM", "multiply": 4 }, + { "value": "LEARNING_FOCUS", "add": -10 }, + { "value": "OBTAIN_COST_MULTIPLIER", "multiply": 2 } ], "mutations": [ "MUZZLE", "TAIL_FLUFFY", "PAWS", "LUPINE_FUR", "LUPINE_EARS", "PERSISTENCE_HUNTER2", "PRED3" ] }, @@ -122,5 +125,77 @@ "flags": [ "NO_SPELLCASTING", "PRED3", "TOUGH_FEET", "TEMPORARY_SHAPESHIFT", "SHAPESHIFT_SIZE_HUGE" ], "override_look": { "id": "mon_loup_garou", "tile_category": "monster" }, "integrated_armor": [ "integrated_claws_werewolf", "integrated_werewolf_teeth", "integrated_lupine_fur" ] + }, + { + "type": "effect_on_condition", + "id": "EOC_WAR_FORM_BANNED_ACTIVITY_PHYSICAL", + "eoc_type": "EVENT", + "required_event": "character_starts_activity", + "condition": { + "and": [ + { "u_has_trait": "WEREWOLF_HYBRID_FORM_TRAITS" }, + { + "or": [ + { "compare_string": [ "ACT_LOCKPICK", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_REPAIR_ITEM", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_MEND_ITEM", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_VEHICLE_REPAIR", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_RELOAD", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_FIRSTAID", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_MILK", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_HACKSAW", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_BOLTCUTTING", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_HAIRCUT", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_SHAVE", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_CRACKING", { "context_val": "activity" } ] } + ] + } + ] + }, + "effect": [ "u_cancel_activity", { "u_message": "Your war form lacks the fine dexterity for that.", "type": "bad" } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_WAR_FORM_BANNED_ACTIVITY_MENTAL", + "eoc_type": "EVENT", + "required_event": "character_starts_activity", + "condition": { + "and": [ + { "u_has_trait": "WEREWOLF_HYBRID_FORM_TRAITS" }, + { + "or": [ + { "compare_string": [ "ACT_READ", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_EBOOKSAVE", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_TIDY_UP", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_MOP", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_VEHICLE_DECONSTRUCTION", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_MULTIPLE_DIS", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_MULTIPLE_FISH", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_FISH", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_GENERIC_GAME", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_GAME", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_DISASSEMBLE", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_SOCIALIZE", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_VIBE", { "context_val": "activity" } ] }, + { "compare_string": [ "ACT_MULTIPLE_FARM", { "context_val": "activity" } ] } + ] + } + ] + }, + "effect": [ + "u_cancel_activity", + { + "u_message": "Your mind is filled with the urge to sink your fangs into your enemies' throats, leaving no room for these passive activities.", + "type": "bad" + } + ] + }, + { + "type": "effect_on_condition", + "id": "EOC_WAR_FORM_SHIFT_BACK_ON_SLEEP", + "eoc_type": "EVENT", + "required_event": "character_falls_asleep", + "condition": { "u_has_trait": "WEREWOLF_HYBRID_FORM_TRAITS" }, + "effect": [ { "u_deactivate_trait": "WEREWOLF_HYBRID_FORM" } ] } ] diff --git a/data/mods/Xedra_Evolved/mutations/xe_lilin_eocs.json b/data/mods/Xedra_Evolved/mutations/xe_lilin_eocs.json index f49a76c0dbbfb..316995fe0b13f 100644 --- a/data/mods/Xedra_Evolved/mutations/xe_lilin_eocs.json +++ b/data/mods/Xedra_Evolved/mutations/xe_lilin_eocs.json @@ -64,7 +64,7 @@ "condition": { "and": [ { "u_has_trait": "LILIN_TRAITS" }, { "math": [ "u_vitamin('lilin_ruach_vitamin') >= 1" ] } ] }, "effect": [ { "u_lose_effect": "effect_lilin_no_ruach" }, - { "math": [ "u_vitamin('lilin_ruach_vitamin')", "--" ] }, + { "math": [ "u_vitamin('lilin_ruach_vitamin')--" ] }, { "if": { "math": [ "u_vitamin('lilin_ruach_vitamin') == 0" ] }, "then": { "u_add_effect": "effect_lilin_no_ruach", "duration": "PERMANENT", "intensity": 1 } diff --git a/data/mods/Xedra_Evolved/mutations/xe_lilin_trait_eocs.json b/data/mods/Xedra_Evolved/mutations/xe_lilin_trait_eocs.json index 7b5550cd226f4..b031986768d15 100644 --- a/data/mods/Xedra_Evolved/mutations/xe_lilin_trait_eocs.json +++ b/data/mods/Xedra_Evolved/mutations/xe_lilin_trait_eocs.json @@ -298,30 +298,12 @@ "effect": [ { "math": [ "u_vitamin('lilin_ruach_vitamin')", "-=", "100 * lilin_has_ruach_efficiency()" ] }, { "u_message": "You feel icy pinpricks on your skin as your wounds heal.", "type": "mixed" }, - { - "if": { "math": [ "u_hp('torso') < u_hp_max('torso')" ] }, - "then": { "math": [ "u_hp('torso')", "++" ] } - }, - { - "if": { "math": [ "u_hp('head') < u_hp_max('head')" ] }, - "then": { "math": [ "u_hp('head')", "++" ] } - }, - { - "if": { "math": [ "u_hp('arm_l') < u_hp_max('arm_l')" ] }, - "then": { "math": [ "u_hp('arm_l')", "++" ] } - }, - { - "if": { "math": [ "u_hp('arm_r') < u_hp_max('arm_r')" ] }, - "then": { "math": [ "u_hp('arm_r')", "++" ] } - }, - { - "if": { "math": [ "u_hp('leg_l') < u_hp_max('leg_l')" ] }, - "then": { "math": [ "u_hp('leg_l')", "++" ] } - }, - { - "if": { "math": [ "u_hp('leg_r') < u_hp_max('leg_r')" ] }, - "then": { "math": [ "u_hp('leg_r')", "++" ] } - }, + { "if": { "math": [ "u_hp('torso') < u_hp_max('torso')" ] }, "then": { "math": [ "u_hp('torso')++" ] } }, + { "if": { "math": [ "u_hp('head') < u_hp_max('head')" ] }, "then": { "math": [ "u_hp('head')++" ] } }, + { "if": { "math": [ "u_hp('arm_l') < u_hp_max('arm_l')" ] }, "then": { "math": [ "u_hp('arm_l')++" ] } }, + { "if": { "math": [ "u_hp('arm_r') < u_hp_max('arm_r')" ] }, "then": { "math": [ "u_hp('arm_r')++" ] } }, + { "if": { "math": [ "u_hp('leg_l') < u_hp_max('leg_l')" ] }, "then": { "math": [ "u_hp('leg_l')++" ] } }, + { "if": { "math": [ "u_hp('leg_r') < u_hp_max('leg_r')" ] }, "then": { "math": [ "u_hp('leg_r')++" ] } }, { "if": { "and": [ diff --git a/data/mods/Xedra_Evolved/npc/boann.json b/data/mods/Xedra_Evolved/npc/boann.json index 076535d070b0b..6204bcc29b653 100644 --- a/data/mods/Xedra_Evolved/npc/boann.json +++ b/data/mods/Xedra_Evolved/npc/boann.json @@ -109,7 +109,7 @@ { "u_consume_item": "jabberwock_heart", "count": 1, "popup": true }, { "u_buy_monster": "mon_melian_mantis_mount", "count": 1, "name": "Bladepetal" }, { "u_spawn_item": "horse_tack", "count": 1 }, - { "math": [ "Boann_Quests_Completed", "++" ] }, + { "math": [ "Boann_Quests_Completed++" ] }, { "u_add_var": "completed_boann_bring_jabberwock_heart", "value": "yes" }, { "finish_mission": "MISSION_BRING_BOANN_JABBERWOCK_HEART", "success": true } ], @@ -120,7 +120,7 @@ "condition": { "compare_string": [ "yes", { "u_val": "killed_lords_for_boann" } ] }, "effect": [ { "u_add_trait": "CALL_DAFFODIL" }, - { "math": [ "Boann_Quests_Completed", "++" ] }, + { "math": [ "Boann_Quests_Completed++" ] }, { "u_lose_var": "killed_lords_for_boann" }, { "u_add_var": "completed_boann_kill_two_lords", "value": "yes" } ], @@ -131,7 +131,7 @@ "condition": { "compare_string": [ "yes", { "u_val": "killed_dogthing_for_boann" } ] }, "effect": [ { "u_spawn_item": "spellbook_hedge_clairvoyance_cone", "count": 1 }, - { "math": [ "Boann_Quests_Completed", "++" ] }, + { "math": [ "Boann_Quests_Completed++" ] }, { "u_lose_var": "killed_dogthing_for_boann" }, { "u_add_var": "completed_boann_kill_dogthing", "value": "yes" } ], @@ -142,7 +142,7 @@ "condition": { "compare_string": [ "yes", { "u_val": "killed_five_mi_go_guards_for_boann" } ] }, "effect": [ { "u_spawn_item": "mana_recharge_sphere", "count": 1 }, - { "math": [ "Boann_Quests_Completed", "++" ] }, + { "math": [ "Boann_Quests_Completed++" ] }, { "u_lose_var": "killed_five_mi_go_guards_for_boann" }, { "u_add_var": "completed_boann_kill_five_mi_go_guards", "value": "yes" } ], @@ -153,7 +153,7 @@ "condition": { "compare_string": [ "yes", { "u_val": "killed_armored_centipede_for_boann" } ] }, "effect": [ { "u_spawn_item": "boann_insignia", "count": 1 }, - { "math": [ "Boann_Quests_Completed", "++" ] }, + { "math": [ "Boann_Quests_Completed++" ] }, { "u_lose_var": "killed_armored_centipede_for_boann" }, { "u_add_var": "completed_boann_kill_armored_centipede", "value": "yes" } ], @@ -164,7 +164,7 @@ "condition": { "compare_string": [ "yes", { "u_val": "killed_automaton_for_boann" } ] }, "effect": [ { "u_spawn_item": "winter_lord_estoc", "count": 1 }, - { "math": [ "Boann_Quests_Completed", "++" ] }, + { "math": [ "Boann_Quests_Completed++" ] }, { "u_lose_var": "killed_automaton_for_boann" }, { "u_add_var": "completed_boann_kill_dreamforged_automaton", "value": "yes" } ], @@ -178,9 +178,10 @@ { "u_spawn_item": "helmet_verdant", "count": 1 }, { "u_spawn_item": "armor_verdant_cuirass", "count": 1 }, { "u_spawn_item": "gauntlets_verdant", "count": 1 }, + { "u_spawn_item": "legguards_verdant", "count": 1 }, { "u_spawn_item": "boots_verdant", "count": 1 }, { "u_spawn_item": "cloak_verdant", "count": 1 }, - { "math": [ "Boann_Quests_Completed", "++" ] }, + { "math": [ "Boann_Quests_Completed++" ] }, { "u_add_var": "completed_boann_bring_triffid_heart", "value": "yes" }, { "finish_mission": "MISSION_GET_TRIFFID_HEART_FOR_BOANN", "success": true } ], @@ -191,7 +192,7 @@ "condition": { "compare_string": [ "yes", { "u_val": "killed_titan_beetle_for_boann" } ] }, "effect": [ { "u_spawn_item": "väinämöinens_kantele", "count": 1 }, - { "math": [ "Boann_Quests_Completed", "++" ] }, + { "math": [ "Boann_Quests_Completed++" ] }, { "u_lose_var": "killed_titan_beetle_for_boann" }, { "u_add_var": "completed_boann_kill_titan_beetle", "value": "yes" } ], @@ -205,7 +206,7 @@ "effect": [ { "u_consume_item": "shadow_singularity_piece", "count": 1, "popup": true }, { "u_spawn_item": "boann_banner", "count": 1 }, - { "math": [ "Boann_Quests_Completed", "++" ] }, + { "math": [ "Boann_Quests_Completed++" ] }, { "u_add_var": "completed_boann_bring_shadow_piece", "value": "yes" }, { "finish_mission": "MISSION_GET_SHADOW_SINGULARITY_PIECE_FOR_BOANN", "success": true } ], @@ -216,7 +217,7 @@ "condition": { "compare_string": [ "yes", { "u_val": "killed_star_crown_hound_for_boann" } ] }, "effect": [ { "u_spawn_item": "dream_attuning_necklace", "count": 1 }, - { "math": [ "Boann_Quests_Completed", "++" ] }, + { "math": [ "Boann_Quests_Completed++" ] }, { "u_lose_var": "killed_star_crown_hound_for_boann" }, { "u_add_var": "completed_boann_kill_star_crown_hound", "value": "yes" } ], @@ -433,7 +434,7 @@ { "text": "I'll do it. Where's the Jabberwock?", "condition": { "not": { "u_has_mission": "MISSION_BRING_BOANN_JABBERWOCK_HEART" } }, - "effect": [ { "assign_mission": "MISSION_BRING_BOANN_JABBERWOCK_HEART" }, { "math": [ "Boann_Quests_Accepted", "++" ] } ], + "effect": [ { "assign_mission": "MISSION_BRING_BOANN_JABBERWOCK_HEART" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_BRING_BOANN_JABBERWOCK_HEART_ACCEPTED" }, { "text": "Do you have any advice?", "topic": "TALK_BRING_BOANN_JABBERWOCK_HEART_ADVICE" }, @@ -448,7 +449,7 @@ { "text": "I'll do it. Where's the Jabberwock?", "condition": { "not": { "u_has_mission": "MISSION_BRING_BOANN_JABBERWOCK_HEART" } }, - "effect": [ { "assign_mission": "MISSION_BRING_BOANN_JABBERWOCK_HEART" }, { "math": [ "Boann_Quests_Accepted", "++" ] } ], + "effect": [ { "assign_mission": "MISSION_BRING_BOANN_JABBERWOCK_HEART" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_BRING_BOANN_JABBERWOCK_HEART_ACCEPTED" }, { "text": "Can I see the other quests first?", "topic": "TALK_QUEST_LIST" }, @@ -482,7 +483,7 @@ { "text": "I'll do it.", "condition": { "not": { "u_has_mission": "MISSION_KILL_TWO_MARCH_LORDS_FOR_BOANN" } }, - "effect": [ { "assign_mission": "MISSION_KILL_TWO_MARCH_LORDS_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted", "++" ] } ], + "effect": [ { "assign_mission": "MISSION_KILL_TWO_MARCH_LORDS_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_KILL_TWO_MARCH_LORDS_ACCEPTED" }, { "text": "Do you have any advice?", "topic": "TALK_KILL_TWO_MARCH_LORDS_ADVICE" }, @@ -497,7 +498,7 @@ { "text": "I'll do it.", "condition": { "not": { "u_has_mission": "MISSION_KILL_TWO_MARCH_LORDS_FOR_BOANN" } }, - "effect": [ { "assign_mission": "MISSION_KILL_TWO_MARCH_LORDS_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted", "++" ] } ], + "effect": [ { "assign_mission": "MISSION_KILL_TWO_MARCH_LORDS_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_KILL_TWO_MARCH_LORDS_ACCEPTED" }, { "text": "Can I see the other quests first?", "topic": "TALK_QUEST_LIST" }, @@ -531,7 +532,7 @@ { "text": "I'll do it. Where's the dog?", "condition": { "not": { "u_has_mission": "MISSION_KILL_DOGTHING_FOR_BOANN" } }, - "effect": [ { "assign_mission": "MISSION_KILL_DOGTHING_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted", "++" ] } ], + "effect": [ { "assign_mission": "MISSION_KILL_DOGTHING_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_KILL_DOGTHING_ACCEPTED" }, { "text": "Do you have any advice?", "topic": "TALK_KILL_DOGTHING_ADVICE" }, @@ -546,7 +547,7 @@ { "text": "I'll do it. Where's the dog?", "condition": { "not": { "u_has_mission": "MISSION_KILL_DOGTHING_FOR_BOANN" } }, - "effect": [ { "assign_mission": "MISSION_KILL_DOGTHING_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted", "++" ] } ], + "effect": [ { "assign_mission": "MISSION_KILL_DOGTHING_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_KILL_DOGTHING_ACCEPTED" }, { "text": "Can I see the other quests first?", "topic": "TALK_QUEST_LIST" }, @@ -580,7 +581,7 @@ { "text": "I'll do it. Where's the guards?", "condition": { "not": { "u_has_mission": "MISSION_KILL_FIVE_MI_GO_GUARDS_FOR_BOANN" } }, - "effect": [ { "assign_mission": "MISSION_KILL_FIVE_MI_GO_GUARDS_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted", "++" ] } ], + "effect": [ { "assign_mission": "MISSION_KILL_FIVE_MI_GO_GUARDS_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_KILL_FIVE_MI_GO_GUARDS_ACCEPTED" }, { "text": "Do you have any advice?", "topic": "TALK_KILL_FIVE_MI_GO_GUARDS_ADVICE" }, @@ -595,7 +596,7 @@ { "text": "I'll do it. Where's the guards?", "condition": { "not": { "u_has_mission": "MISSION_KILL_FIVE_MI_GO_GUARDS_FOR_BOANN" } }, - "effect": [ { "assign_mission": "MISSION_KILL_FIVE_MI_GO_GUARDS_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted", "++" ] } ], + "effect": [ { "assign_mission": "MISSION_KILL_FIVE_MI_GO_GUARDS_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_KILL_FIVE_MI_GO_GUARDS_ACCEPTED" }, { "text": "Can I see the other quests first?", "topic": "TALK_QUEST_LIST" }, @@ -629,7 +630,7 @@ { "text": "I'll do it. Where's the centipede?", "condition": { "not": { "u_has_mission": "MISSION_KILL_ARMORED_CENTIPEDE_FOR_BOANN" } }, - "effect": [ { "assign_mission": "MISSION_KILL_ARMORED_CENTIPEDE_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted", "++" ] } ], + "effect": [ { "assign_mission": "MISSION_KILL_ARMORED_CENTIPEDE_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_KILL_ARMORED_CENTIPEDE_ACCEPTED" }, { "text": "Do you have any advice?", "topic": "TALK_KILL_ARMORED_CENTIPEDE_ADVICE" }, @@ -644,7 +645,7 @@ { "text": "I'll do it. Where's the centipede?", "condition": { "not": { "u_has_mission": "MISSION_KILL_ARMORED_CENTIPEDE_FOR_BOANN" } }, - "effect": [ { "assign_mission": "MISSION_KILL_ARMORED_CENTIPEDE_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted", "++" ] } ], + "effect": [ { "assign_mission": "MISSION_KILL_ARMORED_CENTIPEDE_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_KILL_ARMORED_CENTIPEDE_ACCEPTED" }, { "text": "Can I see the other quests first?", "topic": "TALK_QUEST_LIST" }, @@ -678,7 +679,7 @@ { "text": "I'll do it. Where's the automaton?", "condition": { "not": { "u_has_mission": "MISSION_KILL_DREAMFORGED_AUTOMATON_FOR_BOANN" } }, - "effect": [ { "assign_mission": "MISSION_KILL_DREAMFORGED_AUTOMATON_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted", "++" ] } ], + "effect": [ { "assign_mission": "MISSION_KILL_DREAMFORGED_AUTOMATON_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_KILL_DREAMFORGED_AUTOMATON_ACCEPTED" }, { "text": "Do you have any advice?", "topic": "TALK_KILL_DREAMFORGED_AUTOMATON_ADVICE" }, @@ -693,7 +694,7 @@ { "text": "I'll do it. Where's the automaton?", "condition": { "not": { "u_has_mission": "MISSION_KILL_DREAMFORGED_AUTOMATON_FOR_BOANN" } }, - "effect": [ { "assign_mission": "MISSION_KILL_DREAMFORGED_AUTOMATON_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted", "++" ] } ], + "effect": [ { "assign_mission": "MISSION_KILL_DREAMFORGED_AUTOMATON_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_KILL_DREAMFORGED_AUTOMATON_ACCEPTED" }, { "text": "Can I see the other quests first?", "topic": "TALK_QUEST_LIST" }, @@ -727,7 +728,7 @@ { "text": "I'll do it. Where's the triffids?", "condition": { "not": { "u_has_mission": "MISSION_GET_TRIFFID_HEART_FOR_BOANN" } }, - "effect": [ { "assign_mission": "MISSION_GET_TRIFFID_HEART_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted", "++" ] } ], + "effect": [ { "assign_mission": "MISSION_GET_TRIFFID_HEART_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_GET_TRIFFID_HEART_ACCEPTED" }, { "text": "Do you have any advice?", "topic": "TALK_GET_TRIFFID_HEART_ADVICE" }, @@ -742,7 +743,7 @@ { "text": "I'll do it. Where's the triffids?", "condition": { "not": { "u_has_mission": "MISSION_GET_TRIFFID_HEART_FOR_BOANN" } }, - "effect": [ { "assign_mission": "MISSION_GET_TRIFFID_HEART_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted", "++" ] } ], + "effect": [ { "assign_mission": "MISSION_GET_TRIFFID_HEART_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_GET_TRIFFID_HEART_ACCEPTED" }, { "text": "Can I see the other quests first?", "topic": "TALK_QUEST_LIST" }, @@ -776,7 +777,7 @@ { "text": "I'll do it. Where's the beetle?", "condition": { "not": { "u_has_mission": "MISSION_KILL_TITAN_BEETLE_FOR_BOANN" } }, - "effect": [ { "assign_mission": "MISSION_KILL_TITAN_BEETLE_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted", "++" ] } ], + "effect": [ { "assign_mission": "MISSION_KILL_TITAN_BEETLE_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_KILL_TITAN_BEETLE_ACCEPTED" }, { "text": "Do you have any advice?", "topic": "TALK_KILL_TITAN_BEETLE_ADVICE" }, @@ -791,7 +792,7 @@ { "text": "I'll do it. Where's the beetle?", "condition": { "not": { "u_has_mission": "MISSION_KILL_TITAN_BEETLE_FOR_BOANN" } }, - "effect": [ { "assign_mission": "MISSION_KILL_TITAN_BEETLE_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted", "++" ] } ], + "effect": [ { "assign_mission": "MISSION_KILL_TITAN_BEETLE_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_KILL_TITAN_BEETLE_ACCEPTED" }, { "text": "Can I see the other quests first?", "topic": "TALK_QUEST_LIST" }, @@ -825,10 +826,7 @@ { "text": "I'll do it.", "condition": { "not": { "u_has_mission": "MISSION_GET_SHADOW_SINGULARITY_PIECE_FOR_BOANN" } }, - "effect": [ - { "assign_mission": "MISSION_GET_SHADOW_SINGULARITY_PIECE_FOR_BOANN" }, - { "math": [ "Boann_Quests_Accepted", "++" ] } - ], + "effect": [ { "assign_mission": "MISSION_GET_SHADOW_SINGULARITY_PIECE_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_GET_SHADOW_SINGULARITY_PIECE_ACCEPTED" }, { "text": "Do you have any advice?", "topic": "TALK_GET_SHADOW_SINGULARITY_PIECE_ADVICE" }, @@ -843,10 +841,7 @@ { "text": "I'll do it.", "condition": { "not": { "u_has_mission": "MISSION_GET_SHADOW_SINGULARITY_PIECE_FOR_BOANN" } }, - "effect": [ - { "assign_mission": "MISSION_GET_SHADOW_SINGULARITY_PIECE_FOR_BOANN" }, - { "math": [ "Boann_Quests_Accepted", "++" ] } - ], + "effect": [ { "assign_mission": "MISSION_GET_SHADOW_SINGULARITY_PIECE_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_GET_SHADOW_SINGULARITY_PIECE_ACCEPTED" }, { "text": "Can I see the other quests first?", "topic": "TALK_QUEST_LIST" }, @@ -880,7 +875,7 @@ { "text": "I'll do it. Where's the hound?", "condition": { "not": { "u_has_mission": "MISSION_KILL_STAR_CROWN_HOUND_FOR_BOANN" } }, - "effect": [ { "assign_mission": "MISSION_KILL_STAR_CROWN_HOUND_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted", "++" ] } ], + "effect": [ { "assign_mission": "MISSION_KILL_STAR_CROWN_HOUND_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_KILL_STAR_CROWN_HOUND_ACCEPTED" }, { "text": "Do you have any advice?", "topic": "TALK_KILL_STAR_CROWN_HOUND_ADVICE" }, @@ -895,7 +890,7 @@ { "text": "I'll do it. Where's the hound?", "condition": { "not": { "u_has_mission": "MISSION_KILL_STAR_CROWN_HOUND_FOR_BOANN" } }, - "effect": [ { "assign_mission": "MISSION_KILL_STAR_CROWN_HOUND_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted", "++" ] } ], + "effect": [ { "assign_mission": "MISSION_KILL_STAR_CROWN_HOUND_FOR_BOANN" }, { "math": [ "Boann_Quests_Accepted++" ] } ], "topic": "TALK_KILL_STAR_CROWN_HOUND_ACCEPTED" }, { "text": "Can I see the other quests first?", "topic": "TALK_QUEST_LIST" }, diff --git a/data/mods/Xedra_Evolved/recipes/paraclesians/arvore_recipes.json b/data/mods/Xedra_Evolved/recipes/paraclesians/arvore_recipes.json index 2a7487a0b47c7..a84cf09ac9851 100644 --- a/data/mods/Xedra_Evolved/recipes/paraclesians/arvore_recipes.json +++ b/data/mods/Xedra_Evolved/recipes/paraclesians/arvore_recipes.json @@ -2,7 +2,7 @@ { "id": "cat_arvore_treesinging", "type": "nested_category", - "activity_level": "LIGHT_EXERCISE", + "activity_level": "MODERATE_EXERCISE", "category": "CC_XEDRA", "subcategory": "CSC_XEDRA_ELEMENTAL", "name": "treesinging", @@ -16,8 +16,19 @@ "create_verdant_helm", "create_verdant_cuirass", "create_verdant_gauntlets", + "create_verdant_leg_guards", "create_verdant_boots", - "create_verdant_cloak" + "create_verdant_cloak", + "create_shortbow_treesung", + "create_greatbow_treesung", + "create_arrow_treesung", + "create_spear_treesung", + "create_pike_treesung", + "create_mace_treesung", + "create_q_staff_treesung", + "create_warhammer_treesung", + "create_naginata_treesung", + "create_baselard_treesung" ], "difficulty": 1 }, @@ -39,10 +50,10 @@ }, { "type": "recipe", - "name": "Treesung wooden chair", + "name": "treesung wooden chair", "id": "create_chair_wood_treesung", "description": "Use your magick to turn treesung wood into a chair.\n\nYou must have Treesinging level 3 and at least 300 mana to create the item.", - "activity_level": "LIGHT_EXERCISE", + "activity_level": "MODERATE_EXERCISE", "category": "CC_*", "subcategory": "CSC_*_NESTED", "skill_used": "deduction", @@ -89,10 +100,10 @@ }, { "type": "recipe", - "name": "Treesung wooden wardrobe", + "name": "treesung wooden wardrobe", "id": "create_wardrobe_wood_treesung", "description": "Use your magick to turn treesung wood into a wardrobe.\n\nYou must have Treesinging level 6 and at least 750 mana to create the item.", - "activity_level": "LIGHT_EXERCISE", + "activity_level": "MODERATE_EXERCISE", "category": "CC_*", "subcategory": "CSC_*_NESTED", "skill_used": "deduction", @@ -139,10 +150,10 @@ }, { "type": "recipe", - "name": "Treesung wooden table", + "name": "treesung wooden table", "id": "create_table_wood_treesung", "description": "Use your magick to turn treesung wood into a table.\n\nYou must have Treesinging level 4 and at least 400 mana to create the item.", - "activity_level": "LIGHT_EXERCISE", + "activity_level": "MODERATE_EXERCISE", "category": "CC_*", "subcategory": "CSC_*_NESTED", "skill_used": "deduction", @@ -189,10 +200,10 @@ }, { "type": "recipe", - "name": "Treesung wooden bed frame", + "name": "treesung wooden bed frame", "id": "create_bedframe_wood_treesung", "description": "Use your magick to turn treesung wood into a bed frame.\n\nYou must have Treesinging level 2 and at least 200 mana to create the item.", - "activity_level": "LIGHT_EXERCISE", + "activity_level": "MODERATE_EXERCISE", "category": "CC_*", "subcategory": "CSC_*_NESTED", "skill_used": "deduction", @@ -242,7 +253,7 @@ "name": "verdant helm", "id": "create_verdant_helm", "description": "Use your magick to turn treesung wood into a helmet made of living wood.\n\nYou must have Treesinging level 5 and at least 500 mana to create the item.", - "activity_level": "LIGHT_EXERCISE", + "activity_level": "MODERATE_EXERCISE", "category": "CC_*", "subcategory": "CSC_*_NESTED", "skill_used": "deduction", @@ -293,7 +304,7 @@ "name": "verdant helm", "id": "create_verdant_cuirass", "description": "Use your magick to turn treesung wood into a cuirass made of living wood.\n\nYou must have Treesinging level 8 and at least 950 mana to create the item.", - "activity_level": "LIGHT_EXERCISE", + "activity_level": "MODERATE_EXERCISE", "category": "CC_*", "subcategory": "CSC_*_NESTED", "skill_used": "deduction", @@ -344,7 +355,7 @@ "name": "verdant gauntlets", "id": "create_verdant_gauntlets", "description": "Use your magick to turn treesung wood into a set of gauntlets made of living wood.\n\nYou must have Treesinging level 7 and at least 850 mana to create the item.", - "activity_level": "LIGHT_EXERCISE", + "activity_level": "MODERATE_EXERCISE", "category": "CC_*", "subcategory": "CSC_*_NESTED", "skill_used": "deduction", @@ -390,12 +401,63 @@ } ] }, + { + "type": "recipe", + "name": "verdant leg guards", + "id": "create_verdant_leg_guards", + "description": "Use your magick to turn treesung wood into a set of leg guards made of living wood.\n\nYou must have Treesinging level 8 and at least 850 mana to create the item.", + "activity_level": "MODERATE_EXERCISE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", + "skill_used": "deduction", + "difficulty": 7, + "time": "250 m", + "autolearn": false, + "proficiencies": [ { "proficiency": "prof_treesinging" }, { "proficiency": "prof_treesinging_equipment" } ], + "components": [ [ [ "log_treesung", 1 ] ], [ [ "leaves", 30 ], [ "young_leaves", 30 ], [ "grape_leaves", 30 ] ] ], + "byproducts": [ [ "splinter", 25 ] ], + "flags": [ "SECRET", "BLIND_HARD" ], + "result_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_VERDANT_LEG_GUARDS_MANA_CHECK", + "condition": { "math": [ "u_val('mana') >= 850" ] }, + "effect": { + "run_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_VERDANT_LEG_GUARDS_SPELL_CHECK", + "condition": { "math": [ "u_spell_level('arvore_tree_singing_spell') >= 8" ] }, + "effect": [ + { + "u_message": "As your song fades, you behold a set of leg guards all made of a single solid piece of wood, with a cushioning of moss and green leaves underneath it, as though it had grown that way in the depths of the forest.", + "type": "good" + }, + { "u_spawn_item": "leg_guards_verdant", "count": 1, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "850" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ], + "false_effect": [ + { "u_message": "Your attempts to sing the wood fail, ruining it!", "type": "bad" }, + { "u_spawn_item": "splinter", "count": { "math": [ "rng(10,80)" ] }, "suppress_message": true }, + { "u_spawn_item": "twig", "count": { "math": [ "rng(10,20)" ] }, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "850" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ] + } + ] + }, + "false_effect": [ + { "u_message": "You do not have enough mana to treesing the wood properly.", "type": "bad" }, + { "math": [ "u_val('mana')", "=", "0" ] } + ] + } + ] + }, { "type": "recipe", "name": "verdant boots", "id": "create_verdant_boots", "description": "Use your magick to turn treesung wood into a set of boots made of living wood.\n\nYou must have Treesinging level 6 and at least 750 mana to create the item.", - "activity_level": "LIGHT_EXERCISE", + "activity_level": "MODERATE_EXERCISE", "category": "CC_*", "subcategory": "CSC_*_NESTED", "skill_used": "deduction", @@ -446,7 +508,7 @@ "name": "verdant cloak", "id": "create_verdant_cloak", "description": "Use your magick to turn treesung wood into a cloak made of living wood and leaves.\n\nYou must have Treesinging level 5 and at least 500 mana to create the item.", - "activity_level": "LIGHT_EXERCISE", + "activity_level": "MODERATE_EXERCISE", "category": "CC_*", "subcategory": "CSC_*_NESTED", "skill_used": "deduction", @@ -491,5 +553,515 @@ ] } ] + }, + { + "type": "recipe", + "name": "treesung shortbow", + "id": "create_shortbow_treesung", + "description": "Use your magick to turn treesung wood into a self bow made of living wood and a thin vine.\n\nYou must have Treesinging level 2 and at least 350 mana to create the item.", + "activity_level": "MODERATE_EXERCISE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", + "skill_used": "deduction", + "difficulty": 1, + "time": "120 m", + "autolearn": false, + "proficiencies": [ { "proficiency": "prof_treesinging" }, { "proficiency": "prof_treesinging_equipment" } ], + "components": [ [ [ "log_treesung", 1 ] ] ], + "byproducts": [ [ "splinter", 150 ] ], + "flags": [ "SECRET", "BLIND_HARD" ], + "result_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_SHORTBOW_TREESUNG_MANA_CHECK", + "condition": { "math": [ "u_val('mana') >= 350" ] }, + "effect": { + "run_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_SHORTBOW_TREESUNG_SPELL_CHECK", + "condition": { "math": [ "u_spell_level('arvore_tree_singing_spell') >= 2" ] }, + "effect": [ + { + "u_message": "As your song fades, you behold a bow all made of a single piece of wood with a thin vine for a string, as though it had grown that way in the depths of the forest.", + "type": "good" + }, + { "u_spawn_item": "treesung_bow", "count": 1, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "350" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ], + "false_effect": [ + { "u_message": "Your attempts to sing the wood fail, ruining it!", "type": "bad" }, + { "u_spawn_item": "splinter", "count": { "math": [ "rng(75,150)" ] }, "suppress_message": true }, + { "u_spawn_item": "twig", "count": { "math": [ "rng(10,20)" ] }, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "350" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ] + } + ] + }, + "false_effect": [ + { "u_message": "You do not have enough mana to treesing the wood properly.", "type": "bad" }, + { "math": [ "u_val('mana')", "=", "0" ] } + ] + } + ] + }, + { + "type": "recipe", + "name": "treesung greatbow", + "id": "create_greatbow_treesung", + "description": "Use your magick to turn treesung wood into a an enormous bow made of living wood and a thin vine.\n\nYou must have Treesinging level 4 and at least 600 mana to create the item.", + "activity_level": "MODERATE_EXERCISE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", + "skill_used": "deduction", + "difficulty": 3, + "time": "240 m", + "autolearn": false, + "proficiencies": [ { "proficiency": "prof_treesinging" }, { "proficiency": "prof_treesinging_equipment" } ], + "components": [ [ [ "log_treesung", 1 ] ] ], + "byproducts": [ [ "splinter", 50 ] ], + "flags": [ "SECRET", "BLIND_HARD" ], + "result_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_GREATBOW_TREESUNG_MANA_CHECK", + "condition": { "math": [ "u_val('mana') >= 600" ] }, + "effect": { + "run_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_GREATBOW_TREESUNG_SPELL_CHECK", + "condition": { "math": [ "u_spell_level('arvore_tree_singing_spell') >= 4" ] }, + "effect": [ + { + "u_message": "As your song fades, you behold an enormous bow all made of a single piece of wood with a thin vine for a string, as though it had grown that way in the depths of the forest.", + "type": "good" + }, + { "u_spawn_item": "treesung_greatbow", "count": 1, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "600" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ], + "false_effect": [ + { "u_message": "Your attempts to sing the wood fail, ruining it!", "type": "bad" }, + { "u_spawn_item": "splinter", "count": { "math": [ "rng(40,80)" ] }, "suppress_message": true }, + { "u_spawn_item": "twig", "count": { "math": [ "rng(5,10)" ] }, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "350" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ] + } + ] + }, + "false_effect": [ + { "u_message": "You do not have enough mana to treesing the wood properly.", "type": "bad" }, + { "math": [ "u_val('mana')", "=", "0" ] } + ] + } + ] + }, + { + "type": "recipe", + "name": "treesung arrows", + "id": "create_arrow_treesung", + "description": "Use your magick to turn treesung wood into a set of arrows made of living wood fletched with leaves.\n\nYou must have Treesinging level 2 and at least 400 mana to create the item.", + "activity_level": "MODERATE_EXERCISE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", + "skill_used": "deduction", + "difficulty": 0, + "time": "60 m", + "autolearn": false, + "proficiencies": [ { "proficiency": "prof_treesinging" }, { "proficiency": "prof_treesinging_equipment" } ], + "components": [ [ [ "log_treesung", 1 ] ], [ [ "leaves", 20 ], [ "young_leaves", 20 ], [ "grape_leaves", 20 ] ] ], + "byproducts": [ [ "splinter", 100 ] ], + "flags": [ "SECRET", "BLIND_HARD" ], + "result_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_ARROWS_TREESUNG_MANA_CHECK", + "condition": { "math": [ "u_val('mana') >= 400" ] }, + "effect": { + "run_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_ARROWS_TREESUNG_SPELL_CHECK", + "condition": { "math": [ "u_spell_level('arvore_tree_singing_spell') >= 2" ] }, + "effect": [ + { + "u_message": "As your song fades, you behold a set of arrows fletched with leaves, as though they had grown that way in the depths of the forest.", + "type": "good" + }, + { "u_spawn_item": "arrow_treesung", "count": 20, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "400" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ], + "false_effect": [ + { "u_message": "Your attempts to sing the wood fail, ruining it!", "type": "bad" }, + { "u_spawn_item": "splinter", "count": { "math": [ "rng(80,180)" ] }, "suppress_message": true }, + { "u_spawn_item": "twig", "count": { "math": [ "rng(10,20)" ] }, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "400" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ] + } + ] + }, + "false_effect": [ + { "u_message": "You do not have enough mana to treesing the wood properly.", "type": "bad" }, + { "math": [ "u_val('mana')", "=", "0" ] } + ] + } + ] + }, + { + "type": "recipe", + "name": "treesung spear", + "id": "create_spear_treesung", + "description": "Use your magick to turn treesung wood into a spear made of living wood.\n\nYou must have Treesinging level 1 and at least 200 mana to create the item.", + "activity_level": "MODERATE_EXERCISE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", + "skill_used": "deduction", + "difficulty": 0, + "time": "30 m", + "autolearn": false, + "proficiencies": [ { "proficiency": "prof_treesinging" }, { "proficiency": "prof_treesinging_equipment" } ], + "components": [ [ [ "log_treesung", 1 ] ] ], + "byproducts": [ [ "splinter", 150 ] ], + "flags": [ "SECRET", "BLIND_HARD" ], + "result_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_SPEAR_TREESUNG_MANA_CHECK", + "condition": { "math": [ "u_val('mana') >= 200" ] }, + "effect": { + "run_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_SPEAR_TREESUNG_SPELL_CHECK", + "condition": { "math": [ "u_spell_level('arvore_tree_singing_spell') >= 1" ] }, + "effect": [ + { + "u_message": "As your song fades, you behold a spear all made of a single piece of wood, as though it had grown that way in the depths of the forest.", + "type": "good" + }, + { "u_spawn_item": "treesung_spear", "count": 1, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "200" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ], + "false_effect": [ + { "u_message": "Your attempts to sing the wood fail, ruining it!", "type": "bad" }, + { "u_spawn_item": "splinter", "count": { "math": [ "rng(75,150)" ] }, "suppress_message": true }, + { "u_spawn_item": "twig", "count": { "math": [ "rng(10,20)" ] }, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "200" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ] + } + ] + }, + "false_effect": [ + { "u_message": "You do not have enough mana to treesing the wood properly.", "type": "bad" }, + { "math": [ "u_val('mana')", "=", "0" ] } + ] + } + ] + }, + { + "type": "recipe", + "name": "treesung long spear", + "id": "create_pike_treesung", + "description": "Use your magick to turn treesung wood into a long spear made of living wood.\n\nYou must have Treesinging level 3 and at least 350 mana to create the item.", + "activity_level": "MODERATE_EXERCISE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", + "skill_used": "deduction", + "difficulty": 2, + "time": "80 m", + "autolearn": false, + "proficiencies": [ { "proficiency": "prof_treesinging" }, { "proficiency": "prof_treesinging_equipment" } ], + "components": [ [ [ "log_treesung", 1 ] ] ], + "byproducts": [ [ "splinter", 50 ] ], + "flags": [ "SECRET", "BLIND_HARD" ], + "result_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_PIKE_TREESUNG_MANA_CHECK", + "condition": { "math": [ "u_val('mana') >= 350" ] }, + "effect": { + "run_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_PIKE_TREESUNG_SPELL_CHECK", + "condition": { "math": [ "u_spell_level('arvore_tree_singing_spell') >= 3" ] }, + "effect": [ + { + "u_message": "As your song fades, you behold a long spear all made of a single piece of wood, as though it had grown that way in the depths of the forest.", + "type": "good" + }, + { "u_spawn_item": "treesung_pike", "count": 1, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "350" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ], + "false_effect": [ + { "u_message": "Your attempts to sing the wood fail, ruining it!", "type": "bad" }, + { "u_spawn_item": "splinter", "count": { "math": [ "rng(75,150)" ] }, "suppress_message": true }, + { "u_spawn_item": "twig", "count": { "math": [ "rng(10,20)" ] }, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "350" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ] + } + ] + }, + "false_effect": [ + { "u_message": "You do not have enough mana to treesing the wood properly.", "type": "bad" }, + { "math": [ "u_val('mana')", "=", "0" ] } + ] + } + ] + }, + { + "type": "recipe", + "name": "treesung mace", + "id": "create_mace_treesung", + "description": "Use your magick to turn treesung wood into a heavy mace made of living wood.\n\nYou must have Treesinging level 3 and at least 350 mana to create the item.", + "activity_level": "MODERATE_EXERCISE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", + "skill_used": "deduction", + "difficulty": 2, + "time": "80 m", + "autolearn": false, + "proficiencies": [ { "proficiency": "prof_treesinging" }, { "proficiency": "prof_treesinging_equipment" } ], + "components": [ [ [ "log_treesung", 1 ] ] ], + "byproducts": [ [ "splinter", 50 ] ], + "flags": [ "SECRET", "BLIND_HARD" ], + "result_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_MACE_TREESUNG_MANA_CHECK", + "condition": { "math": [ "u_val('mana') >= 350" ] }, + "effect": { + "run_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_MACE_TREESUNG_SPELL_CHECK", + "condition": { "math": [ "u_spell_level('arvore_tree_singing_spell') >= 3" ] }, + "effect": [ + { + "u_message": "As your song fades, you behold a mace all made of a single piece of wood, as though it had grown that way in the depths of the forest.", + "type": "good" + }, + { "u_spawn_item": "treesung_mace", "count": 1, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "350" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ], + "false_effect": [ + { "u_message": "Your attempts to sing the wood fail, ruining it!", "type": "bad" }, + { "u_spawn_item": "splinter", "count": { "math": [ "rng(75,150)" ] }, "suppress_message": true }, + { "u_spawn_item": "twig", "count": { "math": [ "rng(10,20)" ] }, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "350" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ] + } + ] + }, + "false_effect": [ + { "u_message": "You do not have enough mana to treesing the wood properly.", "type": "bad" }, + { "math": [ "u_val('mana')", "=", "0" ] } + ] + } + ] + }, + { + "type": "recipe", + "name": "treesung quarterstaff", + "id": "create_q_staff_treesung", + "description": "Use your magick to turn treesung wood into a quarterstaff made of living wood.\n\nYou must have Treesinging level 1 and at least 150 mana to create the item.", + "activity_level": "MODERATE_EXERCISE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", + "skill_used": "deduction", + "difficulty": 0, + "time": "30 m", + "autolearn": false, + "proficiencies": [ { "proficiency": "prof_treesinging" }, { "proficiency": "prof_treesinging_equipment" } ], + "components": [ [ [ "log_treesung", 1 ] ] ], + "byproducts": [ [ "splinter", 150 ] ], + "flags": [ "SECRET", "BLIND_HARD" ], + "result_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_Q_STAFF_TREESUNG_MANA_CHECK", + "condition": { "math": [ "u_val('mana') >= 150" ] }, + "effect": { + "run_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_Q_STAFF_TREESUNG_SPELL_CHECK", + "condition": { "math": [ "u_spell_level('arvore_tree_singing_spell') >= 1" ] }, + "effect": [ + { + "u_message": "As your song fades, you behold a quarterstaff all made of a single piece of wood, as though it had grown that way in the depths of the forest.", + "type": "good" + }, + { "u_spawn_item": "treesung_q_staff", "count": 1, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "150" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ], + "false_effect": [ + { "u_message": "Your attempts to sing the wood fail, ruining it!", "type": "bad" }, + { "u_spawn_item": "splinter", "count": { "math": [ "rng(75,150)" ] }, "suppress_message": true }, + { "u_spawn_item": "twig", "count": { "math": [ "rng(10,20)" ] }, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "150" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ] + } + ] + }, + "false_effect": [ + { "u_message": "You do not have enough mana to treesing the wood properly.", "type": "bad" }, + { "math": [ "u_val('mana')", "=", "0" ] } + ] + } + ] + }, + { + "type": "recipe", + "name": "treesung warhammer", + "id": "create_warhammer_treesung", + "description": "Use your magick to turn treesung wood into a heavy warhammer made of living wood.\n\nYou must have Treesinging level 4 and at least 400 mana to create the item.", + "activity_level": "MODERATE_EXERCISE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", + "skill_used": "deduction", + "difficulty": 3, + "time": "100 m", + "autolearn": false, + "proficiencies": [ { "proficiency": "prof_treesinging" }, { "proficiency": "prof_treesinging_equipment" } ], + "components": [ [ [ "log_treesung", 1 ] ] ], + "byproducts": [ [ "splinter", 40 ] ], + "flags": [ "SECRET", "BLIND_HARD" ], + "result_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_WARHAMMER_TREESUNG_MANA_CHECK", + "condition": { "math": [ "u_val('mana') >= 400" ] }, + "effect": { + "run_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_WARHAMMER_TREESUNG_SPELL_CHECK", + "condition": { "math": [ "u_spell_level('arvore_tree_singing_spell') >= 4" ] }, + "effect": [ + { + "u_message": "As your song fades, you behold a warhammer all made of a single piece of wood, as though it had grown that way in the depths of the forest.", + "type": "good" + }, + { "u_spawn_item": "treesung_warhammer", "count": 1, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "400" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ], + "false_effect": [ + { "u_message": "Your attempts to sing the wood fail, ruining it!", "type": "bad" }, + { "u_spawn_item": "splinter", "count": { "math": [ "rng(65,125)" ] }, "suppress_message": true }, + { "u_spawn_item": "twig", "count": { "math": [ "rng(10,20)" ] }, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "400" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ] + } + ] + }, + "false_effect": [ + { "u_message": "You do not have enough mana to treesing the wood properly.", "type": "bad" }, + { "math": [ "u_val('mana')", "=", "0" ] } + ] + } + ] + }, + { + "type": "recipe", + "name": "treesung sword-spear", + "id": "create_naginata_treesung", + "description": "Use your magick to turn treesung wood into a long spear crowned with a blade made of living wood.\n\nYou must have Treesinging level 5 and at least 500 mana to create the item.", + "activity_level": "MODERATE_EXERCISE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", + "skill_used": "deduction", + "difficulty": 4, + "time": "80 m", + "autolearn": false, + "proficiencies": [ { "proficiency": "prof_treesinging" }, { "proficiency": "prof_treesinging_equipment" } ], + "components": [ [ [ "log_treesung", 1 ] ] ], + "byproducts": [ [ "splinter", 65 ] ], + "flags": [ "SECRET", "BLIND_HARD" ], + "result_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_NAGINATA_TREESUNG_MANA_CHECK", + "condition": { "math": [ "u_val('mana') >= 500" ] }, + "effect": { + "run_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_NAGINATA_TREESUNG_SPELL_CHECK", + "condition": { "math": [ "u_spell_level('arvore_tree_singing_spell') >= 5" ] }, + "effect": [ + { + "u_message": "As your song fades, you behold a long staff with a sword blade at the end all made of a single piece of wood, as though it had grown that way in the depths of the forest.", + "type": "good" + }, + { "u_spawn_item": "treesung_naginata", "count": 1, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "500" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ], + "false_effect": [ + { "u_message": "Your attempts to sing the wood fail, ruining it!", "type": "bad" }, + { "u_spawn_item": "splinter", "count": { "math": [ "rng(45,90)" ] }, "suppress_message": true }, + { "u_spawn_item": "twig", "count": { "math": [ "rng(8,18)" ] }, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "500" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ] + } + ] + }, + "false_effect": [ + { "u_message": "You do not have enough mana to treesing the wood properly.", "type": "bad" }, + { "math": [ "u_val('mana')", "=", "0" ] } + ] + } + ] + }, + { + "type": "recipe", + "name": "treesung baselard", + "id": "create_baselard_treesung", + "description": "Use your magick to turn treesung wood into a large knife made of living wood.\n\nYou must have Treesinging level 2 and at least 200 mana to create the item.", + "activity_level": "MODERATE_EXERCISE", + "category": "CC_*", + "subcategory": "CSC_*_NESTED", + "skill_used": "deduction", + "difficulty": 1, + "time": "45 m", + "autolearn": false, + "proficiencies": [ { "proficiency": "prof_treesinging" }, { "proficiency": "prof_treesinging_equipment" } ], + "components": [ [ [ "log_treesung", 1 ] ] ], + "byproducts": [ [ "splinter", 200 ] ], + "flags": [ "SECRET", "BLIND_HARD" ], + "result_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_BASELARD_TREESUNG_MANA_CHECK", + "condition": { "math": [ "u_val('mana') >= 200" ] }, + "effect": { + "run_eocs": [ + { + "id": "EOC_ARVORE_TREESINGING_BASELARD_TREESUNG_SPELL_CHECK", + "condition": { "math": [ "u_spell_level('arvore_tree_singing_spell') >= 2" ] }, + "effect": [ + { + "u_message": "As your song fades, you behold a large knife all made of a single piece of wood, as though it had grown that way in the depths of the forest.", + "type": "good" + }, + { "u_spawn_item": "treesung_q_staff", "count": 1, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "200" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ], + "false_effect": [ + { "u_message": "Your attempts to sing the wood fail, ruining it!", "type": "bad" }, + { "u_spawn_item": "splinter", "count": { "math": [ "rng(100,200)" ] }, "suppress_message": true }, + { "u_spawn_item": "twig", "count": { "math": [ "rng(15,25)" ] }, "suppress_message": true }, + { "math": [ "u_val('mana')", "-=", "200" ] }, + { "math": [ "u_spell_exp('arvore_tree_singing_spell')", "+=", "rand(450) + 50" ] } + ] + } + ] + }, + "false_effect": [ + { "u_message": "You do not have enough mana to treesing the wood properly.", "type": "bad" }, + { "math": [ "u_val('mana')", "=", "0" ] } + ] + } + ] } ] diff --git a/data/mods/Xedra_Evolved/ter_transforms/arvore_ter_transforms.json b/data/mods/Xedra_Evolved/ter_transforms/arvore_ter_transforms.json index 4db5bb1db6b6a..e0b6c470137eb 100644 --- a/data/mods/Xedra_Evolved/ter_transforms/arvore_ter_transforms.json +++ b/data/mods/Xedra_Evolved/ter_transforms/arvore_ter_transforms.json @@ -1,4 +1,9 @@ [ + { + "type": "ter_furn_transform", + "id": "ter_arvore_tree_to_grass", + "terrain": [ { "result": "t_tree_young", "valid_flags": [ "TREE" ], "message": "" } ] + }, { "type": "ter_furn_transform", "id": "ter_arvore_plant_growth", diff --git a/data/mods/Xedra_Evolved/vehicles/magickal_vehicles.json b/data/mods/Xedra_Evolved/vehicles/magickal_vehicles.json index 224374856a344..2f42473b83b44 100644 --- a/data/mods/Xedra_Evolved/vehicles/magickal_vehicles.json +++ b/data/mods/Xedra_Evolved/vehicles/magickal_vehicles.json @@ -14,5 +14,22 @@ { "x": 1, "y": 0, "parts": [ "xlframe#horizontal", "carbonfiber_boat_hull" ] }, { "x": -1, "y": 0, "parts": [ "xlframe#horizontal", "carbonfiber_boat_hull", "battery_motorbike" ] } ] + }, + { + "type": "vehicle", + "id": "arvore_floral_boat", + "name": "viridescent vessel", + "blueprint": [ [ "" ] ], + "parts": [ + { "x": 0, "y": 0, "parts": [ "floralframe", "floral_engine", "floral_boat_hull", "floral_controls" ] }, + { "x": 0, "y": 1, "parts": [ "floralframe", "floral_boat_hull" ] }, + { "x": 0, "y": -1, "parts": [ "floralframe", "floral_boat_hull" ] }, + { "x": 1, "y": 0, "parts": [ "floralframe", "floral_boat_hull" ] }, + { "x": 1, "y": 1, "parts": [ "floralframe", "floral_boat_hull" ] }, + { "x": 1, "y": -1, "parts": [ "floralframe", "floral_boat_hull" ] }, + { "x": -1, "y": 0, "parts": [ "floralframe", "floral_boat_hull" ] }, + { "x": -1, "y": 1, "parts": [ "floralframe", "floral_boat_hull" ] }, + { "x": -1, "y": -1, "parts": [ "floralframe", "floral_boat_hull" ] } + ] } ] diff --git a/data/mods/Xedra_Evolved/vehicles/vehicle_parts.json b/data/mods/Xedra_Evolved/vehicles/vehicle_parts.json index 3353cae346c0c..38fd8ad1f1a1a 100644 --- a/data/mods/Xedra_Evolved/vehicles/vehicle_parts.json +++ b/data/mods/Xedra_Evolved/vehicles/vehicle_parts.json @@ -46,5 +46,113 @@ "count": 1, "ammo_type": "mana", "melee_damage": { "bash": 1 } + }, + { + "id": "floralframe", + "type": "vehicle_part", + "copy-from": "frame_abstract", + "name": { "str": "floral frame" }, + "durability": 150, + "description": "The thick part of the flower, floating on the water.", + "item": "floral_base_item", + "//": "Item does not matter, none of these parts are installable or uninstallable.", + "breaks_into": [ { "item": "stick", "count": [ 1, 4 ] }, { "item": "leaves", "count": [ 10, 20 ] } ], + "requirements": { + "install": { + "skills": [ [ "mechanics", 1 ] ], + "time": "60 m", + "using": [ [ "welding_alloys", 200 ], [ "vehicle_bolt_install", 2 ] ] + }, + "removal": { + "skills": [ [ "mechanics", 2 ] ], + "time": "10 m", + "using": [ [ "vehicle_weld_removal", 1 ], [ "vehicle_wrench_2", 1 ] ] + }, + "repair": { "skills": [ [ "mechanics", 2 ] ], "time": "9 m", "using": [ [ "repair_welding_alloys", 5 ] ] } + }, + "damage_reduction": { "all": 20 }, + "extend": { "flags": [ "NO_INSTALL_HIDDEN", "NO_UNINSTALL" ] } + }, + { + "id": "floral_engine", + "copy-from": "engine_motor", + "type": "vehicle_part", + "fuel_type": "battery", + "m2c": 30, + "durability": 200, + "epower": "0 W", + "power": "43300 W", + "item": "floral_base_item", + "energy_consumption": "114300 W", + "breaks_into": [ { "item": "leaves", "count": [ 10, 20 ] } ], + "requirements": { + "install": { "skills": [ [ "mechanics", 2 ] ], "time": "60 m", "using": [ [ "vehicle_wrench_2", 1 ] ] }, + "removal": { "skills": [ [ "mechanics", 2 ] ], "time": "30 m", "using": [ [ "vehicle_wrench_2", 1 ] ] }, + "repair": { "skills": [ [ "mechanics", 3 ] ], "time": "60 m", "using": [ [ "welding_standard", 5 ] ] } + }, + "damage_reduction": { "all": 60 }, + "extend": { "flags": [ "NO_INSTALL_HIDDEN", "NO_UNINSTALL" ] } + }, + { + "type": "vehicle_part", + "id": "floral_boat_hull", + "name": { "str": "floral petal" }, + "description": "A giant flower petal.", + "categories": [ "hull" ], + "color": "green", + "damage_modifier": 50, + "durability": 480, + "location": "under", + "item": "floral_base_item", + "epower": "3000 W", + "requirements": { + "install": { "skills": [ [ "mechanics", 6 ] ], "time": "40 m", "using": [ [ "vehicle_screw", 1 ], [ "drilling_standard", 40 ] ] }, + "removal": { "skills": [ [ "mechanics", 4 ] ], "time": "30 m", "using": [ [ "vehicle_screw", 1 ] ] }, + "repair": { "skills": [ [ "mechanics", 7 ] ], "time": "60 m", "using": [ [ "adhesive", 3 ] ] } + }, + "flags": [ "FLOATS", "SEAT", "BOARDABLE", "NO_INSTALL_HIDDEN", "NO_UNINSTALL", "SOLAR_PANEL" ], + "breaks_into": [ { "item": "stick", "count": [ 1, 4 ] }, { "item": "leaves", "count": [ 10, 20 ] } ], + "damage_reduction": { "all": 14 }, + "variants": [ { "symbols": "o", "symbols_broken": "x" } ] + }, + { + "id": "floral_controls", + "type": "vehicle_part", + "copy-from": "controls", + "name": { "str": "stamen" }, + "description": "The central part of the flower.", + "durability": 50, + "item": "floral_base_item", + "requirements": { + "install": { "skills": [ [ "fabrication", 1 ] ], "time": "6 m" }, + "removal": { "skills": [ [ "fabrication", 2 ] ], "time": "6 m" }, + "repair": { "skills": [ [ "fabrication", 2 ] ], "time": "60 m" } + }, + "flags": [ "CONTROLS", "NO_INSTALL_HIDDEN", "NO_UNINSTALL" ], + "breaks_into": [ { "item": "splinter", "count": [ 2, 4 ] } ], + "damage_reduction": { "all": 5 }, + "variants": [ { "symbols": "*", "symbols_broken": "#" } ] + }, + { + "id": "floral_battery", + "copy-from": "battery_car", + "type": "vehicle_part", + "name": { "str": "solar power" }, + "item": "floral_battery", + "durability": 30, + "breaks_into": [ { "item": "leaves", "count": [ 10, 20 ] } ] + }, + { + "id": "floral_battery", + "copy-from": "battery_car", + "type": "MAGAZINE", + "name": { "str_sp": "solar power" }, + "description": "Magical solar power, to power a floral vessel.", + "weight": "1500 g", + "volume": "750 ml", + "price": "200 USD", + "price_postapoc": "1 USD", + "capacity": 225, + "pocket_data": [ { "pocket_type": "MAGAZINE", "rigid": true, "ammo_restriction": { "battery": 225 } } ] } ] diff --git a/data/mods/classic_zombies/alberta_regional_map_settings.json b/data/mods/classic_zombies/alberta_regional_map_settings.json deleted file mode 100644 index a0a5fdbeba717..0000000000000 --- a/data/mods/classic_zombies/alberta_regional_map_settings.json +++ /dev/null @@ -1,1024 +0,0 @@ -[ - { - "type": "region_settings", - "id": "default", - "default_oter": [ - "open_air", - "open_air", - "open_air", - "open_air", - "open_air", - "open_air", - "open_air", - "open_air", - "open_air", - "open_air", - "field", - "solid_earth", - "empty_rock", - "empty_rock", - "deep_rock", - "deep_rock", - "deep_rock", - "deep_rock", - "deep_rock", - "deep_rock", - "deep_rock" - ], - "default_groundcover": [ [ "t_region_groundcover", 1 ] ], - "region_terrain_and_furniture": { - "terrain": { - "t_region_groundcover": { "t_grass": 12000, "t_grass_dead": 2000, "t_dirt": 1000 }, - "t_region_groundcover_urban": { "t_grass": 20, "t_grass_dead": 3 }, - "t_region_groundcover_forest": { "t_grass_long": 5, "t_grass_tall": 1, "t_moss": 1, "t_grass_dead": 3 }, - "t_region_groundcover_swamp": { "t_grass_long": 300, "t_grass_tall": 100, "t_moss": 200, "t_dirt": 200 }, - "t_region_groundcover_barren": { "t_dirt": 30, "t_grass_dead": 2, "t_railroad_rubble": 1 }, - "t_region_grass": { "t_grass": 1 }, - "t_region_soil": { "t_dirt": 1 }, - "t_region_shrub": { - "t_underbrush": 30, - "t_shrub": 15, - "t_fern": 5, - "t_shrub_blueberry": 2, - "t_shrub_strawberry": 2, - "t_shrub_blackberry": 2, - "t_shrub_raspberry": 2, - "t_shrub_huckleberry": 2, - "t_shrub_rose": 2, - "t_shrub_hydrangea": 2, - "t_shrub_lilac": 2, - "t_shrub_grape": 1 - }, - "t_region_shrub_plains": { "t_region_shrub": 1 }, - "t_region_shrub_fruit": { - "t_shrub_blueberry": 6, - "t_shrub_strawberry": 6, - "t_shrub_raspberry": 4, - "t_shrub_grape": 4, - "t_shrub_blackberry": 2, - "t_shrub_huckleberry": 2 - }, - "t_region_shrub_decorative": { "t_shrub": 3, "t_fern": 1, "t_shrub_rose": 2, "t_shrub_hydrangea": 2, "t_shrub_lilac": 2 }, - "t_region_tree_forest_dense": { - "t_tree": 18, - "t_tree_blackjack": 10, - "t_tree_hickory": 18, - "t_tree_pine": 9, - "t_tree_maple": 7, - "t_tree_birch": 7, - "t_tree_beech": 7, - "t_tree_cottonwood": 4, - "t_tree_elm": 4, - "t_tree_cherry": 4, - "t_tree_plum": 2, - "t_region_tree_dead": 5, - "t_region_tree_forest_other": 5 - }, - "t_region_tree_forest_other": { - "t_tree_willow": 15, - "t_tree_alder": 15, - "t_tree_chestnut": 10, - "t_tree_basswood": 10, - "t_tree_hazelnut": 10, - "t_tree_apple": 10, - "t_tree_apricot": 2, - "t_tree_pear": 1, - "t_tree_elderberry": 10, - "t_tree_mulberry": 10, - "t_tree_juniper": 5 - }, - "t_region_tree_forest": { "t_region_tree_forest_dense": 2, "t_region_tree_forest_other": 1 }, - "t_region_tree": { - "t_tree": 128, - "t_tree_young": 128, - "t_tree_birch": 16, - "t_tree_elm": 16, - "t_tree_cottonwood": 16, - "t_tree_basswood": 16, - "t_tree_alder": 16, - "t_tree_pine": 32, - "t_tree_maple": 32, - "t_tree_willow": 32, - "t_tree_hickory": 16, - "t_tree_walnut": 8, - "t_tree_chestnut": 8, - "t_tree_hazelnut": 2, - "t_tree_beech": 2, - "t_tree_blackjack": 8, - "t_tree_apple": 2, - "t_tree_apricot": 2, - "t_tree_cherry": 2, - "t_tree_juniper": 2, - "t_tree_pear": 2, - "t_tree_plum": 2, - "t_tree_elderberry": 2, - "t_tree_mulberry": 2, - "t_region_tree_dead": 48 - }, - "t_region_tree_shade": { - "t_tree": 64, - "t_tree_young": 32, - "t_tree_birch": 16, - "t_tree_elm": 16, - "t_tree_cottonwood": 16, - "t_tree_basswood": 16, - "t_tree_alder": 16, - "t_tree_maple": 32, - "t_tree_willow": 32, - "t_tree_hickory": 16, - "t_tree_chestnut": 8, - "t_tree_blackjack": 8, - "t_tree_elderberry": 2, - "t_tree_mulberry": 2, - "t_tree_dead": 2 - }, - "t_region_tree_fruit": { - "t_tree_young": 4, - "t_tree_apple": 2, - "t_tree_apricot": 2, - "t_tree_cherry": 2, - "t_tree_pear": 2, - "t_tree_plum": 2, - "t_tree_elderberry": 2, - "t_tree_mulberry": 2, - "t_tree_dead": 4 - }, - "t_region_tree_dead": { "t_tree_hickory_dead": 8, "t_tree_dead": 7, "t_tree_deadpine": 3 }, - "t_region_tree_nut": { - "t_tree_hickory": 16, - "t_tree_hickory_dead": 16, - "t_tree_walnut": 8, - "t_tree_chestnut": 8, - "t_tree_young": 4, - "t_tree_beech": 2, - "t_tree_hazelnut": 2, - "t_tree_dead": 4 - }, - "t_region_tree_evergreen": { "t_tree_pine": 32, "t_tree_juniper": 16, "t_tree_deadpine": 2 } - }, - "furniture": { - "f_region_flower": { - "f_black_eyed_susan": 100, - "f_lily": 100, - "f_flower_tulip": 100, - "f_flower_spurge": 100, - "f_chamomile": 100, - "f_dandelion": 100, - "f_dahlia": 100, - "f_bluebell": 100, - "f_sunflower": 100 - }, - "f_region_flower_decorative": { - "f_lily": 4, - "f_flower_tulip": 4, - "f_black_eyed_susan": 3, - "f_bluebell": 2, - "f_maianthemum_stellatum": 2, - "f_flower_spurge": 1, - "f_dahlia": 1, - "f_salsify": 1, - "f_chicory": 1, - "f_sunflower": 1 - }, - "f_region_weed": { - "f_chamomile": 400, - "f_carrot_wild": 300, - "f_salsify": 300, - "f_datura": 300, - "f_japanese_knotweed": 300, - "f_bluebell": 200, - "f_burdock": 100, - "f_dahlia": 100, - "f_lily": 100, - "f_sunflower": 100, - "f_mustard": 100 - }, - "f_region_plain": { - "f_dandelion": 600, - "f_flower_spurge": 400, - "f_chamomile": 400, - "f_carrot_wild": 300, - "f_salsify": 300, - "f_datura": 300, - "f_japanese_knotweed": 200, - "f_dahlia": 200, - "f_maianthemum_stellatum": 200, - "f_mutpoppy": 200, - "f_black_eyed_susan": 100, - "f_flower_tulip": 100, - "f_mustard": 100, - "f_sunflower": 100, - "f_jerusalem_artichoke": 100, - "f_lily": 100, - "f_chicory": 100 - }, - "f_region_forest": { - "f_burdock": 2000, - "f_bluebell": 600, - "f_wild_sarsaparilla": 600, - "f_lily": 500, - "f_chamomile": 500, - "f_japanese_knotweed": 300, - "f_carrot_wild": 300, - "f_salsify": 300, - "f_dahlia": 200, - "f_mutpoppy": 100, - "f_maianthemum_stellatum": 100, - "f_wintergreen": 100 - }, - "f_region_forest_dense": { - "f_burdock": 2000, - "f_bluebell": 800, - "f_lily": 500, - "f_wild_sarsaparilla": 400, - "f_salsify": 300, - "f_wintergreen": 200 - }, - "f_region_forest_water": { "f_burdock": 4, "f_japanese_knotweed": 2, "f_lily": 1 }, - "f_region_water_plant": { "f_cattails": 15, "f_lilypad": 1, "f_lotus": 5 } - } - }, - "river_scale": 1.0, - "overmap_lake_settings": { - "noise_threshold_lake": 0.35, - "lake_size_min": 15, - "lake_depth": -5, - "shore_extendable_overmap_terrain": [ "forest", "forest_thick", "forest_water", "field" ], - "shore_extendable_overmap_terrain_aliases": [ - { "om_terrain": "island_forest", "om_terrain_match_type": "TYPE", "alias": "forest" }, - { "om_terrain": "island_forest_thick", "om_terrain_match_type": "TYPE", "alias": "forest_thick" }, - { "om_terrain": "island_forest_water", "om_terrain_match_type": "TYPE", "alias": "forest_water" }, - { "om_terrain": "island_field", "om_terrain_match_type": "TYPE", "alias": "field" } - ] - }, - "overmap_ocean_settings": { - "noise_threshold_ocean": 0.25, - "ocean_size_min": 100, - "ocean_depth": -9, - "ocean_start_north": 250, - "ocean_start_east": 900, - "ocean_start_west": 200, - "ocean_start_south": 0, - "sandy_beach_width": 6 - }, - "overmap_ravine_settings": { "num_ravines": 0, "ravine_width": 3, "ravine_range": 45, "ravine_depth": -3 }, - "overmap_forest_settings": { - "noise_threshold_forest": 0.4, - "noise_threshold_forest_thick": 0.45, - "noise_threshold_swamp_adjacent_water": 0.5, - "noise_threshold_swamp_isolated": 0.7, - "river_floodplain_buffer_distance_min": 3, - "river_floodplain_buffer_distance_max": 15 - }, - "overmap_connection_settings": { - "intra_city_road_connection": "local_road", - "inter_city_road_connection": "local_road", - "trail_connection": "forest_trail", - "sewer_connection": "sewer_tunnel", - "subway_connection": "subway_tunnel", - "rail_connection": "local_railroad" - }, - "forest_mapgen_settings": { - "forest": { - "terrains": [ "forest", "special_forest" ], - "sparseness_adjacency_factor": 3, - "item_group": "forest", - "item_group_chance": 60, - "item_spawn_iterations": 1, - "clear_groundcover": false, - "groundcover": { "t_region_groundcover_forest": 1 }, - "clear_components": false, - "components": { - "trees": { "sequence": 0, "chance": 12, "clear_types": false, "types": { "t_region_tree_forest": 128, "t_tree_young": 32 } }, - "shrubs_and_flowers": { "sequence": 1, "chance": 10, "clear_types": false, "types": { "t_region_shrub": 120, "f_region_forest": 10 } }, - "clutter": { - "sequence": 2, - "chance": 80, - "clear_types": false, - "types": { - "t_trunk": 128, - "t_dirtmound": 128, - "f_boulder_small": 128, - "f_rubble_rock": 32, - "f_boulder_medium": 8, - "f_boulder_large": 1, - "t_pit": 1, - "t_pit_shallow": 1 - } - }, - "water": { "sequence": 3, "chance": 512, "clear_types": false, "types": { "t_puddle": 1 } } - }, - "clear_terrain_furniture": false, - "terrain_furniture": { } - }, - "forest_thick": { - "terrains": [ - "bandit_cabin", - "bandit_garage_1", - "bandit_garage_2", - "campsite", - "campsite_a", - "campsite_cabin_incomplete", - "campsite_field_biker", - "campsite_field_biker_destroyed", - "cave", - "central_lab_entrance", - "derelict_property", - "desolatebarn", - "forest_thick", - "forest_trail", - "forest_trail_intersection", - "homelesscamp", - "moonshine_still", - "moonshine_still_1", - "moonshine_still_2", - "natural_spring", - "special_forest_thick", - "spider_pit", - "standing_stones", - "ws_survivor_bunker_f0" - ], - "sparseness_adjacency_factor": 4, - "item_group": "forest", - "item_group_chance": 60, - "item_spawn_iterations": 1, - "clear_groundcover": false, - "groundcover": { "t_region_groundcover_forest": 1 }, - "clear_components": false, - "components": { - "trees": { "sequence": 0, "chance": 5, "clear_types": false, "types": { "t_region_tree_forest_dense": 100, "t_tree_young": 5 } }, - "shrubs_and_flowers": { "sequence": 1, "chance": 5, "clear_types": false, "types": { "t_region_shrub": 130, "f_region_forest_dense": 10 } }, - "clutter": { - "sequence": 2, - "chance": 64, - "clear_types": false, - "types": { - "t_trunk": 64, - "t_dirtmound": 64, - "f_boulder_small": 32, - "f_rubble_rock": 32, - "f_boulder_medium": 16, - "f_boulder_large": 4, - "t_pit": 1, - "t_pit_shallow": 1 - } - }, - "water": { "sequence": 3, "chance": 512, "clear_types": false, "types": { "t_puddle": 1 } } - }, - "clear_terrain_furniture": false, - "terrain_furniture": { } - }, - "forest_water": { - "terrains": [ "forest_water", "hunter_shack", "hunter_shack_1", "shipwreck_river_1", "shipwreck_river_2" ], - "sparseness_adjacency_factor": 2, - "item_group": "forest", - "item_group_chance": 60, - "item_spawn_iterations": 1, - "clear_groundcover": false, - "groundcover": { "t_region_groundcover_swamp": 1 }, - "clear_components": false, - "components": { - "trees": { - "sequence": 0, - "chance": 45, - "clear_types": false, - "types": { - "t_tree": 40, - "t_tree_young": 80, - "t_tree_pine": 40, - "t_tree_birch": 20, - "t_tree_elm": 20, - "t_tree_cottonwood": 20, - "t_tree_alder": 80, - "t_tree_maple": 40, - "t_tree_willow": 40, - "t_tree_walnut": 8, - "t_tree_chestnut": 8, - "t_tree_hazelnut": 2, - "t_tree_beech": 2, - "t_tree_hickory": 8, - "t_tree_apple": 2, - "t_tree_cherry": 2, - "t_tree_juniper": 2, - "t_tree_pear": 2, - "t_tree_plum": 2, - "t_tree_elderberry": 2, - "t_tree_mulberry": 2, - "t_region_tree_dead": 90 - } - }, - "shrubs_and_flowers": { "sequence": 1, "chance": 15, "clear_types": false, "types": { "t_region_shrub": 80, "f_region_forest_water": 30 } }, - "clutter": { - "sequence": 2, - "chance": 75, - "clear_types": false, - "types": { "t_trunk": 1, "f_boulder_small": 2, "f_boulder_medium": 1 } - }, - "water": { - "sequence": 3, - "chance": 2, - "clear_types": false, - "types": { "t_swater_sh": 6, "t_swater_dp": 1, "t_water_murky": 12 } - } - }, - "clear_terrain_furniture": false, - "terrain_furniture": { "t_water_murky": { "chance": 2, "clear_furniture": false, "furniture": { "f_region_water_plant": 1 } } } - } - }, - "forest_trail_settings": { - "chance": 2, - "border_point_chance": 2, - "minimum_forest_size": 100, - "random_point_min": 4, - "random_point_max": 50, - "random_point_size_scalar": 100, - "trailhead_chance": 1, - "trailhead_road_distance": 6, - "trailheads": { "trailhead_basic": 1, "trailhead_outhouse": 1, "trailhead_shack": 1 } - }, - "map_extras": { - "forest": { - "chance": 40, - "extras": { - "mx_blackberry_patch": 1000, - "mx_point_dead_vegetation": 500, - "mx_point_burned_ground": 500, - "mx_grove": 500, - "mx_shrubbery": 500, - "mx_spider": 200, - "mx_clearcut": 125, - "mx_pond": 125, - "mx_pond_forest": 125, - "mx_pond_forest_2": 125, - "mx_clay_deposit": 125, - "mx_knotweed_patch": 120, - "mx_grass2": 40, - "mx_casings": 2, - "mx_fallen_shed": 30, - "mx_corpses": 30, - "mx_collegekids": 25, - "mx_grass": 20, - "mx_science": 20, - "mx_toxic_waste": 10, - "mx_supplydrop": 8, - "mx_military": 1, - "mx_drugdeal": 8, - "mx_mass_grave": 5, - "mx_helicopter": 1 - } - }, - "forest_thick": { - "chance": 30, - "extras": { - "mx_blackberry_patch": 1300, - "mx_grove": 500, - "mx_shrubbery": 500, - "mx_point_dead_vegetation": 500, - "mx_point_burned_ground": 500, - "mx_spider": 200, - "mx_clearcut": 125, - "mx_pond": 125, - "mx_pond_forest": 125, - "mx_pond_forest_2": 125, - "mx_clay_deposit": 125, - "mx_knotweed_patch": 100, - "mx_casings": 2, - "mx_corpses": 30, - "mx_science": 20, - "mx_collegekids": 25, - "mx_drugdeal": 20, - "mx_grass2": 20, - "mx_fallen_shed": 20, - "mx_toxic_waste": 15, - "mx_grass": 10, - "mx_military": 1, - "mx_mass_grave": 5, - "mx_supplydrop": 5, - "mx_helicopter": 1 - } - }, - "forest_water": { - "chance": 20, - "extras": { - "mx_pond": 240, - "mx_pond_swamp": 240, - "mx_pond_swamp_2": 240, - "mx_spider": 200, - "mx_clay_deposit": 140, - "mx_knotweed_patch": 140, - "mx_point_dead_vegetation": 60, - "mx_science": 50, - "mx_military": 5, - "mx_supplydrop": 25, - "mx_drugdeal": 20, - "mx_fallen_shed": 10, - "mx_casings": 2, - "mx_corpses": 80, - "mx_grass2": 20, - "mx_grass": 10, - "mx_toxic_waste": 10, - "mx_helicopter": 5 - } - }, - "field": { - "chance": 6, - "extras": { - "mx_grass": 3500, - "mx_grass2": 3500, - "mx_trees2": 800, - "mx_point_burned_ground": 500, - "mx_point_dead_vegetation": 500, - "mx_trees": 500, - "mx_knotweed_patch": 250, - "mx_fallen_shed": 200, - "mx_pond": 200, - "mx_casings": 10, - "mx_mass_grave": 50, - "mx_grave": 50, - "mx_supplydrop": 40, - "mx_collegekids": 30, - "mx_drugdeal": 30, - "mx_corpses": 30, - "mx_toxic_waste": 10, - "mx_science": 10, - "mx_military": 1 - } - }, - "road": { - "chance": 75, - "extras": { - "mx_helicopter": 10, - "mx_military": 20, - "mx_science": 400, - "mx_collegekids": 500, - "mx_roadblock": 40, - "mx_roadblock_mil": 10, - "mx_bandits_block": 800, - "mx_drugdeal": 300, - "mx_supplydrop": 100, - "mx_roadworks": 1000, - "mx_mayhem": 500, - "mx_casings": 10, - "mx_corpses": 300, - "mx_prison_bus": 150, - "mx_prison_van": 10 - } - }, - "bridgehead_ground": { "chance": 5, "extras": { "mx_minefield": 100 } }, - "road_nesw_manhole": { "chance": 20, "extras": { "mx_city_trap": 100 } }, - "build": { - "chance": 90, - "extras": { - "mx_bugout": 20, - "mx_house_spider": 40, - "mx_military": 1, - "mx_science": 12, - "mx_collegekids": 15, - "mx_point_burned_ground": 5, - "mx_casings": 2, - "mx_looters": 10, - "mx_corpses": 30 - } - }, - "subway": { "chance": 75, "extras": { "mx_military": 1, "mx_science": 12, "mx_drugdeal": 5, "mx_casings": 1 } }, - "lab_subway": { "chance": 25, "extras": { "mx_military": 1, "mx_science": 15 } }, - "research_facility_lot": { - "chance": 3, - "extras": { - "mx_helicopter": 15, - "mx_military": 20, - "mx_collegekids": 1, - "mx_crater": 180, - "mx_point_burned_ground": 100, - "mx_casings": 30 - } - }, - "research_facility_interior": { "chance": 2, "extras": { "mx_military": 5, "mx_crater": 300, "mx_point_burned_ground": 125, "mx_casings": 30 } }, - "river": { "chance": 3, "extras": { "mx_reed": 100 } }, - "lake_shore": { "chance": 2, "extras": { "mx_reed": 100 } }, - "sewer": { "chance": 80, "extras": { "mx_null": 100 } } - }, - "city": { - "shop_radius": 30, - "shop_sigma": 50, - "park_radius": 20, - "park_sigma": 80, - "houses": { - "2storyModern01": 5, - "2storyModern02": 50, - "2StoryModern03": 50, - "2StoryModern04": 50, - "house_w_1": 50, - "house_two_story_basement": 50, - "multi_unit_two_story_basement": 40, - "multi_unit_three_story_basement": 30, - "house_crack1": 5, - "house_crack2": 5, - "house_crack3": 5, - "house_wooded": 50, - "house_prepper": 20, - "house_prepper2": 10, - "house_fortified": 20, - "duplex": 50, - "house_duplex2": 50, - "house_duplex3": 50, - "house_duplex4": 50, - "house_duplex5": 50, - "house_duplex6": 50, - "house_duplex7": 50, - "house_duplex8": 50, - "house_duplex9": 50, - "house_duplex10": 50, - "house_duplex11": 50, - "house_w_2": 50, - "house_w_3": 50, - "house_w_4": 50, - "house_w_5": 50, - "house_w_6": 50, - "house_01": 50, - "house_02": 50, - "house_03": 50, - "house_04": 50, - "house_05": 50, - "house_06": 50, - "house_07": 50, - "house_08": 50, - "house_09": 50, - "house_10": 50, - "house_11": 50, - "house_12": 50, - "house_13": 50, - "house_14": 50, - "house_15": 50, - "house_16": 50, - "house_17": 50, - "house_18": 50, - "house_19": 50, - "house_20": 50, - "house_21": 50, - "house_22": 50, - "house_23": 50, - "house_24": 50, - "house_25": 50, - "house_26": 50, - "house_27": 50, - "house_28": 50, - "house_29": 50, - "house_30": 50, - "house_31": 50, - "house_32": 50, - "house_33": 50, - "house_34": 50, - "house_35": 50, - "house_36": 50, - "house_37": 50, - "house_38": 50, - "house_39": 50, - "house_40": 50, - "house_41": 50, - "house_42": 50, - "house_garage": 50, - "house_garage2": 50, - "house_garage3": 50, - "house_garage4": 50, - "house_garage5": 50, - "house_garage6": 50, - "house_garage7": 50, - "house_garage8": 50, - "rural_house1": 50, - "rural_house2": 50, - "garden_house_1": 50, - "house_toolshed": 50, - "house_suicide": 20, - "house_quiverfull": 30, - "house_rv": 50, - "house_porch": 50, - "house_patio": 50, - "house_modern_1": 50, - "house_library": 50, - "house_detatched1": 50, - "house_detatched2": 50, - "house_detatched3": 50, - "house_detatched4": 50, - "house_detatched5": 50, - "house_detatched6": 50, - "house_detatched7": 50, - "house_detatched8": 50, - "house_detatched9": 50, - "house_detatched10": 50, - "house_dogs": 50, - "house_gardener": 50, - "house_inner_garden": 50, - "urban_1_house": 50, - "urban_2_house": 50, - "urban_dd_house": 1, - "urban_3_house": 50, - "urban_4_house_basement": 50, - "urban_5_house": 50, - "urban_6_house": 50, - "urban_7_house_garden": 50, - "urban_8_house_brick_garden": 50, - "urban_9_house_garage_loft": 50, - "urban_10_house_brick_pool": 50, - "urban_11_house_brick": 50, - "urban_12_house": 50, - "urban_15_house": 50, - "urban_16_house_ranch": 50, - "urban_17_house_ranch": 50, - "urban_18_victorian": 50, - "emptyresidentiallot": 20, - "house_vacant": 7, - "house_vacant1": 7, - "house_vacant2": 7, - "house_vacant3": 7, - "apartments_con_new": 10, - "apartments_mod_new": 10, - "s_apt": 30, - "s_apt_2": 30, - "school": 15, - "motel_city": 10, - "fishing_pond_city": 10 - }, - "parks": { - "park": 50, - "park_2": 50, - "park_3": 50, - "park_4": 50, - "park_5": 50, - "park_6": 50, - "park_7": 50, - "pool": 20, - "pool_1": 20, - "pool_2": 20, - "pool_3": 20, - "pool_4": 20, - "pool_5": 20, - "pool_6": 20, - "playground": 40, - "playground_1": 40, - "dog_park": 20, - "volleyball_court": 30, - "tennis_court": 30, - "baskeball_court": 30, - "skate_park_ramp": 20, - "skate_park": 20, - "park_maze": 10, - "park_maze_2": 10, - "small_wooded_trail": 30, - "small_wooded_trail_2": 30, - "pavilion": 100, - "pavilion_1": 100, - "cemetery_small": 200, - "Pond": 200, - "communitygarden": 75, - "communitygarden_2": 75, - "communitygarden_3": 75, - "publicgarden": 100, - "publicgarden_2": 100, - "cathedral": 50, - "football_field": 25, - "baseball_field": 50, - "botanical_garden": 100, - "zoo": 25, - "stadium": 25, - "stadium_football": 25, - "cemetery_city": 50, - "public_pond_city": 50, - "cemetery_religious_city": 25, - "cs_private_park": 100, - "cs_public_art_piece": 100, - "cs_public_space": 100, - "cs_city_dump_small": 100, - "cs_open_sewer": 100 - }, - "shops": { - "bus_station": 200, - "city_block_2": 300, - "textile_mill_museum": 50, - "abandoned_textile_mill": 20, - "s_apt": 50, - "s_apt_2": 50, - "urban_13_dense_house_apt_house": 300, - "urban_14_dense_house_mart_food": 200, - "urban_25_dense_diner_apt": 200, - "urban_29_dense_row": 200, - "town_hall": 150, - "craft_shop": 200, - "craft_shop_1": 200, - "craft_shop_2": 200, - "craft_shop_3": 200, - "s_gas": 500, - "s_gas_1": 500, - "s_pharm": 300, - "s_pharm_1": 300, - "s_cosmetic": 300, - "s_grocery": 1500, - "s_grocery_1": 1500, - "s_hardware": 400, - "s_hardware_1": 400, - "s_hardware_2": 400, - "s_hardware_3": 400, - "s_hunting": 300, - "s_sports": 500, - "dojo": 200, - "dojo_1": 200, - "gym": 100, - "gym_fitness": 200, - "gym_fitness_1": 200, - "s_liquor": 500, - "s_gun": 50, - "s_gun_looted": 50, - "s_gun_1": 50, - "s_gun_2": 50, - "s_gun_3": 50, - "s_gun_3_looted": 50, - "s_gun_4": 50, - "s_gun_4_looted": 50, - "s_gunstore": 50, - "s_gunstore_looted": 50, - "s_clothes": 450, - "s_clothes_1": 200, - "s_clothes_2": 200, - "s_clothes_3": 100, - "s_clothes_4": 300, - "s_clothes_5": 100, - "s_clothes_6": 450, - "s_library": 200, - "s_library_1": 200, - "s_library_2": 200, - "s_bookstore": 200, - "s_bookstore_1": 200, - "s_bookstore_2": 200, - "s_restaurant": 400, - "s_restaurant_foodplace": 400, - "s_restaurant_1": 400, - "s_restaurant_2": 400, - "s_restaurant_3": 400, - "s_diner": 400, - "sub_station": 1600, - "bank": 300, - "bank_1": 300, - "s_pizza_parlor": 400, - "s_pizza_parlor_1": 400, - "bar": 400, - "bar_1": 400, - "s_electronics": 400, - "s_electronics_1": 400, - "s_electronicstore": 400, - "pawn": 300, - "pawn_1": 300, - "pawn_pf": 50, - "mil_surplus": 20, - "mil_surplus_1": 20, - "mil_surplus_2": 20, - "s_garage": 300, - "s_garage_1": 300, - "s_garage_2": 300, - "station_radio": 300, - "station_radio_1": 300, - "office_doctor": 200, - "office_doctor_1": 200, - "office_doctor_2": 200, - "office_tower_collapsed": 250, - "s_restaurant_fast": 400, - "s_restaurant_fast_1": 400, - "s_restaurant_coffee": 200, - "s_restaurant_coffee_1": 200, - "s_restaurant_coffee_2": 100, - "s_teashop": 100, - "s_teashop_1": 100, - "bowling_alley": 200, - "church": 200, - "church_1": 200, - "office_cubical": 200, - "office_cubical_1": 200, - "furniture": 200, - "abstorefront": 200, - "abstorefront_1": 200, - "abstorefront_2": 200, - "police": 100, - "police_1": 100, - "police_2": 100, - "police_dept": 1250, - "fire_station": 200, - "fire_station_1": 200, - "home_improvement": 200, - "s_lot": 400, - "s_arcade": 200, - "s_games": 200, - "s_jewelry_shop": 200, - "s_antique": 200, - "s_gardening": 200, - "s_dive_shop": 300, - "museum": 100, - "s_music": 200, - "s_laundromat": 100, - "s_laundromat_1": 100, - "veterinarian": 200, - "animalpound": 200, - "animalshelter": 100, - "mortuary": 100, - "smallscrapyard": 100, - "stripclub": 100, - "stripclub_1": 100, - "stripclub_2": 100, - "orchard": 200, - "dispensary": 100, - "dispensary_1": 100, - "dispensary_2": 100, - "headshop": 100, - "small_office": 200, - "art_gallery": 200, - "small_storage_units": 150, - "small_storage_units_1": 150, - "construction_site": 600, - "post_office": 200, - "post_office_1": 200, - "candy_shop": 200, - "candy_shop_1": 200, - "bakery": 200, - "icecream_shop": 200, - "s_butcher": 200, - "s_butcher_1": 200, - "s_butcher_2": 200, - "s_bike_shop": 100, - "s_bike_shop_1": 100, - "paintball_field": 100, - "paintball_field_1": 100, - "smoke_lounge": 100, - "smoke_lounge_1": 100, - "gambling_hall": 100, - "gambling_hall_1": 100, - "music_venue": 100, - "music_venue_1": 100, - "dump": 100, - "recyclecenter": 100, - "recyclecenter_1": 100, - "recyclecenter_2": 100, - "landfill": 100, - "warehouse": 100, - "abandonedwarehouse": 100, - "abandonedwarehouse_1": 100, - "abandonedwarehouse_2": 100, - "abandonedwarehouse_3": 100, - "abandonedwarehouse_4": 100, - "emptycommerciallot": 100, - "lancenter": 100, - "lancenter_1": 100, - "dollarstore": 200, - "dollarstore_1": 200, - "s_vfw": 100, - "s_daycare": 100, - "s_thrift": 100, - "s_petstore": 100, - "s_petstore_1": 100, - "s_petstore_2": 100, - "megastore": 150, - "hotel_1": 75, - "hotel_2": 75, - "hotel_3": 75, - "hospital": 175, - "urban_35_hospital": 175, - "public_works": 200, - "office_tower": 150, - "office_tower_2": 150, - "office_skyscraper": 300, - "office_tower_large": 300, - "office_tower_hiddenlab": 50, - "mall": 100, - "home_improvement_superstore_new": 150, - "lumberyard": 75, - "landscaping_supply_co": 150, - "storage_units_large": 125, - "storage_units_medium": 125, - "shopping_plaza": 125, - "movie_theater": 75, - "garage_gas_city": 250, - "2fmotel_city": 50, - "cs_car_dealership": 200, - "cs_car_showroom": 100, - "s_cardealer": 200, - "s_camping": 300, - "cs_gardening_allotment": 100, - "cs_internet_cafe": 100, - "cs_market_small": 100, - "cs_sex_shop": 100, - "cs_tire_shop": 100, - "homeless_shelter": 100, - "parking_garage": 200, - "salon": 500, - "strip_mall": 750 - } - }, - "weather": { - "base_temperature": 5.5, - "base_humidity": 50.0, - "base_pressure": 1000, - "base_wind": 4.4, - "base_wind_distrib_peaks": 80, - "base_wind_season_variation": 50, - "weather_black_list": [ "early_portal_storm", "portal_storm" ] - }, - "overmap_feature_flag_settings": { "clear_blacklist": false, "blacklist": [ ], "clear_whitelist": false, "whitelist": [ ] } - } -] diff --git a/data/mods/classic_zombies/exclusions.json b/data/mods/classic_zombies/exclusions.json index bb0b4570d3f0c..359c480a14c65 100644 --- a/data/mods/classic_zombies/exclusions.json +++ b/data/mods/classic_zombies/exclusions.json @@ -1,9 +1,4 @@ [ - { - "type": "region_overlay", - "regions": [ "all" ], - "overmap_feature_flag_settings": { "whitelist": [ "CLASSIC" ] } - }, { "type": "MONSTER_WHITELIST", "mode": "EXCLUSIVE", @@ -36,24 +31,6 @@ "stype": "bool", "value": true }, - { - "type": "region_overlay", - "regions": [ "all" ], - "map_extras": { - "forest": { "extras": { "mx_portal": 0, "mx_portal_in": 0, "mx_spider": 0, "mx_exocrash_1": 0, "mx_exocrash_2": 0 } }, - "forest_thick": { - "extras": { "mx_portal": 0, "mx_portal_in": 0, "mx_spider": 0, "mx_jabberwock": 0, "mx_exocrash_1": 0, "mx_exocrash_2": 0 } - }, - "forest_water": { "extras": { "mx_portal": 0, "mx_portal_in": 0, "mx_spider": 0, "mx_exocrash_1": 0, "mx_exocrash_2": 0 } }, - "field": { "extras": { "mx_portal": 0, "mx_portal_in": 0, "mx_exocrash_1": 0, "mx_exocrash_2": 0 } }, - "road": { "extras": { "mx_portal": 0, "mx_portal_in": 0, "mx_exocrash_1": 0, "mx_exocrash_2": 0 } }, - "build": { - "extras": { "mx_house_spider": 0, "mx_house_wasp": 0, "mx_portal": 0, "mx_portal_in": 0, "mx_exocrash_1": 0, "mx_exocrash_2": 0 } - }, - "marloss": { "chance": 0, "extras": { "mx_marloss_pilgrimage": 0 } }, - "subway": { "extras": { "mx_portal": 0, "mx_portal_in": 0 } } - } - }, { "type": "effect_on_condition", "id": "EOC_PORTAL_STORM_WARN_OR_CAUSE_RECURRING", diff --git a/data/mods/classic_zombies/modinfo.json b/data/mods/classic_zombies/modinfo.json index bc4511405222e..65d2814b486a1 100644 --- a/data/mods/classic_zombies/modinfo.json +++ b/data/mods/classic_zombies/modinfo.json @@ -47,5 +47,59 @@ "name": "LONGITUDE", "stype": "float", "value": -113.49 + }, + { + "type": "EXTERNAL_OPTION", + "name": "OVERMAP_FOREST_INCREASE_NORTH", + "stype": "float", + "value": 0.1 + }, + { + "type": "EXTERNAL_OPTION", + "name": "OVERMAP_FOREST_INCREASE_EAST", + "stype": "float", + "value": 0.0 + }, + { + "type": "EXTERNAL_OPTION", + "name": "OVERMAP_FOREST_INCREASE_WEST", + "stype": "float", + "value": 0.1 + }, + { + "type": "EXTERNAL_OPTION", + "name": "OVERMAP_FOREST_INCREASE_SOUTH", + "stype": "float", + "value": 0.0 + }, + { + "type": "EXTERNAL_OPTION", + "name": "OVERMAP_FOREST_LIMIT", + "stype": "float", + "value": 0.6 + }, + { + "type": "EXTERNAL_OPTION", + "name": "OVERMAP_URBAN_INCREASE_NORTH", + "stype": "int", + "value": -1 + }, + { + "type": "EXTERNAL_OPTION", + "name": "OVERMAP_URBAN_INCREASE_EAST", + "stype": "int", + "value": 0 + }, + { + "type": "EXTERNAL_OPTION", + "name": "OVERMAP_URBAN_INCREASE_WEST", + "stype": "int", + "value": -1 + }, + { + "type": "EXTERNAL_OPTION", + "name": "OVERMAP_URBAN_INCREASE_SOUTH", + "stype": "int", + "value": 0 } ] diff --git a/data/mods/classic_zombies/region_overlay.json b/data/mods/classic_zombies/region_overlay.json new file mode 100644 index 0000000000000..43ae897dd246f --- /dev/null +++ b/data/mods/classic_zombies/region_overlay.json @@ -0,0 +1,43 @@ +[ + { + "type": "region_overlay", + "regions": [ "all" ], + "//": "Meant to be Alberta, Canada", + "//1": "TODO: Should change regional terrain/furniture", + "overmap_lake_settings": { "//": "Smaller less numerous lakes", "noise_threshold_lake": 0.35, "lake_size_min": 15 }, + "overmap_ocean_settings": { "ocean_start_north": 250, "ocean_start_east": 900, "ocean_start_west": 200 }, + "overmap_forest_settings": { + "noise_threshold_forest": 0.4, + "noise_threshold_forest_thick": 0.45, + "noise_threshold_swamp_adjacent_water": 0.5, + "noise_threshold_swamp_isolated": 0.7 + }, + "city": { + "//": "Increased hunting store chance, decreased gun store/mil surplus chances.", + "shops": { + "s_hunting": 300, + "s_gun": 50, + "s_gun_looted": 50, + "s_gun_1": 50, + "s_gun_2": 50, + "s_gun_3": 50, + "s_gun_3_looted": 50, + "s_gun_4": 50, + "s_gun_4_looted": 50, + "s_gunstore": 50, + "s_gunstore_looted": 50, + "mil_surplus": 20, + "mil_surplus_1": 20, + "mil_surplus_2": 20 + } + }, + "weather": { + "base_temperature": 5.5, + "base_humidity": 50.0, + "base_pressure": 1000, + "base_wind": 4.4, + "weather_black_list": [ "early_portal_storm", "portal_storm" ] + }, + "overmap_feature_flag_settings": { "whitelist": [ "CLASSIC" ] } + } +] diff --git a/data/raw/keybindings.json b/data/raw/keybindings.json index 5ef4601f89e2f..4d005f545b637 100644 --- a/data/raw/keybindings.json +++ b/data/raw/keybindings.json @@ -4861,6 +4861,20 @@ { "input_method": "keyboard_code", "mod": [ "ctrl" ], "key": "y" } ] }, + { + "type": "keybinding", + "id": "TOGGLE_MONSTER_GROUP", + "category": "SCORES_UI", + "name": "Toggle monster group", + "bindings": [ { "input_method": "keyboard_any", "key": "m" } ] + }, + { + "type": "keybinding", + "id": "TOGGLE_NPC_GROUP", + "category": "SCORES_UI", + "name": "Toggle NPC group", + "bindings": [ { "input_method": "keyboard_any", "key": "n" } ] + }, { "type": "keybinding", "id": "HELP_KEYBINDINGS", diff --git a/doc/OVERMAP.md b/doc/OVERMAP.md index 2b46d171c67f3..f336c67e2f3c4 100644 --- a/doc/OVERMAP.md +++ b/doc/OVERMAP.md @@ -267,6 +267,7 @@ rotation for the referenced overmap terrains (e.g. the `_north` version for all) ### `see_cost` values | name | role | +|------|------| | `"all_clear"` | This tile has no or minimal horizontal obstacles and can be seen down through | | `"none"` | This tile has no or minimal horizontal obstacles - most flat terrain | | `"low"` | This tile has low horizontal obstacles or few higher obstacles | diff --git a/msvc-full-features/Cataclysm-vcpkg-static.sln b/msvc-full-features/Cataclysm-vcpkg-static.sln index 5f2629d5ab1fa..916c9c2af4e95 100644 --- a/msvc-full-features/Cataclysm-vcpkg-static.sln +++ b/msvc-full-features/Cataclysm-vcpkg-static.sln @@ -42,6 +42,12 @@ Global Release-NoTiles|ARM64EC = Release-NoTiles|ARM64EC Release-NoTiles|x64 = Release-NoTiles|x64 Release-NoTiles|x86 = Release-NoTiles|x86 + Quick|ARM64EC = Quick|ARM64EC + Quick|x64 = Quick|x64 + Quick|x86 = Quick|x86 + Quick-NoTiles|ARM64EC = Quick-NoTiles|ARM64EC + Quick-NoTiles|x64 = Quick-NoTiles|x64 + Quick-NoTiles|x86 = Quick-NoTiles|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {19F0BE17-3DAF-40E8-A9D2-904A56382E54}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC @@ -68,6 +74,18 @@ Global {19F0BE17-3DAF-40E8-A9D2-904A56382E54}.Release-NoTiles|x64.Build.0 = Release-NoTiles|x64 {19F0BE17-3DAF-40E8-A9D2-904A56382E54}.Release-NoTiles|x86.ActiveCfg = Release-NoTiles|Win32 {19F0BE17-3DAF-40E8-A9D2-904A56382E54}.Release-NoTiles|x86.Build.0 = Release-NoTiles|Win32 + {19F0BE17-3DAF-40E8-A9D2-904A56382E54}.Quick|ARM64EC.ActiveCfg = Release|ARM64EC + {19F0BE17-3DAF-40E8-A9D2-904A56382E54}.Quick|ARM64EC.Build.0 = Release|ARM64EC + {19F0BE17-3DAF-40E8-A9D2-904A56382E54}.Quick|x64.ActiveCfg = Release|x64 + {19F0BE17-3DAF-40E8-A9D2-904A56382E54}.Quick|x64.Build.0 = Release|x64 + {19F0BE17-3DAF-40E8-A9D2-904A56382E54}.Quick|x86.ActiveCfg = Release|Win32 + {19F0BE17-3DAF-40E8-A9D2-904A56382E54}.Quick|x86.Build.0 = Release|Win32 + {19F0BE17-3DAF-40E8-A9D2-904A56382E54}.Quick-NoTiles|ARM64EC.ActiveCfg = Release-NoTiles|ARM64EC + {19F0BE17-3DAF-40E8-A9D2-904A56382E54}.Quick-NoTiles|ARM64EC.Build.0 = Release-NoTiles|ARM64EC + {19F0BE17-3DAF-40E8-A9D2-904A56382E54}.Quick-NoTiles|x64.ActiveCfg = Release-NoTiles|x64 + {19F0BE17-3DAF-40E8-A9D2-904A56382E54}.Quick-NoTiles|x64.Build.0 = Release-NoTiles|x64 + {19F0BE17-3DAF-40E8-A9D2-904A56382E54}.Quick-NoTiles|x86.ActiveCfg = Release-NoTiles|Win32 + {19F0BE17-3DAF-40E8-A9D2-904A56382E54}.Quick-NoTiles|x86.Build.0 = Release-NoTiles|Win32 {2C1ECEE1-9686-4C3C-8DE1-88996EE43378}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC {2C1ECEE1-9686-4C3C-8DE1-88996EE43378}.Debug|ARM64EC.Build.0 = Debug|ARM64EC {2C1ECEE1-9686-4C3C-8DE1-88996EE43378}.Debug|x64.ActiveCfg = Debug|x64 @@ -92,6 +110,12 @@ Global {2C1ECEE1-9686-4C3C-8DE1-88996EE43378}.Release-NoTiles|x64.Build.0 = Release-NoTiles|x64 {2C1ECEE1-9686-4C3C-8DE1-88996EE43378}.Release-NoTiles|x86.ActiveCfg = Release-NoTiles|Win32 {2C1ECEE1-9686-4C3C-8DE1-88996EE43378}.Release-NoTiles|x86.Build.0 = Release-NoTiles|Win32 + {2C1ECEE1-9686-4C3C-8DE1-88996EE43378}.Quick|ARM64EC.ActiveCfg = Release|ARM64EC + {2C1ECEE1-9686-4C3C-8DE1-88996EE43378}.Quick|x64.ActiveCfg = Release|x64 + {2C1ECEE1-9686-4C3C-8DE1-88996EE43378}.Quick|x86.ActiveCfg = Release|Win32 + {2C1ECEE1-9686-4C3C-8DE1-88996EE43378}.Quick-NoTiles|ARM64EC.ActiveCfg = Release-NoTiles|ARM64EC + {2C1ECEE1-9686-4C3C-8DE1-88996EE43378}.Quick-NoTiles|x64.ActiveCfg = Release-NoTiles|x64 + {2C1ECEE1-9686-4C3C-8DE1-88996EE43378}.Quick-NoTiles|x86.ActiveCfg = Release-NoTiles|Win32 {0009BB11-11AD-4C14-A5FC-D882A942C00B}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC {0009BB11-11AD-4C14-A5FC-D882A942C00B}.Debug|ARM64EC.Build.0 = Debug|ARM64EC {0009BB11-11AD-4C14-A5FC-D882A942C00B}.Debug|x64.ActiveCfg = Debug|x64 @@ -116,6 +140,18 @@ Global {0009BB11-11AD-4C14-A5FC-D882A942C00B}.Release-NoTiles|x64.Build.0 = Release-NoTiles|x64 {0009BB11-11AD-4C14-A5FC-D882A942C00B}.Release-NoTiles|x86.ActiveCfg = Release-NoTiles|Win32 {0009BB11-11AD-4C14-A5FC-D882A942C00B}.Release-NoTiles|x86.Build.0 = Release-NoTiles|Win32 + {0009BB11-11AD-4C14-A5FC-D882A942C00B}.Quick|ARM64EC.ActiveCfg = Release|ARM64EC + {0009BB11-11AD-4C14-A5FC-D882A942C00B}.Quick|ARM64EC.Build.0 = Release|ARM64EC + {0009BB11-11AD-4C14-A5FC-D882A942C00B}.Quick|x64.ActiveCfg = Release|x64 + {0009BB11-11AD-4C14-A5FC-D882A942C00B}.Quick|x64.Build.0 = Release|x64 + {0009BB11-11AD-4C14-A5FC-D882A942C00B}.Quick|x86.ActiveCfg = Release|Win32 + {0009BB11-11AD-4C14-A5FC-D882A942C00B}.Quick|x86.Build.0 = Release|Win32 + {0009BB11-11AD-4C14-A5FC-D882A942C00B}.Quick-NoTiles|ARM64EC.ActiveCfg = Release-NoTiles|ARM64EC + {0009BB11-11AD-4C14-A5FC-D882A942C00B}.Quick-NoTiles|ARM64EC.Build.0 = Release-NoTiles|ARM64EC + {0009BB11-11AD-4C14-A5FC-D882A942C00B}.Quick-NoTiles|x64.ActiveCfg = Release-NoTiles|x64 + {0009BB11-11AD-4C14-A5FC-D882A942C00B}.Quick-NoTiles|x64.Build.0 = Release-NoTiles|x64 + {0009BB11-11AD-4C14-A5FC-D882A942C00B}.Quick-NoTiles|x86.ActiveCfg = Release-NoTiles|Win32 + {0009BB11-11AD-4C14-A5FC-D882A942C00B}.Quick-NoTiles|x86.Build.0 = Release-NoTiles|Win32 {35D74C75-FC4A-442F-AF44-43BC9D845BAF}.Debug|ARM64EC.ActiveCfg = Debug|x64 {35D74C75-FC4A-442F-AF44-43BC9D845BAF}.Debug|x64.ActiveCfg = Debug|x64 {35D74C75-FC4A-442F-AF44-43BC9D845BAF}.Debug|x64.Build.0 = Debug|x64 @@ -136,6 +172,12 @@ Global {35D74C75-FC4A-442F-AF44-43BC9D845BAF}.Release-NoTiles|x64.Build.0 = Release|x64 {35D74C75-FC4A-442F-AF44-43BC9D845BAF}.Release-NoTiles|x86.ActiveCfg = Release|Win32 {35D74C75-FC4A-442F-AF44-43BC9D845BAF}.Release-NoTiles|x86.Build.0 = Release|Win32 + {35D74C75-FC4A-442F-AF44-43BC9D845BAF}.Quick|ARM64EC.ActiveCfg = Release|ARM64EC + {35D74C75-FC4A-442F-AF44-43BC9D845BAF}.Quick|x64.ActiveCfg = Release|x64 + {35D74C75-FC4A-442F-AF44-43BC9D845BAF}.Quick|x86.ActiveCfg = Release|Win32 + {35D74C75-FC4A-442F-AF44-43BC9D845BAF}.Quick-NoTiles|ARM64EC.ActiveCfg = Release|ARM64EC + {35D74C75-FC4A-442F-AF44-43BC9D845BAF}.Quick-NoTiles|x64.ActiveCfg = Release|x64 + {35D74C75-FC4A-442F-AF44-43BC9D845BAF}.Quick-NoTiles|x86.ActiveCfg = Release|Win32 {534A4E38-96A1-40E4-BDA7-8D17607F0270}.Debug|ARM64EC.ActiveCfg = Debug|x64 {534A4E38-96A1-40E4-BDA7-8D17607F0270}.Debug|x64.ActiveCfg = Debug|x64 {534A4E38-96A1-40E4-BDA7-8D17607F0270}.Debug|x64.Build.0 = Debug|x64 @@ -156,6 +198,12 @@ Global {534A4E38-96A1-40E4-BDA7-8D17607F0270}.Release-NoTiles|x64.Build.0 = Release|x64 {534A4E38-96A1-40E4-BDA7-8D17607F0270}.Release-NoTiles|x86.ActiveCfg = Release|Win32 {534A4E38-96A1-40E4-BDA7-8D17607F0270}.Release-NoTiles|x86.Build.0 = Release|Win32 + {534A4E38-96A1-40E4-BDA7-8D17607F0270}.Quick|ARM64EC.ActiveCfg = Release|ARM64EC + {534A4E38-96A1-40E4-BDA7-8D17607F0270}.Quick|x64.ActiveCfg = Release|x64 + {534A4E38-96A1-40E4-BDA7-8D17607F0270}.Quick|x86.ActiveCfg = Release|Win32 + {534A4E38-96A1-40E4-BDA7-8D17607F0270}.Quick-NoTiles|ARM64EC.ActiveCfg = Release|ARM64EC + {534A4E38-96A1-40E4-BDA7-8D17607F0270}.Quick-NoTiles|x64.ActiveCfg = Release|x64 + {534A4E38-96A1-40E4-BDA7-8D17607F0270}.Quick-NoTiles|x86.ActiveCfg = Release|Win32 {8A533A64-435D-4D4F-9FF0-1E97AACE9374}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC {8A533A64-435D-4D4F-9FF0-1E97AACE9374}.Debug|ARM64EC.Build.0 = Debug|ARM64EC {8A533A64-435D-4D4F-9FF0-1E97AACE9374}.Debug|x64.ActiveCfg = Debug|x64 @@ -180,6 +228,18 @@ Global {8A533A64-435D-4D4F-9FF0-1E97AACE9374}.Release-NoTiles|x64.Build.0 = Release|x64 {8A533A64-435D-4D4F-9FF0-1E97AACE9374}.Release-NoTiles|x86.ActiveCfg = Release|Win32 {8A533A64-435D-4D4F-9FF0-1E97AACE9374}.Release-NoTiles|x86.Build.0 = Release|Win32 + {8A533A64-435D-4D4F-9FF0-1E97AACE9374}.Quick|ARM64EC.ActiveCfg = Release|ARM64EC + {8A533A64-435D-4D4F-9FF0-1E97AACE9374}.Quick|ARM64EC.Build.0 = Release|ARM64EC + {8A533A64-435D-4D4F-9FF0-1E97AACE9374}.Quick|x64.ActiveCfg = Release|x64 + {8A533A64-435D-4D4F-9FF0-1E97AACE9374}.Quick|x64.Build.0 = Release|x64 + {8A533A64-435D-4D4F-9FF0-1E97AACE9374}.Quick|x86.ActiveCfg = Release|Win32 + {8A533A64-435D-4D4F-9FF0-1E97AACE9374}.Quick|x86.Build.0 = Release|Win32 + {8A533A64-435D-4D4F-9FF0-1E97AACE9374}.Quick-NoTiles|ARM64EC.ActiveCfg = Release|ARM64EC + {8A533A64-435D-4D4F-9FF0-1E97AACE9374}.Quick-NoTiles|ARM64EC.Build.0 = Release|ARM64EC + {8A533A64-435D-4D4F-9FF0-1E97AACE9374}.Quick-NoTiles|x64.ActiveCfg = Release|x64 + {8A533A64-435D-4D4F-9FF0-1E97AACE9374}.Quick-NoTiles|x64.Build.0 = Release|x64 + {8A533A64-435D-4D4F-9FF0-1E97AACE9374}.Quick-NoTiles|x86.ActiveCfg = Release|Win32 + {8A533A64-435D-4D4F-9FF0-1E97AACE9374}.Quick-NoTiles|x86.Build.0 = Release|Win32 {0C0B2BEA-311F-473C-9652-87923EF639E3}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC {0C0B2BEA-311F-473C-9652-87923EF639E3}.Debug|ARM64EC.Build.0 = Debug|ARM64EC {0C0B2BEA-311F-473C-9652-87923EF639E3}.Debug|x64.ActiveCfg = Debug|x64 @@ -204,6 +264,18 @@ Global {0C0B2BEA-311F-473C-9652-87923EF639E3}.Release-NoTiles|x64.Build.0 = Release-NoTiles|x64 {0C0B2BEA-311F-473C-9652-87923EF639E3}.Release-NoTiles|x86.ActiveCfg = Release-NoTiles|Win32 {0C0B2BEA-311F-473C-9652-87923EF639E3}.Release-NoTiles|x86.Build.0 = Release-NoTiles|Win32 + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Quick|ARM64EC.ActiveCfg = Release|ARM64EC + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Quick|ARM64EC.Build.0 = Release|ARM64EC + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Quick|x64.ActiveCfg = Release|x64 + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Quick|x64.Build.0 = Release|x64 + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Quick|x86.ActiveCfg = Release|Win32 + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Quick|x86.Build.0 = Release|Win32 + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Quick-NoTiles|ARM64EC.ActiveCfg = Release-NoTiles|ARM64EC + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Quick-NoTiles|ARM64EC.Build.0 = Release-NoTiles|ARM64EC + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Quick-NoTiles|x64.ActiveCfg = Release-NoTiles|x64 + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Quick-NoTiles|x64.Build.0 = Release-NoTiles|x64 + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Quick-NoTiles|x86.ActiveCfg = Release-NoTiles|Win32 + {0C0B2BEA-311F-473C-9652-87923EF639E3}.Quick-NoTiles|x86.Build.0 = Release-NoTiles|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/action.cpp b/src/action.cpp index 821d97307212c..05edb70cc4d4c 100644 --- a/src/action.cpp +++ b/src/action.cpp @@ -1220,7 +1220,7 @@ std::optional choose_adjacent( const tripoint_bub_ms &pos, [&]( const input_context & ctxt, const std::string & action ) { if( action == "SELECT" ) { const std::optional mouse_pos = ctxt.get_coordinates( - g->w_terrain, g->ter_view_p.xy(), true ); + g->w_terrain, g->ter_view_p.raw().xy(), true ); if( mouse_pos ) { const tripoint_rel_ms vec = *mouse_pos - pos; if( vec.x() >= -1 && vec.x() <= 1 diff --git a/src/activity_handlers.cpp b/src/activity_handlers.cpp index ba6bc17132df3..3d2ecdd36a660 100644 --- a/src/activity_handlers.cpp +++ b/src/activity_handlers.cpp @@ -1983,7 +1983,7 @@ void activity_handlers::start_fire_do_turn( player_activity *act, Character *you you->mod_moves( -you->get_moves() ); const firestarter_actor *actor = dynamic_cast( usef->get_actor_ptr() ); - const float light = actor->light_mod( you->pos() ); + const float light = actor->light_mod( you->pos_bub() ); act->moves_left -= light * 100; if( light < 0.1 ) { add_msg( m_bad, _( "There is not enough sunlight to start a fire now. You stop trying." ) ); @@ -2149,7 +2149,7 @@ void activity_handlers::vehicle_finish( player_activity *act, Character *you ) // TODO: Z (and also where the activity is queued) // Or not, because the vehicle coordinates are dropped anyway if( !resume_for_multi_activities( *you ) ) { - point int_p( act->values[ 2 ], act->values[ 3 ] ); + point_rel_ms int_p( act->values[ 2 ], act->values[ 3 ] ); if( vp->vehicle().is_appliance() ) { g->exam_appliance( vp->vehicle(), int_p ); } else { diff --git a/src/animation.cpp b/src/animation.cpp index 84011bfc6b08e..08095d3789e85 100644 --- a/src/animation.cpp +++ b/src/animation.cpp @@ -127,7 +127,7 @@ tripoint_rel_ms relative_view_pos( const avatar &u, const tripoint_bub_ms &p ) n // Convert p to screen position relative to the current terrain view tripoint_rel_ms relative_view_pos( const game &g, const tripoint_bub_ms &p ) noexcept { - return tripoint_rel_ms( p.raw() - g.ter_view_p + point( POSX, POSY ) ); + return p - g.ter_view_p + point( POSX, POSY ); } void draw_explosion_curses( game &g, const tripoint_bub_ms ¢er, const int r, @@ -531,17 +531,6 @@ void game::draw_bullet( const tripoint_bub_ms &t, const int /*i*/, tilecontext->void_bullet(); } -void game::draw_bullet( const tripoint &t, const int i, - const std::vector &trajectory, const char bullet ) -{ - std::vector temp; - temp.resize( trajectory.size() ); - for( const tripoint &it : trajectory ) { - const tripoint_bub_ms tmp = tripoint_bub_ms( it ); - temp.emplace_back( tmp ); - } - game::draw_bullet( tripoint_bub_ms( t ), i, temp, bullet ); -} #else void game::draw_bullet( const tripoint_bub_ms &t, const int i, const std::vector &trajectory, @@ -549,12 +538,6 @@ void game::draw_bullet( const tripoint_bub_ms &t, const int i, { draw_bullet_curses( m, t, bullet, &trajectory[i] ); } -void game::draw_bullet( const tripoint &t, const int i, const std::vector &trajectory, - const char bullet ) -{ - const tripoint_bub_ms temp = tripoint_bub_ms( trajectory[i] ); - draw_bullet_curses( m, tripoint_bub_ms( t ), bullet, &temp ); -} #endif namespace @@ -566,11 +549,11 @@ void hit_animation( const avatar &u, const tripoint_bub_ms ¢er, nc_color cCo { const tripoint_rel_ms init_pos = relative_view_pos( u, center ); // Only show animation if initially visible - if( init_pos.z() == 0 && is_valid_in_w_terrain( init_pos.xy().raw() ) ) { + if( init_pos.z() == 0 && is_valid_in_w_terrain( init_pos.xy() ) ) { shared_ptr_fast hit_cb = make_shared_fast( [&]() { // In case the window is resized during waiting, we always re-calculate the animation position const tripoint_rel_ms pos = relative_view_pos( u, center ); - if( pos.z() == 0 && is_valid_in_w_terrain( pos.xy().raw() ) ) { + if( pos.z() == 0 && is_valid_in_w_terrain( pos.xy() ) ) { mvwprintz( g->w_terrain, pos.xy().raw(), cColor, cTile ); } } ); @@ -613,20 +596,11 @@ void game::draw_hit_mon( const tripoint_bub_ms &p, const monster &m, const bool bullet_animation().progress(); } -void game::draw_hit_mon( const tripoint &p, const monster &m, const bool dead ) -{ - game::draw_hit_mon( tripoint_bub_ms( p ), m, dead ); -} #else void game::draw_hit_mon( const tripoint_bub_ms &p, const monster &m, const bool dead ) { draw_hit_mon_curses( p, m, u, dead ); } - -void game::draw_hit_mon( const tripoint &p, const monster &m, const bool dead ) -{ - draw_hit_mon_curses( tripoint_bub_ms( p ), m, u, dead ); -} #endif namespace @@ -709,17 +683,6 @@ void draw_line_curses( game &g, const tripoint_bub_ms ¢er, } //namespace #if defined(TILES) -void game::draw_line( const tripoint &p, const tripoint ¢er, - const std::vector &points, bool noreveal ) -{ - std::vector bub_points; - std::transform( points.begin(), points.end(), std::back_inserter( bub_points ), - []( const tripoint & t ) { - return tripoint_bub_ms( t ); - } ); - draw_line( tripoint_bub_ms( p ), tripoint_bub_ms( center ), bub_points, noreveal ); -} - void game::draw_line( const tripoint_bub_ms &p, const tripoint_bub_ms ¢er, const std::vector &points, bool noreveal ) { @@ -745,22 +708,6 @@ void game::draw_line( const tripoint_bub_ms &p, const tripoint_bub_ms ¢er, draw_line_curses( *this, center, points, noreveal ); } - -void game::draw_line( const tripoint &p, const tripoint ¢er, - const std::vector &points, bool noreveal ) -{ - if( !u.sees( p ) ) { - return; - } - - std::vector temp; - temp.reserve( points.size() ); - for( const tripoint &it : points ) { - const tripoint_bub_ms tmp = tripoint_bub_ms( it ); - temp.push_back( tmp ); - } - draw_line_curses( *this, tripoint_bub_ms( center ), temp, noreveal ); -} #endif namespace @@ -780,33 +727,12 @@ void draw_line_curses( game &g, const std::vector &points ) } //namespace #if defined(TILES) -void game::draw_line( const tripoint &p, const std::vector &points ) -{ - std::vector temp; - temp.resize( points.size() ); - for( const tripoint &it : points ) { - const tripoint_bub_ms tmp = tripoint_bub_ms( it ); - temp.emplace_back( tmp ); - } - draw_line_curses( *this, temp ); - tilecontext->init_draw_line( tripoint_bub_ms( p ), temp, "line_trail", false ); -} void game::draw_line( const tripoint_bub_ms &p, const std::vector &points ) { draw_line_curses( *this, points ); tilecontext->init_draw_line( p, points, "line_trail", false ); } #else -void game::draw_line( const tripoint &/*p*/, const std::vector &points ) -{ - std::vector temp; - temp.resize( points.size() ); - for( const tripoint &it : points ) { - const tripoint_bub_ms tmp = tripoint_bub_ms( it ); - temp.emplace_back( tmp ); - } - draw_line_curses( *this, temp ); -} void game::draw_line( const tripoint_bub_ms &/*p*/, const std::vector &points ) { draw_line_curses( *this, points ); @@ -820,21 +746,12 @@ void game::draw_cursor( const tripoint_bub_ms &p ) const mvwputch_inv( w_terrain, rp.xy().raw(), c_light_green, 'X' ); tilecontext->init_draw_cursor( p ); } - -void game::draw_cursor( const tripoint &p ) const -{ - game::draw_cursor( tripoint_bub_ms( p ) ); -} #else void game::draw_cursor( const tripoint_bub_ms &p ) const { const tripoint_rel_ms rp = relative_view_pos( *this, p ); mvwputch_inv( w_terrain, rp.xy().raw(), c_light_green, 'X' ); } -void game::draw_cursor( const tripoint &p ) const -{ - game::draw_cursor( tripoint_bub_ms( p ) ); -} #endif void game::draw_cursor_unobscuring( const tripoint_bub_ms &p ) const @@ -854,21 +771,11 @@ void game::draw_highlight( const tripoint_bub_ms &p ) { tilecontext->init_draw_highlight( p ); } - -void game::draw_highlight( const tripoint &p ) -{ - game::draw_highlight( tripoint_bub_ms( p ) ); -} #else void game::draw_highlight( const tripoint_bub_ms & ) { // Do nothing } - -void game::draw_highlight( const tripoint & ) -{ - // Do nothing -} #endif namespace @@ -913,7 +820,7 @@ void draw_sct_curses( const game &g ) const int dy = off.y() + text.getPosY(); const int dx = off.x() + text.getPosX(); - if( !is_valid_in_w_terrain( point( dx, dy ) ) ) { + if( !is_valid_in_w_terrain( { dx, dy } ) ) { continue; } @@ -1008,12 +915,6 @@ void game::draw_async_anim( const tripoint_bub_ms &p, const std::string &tile_id tilecontext->init_draw_async_anim( p, tile_id ); g->invalidate_main_ui_adaptor(); } - -void game::draw_async_anim( const tripoint &p, const std::string &tile_id, const std::string &ncstr, - const nc_color &nccol ) -{ - game::draw_async_anim( tripoint_bub_ms( p ), tile_id, ncstr, nccol ); -} #else void game::draw_async_anim( const tripoint_bub_ms &p, const std::string &, const std::string &ncstr, const nc_color &nccol ) @@ -1022,12 +923,6 @@ void game::draw_async_anim( const tripoint_bub_ms &p, const std::string &, const g->init_draw_async_anim_curses( p, ncstr, nccol ); } } - -void game::draw_async_anim( const tripoint &p, const std::string &tile_id, const std::string &ncstr, - const nc_color &nccol ) -{ - game::draw_async_anim( tripoint_bub_ms( p ), tile_id, ncstr, nccol ); -} #endif #if defined(TILES) @@ -1050,18 +945,10 @@ void game::draw_terrain_override( const tripoint_bub_ms &p, const ter_id &id ) tilecontext->init_draw_terrain_override( p, id ); } } - -void game::draw_terrain_override( const tripoint &p, const ter_id &id ) -{ - game::draw_terrain_override( tripoint_bub_ms( p ), id ); -} #else void game::draw_terrain_override( const tripoint_bub_ms &, const ter_id & ) { } -void game::draw_terrain_override( const tripoint &, const ter_id & ) -{ -} #endif #if defined(TILES) @@ -1071,19 +958,10 @@ void game::draw_furniture_override( const tripoint_bub_ms &p, const furn_id &id tilecontext->init_draw_furniture_override( p, id ); } } - -void game::draw_furniture_override( const tripoint &p, const furn_id &id ) -{ - game::draw_furniture_override( tripoint_bub_ms( p ), id ); -} #else void game::draw_furniture_override( const tripoint_bub_ms &, const furn_id & ) { } - -void game::draw_furniture_override( const tripoint &, const furn_id & ) -{ -} #endif #if defined(TILES) @@ -1106,19 +984,10 @@ void game::draw_trap_override( const tripoint_bub_ms &p, const trap_id &id ) tilecontext->init_draw_trap_override( p, id ); } } - -void game::draw_trap_override( const tripoint &p, const trap_id &id ) -{ - game::draw_trap_override( tripoint_bub_ms( p ), id ); -} #else void game::draw_trap_override( const tripoint_bub_ms &, const trap_id & ) { } - -void game::draw_trap_override( const tripoint &, const trap_id & ) -{ -} #endif #if defined(TILES) @@ -1128,19 +997,10 @@ void game::draw_field_override( const tripoint_bub_ms &p, const field_type_id &i tilecontext->init_draw_field_override( p, id ); } } - -void game::draw_field_override( const tripoint &p, const field_type_id &id ) -{ - game::draw_field_override( tripoint_bub_ms( p ), id ); -} #else void game::draw_field_override( const tripoint_bub_ms &, const field_type_id & ) { } - -void game::draw_field_override( const tripoint &, const field_type_id & ) -{ -} #endif #if defined(TILES) @@ -1151,48 +1011,25 @@ void game::draw_item_override( const tripoint_bub_ms &p, const itype_id &id, con tilecontext->init_draw_item_override( p, id, mid, hilite ); } } - -void game::draw_item_override( const tripoint &p, const itype_id &id, const mtype_id &mid, - const bool hilite ) -{ - game::draw_item_override( tripoint_bub_ms( p ), id, mid, hilite ); -} #else void game::draw_item_override( const tripoint_bub_ms &, const itype_id &, const mtype_id &, const bool ) { } - -void game::draw_item_override( const tripoint &, const itype_id &, const mtype_id &, - const bool ) -{ -} #endif #if defined(TILES) void game::draw_vpart_override( const tripoint_bub_ms &p, const vpart_id &id, const int part_mod, const units::angle &veh_dir, - const bool hilite, const point &mount ) + const bool hilite, const point_rel_ms &mount ) { if( use_tiles ) { - tilecontext->init_draw_vpart_override( p, id, part_mod, veh_dir, hilite, mount ); + tilecontext->init_draw_vpart_override( p, id, part_mod, veh_dir, hilite, mount.raw() ); } } - -void game::draw_vpart_override( - const tripoint &p, const vpart_id &id, const int part_mod, const units::angle &veh_dir, - const bool hilite, const point &mount ) -{ - game::draw_vpart_override( tripoint_bub_ms( p ), id, part_mod, veh_dir, hilite, mount ); -} #else void game::draw_vpart_override( const tripoint_bub_ms &, const vpart_id &, const int, - const units::angle &, const bool, const point & ) -{ -} - -void game::draw_vpart_override( const tripoint &, const vpart_id &, const int, - const units::angle &, const bool, const point & ) + const units::angle &, const bool, const point_rel_ms & ) { } #endif @@ -1204,19 +1041,10 @@ void game::draw_below_override( const tripoint_bub_ms &p, const bool draw ) tilecontext->init_draw_below_override( p, draw ); } } - -void game::draw_below_override( const tripoint &p, const bool draw ) -{ - game::draw_below_override( tripoint_bub_ms( p ), draw ); -} #else void game::draw_below_override( const tripoint_bub_ms &, const bool ) { } - -void game::draw_below_override( const tripoint &, const bool ) -{ -} #endif #if defined(TILES) diff --git a/src/avatar.cpp b/src/avatar.cpp index 365b9b7e2b906..280a9c92b0f5b 100644 --- a/src/avatar.cpp +++ b/src/avatar.cpp @@ -434,7 +434,7 @@ bool avatar::read( item_location &book, item_location ereader ) // spells are handled in a different place // src/iuse_actor.cpp -> learn_spell_actor::use if( book->get_use( "learn_spell" ) ) { - book->get_use( "learn_spell" )->call( this, *book, pos() ); + book->get_use( "learn_spell" )->call( this, *book, pos_bub() ); return true; } @@ -1488,7 +1488,7 @@ bool avatar::invoke_item( item *used, const tripoint_bub_ms &pt, int pre_obtain_ umenu.hilight_disabled = true; for( const auto &e : use_methods ) { - const auto res = e.second.can_call( *this, *used, pt.raw() ); + const auto res = e.second.can_call( *this, *used, pt ); umenu.addentry_desc( MENU_AUTOASSIGN, res.success(), MENU_AUTOASSIGN, e.second.get_name(), res.str() ); } diff --git a/src/avatar_action.cpp b/src/avatar_action.cpp index 3ffbd08cbb7cf..4e0b99894951f 100644 --- a/src/avatar_action.cpp +++ b/src/avatar_action.cpp @@ -530,11 +530,11 @@ bool avatar_action::move( avatar &you, map &m, const tripoint_rel_ms &d ) if( g->walk_move( dest_loc, via_ramp ) ) { return true; } - if( g->phasing_move_enchant( dest_loc.raw(), you.calculate_by_enchantment( 0, + if( g->phasing_move_enchant( dest_loc, you.calculate_by_enchantment( 0, enchant_vals::mod::PHASE_DISTANCE ) ) ) { return true; } - if( g->phasing_move( dest_loc.raw() ) ) { + if( g->phasing_move( dest_loc ) ) { return true; } if( veh_closed_door ) { diff --git a/src/cata_tiles.cpp b/src/cata_tiles.cpp index 22b4d774e58d0..ae2dfa1d7739c 100644 --- a/src/cata_tiles.cpp +++ b/src/cata_tiles.cpp @@ -1941,7 +1941,7 @@ void cata_tiles::draw( const point &dest, const tripoint ¢er, int width, int } else if( you.view_offset != tripoint_rel_ms::zero && !you.in_vehicle ) { // check to see if player is located at ter draw_from_id_string( "cursor", TILE_CATEGORY::NONE, empty_string, - tripoint( g->ter_view_p.xy(), center.z ), 0, 0, lit_level::LIT, + tripoint( g->ter_view_p.raw().xy(), center.z ), 0, 0, lit_level::LIT, false ); } if( you.controlling_vehicle ) { diff --git a/src/character.cpp b/src/character.cpp index 45c4dbb0f9a7c..64e59322931e7 100644 --- a/src/character.cpp +++ b/src/character.cpp @@ -1656,7 +1656,7 @@ player_activity Character::get_destination_activity() const void Character::mount_creature( monster &z ) { - tripoint pnt = z.pos(); + tripoint_bub_ms pnt = z.pos_bub(); shared_ptr_fast mons = g->shared_from( z ); if( mons == nullptr ) { add_msg_debug( debugmode::DF_CHARACTER, "mount_creature(): monster not found in critter_tracker" ); @@ -9692,7 +9692,7 @@ item Character::find_firestarter_with_charges( const int quantity ) const const use_function *usef = it.type->get_use( "firestarter" ); if( usef != nullptr && usef->get_actor_ptr() != nullptr ) { const firestarter_actor *actor = dynamic_cast( usef->get_actor_ptr() ); - if( actor->can_use( *this->as_character(), it, tripoint::zero ).success() ) { + if( actor->can_use( *this->as_character(), it, tripoint_bub_ms::zero ).success() ) { ret = it; return true; } diff --git a/src/condition.cpp b/src/condition.cpp index 2962c804d1488..f05c395bbf597 100644 --- a/src/condition.cpp +++ b/src/condition.cpp @@ -396,7 +396,7 @@ tripoint_abs_ms get_tripoint_from_var( std::optional var, const_dialog d.get_callstack() ); return tripoint_abs_ms::invalid; } - return get_map().getglobal( d.const_actor( is_npc )->pos() ); + return get_map().getglobal( d.const_actor( is_npc )->pos_bub() ); } template @@ -1167,7 +1167,7 @@ conditional_t::func f_npc_role_nearby( const JsonObject &jo, std::string_view me const std::vector available = g->get_npcs_if( [&]( const npc & guy ) { return d.const_actor( false )->posz() == guy.posz() && guy.companion_mission_role_id == role.evaluate( d ) && - ( rl_dist( d.const_actor( false )->pos(), guy.pos() ) <= 48 ); + ( rl_dist( d.const_actor( false )->pos_bub(), guy.pos_bub() ) <= 48 ); } ); return !available.empty(); }; @@ -1391,7 +1391,7 @@ conditional_t::func f_player_see( bool is_npc ) if( c ) { return get_player_view().sees( *c ); } else { - return get_player_view().sees( d.const_actor( is_npc )->pos() ); + return get_player_view().sees( d.const_actor( is_npc )->pos_bub() ); } }; } @@ -1627,7 +1627,7 @@ conditional_t::func f_is_controlling_vehicle( bool is_npc ) { return [is_npc]( const_dialogue const & d ) { const_talker const *actor = d.const_actor( is_npc ); - if( const optional_vpart_position &vp = get_map().veh_at( actor->pos() ) ) { + if( const optional_vpart_position &vp = get_map().veh_at( actor->pos_bub() ) ) { return actor->is_in_control_of( vp->vehicle() ); } return false; @@ -1638,7 +1638,7 @@ conditional_t::func f_is_driving( bool is_npc ) { return [is_npc]( const_dialogue const & d ) { const_talker const *actor = d.const_actor( is_npc ); - if( const optional_vpart_position &vp = get_map().veh_at( actor->pos() ) ) { + if( const optional_vpart_position &vp = get_map().veh_at( actor->pos_bub() ) ) { return vp->vehicle().is_moving() && actor->is_in_control_of( vp->vehicle() ); } return false; @@ -1669,7 +1669,7 @@ conditional_t::func f_is_outside( bool is_npc ) conditional_t::func f_is_underwater( bool is_npc ) { return [is_npc]( const_dialogue const & d ) { - return get_map().is_divable( d.const_actor( is_npc )->pos() ); + return get_map().is_divable( d.const_actor( is_npc )->pos_bub() ); }; } @@ -1730,7 +1730,7 @@ conditional_t::func f_query_tile( const JsonObject &jo, std::string_view member, } bool z_level = jo.get_bool( "z_level", false ); return [type, target_var, message, range, z_level, is_npc]( const_dialogue const & d ) { - std::optional loc; + std::optional loc; Character const *ch = d.const_actor( is_npc )->get_const_character(); if( ch && ch->as_avatar() ) { if( type == "anywhere" ) { @@ -1739,7 +1739,7 @@ conditional_t::func f_query_tile( const JsonObject &jo, std::string_view member, popup.on_top( true ); popup.message( "%s", message ); } - tripoint center = d.const_actor( is_npc )->pos(); + tripoint_bub_ms center = d.const_actor( is_npc )->pos_bub(); const look_around_params looka_params = { true, center, center, false, true, true, z_level }; loc = g->look_around( looka_params ).position; } else if( type == "line_of_sight" ) { @@ -1752,13 +1752,13 @@ conditional_t::func f_query_tile( const JsonObject &jo, std::string_view member, dummy.set_location( get_avatar().get_location() ); target_handler::trajectory traj = target_handler::mode_select_only( dummy, range.evaluate( d ) ); if( !traj.empty() ) { - loc = traj.back().raw(); + loc = traj.back(); } } else if( type == "around" ) { if( !message.empty() ) { - loc = choose_adjacent( message ); + loc = choose_adjacent_bub( message ); } else { - loc = choose_adjacent( _( "Choose direction" ) ); + loc = choose_adjacent_bub( _( "Choose direction" ) ); } } else { debugmsg( string_format( "Invalid selection type: %s", type ) ); @@ -2102,7 +2102,7 @@ conditional_t::func f_is_on_terrain( const JsonObject &jo, std::string_view memb str_or_var terrain_type = get_str_or_var( jo.get_member( member ), member, true ); return [terrain_type, is_npc]( const_dialogue const & d ) { map &here = get_map(); - return here.ter( d.const_actor( is_npc )->pos() ) == ter_id( terrain_type.evaluate( d ) ); + return here.ter( d.const_actor( is_npc )->pos_bub() ) == ter_id( terrain_type.evaluate( d ) ); }; } @@ -2112,7 +2112,7 @@ conditional_t::func f_is_on_terrain_with_flag( const JsonObject &jo, std::string str_or_var terrain_type = get_str_or_var( jo.get_member( member ), member, true ); return [terrain_type, is_npc]( const_dialogue const & d ) { map &here = get_map(); - return here.ter( d.const_actor( is_npc )->pos() )->has_flag( terrain_type.evaluate( d ) ); + return here.ter( d.const_actor( is_npc )->pos_bub() )->has_flag( terrain_type.evaluate( d ) ); }; } @@ -2124,7 +2124,7 @@ conditional_t::func f_is_in_field( const JsonObject &jo, std::string_view member map &here = get_map(); field_type_id ft = field_type_id( field_type.evaluate( d ) ); for( const std::pair &f : here.field_at( d.const_actor( - is_npc )->pos() ) ) { + is_npc )->pos_bub() ) ) { if( f.second.get_field_type() == ft ) { return true; } @@ -2205,7 +2205,7 @@ static std::function get_get_str_( const JsonObject str_or_var target = get_str_or_var( jo.get_member( "target" ), "target" ); bool use_beta_talker = mutator == "npc_loc_relative"; return [target, use_beta_talker, ret_func]( const_dialogue const & d ) { - tripoint_abs_ms char_pos = get_map().getglobal( d.const_actor( use_beta_talker )->pos() ); + tripoint_abs_ms char_pos = get_map().getglobal( d.const_actor( use_beta_talker )->pos_bub() ); tripoint_abs_ms target_pos = char_pos + tripoint::from_string( target.evaluate( d ) ); return ret_func( target_pos.to_string() ); }; @@ -2444,18 +2444,18 @@ conditional_t::get_set_dbl( std::string_view checked_value, char scope ) }; } else if( checked_value == "pos_x" ) { return [is_npc]( dialogue & d, double input ) { - tripoint const tr = d.actor( is_npc )->pos(); - d.actor( is_npc )->set_pos( tripoint( input, tr.y, tr.z ) ); + tripoint_bub_ms const tr = d.actor( is_npc )->pos_bub(); + d.actor( is_npc )->set_pos( tripoint_bub_ms( int( input ), tr.y(), tr.z() ) ); }; } else if( checked_value == "pos_y" ) { return [is_npc]( dialogue & d, double input ) { - tripoint const tr = d.actor( is_npc )->pos(); - d.actor( is_npc )->set_pos( tripoint( tr.x, input, tr.z ) ); + tripoint_bub_ms const tr = d.actor( is_npc )->pos_bub(); + d.actor( is_npc )->set_pos( tripoint_bub_ms( tr.x(), int( input ), tr.z() ) ); }; } else if( checked_value == "pos_z" ) { return [is_npc]( dialogue & d, double input ) { - tripoint const tr = d.actor( is_npc )->pos(); - d.actor( is_npc )->set_pos( tripoint( tr.xy(), input ) ); + tripoint_bub_ms const tr = d.actor( is_npc )->pos_bub(); + d.actor( is_npc )->set_pos( tripoint_bub_ms( tr.xy(), input ) ); }; } else if( checked_value == "power" ) { return [is_npc]( dialogue & d, double input ) { diff --git a/src/construction.cpp b/src/construction.cpp index a8b175c4bdace..b311d3be50df7 100644 --- a/src/construction.cpp +++ b/src/construction.cpp @@ -436,9 +436,9 @@ static shared_ptr_fast construction_preview_callback( if( con.post_is_furniture ) { if( is_draw_tiles_mode() ) { if( blink && preview ) { - g->draw_furniture_override( loc.raw(), furn_str_id( post_id ) ); + g->draw_furniture_override( loc, furn_str_id( post_id ) ); } - g->draw_highlight( loc.raw() ); + g->draw_highlight( loc ); } else { here.drawsq( g->w_terrain, loc, drawsq_params().highlight( true ) @@ -450,9 +450,9 @@ static shared_ptr_fast construction_preview_callback( } else { if( is_draw_tiles_mode() ) { if( blink && preview ) { - g->draw_terrain_override( loc.raw(), ter_str_id( post_id ) ); + g->draw_terrain_override( loc, ter_str_id( post_id ) ); } - g->draw_highlight( loc.raw() ); + g->draw_highlight( loc ); } else { here.drawsq( g->w_terrain, loc, drawsq_params().highlight( true ) @@ -464,7 +464,7 @@ static shared_ptr_fast construction_preview_callback( } } else { if( is_draw_tiles_mode() ) { - g->draw_highlight( loc.raw() ); + g->draw_highlight( loc ); } else { here.drawsq( g->w_terrain, loc, drawsq_params().highlight( true ) @@ -1262,7 +1262,7 @@ void place_construction( std::vector const &groups ) } if( action == "MOUSE_MOVE" ) { const std::optional mouse_pos_raw = ctxt.get_coordinates( - g->w_terrain, g->ter_view_p.xy(), true ); + g->w_terrain, g->ter_view_p.raw().xy(), true ); if( mouse_pos_raw.has_value() && mouse_pos_raw->z() == loc.z() && mouse_pos_raw->x() >= loc.x() - 1 && mouse_pos_raw->x() <= loc.x() + 1 && mouse_pos_raw->y() >= loc.y() - 1 && mouse_pos_raw->y() <= loc.y() + 1 ) { @@ -1664,9 +1664,8 @@ void construct::done_grave( const tripoint_bub_ms &p, Character &player_characte } } if( player_character.has_quality( qual_CUT ) ) { - // TODO: fix point types iuse::handle_ground_graffiti( player_character, nullptr, _( "Inscribe something on the grave?" ), - p.raw() ); + p ); } else { add_msg( m_neutral, _( "Unfortunately you don't have anything sharp to place an inscription on the grave." ) ); @@ -2246,12 +2245,13 @@ void load_construction( const JsonObject &jo ) jo.read( "pre_note", con.pre_note ); con.pre_terrain = jo.get_as_string_set( "pre_terrain" ); - const std::string &first_pre_terrain = *con.pre_terrain.begin(); - if( !con.pre_terrain.empty() - && first_pre_terrain.size() > 1 - && first_pre_terrain[0] == 'f' - && first_pre_terrain[1] == '_' ) { - con.pre_is_furniture = true; + if( !con.pre_terrain.empty() ) { + const std::string &first_pre_terrain = *con.pre_terrain.begin(); + if( first_pre_terrain.size() > 1 + && first_pre_terrain[0] == 'f' + && first_pre_terrain[1] == '_' ) { + con.pre_is_furniture = true; + } } con.post_terrain = jo.get_string( "post_terrain", "" ); diff --git a/src/crafting_gui.cpp b/src/crafting_gui.cpp index a1db915d0ba29..bfe122f4b9a5c 100644 --- a/src/crafting_gui.cpp +++ b/src/crafting_gui.cpp @@ -985,6 +985,16 @@ static recipe_subset filter_recipes( const recipe_subset &available_recipes, recipe_subset::search_type::quality_result, progress_callback ); break; + case 'v': + filtered_recipes = filtered_recipes.reduce( qry_filter_str.substr( 2 ), + recipe_subset::search_type::covers, progress_callback ); + break; + + case 'e': + filtered_recipes = filtered_recipes.reduce( qry_filter_str.substr( 2 ), + recipe_subset::search_type::layer, progress_callback ); + break; + case 'd': filtered_recipes = filtered_recipes.reduce( qry_filter_str.substr( 2 ), recipe_subset::search_type::description_result, progress_callback ); @@ -1069,6 +1079,8 @@ static const std::vector prefixes = { { 'P', to_translation( "Blacksmithing" ), to_translation( "proficiency used to craft" ) }, { 'l', to_translation( "5" ), to_translation( "difficulty of the recipe as a number or range" ) }, { 'r', to_translation( "buttermilk" ), to_translation( "recipe's (by)products; use * as wildcard" ) }, + { 'v', to_translation( "head" ), to_translation( "body part the result covers" ) }, + { 'e', to_translation( "close to skin" ), to_translation( "layer the result covers" ) }, { 'a', to_translation( "brisk" ), to_translation( "recipe's activity level" ) } }; diff --git a/src/debug_menu.cpp b/src/debug_menu.cpp index 6cc0baa4c5574..79fc663b51085 100644 --- a/src/debug_menu.cpp +++ b/src/debug_menu.cpp @@ -534,7 +534,7 @@ static void normalize_body( Character &u ) static tripoint_abs_ms player_picks_tile() { - std::optional newpos = g->look_around(); + std::optional newpos = g->look_around(); return newpos ? get_map().getglobal( *newpos ) : get_player_character().get_location(); } @@ -1725,11 +1725,11 @@ static void spawn_artifact() if( query_int( artifact_max_attributes, _( "Enter max attributes:" ) ) && query_int( artifact_power_level, _( "Enter power level:" ) ) && query_int( artifact_max_negative_value, _( "Enter negative power limit:" ) ) ) { - if( const std::optional center = g->look_around() ) { + if( const std::optional center = g->look_around() ) { if( query_yn( _( "Is the artifact resonant?" ) ) ) { artifact_is_resonant = true; } - here.spawn_artifact( tripoint_bub_ms( *center ), relic_list[relic_menu.ret], + here.spawn_artifact( *center, relic_list[relic_menu.ret], artifact_max_attributes, artifact_power_level, artifact_max_negative_value, artifact_is_resonant ); } @@ -1739,9 +1739,9 @@ static void spawn_artifact() static void teleport_short() { - const std::optional where = g->look_around(); + const std::optional where = g->look_around(); const Character &player_character = get_player_character(); - if( !where || *where == player_character.pos() ) { + if( !where || *where == player_character.pos_bub() ) { return; } g->place_player( *where ); @@ -1837,7 +1837,7 @@ static void spawn_nested_mapgen() nest_menu.query(); const int nest_choice = nest_menu.ret; if( nest_choice >= 0 && nest_choice < static_cast( nest_ids.size() ) ) { - const std::optional where = g->look_around(); + const std::optional where = g->look_around(); if( !where ) { return; } @@ -2604,7 +2604,7 @@ static void character_edit_menu() mission_debug::edit( you ); break; case D_TELE: { - if( const std::optional newpos = g->look_around() ) { + if( const std::optional newpos = g->look_around() ) { you.setpos( *newpos ); if( you.is_avatar() ) { if( you.is_mounted() ) { @@ -3427,7 +3427,7 @@ static void generate_effect_list() static void gen_sound() { - const std::optional where = g->look_around(); + const std::optional where = g->look_around(); if( !where ) { return; } @@ -3483,7 +3483,7 @@ static void kill_area() popup.on_top( true ); popup.message( "%s", _( "Select first point." ) ); - tripoint initial_pos = get_avatar().pos(); + tripoint_bub_ms initial_pos = get_avatar().pos_bub(); const look_around_result first = g->look_around( false, initial_pos, initial_pos, false, true, false ); @@ -3592,8 +3592,8 @@ static void show_sound() static void set_automove() { avatar &player_character = get_avatar(); - const std::optional dest = g->look_around(); - if( !dest || *dest == player_character.pos() ) { + const std::optional dest = g->look_around(); + if( !dest || *dest == player_character.pos_bub() ) { return; } diff --git a/src/do_turn.cpp b/src/do_turn.cpp index 00a8101028b57..e2cef4622e979 100644 --- a/src/do_turn.cpp +++ b/src/do_turn.cpp @@ -203,7 +203,7 @@ bool cleanup_at_end() } //Reset any offset due to driving - g->set_driving_view_offset( point::zero ); + g->set_driving_view_offset( point_rel_ms::zero ); //clear all sound channels sfx::fade_audio_channel( sfx::channel::any, 300 ); @@ -623,7 +623,7 @@ bool do_turn() } } - if( g->driving_view_offset.x != 0 || g->driving_view_offset.y != 0 ) { + if( g->driving_view_offset.x() != 0 || g->driving_view_offset.y() != 0 ) { // Still have a view offset, but might not be driving anymore, // or the option has been deactivated, // might also happen when someone dives from a moving car. diff --git a/src/editmap.cpp b/src/editmap.cpp index 8b229363c0984..65af2684c330f 100644 --- a/src/editmap.cpp +++ b/src/editmap.cpp @@ -663,9 +663,9 @@ void editmap::draw_main_ui_overlay() } const units::angle veh_dir = ovp->vehicle().face.dir(); g->draw_vpart_override( map_p, vpart_id( vd.id ), part_mod, veh_dir, vd.has_cargo, - ovp->mount_pos().raw() ); + ovp->mount_pos() ); } else { - g->draw_vpart_override( map_p, vpart_id::NULL_ID(), 0, 0_degrees, false, point::zero ); + g->draw_vpart_override( map_p, vpart_id::NULL_ID(), 0, 0_degrees, false, point_rel_ms::zero ); } g->draw_below_override( tripoint_bub_ms( map_p ), tmpmap.ter( tmp_p ).obj().has_flag( ter_furn_flag::TFLAG_NO_FLOOR ) ); diff --git a/src/enum_traits.h b/src/enum_traits.h index fac2d4abf6a7b..816d52c5bc218 100644 --- a/src/enum_traits.h +++ b/src/enum_traits.h @@ -118,4 +118,26 @@ inline bool operator!( E e ) return !static_cast( e ); } +template +static E &operator++( E &e ) +{ + using I = std::underlying_type_t; + e = static_cast( static_cast( e ) + 1 ); + if( e == enum_traits::last ) { + e = enum_traits::first; + } + return e; +} + +template +static E &operator--( E &e ) +{ + using I = std::underlying_type_t; + if( e == enum_traits::first ) { + e = enum_traits::last; + } + e = static_cast( static_cast( e ) - 1 ); + return e; +} + #endif // CATA_SRC_ENUM_TRAITS_H diff --git a/src/explosion.cpp b/src/explosion.cpp index e57d19afd7777..578c41c4a3f62 100644 --- a/src/explosion.cpp +++ b/src/explosion.cpp @@ -650,36 +650,37 @@ void flashbang( const tripoint &p, bool player_immune ) void shockwave( const tripoint &p, int radius, int force, int stun, int dam_mult, bool ignore_player ) { - draw_explosion( p, radius, c_blue ); + const tripoint_bub_ms pos{p}; // TODO: Remove when operation is typified + draw_explosion( pos, radius, c_blue ); - sounds::sound( p, force * force * dam_mult / 2, sounds::sound_t::combat, _( "Crack!" ), false, + sounds::sound( pos, force * force * dam_mult / 2, sounds::sound_t::combat, _( "Crack!" ), false, "misc", "shockwave" ); for( monster &critter : g->all_monsters() ) { - if( critter.posz() != p.z ) { + if( critter.posz() != pos.z() ) { continue; } - if( rl_dist( critter.pos(), p ) <= radius ) { + if( rl_dist( critter.pos_bub(), pos ) <= radius ) { add_msg( _( "%s is caught in the shockwave!" ), critter.name() ); - g->knockback( p, critter.pos(), force, stun, dam_mult ); + g->knockback( pos, critter.pos_bub(), force, stun, dam_mult ); } } // TODO: combine the two loops and the case for avatar using all_creatures() for( npc &guy : g->all_npcs() ) { - if( guy.posz() != p.z ) { + if( guy.posz() != pos.z() ) { continue; } - if( rl_dist( guy.pos(), p ) <= radius ) { + if( rl_dist( guy.pos_bub(), pos ) <= radius ) { add_msg( _( "%s is caught in the shockwave!" ), guy.get_name() ); - g->knockback( p, guy.pos(), force, stun, dam_mult ); + g->knockback( pos, guy.pos_bub(), force, stun, dam_mult ); } } Character &player_character = get_player_character(); - if( rl_dist( player_character.pos(), p ) <= radius && !ignore_player && + if( rl_dist( player_character.pos_bub(), pos ) <= radius && !ignore_player && ( !player_character.has_trait( trait_LEG_TENT_BRACE ) || !player_character.is_barefoot() ) ) { add_msg( m_bad, _( "You're caught in the shockwave!" ) ); - g->knockback( p, player_character.pos(), force, stun, dam_mult ); + g->knockback( pos, player_character.pos_bub(), force, stun, dam_mult ); } } diff --git a/src/game.cpp b/src/game.cpp index 16b2310cac168..6832e6e3a9b4b 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -403,9 +403,9 @@ std::unique_ptr g; //The one and only uistate instance uistatedata uistate; -bool is_valid_in_w_terrain( const point &p ) +bool is_valid_in_w_terrain( const point_rel_ms &p ) { - return p.x >= 0 && p.x < TERRAIN_WINDOW_WIDTH && p.y >= 0 && p.y < TERRAIN_WINDOW_HEIGHT; + return p.x() >= 0 && p.x() < TERRAIN_WINDOW_WIDTH && p.y() >= 0 && p.y() < TERRAIN_WINDOW_HEIGHT; } static void achievement_attained( const achievement *a, bool achievements_enabled ) @@ -1401,7 +1401,7 @@ static int veh_lumi( vehicle &veh ) void game::calc_driving_offset( vehicle *veh ) { if( veh == nullptr || !get_option( "DRIVING_VIEW_OFFSET" ) ) { - set_driving_view_offset( point::zero ); + set_driving_view_offset( point_rel_ms::zero ); return; } const int g_light_level = static_cast( light_level( u.posz() ) ); @@ -1477,30 +1477,29 @@ void game::calc_driving_offset( vehicle *veh ) // Turn the offset into a vector that increments the offset toward the desired position // instead of setting it there instantly, should smooth out jerkiness. - const point offset_difference( -driving_view_offset + point( offset.x, offset.y ) ); + const point_rel_ms offset_difference( -driving_view_offset + point( offset.x, offset.y ) ); - const point offset_sign( ( offset_difference.x < 0 ) ? -1 : 1, - ( offset_difference.y < 0 ) ? -1 : 1 ); + const point offset_sign( ( offset_difference.x() < 0 ) ? -1 : 1, + ( offset_difference.y() < 0 ) ? -1 : 1 ); // Shift the current offset in the direction of the calculated offset by one tile // per draw event, but snap to calculated offset if we're close enough to avoid jitter. - offset.x = ( std::abs( offset_difference.x ) > 1 ) ? - ( driving_view_offset.x + offset_sign.x ) : offset.x; - offset.y = ( std::abs( offset_difference.y ) > 1 ) ? - ( driving_view_offset.y + offset_sign.y ) : offset.y; + offset.x = ( std::abs( offset_difference.x() ) > 1 ) ? + ( driving_view_offset.x() + offset_sign.x ) : offset.x; + offset.y = ( std::abs( offset_difference.y() ) > 1 ) ? + ( driving_view_offset.y() + offset_sign.y ) : offset.y; - set_driving_view_offset( point( offset.x, offset.y ) ); + set_driving_view_offset( { offset.x, offset.y } ); } -void game::set_driving_view_offset( const point &p ) +void game::set_driving_view_offset( const point_rel_ms &p ) { // remove the previous driving offset, // store the new offset and apply the new offset. - u.view_offset.x() -= driving_view_offset.x; - u.view_offset.y() -= driving_view_offset.y; - driving_view_offset.x = p.x; - driving_view_offset.y = p.y; - u.view_offset.x() += driving_view_offset.x; - u.view_offset.y() += driving_view_offset.y; + u.view_offset.raw() -= + driving_view_offset.raw(); // TODO: Implement -= etc. for relative coordinates. + driving_view_offset = p; + u.view_offset.raw() += + driving_view_offset.raw(); // TODO: Implement -= etc. for relative coordinates. } void game::catch_a_monster( monster *fish, const tripoint &pos, Character *p, @@ -2477,7 +2476,8 @@ bool game::handle_mouseview( input_context &ctxt, std::string &action ) do { action = ctxt.handle_input(); if( action == "MOUSE_MOVE" ) { - const std::optional mouse_pos = ctxt.get_coordinates( w_terrain, ter_view_p.xy(), + const std::optional mouse_pos = ctxt.get_coordinates( w_terrain, + ter_view_p.raw().xy(), true ); if( mouse_pos && ( !liveview_pos || *mouse_pos != *liveview_pos ) ) { liveview_pos = mouse_pos; @@ -2500,11 +2500,12 @@ bool game::handle_mouseview( input_context &ctxt, std::string &action ) return true; } -std::pair game::mouse_edge_scrolling( input_context &ctxt, const int speed, - const tripoint &last, bool iso ) +std::pair game::mouse_edge_scrolling( input_context &ctxt, + const int speed, + const tripoint_rel_ms &last, bool iso ) { const int rate = get_option( "EDGE_SCROLL" ); - auto ret = std::make_pair( tripoint::zero, last ); + std::pair ret = std::make_pair( tripoint_rel_ms::zero, last ); if( rate == -1 ) { // Fast return when the option is disabled. return ret; @@ -2524,25 +2525,25 @@ std::pair game::mouse_edge_scrolling( input_context &ctxt, c if( event.type == input_event_t::mouse ) { const point threshold( projected_window_width() / 100, projected_window_height() / 100 ); if( event.mouse_pos.x <= threshold.x ) { - ret.first.x -= speed; + ret.first.x() -= speed; if( iso ) { - ret.first.y -= speed; + ret.first.y() -= speed; } } else if( event.mouse_pos.x >= projected_window_width() - threshold.x ) { - ret.first.x += speed; + ret.first.x() += speed; if( iso ) { - ret.first.y += speed; + ret.first.y() += speed; } } if( event.mouse_pos.y <= threshold.y ) { - ret.first.y -= speed; + ret.first.y() -= speed; if( iso ) { - ret.first.x += speed; + ret.first.x() += speed; } } else if( event.mouse_pos.y >= projected_window_height() - threshold.y ) { - ret.first.y += speed; + ret.first.y() += speed; if( iso ) { - ret.first.x -= speed; + ret.first.x() -= speed; } } ret.second = ret.first; @@ -2553,21 +2554,33 @@ std::pair game::mouse_edge_scrolling( input_context &ctxt, c return ret; } -tripoint game::mouse_edge_scrolling_terrain( input_context &ctxt ) +std::pair game::mouse_edge_scrolling( input_context &ctxt, + const int speed, + const tripoint_rel_omt &last, bool iso ) { - auto ret = mouse_edge_scrolling( ctxt, std::max( DEFAULT_TILESET_ZOOM / tileset_zoom, 1 ), - last_mouse_edge_scroll_vector_terrain, g->is_tileset_isometric() ); + // It's the same operation technically, just using different coordinate systems. + const std::pair temp = game::mouse_edge_scrolling( ctxt, speed, + tripoint_rel_ms( last.raw() ), iso ); + + return {tripoint_rel_omt( temp.first.raw() ), tripoint_rel_omt( temp.second.raw() )}; +} + +tripoint_rel_ms game::mouse_edge_scrolling_terrain( input_context &ctxt ) +{ + std::pair ret = mouse_edge_scrolling( ctxt, + std::max( DEFAULT_TILESET_ZOOM / tileset_zoom, 1 ), + last_mouse_edge_scroll_vector_terrain, g->is_tileset_isometric() ); last_mouse_edge_scroll_vector_terrain = ret.second; - last_mouse_edge_scroll_vector_overmap = tripoint::zero; + last_mouse_edge_scroll_vector_overmap = tripoint_rel_omt::zero; return ret.first; } -tripoint game::mouse_edge_scrolling_overmap( input_context &ctxt ) +tripoint_rel_omt game::mouse_edge_scrolling_overmap( input_context &ctxt ) { // overmap has no iso mode auto ret = mouse_edge_scrolling( ctxt, 2, last_mouse_edge_scroll_vector_overmap, false ); last_mouse_edge_scroll_vector_overmap = ret.second; - last_mouse_edge_scroll_vector_terrain = tripoint::zero; + last_mouse_edge_scroll_vector_terrain = tripoint_rel_ms::zero; return ret.first; } @@ -3083,7 +3096,7 @@ void game::move_save_to_graveyard() debugmsg( "could not find save files in '%s'", save_dir ); } - for( const auto &src_path : save_files ) { + for( const cata_path &src_path : save_files ) { const cata_path dst_path = graveyard_dir / src_path.get_relative_path().filename(); if( rename_file( src_path, dst_path ) ) { @@ -3957,12 +3970,12 @@ static shared_ptr_fast create_zone_callback( [&]() { if( zone_cursor ) { if( is_moving_zone ) { - g->draw_cursor( ( zone_start.value() + zone_end.value() ) / 2 ); + g->draw_cursor( tripoint_bub_ms( ( zone_start.value() + zone_end.value() ) / 2 ) ); } else { if( zone_end ) { - g->draw_cursor( zone_end.value() ); + g->draw_cursor( tripoint_bub_ms( zone_end.value() ) ); } else if( zone_start ) { - g->draw_cursor( zone_start.value() ); + g->draw_cursor( tripoint_bub_ms( zone_start.value() ) ); } } } @@ -4071,9 +4084,9 @@ void game::draw( ui_adaptor &ui ) return; } - ter_view_p.z = ( u.pos() + u.view_offset ).z(); - m.build_map_cache( ter_view_p.z ); - m.update_visibility_cache( ter_view_p.z ); + ter_view_p.z() = ( u.pos_bub() + u.view_offset ).z(); + m.build_map_cache( ter_view_p.z() ); + m.update_visibility_cache( ter_view_p.z() ); werase( w_terrain ); void_blink_curses(); @@ -4184,28 +4197,28 @@ void game::draw_pixel_minimap( const catacurses::window &w ) w_pixel_minimap = w; } -void game::draw_critter( const Creature &critter, const tripoint ¢er ) +void game::draw_critter( const Creature &critter, const tripoint_bub_ms ¢er ) { - const int my = POSY + ( critter.posy() - center.y ); - const int mx = POSX + ( critter.posx() - center.x ); - if( !is_valid_in_w_terrain( point( mx, my ) ) ) { + const int my = POSY + ( critter.posy() - center.y() ); + const int mx = POSX + ( critter.posx() - center.x() ); + if( !is_valid_in_w_terrain( { mx, my } ) ) { return; } - if( critter.posz() != center.z ) { + if( critter.posz() != center.z() ) { static constexpr tripoint up_tripoint( tripoint::above ); - if( critter.posz() == center.z - 1 && + if( critter.posz() == center.z() - 1 && ( debug_mode || u.sees( critter ) ) && m.valid_move( critter.pos_bub(), critter.pos_bub() + up_tripoint, false, true ) ) { // Monster is below // TODO: Make this show something more informative than just green 'v' // TODO: Allow looking at this mon with look command - init_draw_blink_curses( tripoint( critter.pos().xy(), center.z ), "v", c_green_cyan ); + init_draw_blink_curses( tripoint( critter.pos().xy(), center.z() ), "v", c_green_cyan ); } - if( critter.posz() == center.z + 1 && + if( critter.posz() == center.z() + 1 && ( debug_mode || u.sees( critter ) ) && m.valid_move( critter.pos_bub(), critter.pos_bub() + tripoint::below, false, true ) ) { // Monster is above - init_draw_blink_curses( tripoint( critter.pos().xy(), center.z ), "^", c_green_cyan ); + init_draw_blink_curses( tripoint( critter.pos().xy(), center.z() ), "^", c_green_cyan ); } return; } @@ -4232,18 +4245,18 @@ bool game::is_in_viewport( const tripoint_bub_ms &p, int margin ) const void game::draw_ter( const bool draw_sounds ) { - draw_ter( u.pos() + u.view_offset.raw(), is_looking, + draw_ter( u.pos_bub() + u.view_offset, is_looking, draw_sounds ); } -void game::draw_ter( const tripoint ¢er, const bool looking, const bool draw_sounds ) +void game::draw_ter( const tripoint_bub_ms ¢er, const bool looking, const bool draw_sounds ) { ter_view_p = center; m.draw( w_terrain, tripoint_bub_ms( center ) ); if( draw_sounds ) { - draw_footsteps( w_terrain, tripoint( -center.x, -center.y, center.z ) + point( POSX, POSY ) ); + draw_footsteps( w_terrain, tripoint( -center.x(), -center.y(), center.z() ) + point( POSX, POSY ) ); } for( Creature &critter : all_creatures() ) { @@ -4535,7 +4548,7 @@ void game::mon_info_update( ) monster *m = dynamic_cast( c ); npc *p = dynamic_cast( c ); const direction dir_to_mon = direction_from( view.xy(), point( c->posx(), c->posy() ) ); - const point m2( -view.xy() + point( POSX + c->posx(), POSY + c->posy() ) ); + const point_rel_ms m2( -view.xy() + point( POSX + c->posx(), POSY + c->posy() ) ); int index = 8; if( !is_valid_in_w_terrain( m2 ) ) { // for compatibility with old code, see diagram below, it explains the values for index, @@ -4758,9 +4771,10 @@ void game::cleanup_dead() stun > 0 indicates base stun duration, and causes impact stun; stun == -1 indicates only impact stun dam_mult multiplies impact damage, bash effect on impact, and sound level on impact */ -void game::knockback( const tripoint &s, const tripoint &t, int force, int stun, int dam_mult ) +void game::knockback( const tripoint_bub_ms &s, const tripoint_bub_ms &t, int force, int stun, + int dam_mult ) { - std::vector traj; + std::vector traj; traj.clear(); traj = line_to( s, t, 0, 0 ); traj.insert( traj.begin(), s ); // how annoying, line_to() doesn't include the originating point! @@ -4774,15 +4788,15 @@ void game::knockback( const tripoint &s, const tripoint &t, int force, int stun, stun > 0 indicates base stun duration, and causes impact stun; stun == -1 indicates only impact stun dam_mult multiplies impact damage, bash effect on impact, and sound level on impact */ -void game::knockback( std::vector &traj, int stun, int dam_mult ) +void game::knockback( std::vector &traj, int stun, int dam_mult ) { // TODO: make the force parameter actually do something. // the header file says higher force causes more damage. // perhaps that is what it should do? - tripoint tp = traj.front(); + tripoint_bub_ms tp = traj.front(); creature_tracker &creatures = get_creature_tracker(); if( !creatures.creature_at( tp ) ) { - debugmsg( _( "Nothing at (%d,%d,%d) to knockback!" ), tp.x, tp.y, tp.z ); + debugmsg( _( "Nothing at (%d,%d,%d) to knockback!" ), tp.x(), tp.y(), tp.z() ); return; } std::size_t force_remaining = traj.size(); @@ -4823,7 +4837,7 @@ void game::knockback( std::vector &traj, int stun, int dam_mult ) add_msg( _( "%s collided with someone else and sent her flying!" ), targ->name() ); } - } else if( u.pos() == traj.front() ) { + } else if( u.pos_bub() == traj.front() ) { add_msg( m_bad, _( "%s collided with you and sent you flying!" ), targ->name() ); } knockback( traj, stun, dam_mult ); @@ -4886,7 +4900,7 @@ void game::knockback( std::vector &traj, int stun, int dam_mult ) targ->add_effect( effect_stunned, 1_turns * force_remaining ); } traj.erase( traj.begin(), traj.begin() + i ); - const tripoint &traj_front = traj.front(); + const tripoint_bub_ms &traj_front = traj.front(); if( creatures.creature_at( traj_front ) ) { add_msg( _( "%s collided with something else and sent it flying!" ), targ->get_name() ); @@ -4898,10 +4912,10 @@ void game::knockback( std::vector &traj, int stun, int dam_mult ) add_msg( _( "%s collided with someone else and sent her flying!" ), targ->get_name() ); } - } else if( u.posx() == traj_front.x && u.posy() == traj_front.y && + } else if( u.posx() == traj_front.x() && u.posy() == traj_front.y() && u.has_trait( trait_LEG_TENT_BRACE ) && u.is_barefoot() ) { add_msg( _( "%s collided with you, and barely dislodges your tentacles!" ), targ->get_name() ); - } else if( u.posx() == traj_front.x && u.posy() == traj_front.y ) { + } else if( u.posx() == traj_front.x() && u.posy() == traj_front.y() ) { add_msg( m_bad, _( "%s collided with you and sent you flying!" ), targ->get_name() ); } knockback( traj, stun, dam_mult ); @@ -4909,7 +4923,7 @@ void game::knockback( std::vector &traj, int stun, int dam_mult ) } targ->setpos( traj[i] ); } - } else if( u.pos() == tp ) { + } else if( u.pos_bub() == tp ) { if( stun > 0 ) { u.add_effect( effect_stunned, 1_turns * stun ); add_msg( m_bad, n_gettext( "You were stunned for %d turn!", @@ -5416,7 +5430,7 @@ bool game::swap_critters( Creature &a, Creature &b ) m.unboard_vehicle( other_npc->pos_bub() ); } - tripoint temp = second.pos(); + tripoint_bub_ms temp = second.pos_bub(); second.setpos( first.pos() ); if( first.is_avatar() ) { @@ -5582,33 +5596,28 @@ void game::save_cyborg( item *cyborg, const tripoint &couch_pos, Character &inst } -void game::exam_appliance( vehicle &veh, const point &c ) +void game::exam_appliance( vehicle &veh, const point_rel_ms &c ) { - player_activity act = veh_app_interact::run( veh, point_rel_ms( c ) ); + player_activity act = veh_app_interact::run( veh, c ); if( act ) { u.set_moves( 0 ); u.assign_activity( act ); } } -void game::exam_vehicle( vehicle &veh, const point &c ) +void game::exam_vehicle( vehicle &veh, const point_rel_ms &c ) { if( veh.magic ) { add_msg( m_info, _( "This is your %s" ), veh.name ); return; } - player_activity act = veh_interact::run( veh, point_rel_ms( c ) ); + player_activity act = veh_interact::run( veh, c ); if( act ) { u.set_moves( 0 ); u.assign_activity( act ); } } -void game::open_gate( const tripoint &p ) -{ - open_gate( tripoint_bub_ms( p ) ); -} - void game::open_gate( const tripoint_bub_ms &p ) { gates::open_gate( p, u ); @@ -5944,17 +5953,17 @@ void game::examine( bool with_pickup ) return; } - std::optional examp; + std::optional examp; if( with_pickup ) { // Examine and/or pick up items - examp = choose_adjacent_highlight( _( "Examine terrain, furniture, or items where?" ), - _( "There is nothing that can be examined nearby." ), - ACTION_EXAMINE_AND_PICKUP, false ); + examp = choose_adjacent_highlight_bub_ms( _( "Examine terrain, furniture, or items where?" ), + _( "There is nothing that can be examined nearby." ), + ACTION_EXAMINE_AND_PICKUP, false ); } else { // Examine but do not pick up items - examp = choose_adjacent_highlight( _( "Examine terrain or furniture where?" ), - _( "There is nothing that can be examined nearby." ), - ACTION_EXAMINE, false ); + examp = choose_adjacent_highlight_bub_ms( _( "Examine terrain or furniture where?" ), + _( "There is nothing that can be examined nearby." ), + ACTION_EXAMINE, false ); } if( !examp ) { @@ -6032,11 +6041,6 @@ static std::string get_fire_fuel_string( const tripoint_bub_ms &examp ) return {}; } -void game::examine( const tripoint &examp, bool with_pickup ) -{ - game::examine( tripoint_bub_ms( examp ), with_pickup ); -} - void game::examine( const tripoint_bub_ms &examp, bool with_pickup ) { if( disable_robot( examp ) ) { @@ -6084,7 +6088,7 @@ void game::examine( const tripoint_bub_ms &examp, bool with_pickup ) if( !vp->vehicle().is_appliance() ) { vp->vehicle().interact_with( examp, with_pickup ); } else { - g->exam_appliance( vp->vehicle(), vp->mount_pos().raw() ); + g->exam_appliance( vp->vehicle(), vp->mount_pos() ); } return; } else { @@ -6291,7 +6295,7 @@ void game::peek( const tripoint_bub_ms &p ) m.update_visibility_cache( p.z() ); look_around_result result; - const look_around_params looka_params = { true, center.raw(), center.raw(), false, false, true, true}; + const look_around_params looka_params = { true, center, center, false, false, true, true}; if( is_standup_peek ) { // Non moving peek from crouch is a standup peek u.reset_move_mode(); result = look_around( looka_params ); @@ -6317,7 +6321,7 @@ std::optional game::look_debug() } //////////////////////////////////////////////////////////////////////////////////////////// -void game::draw_look_around_cursor( const tripoint &lp, const visibility_variables &cache ) +void game::draw_look_around_cursor( const tripoint_bub_ms &lp, const visibility_variables &cache ) { if( !liveview.is_enabled() ) { #if defined( TILES ) @@ -6365,13 +6369,13 @@ void game::draw_look_around_cursor( const tripoint &lp, const visibility_variabl break; } - const tripoint screen_pos = point( POSX, POSY ) + lp - view_center.raw(); - mvwputch( w_terrain, screen_pos.xy(), visibility_indicator_color, visibility_indicator ); + const tripoint_rel_ms screen_pos = point_rel_ms( POSX, POSY ) + lp - view_center; + mvwputch( w_terrain, screen_pos.raw().xy(), visibility_indicator_color, visibility_indicator ); } } } -void game::print_all_tile_info( const tripoint &lp, const catacurses::window &w_look, +void game::print_all_tile_info( const tripoint_bub_ms &lp, const catacurses::window &w_look, const std::string &area_name, int column, int &line, const int last_line, @@ -6430,7 +6434,7 @@ void game::print_all_tile_info( const tripoint &lp, const catacurses::window &w_ } const int max_width = getmaxx( w_look ) - column - 1; - std::string this_sound = sounds::sound_at( lp ); + std::string this_sound = sounds::sound_at( lp.raw() ); if( !this_sound.empty() ) { const int lines = fold_and_print( w_look, point( 1, ++line ), max_width, c_light_gray, _( "From here you heard %s" ), @@ -6438,16 +6442,16 @@ void game::print_all_tile_info( const tripoint &lp, const catacurses::window &w_ line += lines - 1; } else { // Check other z-levels - tripoint tmp = lp; - for( tmp.z = -OVERMAP_DEPTH; tmp.z <= OVERMAP_HEIGHT; tmp.z++ ) { - if( tmp.z == lp.z ) { + tripoint_bub_ms tmp = lp; + for( tmp.z() = -OVERMAP_DEPTH; tmp.z() <= OVERMAP_HEIGHT; tmp.z()++ ) { + if( tmp.z() == lp.z() ) { continue; } - std::string zlev_sound = sounds::sound_at( tmp ); + std::string zlev_sound = sounds::sound_at( tmp.raw() ); if( !zlev_sound.empty() ) { const int lines = fold_and_print( w_look, point( 1, ++line ), max_width, c_light_gray, - tmp.z > lp.z ? + tmp.z() > lp.z() ? _( "From above you heard %s" ) : _( "From below you heard %s" ), zlev_sound ); line += lines - 1; } @@ -6484,7 +6488,7 @@ void game::print_visibility_info( const catacurses::window &w_look, int column, line += 2; } -void game::print_terrain_info( const tripoint &lp, const catacurses::window &w_look, +void game::print_terrain_info( const tripoint_bub_ms &lp, const catacurses::window &w_look, const std::string &area_name, int column, int &line ) { const int max_width = getmaxx( w_look ) - column - 1; @@ -6550,12 +6554,12 @@ void game::print_terrain_info( const tripoint &lp, const catacurses::window &w_l // Print light level on the selected tile. std::pair ll = get_light_level( std::max( 1.0, - LIGHT_AMBIENT_LIT - m.ambient_light_at( tripoint_bub_ms( lp ) ) + 1.0 ) ); + LIGHT_AMBIENT_LIT - m.ambient_light_at( lp ) + 1.0 ) ); mvwprintz( w_look, point( column, ++line ), c_light_gray, _( "Lighting: " ) ); mvwprintz( w_look, point( column + utf8_width( _( "Lighting: " ) ), line ), ll.second, ll.first ); // Print the terrain and any furntiure on the tile below and whether it is walkable. - if( lp.z > -OVERMAP_DEPTH && !m.has_floor( lp ) ) { + if( lp.z() > -OVERMAP_DEPTH && !m.has_floor( lp ) ) { tripoint_bub_ms below( lp + tripoint::below ); std::string tile_below = m.tername( below ); if( m.has_furn( below ) ) { @@ -6574,7 +6578,8 @@ void game::print_terrain_info( const tripoint &lp, const catacurses::window &w_l ++line; } -void game::print_furniture_info( const tripoint &lp, const catacurses::window &w_look, int column, +void game::print_furniture_info( const tripoint_bub_ms &lp, const catacurses::window &w_look, + int column, int &line ) { // Do nothing if there is no furniture here @@ -6620,7 +6625,8 @@ void game::print_furniture_info( const tripoint &lp, const catacurses::window &w } } -void game::print_fields_info( const tripoint &lp, const catacurses::window &w_look, int column, +void game::print_fields_info( const tripoint_bub_ms &lp, const catacurses::window &w_look, + int column, int &line ) { const field &tmpfield = m.field_at( lp ); @@ -6630,7 +6636,7 @@ void game::print_fields_info( const tripoint &lp, const catacurses::window &w_lo m.ter( lp ) == ter_t_pit_shallow || m.ter( lp ) == ter_t_pit ) ) { const int max_width = getmaxx( w_look ) - column - 2; int lines = fold_and_print( w_look, point( column, ++line ), max_width, cur.color(), - get_fire_fuel_string( tripoint_bub_ms( lp ) ) ) - 1; + get_fire_fuel_string( lp ) ) - 1; line += lines; } else { mvwprintz( w_look, point( column, ++line ), cur.color(), cur.name() ); @@ -6643,7 +6649,8 @@ void game::print_fields_info( const tripoint &lp, const catacurses::window &w_lo } } -void game::print_trap_info( const tripoint &lp, const catacurses::window &w_look, const int column, +void game::print_trap_info( const tripoint_bub_ms &lp, const catacurses::window &w_look, + const int column, int &line ) { const trap &tr = m.tr_at( lp ); @@ -6655,12 +6662,11 @@ void game::print_trap_info( const tripoint &lp, const catacurses::window &w_look ++line; } -void game::print_part_con_info( const tripoint &lp, const catacurses::window &w_look, +void game::print_part_con_info( const tripoint_bub_ms &lp, const catacurses::window &w_look, const int column, int &line ) { - // TODO: fix point types - partial_con *pc = m.partial_con_at( tripoint_bub_ms( lp ) ); + partial_con *pc = m.partial_con_at( lp ); std::string tr_name; if( pc != nullptr ) { const construction &built = pc->id.obj(); @@ -6707,7 +6713,8 @@ static void add_visible_items_recursive( std::mapx - u.posx(), second.position->x - u.posx() ), - std::min( first.position->y - u.posy(), second.position->y - u.posy() ), - std::min( first.position->z - u.posz(), second.position->z - u.posz() ) ) ; + std::min( first.position->x() - u.posx(), second.position->x() - u.posx() ), + std::min( first.position->y() - u.posy(), second.position->y() - u.posy() ), + std::min( first.position->z() - u.posz(), second.position->z() - u.posz() ) ); tripoint second_rel( - std::max( first.position->x - u.posx(), second.position->x - u.posx() ), - std::max( first.position->y - u.posy(), second.position->y - u.posy() ), - std::max( first.position->z - u.posz(), second.position->z - u.posz() ) ) ; + std::max( first.position->x() - u.posx(), second.position->x() - u.posx() ), + std::max( first.position->y() - u.posy(), second.position->y() - u.posy() ), + std::max( first.position->z() - u.posz(), second.position->z() - u.posz() ) ); return { { first_rel, second_rel } }; } tripoint_abs_ms first_abs = m.getglobal( tripoint_bub_ms( - std::min( first.position->x, second.position->x ), - std::min( first.position->y, second.position->y ), - std::min( first.position->z, second.position->z ) ) ); + std::min( first.position->x(), second.position->x() ), + std::min( first.position->y(), second.position->y() ), + std::min( first.position->z(), second.position->z() ) ) ); tripoint_abs_ms second_abs = m.getglobal( tripoint_bub_ms( - std::max( first.position->x, second.position->x ), - std::max( first.position->y, second.position->y ), - std::max( first.position->z, second.position->z ) ) ); + std::max( first.position->x(), second.position->x() ), + std::max( first.position->y(), second.position->y() ), + std::max( first.position->z(), second.position->z() ) ) ); return { { first_abs.raw(), second_abs.raw() } }; } @@ -7384,9 +7391,9 @@ void game::zones_manager() // local position of the zone center, used to calculate the u.view_offset, // could center the screen to the position it represents tripoint_bub_ms view_center = m.bub_from_abs( zone.get_center_point() ); - const look_around_result result_local = look_around( false, view_center.raw(), - zone_local_start_point.raw(), false, false, - false, true, zone_local_end_point.raw() ); + const look_around_result result_local = look_around( false, view_center, + zone_local_start_point, false, false, + false, true, zone_local_end_point ); if( result_local.position ) { const tripoint_abs_ms new_start_point = m.getglobal( *result_local.position ); const tripoint_abs_ms new_end_point = zone.get_end_point() - zone.get_start_point() + @@ -7498,7 +7505,7 @@ void game::zones_manager() u.view_offset = stored_view_offset; } -void game::pre_print_all_tile_info( const tripoint &lp, const catacurses::window &w_info, +void game::pre_print_all_tile_info( const tripoint_bub_ms &lp, const catacurses::window &w_info, int &first_line, const int last_line, const visibility_variables &cache ) { @@ -7560,9 +7567,9 @@ std::optional> game::safe_route_to( Character &who, return shortest_route; } -std::optional game::look_around() +std::optional game::look_around() { - tripoint center = u.pos() + u.view_offset.raw(); + tripoint_bub_ms center = u.pos_bub() + u.view_offset; look_around_result result = look_around( /*show_window=*/true, center, center, false, false, false ); return result.position; @@ -7571,15 +7578,18 @@ std::optional game::look_around() //look_around_result game::look_around( const bool show_window, tripoint ¢er, // const tripoint &start_point, bool has_first_point, bool select_zone, bool peeking ) look_around_result game::look_around( - const bool show_window, tripoint ¢er, const tripoint &start_point, bool has_first_point, - bool select_zone, bool peeking, bool is_moving_zone, const tripoint &end_point, bool change_lv ) + const bool show_window, tripoint_bub_ms ¢er, const tripoint_bub_ms &start_point, + bool has_first_point, + bool select_zone, bool peeking, bool is_moving_zone, const tripoint_bub_ms &end_point, + bool change_lv ) { bVMonsterLookFire = false; temp_exit_fullscreen(); // TODO: fix point types - tripoint_bub_ms lp( is_moving_zone ? ( start_point + end_point ) / 2 : start_point ); // cursor + tripoint_bub_ms lp( is_moving_zone ? ( tripoint_bub_ms( ( start_point.raw() + end_point.raw() ) / + 2 ) ) : start_point ); // cursor int &lx = lp.x(); int &ly = lp.y(); int &lz = lp.z(); @@ -7706,14 +7716,12 @@ look_around_result game::look_around( int first_line = 1; const int last_line = getmaxy( w_info ) - 2; - // TODO: fix point types - pre_print_all_tile_info( lp.raw(), w_info, first_line, last_line, cache ); + pre_print_all_tile_info( lp, w_info, first_line, last_line, cache ); wnoutrefresh( w_info ); } ); ter_indicator_cb = make_shared_fast( [&]() { - // TODO: fix point types - draw_look_around_cursor( lp.raw(), cache ); + draw_look_around_cursor( lp, cache ); } ); add_draw_callback( ter_indicator_cb ); } @@ -7737,10 +7745,10 @@ look_around_result game::look_around( mark_main_ui_adaptor_resize(); #endif do { - u.view_offset = tripoint_rel_ms( center - u.pos() ); + u.view_offset = center - u.pos_bub(); if( select_zone ) { if( has_first_point ) { - zone_start = start_point; + zone_start = start_point.raw(); // TODO: fix point types zone_end = lp.raw(); } else { @@ -7756,9 +7764,9 @@ look_around_result game::look_around( if( is_moving_zone ) { // TODO: fix point types - zone_start = lp.raw() - ( start_point + end_point ) / 2 + start_point; + zone_start = lp.raw() - ( start_point.raw() + end_point.raw() ) / 2 + start_point.raw(); // TODO: fix point types - zone_end = lp.raw() - ( start_point + end_point ) / 2 + end_point; + zone_end = lp.raw() - ( start_point.raw() + end_point.raw() ) / 2 + end_point.raw(); // Actually accessed from the terrain overlay callback `zone_cb` in the // call to `ui_manager::redraw`. //NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores) @@ -7778,9 +7786,9 @@ look_around_result game::look_around( //Wait for input // only specify a timeout here if "EDGE_SCROLL" is enabled // otherwise use the previously set timeout - const tripoint edge_scroll = mouse_edge_scrolling_terrain( ctxt ); + const tripoint_rel_ms edge_scroll = mouse_edge_scrolling_terrain( ctxt ); const int scroll_timeout = get_option( "EDGE_SCROLL" ); - const bool edge_scrolling = edge_scroll != tripoint::zero && scroll_timeout >= 0; + const bool edge_scrolling = edge_scroll != tripoint_rel_ms::zero && scroll_timeout >= 0; if( edge_scrolling ) { action = ctxt.handle_input( scroll_timeout ); } else { @@ -7810,12 +7818,12 @@ look_around_result game::look_around( } else if( action == "LEVEL_UP" || action == "LEVEL_DOWN" ) { const int dz = action == "LEVEL_UP" ? 1 : -1; lz = clamp( lz + dz, min_levz, max_levz ); - center.z = clamp( center.z + dz, min_levz, max_levz ); + center.z() = clamp( center.z() + dz, min_levz, max_levz ); add_msg_debug( debugmode::DF_GAME, "levx: %d, levy: %d, levz: %d", - get_map().get_abs_sub().x(), get_map().get_abs_sub().y(), center.z ); - u.view_offset.z() = center.z - u.posz(); - m.invalidate_map_cache( center.z ); + get_map().get_abs_sub().x(), get_map().get_abs_sub().y(), center.z() ); + u.view_offset.z() = center.z() - u.posz(); + m.invalidate_map_cache( center.z() ); // Fix player character not visible from above m.build_map_cache( u.posz() ); m.invalidate_visibility_cache(); @@ -7864,7 +7872,7 @@ look_around_result game::look_around( .edit( mon->nickname ); } } else if( action == "CENTER" ) { - center = u.pos(); + center = u.pos_bub(); lp = u.pos_bub(); u.view_offset.z() = 0; } else if( action == "MOUSE_MOVE" || action == "TIMEOUT" ) { @@ -7876,7 +7884,8 @@ look_around_result game::look_around( if( edge_scrolling ) { center += action == "MOUSE_MOVE" ? edge_scroll * 2 : edge_scroll; } else if( action == "MOUSE_MOVE" ) { - const std::optional mouse_pos = ctxt.get_coordinates( w_terrain, ter_view_p.xy(), + const std::optional mouse_pos = ctxt.get_coordinates( w_terrain, + ter_view_p.raw().xy(), true ); if( mouse_pos ) { lx = mouse_pos->x(); @@ -7891,27 +7900,27 @@ look_around_result game::look_around( lx = lx + vec->x; ly = ly + vec->y; - center.x = center.x + vec->x; - center.y = center.y + vec->y; + center.x() = center.x() + vec->x; + center.y() = center.y() + vec->y; } else if( action == "throw_blind" ) { result.peek_action = PA_BLIND_THROW; } else if( action == "zoom_in" ) { // TODO: fix point types - center.x = lp.x(); - center.y = lp.y(); + center.x() = lp.x(); + center.y() = lp.y(); zoom_in(); mark_main_ui_adaptor_resize(); } else if( action == "zoom_out" ) { // TODO: fix point types - center.x = lp.x(); - center.y = lp.y(); + center.x() = lp.x(); + center.y() = lp.y(); zoom_out(); mark_main_ui_adaptor_resize(); } } while( action != "QUIT" && action != "CONFIRM" && action != "SELECT" && action != "TRAVEL_TO" && action != "throw_blind" ); - if( center.z != old_levz ) { + if( center.z() != old_levz ) { m.invalidate_map_cache( old_levz ); m.build_map_cache( old_levz ); u.view_offset.z() = 0; @@ -7927,7 +7936,7 @@ look_around_result game::look_around( if( action == "CONFIRM" || action == "SELECT" ) { // TODO: fix point types - result.position = is_moving_zone ? zone_start : lp.raw(); + result.position = is_moving_zone ? tripoint_bub_ms( zone_start.value() ) : lp; } #if defined(TILES) @@ -7944,7 +7953,8 @@ look_around_result game::look_around( look_around_result game::look_around( look_around_params looka_params ) { return look_around( looka_params.show_window, looka_params.center, looka_params.start_point, - looka_params.has_first_point, looka_params.select_zone, looka_params.peeking, false, tripoint::zero, + looka_params.has_first_point, looka_params.select_zone, looka_params.peeking, false, + tripoint_bub_ms::zero, looka_params.change_lv ); } @@ -7998,18 +8008,18 @@ std::vector game::find_nearby_items( int iRadius ) void draw_trail( const tripoint &start, const tripoint &end, const bool bDrawX ) { - std::vector pts; + std::vector pts; avatar &player_character = get_avatar(); tripoint_bub_ms center = player_character.pos_bub() + player_character.view_offset; if( start != end ) { //Draw trail - pts = line_to( start, end, 0, 0 ); + pts = line_to( tripoint_bub_ms( start ), tripoint_bub_ms( end ), 0, 0 ); } else { //Draw point pts.emplace_back( start ); } - g->draw_line( end, center.raw(), pts ); + g->draw_line( tripoint_bub_ms( end ), center, pts ); if( bDrawX ) { char sym = 'X'; if( end.z > center.z() ) { @@ -8020,16 +8030,16 @@ void draw_trail( const tripoint &start, const tripoint &end, const bool bDrawX ) if( pts.empty() ) { mvwputch( g->w_terrain, point( POSX, POSY ), c_white, sym ); } else { - mvwputch( g->w_terrain, pts.back().xy() - player_character.view_offset.xy().raw() + + mvwputch( g->w_terrain, pts.back().raw().xy() - player_character.view_offset.xy().raw() + point( POSX - player_character.posx(), POSY - player_character.posy() ), c_white, sym ); } } } -void game::draw_trail_to_square( const tripoint &t, bool bDrawX ) +void game::draw_trail_to_square( const tripoint_rel_ms &t, bool bDrawX ) { - ::draw_trail( u.pos(), u.pos() + t, bDrawX ); + ::draw_trail( u.pos_bub().raw(), u.pos_bub().raw() + t.raw(), bDrawX ); } static void centerlistview( const tripoint &active_item_position, int ui_width ) @@ -8183,7 +8193,7 @@ bool game::take_screenshot() const timestamp_now() ); std::string file_name = ensure_valid_file_name( tmp_file_name ); - auto current_file_path = map_directory / file_name; + cata_path current_file_path = map_directory / file_name; // Take a screenshot of the viewport. if( take_screenshot( current_file_path.generic_u8string() ) ) { @@ -9264,9 +9274,9 @@ void game::unload_container() } } -void game::drop_in_direction( const tripoint &pnt ) +void game::drop_in_direction( const tripoint_bub_ms &pnt ) { - u.drop( game_menus::inv::multidrop( u ), pnt ); + u.drop( game_menus::inv::multidrop( u ), pnt.raw() ); } // Used to set up the first Hotkey in the display set @@ -10571,11 +10581,6 @@ std::vector game::get_dangerous_tile( const tripoint_bub_ms &dest_l return harmful_stuff; } -bool game::walk_move( const tripoint &dest_loc, const bool via_ramp, const bool furniture_move ) -{ - return game::walk_move( tripoint_bub_ms( dest_loc ), via_ramp, furniture_move ); -} - bool game::walk_move( const tripoint_bub_ms &dest_loc, const bool via_ramp, const bool furniture_move ) { @@ -10862,8 +10867,8 @@ bool game::walk_move( const tripoint_bub_ms &dest_loc, const bool via_ramp, bool moving = dest_loc != oldpos; - point submap_shift = place_player( dest_loc.raw() ); - point_rel_ms ms_shift = coords::project_to( point_rel_sm( submap_shift ) ); + point_rel_sm submap_shift = place_player( dest_loc ); + point_rel_ms ms_shift = coords::project_to( submap_shift ); oldpos = oldpos - ms_shift.raw(); if( moving ) { @@ -10936,7 +10941,7 @@ bool game::walk_move( const tripoint_bub_ms &dest_loc, const bool via_ramp, return true; } -point game::place_player( const tripoint &dest_loc, bool quick ) +point_rel_sm game::place_player( const tripoint_bub_ms &dest_loc, bool quick ) { const optional_vpart_position vp1 = m.veh_at( dest_loc ); if( const std::optional label = vp1.get_label() ) { @@ -11052,7 +11057,7 @@ point game::place_player( const tripoint &dest_loc, bool quick ) } if( !moved ) { add_msg( _( "There is no room to push the %s out of the way." ), critter.name() ); - return u.pos().xy(); + return point_rel_sm::zero; } } else { // Force the movement even though the player is there right now. @@ -11061,19 +11066,19 @@ point game::place_player( const tripoint &dest_loc, bool quick ) add_msg( _( "You displace the %s." ), critter.name() ); } else { add_msg( _( "You cannot move the %s out of the way." ), critter.name() ); - return u.pos().xy(); + return point_rel_sm::zero; } } } else if( !u.has_effect( effect_riding ) ) { add_msg( _( "You cannot move the %s out of the way." ), critter.name() ); - return u.pos().xy(); + return point_rel_sm::zero; } } // If the player is in a vehicle, unboard them from the current part bool was_in_control_same_pos = false; if( u.in_vehicle ) { - if( u.pos() == dest_loc ) { + if( u.pos_bub() == dest_loc ) { was_in_control_same_pos = true; } else { m.unboard_vehicle( u.pos_bub() ); @@ -11082,8 +11087,8 @@ point game::place_player( const tripoint &dest_loc, bool quick ) // Move the player // Start with z-level, to make it less likely that old functions (2D ones) freak out bool z_level_changed = false; - if( dest_loc.z != m.get_abs_sub().z() ) { - z_level_changed = vertical_shift( dest_loc.z ); + if( dest_loc.z() != m.get_abs_sub().z() ) { + z_level_changed = vertical_shift( dest_loc.z() ); } if( u.is_hauling() && ( !m.can_put_items( dest_loc ) || @@ -11098,7 +11103,7 @@ point game::place_player( const tripoint &dest_loc, bool quick ) mon->process_triggers(); m.creature_in_field( *mon ); } - point submap_shift = update_map( u, z_level_changed ); + point_rel_sm submap_shift = point_rel_sm( update_map( u, z_level_changed ) ); // Important: don't use dest_loc after this line. `update_map` may have shifted the map // and dest_loc was not adjusted and therefore is still in the un-shifted system and probably wrong. // If you must use it you can calculate the position in the new, shifted system with @@ -11347,7 +11352,7 @@ void game::place_player_overmap( const tripoint_abs_omt &om_dest, bool move_play // player will be centered in the middle of the map. const tripoint_abs_sm map_sm_pos = project_to( om_dest ) - point( HALF_MAPSIZE, HALF_MAPSIZE ); - const tripoint player_pos( u.pos().xy(), map_sm_pos.z() ); + const tripoint_bub_ms player_pos( u.pos_bub().xy(), map_sm_pos.z() ); load_map( map_sm_pos ); load_npcs(); m.spawn_monsters( true ); // Static monsters @@ -11359,7 +11364,7 @@ void game::place_player_overmap( const tripoint_abs_omt &om_dest, bool move_play } } -bool game::phasing_move( const tripoint &dest_loc, const bool via_ramp ) +bool game::phasing_move( const tripoint_bub_ms &dest_loc, const bool via_ramp ) { const units::energy trigger_cost = bio_probability_travel->power_trigger; @@ -11368,16 +11373,16 @@ bool game::phasing_move( const tripoint &dest_loc, const bool via_ramp ) return false; } - if( dest_loc.z != u.posz() && !via_ramp ) { + if( dest_loc.z() != u.posz() && !via_ramp ) { // No vertical phasing yet return false; } //probability travel through walls but not water - tripoint dest = dest_loc; + tripoint_bub_ms dest = dest_loc; // tile is impassable int tunneldist = 0; - const point d( sgn( dest.x - u.posx() ), sgn( dest.y - u.posy() ) ); + const point_rel_ms d( sgn( dest.x() - u.posx() ), sgn( dest.y() - u.posy() ) ); creature_tracker &creatures = get_creature_tracker(); while( m.impassable( dest ) || ( creatures.creature_at( dest ) != nullptr && tunneldist > 0 ) ) { @@ -11401,9 +11406,7 @@ bool game::phasing_move( const tripoint &dest_loc, const bool via_ramp ) u.mod_power_level( -trigger_cost ); return false; } - - dest.x += d.x; - dest.y += d.y; + dest.raw() += d.raw(); // TODO: Make += etc. work with relative coordinates. } if( tunneldist != 0 ) { @@ -11430,7 +11433,7 @@ bool game::phasing_move( const tripoint &dest_loc, const bool via_ramp ) return false; } -bool game::phasing_move_enchant( const tripoint &dest_loc, const int phase_distance ) +bool game::phasing_move_enchant( const tripoint_bub_ms &dest_loc, const int phase_distance ) { if( phase_distance < 1 ) { @@ -11440,8 +11443,9 @@ bool game::phasing_move_enchant( const tripoint &dest_loc, const int phase_dista // phasing only applies to impassible tiles such as walls int tunneldist = 0; - tripoint dest = dest_loc; - const tripoint d( sgn( dest.x - u.posx() ), sgn( dest.y - u.posy() ), sgn( dest.z - u.posz() ) ); + tripoint_bub_ms dest = dest_loc; + const tripoint d( sgn( dest.x() - u.posx() ), sgn( dest.y() - u.posy() ), + sgn( dest.z() - u.posz() ) ); creature_tracker &creatures = get_creature_tracker(); while( m.impassable( dest ) || @@ -11454,10 +11458,7 @@ bool game::phasing_move_enchant( const tripoint &dest_loc, const int phase_dista if( tunneldist > 48 ) { return false; } - - dest.x += d.x; - dest.y += d.y; - dest.z += d.z; + dest += d; } // vertical handling for adjacent tiles @@ -11470,9 +11471,9 @@ bool game::phasing_move_enchant( const tripoint &dest_loc, const int phase_dista m.unboard_vehicle( u.pos_bub() ); } - if( dest.z != u.posz() ) { + if( dest.z() != u.posz() ) { // calling vertical_shift here doesn't actually move the character for some reason, but it does perform other necessary tasks for vertical movement - vertical_shift( dest.z ); + vertical_shift( dest.z() ); } u.setpos( dest ); @@ -12062,7 +12063,8 @@ bool game::fling_creature( Creature *c, const units::angle &dir, float flvel, bo return true; } -std::optional game::point_selection_menu( const std::vector &pts, bool up ) +std::optional game::point_selection_menu( const std::vector &pts, + bool up ) { if( pts.empty() ) { debugmsg( "point_selection_menu called with empty point set" ); @@ -12073,11 +12075,11 @@ std::optional game::point_selection_menu( const std::vector return pts[0]; } - const tripoint upos = get_player_character().pos(); + const tripoint_bub_ms upos = get_player_character().pos_bub(); uilist pmenu; pmenu.title = _( "Climb where?" ); int num = 0; - for( const tripoint &pt : pts ) { + for( const tripoint_bub_ms &pt : pts ) { // TODO: Sort the menu so that it can be used with numpad directions const std::string &dir_arrow = direction_arrow( direction_from( upos.xy(), pt.xy() ) ); const std::string &dir_name = direction_name( direction_from( upos.xy(), pt.xy() ) ); @@ -12152,8 +12154,8 @@ void game::vertical_move( int movez, bool force, bool peeking ) } } if( here.has_floor_or_support( stairs ) ) { - tripoint dest_phase = u.pos(); - dest_phase.z += 1; + tripoint_bub_ms dest_phase = u.pos_bub(); + dest_phase.z() += 1; if( phasing_move_enchant( dest_phase, u.calculate_by_enchantment( 0, enchant_vals::mod::PHASE_DISTANCE ) ) ) { return; @@ -12191,20 +12193,20 @@ void game::vertical_move( int movez, bool force, bool peeking ) } } - std::vector pts; + std::vector pts; for( const tripoint_bub_ms &pt : here.points_in_radius( stairs, 1 ) ) { if( here.passable( pt ) && here.has_floor_or_support( pt ) ) { - pts.push_back( pt.raw() ); + pts.push_back( pt ); } } if( wall_cling && here.is_wall_adjacent( stairs ) ) { - pts.push_back( stairs.raw() ); + pts.push_back( stairs ); } if( climb_flying ) { - pts.push_back( stairs.raw() ); + pts.push_back( stairs ); } if( pts.empty() ) { @@ -12224,19 +12226,19 @@ void game::vertical_move( int movez, bool force, bool peeking ) move_cost = cost == 0 ? 1000 : cost + 500; } - const std::optional pnt = point_selection_menu( pts ); + const std::optional pnt = point_selection_menu( pts ); if( !pnt ) { return; } - stairs = tripoint_bub_ms( *pnt ); + stairs = *pnt; } } if( !force && movez == -1 && !here.has_flag( ter_furn_flag::TFLAG_GOES_DOWN, u.pos_bub() ) && !u.is_underwater() && !here.has_flag( ter_furn_flag::TFLAG_NO_FLOOR_WATER, u.pos_bub() ) && !u.has_effect( effect_gliding ) ) { - tripoint dest_phase = u.pos(); - dest_phase.z -= 1; + tripoint_bub_ms dest_phase = u.pos_bub(); + dest_phase.z() -= 1; if( wall_cling && !here.has_floor_or_support( u.pos_bub() ) ) { climbing = true; @@ -13479,10 +13481,10 @@ cata_path PATH_INFO::world_base_save_path() return world_generator->active_world->folder_path(); } -void game::shift_destination_preview( const point &delta ) +void game::shift_destination_preview( const point_rel_ms &delta ) { for( tripoint_bub_ms &p : destination_preview ) { - p += delta; + p += delta.raw(); // TODO: Make += etc. work with corresponding relative coordinates } } @@ -13664,20 +13666,20 @@ static bool climb_affordance_menu_decode( int retval, climbing_aid_id &aid_id ) return false; } -void game::climb_down_menu_gen( const tripoint &examp, uilist &cmenu ) +void game::climb_down_menu_gen( const tripoint_bub_ms &examp, uilist &cmenu ) { // NOTE this menu may be merged with the iexamine::ledge menu, manage keys carefully! map &here = get_map(); Character &you = get_player_character(); - if( !here.valid_move( you.pos(), examp, false, true ) ) { + if( !here.valid_move( you.pos_bub(), examp, false, true ) ) { // Can't move horizontally to the ledge return; } // Scan the height of the drop and what's in the way. - const climbing_aid::fall_scan fall( examp ); + const climbing_aid::fall_scan fall( examp.raw() ); add_msg_debug( debugmode::DF_IEXAMINE, "Ledge height %d", fall.height ); if( fall.height == 0 ) { @@ -13688,7 +13690,7 @@ void game::climb_down_menu_gen( const tripoint &examp, uilist &cmenu ) // This is used to mention object names. TODO make this more flexible. std::string target_disp_name = m.disp_name( fall.pos_furniture_or_floor() ); - climbing_aid::condition_list conditions = climbing_aid::detect_conditions( you, examp ); + climbing_aid::condition_list conditions = climbing_aid::detect_conditions( you, examp.raw() ); climbing_aid::aid_list aids = climbing_aid::list( conditions ); @@ -13736,7 +13738,7 @@ void game::climb_down_menu_gen( const tripoint &examp, uilist &cmenu ) } } -bool game::climb_down_menu_pick( const tripoint &examp, int retval ) +bool game::climb_down_menu_pick( const tripoint_bub_ms &examp, int retval ) { climbing_aid_id aid_id = climbing_aid_default; @@ -13748,7 +13750,7 @@ bool game::climb_down_menu_pick( const tripoint &examp, int retval ) } } -void game::climb_down( const tripoint &examp ) +void game::climb_down( const tripoint_bub_ms &examp ) { uilist cmenu; cmenu.text = _( "How would you prefer to climb down?" ); @@ -13764,7 +13766,8 @@ void game::climb_down( const tripoint &examp ) } } -void game::climb_down_using( const tripoint &examp, climbing_aid_id aid_id, bool deploy_affordance ) +void game::climb_down_using( const tripoint_bub_ms &examp, climbing_aid_id aid_id, + bool deploy_affordance ) { const climbing_aid &aid = aid_id.obj(); @@ -13778,15 +13781,15 @@ void game::climb_down_using( const tripoint &examp, climbing_aid_id aid_id, bool return; } - if( !here.valid_move( you.pos(), examp, false, true ) ) { + if( !here.valid_move( you.pos_bub(), examp, false, true ) ) { // Can't move horizontally to the ledge return; } // Scan the height of the drop and what's in the way. - const climbing_aid::fall_scan fall( examp ); + const climbing_aid::fall_scan fall( examp.raw() ); - int estimated_climb_cost = you.climbing_cost( fall.pos_bottom(), examp ); + int estimated_climb_cost = you.climbing_cost( fall.pos_bottom(), examp.raw() ); const float fall_mod = you.fall_damage_mod(); add_msg_debug( debugmode::DF_IEXAMINE, "Climb cost %d", estimated_climb_cost ); add_msg_debug( debugmode::DF_IEXAMINE, "Fall damage modifier %.2f", fall_mod ); @@ -13918,20 +13921,20 @@ void game::climb_down_using( const tripoint &examp, climbing_aid_id aid_id, bool } // Descent: perform one slip check per level - tripoint descent_pos = examp; + tripoint_bub_ms descent_pos = examp; for( int i = 0; i < fall.height && i < aid.down.max_height; ++i ) { if( g->slip_down( climb_maneuver::down, aid_id, false ) ) { // The player has slipped and probably fallen. return; } else { - descent_pos.z--; + descent_pos.z()--; if( aid.down.deploys_furniture() ) { here.furn_set( descent_pos, aid.down.deploy_furn ); } } } - int descended_levels = examp.z - descent_pos.z; + int descended_levels = examp.z() - descent_pos.z(); add_msg_debug( debugmode::DF_IEXAMINE, "Safe movement down %d Z-levels", descended_levels ); // Post-descent logic... diff --git a/src/game.h b/src/game.h index 14654b91c2146..a2b0c5be802f0 100644 --- a/src/game.h +++ b/src/game.h @@ -112,13 +112,13 @@ enum peek_act : int { }; struct look_around_result { - std::optional position; + std::optional position; std::optional peek_action; }; struct look_around_params { const bool show_window; - tripoint ¢er; - const tripoint &start_point; + tripoint_bub_ms ¢er; + const tripoint_bub_ms &start_point; bool has_first_point; bool select_zone; bool peeking; @@ -132,7 +132,7 @@ struct w_map { catacurses::window win; }; -bool is_valid_in_w_terrain( const point &p ); +bool is_valid_in_w_terrain( const point_rel_ms &p ); namespace turn_handler { bool cleanup_at_end(); @@ -225,7 +225,7 @@ class game void mark_main_ui_adaptor_resize() const; void draw( ui_adaptor &ui ); void draw_ter( bool draw_sounds = true ); - void draw_ter( const tripoint ¢er, bool looking = false, bool draw_sounds = true ); + void draw_ter( const tripoint_bub_ms ¢er, bool looking = false, bool draw_sounds = true ); class draw_callback_t { @@ -301,7 +301,8 @@ class game /* * Prompt player on direction they want to climb up or down. */ - std::optional point_selection_menu( const std::vector &pts, bool up = true ); + std::optional point_selection_menu( const std::vector &pts, + bool up = true ); /** Actual z-level movement part of vertical_move. Doesn't include stair finding, traps etc. * Returns true if the z-level changed. */ @@ -640,7 +641,7 @@ class game const std::function &report ) const; // Look at nearby terrain ';', or select zone points - std::optional look_around(); + std::optional look_around(); /** * @brief * @@ -655,27 +656,27 @@ class game * @param change_lv determines allow if change z-level * @return look_around_result */ - look_around_result look_around( bool show_window, tripoint ¢er, - const tripoint &start_point, bool has_first_point, bool select_zone, bool peeking, - bool is_moving_zone = false, const tripoint &end_point = tripoint::zero, + look_around_result look_around( bool show_window, tripoint_bub_ms ¢er, + const tripoint_bub_ms &start_point, bool has_first_point, bool select_zone, bool peeking, + bool is_moving_zone = false, const tripoint_bub_ms &end_point = tripoint_bub_ms::zero, bool change_lv = true ); look_around_result look_around( look_around_params ); // Shared method to print "look around" info - void pre_print_all_tile_info( const tripoint &lp, const catacurses::window &w_info, + void pre_print_all_tile_info( const tripoint_bub_ms &lp, const catacurses::window &w_info, int &line, int last_line, const visibility_variables &cache ); // Shared method to print "look around" info - void print_all_tile_info( const tripoint &lp, const catacurses::window &w_look, + void print_all_tile_info( const tripoint_bub_ms &lp, const catacurses::window &w_look, const std::string &area_name, int column, int &line, int last_line, const visibility_variables &cache ); - void draw_look_around_cursor( const tripoint &lp, const visibility_variables &cache ); + void draw_look_around_cursor( const tripoint_bub_ms &lp, const visibility_variables &cache ); /** Long description of (visible) things at tile. */ - void extended_description( const tripoint &p ); + // void extended_description( const tripoint &p ); // Has no implementation, so assuming it's a stub for future expansion. - void draw_trail_to_square( const tripoint &t, bool bDrawX ); + void draw_trail_to_square( const tripoint_rel_ms &t, bool bDrawX ); enum inventory_item_menu_position { RIGHT_TERMINAL_EDGE, @@ -750,7 +751,7 @@ class game /** Get all living player allies */ std::vector allies(); // Setter for driving_view_offset - void set_driving_view_offset( const point &p ); + void set_driving_view_offset( const point_rel_ms &p ); // Calculates the driving_view_offset for the given vehicle // and sets it (view set_driving_view_offset), if // the options for this feature is deactivated or if veh is NULL, @@ -759,8 +760,6 @@ class game /**@}*/ - // TODO: Get rid of untyped overload. - void open_gate( const tripoint &p ); void open_gate( const tripoint_bub_ms &p ); // Knockback functions: knock target at t along a line, either calculated @@ -769,26 +768,17 @@ class game // force also determines damage along with dam_mult; // stun determines base number of turns target is stunned regardless of impact // stun == 0 means no stun, stun == -1 indicates only impact stun (wall or npc/monster) - void knockback( const tripoint &s, const tripoint &t, int force, int stun, int dam_mult ); - void knockback( std::vector &traj, int stun, int dam_mult ); + void knockback( const tripoint_bub_ms &s, const tripoint_bub_ms &t, int force, int stun, + int dam_mult ); + void knockback( std::vector &traj, int stun, int dam_mult ); // Animation related functions - // TODO: Get rid of untyped overload - void draw_bullet( const tripoint &t, int i, const std::vector &trajectory, - char bullet ); void draw_bullet( const tripoint_bub_ms &t, int i, const std::vector &trajectory, char bullet ); - // TODO: Get rid of untyped overload - void draw_hit_mon( const tripoint &p, const monster &m, bool dead = false ); void draw_hit_mon( const tripoint_bub_ms &p, const monster &m, bool dead = false ); void draw_hit_player( const Character &p, int dam ); - // TODO: fix point types (remove the first overload) - void draw_line( const tripoint &p, const tripoint ¢er_point, - const std::vector &points, bool noreveal = false ); void draw_line( const tripoint_bub_ms &p, const tripoint_bub_ms ¢er_point, const std::vector &points, bool noreveal = false ); - // TODO: Change to typed when single user is updated. - void draw_line( const tripoint &p, const std::vector &points ); void draw_line( const tripoint_bub_ms &p, const std::vector &points ); void draw_weather( const weather_printable &wPrint ) const; void draw_sct() const; @@ -796,51 +786,28 @@ class game const tripoint_rel_ms &offset ) const; // Draw critter (if visible!) on its current position into w_terrain. // @param center the center of view, same as when calling map::draw - void draw_critter( const Creature &critter, const tripoint ¢er ); - // TODO: Get rid of untyped overload - void draw_cursor( const tripoint &p ) const; + void draw_critter( const Creature &critter, const tripoint_bub_ms ¢er ); void draw_cursor( const tripoint_bub_ms &p ) const; // Tiles: equivalent to draw_cusor // Curses: draws diagonal arrows pointing at the tile so the target tile isn't obscured void draw_cursor_unobscuring( const tripoint_bub_ms &p ) const; // Draw a highlight graphic at p, for example when examining something. // TILES only, in curses this does nothing - // TODO: Get rid of untyped overload - void draw_highlight( const tripoint &p ); void draw_highlight( const tripoint_bub_ms &p ); // Draws an asynchronous animation at p with tile_id as its sprite. If ncstr is specified, it will also be displayed in curses. - // TODO: Get rid of untyped overload - void draw_async_anim( const tripoint &p, const std::string &tile_id, const std::string &ncstr = "", - const nc_color &nccol = c_black ); void draw_async_anim( const tripoint_bub_ms &p, const std::string &tile_id, const std::string &ncstr = "", const nc_color &nccol = c_black ); void draw_radiation_override( const tripoint_bub_ms &p, int rad ); - // TODO: Get rid of untyped overload - void draw_terrain_override( const tripoint &p, const ter_id &id ); void draw_terrain_override( const tripoint_bub_ms &p, const ter_id &id ); - // TODO: Get rid of untyped overload - void draw_furniture_override( const tripoint &p, const furn_id &id ); void draw_furniture_override( const tripoint_bub_ms &p, const furn_id &id ); void draw_graffiti_override( const tripoint_bub_ms &p, bool has ); - // TODO: Get rid of untyped overload - void draw_trap_override( const tripoint &p, const trap_id &id ); void draw_trap_override( const tripoint_bub_ms &p, const trap_id &id ); - // TODO: Get rid of untyped overload - void draw_field_override( const tripoint &p, const field_type_id &id ); void draw_field_override( const tripoint_bub_ms &p, const field_type_id &id ); - // TODO: Get rid of untyped overload - void draw_item_override( const tripoint &p, const itype_id &id, const mtype_id &mid, - bool hilite ); void draw_item_override( const tripoint_bub_ms &p, const itype_id &id, const mtype_id &mid, bool hilite ); - // TODO: Get rid of untyped overload - void draw_vpart_override( const tripoint &p, const vpart_id &id, int part_mod, - const units::angle &veh_dir, bool hilite, const point &mount ); void draw_vpart_override( const tripoint_bub_ms &p, const vpart_id &id, int part_mod, - const units::angle &veh_dir, bool hilite, const point &mount ); - // TODO: Get rid of untyped overload - void draw_below_override( const tripoint &p, bool draw ); + const units::angle &veh_dir, bool hilite, const point_rel_ms &mount ); void draw_below_override( const tripoint_bub_ms &p, bool draw ); void draw_monster_override( const tripoint_bub_ms &p, const mtype_id &id, int count, bool more, Creature::Attitude att ); @@ -854,10 +821,10 @@ class game void set_safe_mode( safe_mode_type mode ); /** open appliance interaction screen */ - void exam_appliance( vehicle &veh, const point &cp = point::zero ); + void exam_appliance( vehicle &veh, const point_rel_ms &cp = point_rel_ms::zero ); /** open vehicle interaction screen */ - void exam_vehicle( vehicle &veh, const point &cp = point::zero ); + void exam_vehicle( vehicle &veh, const point_rel_ms &cp = point_rel_ms::zero ); /** Attempt to load first valid save (if any) in world */ bool load( const std::string &world ); @@ -866,13 +833,11 @@ class game bool npc_menu( npc &who ); // Handle phasing through walls, returns true if it handled the move - bool phasing_move( const tripoint &dest, bool via_ramp = false ); + bool phasing_move( const tripoint_bub_ms &dest, bool via_ramp = false ); // Handle shifting through terrain and walls, with distance defined by enchantment. - bool phasing_move_enchant( const tripoint &dest, int phase_distance = 0 ); + bool phasing_move_enchant( const tripoint_bub_ms &dest, int phase_distance = 0 ); bool can_move_furniture( tripoint_bub_ms fdest, const tripoint_rel_ms &dp ); // Regular movement. Returns false if it failed for any reason - // TODO: Get rid of untyped overload - bool walk_move( const tripoint &dest, bool via_ramp = false, bool furniture_move = false ); bool walk_move( const tripoint_bub_ms &dest, bool via_ramp = false, bool furniture_move = false ); void on_move_effects(); private: @@ -924,8 +889,6 @@ class game void control_vehicle(); // Use vehicle controls '^' // Examine nearby terrain 'e', with or without picking up items - // TODO: Get rid of untyped overload. - void examine( const tripoint &p, bool with_pickup = false ); void examine( const tripoint_bub_ms &p, bool with_pickup = false ); void examine( bool with_pickup = true ); @@ -935,7 +898,7 @@ class game void pickup_all(); void unload_container(); // Unload a container w/ direction 'd' - void drop_in_direction( const tripoint &pnt ); // Drop w/ direction 'D' + void drop_in_direction( const tripoint_bub_ms &pnt ); // Drop w/ direction 'D' void butcher(); // Butcher a corpse 'B' @@ -958,7 +921,7 @@ class game void insert_item(); // Insert items to container 'v' void insert_item( drop_locations &targets ); // Places the player at the specified point; hurts feet, lists items etc. - point place_player( const tripoint &dest, bool quick = false ); + point_rel_sm place_player( const tripoint_bub_ms &dest, bool quick = false ); void place_player_overmap( const tripoint_abs_omt &om_dest, bool move_player = true ); void perhaps_add_random_npc( bool ignore_spawn_timers_and_rates ); static void display_om_pathfinding_progress( size_t open_set, size_t known_size ); @@ -989,16 +952,16 @@ class game void chat(); // Talk to a nearby NPC 'C' // Internal methods to show "look around" info - void print_fields_info( const tripoint &lp, const catacurses::window &w_look, int column, + void print_fields_info( const tripoint_bub_ms &lp, const catacurses::window &w_look, int column, int &line ); - void print_terrain_info( const tripoint &lp, const catacurses::window &w_look, + void print_terrain_info( const tripoint_bub_ms &lp, const catacurses::window &w_look, const std::string &area_name, int column, int &line ); - void print_furniture_info( const tripoint &lp, const catacurses::window &w_look, int column, + void print_furniture_info( const tripoint_bub_ms &lp, const catacurses::window &w_look, int column, int &line ); - void print_trap_info( const tripoint &lp, const catacurses::window &w_look, int column, + void print_trap_info( const tripoint_bub_ms &lp, const catacurses::window &w_look, int column, int &line ); - void print_part_con_info( const tripoint &lp, const catacurses::window &w_look, int column, + void print_part_con_info( const tripoint_bub_ms &lp, const catacurses::window &w_look, int column, int &line ); void print_creature_info( const Creature *creature, const catacurses::window &w_look, int column, int &line, int last_line ); @@ -1006,9 +969,10 @@ class game int column, int &line, int last_line ); void print_visibility_info( const catacurses::window &w_look, int column, int &line, visibility_type visibility ); - void print_items_info( const tripoint &lp, const catacurses::window &w_look, int column, int &line, + void print_items_info( const tripoint_bub_ms &lp, const catacurses::window &w_look, int column, + int &line, int last_line ); - void print_graffiti_info( const tripoint &lp, const catacurses::window &w_look, int column, + void print_graffiti_info( const tripoint_bub_ms &lp, const catacurses::window &w_look, int column, int &line, int last_line ); input_context get_player_input( std::string &action ); @@ -1158,7 +1122,7 @@ class game /** True if the game has just started or loaded, else false. */ bool new_game = false; // NOLINT(cata-serialize) - tripoint ter_view_p; // NOLINT(cata-serialize) + tripoint_bub_ms ter_view_p; // NOLINT(cata-serialize) catacurses::window w_terrain; // NOLINT(cata-serialize) catacurses::window w_overmap; // NOLINT(cata-serialize) catacurses::window w_omlegend; // NOLINT(cata-serialize) @@ -1172,7 +1136,7 @@ class game // View offset based on the driving speed (if any) // that has been added to u.view_offset, // Don't write to this directly, always use set_driving_view_offset - point driving_view_offset; + point_rel_ms driving_view_offset; // show NPC pathfinding on overmap ui bool debug_pathfinding = false; // NOLINT(cata-serialize) @@ -1264,10 +1228,12 @@ class game // NOLINTNEXTLINE(cata-serialize) std::chrono::time_point last_mouse_edge_scroll; - tripoint last_mouse_edge_scroll_vector_terrain; // NOLINT(cata-serialize) - tripoint last_mouse_edge_scroll_vector_overmap; // NOLINT(cata-serialize) - std::pair mouse_edge_scrolling( input_context &ctxt, int speed, - const tripoint &last, bool iso ); + tripoint_rel_ms last_mouse_edge_scroll_vector_terrain; // NOLINT(cata-serialize) + tripoint_rel_omt last_mouse_edge_scroll_vector_overmap; // NOLINT(cata-serialize) + std::pair mouse_edge_scrolling( input_context &ctxt, int speed, + const tripoint_rel_ms &last, bool iso ); + std::pair mouse_edge_scrolling( input_context &ctxt, int speed, + const tripoint_rel_omt &last, bool iso ); weak_ptr_fast main_ui_adaptor; // NOLINT(cata-serialize) @@ -1283,12 +1249,12 @@ class game * This variant adjust scrolling speed according to zoom * level, making it suitable when viewing the "terrain". */ - tripoint mouse_edge_scrolling_terrain( input_context &ctxt ); + tripoint_rel_ms mouse_edge_scrolling_terrain( input_context &ctxt ); /** This variant is suitable for the overmap. */ - tripoint mouse_edge_scrolling_overmap( input_context &ctxt ); + tripoint_rel_omt mouse_edge_scrolling_overmap( input_context &ctxt ); // called on map shifting - void shift_destination_preview( const point &delta ); + void shift_destination_preview( const point_rel_ms &delta ); /** Passed to climbing-related functions (slip_down) to * indicate the climbing action being attempted. @@ -1329,12 +1295,12 @@ class game * Otherwise the safest available affordance (see above) is detected and used. * The player is shown a confirmation query with an assessment of falling risk and damage. */ - void climb_down( const tripoint &examp ); + void climb_down( const tripoint_bub_ms &examp ); - void climb_down_menu_gen( const tripoint &examp, uilist &cmenu ); - bool climb_down_menu_pick( const tripoint &examp, int retval ); + void climb_down_menu_gen( const tripoint_bub_ms &examp, uilist &cmenu ); + bool climb_down_menu_pick( const tripoint_bub_ms &examp, int retval ); void climb_down_using( - const tripoint &examp, + const tripoint_bub_ms &examp, climbing_aid_id aid, bool deploy_affordance = false ); }; diff --git a/src/game_inventory.cpp b/src/game_inventory.cpp index 9f9c99fe095ab..1062f9d0e6345 100644 --- a/src/game_inventory.cpp +++ b/src/game_inventory.cpp @@ -1136,7 +1136,7 @@ class activatable_inventory_preset : public pickup_inventory_preset } if( uses.size() == 1 ) { - const auto ret = uses.begin()->second.can_call( you, it, you.pos() ); + const auto ret = uses.begin()->second.can_call( you, it, you.pos_bub() ); if( !ret.success() ) { return trim_trailing_punctuations( ret.str() ); } diff --git a/src/gates.cpp b/src/gates.cpp index 5a81eba5e59ef..c30166e54b365 100644 --- a/src/gates.cpp +++ b/src/gates.cpp @@ -402,7 +402,7 @@ bool doors::forced_door_closing( const tripoint_bub_ms &p, } // TODO: make the npc angry? npc_or_player->hitall( bash_dmg, 0, nullptr ); - g->knockback( kbp.raw(), p.raw(), std::max( 1, bash_dmg / 10 ), -1, 1 ); + g->knockback( kbp, p, std::max( 1, bash_dmg / 10 ), -1, 1 ); // TODO: perhaps damage/destroy the gate // if the npc was really big? if( creatures.creature_at( p, false ) != nullptr ) { @@ -431,7 +431,7 @@ bool doors::forced_door_closing( const tripoint_bub_ms &p, } if( !critter.is_dead() ) { // Still alive? Move the critter away so the door can close - g->knockback( kbp.raw(), p.raw(), std::max( 1, bash_dmg / 10 ), -1, 1 ); + g->knockback( kbp, p, std::max( 1, bash_dmg / 10 ), -1, 1 ); if( creatures.creature_at( p ) ) { return false; } diff --git a/src/handle_action.cpp b/src/handle_action.cpp index dd18198ec3504..56b82c4c5f9c0 100644 --- a/src/handle_action.cpp +++ b/src/handle_action.cpp @@ -1715,7 +1715,7 @@ static void read() item the_book = *loc.get_item(); if( avatar_action::check_stealing( get_player_character(), the_book ) ) { if( loc->type->can_use( "learn_spell" ) ) { - the_book.get_use( "learn_spell" )->call( &player_character, the_book, player_character.pos() ); + the_book.get_use( "learn_spell" )->call( &player_character, the_book, player_character.pos_bub() ); } else { loc = loc.obtain( player_character ); player_character.read( loc ); @@ -2133,8 +2133,8 @@ static void do_deathcam_action( const action_id &act, avatar &player_character ) break; case ACTION_CENTER: - player_character.view_offset.x() = g->driving_view_offset.x; - player_character.view_offset.y() = g->driving_view_offset.y; + player_character.view_offset.x() = g->driving_view_offset.x(); + player_character.view_offset.y() = g->driving_view_offset.y(); player_character.view_offset.z() = 0; break; @@ -2400,18 +2400,18 @@ bool game::do_regular_action( action_id &act, avatar &player_character, if( !player_character.in_vehicle ) { // We're NOT standing on tiles with stairs, ropes, ladders etc if( !m.has_flag( ter_furn_flag::TFLAG_GOES_DOWN, player_character.pos_bub() ) ) { - std::vector pts; + std::vector pts; // Check tiles around player character for open air for( const tripoint_bub_ms &p : m.points_in_radius( player_character.pos_bub(), 1 ) ) { if( m.has_flag( ter_furn_flag::TFLAG_NO_FLOOR, p ) ) { - pts.push_back( p .raw() ); + pts.push_back( p ); } } // If we found tiles with open air, prompt player with query on direction they want to climb if( !pts.empty() ) { - const std::optional pnt = point_selection_menu( pts, false ); + const std::optional pnt = point_selection_menu( pts, false ); if( !pnt ) { break; } @@ -2476,7 +2476,7 @@ bool game::do_regular_action( action_id &act, avatar &player_character, case ACTION_EXAMINE_AND_PICKUP: if( mouse_target ) { // Examine including item pickup if ACTION_EXAMINE_AND_PICKUP is used - examine( *mouse_target, act == ACTION_EXAMINE_AND_PICKUP ); + examine( tripoint_bub_ms( *mouse_target ), act == ACTION_EXAMINE_AND_PICKUP ); } else { examine( act == ACTION_EXAMINE_AND_PICKUP ); } @@ -2675,11 +2675,11 @@ bool game::do_regular_action( action_id &act, avatar &player_character, break; case ACTION_DROP: - drop_in_direction( player_character.pos() ); + drop_in_direction( player_character.pos_bub() ); break; case ACTION_DIR_DROP: - if( const std::optional pnt = choose_adjacent( _( "Drop where?" ) ) ) { - if( *pnt != player_character.pos() && in_shell ) { + if( const std::optional pnt = choose_adjacent_bub( _( "Drop where?" ) ) ) { + if( *pnt != player_character.pos_bub() && in_shell ) { add_msg( m_info, _( "You can't drop things to another tile while you're in your shell." ) ); } else { drop_in_direction( *pnt ); @@ -3207,7 +3207,8 @@ bool game::handle_action() return false; } - const std::optional mouse_pos = ctxt.get_coordinates( w_terrain, ter_view_p.xy(), + const std::optional mouse_pos = ctxt.get_coordinates( w_terrain, + ter_view_p.raw().xy(), true ); if( !mouse_pos ) { return false; diff --git a/src/iexamine.cpp b/src/iexamine.cpp index 443f9d4496ba5..35da4af1990f0 100644 --- a/src/iexamine.cpp +++ b/src/iexamine.cpp @@ -1918,7 +1918,7 @@ void iexamine::locked_object( Character &you, const tripoint_bub_ms &examp ) //~ %1$s: terrain/furniture name, %2$s: prying tool name you.add_msg_if_player( _( "You attempt to pry open the %1$s using your %2$s…" ), target_name, best_prying.tname() ); - iuse::crowbar( &you, &best_prying, examp.raw() ); + iuse::crowbar( &you, &best_prying, examp ); } else if( action == act::pick ) { locked_object_pickable( you, examp ); } @@ -1990,7 +1990,7 @@ void iexamine::locked_object_pickable( Character &you, const tripoint_bub_ms &ex const use_function *iuse_fn = it->type->get_use( "PICK_LOCK" ); you.add_msg_if_player( _( "You attempt to pick the lock of %1$s using your %2$s…" ), target_name, it->tname() ); - const ret_val can_use = iuse_fn->can_call( you, *it, examp.raw() ); + const ret_val can_use = iuse_fn->can_call( you, *it, examp ); if( can_use.success() ) { iuse_fn->call( &you, *it, examp ); return; @@ -3438,7 +3438,7 @@ static void add_firestarter( item *it, std::multimap &firestarters, const use_function *usef = it->type->get_use( "firestarter" ); if( usef != nullptr && usef->get_actor_ptr() != nullptr ) { const firestarter_actor *actor = dynamic_cast( usef->get_actor_ptr() ); - if( actor->can_use( you, *it, examp.raw() ).success() ) { + if( actor->can_use( you, *it, examp ).success() ) { firestarters.insert( std::pair( actor->moves_cost_fast, it ) ); } } @@ -3517,9 +3517,9 @@ void iexamine::fireplace( Character &you, const tripoint_bub_ms &examp ) const use_function *usef = it->type->get_use( "firestarter" ); const firestarter_actor *actor = dynamic_cast( usef->get_actor_ptr() ); you.add_msg_if_player( _( "You attempt to start a fire with your %s…" ), it->tname() ); - const ret_val can_use = actor->can_use( you, *it, examp.raw() ); + const ret_val can_use = actor->can_use( you, *it, examp ); if( can_use.success() ) { - const int charges = actor->use( &you, *it, examp.raw() ).value_or( 0 ); + const int charges = actor->use( &you, *it, examp ).value_or( 0 ); you.use_charges( it->typeId(), charges ); return; } else { @@ -5500,7 +5500,7 @@ void iexamine::ledge( Character &you, const tripoint_bub_ms &examp ) // NOTE this menu is merged with the climb down menu, manage keys carefully. cmenu.addentry( ledge_peek_down, true, 'p', _( "Peek down." ) ); - g->climb_down_menu_gen( examp.raw(), cmenu ); + g->climb_down_menu_gen( examp, cmenu ); if( here.has_flag_furn( "EXAMINE_FROM_ABOVE", just_below ) ) { cmenu.addentry( ledge_examine_furniture_below, true, 'e', _( "Reach for the %s below." ), here.furn( just_below ).obj().name() ); @@ -5517,7 +5517,7 @@ void iexamine::ledge( Character &you, const tripoint_bub_ms &examp ) creature_tracker &creatures = get_creature_tracker(); - if( g->climb_down_menu_pick( examp.raw(), cmenu.ret ) ) { + if( g->climb_down_menu_pick( examp, cmenu.ret ) ) { // This branch means the player chose some option generated by the climb menu. return; } @@ -5543,7 +5543,7 @@ void iexamine::ledge( Character &you, const tripoint_bub_ms &examp ) } else { add_msg( m_info, _( "You jump over an obstacle." ) ); you.set_activity_level( BRISK_EXERCISE ); - g->place_player( jump_target.raw() ); + g->place_player( jump_target ); } break; } diff --git a/src/input_context.cpp b/src/input_context.cpp index f932752c1d9d9..b0be192c505f2 100644 --- a/src/input_context.cpp +++ b/src/input_context.cpp @@ -621,6 +621,41 @@ const } } +std::optional input_context::get_direction_rel_omt( const std::string &action ) +const +{ + static const auto noop = static_cast( []( + tripoint_rel_omt p ) { + return p; + } ); + static const auto rotate = static_cast( []( + tripoint_rel_omt p ) { + rotate_direction_cw( p.x(), p.y() ); + return p; + } ); + const auto transform = iso_mode && g->is_tileset_isometric() ? rotate : noop; + + if( action == "UP" ) { + return transform( tripoint_rel_omt::north ); + } else if( action == "DOWN" ) { + return transform( tripoint_rel_omt::south ); + } else if( action == "LEFT" ) { + return transform( tripoint_rel_omt::west ); + } else if( action == "RIGHT" ) { + return transform( tripoint_rel_omt::east ); + } else if( action == "LEFTUP" ) { + return transform( tripoint_rel_omt::north_west ); + } else if( action == "RIGHTUP" ) { + return transform( tripoint_rel_omt::north_east ); + } else if( action == "LEFTDOWN" ) { + return transform( tripoint_rel_omt::south_west ); + } else if( action == "RIGHTDOWN" ) { + return transform( tripoint_rel_omt::south_east ); + } else { + return std::nullopt; + } +} + // Custom set of hotkeys that explicitly don't include the hardcoded // alternative hotkeys, which mustn't be included so that the hardcoded // hotkeys do not show up beside entries within the window. diff --git a/src/input_context.h b/src/input_context.h index 079610ea2fba7..2520b1a47da1d 100644 --- a/src/input_context.h +++ b/src/input_context.h @@ -300,6 +300,7 @@ class input_context // TODO: Get rid of untyped version and change name of the typed one. std::optional get_direction( const std::string &action ) const; std::optional get_direction_rel_ms( const std::string &action ) const; + std::optional get_direction_rel_omt( const std::string &action ) const; /** * Get the coordinates associated with the last mouse click (if any). diff --git a/src/item.cpp b/src/item.cpp index 52ebc3ec8d903..607694cc5cb22 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -3831,6 +3831,28 @@ static void armor_protect_dmg_info( int dmg, std::vector &info ) } } +std::string item::layer_to_string( layer_level data ) +{ + switch( data ) { + case layer_level::PERSONAL: + return _( "Personal aura" ); + case layer_level::SKINTIGHT: + return _( "Close to skin" ); + case layer_level::NORMAL: + return _( "Normal" ); + case layer_level::WAIST: + return _( "Waist" ); + case layer_level::OUTER: + return _( "Outer" ); + case layer_level::BELTED: + return _( "Strapped" ); + case layer_level::AURA: + return _( "Outer aura" ); + default: + return _( "Should never see this" ); + } +} + void item::armor_protection_info( std::vector &info, const iteminfo_query *parts, int /*batch*/, bool /*debug*/, const sub_bodypart_id &sbp ) const { @@ -3846,31 +3868,7 @@ void item::armor_protection_info( std::vector &info, const iteminfo_qu // get the layers this bit of the armor covers if its unique compared to the rest of the armor for( const layer_level &ll : get_layer( sbp ) ) { - switch( ll ) { - case layer_level::PERSONAL: - layering += _( " Personal aura." ); - break; - case layer_level::SKINTIGHT: - layering += _( " Close to skin." ); - break; - case layer_level::NORMAL: - layering += _( " Normal." ); - break; - case layer_level::WAIST: - layering += _( " Waist." ); - break; - case layer_level::OUTER: - layering += _( " Outer." ); - break; - case layer_level::BELTED: - layering += _( " Strapped." ); - break; - case layer_level::AURA: - layering += _( " Outer aura." ); - break; - default: - layering += _( " Should never see this." ); - } + layering += string_format( " %s.", item::layer_to_string( ll ) ); } //~ Limb-specific coverage (%s = name of limb) info.emplace_back( "DESCRIPTION", string_format( _( "Coverage:%s" ), layering ) ); diff --git a/src/item.h b/src/item.h index 4f8a90c68055a..609de1e482bdb 100644 --- a/src/item.h +++ b/src/item.h @@ -546,6 +546,11 @@ class item : public visitable void final_info( std::vector &info, const iteminfo_query *parts, int batch, bool debug ) const; + /** + * @return human readable, translated string. + */ + static std::string layer_to_string( layer_level data ); + /** * Calculate all burning calculations, but don't actually apply them to item. * DO apply them to @ref fire_data argument, though. diff --git a/src/item_action.cpp b/src/item_action.cpp index 35b715077e286..2430206ea09a1 100644 --- a/src/item_action.cpp +++ b/src/item_action.cpp @@ -147,7 +147,7 @@ item_action_map item_action_generator::map_actions_to_items( Character &you, const use_function *func = actual_item->get_use( use ); if( !( func && func->get_actor_ptr() && - func->get_actor_ptr()->can_use( you, *actual_item, you.pos() ).success() ) ) { + func->get_actor_ptr()->can_use( you, *actual_item, you.pos_bub() ).success() ) ) { continue; } @@ -382,7 +382,7 @@ std::string use_function::get_type() const } } -ret_val iuse_actor::can_use( const Character &, const item &, const tripoint & ) const +ret_val iuse_actor::can_use( const Character &, const item &, const tripoint_bub_ms & ) const { return ret_val::make_success(); } diff --git a/src/item_factory.cpp b/src/item_factory.cpp index dab3a3537ddff..6f4c39501c0ee 100644 --- a/src/item_factory.cpp +++ b/src/item_factory.cpp @@ -1664,7 +1664,7 @@ class iuse_function_wrapper : public iuse_actor : iuse_actor( type ), cpp_function( f ) { } ~iuse_function_wrapper() override = default; - std::optional use( Character *p, item &it, const tripoint &pos ) const override { + std::optional use( Character *p, item &it, const tripoint_bub_ms &pos ) const override { return cpp_function( p, &it, pos ); } std::unique_ptr clone() const override { diff --git a/src/item_search.cpp b/src/item_search.cpp index 403495b5f5144..9c65bbfc26a5c 100644 --- a/src/item_search.cpp +++ b/src/item_search.cpp @@ -104,7 +104,7 @@ std::function basic_item_filter( std::string filter ) } } } - return [filter, filtered_bodyparts, filtered_sub_bodyparts]( const item & i ) { + return [filtered_bodyparts, filtered_sub_bodyparts]( const item & i ) { return std::any_of( filtered_bodyparts.begin(), filtered_bodyparts.end(), [&i]( const bodypart_id & bp ) { return i.covers( bp ); @@ -115,6 +115,21 @@ std::function basic_item_filter( std::string filter ) } ); }; } + // covers layer + case 'e': { + std::unordered_set filtered_layers; + for( layer_level layer = layer_level( 0 ); layer != layer_level::NUM_LAYER_LEVELS; ++layer ) { + if( lcmatch( item::layer_to_string( layer ), filter ) ) { + filtered_layers.insert( layer ); + } + } + return [filtered_layers]( const item & i ) { + const std::vector layers = i.get_layer(); + return std::any_of( layers.begin(), layers.end(), [&filtered_layers]( layer_level l ) { + return filtered_layers.count( l ); + } ); + }; + } // by name default: return [filter]( const item & a ) { diff --git a/src/item_tname.cpp b/src/item_tname.cpp index a5a497a15a2da..d9fd8de7c53bd 100644 --- a/src/item_tname.cpp +++ b/src/item_tname.cpp @@ -523,7 +523,7 @@ std::string weapon_mods( item const &it, unsigned int /* quantity */, modtext += _( "pistol " ); } if( it.has_flag( flag_DIAMOND ) ) { - modtext += std::string( pgettext( "Adjective, as in diamond katana", "diamond" ) ) + " "; + modtext += pgettext( "Adjective, as in diamond katana", "diamond " ); } return modtext; } diff --git a/src/itype.cpp b/src/itype.cpp index 96ed079477de5..083cabf280a00 100644 --- a/src/itype.cpp +++ b/src/itype.cpp @@ -184,9 +184,10 @@ const use_function *itype::get_use( const std::string &iuse_name ) const int itype::tick( Character *p, item &it, const tripoint &pos ) const { + const tripoint_bub_ms position{pos}; // TODO: Get rid of this when operation typified int charges_to_use = 0; for( const auto &method : tick_action ) { - charges_to_use += method.second.call( p, it, pos ).value_or( 0 ); + charges_to_use += method.second.call( p, it, position ).value_or( 0 ); } return charges_to_use; @@ -207,6 +208,7 @@ std::optional itype::invoke( Character *p, item &it, const tripoint &pos ) std::optional itype::invoke( Character *p, item &it, const tripoint &pos, const std::string &iuse_name ) const { + const tripoint_bub_ms position{ pos }; // TODO: Get rid of this when operation typified. const use_function *use = get_use( iuse_name ); if( use == nullptr ) { debugmsg( "Tried to invoke %s on a %s, which doesn't have this use_function", @@ -214,7 +216,7 @@ std::optional itype::invoke( Character *p, item &it, const tripoint &pos, return 0; } if( p ) { - const auto ret = use->can_call( *p, it, pos ); + const auto ret = use->can_call( *p, it, position ); if( !ret.success() ) { p->add_msg_if_player( m_info, ret.str() ); @@ -222,7 +224,7 @@ std::optional itype::invoke( Character *p, item &it, const tripoint &pos, } } - return use->call( p, it, pos ); + return use->call( p, it, position ); } std::string gun_type_type::name() const diff --git a/src/iuse.cpp b/src/iuse.cpp index 757bfdd7d4067..5de739c47da5b 100644 --- a/src/iuse.cpp +++ b/src/iuse.cpp @@ -414,28 +414,29 @@ static std::string format_object_pair( const std::pair &pair, static std::string format_object_pair_article( const std::pair &pair ); static std::string format_object_pair_no_article( const std::pair &pair ); -static std::string colorized_field_description_at( const tripoint &point ); -static std::string colorized_trap_name_at( const tripoint &point ); -static std::string colorized_ter_name_flags_at( const tripoint &point, +static std::string colorized_field_description_at( const tripoint_bub_ms &point ); +static std::string colorized_trap_name_at( const tripoint_bub_ms &point ); +static std::string colorized_ter_name_flags_at( const tripoint_bub_ms &point, const std::vector &flags = {}, const std::vector &ter_whitelist = {} ); -static std::string colorized_feature_description_at( const tripoint ¢er_point, bool &item_found, +static std::string colorized_feature_description_at( const tripoint_bub_ms ¢er_point, + bool &item_found, const units::volume &min_visible_volume ); static std::string colorized_item_name( const item &item ); static std::string colorized_item_description( const item &item ); -static item get_top_item_at_point( const tripoint &point, +static item get_top_item_at_point( const tripoint_bub_ms &point, const units::volume &min_visible_volume ); static std::string effects_description_for_creature( Creature *creature, std::string &pose, const std::string &pronoun_gender ); -static object_names_collection enumerate_objects_around_point( const tripoint &point, - int radius, const tripoint &bounds_center_point, int bounds_radius, - const tripoint &camera_pos, const units::volume &min_visible_volume, bool create_figure_desc, - std::unordered_set &ignored_points, +static object_names_collection enumerate_objects_around_point( const tripoint_bub_ms &point, + int radius, const tripoint_bub_ms &bounds_center_point, int bounds_radius, + const tripoint_bub_ms &camera_pos, const units::volume &min_visible_volume, bool create_figure_desc, + std::unordered_set &ignored_points, std::unordered_set &vehicles_recorded ); -static item::extended_photo_def photo_def_for_camera_point( const tripoint &aim_point, - const tripoint &camera_pos, +static item::extended_photo_def photo_def_for_camera_point( const tripoint_bub_ms &aim_point, + const tripoint_bub_ms &camera_pos, std::vector &monster_vec, std::vector &character_vec ); static const std::vector camera_ter_whitelist_flags = { @@ -482,7 +483,7 @@ std::optional iuse::can_smoke( const Character &you ) return std::nullopt; } -std::optional iuse::sewage( Character *p, item *, const tripoint & ) +std::optional iuse::sewage( Character *p, item *, const tripoint_bub_ms & ) { if( !p->query_yn( _( "Are you sure you want to drink… this?" ) ) ) { return std::nullopt; @@ -493,13 +494,13 @@ std::optional iuse::sewage( Character *p, item *, const tripoint & ) return 1; } -std::optional iuse::honeycomb( Character *p, item *, const tripoint & ) +std::optional iuse::honeycomb( Character *p, item *, const tripoint_bub_ms & ) { get_map().spawn_item( p->pos_bub(), itype_wax, 2 ); return 1; } -std::optional iuse::xanax( Character *p, item *it, const tripoint & ) +std::optional iuse::xanax( Character *p, item *it, const tripoint_bub_ms & ) { p->add_msg_if_player( _( "You take some %s." ), it->tname() ); p->add_effect( effect_took_xanax, 90_minutes ); @@ -536,17 +537,17 @@ static int alcohol( Character &p, const item &it, const int strength ) return 1; } -std::optional iuse::alcohol_weak( Character *p, item *it, const tripoint & ) +std::optional iuse::alcohol_weak( Character *p, item *it, const tripoint_bub_ms & ) { return alcohol( *p, *it, 0 ); } -std::optional iuse::alcohol_medium( Character *p, item *it, const tripoint & ) +std::optional iuse::alcohol_medium( Character *p, item *it, const tripoint_bub_ms & ) { return alcohol( *p, *it, 1 ); } -std::optional iuse::alcohol_strong( Character *p, item *it, const tripoint & ) +std::optional iuse::alcohol_strong( Character *p, item *it, const tripoint_bub_ms & ) { return alcohol( *p, *it, 2 ); } @@ -559,7 +560,7 @@ std::optional iuse::alcohol_strong( Character *p, item *it, const tripoint * @param it the item to be smoked. * @return Charges used in item smoked */ -std::optional iuse::smoking( Character *p, item *it, const tripoint & ) +std::optional iuse::smoking( Character *p, item *it, const tripoint_bub_ms & ) { std::optional litcig = can_smoke( *p ); if( litcig.has_value() ) { @@ -613,7 +614,7 @@ std::optional iuse::smoking( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::ecig( Character *p, item *it, const tripoint & ) +std::optional iuse::ecig( Character *p, item *it, const tripoint_bub_ms & ) { if( it->typeId() == itype_ecig ) { p->add_msg_if_player( m_neutral, _( "You take a puff from your electronic cigarette." ) ); @@ -640,7 +641,7 @@ std::optional iuse::ecig( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::antibiotic( Character *p, item *, const tripoint & ) +std::optional iuse::antibiotic( Character *p, item *, const tripoint_bub_ms & ) { p->add_msg_player_or_npc( m_neutral, _( "You take some antibiotics." ), @@ -662,7 +663,7 @@ std::optional iuse::antibiotic( Character *p, item *, const tripoint & ) return 1; } -std::optional iuse::eyedrops( Character *p, item *it, const tripoint & ) +std::optional iuse::eyedrops( Character *p, item *it, const tripoint_bub_ms & ) { if( p->cant_do_underwater() ) { return std::nullopt; @@ -687,7 +688,7 @@ std::optional iuse::eyedrops( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::fungicide( Character *p, item *, const tripoint & ) +std::optional iuse::fungicide( Character *p, item *, const tripoint_bub_ms & ) { if( p->cant_do_underwater() ) { return std::nullopt; @@ -744,7 +745,7 @@ std::optional iuse::fungicide( Character *p, item *, const tripoint & ) return 1; } -std::optional iuse::antifungal( Character *p, item *, const tripoint & ) +std::optional iuse::antifungal( Character *p, item *, const tripoint_bub_ms & ) { if( p->cant_do_underwater() ) { return std::nullopt; @@ -762,7 +763,7 @@ std::optional iuse::antifungal( Character *p, item *, const tripoint & ) return 1; } -std::optional iuse::antiparasitic( Character *p, item *, const tripoint & ) +std::optional iuse::antiparasitic( Character *p, item *, const tripoint_bub_ms & ) { if( p->cant_do_underwater() ) { return std::nullopt; @@ -811,7 +812,7 @@ std::optional iuse::antiparasitic( Character *p, item *, const tripoint & ) return 1; } -std::optional iuse::anticonvulsant( Character *p, item *, const tripoint & ) +std::optional iuse::anticonvulsant( Character *p, item *, const tripoint_bub_ms & ) { p->add_msg_if_player( _( "You take some anticonvulsant medication." ) ); /** @EFFECT_STR reduces duration of anticonvulsant medication */ @@ -832,7 +833,7 @@ std::optional iuse::anticonvulsant( Character *p, item *, const tripoint & return 1; } -std::optional iuse::weed_cake( Character *p, item *, const tripoint & ) +std::optional iuse::weed_cake( Character *p, item *, const tripoint_bub_ms & ) { p->add_msg_if_player( _( "You start scarfing down the delicious cake. It tastes a little funny, though…" ) ); @@ -856,7 +857,7 @@ std::optional iuse::weed_cake( Character *p, item *, const tripoint & ) return 1; } -std::optional iuse::coke( Character *p, item *, const tripoint & ) +std::optional iuse::coke( Character *p, item *, const tripoint_bub_ms & ) { p->add_msg_if_player( _( "You snort a bump of coke." ) ); /** @EFFECT_STR reduces duration of coke */ @@ -872,7 +873,7 @@ std::optional iuse::coke( Character *p, item *, const tripoint & ) return 1; } -std::optional iuse::meth( Character *p, item *, const tripoint & ) +std::optional iuse::meth( Character *p, item *, const tripoint_bub_ms & ) { /** @EFFECT_STR reduces duration of meth */ time_duration duration = 1_minutes * ( 60 - p->str_cur ); @@ -910,7 +911,7 @@ std::optional iuse::meth( Character *p, item *, const tripoint & ) return 1; } -std::optional iuse::flu_vaccine( Character *p, item *it, const tripoint & ) +std::optional iuse::flu_vaccine( Character *p, item *it, const tripoint_bub_ms & ) { p->add_msg_if_player( _( "You inject the vaccine." ) ); time_point expiration_date = it->birthday() + 24_weeks; @@ -929,7 +930,7 @@ std::optional iuse::flu_vaccine( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::poison( Character *p, item *it, const tripoint & ) +std::optional iuse::poison( Character *p, item *it, const tripoint_bub_ms & ) { if( p->has_trait( trait_EATDEAD ) ) { return 1; @@ -951,7 +952,7 @@ std::optional iuse::poison( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::meditate( Character *p, item *it, const tripoint & ) +std::optional iuse::meditate( Character *p, item *it, const tripoint_bub_ms & ) { if( !p ) { debugmsg( "%s called action meditate that requires character but no character is present", @@ -970,7 +971,7 @@ std::optional iuse::meditate( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::thorazine( Character *p, item *, const tripoint & ) +std::optional iuse::thorazine( Character *p, item *, const tripoint_bub_ms & ) { if( p->has_effect( effect_took_thorazine ) ) { p->remove_effect( effect_took_thorazine ); @@ -995,7 +996,7 @@ std::optional iuse::thorazine( Character *p, item *, const tripoint & ) return 1; } -std::optional iuse::prozac( Character *p, item *, const tripoint & ) +std::optional iuse::prozac( Character *p, item *, const tripoint_bub_ms & ) { if( !p->has_effect( effect_took_prozac ) ) { p->add_effect( effect_took_prozac, 12_hours ); @@ -1010,7 +1011,7 @@ std::optional iuse::prozac( Character *p, item *, const tripoint & ) return 1; } -std::optional iuse::datura( Character *p, item *it, const tripoint & ) +std::optional iuse::datura( Character *p, item *it, const tripoint_bub_ms & ) { if( p->is_npc() ) { return std::nullopt; @@ -1024,14 +1025,14 @@ std::optional iuse::datura( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::flumed( Character *p, item *it, const tripoint & ) +std::optional iuse::flumed( Character *p, item *it, const tripoint_bub_ms & ) { p->add_effect( effect_took_flumed, 10_hours ); p->add_msg_if_player( _( "You take some %s." ), it->tname() ); return 1; } -std::optional iuse::flusleep( Character *p, item *it, const tripoint & ) +std::optional iuse::flusleep( Character *p, item *it, const tripoint_bub_ms & ) { p->add_effect( effect_took_flumed, 12_hours ); p->mod_sleepiness( 30 ); @@ -1040,7 +1041,7 @@ std::optional iuse::flusleep( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::inhaler( Character *p, item *, const tripoint & ) +std::optional iuse::inhaler( Character *p, item *, const tripoint_bub_ms & ) { p->add_msg_player_or_npc( m_neutral, _( "You take a puff from your inhaler." ), _( " takes a puff from their inhaler." ) ); @@ -1055,7 +1056,7 @@ std::optional iuse::inhaler( Character *p, item *, const tripoint & ) return 1; } -std::optional iuse::oxygen_bottle( Character *p, item *it, const tripoint & ) +std::optional iuse::oxygen_bottle( Character *p, item *it, const tripoint_bub_ms & ) { p->mod_moves( -to_moves( 10_seconds ) ); p->add_msg_player_or_npc( m_neutral, string_format( _( "You breathe deeply from the %s." ), @@ -1076,7 +1077,7 @@ std::optional iuse::oxygen_bottle( Character *p, item *it, const tripoint & return 1; } -std::optional iuse::blech( Character *p, item *it, const tripoint & ) +std::optional iuse::blech( Character *p, item *it, const tripoint_bub_ms & ) { // TODO: Add more effects? if( it->made_of( phase_id::LIQUID ) ) { @@ -1114,7 +1115,7 @@ std::optional iuse::blech( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::blech_because_unclean( Character *p, item *it, const tripoint & ) +std::optional iuse::blech_because_unclean( Character *p, item *it, const tripoint_bub_ms & ) { if( !p->is_npc() ) { if( test_mode ) { @@ -1135,7 +1136,7 @@ std::optional iuse::blech_because_unclean( Character *p, item *it, const tr return 1; } -std::optional iuse::plantblech( Character *p, item *it, const tripoint &pos ) +std::optional iuse::plantblech( Character *p, item *it, const tripoint_bub_ms &pos ) { if( p->has_trait( trait_THRESH_PLANT ) ) { double multiplier = -1; @@ -1158,7 +1159,7 @@ std::optional iuse::plantblech( Character *p, item *it, const tripoint &pos } } -std::optional iuse::chew( Character *p, item *it, const tripoint & ) +std::optional iuse::chew( Character *p, item *it, const tripoint_bub_ms & ) { // TODO: Add more effects? p->add_msg_if_player( _( "You chew your %s." ), it->tname() ); @@ -1191,7 +1192,7 @@ static void do_purify( Character &p ) } } -std::optional iuse::purify_smart( Character *p, item *it, const tripoint & ) +std::optional iuse::purify_smart( Character *p, item *it, const tripoint_bub_ms & ) { std::vector valid; // Which flags the player has std::vector valid_names; // Which flags the player has @@ -1410,7 +1411,7 @@ static bool marloss_prevented( const Character &p ) return false; } -std::optional iuse::marloss( Character *p, item *it, const tripoint & ) +std::optional iuse::marloss( Character *p, item *it, const tripoint_bub_ms & ) { if( marloss_prevented( *p ) ) { return std::nullopt; @@ -1422,7 +1423,7 @@ std::optional iuse::marloss( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::marloss_seed( Character *p, item *it, const tripoint & ) +std::optional iuse::marloss_seed( Character *p, item *it, const tripoint_bub_ms & ) { if( !query_yn( _( "Are you sure you want to eat the %s? You could plant it in a mound of dirt." ), colorize( it->tname(), it->color_in_inventory() ) ) ) { @@ -1439,7 +1440,7 @@ std::optional iuse::marloss_seed( Character *p, item *it, const tripoint & return 1; } -std::optional iuse::marloss_gel( Character *p, item *it, const tripoint & ) +std::optional iuse::marloss_gel( Character *p, item *it, const tripoint_bub_ms & ) { if( marloss_prevented( *p ) ) { return std::nullopt; @@ -1451,7 +1452,7 @@ std::optional iuse::marloss_gel( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::mycus( Character *p, item *, const tripoint & ) +std::optional iuse::mycus( Character *p, item *, const tripoint_bub_ms & ) { if( p->is_npc() ) { return 1; @@ -1552,16 +1553,16 @@ std::optional iuse::mycus( Character *p, item *, const tripoint & ) return 1; } -std::optional iuse::petfood( Character *p, item *it, const tripoint & ) +std::optional iuse::petfood( Character *p, item *it, const tripoint_bub_ms & ) { if( !it->is_comestible() ) { p->add_msg_if_player( _( "You doubt someone would want to eat %1$s." ), it->tname() ); return std::nullopt; } - const std::optional pnt = choose_adjacent( string_format( - _( "Tame which animal with %s?" ), - it->tname() ) ); + const std::optional pnt = choose_adjacent_bub( string_format( + _( "Tame which animal with %s?" ), + it->tname() ) ); if( !pnt ) { return std::nullopt; } @@ -1642,7 +1643,7 @@ std::optional iuse::petfood( Character *p, item *it, const tripoint & ) return std::nullopt; } -std::optional iuse::radio_mod( Character *p, item *, const tripoint & ) +std::optional iuse::radio_mod( Character *p, item *, const tripoint_bub_ms & ) { if( p->is_npc() ) { // Now THAT would be kinda cruel @@ -1703,7 +1704,7 @@ std::optional iuse::radio_mod( Character *p, item *, const tripoint & ) return 1; } -std::optional iuse::remove_all_mods( Character *p, item *, const tripoint & ) +std::optional iuse::remove_all_mods( Character *p, item *, const tripoint_bub_ms & ) { if( !p ) { return std::nullopt; @@ -1739,13 +1740,12 @@ std::optional iuse::remove_all_mods( Character *p, item *, const tripoint & return 0; } -static bool good_fishing_spot( const tripoint &pos, Character *p ) +static bool good_fishing_spot( const tripoint_bub_ms &pos, Character *p ) { - std::unordered_set fishable_locations = g->get_fishable_locations( 60, pos ); + std::unordered_set fishable_locations = g->get_fishable_locations( 60, pos.raw() ); std::vector fishables = g->get_fishable_monsters( fishable_locations ); map &here = get_map(); // isolated little body of water with no definite fish population - // TODO: fix point types const oter_id &cur_omt = overmap_buffer.ter( coords::project_to( here.getglobal( pos ) ) ); std::string om_id = cur_omt.id().c_str(); @@ -1761,7 +1761,7 @@ static bool good_fishing_spot( const tripoint &pos, Character *p ) return true; } -std::optional iuse::fishing_rod( Character *p, item *it, const tripoint & ) +std::optional iuse::fishing_rod( Character *p, item *it, const tripoint_bub_ms & ) { if( p->is_npc() ) { // Long actions - NPCs don't like those yet. @@ -1773,7 +1773,7 @@ std::optional iuse::fishing_rod( Character *p, item *it, const tripoint & ) map &here = get_map(); std::optional found; for( const tripoint_bub_ms &pnt : here.points_in_radius( p->pos_bub(), 1 ) ) { - if( here.has_flag( ter_furn_flag::TFLAG_FISHABLE, pnt ) && good_fishing_spot( pnt.raw(), p ) ) { + if( here.has_flag( ter_furn_flag::TFLAG_FISHABLE, pnt ) && good_fishing_spot( pnt, p ) ) { found = pnt; break; } @@ -1789,7 +1789,7 @@ std::optional iuse::fishing_rod( Character *p, item *it, const tripoint & ) return 0; } -std::optional iuse::fish_trap( Character *p, item *it, const tripoint & ) +std::optional iuse::fish_trap( Character *p, item *it, const tripoint_bub_ms & ) { map &here = get_map(); // Handle deploying fish trap. @@ -1810,17 +1810,17 @@ std::optional iuse::fish_trap( Character *p, item *it, const tripoint & ) return std::nullopt; } - const std::optional pnt_ = choose_adjacent( _( "Put fish trap where?" ) ); + const std::optional pnt_ = choose_adjacent_bub( _( "Put fish trap where?" ) ); if( !pnt_ ) { return std::nullopt; } - const tripoint_bub_ms pnt = tripoint_bub_ms( *pnt_ ); + const tripoint_bub_ms pnt = *pnt_; if( !here.has_flag( ter_furn_flag::TFLAG_FISHABLE, pnt ) ) { p->add_msg_if_player( m_info, _( "You can't fish there!" ) ); return std::nullopt; } - if( !good_fishing_spot( pnt.raw(), p ) ) { + if( !good_fishing_spot( pnt, p ) ) { return std::nullopt; } it->active = true; @@ -1834,9 +1834,8 @@ std::optional iuse::fish_trap( Character *p, item *it, const tripoint & ) } -std::optional iuse::fish_trap_tick( Character *p, item *it, const tripoint &pos ) +std::optional iuse::fish_trap_tick( Character *p, item *it, const tripoint_bub_ms &pos ) { - const tripoint_bub_ms position{ pos }; // TODO: Get rid of this when operation typified. map &here = get_map(); // Handle processing fish trap over time. if( it->ammo_remaining() == 0 ) { @@ -1846,7 +1845,7 @@ std::optional iuse::fish_trap_tick( Character *p, item *it, const tripoint if( it->age() > 3_hours ) { it->active = false; - if( !here.has_flag( ter_furn_flag::TFLAG_FISHABLE, position ) ) { + if( !here.has_flag( ter_furn_flag::TFLAG_FISHABLE, pos ) ) { return 0; } @@ -1878,14 +1877,14 @@ std::optional iuse::fish_trap_tick( Character *p, item *it, const tripoint } if( fishes == 0 ) { - it->ammo_consume( it->ammo_remaining(), position, nullptr ); + it->ammo_consume( it->ammo_remaining(), pos, nullptr ); player.practice( skill_survival, rng( 5, 15 ) ); return 0; } //get the fishables around the trap's spot - std::unordered_set fishable_locations = g->get_fishable_locations( 60, position.raw() ); + std::unordered_set fishable_locations = g->get_fishable_locations( 60, pos.raw() ); std::vector fishables = g->get_fishable_monsters( fishable_locations ); for( int i = 0; i < fishes; i++ ) { player.practice( skill_survival, rng( 3, 10 ) ); @@ -1894,9 +1893,9 @@ std::optional iuse::fish_trap_tick( Character *p, item *it, const tripoint // reduce the abstract fish_population marker of that fish chosen_fish->fish_population -= 1; if( chosen_fish->fish_population <= 0 ) { - g->catch_a_monster( chosen_fish, position.raw(), p, 300_hours ); //catch the fish! + g->catch_a_monster( chosen_fish, pos.raw(), p, 300_hours ); //catch the fish! } else { - here.add_item_or_charges( position, item::make_corpse( chosen_fish->type->id, + here.add_item_or_charges( pos, item::make_corpse( chosen_fish->type->id, calendar::turn + rng( 0_turns, 3_hours ) ) ); } @@ -1913,29 +1912,29 @@ std::optional iuse::fish_trap_tick( Character *p, item *it, const tripoint //but it's not as comfortable as if you just put fishes in the same tile with the trap. //Also: corpses and comestibles do not rot in containers like this, but on the ground they will rot. //we don't know when it was caught so use a random turn - here.add_item_or_charges( position, item::make_corpse( fish_mon, it->birthday() + rng( 0_turns, + here.add_item_or_charges( pos, item::make_corpse( fish_mon, it->birthday() + rng( 0_turns, 3_hours ) ) ); break; //this can happen only once } } } - it->ammo_consume( bait_consumed, position, nullptr ); + it->ammo_consume( bait_consumed, pos, nullptr ); } return 0; } -std::optional iuse::extinguisher( Character *p, item *it, const tripoint & ) +std::optional iuse::extinguisher( Character *p, item *it, const tripoint_bub_ms & ) { if( !it->ammo_sufficient( p ) ) { return std::nullopt; } // If anyone other than the player wants to use one of these, // they're going to need to figure out how to aim it. - const std::optional dest_ = choose_adjacent( _( "Spray where?" ) ); + const std::optional dest_ = choose_adjacent_bub( _( "Spray where?" ) ); if( !dest_ ) { return std::nullopt; } - tripoint_bub_ms dest = tripoint_bub_ms( *dest_ ); + tripoint_bub_ms dest = *dest_; p->mod_moves( -to_moves( 2_seconds ) ); @@ -2301,18 +2300,18 @@ class exosuit_interact } }; -std::optional iuse::mace( Character *p, item *it, const tripoint & ) +std::optional iuse::mace( Character *p, item *it, const tripoint_bub_ms & ) { if( !it->ammo_sufficient( p ) ) { return std::nullopt; } // If anyone other than the player wants to use one of these, // they're going to need to figure out how to aim it. - const std::optional dest_ = choose_adjacent( _( "Spray where?" ) ); + const std::optional dest_ = choose_adjacent_bub( _( "Spray where?" ) ); if( !dest_ ) { return std::nullopt; } - tripoint_bub_ms dest = tripoint_bub_ms( *dest_ ); + tripoint_bub_ms dest = *dest_; p->mod_moves( -to_moves( 2_seconds ) ); @@ -2345,7 +2344,7 @@ std::optional iuse::mace( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::manage_exosuit( Character *p, item *it, const tripoint & ) +std::optional iuse::manage_exosuit( Character *p, item *it, const tripoint_bub_ms & ) { if( !p->is_avatar() ) { return std::nullopt; @@ -2358,7 +2357,7 @@ std::optional iuse::manage_exosuit( Character *p, item *it, const tripoint return 0; } -std::optional iuse::unpack_item( Character *p, item *it, const tripoint & ) +std::optional iuse::unpack_item( Character *p, item *it, const tripoint_bub_ms & ) { if( p->cant_do_underwater() ) { return std::nullopt; @@ -2372,7 +2371,7 @@ std::optional iuse::unpack_item( Character *p, item *it, const tripoint & ) return 0; } -std::optional iuse::pack_cbm( Character *p, item *it, const tripoint & ) +std::optional iuse::pack_cbm( Character *p, item *it, const tripoint_bub_ms & ) { item_location bionic = g->inv_map_splice( []( const item & e ) { return e.is_bionic() && e.has_flag( flag_NO_PACKED ); @@ -2403,7 +2402,7 @@ std::optional iuse::pack_cbm( Character *p, item *it, const tripoint & ) return 0; } -std::optional iuse::pack_item( Character *p, item *it, const tripoint & ) +std::optional iuse::pack_item( Character *p, item *it, const tripoint_bub_ms & ) { if( !p ) { debugmsg( "%s called action pack_item that requires character but no character is present", @@ -2433,7 +2432,7 @@ std::optional iuse::pack_item( Character *p, item *it, const tripoint & ) return 0; } -std::optional iuse::water_purifier( Character *p, item *it, const tripoint & ) +std::optional iuse::water_purifier( Character *p, item *it, const tripoint_bub_ms & ) { if( p->cant_do_mounted() ) { return std::nullopt; @@ -2523,7 +2522,7 @@ std::optional iuse::purify_water( Character *p, item *purifier, item_locati return std::nullopt; } -std::optional iuse::water_tablets( Character *p, item *it, const tripoint & ) +std::optional iuse::water_tablets( Character *p, item *it, const tripoint_bub_ms & ) { if( p->cant_do_mounted() ) { return std::nullopt; @@ -2544,7 +2543,7 @@ std::optional iuse::water_tablets( Character *p, item *it, const tripoint & return purify_water( p, it, obj ); } -std::optional iuse::radio_off( Character *p, item *it, const tripoint & ) +std::optional iuse::radio_off( Character *p, item *it, const tripoint_bub_ms & ) { if( !it->ammo_sufficient( p ) ) { p->add_msg_if_player( _( "It's dead." ) ); @@ -2555,7 +2554,7 @@ std::optional iuse::radio_off( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::directional_antenna( Character *p, item *, const tripoint & ) +std::optional iuse::directional_antenna( Character *p, item *, const tripoint_bub_ms & ) { // Find out if we have an active radio auto radios = p->cache_get_items_with( itype_radio_on ); @@ -2610,7 +2609,7 @@ static int radio_static_chance( const radio_tower_reference &tref ) ( max_strength - RADIO_MIN_STRENGTH ) ); } -std::optional iuse::radio_tick( Character *, item *it, const tripoint &pos ) +std::optional iuse::radio_tick( Character *, item *it, const tripoint_bub_ms &pos ) { std::string message = _( "Radio: Kssssssssssssh." ); const radio_tower_reference tref = overmap_buffer.find_radio_station( it->frequency ); @@ -2664,7 +2663,7 @@ std::optional iuse::radio_tick( Character *, item *it, const tripoint &pos return 1; } -std::optional iuse::radio_on( Character *, item *it, const tripoint & ) +std::optional iuse::radio_on( Character *, item *it, const tripoint_bub_ms & ) { const auto tower_desc = []( const int noise ) { @@ -2713,14 +2712,14 @@ std::optional iuse::radio_on( Character *, item *it, const tripoint & ) return 1; } -std::optional iuse::noise_emitter_on( Character *, item *, const tripoint &pos ) +std::optional iuse::noise_emitter_on( Character *, item *, const tripoint_bub_ms &pos ) { sounds::sound( pos, 30, sounds::sound_t::alarm, _( "KXSHHHHRRCRKLKKK!" ), true, "tool", "noise_emitter" ); return 1; } -std::optional iuse::emf_passive_on( Character *, item *, const tripoint &pos ) +std::optional iuse::emf_passive_on( Character *, item *, const tripoint_bub_ms &pos ) { // need to calculate distance to closest electrical thing @@ -2738,7 +2737,7 @@ std::optional iuse::emf_passive_on( Character *, item *, const tripoint &po return 1; } - for( const tripoint &loc : closest_points_first( pos, max ) ) { + for( const tripoint_bub_ms &loc : closest_points_first( pos, max ) ) { const Creature *critter = creatures.creature_at( loc ); // if the creature exists and is either a robot or electric @@ -2774,7 +2773,7 @@ std::optional iuse::emf_passive_on( Character *, item *, const tripoint &po return 1; } -std::optional iuse::ma_manual( Character *p, item *it, const tripoint & ) +std::optional iuse::ma_manual( Character *p, item *it, const tripoint_bub_ms & ) { // [CR] - should NPCs just be allowed to learn this stuff? Just like that? @@ -2791,12 +2790,12 @@ std::optional iuse::ma_manual( Character *p, item *it, const tripoint & ) } // TODO: Why does this exist? -std::optional iuse::crowbar_weak( Character *p, item *it, const tripoint &pos ) +std::optional iuse::crowbar_weak( Character *p, item *it, const tripoint_bub_ms &pos ) { return iuse::crowbar( p, it, pos ); } -std::optional iuse::crowbar( Character *p, item *it, const tripoint &pos ) +std::optional iuse::crowbar( Character *p, item *it, const tripoint_bub_ms &pos ) { if( p->cant_do_mounted() ) { return std::nullopt; @@ -2815,8 +2814,8 @@ std::optional iuse::crowbar( Character *p, item *it, const tripoint &pos ) return false; }; - const std::optional pnt_ = ( pos != p->pos_bub().raw() ) ? tripoint_bub_ms( - pos ) : choose_adjacent_highlight( + const std::optional pnt_ = ( pos != p->pos_bub() ) ? + pos : choose_adjacent_highlight( _( "Pry where?" ), _( "There is nothing to pry nearby." ), f, false ); if( !pnt_ ) { return std::nullopt; @@ -2872,7 +2871,7 @@ std::optional iuse::crowbar( Character *p, item *it, const tripoint &pos ) return std::nullopt; } -std::optional iuse::makemound( Character *p, item *it, const tripoint & ) +std::optional iuse::makemound( Character *p, item *it, const tripoint_bub_ms & ) { if( !p ) { debugmsg( "%s called action makemound that requires character but no character is present", @@ -2882,13 +2881,13 @@ std::optional iuse::makemound( Character *p, item *it, const tripoint & ) if( p->cant_do_mounted() ) { return std::nullopt; } - const std::optional pnt_ = choose_adjacent( _( "Till soil where?" ) ); + const std::optional pnt_ = choose_adjacent_bub( _( "Till soil where?" ) ); if( !pnt_ ) { return std::nullopt; } - const tripoint pnt = *pnt_; + const tripoint_bub_ms pnt = *pnt_; - if( pnt == p->pos() ) { + if( pnt == p->pos_bub() ) { p->add_msg_if_player( m_info, _( "You think about jumping on a shovel, but then change your mind." ) ); return std::nullopt; @@ -2907,7 +2906,7 @@ std::optional iuse::makemound( Character *p, item *it, const tripoint & ) } } -std::optional iuse::dig( Character *p, item *it, const tripoint & ) +std::optional iuse::dig( Character *p, item *it, const tripoint_bub_ms & ) { if( !p ) { debugmsg( "%s called action dig that requires character but no character is present", @@ -2931,7 +2930,7 @@ std::optional iuse::dig( Character *p, item *it, const tripoint & ) return 0; } -std::optional iuse::dig_channel( Character *p, item *it, const tripoint & ) +std::optional iuse::dig_channel( Character *p, item *it, const tripoint_bub_ms & ) { if( !p ) { debugmsg( "%s called action dig_channel that requires character but no character is present", @@ -2951,7 +2950,7 @@ std::optional iuse::dig_channel( Character *p, item *it, const tripoint & ) return 0; } -std::optional iuse::fill_pit( Character *p, item *it, const tripoint & ) +std::optional iuse::fill_pit( Character *p, item *it, const tripoint_bub_ms & ) { if( !p ) { debugmsg( "%s called action fill_pit that requires character but no character is present", @@ -2971,7 +2970,7 @@ std::optional iuse::fill_pit( Character *p, item *it, const tripoint & ) return 0; } -std::optional iuse::clear_rubble( Character *p, item *it, const tripoint & ) +std::optional iuse::clear_rubble( Character *p, item *it, const tripoint_bub_ms & ) { if( !p ) { debugmsg( "%s called action clear_rubble that requires character but no character is present", @@ -2991,13 +2990,13 @@ std::optional iuse::clear_rubble( Character *p, item *it, const tripoint & return 0; } -std::optional iuse::siphon( Character *p, item *, const tripoint & ) +std::optional iuse::siphon( Character *p, item *, const tripoint_bub_ms & ) { if( p->cant_do_mounted() ) { return std::nullopt; } map &here = get_map(); - const std::function f = [&here]( const tripoint & pnt ) { + const std::function f = [&here]( const tripoint_bub_ms & pnt ) { const optional_vpart_position vp = here.veh_at( pnt ); return !!vp; }; @@ -3022,8 +3021,8 @@ std::optional iuse::siphon( Character *p, item *, const tripoint & ) } } if( found_more_than_one ) { - std::optional pnt_ = choose_adjacent_highlight( - _( "Siphon from where?" ), _( "There is nothing to siphon from nearby." ), f, false ); + std::optional pnt_ = choose_adjacent_highlight( + _( "Siphon from where?" ), _( "There is nothing to siphon from nearby." ), f, false ); if( !pnt_ ) { return std::nullopt; } @@ -3041,7 +3040,7 @@ std::optional iuse::siphon( Character *p, item *, const tripoint & ) return 1; } -std::optional iuse::change_eyes( Character *p, item *, const tripoint & ) +std::optional iuse::change_eyes( Character *p, item *, const tripoint_bub_ms & ) { if( p->is_avatar() ) { p->customize_appearance( customize_appearance_choice::EYES ); @@ -3049,7 +3048,7 @@ std::optional iuse::change_eyes( Character *p, item *, const tripoint & ) return std::nullopt; } -std::optional iuse::change_skin( Character *p, item *, const tripoint & ) +std::optional iuse::change_skin( Character *p, item *, const tripoint_bub_ms & ) { if( p->is_avatar() ) { p->customize_appearance( customize_appearance_choice::SKIN ); @@ -3057,7 +3056,7 @@ std::optional iuse::change_skin( Character *p, item *, const tripoint & ) return std::nullopt; } -static std::optional dig_tool( Character *p, item *it, const tripoint &pos, +static std::optional dig_tool( Character *p, item *it, const tripoint_bub_ms &pos, const activity_id activity, const std::string &prompt, const std::string &fail, const std::string &success, int extra_moves = 0 ) @@ -3075,12 +3074,12 @@ static std::optional dig_tool( Character *p, item *it, const tripoint &pos, } tripoint_bub_ms pnt( pos ); - if( pos == p->pos_bub().raw() ) { - const std::optional pnt_ = choose_adjacent( prompt ); + if( pos == p->pos_bub() ) { + const std::optional pnt_ = choose_adjacent_bub( prompt ); if( !pnt_ ) { return std::nullopt; } - pnt = tripoint_bub_ms( *pnt_ ); + pnt = *pnt_; } map &here = get_map(); @@ -3129,7 +3128,7 @@ static std::optional dig_tool( Character *p, item *it, const tripoint &pos, return 0; // handled when the activity finishes } -std::optional iuse::jackhammer( Character *p, item *it, const tripoint &pos ) +std::optional iuse::jackhammer( Character *p, item *it, const tripoint_bub_ms &pos ) { // use has_enough_charges to check for UPS availability // p is assumed to exist for iuse cases @@ -3143,7 +3142,7 @@ std::optional iuse::jackhammer( Character *p, item *it, const tripoint &pos } -std::optional iuse::pick_lock( Character *p, item *it, const tripoint &pos ) +std::optional iuse::pick_lock( Character *p, item *it, const tripoint_bub_ms &pos ) { if( p->is_npc() ) { return std::nullopt; @@ -3152,10 +3151,10 @@ std::optional iuse::pick_lock( Character *p, item *it, const tripoint &pos std::optional target; // Prompt for a target lock to pick, or use the given tripoint - if( pos == you.pos() ) { + if( pos == you.pos_bub() ) { target = lockpick_activity_actor::select_location( you ); } else { - target = tripoint_bub_ms( pos ); + target = pos; } if( !target.has_value() ) { return std::nullopt; @@ -3190,7 +3189,7 @@ std::optional iuse::pick_lock( Character *p, item *it, const tripoint &pos return 1; } -std::optional iuse::pickaxe( Character *p, item *it, const tripoint &pos ) +std::optional iuse::pickaxe( Character *p, item *it, const tripoint_bub_ms &pos ) { if( p->is_npc() ) { // Long action @@ -3205,7 +3204,7 @@ std::optional iuse::pickaxe( Character *p, item *it, const tripoint &pos ) } -std::optional iuse::geiger( Character *p, item *it, const tripoint & ) +std::optional iuse::geiger( Character *p, item *it, const tripoint_bub_ms & ) { int ch = uilist( _( "Geiger counter:" ), { _( "Scan yourself or other person" ), _( "Scan the ground" ), _( "Turn continuous scan on" ) @@ -3213,17 +3212,17 @@ std::optional iuse::geiger( Character *p, item *it, const tripoint & ) creature_tracker &creatures = get_creature_tracker(); switch( ch ) { case 0: { - const std::function f = [&]( const tripoint & pnt ) { + const std::function f = [&]( const tripoint_bub_ms & pnt ) { return creatures.creature_at( pnt ) != nullptr; }; - const std::optional pnt_ = choose_adjacent_highlight( _( "Scan whom?" ), - _( "There is no one to scan nearby." ), f, false ); + const std::optional pnt_ = choose_adjacent_highlight( _( "Scan whom?" ), + _( "There is no one to scan nearby." ), f, false ); if( !pnt_ ) { return std::nullopt; } - const tripoint &pnt = *pnt_; - if( pnt == p->pos() ) { + const tripoint_bub_ms &pnt = *pnt_; + if( pnt == p->pos_bub() ) { p->add_msg_if_player( m_info, _( "Your radiation level: %d mSv (%d mSv from items)" ), p->get_rad(), static_cast( p->get_leak_level() ) ); break; @@ -3252,7 +3251,7 @@ std::optional iuse::geiger( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::geiger_active( Character *, item *, const tripoint &pos ) +std::optional iuse::geiger_active( Character *, item *, const tripoint_bub_ms &pos ) { const int rads = get_map().get_radiation( pos ); if( rads == 0 ) { @@ -3264,7 +3263,7 @@ std::optional iuse::geiger_active( Character *, item *, const tripoint &pos rads > 25 ? _( "geiger_medium" ) : _( "geiger_low" ); sounds::sound( pos, 6, sounds::sound_t::alarm, description, true, "tool", sound_var ); - if( !get_avatar().can_hear( pos, 6 ) ) { + if( !get_avatar().can_hear( pos.raw(), 6 ) ) { // can not hear it, but may have alarmed other creatures return 1; } @@ -3286,7 +3285,7 @@ std::optional iuse::geiger_active( Character *, item *, const tripoint &pos return 1; } -std::optional iuse::teleport( Character *p, item *it, const tripoint & ) +std::optional iuse::teleport( Character *p, item *it, const tripoint_bub_ms & ) { if( p->is_npc() ) { // That would be evil @@ -3303,7 +3302,7 @@ std::optional iuse::teleport( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::can_goo( Character *p, item *it, const tripoint & ) +std::optional iuse::can_goo( Character *p, item *it, const tripoint_bub_ms & ) { it->convert( itype_canister_empty ); int tries = 0; @@ -3353,9 +3352,9 @@ std::optional iuse::can_goo( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::granade_act( Character *, item *it, const tripoint &pos ) +std::optional iuse::granade_act( Character *, item *it, const tripoint_bub_ms &pos ) { - if( pos.x == -999 || pos.y == -999 ) { + if( pos.x() == -999 || pos.y() == -999 ) { return std::nullopt; } map &here = get_map(); @@ -3373,7 +3372,7 @@ std::optional iuse::granade_act( Character *, item *it, const tripoint &pos sounds::sound( pos, 100, sounds::sound_t::electronic_speech, _( "BUGFIXES!" ), true, "speech", it->typeId().str() ); explosion_handler::draw_explosion( pos, explosion_radius, c_light_cyan ); - for( const tripoint &dest : here.points_in_radius( pos, explosion_radius ) ) { + for( const tripoint_bub_ms &dest : here.points_in_radius( pos, explosion_radius ) ) { monster *const mon = creatures.creature_at( dest, true ); if( mon && ( mon->type->in_species( species_INSECT ) || mon->is_hallucination() ) ) { mon->die_in_explosion( nullptr ); @@ -3385,7 +3384,7 @@ std::optional iuse::granade_act( Character *, item *it, const tripoint &pos sounds::sound( pos, 100, sounds::sound_t::electronic_speech, _( "BUFFS!" ), true, "speech", it->typeId().str() ); explosion_handler::draw_explosion( pos, explosion_radius, c_green ); - for( const tripoint &dest : here.points_in_radius( pos, explosion_radius ) ) { + for( const tripoint_bub_ms &dest : here.points_in_radius( pos, explosion_radius ) ) { if( monster *const mon_ptr = creatures.creature_at( dest ) ) { monster &critter = *mon_ptr; critter.set_speed_base( @@ -3400,7 +3399,7 @@ std::optional iuse::granade_act( Character *, item *it, const tripoint &pos buff_stat( person->int_max, rng( 0, person->int_max / 2 ) ); /** @EFFECT_PER_MAX increases possible granade per buff for NPCs */ buff_stat( person->per_max, rng( 0, person->per_max / 2 ) ); - } else if( player_character.pos() == dest ) { + } else if( player_character.pos_bub() == dest ) { /** @EFFECT_STR_MAX increases possible granade str buff */ buff_stat( player_character.str_max, rng( 0, player_character.str_max / 2 ) ); /** @EFFECT_DEX_MAX increases possible granade dex buff */ @@ -3427,7 +3426,7 @@ std::optional iuse::granade_act( Character *, item *it, const tripoint &pos sounds::sound( pos, 100, sounds::sound_t::electronic_speech, _( "NERFS!" ), true, "speech", it->typeId().str() ); explosion_handler::draw_explosion( pos, explosion_radius, c_red ); - for( const tripoint &dest : here.points_in_radius( pos, explosion_radius ) ) { + for( const tripoint_bub_ms &dest : here.points_in_radius( pos, explosion_radius ) ) { if( monster *const mon_ptr = creatures.creature_at( dest ) ) { monster &critter = *mon_ptr; critter.set_speed_base( @@ -3442,7 +3441,7 @@ std::optional iuse::granade_act( Character *, item *it, const tripoint &pos person->int_max -= rng( 0, person->int_max / 2 ); /** @EFFECT_PER_MAX increases possible granade per debuff for NPCs (NEGATIVE) */ person->per_max -= rng( 0, person->per_max / 2 ); - } else if( player_character.pos() == dest ) { + } else if( player_character.pos_bub() == dest ) { /** @EFFECT_STR_MAX increases possible granade str debuff (NEGATIVE) */ player_character.str_max -= rng( 0, player_character.str_max / 2 ); /** @EFFECT_DEX_MAX increases possible granade dex debuff (NEGATIVE) */ @@ -3467,7 +3466,7 @@ std::optional iuse::granade_act( Character *, item *it, const tripoint &pos sounds::sound( pos, 100, sounds::sound_t::electronic_speech, _( "REVERTS!" ), true, "speech", it->typeId().str() ); explosion_handler::draw_explosion( pos, explosion_radius, c_pink ); - for( const tripoint &dest : here.points_in_radius( pos, explosion_radius ) ) { + for( const tripoint_bub_ms &dest : here.points_in_radius( pos, explosion_radius ) ) { if( monster *const mon_ptr = creatures.creature_at( dest ) ) { monster &critter = *mon_ptr; critter.set_speed_base( critter.type->speed ); @@ -3475,7 +3474,7 @@ std::optional iuse::granade_act( Character *, item *it, const tripoint &pos critter.clear_effects(); } else if( npc *const person = creatures.creature_at( dest ) ) { person->environmental_revert_effect(); - } else if( player_character.pos() == dest ) { + } else if( player_character.pos_bub() == dest ) { player_character.environmental_revert_effect(); do_purify( player_character ); } @@ -3485,7 +3484,7 @@ std::optional iuse::granade_act( Character *, item *it, const tripoint &pos return 1; } -std::optional iuse::c4( Character *p, item *it, const tripoint & ) +std::optional iuse::c4( Character *p, item *it, const tripoint_bub_ms & ) { int time = 0; bool got_value = false; @@ -3509,12 +3508,12 @@ std::optional iuse::c4( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::acidbomb_act( Character *p, item *it, const tripoint &pos ) +std::optional iuse::acidbomb_act( Character *p, item *it, const tripoint_bub_ms &pos ) { if( !p ) { it->charges = -1; map &here = get_map(); - for( const tripoint_bub_ms &tmp : here.points_in_radius( tripoint_bub_ms( pos ), 1 ) ) { + for( const tripoint_bub_ms &tmp : here.points_in_radius( pos, 1 ) ) { here.add_field( tmp, fd_acid, 3 ); } return 1; @@ -3522,23 +3521,23 @@ std::optional iuse::acidbomb_act( Character *p, item *it, const tripoint &p return std::nullopt; } -std::optional iuse::grenade_inc_act( Character *p, item *, const tripoint &pos ) +std::optional iuse::grenade_inc_act( Character *p, item *, const tripoint_bub_ms &pos ) { - if( pos.x == -999 || pos.y == -999 ) { + if( pos.x() == -999 || pos.y() == -999 ) { return std::nullopt; } map &here = get_map(); int num_flames = rng( 3, 5 ); for( int current_flame = 0; current_flame < num_flames; current_flame++ ) { - tripoint_bub_ms dest( tripoint_bub_ms( pos ) + point( rng( -5, 5 ), rng( -5, 5 ) ) ); - std::vector flames = line_to( tripoint_bub_ms( pos ), dest, 0, 0 ); + tripoint_bub_ms dest( pos + point( rng( -5, 5 ), rng( -5, 5 ) ) ); + std::vector flames = line_to( pos, dest, 0, 0 ); for( tripoint_bub_ms &flame : flames ) { here.add_field( flame, fd_fire, rng( 0, 2 ) ); } } - explosion_handler::explosion( p, pos, 8, 0.8, true ); - for( const tripoint_bub_ms &dest : here.points_in_radius( tripoint_bub_ms( pos ), 2 ) ) { + explosion_handler::explosion( p, pos.raw(), 8, 0.8, true ); + for( const tripoint_bub_ms &dest : here.points_in_radius( pos, 2 ) ) { here.add_field( dest, fd_incendiary, 3 ); } @@ -3551,13 +3550,13 @@ std::optional iuse::grenade_inc_act( Character *p, item *, const tripoint & return 0; } -std::optional iuse::molotov_lit( Character *p, item *it, const tripoint &pos ) +std::optional iuse::molotov_lit( Character *p, item *it, const tripoint_bub_ms &pos ) { if( !p ) { // It was thrown or dropped, so burst into flames map &here = get_map(); - for( const tripoint_bub_ms &pt : here.points_in_radius( tripoint_bub_ms( pos ), 1, 0 ) ) { + for( const tripoint_bub_ms &pt : here.points_in_radius( pos, 1, 0 ) ) { const int intensity = 1 + one_in( 3 ) + one_in( 5 ); here.add_field( pt, fd_fire, intensity ); } @@ -3578,7 +3577,7 @@ std::optional iuse::molotov_lit( Character *p, item *it, const tripoint &po return 0; } -std::optional iuse::firecracker_pack( Character *p, item *it, const tripoint & ) +std::optional iuse::firecracker_pack( Character *p, item *it, const tripoint_bub_ms & ) { if( p->cant_do_underwater() ) { return std::nullopt; @@ -3595,7 +3594,7 @@ std::optional iuse::firecracker_pack( Character *p, item *it, const tripoin return 0; // don't use any charges at all. it has became a new item } -std::optional iuse::firecracker_pack_act( Character *, item *it, const tripoint &pos ) +std::optional iuse::firecracker_pack_act( Character *, item *it, const tripoint_bub_ms &pos ) { // Two seconds of lit fuse burning // Followed by random number of explosions (4-6) per turn until 25 epxlosions have happened @@ -3615,7 +3614,7 @@ std::optional iuse::firecracker_pack_act( Character *, item *it, const trip return 0; } -std::optional iuse::firecracker( Character *p, item *it, const tripoint & ) +std::optional iuse::firecracker( Character *p, item *it, const tripoint_bub_ms & ) { if( p->cant_do_underwater() ) { return std::nullopt; @@ -3631,7 +3630,7 @@ std::optional iuse::firecracker( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::mininuke( Character *p, item *it, const tripoint & ) +std::optional iuse::mininuke( Character *p, item *it, const tripoint_bub_ms & ) { int time; bool got_value = query_int( time, _( "Set the timer to ___ turns (0 to cancel)?" ) ); @@ -3648,7 +3647,7 @@ std::optional iuse::mininuke( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::portal( Character *p, item *it, const tripoint & ) +std::optional iuse::portal( Character *p, item *it, const tripoint_bub_ms & ) { if( !it->ammo_sufficient( p ) ) { return std::nullopt; @@ -3661,22 +3660,22 @@ std::optional iuse::portal( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::tazer( Character *p, item *it, const tripoint &pos ) +std::optional iuse::tazer( Character *p, item *it, const tripoint_bub_ms &pos ) { if( !it->ammo_sufficient( p ) ) { return std::nullopt; } - tripoint pnt = pos; - if( pos == p->pos() ) { - const std::optional pnt_ = choose_adjacent( _( "Shock where?" ) ); + tripoint_bub_ms pnt = pos; + if( pos == p->pos_bub() ) { + const std::optional pnt_ = choose_adjacent_bub( _( "Shock where?" ) ); if( !pnt_ ) { return std::nullopt; } pnt = *pnt_; } - if( pnt == p->pos() ) { + if( pnt == p->pos_bub() ) { p->add_msg_if_player( m_info, _( "Umm. No." ) ); return std::nullopt; } @@ -3734,7 +3733,7 @@ std::optional iuse::tazer( Character *p, item *it, const tripoint &pos ) return 1; } -std::optional iuse::tazer2( Character *p, item *it, const tripoint &pos ) +std::optional iuse::tazer2( Character *p, item *it, const tripoint_bub_ms &pos ) { if( it->ammo_remaining( p, true ) >= 2 ) { // Instead of having a ctrl+c+v of the function above, spawn a fake tazer and use it @@ -3749,7 +3748,7 @@ std::optional iuse::tazer2( Character *p, item *it, const tripoint &pos ) return std::nullopt; } -std::optional iuse::shocktonfa_off( Character *p, item *it, const tripoint &pos ) +std::optional iuse::shocktonfa_off( Character *p, item *it, const tripoint_bub_ms &pos ) { if( !p ) { debugmsg( "%s called action shocktonfa_off that requires character but no character is present", @@ -3777,7 +3776,7 @@ std::optional iuse::shocktonfa_off( Character *p, item *it, const tripoint return 0; } -std::optional iuse::shocktonfa_on( Character *p, item *it, const tripoint &pos ) +std::optional iuse::shocktonfa_on( Character *p, item *it, const tripoint_bub_ms &pos ) { if( !p ) { // Effects while simply on debugmsg( "%s called action shocktonfa_on that requires character but no character is present", @@ -3805,7 +3804,7 @@ std::optional iuse::shocktonfa_on( Character *p, item *it, const tripoint & return 0; } -std::optional iuse::mp3( Character *p, item *it, const tripoint & ) +std::optional iuse::mp3( Character *p, item *it, const tripoint_bub_ms & ) { // TODO: avoid item id hardcoding to make this function usable for pure json-defined devices. if( !it->ammo_sufficient( p ) ) { @@ -3860,13 +3859,13 @@ static std::string get_music_description() return _( "a sweet guitar solo!" ); } -void iuse::play_music( Character *p, const tripoint &source, const int volume, +void iuse::play_music( Character *p, const tripoint_bub_ms &source, const int volume, const int max_morale, bool play_sounds ) { std::string sound = "music"; auto lambda_should_do_effects = [&source, &volume]( Character * p ) { - return p && p->can_hear( source, volume ) && !p->in_sleep_state(); + return p && p->can_hear( source.raw(), volume ) && !p->in_sleep_state(); }; auto lambda_add_music_effects = [&max_morale, &volume]( Character & guy ) { @@ -3898,7 +3897,7 @@ void iuse::play_music( Character *p, const tripoint &source, const int volume, if( !music.empty() ) { sound = music; // descriptions aren't printed for sounds at our position - if( lambda_should_do_effects( p ) && p->pos() == source ) { + if( lambda_should_do_effects( p ) && p->pos_bub() == source ) { p->add_msg_if_player( _( "You listen to %s" ), music ); } } @@ -3909,7 +3908,7 @@ void iuse::play_music( Character *p, const tripoint &source, const int volume, } } -std::optional iuse::mp3_on( Character *p, item *, const tripoint &pos ) +std::optional iuse::mp3_on( Character *p, item *, const tripoint_bub_ms &pos ) { // mp3 player in inventory, we can listen play_music( p, pos, 0, 20 ); @@ -3917,7 +3916,7 @@ std::optional iuse::mp3_on( Character *p, item *, const tripoint &pos ) return 1; } -std::optional iuse::mp3_deactivate( Character *p, item *it, const tripoint & ) +std::optional iuse::mp3_deactivate( Character *p, item *it, const tripoint_bub_ms & ) { if( it->typeId() == itype_mp3_on ) { @@ -3940,7 +3939,7 @@ std::optional iuse::mp3_deactivate( Character *p, item *it, const tripoint } -std::optional iuse::rpgdie( Character *you, item *die, const tripoint & ) +std::optional iuse::rpgdie( Character *you, item *die, const tripoint_bub_ms & ) { if( you->cant_do_mounted() ) { return std::nullopt; @@ -3962,7 +3961,7 @@ std::optional iuse::rpgdie( Character *you, item *die, const tripoint & ) return roll; } -std::optional iuse::dive_tank( Character *p, item *it, const tripoint & ) +std::optional iuse::dive_tank( Character *p, item *it, const tripoint_bub_ms & ) { if( p && p->is_worn( *it ) ) { if( p->is_underwater() && p->oxygen < 10 ) { @@ -3984,7 +3983,7 @@ std::optional iuse::dive_tank( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::dive_tank_activate( Character *p, item *it, const tripoint & ) +std::optional iuse::dive_tank_activate( Character *p, item *it, const tripoint_bub_ms & ) { if( it->ammo_remaining() == 0 ) { p->add_msg_if_player( _( "Your %s is empty." ), it->tname() ); @@ -4004,7 +4003,7 @@ std::optional iuse::dive_tank_activate( Character *p, item *it, const tripo return 1; } -std::optional iuse::solarpack( Character *p, item *it, const tripoint & ) +std::optional iuse::solarpack( Character *p, item *it, const tripoint_bub_ms & ) { if( !p ) { debugmsg( "%s called action solarpack that requires character but no character is present", @@ -4038,7 +4037,7 @@ std::optional iuse::solarpack( Character *p, item *it, const tripoint & ) return 0; } -std::optional iuse::solarpack_off( Character *p, item *it, const tripoint & ) +std::optional iuse::solarpack_off( Character *p, item *it, const tripoint_bub_ms & ) { if( !p ) { debugmsg( "%s called action solarpack_off that requires character but no character is present", @@ -4060,7 +4059,7 @@ std::optional iuse::solarpack_off( Character *p, item *it, const tripoint & return 0; } -std::optional iuse::gasmask_activate( Character *p, item *it, const tripoint & ) +std::optional iuse::gasmask_activate( Character *p, item *it, const tripoint_bub_ms & ) { if( it->ammo_remaining() == 0 ) { p->add_msg_if_player( _( "Your %s doesn't have a filter." ), it->tname() ); @@ -4073,12 +4072,11 @@ std::optional iuse::gasmask_activate( Character *p, item *it, const tripoin return 0; } -std::optional iuse::gasmask( Character *p, item *it, const tripoint &pos ) +std::optional iuse::gasmask( Character *p, item *it, const tripoint_bub_ms &pos ) { - const tripoint_bub_ms position{pos}; // TODO: Get rid of this when operation typified. if( p && p->is_worn( *it ) ) { // calculate amount of absorbed gas per filter charge - const field &gasfield = get_map().field_at( position ); + const field &gasfield = get_map().field_at( pos ); for( const auto &dfield : gasfield ) { const field_entry &entry = dfield.second; int gas_abs_factor = to_turns( entry.get_field_type()->gas_absorption_factor ); @@ -4099,7 +4097,7 @@ std::optional iuse::gasmask( Character *p, item *it, const tripoint &pos ) } } if( it->get_var( "gas_absorbed", 0 ) >= 60 ) { - it->ammo_consume( 1, position, p ); + it->ammo_consume( 1, pos, p ); it->set_var( "gas_absorbed", 0 ); if( it->ammo_remaining() < 10 ) { p->add_msg_player_or_npc( @@ -4125,7 +4123,7 @@ std::optional iuse::gasmask( Character *p, item *it, const tripoint &pos ) return 0; } -std::optional iuse::portable_game( Character *p, item *it, const tripoint & ) +std::optional iuse::portable_game( Character *p, item *it, const tripoint_bub_ms & ) { if( p->is_npc() ) { // Long action @@ -4266,7 +4264,7 @@ std::optional iuse::portable_game( Character *p, item *it, const tripoint & return 0; } -std::optional iuse::fitness_check( Character *p, item *it, const tripoint & ) +std::optional iuse::fitness_check( Character *p, item *it, const tripoint_bub_ms & ) { if( p->has_trait( trait_ILLITERATE ) ) { p->add_msg_if_player( m_info, _( "You don't know what you're looking at." ) ); @@ -4317,7 +4315,7 @@ std::optional iuse::fitness_check( Character *p, item *it, const tripoint & return 1; } -std::optional iuse::hand_crank( Character *p, item *it, const tripoint & ) +std::optional iuse::hand_crank( Character *p, item *it, const tripoint_bub_ms & ) { if( p->is_npc() ) { // Long action @@ -4351,7 +4349,7 @@ std::optional iuse::hand_crank( Character *p, item *it, const tripoint & ) return 0; } -std::optional iuse::vibe( Character *p, item *it, const tripoint & ) +std::optional iuse::vibe( Character *p, item *it, const tripoint_bub_ms & ) { if( p->is_npc() ) { // Long action @@ -4391,9 +4389,9 @@ std::optional iuse::vibe( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::vortex( Character *p, item *it, const tripoint & ) +std::optional iuse::vortex( Character *p, item *it, const tripoint_bub_ms & ) { - std::vector spawn; + std::vector spawn; spawn.reserve( 28 ); for( int i = -3; i <= 3; i++ ) { spawn.emplace_back( -3, i ); @@ -4403,7 +4401,7 @@ std::optional iuse::vortex( Character *p, item *it, const tripoint & ) } while( !spawn.empty() ) { - const tripoint offset( random_entry_removed( spawn ), 0 ); + const tripoint_bub_ms offset( random_entry_removed( spawn ), 0 ); monster *const mon = g->place_critter_at( mon_vortex, offset + p->pos() ); if( !mon ) { continue; @@ -4420,7 +4418,7 @@ std::optional iuse::vortex( Character *p, item *it, const tripoint & ) return 0; } -std::optional iuse::dog_whistle( Character *p, item *, const tripoint & ) +std::optional iuse::dog_whistle( Character *p, item *, const tripoint_bub_ms & ) { if( !p->is_avatar() ) { return std::nullopt; @@ -4480,7 +4478,7 @@ std::optional iuse::dog_whistle( Character *p, item *, const tripoint & ) return 1; } -std::optional iuse::call_of_tindalos( Character *p, item *, const tripoint & ) +std::optional iuse::call_of_tindalos( Character *p, item *, const tripoint_bub_ms & ) { map &here = get_map(); for( const tripoint_bub_ms &dest : here.points_in_radius( p->pos_bub(), 12 ) ) { @@ -4492,7 +4490,7 @@ std::optional iuse::call_of_tindalos( Character *p, item *, const tripoint return 1; } -std::optional iuse::blood_draw( Character *p, item *it, const tripoint & ) +std::optional iuse::blood_draw( Character *p, item *it, const tripoint_bub_ms & ) { if( p->is_npc() ) { return std::nullopt; // No NPCs for now! @@ -4595,7 +4593,7 @@ void iuse::cut_log_into_planks( Character &p ) p.activity.placement = get_map().getglobal( p.pos_bub() ); } -std::optional iuse::lumber( Character *p, item *it, const tripoint & ) +std::optional iuse::lumber( Character *p, item *it, const tripoint_bub_ms & ) { if( !p ) { debugmsg( "%s called action lumber that requires character but no character is present", @@ -4648,7 +4646,7 @@ static int chop_moves( Character *p, item *it ) return moves; } -std::optional iuse::chop_tree( Character *p, item *it, const tripoint & ) +std::optional iuse::chop_tree( Character *p, item *it, const tripoint_bub_ms & ) { if( !p ) { debugmsg( "%s called action chop_tree that requires character but no character is present", @@ -4659,21 +4657,21 @@ std::optional iuse::chop_tree( Character *p, item *it, const tripoint & ) return std::nullopt; } map &here = get_map(); - const std::function f = [&here, p]( const tripoint & pnt ) { - if( pnt == p->pos() ) { + const std::function f = [&here, p]( const tripoint_bub_ms & pnt ) { + if( pnt == p->pos_bub() ) { return false; } return here.has_flag( ter_furn_flag::TFLAG_TREE, pnt ); }; - const std::optional pnt_ = choose_adjacent_highlight( - _( "Chop down which tree?" ), _( "There is no tree to chop down nearby." ), f, false ); + const std::optional pnt_ = choose_adjacent_highlight( + _( "Chop down which tree?" ), _( "There is no tree to chop down nearby." ), f, false ); if( !pnt_ ) { return std::nullopt; } - const tripoint &pnt = *pnt_; + const tripoint_bub_ms &pnt = *pnt_; if( !f( pnt ) ) { - if( pnt == p->pos() ) { + if( pnt == p->pos_bub() ) { p->add_msg_if_player( m_info, _( "You're not stern enough to shave yourself with THIS." ) ); } else { p->add_msg_if_player( m_info, _( "You can't chop down that." ) ); @@ -4694,7 +4692,7 @@ std::optional iuse::chop_tree( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::chop_logs( Character *p, item *it, const tripoint & ) +std::optional iuse::chop_logs( Character *p, item *it, const tripoint_bub_ms & ) { if( !p ) { debugmsg( "%s called action chop_logs that requires character but no character is present", @@ -4710,18 +4708,19 @@ std::optional iuse::chop_logs( Character *p, item *it, const tripoint & ) ter_t_stump }; map &here = get_map(); - const std::function f = [&allowed_ter_id, &here]( const tripoint & pnt ) { + const std::function f = [&allowed_ter_id, + &here]( const tripoint_bub_ms & pnt ) { const ter_id &type = here.ter( pnt ); const bool is_allowed_terrain = allowed_ter_id.find( type.id() ) != allowed_ter_id.end(); return is_allowed_terrain; }; - const std::optional pnt_ = choose_adjacent_highlight( - _( "Chop which tree trunk?" ), _( "There is no tree trunk to chop nearby." ), f, false ); + const std::optional pnt_ = choose_adjacent_highlight( + _( "Chop which tree trunk?" ), _( "There is no tree trunk to chop nearby." ), f, false ); if( !pnt_ ) { return std::nullopt; } - const tripoint &pnt = *pnt_; + const tripoint_bub_ms &pnt = *pnt_; if( !f( pnt ) ) { p->add_msg_if_player( m_info, _( "You can't chop that." ) ); return std::nullopt; @@ -4738,7 +4737,7 @@ std::optional iuse::chop_logs( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::oxytorch( Character *p, item *it, const tripoint & ) +std::optional iuse::oxytorch( Character *p, item *it, const tripoint_bub_ms & ) { if( p->is_npc() ) { // Long action @@ -4785,7 +4784,7 @@ std::optional iuse::oxytorch( Character *p, item *it, const tripoint & ) return std::nullopt; } -std::optional iuse::hacksaw( Character *p, item *it, const tripoint &it_pnt ) +std::optional iuse::hacksaw( Character *p, item *it, const tripoint_bub_ms &it_pnt ) { if( !p ) { debugmsg( "%s called action hacksaw that requires character but no character is present", @@ -4824,16 +4823,16 @@ std::optional iuse::hacksaw( Character *p, item *it, const tripoint &it_pnt } return std::nullopt; } - if( p->pos() == it_pnt ) { + if( p->pos_bub() == it_pnt ) { p->assign_activity( hacksaw_activity_actor( pnt, item_location{ *p, it } ) ); } else { - p->assign_activity( hacksaw_activity_actor( pnt, it->typeId(), tripoint_bub_ms( it_pnt ) ) ); + p->assign_activity( hacksaw_activity_actor( pnt, it->typeId(), it_pnt ) ); } return std::nullopt; } -std::optional iuse::boltcutters( Character *p, item *it, const tripoint & ) +std::optional iuse::boltcutters( Character *p, item *it, const tripoint_bub_ms & ) { if( p->cant_do_mounted() ) { return std::nullopt; @@ -4872,26 +4871,23 @@ std::optional iuse::boltcutters( Character *p, item *it, const tripoint & ) return std::nullopt; } -std::optional iuse::mop( Character *p, item *, const tripoint & ) +std::optional iuse::mop( Character *p, item *, const tripoint_bub_ms & ) { if( p->cant_do_mounted() ) { return std::nullopt; } map &here = get_map(); - const std::function f = [&here]( const tripoint & pnt ) { - // TODO: fix point types - return here.terrain_moppable( tripoint_bub_ms( pnt ) ); + const std::function f = [&here]( const tripoint_bub_ms & pnt ) { + return here.terrain_moppable( pnt ); }; - const std::optional pnt_ = choose_adjacent_highlight( - _( "Mop where?" ), _( "There is nothing to mop nearby." ), f, false ); + const std::optional pnt_ = choose_adjacent_highlight( + _( "Mop where?" ), _( "There is nothing to mop nearby." ), f, false ); if( !pnt_ ) { return std::nullopt; } - // TODO: fix point types const tripoint_bub_ms pnt( *pnt_ ); - // TODO: fix point types - if( !f( pnt.raw() ) ) { + if( !f( pnt ) ) { if( pnt == p->pos_bub() ) { p->add_msg_if_player( m_info, _( "You mop yourself up." ) ); p->add_msg_if_player( m_info, _( "The universe implodes and reforms around you." ) ); @@ -4915,9 +4911,9 @@ std::optional iuse::mop( Character *p, item *, const tripoint & ) return 1; } -std::optional iuse::spray_can( Character *p, item *it, const tripoint & ) +std::optional iuse::spray_can( Character *p, item *it, const tripoint_bub_ms & ) { - const std::optional dest_ = choose_adjacent( _( "Spray where?" ) ); + const std::optional dest_ = choose_adjacent_bub( _( "Spray where?" ) ); if( !dest_ ) { return std::nullopt; } @@ -4925,7 +4921,7 @@ std::optional iuse::spray_can( Character *p, item *it, const tripoint & ) } std::optional iuse::handle_ground_graffiti( Character &p, item *it, const std::string &prefix, - const tripoint &where ) + const tripoint_bub_ms &where ) { map &here = get_map(); string_input_popup popup; @@ -5000,7 +4996,7 @@ static bool heat_item( Character &p ) return true; } -std::optional iuse::heatpack( Character *p, item *it, const tripoint & ) +std::optional iuse::heatpack( Character *p, item *it, const tripoint_bub_ms & ) { if( heat_item( *p ) ) { it->convert( itype_heatpack_used, p ); @@ -5008,7 +5004,7 @@ std::optional iuse::heatpack( Character *p, item *it, const tripoint & ) return 0; } -std::optional iuse::heat_food( Character *p, item *it, const tripoint & ) +std::optional iuse::heat_food( Character *p, item *it, const tripoint_bub_ms & ) { if( get_map().has_nearby_fire( p->pos_bub() ) ) { heat_item( *p ); @@ -5027,7 +5023,7 @@ std::optional iuse::heat_food( Character *p, item *it, const tripoint & ) return std::nullopt; } -std::optional iuse::hotplate( Character *p, item *it, const tripoint & ) +std::optional iuse::hotplate( Character *p, item *it, const tripoint_bub_ms & ) { if( p->cant_do_mounted() ) { return std::nullopt; @@ -5043,7 +5039,7 @@ std::optional iuse::hotplate( Character *p, item *it, const tripoint & ) return std::nullopt; } -std::optional iuse::hotplate_atomic( Character *p, item *it, const tripoint & ) +std::optional iuse::hotplate_atomic( Character *p, item *it, const tripoint_bub_ms & ) { if( p->cant_do_mounted() ) { return std::nullopt; @@ -5055,7 +5051,7 @@ std::optional iuse::hotplate_atomic( Character *p, item *it, const tripoint return std::nullopt; } -std::optional iuse::towel( Character *p, item *it, const tripoint & ) +std::optional iuse::towel( Character *p, item *it, const tripoint_bub_ms & ) { return towel_common( p, it, false ); } @@ -5130,14 +5126,14 @@ int iuse::towel_common( Character *p, item *it, bool ) return it ? 1 : 0; } -std::optional iuse::unfold_generic( Character *p, item *it, const tripoint & ) +std::optional iuse::unfold_generic( Character *p, item *it, const tripoint_bub_ms & ) { p->assign_activity( vehicle_unfolding_activity_actor( *it ) ); p->i_rem( it ); return 0; } -std::optional iuse::adrenaline_injector( Character *p, item *it, const tripoint & ) +std::optional iuse::adrenaline_injector( Character *p, item *it, const tripoint_bub_ms & ) { if( p->is_npc() && p->get_effect_dur( effect_adrenaline ) >= 30_minutes ) { return std::nullopt; @@ -5160,7 +5156,7 @@ std::optional iuse::adrenaline_injector( Character *p, item *it, const trip return 1; } -std::optional iuse::jet_injector( Character *p, item *it, const tripoint & ) +std::optional iuse::jet_injector( Character *p, item *it, const tripoint_bub_ms & ) { if( !it->ammo_sufficient( p ) ) { p->add_msg_if_player( m_info, _( "The jet injector is empty." ) ); @@ -5182,7 +5178,7 @@ std::optional iuse::jet_injector( Character *p, item *it, const tripoint & return 1; } -std::optional iuse::stimpack( Character *p, item *it, const tripoint & ) +std::optional iuse::stimpack( Character *p, item *it, const tripoint_bub_ms & ) { if( p->get_item_position( it ) >= -1 ) { p->add_msg_if_player( m_info, @@ -5205,7 +5201,7 @@ std::optional iuse::stimpack( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::radglove( Character *p, item *it, const tripoint & ) +std::optional iuse::radglove( Character *p, item *it, const tripoint_bub_ms & ) { if( p->get_item_position( it ) >= -1 ) { p->add_msg_if_player( m_info, @@ -5233,7 +5229,7 @@ std::optional iuse::radglove( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::talking_doll( Character *p, item *it, const tripoint & ) +std::optional iuse::talking_doll( Character *p, item *it, const tripoint_bub_ms & ) { if( !it->ammo_sufficient( p ) ) { p->add_msg_if_player( m_info, _( "The %s's batteries are dead." ), it->tname() ); @@ -5248,7 +5244,7 @@ std::optional iuse::talking_doll( Character *p, item *it, const tripoint & return 1; } -std::optional iuse::gun_repair( Character *p, item *it, const tripoint & ) +std::optional iuse::gun_repair( Character *p, item *it, const tripoint_bub_ms & ) { if( !it->ammo_sufficient( p ) ) { return std::nullopt; @@ -5303,7 +5299,7 @@ std::optional gun_repair( Character *p, item *, item_location &loc ) return 1; } -std::optional iuse::gunmod_attach( Character *p, item *it, const tripoint & ) +std::optional iuse::gunmod_attach( Character *p, item *it, const tripoint_bub_ms & ) { if( !it || !it->is_gunmod() ) { debugmsg( "tried to attach non-gunmod" ); @@ -5340,7 +5336,7 @@ std::optional iuse::gunmod_attach( Character *p, item *it, const tripoint & } while( true ); } -std::optional iuse::toolmod_attach( Character *p, item *it, const tripoint & ) +std::optional iuse::toolmod_attach( Character *p, item *it, const tripoint_bub_ms & ) { if( !it || !it->is_toolmod() ) { debugmsg( "tried to attach non-toolmod" ); @@ -5395,7 +5391,7 @@ std::optional iuse::toolmod_attach( Character *p, item *it, const tripoint return 0; } -std::optional iuse::bell( Character *p, item *it, const tripoint & ) +std::optional iuse::bell( Character *p, item *it, const tripoint_bub_ms & ) { if( it->typeId() == itype_cow_bell ) { sounds::sound( p->pos(), 12, sounds::sound_t::music, _( "Clank! Clank!" ), true, "misc", @@ -5415,7 +5411,7 @@ std::optional iuse::bell( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::seed( Character *p, item *it, const tripoint & ) +std::optional iuse::seed( Character *p, item *it, const tripoint_bub_ms & ) { if( p->is_npc() || query_yn( _( "Are you sure you want to eat the %s? You could plant it in a mound of dirt." ), @@ -5433,7 +5429,7 @@ bool iuse::robotcontrol_can_target( Character *p, const monster &m ) && rl_dist( p->pos(), m.pos() ) <= 10; } -std::optional iuse::robotcontrol( Character *p, item *it, const tripoint & ) +std::optional iuse::robotcontrol( Character *p, item *it, const tripoint_bub_ms & ) { bool isComputer = !it->has_flag( flag_MAGICAL ); @@ -5490,9 +5486,9 @@ std::optional iuse::robotcontrol( Character *p, item *it, const tripoint & tripoint seen_loc; // Show locations of seen robots, center on player if robot is not seen if( p->sees( candidate ) ) { - seen_loc = candidate.pos(); + seen_loc = candidate.pos_bub().raw(); } else { - seen_loc = p->pos(); + seen_loc = p->pos_bub().raw(); } locations.push_back( seen_loc ); } @@ -5599,7 +5595,7 @@ void item::extended_photo_def::serialize( JsonOut &jsout ) const jsout.end_object(); } -std::optional iuse::epic_music( Character *p, item *it, const tripoint &pos ) +std::optional iuse::epic_music( Character *p, item *it, const tripoint_bub_ms &pos ) { if( !it->get_var( "EIPC_MUSIC_ON" ).empty() && it->ammo_sufficient( p ) ) { @@ -5611,7 +5607,7 @@ std::optional iuse::epic_music( Character *p, item *it, const tripoint &pos return std::nullopt; } -std::optional iuse::einktabletpc( Character *p, item *it, const tripoint & ) +std::optional iuse::einktabletpc( Character *p, item *it, const tripoint_bub_ms & ) { if( p->cant_do_mounted() ) { @@ -5713,7 +5709,7 @@ std::optional iuse::einktabletpc( Character *p, item *it, const tripoint & if( it->is_transformable() ) { const use_function *readinglight = it->type->get_use( "transform" ); if( readinglight ) { - readinglight->call( p, *it, p->pos() ); + readinglight->call( p, *it, p->pos_bub() ); } } it->activate(); @@ -5830,7 +5826,7 @@ std::optional iuse::einktabletpc( Character *p, item *it, const tripoint & return std::nullopt; } -static std::string colorized_trap_name_at( const tripoint &point ) +static std::string colorized_trap_name_at( const tripoint_bub_ms &point ) { const trap &trap = get_map().tr_at( point ); std::string name; @@ -5848,7 +5844,7 @@ static const std::unordered_map description_affi { description_affix::DESCRIPTION_AFFIX_ILLUMINATED_BY, translate_marker( " in %s" ) }, }; -static std::string colorized_field_description_at( const tripoint &point ) +static std::string colorized_field_description_at( const tripoint_bub_ms &point ) { std::string field_text; const field &field = get_map().field_at( point ); @@ -5879,7 +5875,7 @@ static std::string colorized_item_description( const item &item ) return item.info( dummy, &query, 1 ); } -static item get_top_item_at_point( const tripoint &point, +static item get_top_item_at_point( const tripoint_bub_ms &point, const units::volume &min_visible_volume ) { map_stack items = get_map().i_at( point ); @@ -5893,7 +5889,7 @@ static item get_top_item_at_point( const tripoint &point, return item(); } -static std::string colorized_ter_name_flags_at( const tripoint &point, +static std::string colorized_ter_name_flags_at( const tripoint_bub_ms &point, const std::vector &flags, const std::vector &ter_whitelist ) { map &here = get_map(); @@ -5928,7 +5924,8 @@ static std::string colorized_ter_name_flags_at( const tripoint &point, return std::string(); } -static std::string colorized_feature_description_at( const tripoint ¢er_point, bool &item_found, +static std::string colorized_feature_description_at( const tripoint_bub_ms ¢er_point, + bool &item_found, const units::volume &min_visible_volume ) { item_found = false; @@ -6073,16 +6070,16 @@ struct object_names_collection { std::string obj_nearby_text; }; -static object_names_collection enumerate_objects_around_point( const tripoint &point, - const int radius, const tripoint &bounds_center_point, const int bounds_radius, - const tripoint &camera_pos, const units::volume &min_visible_volume, bool create_figure_desc, - std::unordered_set &ignored_points, +static object_names_collection enumerate_objects_around_point( const tripoint_bub_ms &point, + const int radius, const tripoint_bub_ms &bounds_center_point, const int bounds_radius, + const tripoint_bub_ms &camera_pos, const units::volume &min_visible_volume, bool create_figure_desc, + std::unordered_set &ignored_points, std::unordered_set &vehicles_recorded ) { map &here = get_map(); - const tripoint_range bounds = + const tripoint_range bounds = here.points_in_radius( bounds_center_point, bounds_radius ); - const tripoint_range points_in_radius = here.points_in_radius( point, radius ); + const tripoint_range points_in_radius = here.points_in_radius( point, radius ); int dist = rl_dist( camera_pos, point ); bool item_found = false; @@ -6094,7 +6091,7 @@ static object_names_collection enumerate_objects_around_point( const tripoint &p std::string description_terrain_on_figure; // store objects in radius - for( const tripoint &point_around_figure : points_in_radius ) { + for( const tripoint_bub_ms &point_around_figure : points_in_radius ) { if( !bounds.is_point_inside( point_around_figure ) || !here.sees( camera_pos, point_around_figure, dist + radius ) || ( ignored_points.find( point_around_figure ) != ignored_points.end() && @@ -6222,14 +6219,14 @@ static object_names_collection enumerate_objects_around_point( const tripoint &p return ret_obj; } -static item::extended_photo_def photo_def_for_camera_point( const tripoint &aim_point, - const tripoint &camera_pos, +static item::extended_photo_def photo_def_for_camera_point( const tripoint_bub_ms &aim_point, + const tripoint_bub_ms &camera_pos, std::vector &monster_vec, std::vector &character_vec ) { // look for big items on top of stacks in the background for the selfie description const units::volume min_visible_volume = 490_ml; - std::unordered_set ignored_points; + std::unordered_set ignored_points; std::unordered_set vehicles_recorded; std::unordered_map description_figures_appearance; @@ -6238,7 +6235,7 @@ static item::extended_photo_def photo_def_for_camera_point( const tripoint &aim_ std::string timestamp = to_string( time_point( calendar::turn ) ); int dist = rl_dist( camera_pos, aim_point ); map &here = get_map(); - const tripoint_range bounds = here.points_in_radius( aim_point, 2 ); + const tripoint_range bounds = here.points_in_radius( aim_point, 2 ); item::extended_photo_def photo; bool need_store_weather = false; int outside_tiles_num = 0; @@ -6256,7 +6253,7 @@ static item::extended_photo_def photo_def_for_camera_point( const tripoint &aim_ creature_tracker &creatures = get_creature_tracker(); // first scan for critters and mark nearby furniture, vehicles and items - for( const tripoint ¤t : bounds ) { + for( const tripoint_bub_ms ¤t : bounds ) { if( !here.sees( camera_pos, current, dist + 3 ) ) { continue; // disallow photos with non-visible objects } @@ -6447,7 +6444,6 @@ static item::extended_photo_def photo_def_for_camera_point( const tripoint &aim_ obj_list ); } - // TODO: fix point types tripoint_abs_omt omp( coords::project_to( here.getglobal( aim_point ) ) ); const oter_id &cur_ter = overmap_buffer.ter( omp ); om_vision_level vision = overmap_buffer.seen( omp ); @@ -6631,7 +6627,7 @@ static bool show_photo_selection( Character &p, item &it, const std::string &var return true; } -std::optional iuse::camera( Character *p, item *it, const tripoint & ) +std::optional iuse::camera( Character *p, item *it, const tripoint_bub_ms & ) { enum {c_shot, c_photos, c_monsters, c_upload}; @@ -6672,30 +6668,30 @@ std::optional iuse::camera( Character *p, item *it, const tripoint & ) map &here = get_map(); creature_tracker &creatures = get_creature_tracker(); if( c_shot == choice ) { - const std::optional aim_point_ = g->look_around(); + const std::optional aim_point_ = g->look_around(); if( !aim_point_ ) { p->add_msg_if_player( _( "Never mind." ) ); return std::nullopt; } - tripoint aim_point = *aim_point_; + tripoint_bub_ms aim_point{ *aim_point_ }; bool incorrect_focus = false; - tripoint_range aim_bounds = here.points_in_radius( aim_point, 2 ); + tripoint_range aim_bounds = here.points_in_radius( aim_point, 2 ); - std::vector trajectory = line_to( p->pos(), aim_point, 0, 0 ); + std::vector trajectory = line_to( p->pos_bub(), aim_point, 0, 0 ); trajectory.push_back( aim_point ); p->mod_moves( -to_moves( 1_seconds ) * 0.5 ); sounds::sound( p->pos(), 8, sounds::sound_t::activity, _( "Click." ), true, "tool", "camera_shutter" ); - for( std::vector::iterator point_it = trajectory.begin(); + for( std::vector::iterator point_it = trajectory.begin(); point_it != trajectory.end(); ++point_it ) { - const tripoint trajectory_point = *point_it; + const tripoint_bub_ms trajectory_point = *point_it; if( point_it != trajectory.end() ) { - const tripoint next_point = *( point_it + 1 ); // Trajectory ends on last visible tile - if( !here.sees( p->pos(), next_point, rl_dist( p->pos(), next_point ) + 3 ) ) { + const tripoint_bub_ms next_point = *( point_it + 1 ); // Trajectory ends on last visible tile + if( !here.sees( p->pos_bub(), next_point, rl_dist( p->pos_bub(), next_point ) + 3 ) ) { p->add_msg_if_player( _( "You have the wrong camera focus." ) ); incorrect_focus = true; // recalculate target point @@ -6707,7 +6703,7 @@ std::optional iuse::camera( Character *p, item *it, const tripoint & ) monster *const mon = creatures.creature_at( trajectory_point, true ); Character *const guy = creatures.creature_at( trajectory_point ); if( mon || guy || trajectory_point == aim_point ) { - int dist = rl_dist( p->pos(), trajectory_point ); + int dist = rl_dist( p->pos_bub(), trajectory_point ); int camera_bonus = it->has_flag( flag_CAMERA_PRO ) ? 10 : 0; int photo_quality = 20 - rng( dist, dist * 2 ) * 2 + rng( camera_bonus / 2, camera_bonus ); @@ -6760,7 +6756,7 @@ std::optional iuse::camera( Character *p, item *it, const tripoint & ) std::vector extended_photos; std::vector monster_vec; std::vector character_vec; - item::extended_photo_def photo = photo_def_for_camera_point( trajectory_point, p->pos(), + item::extended_photo_def photo = photo_def_for_camera_point( trajectory_point, p->pos_bub(), monster_vec, character_vec ); photo.quality = photo_quality; @@ -6916,7 +6912,7 @@ std::optional iuse::camera( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::ehandcuffs_tick( Character *p, item *it, const tripoint &pos ) +std::optional iuse::ehandcuffs_tick( Character *p, item *it, const tripoint_bub_ms &pos ) { if( get_map().has_flag( ter_furn_flag::TFLAG_SWIMMABLE, pos.xy() ) ) { @@ -6965,10 +6961,10 @@ std::optional iuse::ehandcuffs_tick( Character *p, item *it, const tripoint "environment", "police_siren" ); } - const point p2( it->get_var( "HANDCUFFS_X", 0 ), it->get_var( "HANDCUFFS_Y", 0 ) ); + const point_bub_ms p2( it->get_var( "HANDCUFFS_X", 0 ), it->get_var( "HANDCUFFS_Y", 0 ) ); - if( ( it->ammo_remaining() > it->type->maximum_charges() - 1000 ) && ( p2.x != pos.x || - p2.y != pos.y ) ) { + if( ( it->ammo_remaining() > it->type->maximum_charges() - 1000 ) && ( p2.x() != pos.x() || + p2.y() != pos.y() ) ) { if( p->is_elec_immune() ) { if( one_in( 10 ) ) { @@ -6988,8 +6984,8 @@ std::optional iuse::ehandcuffs_tick( Character *p, item *it, const tripoint it->charges = 1; } - it->set_var( "HANDCUFFS_X", pos.x ); - it->set_var( "HANDCUFFS_Y", pos.y ); + it->set_var( "HANDCUFFS_X", pos.x() ); + it->set_var( "HANDCUFFS_Y", pos.y() ); return 1; @@ -6998,7 +6994,7 @@ std::optional iuse::ehandcuffs_tick( Character *p, item *it, const tripoint return 1; } -std::optional iuse::ehandcuffs( Character *, item *it, const tripoint & ) +std::optional iuse::ehandcuffs( Character *, item *it, const tripoint_bub_ms & ) { if( it->active ) { add_msg( _( "The %s are clamped tightly on your wrists. You can't take them off." ), @@ -7010,18 +7006,18 @@ std::optional iuse::ehandcuffs( Character *, item *it, const tripoint & ) return 1; } -std::optional iuse::afs_translocator( Character *p, item *it, const tripoint & ) +std::optional iuse::afs_translocator( Character *p, item *it, const tripoint_bub_ms & ) { if( !it->ammo_sufficient( p ) ) { return std::nullopt; } - const std::optional dest_ = choose_adjacent( _( "Create buoy where?" ) ); + const std::optional dest_ = choose_adjacent_bub( _( "Create buoy where?" ) ); if( !dest_ ) { return std::nullopt; } - tripoint dest = *dest_; + tripoint_bub_ms dest = *dest_; p->mod_moves( -to_moves( 2_seconds ) ); @@ -7038,7 +7034,7 @@ std::optional iuse::afs_translocator( Character *p, item *it, const tripoin } } -std::optional iuse::foodperson_voice( Character *, item *, const tripoint &pos ) +std::optional iuse::foodperson_voice( Character *, item *, const tripoint_bub_ms &pos ) { if( calendar::once_every( 1_minutes ) ) { const SpeechBubble &speech = get_speech( "foodperson_mask" ); @@ -7048,7 +7044,7 @@ std::optional iuse::foodperson_voice( Character *, item *, const tripoint & return 0; } -std::optional iuse::foodperson( Character *p, item *it, const tripoint & ) +std::optional iuse::foodperson( Character *p, item *it, const tripoint_bub_ms & ) { // Prevent crash if battery was somehow removed. if( !it->magazine_current() ) { @@ -7063,7 +7059,7 @@ std::optional iuse::foodperson( Character *p, item *it, const tripoint & ) return 0; } -std::optional iuse::radiocar( Character *p, item *it, const tripoint & ) +std::optional iuse::radiocar( Character *p, item *it, const tripoint_bub_ms & ) { int choice = -1; item *bomb_it = it->get_item_with( []( const item & c ) { @@ -7140,7 +7136,7 @@ std::optional iuse::radiocar( Character *p, item *it, const tripoint & ) return 1; } -std::optional iuse::radiocaron( Character *p, item *it, const tripoint & ) +std::optional iuse::radiocaron( Character *p, item *it, const tripoint_bub_ms & ) { if( !it->ammo_sufficient( p ) ) { // Deactivate since other mode has an iuse too. @@ -7181,7 +7177,7 @@ static void sendRadioSignal( Character &p, const flag_id &signal ) std::map use_methods = it.type->use_methods; if( use_methods.find( "transform" ) != use_methods.end() ) { it.type->get_use( "transform" )->call( &p, it, loc ); - item_location itm_loc = item_location( map_cursor( tripoint_bub_ms( loc ) ), &it ); + item_location itm_loc = item_location( map_cursor( loc ), &it ); here.update_lum( itm_loc, true ); } else { it.type->get_use( it.type->use_methods.begin()->first )->call( &p, it, loc ); @@ -7197,7 +7193,7 @@ static void sendRadioSignal( Character &p, const flag_id &signal ) // Invoke to transform a radio-modded explosive into its active form if( itm->has_flag( flag_RADIO_INVOKE_PROC ) ) { itm->type->invoke( &p, *itm, loc.raw() ); - item_location itm_loc = item_location( map_cursor( tripoint_bub_ms( loc ) ), itm ); + item_location itm_loc = item_location( map_cursor( loc ), itm ); here.update_lum( itm_loc, true ); } } @@ -7206,7 +7202,7 @@ static void sendRadioSignal( Character &p, const flag_id &signal ) } } -std::optional iuse::radiocontrol_tick( Character *p, item *it, const tripoint & ) +std::optional iuse::radiocontrol_tick( Character *p, item *it, const tripoint_bub_ms & ) { if( !p ) { // Player has dropped the controller @@ -7225,7 +7221,7 @@ std::optional iuse::radiocontrol_tick( Character *p, item *it, const tripoi return 1; } -std::optional iuse::radiocontrol( Character *p, item *it, const tripoint & ) +std::optional iuse::radiocontrol( Character *p, item *it, const tripoint_bub_ms & ) { const char *car_action = nullptr; @@ -7366,7 +7362,7 @@ static bool hackveh( Character &p, item &it, vehicle &veh ) return success; } -static vehicle *pickveh( const tripoint ¢er, bool advanced ) +static vehicle *pickveh( const tripoint_bub_ms ¢er, bool advanced ) { static const std::string ctrl = "CTRL_ELECTRONIC"; static const std::string advctrl = "REMOTE_CONTROLS"; @@ -7376,7 +7372,7 @@ static vehicle *pickveh( const tripoint ¢er, bool advanced ) for( wrapped_vehicle &veh : get_map().get_vehicles() ) { vehicle *&v = veh.v; - if( rl_dist( center, v->pos_bub().raw() ) < 40 && + if( rl_dist( center, v->pos_bub() ) < 40 && v->fuel_left( itype_battery ) > 0 && ( !empty( v->get_avail_parts( advctrl ) ) || ( !advanced && !empty( v->get_avail_parts( ctrl ) ) ) ) ) { @@ -7409,7 +7405,7 @@ static vehicle *pickveh( const tripoint ¢er, bool advanced ) } } -std::optional iuse::remoteveh_tick( Character *p, item *it, const tripoint & ) +std::optional iuse::remoteveh_tick( Character *p, item *it, const tripoint_bub_ms & ) { vehicle *remote = g->remoteveh(); bool stop = false; @@ -7431,7 +7427,7 @@ std::optional iuse::remoteveh_tick( Character *p, item *it, const tripoint return 1; } -std::optional iuse::remoteveh( Character *p, item *it, const tripoint &pos ) +std::optional iuse::remoteveh( Character *p, item *it, const tripoint_bub_ms &pos ) { vehicle *remote = g->remoteveh(); @@ -7543,9 +7539,8 @@ static bool multicooker_hallu( Character &p ) } -std::optional iuse::multicooker( Character *p, item *it, const tripoint &pos ) +std::optional iuse::multicooker( Character *p, item *it, const tripoint_bub_ms &pos ) { - const tripoint_bub_ms position{pos}; // TODO: Get rid of this when operation typified. static const int charges_to_start = 50; const int charge_buffer = 2; @@ -7754,7 +7749,7 @@ std::optional iuse::multicooker( Character *p, item *it, const tripoint &po _( "The screen flashes blue symbols and scales as the multi-cooker begins to shake." ) ); it->convert( itype_multi_cooker_filled, p ).active = true; - it->ammo_consume( charges_to_start - charge_buffer, position, p ); + it->ammo_consume( charges_to_start - charge_buffer, pos, p ); p->practice( skill_cooking, meal->difficulty * 3 ); //little bonus @@ -7832,9 +7827,8 @@ std::optional iuse::multicooker( Character *p, item *it, const tripoint &po return 0; } -std::optional iuse::multicooker_tick( Character *p, item *it, const tripoint &pos ) +std::optional iuse::multicooker_tick( Character *p, item *it, const tripoint_bub_ms &pos ) { - const tripoint_bub_ms position{pos}; // TODO: Get rid of this when operation typified. const int charge_buffer = 2; //stop action before power runs out and iuse deletes the cooker @@ -7843,7 +7837,7 @@ std::optional iuse::multicooker_tick( Character *p, item *it, const tripoin it->erase_var( "RECIPE" ); it->convert( itype_multi_cooker, p ); //drain the buffer amount given at activation - it->ammo_consume( charge_buffer, position, p ); + it->ammo_consume( charge_buffer, pos, p ); p->add_msg_if_player( m_info, _( "Batteries low, entering standby mode. With a low buzzing sound the multi-cooker shuts down." ) ); return 0; @@ -7870,7 +7864,7 @@ std::optional iuse::multicooker_tick( Character *p, item *it, const tripoin meal.heat_up(); } else { meal.set_item_temperature( std::max( temperatures::cold, - get_weather().get_temperature( position.raw() ) ) ); + get_weather().get_temperature( pos.raw() ) ) ); } it->active = false; @@ -7885,7 +7879,7 @@ std::optional iuse::multicooker_tick( Character *p, item *it, const tripoin } //~ sound of a multi-cooker finishing its cycle! - sounds::sound( position, 8, sounds::sound_t::alarm, _( "ding!" ), true, "misc", "ding" ); + sounds::sound( pos, 8, sounds::sound_t::alarm, _( "ding!" ), true, "misc", "ding" ); return 0; } else { @@ -7896,7 +7890,7 @@ std::optional iuse::multicooker_tick( Character *p, item *it, const tripoin return 0; } -std::optional iuse::weather_tool( Character *p, item *it, const tripoint & ) +std::optional iuse::weather_tool( Character *p, item *it, const tripoint_bub_ms & ) { weather_manager &weather = get_weather(); const w_point weatherPoint = *weather.weather_precise; @@ -7966,7 +7960,7 @@ std::optional iuse::weather_tool( Character *p, item *it, const tripoint & return 1; //TODO check } -std::optional iuse::sextant( Character *p, item *, const tripoint &pos ) +std::optional iuse::sextant( Character *p, item *, const tripoint_bub_ms &pos ) { const std::pair sun_position = sun_azimuth_altitude( calendar::turn ); const float altitude = to_degrees( sun_position.second ); @@ -7985,20 +7979,20 @@ std::optional iuse::sextant( Character *p, item *, const tripoint &pos ) return 0; } -std::optional iuse::lux_meter( Character *p, item *it, const tripoint &pos ) +std::optional iuse::lux_meter( Character *p, item *it, const tripoint_bub_ms &pos ) { p->add_msg_if_player( m_neutral, _( "The illumination is %.1f." ), - g->natural_light_level( pos.z ) ); + g->natural_light_level( pos.z() ) ); return it->type->charges_to_use(); } -std::optional iuse::dbg_lux_meter( Character *p, item *, const tripoint &pos ) +std::optional iuse::dbg_lux_meter( Character *p, item *, const tripoint_bub_ms &pos ) { map &here = get_map(); const float incident_light = incident_sunlight( current_weather( here.getglobal( pos ) ), calendar::turn ); - const float nat_light = g->natural_light_level( pos.z ); + const float nat_light = g->natural_light_level( pos.z() ); const float sunlight = sun_light_at( calendar::turn ); const float sun_irrad = sun_irradiance( calendar::turn ); const float incident_irrad = incident_sun_irradiance( current_weather( here.getglobal( pos ) ), @@ -8010,7 +8004,7 @@ std::optional iuse::dbg_lux_meter( Character *p, item *, const tripoint &po return 0; } -std::optional iuse::calories_intake_tracker( Character *p, item *it, const tripoint & ) +std::optional iuse::calories_intake_tracker( Character *p, item *it, const tripoint_bub_ms & ) { if( p->has_trait( trait_ILLITERATE ) ) { p->add_msg_if_player( m_info, _( "You don't know what you're looking at." ) ); @@ -8031,18 +8025,19 @@ std::optional iuse::calories_intake_tracker( Character *p, item *it, const return 1; } -std::optional iuse::directional_hologram( Character *p, item *it, const tripoint & ) +std::optional iuse::directional_hologram( Character *p, item *it, const tripoint_bub_ms & ) { if( it->is_armor() && !p->is_worn( *it ) ) { p->add_msg_if_player( m_neutral, _( "You need to wear the %1$s before activating it." ), it->tname() ); return std::nullopt; } - const std::optional posp = choose_adjacent( _( "Choose hologram direction." ) ); + const std::optional posp = choose_adjacent_bub( + _( "Choose hologram direction." ) ); if( !posp ) { return std::nullopt; } - const tripoint delta = *posp - get_player_character().pos(); + const tripoint_rel_ms delta = *posp - get_player_character().pos_bub(); monster *const hologram = g->place_critter_at( mon_hologram, *posp ); if( !hologram ) { @@ -8059,7 +8054,7 @@ std::optional iuse::directional_hologram( Character *p, item *it, const tri return 1; } -std::optional iuse::capture_monster_veh( Character *p, item *it, const tripoint &pos ) +std::optional iuse::capture_monster_veh( Character *p, item *it, const tripoint_bub_ms &pos ) { if( p->cant_do_mounted() ) { return std::nullopt; @@ -8112,9 +8107,8 @@ int item::contain_monster( const tripoint_bub_ms &target ) return 0; } -std::optional iuse::capture_monster_act( Character *p, item *it, const tripoint &pos ) +std::optional iuse::capture_monster_act( Character *p, item *it, const tripoint_bub_ms &pos ) { - const tripoint_bub_ms position{ pos }; // TODO: Get rid of this when typing operation. if( p->is_mounted() ) { p->add_msg_if_player( m_info, _( "You can't capture a creature mounted." ) ); return std::nullopt; @@ -8123,7 +8117,7 @@ std::optional iuse::capture_monster_act( Character *p, item *it, const trip // Remember contained_name for messages after release_monster erases it const std::string contained_name = it->get_var( "contained_name", "" ); - if( it->release_monster( position ) ) { + if( it->release_monster( pos ) ) { p->invalidate_weight_carried_cache(); // It's been activated somewhere where there isn't a player or monster, good. return 0; @@ -8463,7 +8457,7 @@ static bool heat_items( Character *p, item *it, bool liquid_items, bool solid_it return true; } -std::optional iuse::heat_solid_items( Character *p, item *it, const tripoint & ) +std::optional iuse::heat_solid_items( Character *p, item *it, const tripoint_bub_ms & ) { if( p->fine_detail_vision_mod() > 4 ) { p->add_msg_if_player( _( "You can't see to do that!" ) ); @@ -8483,7 +8477,7 @@ std::optional iuse::heat_solid_items( Character *p, item *it, const tripoin return std::nullopt; } -std::optional iuse::heat_liquid_items( Character *p, item *it, const tripoint & ) +std::optional iuse::heat_liquid_items( Character *p, item *it, const tripoint_bub_ms & ) { if( p->fine_detail_vision_mod() > 4 ) { p->add_msg_if_player( _( "You can't see to do that!" ) ); @@ -8503,7 +8497,7 @@ std::optional iuse::heat_liquid_items( Character *p, item *it, const tripoi return std::nullopt; } -std::optional iuse::heat_all_items( Character *p, item *it, const tripoint & ) +std::optional iuse::heat_all_items( Character *p, item *it, const tripoint_bub_ms & ) { if( p->fine_detail_vision_mod() > 4 ) { p->add_msg_if_player( _( "You can't see to do that!" ) ); @@ -8531,7 +8525,7 @@ washing_requirements washing_requirements_for_volume( const units::volume &vol ) return { water, cleanser, time }; } -std::optional iuse::wash_soft_items( Character *p, item *, const tripoint & ) +std::optional iuse::wash_soft_items( Character *p, item *, const tripoint_bub_ms & ) { if( p->fine_detail_vision_mod() > 4 ) { p->add_msg_if_player( _( "You can't see to do that!" ) ); @@ -8551,7 +8545,7 @@ std::optional iuse::wash_soft_items( Character *p, item *, const tripoint & return 0; } -std::optional iuse::wash_hard_items( Character *p, item *, const tripoint & ) +std::optional iuse::wash_hard_items( Character *p, item *, const tripoint_bub_ms & ) { if( p->fine_detail_vision_mod() > 4 ) { p->add_msg_if_player( _( "You can't see to do that!" ) ); @@ -8571,7 +8565,7 @@ std::optional iuse::wash_hard_items( Character *p, item *, const tripoint & return 0; } -std::optional iuse::wash_all_items( Character *p, item *, const tripoint & ) +std::optional iuse::wash_all_items( Character *p, item *, const tripoint_bub_ms & ) { if( p->fine_detail_vision_mod() > 4 ) { p->add_msg_if_player( _( "You can't see to do that!" ) ); @@ -8690,7 +8684,7 @@ std::optional iuse::wash_items( Character *p, bool soft_items, bool hard_it return 0; } -std::optional iuse::break_stick( Character *p, item *it, const tripoint & ) +std::optional iuse::break_stick( Character *p, item *it, const tripoint_bub_ms & ) { p->mod_moves( -to_moves( 2_seconds ) ); p->mod_stamina( static_cast( 0.05f * p->get_stamina_max() ) ); @@ -8725,7 +8719,7 @@ std::optional iuse::break_stick( Character *p, item *it, const tripoint & ) return 0; } -std::optional iuse::weak_antibiotic( Character *p, item *it, const tripoint & ) +std::optional iuse::weak_antibiotic( Character *p, item *it, const tripoint_bub_ms & ) { p->add_msg_if_player( _( "You take some %s." ), it->tname() ); if( p->has_effect( effect_infected ) && !p->has_effect( effect_weak_antibiotic ) ) { @@ -8736,7 +8730,7 @@ std::optional iuse::weak_antibiotic( Character *p, item *it, const tripoint return 1; } -std::optional iuse::strong_antibiotic( Character *p, item *it, const tripoint & ) +std::optional iuse::strong_antibiotic( Character *p, item *it, const tripoint_bub_ms & ) { p->add_msg_if_player( _( "You take some %s." ), it->tname() ); if( p->has_effect( effect_infected ) && !p->has_effect( effect_strong_antibiotic ) ) { @@ -8766,7 +8760,7 @@ static item *wield_before_use( Character *const p, item *const it, const std::st return it; } -std::optional iuse::craft( Character *p, item *it, const tripoint & ) +std::optional iuse::craft( Character *p, item *it, const tripoint_bub_ms & ) { if( p->cant_do_mounted() ) { return std::nullopt; @@ -8803,7 +8797,7 @@ std::optional iuse::craft( Character *p, item *it, const tripoint & ) return 0; } -std::optional iuse::disassemble( Character *p, item *it, const tripoint & ) +std::optional iuse::disassemble( Character *p, item *it, const tripoint_bub_ms & ) { if( p->cant_do_mounted() ) { return std::nullopt; @@ -8821,7 +8815,7 @@ std::optional iuse::disassemble( Character *p, item *it, const tripoint & ) return 0; } -std::optional iuse::post_up( Character *p, item *it, const tripoint & ) +std::optional iuse::post_up( Character *p, item *it, const tripoint_bub_ms & ) { map &here = get_map(); @@ -8846,7 +8840,7 @@ std::optional iuse::post_up( Character *p, item *it, const tripoint & ) return 0; } -std::optional iuse::melatonin_tablet( Character *p, item *it, const tripoint & ) +std::optional iuse::melatonin_tablet( Character *p, item *it, const tripoint_bub_ms & ) { p->add_msg_if_player( _( "You pop a %s." ), it->tname() ); if( p->has_effect( effect_melatonin ) ) { @@ -8857,14 +8851,14 @@ std::optional iuse::melatonin_tablet( Character *p, item *it, const tripoin return 1; } -std::optional iuse::coin_flip( Character *p, item *it, const tripoint & ) +std::optional iuse::coin_flip( Character *p, item *it, const tripoint_bub_ms & ) { p->add_msg_if_player( m_info, _( "You flip a %s." ), it->tname() ); p->add_msg_if_player( m_info, one_in( 2 ) ? _( "Heads!" ) : _( "Tails!" ) ); return 0; } -std::optional iuse::play_game( Character *p, item *it, const tripoint & ) +std::optional iuse::play_game( Character *p, item *it, const tripoint_bub_ms & ) { if( p->is_avatar() ) { std::vector followers = g->get_npcs_if( [p]( const npc & n ) { @@ -8912,7 +8906,7 @@ std::optional iuse::play_game( Character *p, item *it, const tripoint & ) return 0; } -std::optional iuse::magic_8_ball( Character *p, item *it, const tripoint & ) +std::optional iuse::magic_8_ball( Character *p, item *it, const tripoint_bub_ms & ) { p->add_msg_if_player( m_info, _( "You ask the %s, then flip it." ), it->tname() ); int rn = rng( 0, 3 ); @@ -8933,7 +8927,7 @@ std::optional iuse::magic_8_ball( Character *p, item *it, const tripoint & return 0; } -std::optional iuse::measure_resonance( Character *p, item *it, const tripoint & ) +std::optional iuse::measure_resonance( Character *p, item *it, const tripoint_bub_ms & ) { if( !it->ammo_sufficient( p ) ) { popup( _( "The device doesn't have enough power to function!" ) ); @@ -8999,7 +8993,7 @@ std::optional iuse::measure_resonance( Character *p, item *it, const tripoi return 0; } -std::optional iuse::change_outfit( Character *p, item *it, const tripoint & ) +std::optional iuse::change_outfit( Character *p, item *it, const tripoint_bub_ms & ) { if( !p->is_avatar() ) { debugmsg( "NPC %s tried to swap outfit", p->get_name() ); @@ -9012,7 +9006,7 @@ std::optional iuse::change_outfit( Character *p, item *it, const tripoint & return std::nullopt; } -std::optional iuse::electricstorage( Character *p, item *it, const tripoint & ) +std::optional iuse::electricstorage( Character *p, item *it, const tripoint_bub_ms & ) { // From item processing if( !p ) { @@ -9140,7 +9134,7 @@ std::optional iuse::electricstorage( Character *p, item *it, const tripoint return std::nullopt; } -std::optional iuse::ebooksave( Character *p, item *it, const tripoint & ) +std::optional iuse::ebooksave( Character *p, item *it, const tripoint_bub_ms & ) { if( !p ) { debugmsg( "%s called action ebooksave that requires character but no character is present", @@ -9187,7 +9181,7 @@ std::optional iuse::ebooksave( Character *p, item *it, const tripoint & ) return std::nullopt; } -std::optional iuse::ebookread( Character *p, item *it, const tripoint & ) +std::optional iuse::ebookread( Character *p, item *it, const tripoint_bub_ms & ) { if( !p ) { debugmsg( "%s called action ebookread that requires character but no character is present", @@ -9220,7 +9214,7 @@ std::optional iuse::ebookread( Character *p, item *it, const tripoint & ) if( p->fine_detail_vision_mod() > 4 && !it->active && it->is_transformable() ) { const use_function *readinglight = it->type->get_use( "transform" ); if( readinglight ) { - readinglight->call( p, *it, p->pos() ); + readinglight->call( p, *it, p->pos_bub() ); } } @@ -9236,7 +9230,7 @@ std::optional iuse::ebookread( Character *p, item *it, const tripoint & ) return std::nullopt; } -std::optional iuse::binder_add_recipe( Character *p, item *binder, const tripoint & ) +std::optional iuse::binder_add_recipe( Character *p, item *binder, const tripoint_bub_ms & ) { if( p->cant_do_mounted() ) { return std::nullopt; @@ -9313,9 +9307,8 @@ std::optional iuse::binder_add_recipe( Character *p, item *binder, const tr } std::optional iuse::binder_manage_recipe( Character *p, item *binder, - const tripoint &ipos ) + const tripoint_bub_ms &ipos ) { - const tripoint_bub_ms pos{ ipos }; // TODO: Get rid of this when operation typified. if( p->is_underwater() ) { p->add_msg_if_player( m_info, _( "Doing that would ruin the %1$s." ), binder->tname() ); return std::nullopt; @@ -9355,14 +9348,14 @@ std::optional iuse::binder_manage_recipe( Character *p, item *binder, binder->set_saved_recipes( binder_recipes ); const int pages = bookbinder_copy_activity_actor::pages_for_recipe( *rec ); - binder->ammo_consume( pages, pos, p ); + binder->ammo_consume( pages, ipos, p ); return std::nullopt; } -std::optional iuse::voltmeter( Character *p, item *, const tripoint & ) +std::optional iuse::voltmeter( Character *p, item *, const tripoint_bub_ms & ) { - const std::optional pnt_ = choose_adjacent( _( "Check voltage where?" ) ); + const std::optional pnt_ = choose_adjacent_bub( _( "Check voltage where?" ) ); if( !pnt_ ) { return std::nullopt; } @@ -9390,7 +9383,7 @@ void use_function::dump_info( const item &it, std::vector &dump ) cons } ret_val use_function::can_call( const Character &p, const item &it, - const tripoint &pos ) const + const tripoint_bub_ms &pos ) const { if( actor == nullptr ) { return ret_val::make_failure( _( "You can't do anything interesting with your %s." ), @@ -9403,14 +9396,8 @@ ret_val use_function::can_call( const Character &p, const item &it, return actor->can_use( p, it, pos ); } -std::optional use_function::call( Character *p, item &it, - const tripoint &pos ) const -{ - return actor->use( p, it, pos ); -} - std::optional use_function::call( Character *p, item &it, const tripoint_bub_ms &pos ) const { - return use_function::call( p, it, pos.raw() ); + return actor->use( p, it, pos ); } diff --git a/src/iuse.h b/src/iuse.h index 5f523e7e9847b..989e869c121f5 100644 --- a/src/iuse.h +++ b/src/iuse.h @@ -9,6 +9,7 @@ #include #include "clone_ptr.h" +#include "coords_fwd.h" #include "item_location.h" #include "type_id.h" #include "units_fwd.h" @@ -18,7 +19,6 @@ class JsonObject; class item; class monster; struct iteminfo; -struct tripoint; template class ret_val; // iuse methods return the number of charges expended, which is usually "1", or no value. @@ -30,203 +30,203 @@ namespace iuse { // FOOD AND DRUGS (ADMINISTRATION) -std::optional alcohol_medium( Character *, item *, const tripoint & ); -std::optional alcohol_strong( Character *, item *, const tripoint & ); -std::optional alcohol_weak( Character *, item *, const tripoint & ); -std::optional antibiotic( Character *, item *, const tripoint & ); -std::optional anticonvulsant( Character *, item *, const tripoint & ); -std::optional antifungal( Character *, item *, const tripoint & ); -std::optional antiparasitic( Character *, item *, const tripoint & ); -std::optional blech( Character *, item *, const tripoint & ); -std::optional blech_because_unclean( Character *, item *, const tripoint & ); -std::optional chew( Character *, item *, const tripoint & ); -std::optional coke( Character *, item *, const tripoint & ); -std::optional datura( Character *, item *, const tripoint & ); -std::optional ecig( Character *, item *, const tripoint & ); -std::optional eyedrops( Character *, item *, const tripoint & ); -std::optional flu_vaccine( Character *, item *, const tripoint & ); -std::optional flumed( Character *, item *, const tripoint & ); -std::optional flusleep( Character *, item *, const tripoint & ); -std::optional fungicide( Character *, item *, const tripoint & ); -std::optional honeycomb( Character *, item *, const tripoint & ); -std::optional inhaler( Character *, item *, const tripoint & ); -std::optional marloss( Character *, item *, const tripoint & ); -std::optional marloss_gel( Character *, item *, const tripoint & ); -std::optional marloss_seed( Character *, item *, const tripoint & ); -std::optional meditate( Character *, item *, const tripoint & ); -std::optional meth( Character *, item *, const tripoint & ); -std::optional mycus( Character *, item *, const tripoint & ); -std::optional petfood( Character *p, item *it, const tripoint & ); -std::optional plantblech( Character *, item *, const tripoint & ); -std::optional poison( Character *, item *, const tripoint & ); -std::optional prozac( Character *, item *, const tripoint & ); -std::optional purify_smart( Character *, item *, const tripoint & ); -std::optional sewage( Character *, item *, const tripoint & ); -std::optional smoking( Character *, item *, const tripoint & ); -std::optional thorazine( Character *, item *, const tripoint & ); -std::optional weed_cake( Character *, item *, const tripoint & ); -std::optional xanax( Character *, item *, const tripoint & ); +std::optional alcohol_medium( Character *, item *, const tripoint_bub_ms & ); +std::optional alcohol_strong( Character *, item *, const tripoint_bub_ms & ); +std::optional alcohol_weak( Character *, item *, const tripoint_bub_ms & ); +std::optional antibiotic( Character *, item *, const tripoint_bub_ms & ); +std::optional anticonvulsant( Character *, item *, const tripoint_bub_ms & ); +std::optional antifungal( Character *, item *, const tripoint_bub_ms & ); +std::optional antiparasitic( Character *, item *, const tripoint_bub_ms & ); +std::optional blech( Character *, item *, const tripoint_bub_ms & ); +std::optional blech_because_unclean( Character *, item *, const tripoint_bub_ms & ); +std::optional chew( Character *, item *, const tripoint_bub_ms & ); +std::optional coke( Character *, item *, const tripoint_bub_ms & ); +std::optional datura( Character *, item *, const tripoint_bub_ms & ); +std::optional ecig( Character *, item *, const tripoint_bub_ms & ); +std::optional eyedrops( Character *, item *, const tripoint_bub_ms & ); +std::optional flu_vaccine( Character *, item *, const tripoint_bub_ms & ); +std::optional flumed( Character *, item *, const tripoint_bub_ms & ); +std::optional flusleep( Character *, item *, const tripoint_bub_ms & ); +std::optional fungicide( Character *, item *, const tripoint_bub_ms & ); +std::optional honeycomb( Character *, item *, const tripoint_bub_ms & ); +std::optional inhaler( Character *, item *, const tripoint_bub_ms & ); +std::optional marloss( Character *, item *, const tripoint_bub_ms & ); +std::optional marloss_gel( Character *, item *, const tripoint_bub_ms & ); +std::optional marloss_seed( Character *, item *, const tripoint_bub_ms & ); +std::optional meditate( Character *, item *, const tripoint_bub_ms & ); +std::optional meth( Character *, item *, const tripoint_bub_ms & ); +std::optional mycus( Character *, item *, const tripoint_bub_ms & ); +std::optional petfood( Character *p, item *it, const tripoint_bub_ms & ); +std::optional plantblech( Character *, item *, const tripoint_bub_ms & ); +std::optional poison( Character *, item *, const tripoint_bub_ms & ); +std::optional prozac( Character *, item *, const tripoint_bub_ms & ); +std::optional purify_smart( Character *, item *, const tripoint_bub_ms & ); +std::optional sewage( Character *, item *, const tripoint_bub_ms & ); +std::optional smoking( Character *, item *, const tripoint_bub_ms & ); +std::optional thorazine( Character *, item *, const tripoint_bub_ms & ); +std::optional weed_cake( Character *, item *, const tripoint_bub_ms & ); +std::optional xanax( Character *, item *, const tripoint_bub_ms & ); // TOOLS -std::optional acidbomb_act( Character *, item *, const tripoint & ); -std::optional adrenaline_injector( Character *, item *, const tripoint & ); -std::optional afs_translocator( Character *, item *, const tripoint & ); -std::optional bell( Character *, item *, const tripoint & ); -std::optional blood_draw( Character *, item *, const tripoint & ); -std::optional boltcutters( Character *, item *, const tripoint & ); -std::optional break_stick( Character *, item *, const tripoint & ); -std::optional c4( Character *, item *, const tripoint & ); -std::optional call_of_tindalos( Character *, item *, const tripoint & ); -std::optional camera( Character *, item *, const tripoint & ); -std::optional can_goo( Character *, item *, const tripoint & ); -std::optional capture_monster_act( Character *, item *, const tripoint & ); -std::optional heat_solid_items( Character *p, item *it, const tripoint & ); -std::optional heat_liquid_items( Character *p, item *it, const tripoint & ); -std::optional heat_all_items( Character *p, item *it, const tripoint & ); -std::optional capture_monster_veh( Character *, item *, const tripoint & ); -std::optional change_eyes( Character *, item *, const tripoint & ); -std::optional change_skin( Character *, item *, const tripoint & ); -std::optional chop_logs( Character *, item *, const tripoint & ); -std::optional chop_tree( Character *, item *, const tripoint & ); -std::optional clear_rubble( Character *, item *, const tripoint & ); -std::optional coin_flip( Character *, item *, const tripoint & ); -std::optional contacts( Character *, item *, const tripoint & ); -std::optional crowbar( Character *, item *, const tripoint & ); -std::optional crowbar_weak( Character *, item *, const tripoint & ); -std::optional dig( Character *, item *, const tripoint & ); -std::optional dig_channel( Character *, item *, const tripoint & ); -std::optional directional_antenna( Character *, item *, const tripoint & ); -std::optional directional_hologram( Character *, item *, const tripoint & ); -std::optional dive_tank_activate( Character *, item *, const tripoint & ); -std::optional dive_tank( Character *, item *, const tripoint & ); -std::optional dog_whistle( Character *, item *, const tripoint & ); -std::optional ehandcuffs( Character *, item *, const tripoint & ); -std::optional ehandcuffs_tick( Character *, item *, const tripoint & ); -std::optional epic_music( Character *, item *, const tripoint & ); -std::optional einktabletpc( Character *, item *, const tripoint & ); -std::optional emf_passive_on( Character *, item *, const tripoint & ); -std::optional extinguisher( Character *, item *, const tripoint & ); -std::optional fill_pit( Character *, item *, const tripoint & ); -std::optional firecracker( Character *, item *, const tripoint & ); -std::optional firecracker_pack( Character *, item *, const tripoint & ); -std::optional firecracker_pack_act( Character *, item *, const tripoint & ); -std::optional fish_trap( Character *, item *, const tripoint & ); -std::optional fish_trap_tick( Character *, item *, const tripoint & ); -std::optional fishing_rod( Character *, item *, const tripoint & ); -std::optional fitness_check( Character *p, item *it, const tripoint & ); -std::optional foodperson( Character *, item *, const tripoint & ); -std::optional foodperson_voice( Character *, item *, const tripoint & ); -std::optional gasmask( Character *, item *, const tripoint & ); -std::optional gasmask_activate( Character *, item *, const tripoint & ); -std::optional geiger( Character *, item *, const tripoint & ); -std::optional geiger_active( Character *, item *, const tripoint & ); -std::optional granade_act( Character *, item *, const tripoint & ); -std::optional grenade_inc_act( Character *, item *, const tripoint & ); -std::optional gun_repair( Character *, item *, const tripoint & ); -std::optional gunmod_attach( Character *, item *, const tripoint & ); -std::optional hacksaw( Character *, item *, const tripoint &it_pnt ); -std::optional hairkit( Character *, item *, const tripoint & ); -std::optional hand_crank( Character *, item *, const tripoint & ); -std::optional heat_food( Character *, item *, const tripoint & ); -std::optional heatpack( Character *, item *, const tripoint & ); -std::optional hotplate( Character *, item *, const tripoint & ); -std::optional hotplate_atomic( Character *, item *, const tripoint & ); -std::optional jackhammer( Character *, item *, const tripoint & ); -std::optional jet_injector( Character *, item *, const tripoint & ); -std::optional lumber( Character *, item *, const tripoint & ); -std::optional ma_manual( Character *, item *, const tripoint & ); -std::optional magic_8_ball( Character *, item *, const tripoint & ); -std::optional measure_resonance( Character *, item *, const tripoint & ); -std::optional change_outfit( Character *, item *, const tripoint & ); -std::optional electricstorage( Character *, item *, const tripoint & ); -std::optional ebooksave( Character *, item *, const tripoint & ); -std::optional ebookread( Character *, item *, const tripoint & ); -std::optional makemound( Character *, item *, const tripoint & ); -std::optional mace( Character *, item *, const tripoint & ); -std::optional manage_exosuit( Character *, item *, const tripoint & ); -std::optional melatonin_tablet( Character *, item *, const tripoint & ); -std::optional mininuke( Character *, item *, const tripoint & ); -std::optional molotov_lit( Character *, item *, const tripoint & ); -std::optional mop( Character *, item *, const tripoint & ); -std::optional mp3( Character *, item *, const tripoint & ); -std::optional mp3_on( Character *, item *, const tripoint & ); -std::optional mp3_deactivate( Character *, item *, const tripoint & ); -std::optional noise_emitter_on( Character *, item *, const tripoint & ); -std::optional oxygen_bottle( Character *, item *, const tripoint & ); -std::optional oxytorch( Character *, item *, const tripoint & ); -std::optional binder_add_recipe( Character *, item *, const tripoint & ); -std::optional binder_manage_recipe( Character *, item *, const tripoint & ); -std::optional pack_cbm( Character *p, item *it, const tripoint & ); -std::optional pack_item( Character *, item *, const tripoint & ); -std::optional pick_lock( Character *p, item *it, const tripoint &pos ); -std::optional pickaxe( Character *, item *, const tripoint & ); -std::optional play_game( Character *, item *, const tripoint & ); -std::optional portable_game( Character *, item *, const tripoint & ); -std::optional portal( Character *, item *, const tripoint & ); -std::optional radglove( Character *, item *, const tripoint & ); -std::optional radio_mod( Character *, item *, const tripoint & ); -std::optional radio_off( Character *, item *, const tripoint & ); -std::optional radio_on( Character *, item *, const tripoint & ); -std::optional radio_tick( Character *, item *, const tripoint & ); -std::optional remove_all_mods( Character *, item *, const tripoint & ); -std::optional robotcontrol( Character *, item *, const tripoint & ); -std::optional rpgdie( Character *, item *, const tripoint & ); -std::optional seed( Character *, item *, const tripoint & ); -std::optional shavekit( Character *, item *, const tripoint & ); -std::optional shocktonfa_off( Character *, item *, const tripoint & ); -std::optional shocktonfa_on( Character *, item *, const tripoint & ); -std::optional siphon( Character *, item *, const tripoint & ); -std::optional solarpack( Character *, item *, const tripoint & ); -std::optional solarpack_off( Character *, item *, const tripoint & ); -std::optional spray_can( Character *, item *, const tripoint & ); -std::optional stimpack( Character *, item *, const tripoint & ); -std::optional strong_antibiotic( Character *, item *, const tripoint & ); -std::optional talking_doll( Character *, item *, const tripoint & ); -std::optional tazer( Character *, item *, const tripoint & ); -std::optional tazer2( Character *, item *, const tripoint & ); -std::optional teleport( Character *, item *, const tripoint & ); -std::optional toolmod_attach( Character *, item *, const tripoint & ); -std::optional towel( Character *, item *, const tripoint & ); -std::optional unfold_generic( Character *, item *, const tripoint & ); -std::optional unpack_item( Character *, item *, const tripoint & ); -std::optional vibe( Character *, item *, const tripoint & ); -std::optional voltmeter( Character *p, item *it, const tripoint & ); -std::optional vortex( Character *, item *, const tripoint & ); -std::optional wash_all_items( Character *, item *, const tripoint & ); -std::optional wash_hard_items( Character *, item *, const tripoint & ); +std::optional acidbomb_act( Character *, item *, const tripoint_bub_ms & ); +std::optional adrenaline_injector( Character *, item *, const tripoint_bub_ms & ); +std::optional afs_translocator( Character *, item *, const tripoint_bub_ms & ); +std::optional bell( Character *, item *, const tripoint_bub_ms & ); +std::optional blood_draw( Character *, item *, const tripoint_bub_ms & ); +std::optional boltcutters( Character *, item *, const tripoint_bub_ms & ); +std::optional break_stick( Character *, item *, const tripoint_bub_ms & ); +std::optional c4( Character *, item *, const tripoint_bub_ms & ); +std::optional call_of_tindalos( Character *, item *, const tripoint_bub_ms & ); +std::optional camera( Character *, item *, const tripoint_bub_ms & ); +std::optional can_goo( Character *, item *, const tripoint_bub_ms & ); +std::optional capture_monster_act( Character *, item *, const tripoint_bub_ms & ); +std::optional heat_solid_items( Character *p, item *it, const tripoint_bub_ms & ); +std::optional heat_liquid_items( Character *p, item *it, const tripoint_bub_ms & ); +std::optional heat_all_items( Character *p, item *it, const tripoint_bub_ms & ); +std::optional capture_monster_veh( Character *, item *, const tripoint_bub_ms & ); +std::optional change_eyes( Character *, item *, const tripoint_bub_ms & ); +std::optional change_skin( Character *, item *, const tripoint_bub_ms & ); +std::optional chop_logs( Character *, item *, const tripoint_bub_ms & ); +std::optional chop_tree( Character *, item *, const tripoint_bub_ms & ); +std::optional clear_rubble( Character *, item *, const tripoint_bub_ms & ); +std::optional coin_flip( Character *, item *, const tripoint_bub_ms & ); +std::optional contacts( Character *, item *, const tripoint_bub_ms & ); +std::optional crowbar( Character *, item *, const tripoint_bub_ms & ); +std::optional crowbar_weak( Character *, item *, const tripoint_bub_ms & ); +std::optional dig( Character *, item *, const tripoint_bub_ms & ); +std::optional dig_channel( Character *, item *, const tripoint_bub_ms & ); +std::optional directional_antenna( Character *, item *, const tripoint_bub_ms & ); +std::optional directional_hologram( Character *, item *, const tripoint_bub_ms & ); +std::optional dive_tank_activate( Character *, item *, const tripoint_bub_ms & ); +std::optional dive_tank( Character *, item *, const tripoint_bub_ms & ); +std::optional dog_whistle( Character *, item *, const tripoint_bub_ms & ); +std::optional ehandcuffs( Character *, item *, const tripoint_bub_ms & ); +std::optional ehandcuffs_tick( Character *, item *, const tripoint_bub_ms & ); +std::optional epic_music( Character *, item *, const tripoint_bub_ms & ); +std::optional einktabletpc( Character *, item *, const tripoint_bub_ms & ); +std::optional emf_passive_on( Character *, item *, const tripoint_bub_ms & ); +std::optional extinguisher( Character *, item *, const tripoint_bub_ms & ); +std::optional fill_pit( Character *, item *, const tripoint_bub_ms & ); +std::optional firecracker( Character *, item *, const tripoint_bub_ms & ); +std::optional firecracker_pack( Character *, item *, const tripoint_bub_ms & ); +std::optional firecracker_pack_act( Character *, item *, const tripoint_bub_ms & ); +std::optional fish_trap( Character *, item *, const tripoint_bub_ms & ); +std::optional fish_trap_tick( Character *, item *, const tripoint_bub_ms & ); +std::optional fishing_rod( Character *, item *, const tripoint_bub_ms & ); +std::optional fitness_check( Character *p, item *it, const tripoint_bub_ms & ); +std::optional foodperson( Character *, item *, const tripoint_bub_ms & ); +std::optional foodperson_voice( Character *, item *, const tripoint_bub_ms & ); +std::optional gasmask( Character *, item *, const tripoint_bub_ms & ); +std::optional gasmask_activate( Character *, item *, const tripoint_bub_ms & ); +std::optional geiger( Character *, item *, const tripoint_bub_ms & ); +std::optional geiger_active( Character *, item *, const tripoint_bub_ms & ); +std::optional granade_act( Character *, item *, const tripoint_bub_ms & ); +std::optional grenade_inc_act( Character *, item *, const tripoint_bub_ms & ); +std::optional gun_repair( Character *, item *, const tripoint_bub_ms & ); +std::optional gunmod_attach( Character *, item *, const tripoint_bub_ms & ); +std::optional hacksaw( Character *, item *, const tripoint_bub_ms &it_pnt ); +std::optional hairkit( Character *, item *, const tripoint_bub_ms & ); +std::optional hand_crank( Character *, item *, const tripoint_bub_ms & ); +std::optional heat_food( Character *, item *, const tripoint_bub_ms & ); +std::optional heatpack( Character *, item *, const tripoint_bub_ms & ); +std::optional hotplate( Character *, item *, const tripoint_bub_ms & ); +std::optional hotplate_atomic( Character *, item *, const tripoint_bub_ms & ); +std::optional jackhammer( Character *, item *, const tripoint_bub_ms & ); +std::optional jet_injector( Character *, item *, const tripoint_bub_ms & ); +std::optional lumber( Character *, item *, const tripoint_bub_ms & ); +std::optional ma_manual( Character *, item *, const tripoint_bub_ms & ); +std::optional magic_8_ball( Character *, item *, const tripoint_bub_ms & ); +std::optional measure_resonance( Character *, item *, const tripoint_bub_ms & ); +std::optional change_outfit( Character *, item *, const tripoint_bub_ms & ); +std::optional electricstorage( Character *, item *, const tripoint_bub_ms & ); +std::optional ebooksave( Character *, item *, const tripoint_bub_ms & ); +std::optional ebookread( Character *, item *, const tripoint_bub_ms & ); +std::optional makemound( Character *, item *, const tripoint_bub_ms & ); +std::optional mace( Character *, item *, const tripoint_bub_ms & ); +std::optional manage_exosuit( Character *, item *, const tripoint_bub_ms & ); +std::optional melatonin_tablet( Character *, item *, const tripoint_bub_ms & ); +std::optional mininuke( Character *, item *, const tripoint_bub_ms & ); +std::optional molotov_lit( Character *, item *, const tripoint_bub_ms & ); +std::optional mop( Character *, item *, const tripoint_bub_ms & ); +std::optional mp3( Character *, item *, const tripoint_bub_ms & ); +std::optional mp3_on( Character *, item *, const tripoint_bub_ms & ); +std::optional mp3_deactivate( Character *, item *, const tripoint_bub_ms & ); +std::optional noise_emitter_on( Character *, item *, const tripoint_bub_ms & ); +std::optional oxygen_bottle( Character *, item *, const tripoint_bub_ms & ); +std::optional oxytorch( Character *, item *, const tripoint_bub_ms & ); +std::optional binder_add_recipe( Character *, item *, const tripoint_bub_ms & ); +std::optional binder_manage_recipe( Character *, item *, const tripoint_bub_ms & ); +std::optional pack_cbm( Character *p, item *it, const tripoint_bub_ms & ); +std::optional pack_item( Character *, item *, const tripoint_bub_ms & ); +std::optional pick_lock( Character *p, item *it, const tripoint_bub_ms &pos ); +std::optional pickaxe( Character *, item *, const tripoint_bub_ms & ); +std::optional play_game( Character *, item *, const tripoint_bub_ms & ); +std::optional portable_game( Character *, item *, const tripoint_bub_ms & ); +std::optional portal( Character *, item *, const tripoint_bub_ms & ); +std::optional radglove( Character *, item *, const tripoint_bub_ms & ); +std::optional radio_mod( Character *, item *, const tripoint_bub_ms & ); +std::optional radio_off( Character *, item *, const tripoint_bub_ms & ); +std::optional radio_on( Character *, item *, const tripoint_bub_ms & ); +std::optional radio_tick( Character *, item *, const tripoint_bub_ms & ); +std::optional remove_all_mods( Character *, item *, const tripoint_bub_ms & ); +std::optional robotcontrol( Character *, item *, const tripoint_bub_ms & ); +std::optional rpgdie( Character *, item *, const tripoint_bub_ms & ); +std::optional seed( Character *, item *, const tripoint_bub_ms & ); +std::optional shavekit( Character *, item *, const tripoint_bub_ms & ); +std::optional shocktonfa_off( Character *, item *, const tripoint_bub_ms & ); +std::optional shocktonfa_on( Character *, item *, const tripoint_bub_ms & ); +std::optional siphon( Character *, item *, const tripoint_bub_ms & ); +std::optional solarpack( Character *, item *, const tripoint_bub_ms & ); +std::optional solarpack_off( Character *, item *, const tripoint_bub_ms & ); +std::optional spray_can( Character *, item *, const tripoint_bub_ms & ); +std::optional stimpack( Character *, item *, const tripoint_bub_ms & ); +std::optional strong_antibiotic( Character *, item *, const tripoint_bub_ms & ); +std::optional talking_doll( Character *, item *, const tripoint_bub_ms & ); +std::optional tazer( Character *, item *, const tripoint_bub_ms & ); +std::optional tazer2( Character *, item *, const tripoint_bub_ms & ); +std::optional teleport( Character *, item *, const tripoint_bub_ms & ); +std::optional toolmod_attach( Character *, item *, const tripoint_bub_ms & ); +std::optional towel( Character *, item *, const tripoint_bub_ms & ); +std::optional unfold_generic( Character *, item *, const tripoint_bub_ms & ); +std::optional unpack_item( Character *, item *, const tripoint_bub_ms & ); +std::optional vibe( Character *, item *, const tripoint_bub_ms & ); +std::optional voltmeter( Character *p, item *it, const tripoint_bub_ms & ); +std::optional vortex( Character *, item *, const tripoint_bub_ms & ); +std::optional wash_all_items( Character *, item *, const tripoint_bub_ms & ); +std::optional wash_hard_items( Character *, item *, const tripoint_bub_ms & ); std::optional wash_items( Character *p, bool soft_items, bool hard_items ); -std::optional wash_soft_items( Character *, item *, const tripoint & ); -std::optional water_purifier( Character *, item *, const tripoint & ); -std::optional water_tablets( Character *, item *, const tripoint & ); -std::optional weak_antibiotic( Character *, item *, const tripoint & ); -std::optional weather_tool( Character *, item *, const tripoint & ); -std::optional sextant( Character *, item *, const tripoint & ); -std::optional lux_meter( Character *, item *, const tripoint & ); -std::optional dbg_lux_meter( Character *, item *, const tripoint & ); -std::optional calories_intake_tracker( Character *p, item *, const tripoint & ); +std::optional wash_soft_items( Character *, item *, const tripoint_bub_ms & ); +std::optional water_purifier( Character *, item *, const tripoint_bub_ms & ); +std::optional water_tablets( Character *, item *, const tripoint_bub_ms & ); +std::optional weak_antibiotic( Character *, item *, const tripoint_bub_ms & ); +std::optional weather_tool( Character *, item *, const tripoint_bub_ms & ); +std::optional sextant( Character *, item *, const tripoint_bub_ms & ); +std::optional lux_meter( Character *, item *, const tripoint_bub_ms & ); +std::optional dbg_lux_meter( Character *, item *, const tripoint_bub_ms & ); +std::optional calories_intake_tracker( Character *p, item *, const tripoint_bub_ms & ); // MACGUFFINS -std::optional radiocar( Character *, item *, const tripoint & ); -std::optional radiocaron( Character *, item *, const tripoint & ); -std::optional radiocontrol( Character *, item *, const tripoint & ); -std::optional radiocontrol_tick( Character *, item *, const tripoint & ); +std::optional radiocar( Character *, item *, const tripoint_bub_ms & ); +std::optional radiocaron( Character *, item *, const tripoint_bub_ms & ); +std::optional radiocontrol( Character *, item *, const tripoint_bub_ms & ); +std::optional radiocontrol_tick( Character *, item *, const tripoint_bub_ms & ); -std::optional multicooker( Character *, item *, const tripoint & ); -std::optional multicooker_tick( Character *, item *, const tripoint & ); +std::optional multicooker( Character *, item *, const tripoint_bub_ms & ); +std::optional multicooker_tick( Character *, item *, const tripoint_bub_ms & ); -std::optional remoteveh( Character *, item *, const tripoint & ); -std::optional remoteveh_tick( Character *, item *, const tripoint & ); +std::optional remoteveh( Character *, item *, const tripoint_bub_ms & ); +std::optional remoteveh_tick( Character *, item *, const tripoint_bub_ms & ); -std::optional craft( Character *, item *, const tripoint & ); +std::optional craft( Character *, item *, const tripoint_bub_ms & ); -std::optional disassemble( Character *, item *, const tripoint & ); +std::optional disassemble( Character *, item *, const tripoint_bub_ms & ); -std::optional post_up( Character *, item *, const tripoint & ); +std::optional post_up( Character *, item *, const tripoint_bub_ms & ); // Helper functions for other iuse functions void cut_log_into_planks( Character & ); -void play_music( Character *p, const tripoint &source, int volume, int max_morale, +void play_music( Character *p, const tripoint_bub_ms &source, int volume, int max_morale, bool play_sounds = true ); std::optional purify_water( Character *p, item *purifier, item_location &water ); int towel_common( Character *, item *, bool ); @@ -236,7 +236,7 @@ bool robotcontrol_can_target( Character *, const monster & ); // Helper for handling pesky wannabe-artists std::optional handle_ground_graffiti( Character &p, item *it, const std::string &prefix, - const tripoint &where ); + const tripoint_bub_ms &where ); //helper for lit cigs std::optional can_smoke( const Character &you ); @@ -272,7 +272,7 @@ heating_requirements heating_requirements_for_weight( const units::mass &, const units::mass &, const units::volume & ); using use_function_pointer = std::optional ( * )( Character *, item *, - const tripoint & ); + const tripoint_bub_ms & ); class iuse_actor { @@ -291,8 +291,8 @@ class iuse_actor virtual ~iuse_actor() = default; virtual void load( const JsonObject &jo, const std::string &src ) = 0; - virtual std::optional use( Character *, item &, const tripoint & ) const = 0; - virtual ret_val can_use( const Character &, const item &, const tripoint & ) const; + virtual std::optional use( Character *, item &, const tripoint_bub_ms & ) const = 0; + virtual ret_val can_use( const Character &, const item &, const tripoint_bub_ms & ) const; virtual void info( const item &, std::vector & ) const {} /** * Returns a deep copy of this object. Example implementation: @@ -333,10 +333,8 @@ struct use_function { use_function( const std::string &type, use_function_pointer f ); explicit use_function( std::unique_ptr f ) : actor( std::move( f ) ) {} - // TODO: get rid of untyped overload - std::optional call( Character *, item &, const tripoint & ) const; std::optional call( Character *, item &, const tripoint_bub_ms & ) const; - ret_val can_call( const Character &, const item &, const tripoint &pos ) const; + ret_val can_call( const Character &, const item &, const tripoint_bub_ms &pos ) const; iuse_actor *get_actor_ptr() { return actor.get(); diff --git a/src/iuse_actor.cpp b/src/iuse_actor.cpp index e3fb154d99d4b..67b64fa01336c 100644 --- a/src/iuse_actor.cpp +++ b/src/iuse_actor.cpp @@ -232,7 +232,7 @@ void iuse_transform::load( const JsonObject &obj, const std::string & ) obj.read( "menu_text", menu_text ); } -std::optional iuse_transform::use( Character *p, item &it, const tripoint & ) const +std::optional iuse_transform::use( Character *p, item &it, const tripoint_bub_ms & ) const { int scale = 1; auto iter = it.type->ammo_scale.find( type ); @@ -367,7 +367,7 @@ void iuse_transform::do_transform( Character *p, item &it, const std::string &va } ret_val iuse_transform::can_use( const Character &p, const item &it, - const tripoint & ) const + const tripoint_bub_ms & ) const { if( need_worn && !p.is_worn( it ) ) { return ret_val::make_failure( _( "You need to wear the %1$s before activating it." ), @@ -510,7 +510,7 @@ void unpack_actor::load( const JsonObject &obj, const std::string & ) assign( obj, "filthy_volume_threshold", filthy_vol_threshold ); } -std::optional unpack_actor::use( Character *p, item &it, const tripoint & ) const +std::optional unpack_actor::use( Character *p, item &it, const tripoint_bub_ms & ) const { std::vector items = item_group::items_from( unpack_group, calendar::turn ); item last_armor; @@ -563,7 +563,7 @@ void message_iuse::load( const JsonObject &obj, const std::string & ) } std::optional message_iuse::use( Character *p, item &it, - const tripoint &pos ) const + const tripoint_bub_ms &pos ) const { if( !p ) { return std::nullopt; @@ -599,7 +599,7 @@ void sound_iuse::load( const JsonObject &obj, const std::string & ) } std::optional sound_iuse::use( Character *, item &, - const tripoint &pos ) const + const tripoint_bub_ms &pos ) const { sounds::sound( pos, sound_volume, sounds::sound_t::alarm, sound_message.translated(), true, sound_id, sound_variant ); @@ -625,11 +625,12 @@ std::unique_ptr explosion_iuse::clone() const // Those points must have a clear line of sight and a clear path to // the center of the explosion. // They must also be passable. -static std::vector points_for_gas_cloud( const tripoint ¢er, int radius ) +static std::vector points_for_gas_cloud( const tripoint_bub_ms ¢er, + int radius ) { map &here = get_map(); - std::vector result; - for( const tripoint &p : closest_points_first( center, radius ) ) { + std::vector result; + for( const tripoint_bub_ms &p : closest_points_first( center, radius ) ) { if( here.impassable( p ) ) { continue; } @@ -670,7 +671,7 @@ void explosion_iuse::load( const JsonObject &obj, const std::string & ) obj.read( "scrambler_blast_radius", scrambler_blast_radius ); } -std::optional explosion_iuse::use( Character *p, item &it, const tripoint &pos ) const +std::optional explosion_iuse::use( Character *p, item &it, const tripoint_bub_ms &pos ) const { if( explosion.power >= 0.0f ) { Character *source = p; @@ -682,31 +683,31 @@ std::optional explosion_iuse::use( Character *p, item &it, const tripoint & source = g->find_npc( thrower ); } } - explosion_handler::explosion( source, pos, explosion ); + explosion_handler::explosion( source, pos.raw(), explosion ); } if( draw_explosion_radius >= 0 ) { explosion_handler::draw_explosion( pos, draw_explosion_radius, draw_explosion_color ); } if( do_flashbang ) { - explosion_handler::flashbang( pos, flashbang_player_immune ); + explosion_handler::flashbang( pos.raw(), flashbang_player_immune ); } map &here = get_map(); if( fields_radius >= 0 && fields_type.id() ) { - std::vector gas_sources = points_for_gas_cloud( pos, fields_radius ); - for( tripoint &gas_source : gas_sources ) { + std::vector gas_sources = points_for_gas_cloud( pos, fields_radius ); + for( tripoint_bub_ms &gas_source : gas_sources ) { const int field_intensity = rng( fields_min_intensity, fields_max_intensity ); here.add_field( gas_source, fields_type, field_intensity, 1_turns ); } } if( scrambler_blast_radius >= 0 ) { - for( const tripoint &dest : here.points_in_radius( pos, scrambler_blast_radius ) ) { - explosion_handler::scrambler_blast( dest ); + for( const tripoint_bub_ms &dest : here.points_in_radius( pos, scrambler_blast_radius ) ) { + explosion_handler::scrambler_blast( dest.raw() ); } } if( emp_blast_radius >= 0 ) { - for( const tripoint &dest : here.points_in_radius( pos, emp_blast_radius ) ) { - explosion_handler::emp_blast( dest ); + for( const tripoint_bub_ms &dest : here.points_in_radius( pos, emp_blast_radius ) ) { + explosion_handler::emp_blast( dest.raw() ); } } return 1; @@ -798,7 +799,7 @@ void consume_drug_iuse::info( const item &, std::vector &dump ) const } } -std::optional consume_drug_iuse::use( Character *p, item &it, const tripoint & ) const +std::optional consume_drug_iuse::use( Character *p, item &it, const tripoint_bub_ms & ) const { auto need_these = tools_needed; @@ -844,7 +845,7 @@ std::optional consume_drug_iuse::use( Character *p, item &it, const tripoin for( const auto &field : fields_produced ) { const field_type_id fid = field_type_id( field.first ); for( int i = 0; i < 3; i++ ) { - point offset( rng( -2, 2 ), rng( -2, 2 ) ); + point_rel_ms offset( rng( -2, 2 ), rng( -2, 2 ) ); here.add_field( p->pos_bub() + offset, fid, field.second ); } } @@ -897,7 +898,7 @@ int delayed_transform_iuse::time_to_do( const item &it ) const } std::optional delayed_transform_iuse::use( Character *p, item &it, - const tripoint &pos ) const + const tripoint_bub_ms &pos ) const { if( time_to_do( it ) > 0 ) { p->add_msg_if_player( m_info, "%s", not_ready_msg ); @@ -931,7 +932,7 @@ void place_monster_iuse::load( const JsonObject &obj, const std::string & ) } } -std::optional place_monster_iuse::use( Character *p, item &it, const tripoint & ) const +std::optional place_monster_iuse::use( Character *p, item &it, const tripoint_bub_ms & ) const { if( it.ammo_remaining() < need_charges ) { p->add_msg_if_player( m_info, _( "This requires %d charges to activate." ), need_charges ); @@ -1025,15 +1026,15 @@ void place_npc_iuse::load( const JsonObject &obj, const std::string & ) obj.read( "place_randomly", place_randomly ); } -std::optional place_npc_iuse::use( Character *p, item &, const tripoint & ) const +std::optional place_npc_iuse::use( Character *p, item &, const tripoint_bub_ms & ) const { map &here = get_map(); - const tripoint_range target_range = place_randomly ? - points_in_radius( p->pos(), radius ) : - points_in_radius( choose_adjacent( _( "Place NPC where?" ) ).value_or( p->pos() ), 0 ); + const tripoint_range target_range = place_randomly ? + points_in_radius( p->pos_bub(), radius ) : + points_in_radius( choose_adjacent_bub( _( "Place NPC where?" ) ).value_or( p->pos_bub() ), 0 ); - const std::optional target_pos = - random_point( target_range, [&here]( const tripoint & t ) { + const std::optional target_pos = + random_point( target_range, [&here]( const tripoint_bub_ms & t ) { return here.passable( t ) && here.has_floor_or_support( t ) && !get_creature_tracker().creature_at( t ); } ); @@ -1192,9 +1193,9 @@ static ret_val check_deploy_square( Character *p, item &it, } std::optional deploy_furn_actor::use( Character *p, item &it, - const tripoint &pos ) const + const tripoint_bub_ms &pos ) const { - ret_val suitable = check_deploy_square( p, it, tripoint_bub_ms( pos ) ); + ret_val suitable = check_deploy_square( p, it, pos ); if( !suitable.success() ) { p->add_msg_if_player( m_info, suitable.str() ); return std::nullopt; @@ -1224,9 +1225,10 @@ void deploy_appliance_actor::load( const JsonObject &obj, const std::string & ) mandatory( obj, false, "base", appliance_base ); } -std::optional deploy_appliance_actor::use( Character *p, item &it, const tripoint &pos ) const +std::optional deploy_appliance_actor::use( Character *p, item &it, + const tripoint_bub_ms &pos ) const { - ret_val suitable = check_deploy_square( p, it, tripoint_bub_ms( pos ) ); + ret_val suitable = check_deploy_square( p, it, pos ); if( !suitable.success() ) { p->add_msg_if_player( m_info, suitable.str() ); return std::nullopt; @@ -1282,7 +1284,7 @@ void reveal_map_actor::reveal_targets( const tripoint_abs_omt ¢er, } } -std::optional reveal_map_actor::use( Character *p, item &it, const tripoint & ) const +std::optional reveal_map_actor::use( Character *p, item &it, const tripoint_bub_ms & ) const { if( it.already_used_by_player( *p ) ) { p->add_msg_if_player( _( "There isn't anything new on the %s." ), it.tname() ); @@ -1326,9 +1328,8 @@ bool firestarter_actor::prep_firestarter_use( const Character &p, tripoint_bub_m { // checks for fuel are handled by use and the activity, not here if( pos == p.pos_bub() ) { - if( const std::optional pnt_ = choose_adjacent( _( "Light where?" ) ) ) { - // TODO: fix point types - pos = tripoint_bub_ms( *pnt_ ); + if( const std::optional pnt_ = choose_adjacent_bub( _( "Light where?" ) ) ) { + pos = *pnt_; } else { return false; } @@ -1363,7 +1364,6 @@ bool firestarter_actor::prep_firestarter_use( const Character &p, tripoint_bub_m // Check for an adjacent fire container for( const tripoint_bub_ms &query : here.points_in_radius( pos, 1 ) ) { // Don't ask if we're setting a fire on top of a fireplace - // TODO: fix point types if( here.has_flag_furn( "FIRE_CONTAINER", pos ) ) { break; } @@ -1371,7 +1371,6 @@ bool firestarter_actor::prep_firestarter_use( const Character &p, tripoint_bub_m if( query == pos ) { continue; } - // TODO: fix point types if( here.has_flag_furn( "FIRE_CONTAINER", query ) ) { if( !query_yn( _( "Are you sure you want to start fire here? There's a fireplace adjacent." ) ) ) { return false; @@ -1412,7 +1411,7 @@ void firestarter_actor::resolve_firestarter_use( Character *p, const tripoint_bu } ret_val firestarter_actor::can_use( const Character &p, const item &it, - const tripoint & ) const + const tripoint_bub_ms & ) const { if( p.is_underwater() ) { return ret_val::make_failure( _( "You can't do that while underwater." ) ); @@ -1422,14 +1421,14 @@ ret_val firestarter_actor::can_use( const Character &p, const item &it, return ret_val::make_failure( _( "This tool doesn't have enough charges." ) ); } - if( need_sunlight && light_mod( p.pos() ) <= 0.0f ) { + if( need_sunlight && light_mod( p.pos_bub() ) <= 0.0f ) { return ret_val::make_failure( _( "You need direct sunlight to light a fire with this." ) ); } return ret_val::make_success(); } -float firestarter_actor::light_mod( const tripoint &pos ) const +float firestarter_actor::light_mod( const tripoint_bub_ms &pos ) const { if( !need_sunlight ) { return 1.0f; @@ -1439,7 +1438,7 @@ float firestarter_actor::light_mod( const tripoint &pos ) const } if( incident_sun_irradiance( get_weather().weather_id, calendar::turn ) > irradiance::moderate ) { - return std::pow( g->natural_light_level( pos.z ) / 80.0f, 8 ); + return std::pow( g->natural_light_level( pos.z() ) / 80.0f, 8 ); } return 0.0f; @@ -1460,7 +1459,7 @@ int firestarter_actor::moves_cost_by_fuel( const tripoint_bub_ms &pos ) const } std::optional firestarter_actor::use( Character *p, item &it, - const tripoint &spos ) const + const tripoint_bub_ms &spos ) const { if( !p ) { debugmsg( "%s called action firestarter that requires character but no character is present", @@ -1468,9 +1467,8 @@ std::optional firestarter_actor::use( Character *p, item &it, return std::nullopt; } - // TODO: fix point types tripoint_bub_ms pos( spos ); - float light = light_mod( p->pos() ); + float light = light_mod( p->pos_bub() ); if( !prep_firestarter_use( *p, pos ) ) { return std::nullopt; } @@ -1521,7 +1519,7 @@ std::unique_ptr salvage_actor::clone() const return std::make_unique( *this ); } -std::optional salvage_actor::use( Character *p, item &cutter, const tripoint & ) const +std::optional salvage_actor::use( Character *p, item &cutter, const tripoint_bub_ms & ) const { if( !p ) { debugmsg( "%s called action salvage that requires character but no character is present", @@ -1945,7 +1943,7 @@ bool inscribe_actor::item_inscription( item &tool, item &cut ) const return true; } -std::optional inscribe_actor::use( Character *p, item &it, const tripoint & ) const +std::optional inscribe_actor::use( Character *p, item &it, const tripoint_bub_ms & ) const { if( !p ) { debugmsg( "%s called action inscribe that requires character but no character is present", @@ -1972,7 +1970,7 @@ std::optional inscribe_actor::use( Character *p, item &it, const tripoint & } if( choice == 0 ) { - const std::optional dest_ = choose_adjacent( _( "Write where?" ) ); + const std::optional dest_ = choose_adjacent_bub( _( "Write where?" ) ); if( !dest_ ) { return std::nullopt; } @@ -2015,7 +2013,7 @@ std::unique_ptr fireweapon_off_actor::clone() const } std::optional fireweapon_off_actor::use( Character *p, item &it, - const tripoint & ) const + const tripoint_bub_ms & ) const { if( !p ) { debugmsg( "%s called action fireweapon_off that requires character but no character is present", @@ -2042,7 +2040,7 @@ std::optional fireweapon_off_actor::use( Character *p, item &it, } ret_val fireweapon_off_actor::can_use( const Character &p, const item &it, - const tripoint & ) const + const tripoint_bub_ms & ) const { if( !it.ammo_sufficient( &p ) ) { return ret_val::make_failure( _( "This tool doesn't have enough charges." ) ); @@ -2069,7 +2067,7 @@ std::unique_ptr fireweapon_on_actor::clone() const } std::optional fireweapon_on_actor::use( Character *p, item &it, - const tripoint &pos ) const + const tripoint_bub_ms &pos ) const { bool extinguish = true; translation deactivation_msg; @@ -2118,7 +2116,7 @@ std::unique_ptr manualnoise_actor::clone() const return std::make_unique( *this ); } -std::optional manualnoise_actor::use( Character *p, item &, const tripoint & ) const +std::optional manualnoise_actor::use( Character *p, item &, const tripoint_bub_ms & ) const { // Uses the moves specified by iuse_actor's definition p->mod_moves( -moves ); @@ -2131,7 +2129,7 @@ std::optional manualnoise_actor::use( Character *p, item &, const tripoint } ret_val manualnoise_actor::can_use( const Character &p, const item &it, - const tripoint & ) const + const tripoint_bub_ms & ) const { if( !it.ammo_sufficient( &p ) ) { return ret_val::make_failure( _( "This tool doesn't have enough charges." ) ); @@ -2149,7 +2147,8 @@ std::unique_ptr play_instrument_iuse::clone() const return std::make_unique( *this ); } -std::optional play_instrument_iuse::use( Character *p, item &it, const tripoint & ) const +std::optional play_instrument_iuse::use( Character *p, item &it, + const tripoint_bub_ms & ) const { if( it.active ) { it.active = false; @@ -2169,7 +2168,7 @@ std::optional play_instrument_iuse::use( Character *p, item &it, const trip } ret_val play_instrument_iuse::can_use( const Character &p, const item &it, - const tripoint & ) const + const tripoint_bub_ms & ) const { // TODO (maybe): Mouth encumbrance? Smoke? Lack of arms? Hand encumbrance? if( p.is_underwater() ) { @@ -2212,7 +2211,7 @@ void musical_instrument_actor::load( const JsonObject &obj, const std::string & } std::optional musical_instrument_actor::use( Character *p, item &it, - const tripoint & ) const + const tripoint_bub_ms & ) const { if( !p ) { it.active = false; @@ -2321,13 +2320,13 @@ std::optional musical_instrument_actor::use( Character *p, item &it, } // We already played the sounds, just handle applying effects now - iuse::play_music( p, p->pos(), volume, morale_effect, /*play_sounds=*/false ); + iuse::play_music( p, p->pos_bub(), volume, morale_effect, /*play_sounds=*/false ); return 0; } ret_val musical_instrument_actor::can_use( const Character &p, const item &, - const tripoint & ) const + const tripoint_bub_ms & ) const { // TODO: (maybe): Mouth encumbrance? Smoke? Lack of arms? Hand encumbrance? if( p.is_underwater() ) { @@ -2389,7 +2388,7 @@ void learn_spell_actor::info( const item &, std::vector &dump ) const } } -std::optional learn_spell_actor::use( Character *p, item &, const tripoint & ) const +std::optional learn_spell_actor::use( Character *p, item &, const tripoint_bub_ms & ) const { //TODO: combine/replace the checks below with "checks for conditions" from Character::check_read_condition @@ -2524,7 +2523,7 @@ std::string cast_spell_actor::get_name() const return mundane ? _( "Activate" ) : _( "Cast spell" ); } -std::optional cast_spell_actor::use( Character *p, item &it, const tripoint &pos ) const +std::optional cast_spell_actor::use( Character *p, item &it, const tripoint_bub_ms &pos ) const { if( need_worn && !p->is_worn( it ) ) { p->add_msg_if_player( m_info, _( "You need to wear the %1$s before activating it." ), it.tname() ); @@ -2619,13 +2618,12 @@ static item_location form_loc_recursive( T &loc, item &it ) return item_location( loc, &it ); } -static item_location form_loc( Character &you, const tripoint &p, item &it ) +static item_location form_loc( Character &you, const tripoint_bub_ms &p, item &it ) { if( you.has_item( it ) ) { return form_loc_recursive( you, it ); } - const tripoint_bub_ms bub = tripoint_bub_ms( p ); - map_cursor mc( bub ); + map_cursor mc( p ); if( mc.has_item( it ) ) { return form_loc_recursive( mc, it ); } @@ -2643,7 +2641,7 @@ static item_location form_loc( Character &you, const tripoint &p, item &it ) return item_location( you, &it ); } -std::optional holster_actor::use( Character *you, item &it, const tripoint &p ) const +std::optional holster_actor::use( Character *you, item &it, const tripoint_bub_ms &p ) const { if( you->is_wielding( it ) ) { you->add_msg_if_player( _( "You need to unwield your %s before using it." ), it.tname() ); @@ -2738,7 +2736,7 @@ void ammobelt_actor::info( const item &, std::vector &dump ) const item::nname( belt ) ) ); } -std::optional ammobelt_actor::use( Character *p, item &, const tripoint & ) const +std::optional ammobelt_actor::use( Character *p, item &, const tripoint_bub_ms & ) const { item mag( belt ); mag.ammo_unset(); @@ -2812,7 +2810,7 @@ bool repair_item_actor::can_use_tool( const Character &p, const item &tool, bool return true; } -static item_location get_item_location( Character &p, item &it, const tripoint &pos ) +static item_location get_item_location( Character &p, item &it, const tripoint_bub_ms &pos ) { // Item on a character if( p.has_item( it ) ) { @@ -2836,11 +2834,11 @@ static item_location get_item_location( Character &p, item &it, const tripoint & } // Item on the map - return item_location( map_cursor( tripoint_bub_ms( pos ) ), &it ); + return item_location( map_cursor( pos ), &it ); } std::optional repair_item_actor::use( Character *p, item &it, - const tripoint &position ) const + const tripoint_bub_ms &position ) const { if( !can_use_tool( *p, it, true ) ) { return std::nullopt; @@ -3400,23 +3398,24 @@ void heal_actor::load( const JsonObject &obj, const std::string & ) } } -static Character &get_patient( Character &healer, const tripoint &pos ) +static Character &get_patient( Character &healer, const tripoint_bub_ms &pos ) { - if( healer.pos() == pos ) { + if( healer.pos_bub() == pos ) { return healer; } Character *const person = get_creature_tracker().creature_at( pos ); if( !person ) { // Default to heal self on failure not to break old functionality - add_msg_debug( debugmode::DF_IUSE, "No heal target at position %d,%d,%d", pos.x, pos.y, pos.z ); + add_msg_debug( debugmode::DF_IUSE, "No heal target at position %d,%d,%d", pos.x(), pos.y(), + pos.z() ); return healer; } return *person; } -std::optional heal_actor::use( Character *p, item &it, const tripoint &pos ) const +std::optional heal_actor::use( Character *p, item &it, const tripoint_bub_ms &pos ) const { if( p->cant_do_underwater() ) { return std::nullopt; @@ -3890,18 +3889,18 @@ std::unique_ptr place_trap_actor::clone() const return std::make_unique( *this ); } -static bool is_solid_neighbor( const tripoint &pos, const point &offset ) +static bool is_solid_neighbor( const tripoint_bub_ms &pos, const point_rel_ms &offset ) { map &here = get_map(); - const tripoint_bub_ms a = tripoint_bub_ms( pos ) + tripoint( offset, 0 ); - const tripoint_bub_ms b = tripoint_bub_ms( pos ) - tripoint( offset, 0 ); + const tripoint_bub_ms a = pos + offset; + const tripoint_bub_ms b = pos - offset; return here.move_cost( a ) != 2 && here.move_cost( b ) != 2; } -static bool has_neighbor( const tripoint &pos, const ter_id &terrain_id ) +static bool has_neighbor( const tripoint_bub_ms &pos, const ter_id &terrain_id ) { map &here = get_map(); - for( const tripoint &t : here.points_in_radius( pos, 1, 0 ) ) { + for( const tripoint_bub_ms &t : here.points_in_radius( pos, 1, 0 ) ) { if( here.ter( t ) == terrain_id ) { return true; } @@ -3909,10 +3908,10 @@ static bool has_neighbor( const tripoint &pos, const ter_id &terrain_id ) return false; } -bool place_trap_actor::is_allowed( Character &p, const tripoint &pos, +bool place_trap_actor::is_allowed( Character &p, const tripoint_bub_ms &pos, const std::string &name ) const { - if( !allow_under_player && pos == p.pos() ) { + if( !allow_under_player && pos == p.pos_bub() ) { p.add_msg_if_player( m_info, _( "Yeah. Place the %s at your feet. Real damn smart move." ), name ); return false; @@ -3923,8 +3922,10 @@ bool place_trap_actor::is_allowed( Character &p, const tripoint &pos, return false; } if( needs_solid_neighbor ) { - if( !is_solid_neighbor( pos, point::east ) && !is_solid_neighbor( pos, point::south ) && - !is_solid_neighbor( pos, point::south_east ) && !is_solid_neighbor( pos, point::north_east ) ) { + if( !is_solid_neighbor( pos, point_rel_ms::east ) && + !is_solid_neighbor( pos, point_rel_ms::south ) && + !is_solid_neighbor( pos, point_rel_ms::south_east ) && + !is_solid_neighbor( pos, point_rel_ms::north_east ) ) { p.add_msg_if_player( m_info, _( "You must place the %s between two solid tiles." ), name ); return false; } @@ -3944,24 +3945,25 @@ bool place_trap_actor::is_allowed( Character &p, const tripoint &pos, name ); } else { p.add_msg_if_player( m_bad, _( "You trigger a %s!" ), existing_trap.name() ); - existing_trap.trigger( pos, p ); + existing_trap.trigger( pos.raw(), p ); } return false; } return true; } -static void place_and_add_as_known( Character &p, const tripoint &pos, const trap_str_id &id ) +static void place_and_add_as_known( Character &p, const tripoint_bub_ms &pos, + const trap_str_id &id ) { map &here = get_map(); here.trap_set( pos, id ); const trap &tr = here.tr_at( pos ); if( !tr.can_see( pos, p ) ) { - p.add_known_trap( pos, tr ); + p.add_known_trap( pos.raw(), tr ); } } -std::optional place_trap_actor::use( Character *p, item &it, const tripoint & ) const +std::optional place_trap_actor::use( Character *p, item &it, const tripoint_bub_ms & ) const { const bool could_bury = !bury_question.empty(); if( !allow_underwater && p->cant_do_underwater() ) { @@ -3970,12 +3972,13 @@ std::optional place_trap_actor::use( Character *p, item &it, const tripoint if( p->cant_do_mounted() ) { return std::nullopt; } - const std::optional pos_ = choose_adjacent( string_format( _( "Place %s where?" ), - it.tname() ) ); + const std::optional pos_ = choose_adjacent_bub( string_format( + _( "Place %s where?" ), + it.tname() ) ); if( !pos_ ) { return std::nullopt; } - tripoint pos = *pos_; + tripoint_bub_ms pos = *pos_; if( !is_allowed( *p, pos, it.tname() ) ) { return std::nullopt; @@ -3986,9 +3989,10 @@ std::optional place_trap_actor::use( Character *p, item &it, const tripoint outer_layer_trap.obj().get_trap_radius() + 1; if( unburied_data.trap.obj().get_trap_radius() > 0 ) { // Math correction for multi-tile traps - pos.x = ( pos.x - p->posx() ) * distance_to_trap_center + p->posx(); - pos.y = ( pos.y - p->posy() ) * distance_to_trap_center + p->posy(); - for( const tripoint &t : here.points_in_radius( pos, outer_layer_trap.obj().get_trap_radius(), + pos.x() = ( pos.x() - p->posx() ) * distance_to_trap_center + p->posx(); + pos.y() = ( pos.y() - p->posy() ) * distance_to_trap_center + p->posy(); + for( const tripoint_bub_ms &t : here.points_in_radius( pos, + outer_layer_trap.obj().get_trap_radius(), 0 ) ) { if( !is_allowed( *p, t, it.tname() ) ) { p->add_msg_if_player( m_info, @@ -4033,7 +4037,8 @@ std::optional place_trap_actor::use( Character *p, item &it, const tripoint if( !placed_trap.is_null() ) { const_cast( placed_trap ).set_trap_data( it.typeId() ); } - for( const tripoint &t : here.points_in_radius( pos, data.trap.obj().get_trap_radius(), 0 ) ) { + for( const tripoint_bub_ms &t : here.points_in_radius( pos, data.trap.obj().get_trap_radius(), + 0 ) ) { if( t != pos ) { place_and_add_as_known( *p, t, outer_layer_trap ); } @@ -4047,7 +4052,7 @@ void emit_actor::load( const JsonObject &obj, const std::string & ) assign( obj, "scale_qty", scale_qty ); } -std::optional emit_actor::use( Character *, item &it, const tripoint &pos ) const +std::optional emit_actor::use( Character *, item &it, const tripoint_bub_ms &pos ) const { map &here = get_map(); const float scaling = scale_qty ? it.charges : 1.0f; @@ -4087,7 +4092,7 @@ void saw_barrel_actor::load( const JsonObject &jo, const std::string & ) } //Todo: Make this consume charges if performed with a tool that uses charges. -std::optional saw_barrel_actor::use( Character *p, item &it, const tripoint & ) const +std::optional saw_barrel_actor::use( Character *p, item &it, const tripoint_bub_ms & ) const { if( !p ) { debugmsg( "%s called action saw_barrel that requires character but no character is present", @@ -4148,7 +4153,7 @@ void saw_stock_actor::load( const JsonObject &jo, const std::string & ) } //Todo: Make this consume charges if performed with a tool that uses charges. -std::optional saw_stock_actor::use( Character *p, item &it, const tripoint & ) const +std::optional saw_stock_actor::use( Character *p, item &it, const tripoint_bub_ms & ) const { if( !p ) { debugmsg( "%s called action saw_stock that requires character but no character is present", @@ -4224,7 +4229,7 @@ void molle_attach_actor::load( const JsonObject &jo, const std::string & ) } std::optional molle_attach_actor::use( Character *p, item &it, - const tripoint & ) const + const tripoint_bub_ms & ) const { if( !p ) { debugmsg( "%s called action molle_attach that requires character but no character is present", @@ -4256,7 +4261,7 @@ std::unique_ptr molle_attach_actor::clone() const } std::optional molle_detach_actor::use( Character *p, item &it, - const tripoint & ) const + const tripoint_bub_ms & ) const { std::vector items_attached = it.get_contents().get_added_pockets(); @@ -4290,7 +4295,7 @@ void molle_detach_actor::load( const JsonObject &jo, const std::string & ) } std::optional install_bionic_actor::use( Character *p, item &it, - const tripoint & ) const + const tripoint_bub_ms & ) const { if( p->can_install_bionics( *it.type, *p, false ) ) { if( !p->has_trait( trait_DEBUG_BIONICS ) && !p->has_flag( json_flag_MANUAL_CBM_INSTALLATION ) ) { @@ -4305,7 +4310,7 @@ std::optional install_bionic_actor::use( Character *p, item &it, } ret_val install_bionic_actor::can_use( const Character &p, const item &it, - const tripoint & ) const + const tripoint_bub_ms & ) const { if( !it.is_bionic() ) { return ret_val::make_failure(); @@ -4362,7 +4367,7 @@ void install_bionic_actor::finalize( const itype_id &my_item_type ) } std::optional detach_gunmods_actor::use( Character *p, item &it, - const tripoint & ) const + const tripoint_bub_ms & ) const { auto filter_irremovable = []( std::vector &gunmods ) { gunmods.erase( @@ -4415,7 +4420,7 @@ std::optional detach_gunmods_actor::use( Character *p, item &it, } ret_val detach_gunmods_actor::can_use( const Character &p, const item &it, - const tripoint & ) const + const tripoint_bub_ms & ) const { const std::vector mods = it.gunmods(); @@ -4454,7 +4459,7 @@ void detach_gunmods_actor::finalize( const itype_id &my_item_type ) } std::optional modify_gunmods_actor::use( Character *p, item &it, - const tripoint &pnt ) const + const tripoint_bub_ms &pnt ) const { std::vector mods; @@ -4487,7 +4492,7 @@ std::optional modify_gunmods_actor::use( Character *p, item &it, } ret_val modify_gunmods_actor::can_use( const Character &p, const item &it, - const tripoint & ) const + const tripoint_bub_ms & ) const { if( !p.is_wielding( it ) ) { return ret_val::make_failure( _( "Need to be wielding." ) ); @@ -4612,7 +4617,7 @@ void link_up_actor::info( const item &it, std::vector &dump ) const } } -std::optional link_up_actor::use( Character *p, item &it, const tripoint &pnt ) const +std::optional link_up_actor::use( Character *p, item &it, const tripoint_bub_ms &pnt ) const { if( !p ) { debugmsg( "%s called action link_up that requires character but no character is present", @@ -4935,17 +4940,18 @@ std::optional link_up_actor::link_to_veh_app( Character *p, item &it, map &here = get_map(); // Selection: Attach electrical cable to vehicle ports / appliances, OR vehicle batteries. - const auto can_link = [&here, &to_ports]( const tripoint & point ) { + const auto can_link = [&here, &to_ports]( const tripoint_bub_ms & point ) { const optional_vpart_position ovp = here.veh_at( point ); return ovp && ovp->vehicle().avail_linkable_part( ovp->mount_pos(), to_ports ) != -1; }; - const std::optional pnt_ = choose_adjacent_highlight( _( "Attach the cable where?" ), - "", can_link, false, false ); + const std::optional pnt_ = choose_adjacent_highlight( + _( "Attach the cable where?" ), + "", can_link, false, false ); if( !pnt_ ) { p->add_msg_if_player( _( "Never mind." ) ); return std::nullopt; } - const tripoint &selection = *pnt_; + const tripoint_bub_ms &selection = *pnt_; const optional_vpart_position sel_vp = here.veh_at( selection ); if( !sel_vp ) { p->add_msg_if_player( _( "There's no vehicle there." ) ); @@ -5001,9 +5007,10 @@ std::optional link_up_actor::link_to_veh_app( Character *p, item &it, const bool using_power_cord = it.typeId() == itype_power_cord; if( using_power_cord && it.link().t_veh->is_powergrid() && sel_vp->vehicle().is_powergrid() ) { // If both vehicles are adjacent power grids, try to merge them together first. - const point prev_pos = here.bub_from_abs( it.link().t_veh->coord_translate( it.link().t_mount ) + - it.link().t_abs_pos ).xy().raw(); - if( selection.xy().distance( prev_pos ) <= 1.5f && + const point_bub_ms prev_pos = here.bub_from_abs( it.link().t_veh->coord_translate( + it.link().t_mount ) + + it.link().t_abs_pos ).xy(); + if( selection.xy().raw().distance( prev_pos.raw() ) <= 1.5f && it.link().t_veh->merge_appliance_into_grid( sel_vp->vehicle() ) ) { it.link().t_veh->part_removal_cleanup(); p->add_msg_if_player( _( "You merge the two power grids." ) ); @@ -5035,19 +5042,19 @@ std::optional link_up_actor::link_tow_cable( Character *p, item &it, { map &here = get_map(); - const auto can_link = [&here]( const tripoint & point ) { + const auto can_link = [&here]( const tripoint_bub_ms & point ) { const optional_vpart_position ovp = here.veh_at( point ); return ovp && ovp->vehicle().is_external_part( point ); }; - const std::optional pnt_ = choose_adjacent_highlight( - to_towing ? _( "Attach cable to the vehicle that will do the towing." ) : - _( "Attach cable to the vehicle that will be towed." ), "", can_link, false, false ); + const std::optional pnt_ = choose_adjacent_highlight( + to_towing ? _( "Attach cable to the vehicle that will do the towing." ) : + _( "Attach cable to the vehicle that will be towed." ), "", can_link, false, false ); if( !pnt_ ) { p->add_msg_if_player( _( "Never mind." ) ); return std::nullopt; } - const tripoint &selection = *pnt_; + const tripoint_bub_ms &selection = *pnt_; const optional_vpart_position sel_vp = here.veh_at( selection ); if( !sel_vp ) { p->add_msg_if_player( _( "There's no vehicle there." ) ); @@ -5095,7 +5102,7 @@ std::optional link_up_actor::link_tow_cable( Character *p, item &it, } std::optional link_up_actor::link_extend_cable( Character *p, item &it, - const tripoint &pnt ) const + const tripoint_bub_ms &pnt ) const { avatar *you = p->as_avatar(); if( !you ) { @@ -5263,7 +5270,7 @@ void deploy_tent_actor::load( const JsonObject &obj, const std::string & ) assign( obj, "broken_type", broken_type ); } -std::optional deploy_tent_actor::use( Character *p, item &it, const tripoint & ) const +std::optional deploy_tent_actor::use( Character *p, item &it, const tripoint_bub_ms & ) const { int diam = 2 * radius + 1; if( p->cant_do_mounted() ) { @@ -5341,7 +5348,7 @@ void weigh_self_actor::info( const item &, std::vector &dump ) const _( "Use this item to weigh yourself. Includes everything you are wearing." ) ); } -std::optional weigh_self_actor::use( Character *p, item &, const tripoint & ) const +std::optional weigh_self_actor::use( Character *p, item &, const tripoint_bub_ms & ) const { if( p->is_mounted() ) { p->add_msg_if_player( m_info, _( "You cannot weigh yourself while mounted." ) ); @@ -5385,7 +5392,7 @@ void sew_advanced_actor::load( const JsonObject &obj, const std::string & ) } } -std::optional sew_advanced_actor::use( Character *p, item &it, const tripoint & ) const +std::optional sew_advanced_actor::use( Character *p, item &it, const tripoint_bub_ms & ) const { if( p->is_npc() ) { return std::nullopt; @@ -5626,7 +5633,7 @@ void change_scent_iuse::load( const JsonObject &obj, const std::string & ) assign( obj, "waterproof", waterproof ); } -std::optional change_scent_iuse::use( Character *p, item &it, const tripoint & ) const +std::optional change_scent_iuse::use( Character *p, item &it, const tripoint_bub_ms & ) const { p->set_value( "prev_scent", p->get_type_of_scent().c_str() ); if( waterproof ) { @@ -5679,7 +5686,7 @@ void effect_on_conditons_actor::info( const item &, std::vector &dump } std::optional effect_on_conditons_actor::use( Character *p, item &it, - const tripoint &point ) const + const tripoint_bub_ms &point ) const { if( need_worn && !p->is_worn( it ) ) { p->add_msg_if_player( m_info, _( "You need to wear the %1$s before activating it." ), it.tname() ); @@ -5699,7 +5706,7 @@ std::optional effect_on_conditons_actor::use( Character *p, item &it, } loc = item_location( *p->as_character(), &it ); } else { - loc = item_location( map_cursor( tripoint_bub_ms( point ) ), &it ); + loc = item_location( map_cursor( point ), &it ); } dialogue d( ( char_ptr == nullptr ? nullptr : get_talker_for( char_ptr ) ), get_talker_for( loc ) ); diff --git a/src/iuse_actor.h b/src/iuse_actor.h index 688037b515fec..b5206bc787056 100644 --- a/src/iuse_actor.h +++ b/src/iuse_actor.h @@ -113,8 +113,8 @@ class iuse_transform : public iuse_actor ~iuse_transform() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; - ret_val can_use( const Character &, const item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; + ret_val can_use( const Character &, const item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; std::string get_name() const override; void finalize( const itype_id &my_item_type ) override; @@ -142,7 +142,7 @@ class unpack_actor : public iuse_actor ~unpack_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *p, item &it, const tripoint & ) const override; + std::optional use( Character *p, item &it, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; void info( const item &, std::vector &dump ) const override; }; @@ -160,7 +160,7 @@ class message_iuse : public iuse_actor ~message_iuse() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; std::string get_name() const override; }; @@ -182,7 +182,7 @@ class sound_iuse : public iuse_actor ~sound_iuse() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; std::string get_name() const override; }; @@ -220,7 +220,7 @@ class explosion_iuse : public iuse_actor ~explosion_iuse() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; void info( const item &, std::vector & ) const override; }; @@ -268,7 +268,7 @@ class consume_drug_iuse : public iuse_actor ~consume_drug_iuse() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; void info( const item &, std::vector & ) const override; @@ -303,7 +303,7 @@ class delayed_transform_iuse : public iuse_transform ~delayed_transform_iuse() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; }; @@ -336,7 +336,7 @@ class place_monster_iuse : public iuse_actor place_monster_iuse() : iuse_actor( "place_monster" ) { } ~place_monster_iuse() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; }; @@ -364,7 +364,7 @@ class change_scent_iuse : public iuse_actor change_scent_iuse() : iuse_actor( "change_scent" ) { } ~change_scent_iuse() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; }; @@ -383,7 +383,7 @@ class place_npc_iuse : public iuse_actor place_npc_iuse() : iuse_actor( "place_npc" ) { } ~place_npc_iuse() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; }; @@ -402,7 +402,7 @@ class deploy_furn_actor : public iuse_actor ~deploy_furn_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; void info( const item &, std::vector & ) const override; }; @@ -419,7 +419,7 @@ class deploy_appliance_actor : public iuse_actor ~deploy_appliance_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; void info( const item &, std::vector & ) const override; }; @@ -455,7 +455,7 @@ class reveal_map_actor : public iuse_actor ~reveal_map_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; }; @@ -484,7 +484,7 @@ class firestarter_actor : public iuse_actor /** Player here isn't const because pyromaniacs gain a mood boost from it */ static void resolve_firestarter_use( Character *p, const tripoint_bub_ms &pos ); /** Modifier on speed - higher is better, 0 means it won't work. */ - float light_mod( const tripoint &pos ) const; + float light_mod( const tripoint_bub_ms &pos ) const; /** Checks quality of fuel on the tile and interpolates move cost based on that. */ int moves_cost_by_fuel( const tripoint_bub_ms &pos ) const; @@ -492,8 +492,8 @@ class firestarter_actor : public iuse_actor ~firestarter_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; - ret_val can_use( const Character &, const item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; + ret_val can_use( const Character &, const item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; }; @@ -514,7 +514,7 @@ class salvage_actor : public iuse_actor ~salvage_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; private: void cut_up( Character &p, item_location &cut ) const; @@ -557,7 +557,7 @@ class inscribe_actor : public iuse_actor ~inscribe_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; }; @@ -580,8 +580,8 @@ class fireweapon_off_actor : public iuse_actor ~fireweapon_off_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; - ret_val can_use( const Character &, const item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; + ret_val can_use( const Character &, const item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; }; @@ -601,7 +601,7 @@ class fireweapon_on_actor : public iuse_actor ~fireweapon_on_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; }; @@ -622,8 +622,8 @@ class manualnoise_actor : public iuse_actor ~manualnoise_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; - ret_val can_use( const Character &, const item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; + ret_val can_use( const Character &, const item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; }; @@ -634,8 +634,8 @@ class play_instrument_iuse : public iuse_actor ~play_instrument_iuse() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; - ret_val can_use( const Character &, const item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; + ret_val can_use( const Character &, const item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; }; @@ -679,8 +679,8 @@ class musical_instrument_actor : public iuse_actor ~musical_instrument_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; - ret_val can_use( const Character &, const item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; + ret_val can_use( const Character &, const item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; }; @@ -697,7 +697,7 @@ class learn_spell_actor : public iuse_actor ~learn_spell_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *p, item &, const tripoint & ) const override; + std::optional use( Character *p, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; void info( const item &, std::vector & ) const override; }; @@ -724,7 +724,7 @@ class cast_spell_actor : public iuse_actor ~cast_spell_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *p, item &it, const tripoint & ) const override; + std::optional use( Character *p, item &it, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; void info( const item &, std::vector & ) const override; std::string get_name() const override; @@ -751,7 +751,7 @@ class holster_actor : public iuse_actor ~holster_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; void info( const item &, std::vector & ) const override; }; @@ -765,7 +765,7 @@ class ammobelt_actor : public iuse_actor ~ammobelt_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; void info( const item &, std::vector & ) const override; }; @@ -856,7 +856,7 @@ class repair_item_actor : public iuse_actor ~repair_item_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; std::string get_name() const override; @@ -923,7 +923,7 @@ class heal_actor : public iuse_actor ~heal_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; void info( const item &, std::vector & ) const override; }; @@ -965,12 +965,12 @@ class place_trap_actor : public iuse_actor * The trap that makes up the outer layer of a multi-tile trap. This is not supported for buried traps! */ trap_str_id outer_layer_trap; - bool is_allowed( Character &p, const tripoint &pos, const std::string &name ) const; + bool is_allowed( Character &p, const tripoint_bub_ms &pos, const std::string &name ) const; explicit place_trap_actor( const std::string &type = "place_trap" ); ~place_trap_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; }; @@ -984,7 +984,7 @@ class emit_actor : public iuse_actor explicit emit_actor( const std::string &type = "emit_actor" ) : iuse_actor( type ) {} ~emit_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; void finalize( const itype_id &my_item_type ) override; }; @@ -995,7 +995,7 @@ class saw_barrel_actor : public iuse_actor explicit saw_barrel_actor( const std::string &type = "saw_barrel" ) : iuse_actor( type ) {} void load( const JsonObject &jo, const std::string & ) override; - std::optional use( Character *p, item &it, const tripoint &pnt ) const override; + std::optional use( Character *p, item &it, const tripoint_bub_ms &pnt ) const override; std::unique_ptr clone() const override; ret_val can_use_on( const Character &you, const item &it, const item &target ) const; @@ -1007,7 +1007,7 @@ class saw_stock_actor : public iuse_actor explicit saw_stock_actor( const std::string &type = "saw_stock" ) : iuse_actor( type ) {} void load( const JsonObject &jo, const std::string & ) override; - std::optional use( Character *p, item &it, const tripoint &pnt ) const override; + std::optional use( Character *p, item &it, const tripoint_bub_ms &pnt ) const override; std::unique_ptr clone() const override; ret_val can_use_on( const Character &you, const item &it, const item &target ) const; @@ -1023,7 +1023,7 @@ class molle_attach_actor : public iuse_actor int moves; void load( const JsonObject &jo, const std::string & ) override; - std::optional use( Character *p, item &it, const tripoint &pnt ) const override; + std::optional use( Character *p, item &it, const tripoint_bub_ms &pnt ) const override; std::unique_ptr clone() const override; }; @@ -1036,7 +1036,7 @@ class molle_detach_actor : public iuse_actor int moves; void load( const JsonObject &jo, const std::string & ) override; - std::optional use( Character *p, item &it, const tripoint &pnt ) const override; + std::optional use( Character *p, item &it, const tripoint_bub_ms &pnt ) const override; std::unique_ptr clone() const override; }; @@ -1046,8 +1046,8 @@ class install_bionic_actor : public iuse_actor explicit install_bionic_actor( const std::string &type = "install_bionic" ) : iuse_actor( type ) {} void load( const JsonObject &, const std::string & ) override {} - std::optional use( Character *p, item &it, const tripoint &pnt ) const override; - ret_val can_use( const Character &, const item &it, const tripoint & ) const override; + std::optional use( Character *p, item &it, const tripoint_bub_ms &pnt ) const override; + ret_val can_use( const Character &, const item &it, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; void finalize( const itype_id &my_item_type ) override; }; @@ -1058,8 +1058,8 @@ class detach_gunmods_actor : public iuse_actor explicit detach_gunmods_actor( const std::string &type = "detach_gunmods" ) : iuse_actor( type ) {} void load( const JsonObject &, const std::string & ) override {} - std::optional use( Character *p, item &it, const tripoint &pnt ) const override; - ret_val can_use( const Character &, const item &it, const tripoint & ) const override; + std::optional use( Character *p, item &it, const tripoint_bub_ms &pnt ) const override; + ret_val can_use( const Character &, const item &it, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; void finalize( const itype_id &my_item_type ) override; }; @@ -1070,8 +1070,8 @@ class modify_gunmods_actor : public iuse_actor explicit modify_gunmods_actor( const std::string &type = "modify_gunmods" ) : iuse_actor( type ) {} void load( const JsonObject &, const std::string & ) override {} - std::optional use( Character *p, item &it, const tripoint &pnt ) const override; - ret_val can_use( const Character &, const item &it, const tripoint & ) const override; + std::optional use( Character *p, item &it, const tripoint_bub_ms &pnt ) const override; + ret_val can_use( const Character &, const item &it, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; void finalize( const itype_id &my_item_type ) override; }; @@ -1095,7 +1095,7 @@ class link_up_actor : public iuse_actor std::optional link_to_veh_app( Character *p, item &it, bool to_ports ) const; std::optional link_tow_cable( Character *p, item &it, bool to_towing ) const; - std::optional link_extend_cable( Character *p, item &it, const tripoint &pnt ) const; + std::optional link_extend_cable( Character *p, item &it, const tripoint_bub_ms &pnt ) const; std::optional remove_extensions( Character *p, item &it ) const; link_up_actor() : iuse_actor( "link_up" ) {} @@ -1105,7 +1105,7 @@ class link_up_actor : public iuse_actor std::unique_ptr clone() const override; std::string get_name() const override; void info( const item &, std::vector & ) const override; - std::optional use( Character *p, item &it, const tripoint &pnt ) const override; + std::optional use( Character *p, item &it, const tripoint_bub_ms &pnt ) const override; }; class deploy_tent_actor : public iuse_actor @@ -1123,7 +1123,7 @@ class deploy_tent_actor : public iuse_actor ~deploy_tent_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; bool check_intact( const tripoint_bub_ms ¢er ) const; @@ -1142,7 +1142,7 @@ class weigh_self_actor : public iuse_actor ~weigh_self_actor() override = default; void load( const JsonObject &jo, const std::string & ) override; - std::optional use( Character *p, item &, const tripoint & ) const override; + std::optional use( Character *p, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; void info( const item &, std::vector & ) const override; }; @@ -1164,7 +1164,7 @@ class sew_advanced_actor : public iuse_actor ~sew_advanced_actor() override = default; void load( const JsonObject &obj, const std::string & ) override; - std::optional use( Character *, item &, const tripoint & ) const override; + std::optional use( Character *, item &, const tripoint_bub_ms & ) const override; std::unique_ptr clone() const override; }; @@ -1186,7 +1186,7 @@ class effect_on_conditons_actor : public iuse_actor ~effect_on_conditons_actor() override = default; void load( const JsonObject &obj, const std::string &src ) override; - std::optional use( Character *p, item &it, const tripoint &point ) const override; + std::optional use( Character *p, item &it, const tripoint_bub_ms &point ) const override; std::unique_ptr clone() const override; std::string get_name() const override; void info( const item &, std::vector & ) const override; diff --git a/src/live_view.cpp b/src/live_view.cpp index f5eff29a92ee7..f63defe9a71c1 100644 --- a/src/live_view.cpp +++ b/src/live_view.cpp @@ -53,7 +53,7 @@ void live_view::show( const tripoint &p ) int line_out = START_LINE; // HACK: using dummy window to get the window height without refreshing. win = catacurses::newwin( 1, width, point::zero ); - g->pre_print_all_tile_info( mouse_position, win, line_out, line_limit, cache ); + g->pre_print_all_tile_info( tripoint_bub_ms( mouse_position ), win, line_out, line_limit, cache ); const int live_view_box_height = std::min( max_height, std::max( line_out + 2, MIN_BOX_HEIGHT ) ); win = catacurses::newwin( live_view_box_height, width, @@ -64,7 +64,8 @@ void live_view::show( const tripoint &p ) werase( win ); const visibility_variables &cache = get_map().get_visibility_variables_cache(); int line_out = START_LINE; - g->pre_print_all_tile_info( mouse_position, win, line_out, getmaxy( win ) - 2, cache ); + g->pre_print_all_tile_info( tripoint_bub_ms( mouse_position ), win, line_out, getmaxy( win ) - 2, + cache ); draw_border( win ); center_print( win, 0, c_white, _( "< Mouse view >" ) ); wnoutrefresh( win ); diff --git a/src/magic_enchantment.cpp b/src/magic_enchantment.cpp index 7e10af944974f..8a9ae0ca44902 100644 --- a/src/magic_enchantment.cpp +++ b/src/magic_enchantment.cpp @@ -1069,8 +1069,8 @@ enchantment::special_vision enchantment::get_vision( const const_dialogue &d ) c return {}; } - const double distance = rl_dist_exact( d.const_actor( true )->pos(), - d.const_actor( false )->pos() ); + const double distance = rl_dist_exact( d.const_actor( true )->pos_bub(), + d.const_actor( false )->pos_bub() ); // first iterate over structs that has ignores_aiming_cone true // to prevent cata_tiles::draw_critter_at() from picking texture @@ -1154,8 +1154,8 @@ enchant_cache::special_vision enchant_cache::get_vision( const const_dialogue &d return {}; } - const double distance = rl_dist_exact( d.const_actor( true )->pos(), - d.const_actor( false )->pos() ); + const double distance = rl_dist_exact( d.const_actor( true )->pos_bub(), + d.const_actor( false )->pos_bub() ); for( const special_vision &struc : special_vision_vector ) { if( struc.ignores_aiming_cone && struc.range >= distance && struc.condition( d ) ) { diff --git a/src/magic_spell_effect.cpp b/src/magic_spell_effect.cpp index 412c1bf9ddfb7..60194d6d18e15 100644 --- a/src/magic_spell_effect.cpp +++ b/src/magic_spell_effect.cpp @@ -1168,7 +1168,7 @@ void spell_effect::directed_push( const spell &sp, Creature &caster, const tripo void spell_effect::spawn_ethereal_item( const spell &sp, Creature &caster, const tripoint_bub_ms ¢er ) { - Character *const character_at_target = get_creature_tracker().creature_at( center ); + Character *character_at_target = get_creature_tracker().creature_at( center ); std::vector granted; @@ -1183,8 +1183,7 @@ void spell_effect::spawn_ethereal_item( const spell &sp, Creature &caster, } } - avatar &player_character = get_avatar(); - if( character_at_target == nullptr ) { + if( character_at_target != nullptr ) { for( item &it : granted ) { // Spawned items are ethereal unless permanent and max level. Comestibles are never ethereal. if( !it.is_comestible() && !sp.has_flag( spell_flag::PERMANENT_ALL_LEVELS ) && @@ -1192,9 +1191,22 @@ void spell_effect::spawn_ethereal_item( const spell &sp, Creature &caster, it.set_var( "ethereal", to_turns( sp.duration_turns( caster ) ) ); it.ethereal = true; } - get_map().add_item_or_charges( center, it ); - } + if( it.ethereal && character_at_target->is_wearing( it.typeId() ) ) { + // Ethereal equipment already exists so just update its duration + item *existing_item = character_at_target->item_worn_with_id( it.typeId() ); + existing_item->set_var( "ethereal", to_turns( sp.duration_turns( caster ) ) ); + } else if( character_at_target->can_wear( it ).success() ) { + it.set_flag( json_flag_FIT ); + character_at_target->wear_item( it, false ); + } else if( !character_at_target->has_wield_conflicts( it ) && + !character_at_target->martial_arts_data->keep_hands_free && //No wield if hands free + character_at_target->wield( it ) ) { + // nothing to do + } else { + character_at_target->i_add( it ); + } + } } else { for( item &it : granted ) { // Spawned items are ethereal unless permanent and max level. Comestibles are never ethereal. @@ -1203,21 +1215,7 @@ void spell_effect::spawn_ethereal_item( const spell &sp, Creature &caster, it.set_var( "ethereal", to_turns( sp.duration_turns( caster ) ) ); it.ethereal = true; } - - if( it.ethereal && player_character.is_wearing( it.typeId() ) ) { - // Ethereal equipment already exists so just update its duration - item *existing_item = player_character.item_worn_with_id( it.typeId() ); - existing_item->set_var( "ethereal", to_turns( sp.duration_turns( caster ) ) ); - } else if( player_character.can_wear( it ).success() ) { - it.set_flag( json_flag_FIT ); - player_character.wear_item( it, false ); - } else if( !player_character.has_wield_conflicts( it ) && - !player_character.martial_arts_data->keep_hands_free && //No wield if hands free - player_character.wield( it, 0 ) ) { - // nothing to do - } else { - player_character.i_add( it ); - } + get_map().add_item_or_charges( center, it ); } } sp.make_sound( caster.pos_bub(), caster ); diff --git a/src/magic_teleporter_list.cpp b/src/magic_teleporter_list.cpp index f2fcf5fafb0ae..cd13d5ee530f4 100644 --- a/src/magic_teleporter_list.cpp +++ b/src/magic_teleporter_list.cpp @@ -90,7 +90,7 @@ bool teleporter_list::place_avatar_overmap( Character &you, const tripoint_abs_o 60 ); you.add_effect( effect_ignore_fall_damage, 1_seconds, false, 0, true ); g->place_player_overmap( omt_pt ); - g->place_player( local_dest.raw() ); + g->place_player( rebase_bub( local_dest ) ); return true; } diff --git a/src/map.cpp b/src/map.cpp index 95cd9ca62c049..97a20b51092ab 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -8422,10 +8422,9 @@ void map::shift( const point_rel_sm &sp ) const tripoint_abs_sm abs = get_abs_sub(); std::vector loaded_grids; - // TODO: fix point types (sp should be relative?) set_abs_sub( abs + sp ); - g->shift_destination_preview( point( -sp.x() * SEEX, -sp.y() * SEEY ) ); + g->shift_destination_preview( { -sp.x() * SEEX, -sp.y() * SEEY } ); shift_traps( sp ); diff --git a/src/mapgen.cpp b/src/mapgen.cpp index b5f756f5013be..d3ce5ca0ada1a 100644 --- a/src/mapgen.cpp +++ b/src/mapgen.cpp @@ -7946,7 +7946,7 @@ ret_val update_mapgen_function_json::update_map( // trigger main map cleanup p_update_smap.reset(); // trigger new traps, etc - g->place_player( get_avatar().pos(), true ); + g->place_player( get_avatar().pos_bub(), true ); } // Trigger magic to add roofs (within load) if needed. diff --git a/src/math_parser.cpp b/src/math_parser.cpp index c5887c69e32e5..feeef49c9031f 100644 --- a/src/math_parser.cpp +++ b/src/math_parser.cpp @@ -14,7 +14,6 @@ #include #include "cata_assert.h" -#include "cata_scope_helpers.h" #include "cata_utility.h" #include "condition.h" #include "debug.h" @@ -55,8 +54,13 @@ constexpr std::optional get_constant( std::string_view token ) std::optional get_number( std::string_view token ) { - if( std::optional ret = svtod( token ); ret ) { - return *ret; + // FIXME: port to std::from_chars once double conversion is supported + std::istringstream conv( std::string{ token } ); + conv.imbue( std::locale::classic() ); + double val{}; + conv >> val; + if( conv && conv.eof() ) { + return val; } return get_constant( token ); @@ -299,10 +303,6 @@ class math_exp::math_exp_impl if( str.empty() ) { return false; } - std::locale const &oldloc = std::locale::global( std::locale::classic() ); - on_out_of_scope reset_loc( [&oldloc]() { - std::locale::global( oldloc ); - } ); try { _parse( str ); } catch( math::syntax_error const &ex ) { diff --git a/src/melee.cpp b/src/melee.cpp index d99339bae0fbf..c777e8f3acde5 100644 --- a/src/melee.cpp +++ b/src/melee.cpp @@ -1847,7 +1847,7 @@ void Character::perform_technique( const ma_technique &technique, Creature &t, has_flag( json_flag_GRAB ); if( !move_issue ) { if( t.pos_bub() != prev_pos ) { - g->place_player( prev_pos.raw() ); + g->place_player( prev_pos ); g->on_move_effects(); } } diff --git a/src/mutation.cpp b/src/mutation.cpp index 42052dcd1b97d..b666a83d95d8d 100644 --- a/src/mutation.cpp +++ b/src/mutation.cpp @@ -562,6 +562,13 @@ void Character::mutation_effect( const trait_id &mut, const bool worn_destroyed_ } remove_worn_items_with( [&]( item & armor ) { + // Check for exceptions first + if( armor.has_flag( STATIC( flag_id( "OVERSIZE" ) ) ) ) { + return false; + } + if( armor.has_flag( STATIC( flag_id( "INTEGRATED" ) ) ) ) { + return false; + } // initial check for rigid items to pull off, doesn't matter what else the item has you can only wear one rigid item if( branch.conflicts_with_item_rigid( armor ) ) { add_msg_player_or_npc( m_bad, @@ -571,12 +578,6 @@ void Character::mutation_effect( const trait_id &mut, const bool worn_destroyed_ get_map().add_item_or_charges( pos_bub(), armor ); return true; } - if( armor.has_flag( STATIC( flag_id( "OVERSIZE" ) ) ) ) { - return false; - } - if( armor.has_flag( STATIC( flag_id( "INTEGRATED" ) ) ) ) { - return false; - } if( !branch.conflicts_with_item( armor ) ) { return false; } diff --git a/src/npcmove.cpp b/src/npcmove.cpp index 2f0063ad5028e..6f4975bae48cf 100644 --- a/src/npcmove.cpp +++ b/src/npcmove.cpp @@ -2331,8 +2331,8 @@ void outfit::activate_combat_items( npc &guy ) if( transform->target->has_flag( flag_USE_UPS ) && guy.available_ups() == 0_kJ ) { continue; } - if( transform->can_use( guy, candidate, tripoint::zero ).success() ) { - transform->use( &guy, candidate, tripoint::zero ); + if( transform->can_use( guy, candidate, tripoint_bub_ms::zero ).success() ) { + transform->use( &guy, candidate, tripoint_bub_ms::zero ); guy.add_msg_if_npc( _( " activates their %s." ), candidate.display_name() ); } } @@ -2351,8 +2351,8 @@ void outfit::deactivate_combat_items( npc &guy ) candidate.active ) { const iuse_transform *transform = dynamic_cast ( candidate.type->get_use( "transform" )->get_actor_ptr() ); - if( transform->can_use( guy, candidate, tripoint::zero ).success() ) { - transform->use( &guy, candidate, tripoint::zero ); + if( transform->can_use( guy, candidate, tripoint_bub_ms::zero ).success() ) { + transform->use( &guy, candidate, tripoint_bub_ms::zero ); guy.add_msg_if_npc( _( " deactivates their %s." ), candidate.display_name() ); } } diff --git a/src/npctalk.cpp b/src/npctalk.cpp index a4d840766d611..996110d74e0c8 100644 --- a/src/npctalk.cpp +++ b/src/npctalk.cpp @@ -1231,13 +1231,13 @@ void game::chat() } map &here = get_map(); - std::optional p = look_around(); + std::optional p = look_around(); if( !p ) { return; } - if( here.impassable( tripoint_bub_ms( *p ) ) ) { + if( here.impassable( *p ) ) { add_msg( m_info, _( "This destination can't be reached." ) ); return; } @@ -4118,7 +4118,7 @@ talk_effect_fun_t::func f_location_variable( const JsonObject &jo, std::string_v is_npc, type, dov_x_adjust, dov_y_adjust, dov_z_adjust, z_override, true_eocs, false_eocs, search_target, search_type, dov_target_min_radius, dov_target_max_radius]( dialogue & d ) { talker *target = d.actor( is_npc ); - tripoint_abs_ms talker_pos = get_map().getglobal( target->pos() ); + tripoint_abs_ms talker_pos = get_map().getglobal( target->pos_bub() ); tripoint_abs_ms target_pos = talker_pos; if( target_params.has_value() ) { const tripoint_abs_omt omt_pos = mission_util::get_om_terrain_pos( target_params.value(), d ); @@ -5947,7 +5947,7 @@ talk_effect_fun_t::func f_run_npc_eocs( const JsonObject &jo, bool npc_must_see = jo.get_bool( "npc_must_see", false ); if( local ) { return [eocs, unique_ids, npc_must_see, npc_range, is_npc]( dialogue const & d ) { - tripoint actor_pos = d.actor( is_npc )->pos(); + tripoint_bub_ms actor_pos = d.actor( is_npc )->pos_bub(); std::vector ids; ids.reserve( unique_ids.size() ); for( const str_or_var &id : unique_ids ) { @@ -5962,9 +5962,9 @@ talk_effect_fun_t::func f_run_npc_eocs( const JsonObject &jo, break; } } - return id_valid && ( !npc_range.has_value() || actor_pos.z == guy.posz() ) && ( !npc_must_see || + return id_valid && ( !npc_range.has_value() || actor_pos.z() == guy.posz() ) && ( !npc_must_see || guy.sees( actor_pos ) ) && - ( !npc_range.has_value() || rl_dist( actor_pos, guy.pos() ) <= npc_range.value() ); + ( !npc_range.has_value() || rl_dist( actor_pos, guy.pos_bub() ) <= npc_range.value() ); } ); for( npc *target : available ) { for( const effect_on_condition_id &eoc : eocs ) { @@ -6011,7 +6011,7 @@ talk_effect_fun_t::func f_run_monster_eocs( const JsonObject &jo, for( const str_or_var &id : mtype_ids ) { ids.emplace_back( id.evaluate( d ) ); } - tripoint actor_pos = d.actor( is_npc )->pos(); + tripoint_bub_ms actor_pos = d.actor( is_npc )->pos_bub(); const std::vector available = g->get_creatures_if( [ ids, monster_must_see, monster_range, actor_pos ]( const Creature & critter ) { bool id_valid = ids.empty(); @@ -6025,10 +6025,10 @@ talk_effect_fun_t::func f_run_monster_eocs( const JsonObject &jo, } } return creature_is_monster && id_valid && ( !monster_range.has_value() || - actor_pos.z == critter.posz() ) && + actor_pos.z() == critter.posz() ) && ( !monster_must_see || critter.sees( actor_pos ) ) && - ( !monster_range.has_value() || rl_dist( actor_pos, critter.pos() ) <= monster_range.value() ); + ( !monster_range.has_value() || rl_dist( actor_pos, critter.pos_bub() ) <= monster_range.value() ); } ); for( Creature *target : available ) { for( const effect_on_condition_id &eoc : eocs ) { @@ -6691,9 +6691,9 @@ talk_effect_fun_t::func f_spawn_monster( const JsonObject &jo, std::string_view int real_count = dov_real_count.evaluate( d ); int hallucination_count = dov_hallucination_count.evaluate( d ); std::optional lifespan; - tripoint target_pos = d.actor( is_npc )->pos(); + tripoint_bub_ms target_pos = d.actor( is_npc )->pos_bub(); if( target_var.has_value() ) { - target_pos = get_map().bub_from_abs( get_tripoint_from_var( target_var, d, is_npc ) ).raw(); + target_pos = get_map().bub_from_abs( get_tripoint_from_var( target_var, d, is_npc ) ); } int visible_spawns = 0; int spawns = 0; @@ -6707,7 +6707,7 @@ talk_effect_fun_t::func f_spawn_monster( const JsonObject &jo, std::string_view target_monster = *copy->as_monster(); } } - if( g->find_nearby_spawn_point( target_pos, target_monster.type->id, min_radius, + if( g->find_nearby_spawn_point( target_pos.raw(), target_monster.type->id, min_radius, max_radius, spawn_point, outdoor_only, indoor_only, open_air_allowed ) ) { lifespan = dov_lifespan.evaluate( d ); if( lifespan.value() == 0_seconds ) { @@ -6737,7 +6737,7 @@ talk_effect_fun_t::func f_spawn_monster( const JsonObject &jo, std::string_view target_monster = *copy->as_monster(); } } - if( g->find_nearby_spawn_point( target_pos, target_monster.type->id, min_radius, + if( g->find_nearby_spawn_point( target_pos.raw(), target_monster.type->id, min_radius, max_radius, spawn_point, outdoor_only, indoor_only, open_air_allowed ) ) { monster *spawned = g->place_critter_at( target_monster.type->id, spawn_point ); if( spawned ) { @@ -6826,15 +6826,15 @@ talk_effect_fun_t::func f_spawn_npc( const JsonObject &jo, std::string_view memb cur_traits.emplace_back( cur_trait.evaluate( d ) ); } std::optional lifespan; - tripoint target_pos = d.actor( is_npc )->pos(); + tripoint_bub_ms target_pos = d.actor( is_npc )->pos_bub(); if( target_var.has_value() ) { - target_pos = get_map().bub_from_abs( get_tripoint_from_var( target_var, d, is_npc ) ).raw(); + target_pos = get_map().bub_from_abs( get_tripoint_from_var( target_var, d, is_npc ) ); } int visible_spawns = 0; int spawns = 0; for( int i = 0; i < real_count; i++ ) { tripoint spawn_point; - if( g->find_nearby_spawn_point( target_pos, min_radius, + if( g->find_nearby_spawn_point( target_pos.raw(), min_radius, max_radius, spawn_point, outdoor_only, indoor_only, open_air_allowed ) ) { lifespan = dov_lifespan.evaluate( d ); if( lifespan.value() == 0_seconds ) { @@ -6854,7 +6854,7 @@ talk_effect_fun_t::func f_spawn_npc( const JsonObject &jo, std::string_view memb cur_traits.emplace_back( trait_HALLUCINATION ); for( int i = 0; i < hallucination_count; i++ ) { tripoint spawn_point; - if( g->find_nearby_spawn_point( target_pos, min_radius, + if( g->find_nearby_spawn_point( target_pos.raw(), min_radius, max_radius, spawn_point, outdoor_only, indoor_only, open_air_allowed ) ) { lifespan = dov_lifespan.evaluate( d ); if( lifespan.value() == 0_seconds ) { diff --git a/src/output.cpp b/src/output.cpp index a2d18871e039b..ab62899d31507 100644 --- a/src/output.cpp +++ b/src/output.cpp @@ -1082,6 +1082,7 @@ static const std::vector item_filter_prefixes = { { 's', to_translation( "devices" ), to_translation( "skill taught by books" ) }, { 'd', to_translation( "pipe" ), to_translation( "disassembled components" ) }, { 'v', to_translation( "hand" ), to_translation( "covers body part" ) }, + { 'e', to_translation( "close to skin" ), to_translation( "covers layer" ) }, { 'b', to_translation( "mre;sealed" ), to_translation( "items satisfying both conditions" ) } }; diff --git a/src/overmap_ui.cpp b/src/overmap_ui.cpp index 7ad9fa11a263d..9eeed620ec0f0 100644 --- a/src/overmap_ui.cpp +++ b/src/overmap_ui.cpp @@ -1986,14 +1986,16 @@ static tripoint_abs_omt display() } } } - if( const std::optional vec = ictxt.get_direction( action ) ) { + if( const std::optional vec = ictxt.get_direction_rel_omt( action ) ) { int scroll_d = uistate.overmap_fast_scroll ? fast_scroll_offset : 1; - curs += vec->xy() * scroll_d; + + curs += vec->xy().raw() * + scroll_d; // TODO: Make += etc. available with corresponding relative coordinates. } else if( action == "MOUSE_MOVE" || action == "TIMEOUT" ) { - tripoint edge_scroll = g->mouse_edge_scrolling_overmap( ictxt ); - if( edge_scroll != tripoint::zero ) { + tripoint_rel_omt edge_scroll = g->mouse_edge_scrolling_overmap( ictxt ); + if( edge_scroll != tripoint_rel_omt::zero ) { if( action == "MOUSE_MOVE" ) { - edge_scroll *= 2; + edge_scroll.raw() *= 2; // TODO: Make *= etc. available to relative coordinates } curs += edge_scroll; } @@ -2005,7 +2007,7 @@ static tripoint_abs_omt display() tripoint_bub_ms pos_rel = get_map().bub_from_abs( pos ); uistate.open_menu = [pos_rel]() { tripoint_bub_ms pos_cpy = pos_rel; - g->look_around( true, pos_cpy.raw(), pos_rel.raw(), false, false, false, false, pos_rel.raw() ); + g->look_around( true, pos_cpy, pos_rel, false, false, false, false, pos_rel ); }; action = "QUIT"; } else if( action == "CENTER" ) { diff --git a/src/ranged.cpp b/src/ranged.cpp index 64f463ee1567f..fa59128c8046e 100644 --- a/src/ranged.cpp +++ b/src/ranged.cpp @@ -2974,12 +2974,12 @@ bool target_ui::handle_cursor_movement( const std::string &action, bool &skip_re if( action == "MOUSE_MOVE" || action == "TIMEOUT" ) { // Shift pos and/or view via edge scrolling - tripoint edge_scroll = g->mouse_edge_scrolling_terrain( ctxt ); - if( edge_scroll == tripoint::zero ) { + tripoint_rel_ms edge_scroll = g->mouse_edge_scrolling_terrain( ctxt ); + if( edge_scroll == tripoint_rel_ms::zero ) { skip_redraw = true; } else { if( action == "MOUSE_MOVE" ) { - edge_scroll *= 2; + edge_scroll.raw() *= 2; // TODO: Make *= etc. available to relative coordinates. } if( snap_to_target ) { set_cursor_pos( dst + edge_scroll ); @@ -2991,7 +2991,7 @@ bool target_ui::handle_cursor_movement( const std::string &action, bool &skip_re // Shift view/cursor with directional keys shift_view_or_cursor( *delta ); } else if( action == "SELECT" && - ( mouse_pos = ctxt.get_coordinates( g->w_terrain, g->ter_view_p.xy() ) ) ) { + ( mouse_pos = ctxt.get_coordinates( g->w_terrain, g->ter_view_p.raw().xy() ) ) ) { // Set pos by clicking with mouse mouse_pos->z() = you->pos().z + you->view_offset.z(); set_cursor_pos( tripoint_bub_ms( *mouse_pos ) ); diff --git a/src/recipe_dictionary.cpp b/src/recipe_dictionary.cpp index 57a10151c81d0..ade093351fefe 100644 --- a/src/recipe_dictionary.cpp +++ b/src/recipe_dictionary.cpp @@ -185,6 +185,11 @@ static std::string cached_item_info( const itype_id &item_type ) return item_info_cache.at( item_type ); } +// keep data for one search cycle +static std::unordered_set filtered_bodyparts; +static std::unordered_set filtered_sub_bodyparts; +static std::unordered_set filtered_layers; + std::vector recipe_subset::search( const std::string_view txt, const search_type key, const std::function &progress_callback ) const @@ -226,6 +231,25 @@ std::vector recipe_subset::search( return item::find_type( r->result() )->has_any_quality( txt ); } + case search_type::covers: { + const item result_item( r->result() ); + return std::any_of( filtered_bodyparts.begin(), filtered_bodyparts.end(), + [&result_item]( const bodypart_id & bp ) { + return result_item.covers( bp ); + } ) + || std::any_of( filtered_sub_bodyparts.begin(), filtered_sub_bodyparts.end(), + [&result_item]( const sub_bodypart_id & sbp ) { + return result_item.covers( sbp ); + } ); + } + + case search_type::layer: { + const std::vector layers = item( r->result() ).get_layer(); + return std::any_of( layers.begin(), layers.end(), []( layer_level l ) { + return filtered_layers.count( l ); + } ); + } + case search_type::description_result: { if( r->is_practice() ) { return lcmatch( r->description.translated(), txt ); @@ -302,6 +326,40 @@ std::vector recipe_subset::search( } }; + // prepare search + switch( key ) { + case search_type::covers: { + filtered_bodyparts.clear(); + filtered_sub_bodyparts.clear(); + for( const body_part &bp : all_body_parts ) { + const bodypart_str_id &bp_str_id = convert_bp( bp ); + if( lcmatch( body_part_name( bp_str_id, 1 ), txt ) + || lcmatch( body_part_name( bp_str_id, 2 ), txt ) ) { + filtered_bodyparts.insert( bp_str_id->id ); + } + for( const sub_bodypart_str_id &sbp : bp_str_id->sub_parts ) { + if( lcmatch( sbp->name.translated(), txt ) + || lcmatch( sbp->name_multiple.translated(), txt ) ) { + filtered_sub_bodyparts.insert( sbp->id ); + } + } + } + break; + } + case search_type::layer: { + filtered_layers.clear(); + for( layer_level layer = layer_level( 0 ); layer != layer_level::NUM_LAYER_LEVELS; ++layer ) { + if( lcmatch( item::layer_to_string( layer ), txt ) ) { + filtered_layers.insert( layer ); + } + } + break; + } + default: + break; + } + + // search std::vector res; size_t i = 0; ctxt.register_action( "QUIT" ); diff --git a/src/recipe_dictionary.h b/src/recipe_dictionary.h index fc4b4e261c13c..60bb7d99ccfe8 100644 --- a/src/recipe_dictionary.h +++ b/src/recipe_dictionary.h @@ -149,6 +149,8 @@ class recipe_subset tool, quality, quality_result, + covers, + layer, description_result, proficiency, difficulty, diff --git a/src/scores_ui.cpp b/src/scores_ui.cpp index 46b5610514d41..965354bd14241 100644 --- a/src/scores_ui.cpp +++ b/src/scores_ui.cpp @@ -26,7 +26,7 @@ #include "ui.h" #include "ui_manager.h" -enum class scores_ui_tab_enum : int { +enum class scores_ui_tab : int { achievements = 0, conducts, scores, @@ -34,23 +34,11 @@ enum class scores_ui_tab_enum : int { num_tabs }; -static scores_ui_tab_enum &operator++( scores_ui_tab_enum &c ) -{ - c = static_cast( static_cast( c ) + 1 ); - if( c == scores_ui_tab_enum::num_tabs ) { - c = static_cast( 0 ); - } - return c; -} - -static scores_ui_tab_enum &operator--( scores_ui_tab_enum &c ) -{ - if( c == static_cast( 0 ) ) { - c = scores_ui_tab_enum::num_tabs; - } - c = static_cast( static_cast( c ) - 1 ); - return c; -} +template<> +struct enum_traits { + static constexpr scores_ui_tab first = scores_ui_tab::achievements; + static constexpr scores_ui_tab last = scores_ui_tab::num_tabs; +}; class scores_ui; @@ -67,17 +55,31 @@ class scores_ui_impl : public cataimgui::window std::string last_action; explicit scores_ui_impl() : cataimgui::window( _( "Your scores" ), ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoNav ) {} + void init_data(); private: - void draw_achievements_text( bool use_conducts = false ); - void draw_scores_text(); - void draw_kills_text(); + void draw_achievements_text( bool use_conducts = false ) const; + void draw_scores_text() const; + void draw_kills_text() const; + + scores_ui_tab selected_tab = enum_traits::first; + scores_ui_tab switch_tab = enum_traits::last; - scores_ui_tab_enum selected_tab = scores_ui_tab_enum::achievements; - scores_ui_tab_enum switch_tab = scores_ui_tab_enum::num_tabs; + size_t window_width = ImGui::GetMainViewport()->Size.x * 8 / 9; + size_t window_height = ImGui::GetMainViewport()->Size.y * 8 / 9; - size_t window_width = ImGui::GetMainViewport()->Size.x / 3.0 * 2.0; - size_t window_height = ImGui::GetMainViewport()->Size.y / 3.0 * 2.0; + bool monster_group_collapsed = false; + bool npc_group_collapsed = false; + + std::vector achievements_text; + std::vector conducts_text; + std::vector scores_text; + std::vector> monster_kills_data; + std::vector npc_kills_data; + + int monster_kills = 0; + int npc_kills = 0; + int total_kills = 0; protected: void draw_controls() override; @@ -85,11 +87,15 @@ class scores_ui_impl : public cataimgui::window void scores_ui::draw_scores_ui() { - input_context ctxt; + input_context ctxt( "SCORES_UI" ); scores_ui_impl p_impl; + p_impl.init_data(); + ctxt.register_navigate_ui_list(); ctxt.register_leftright(); + ctxt.register_action( "TOGGLE_MONSTER_GROUP" ); + ctxt.register_action( "TOGGLE_NPC_GROUP" ); ctxt.register_action( "NEXT_TAB" ); ctxt.register_action( "PREV_TAB" ); ctxt.register_action( "SELECT" ); @@ -110,36 +116,19 @@ void scores_ui::draw_scores_ui() } } -void scores_ui_impl::draw_achievements_text( bool use_conducts ) +void scores_ui_impl::init_data() { const achievements_tracker &achievements = g->achievements(); - if( !achievements.is_enabled() ) { - ImGui::TextWrapped( "%s", - use_conducts - ? _( "Conducts are disabled, probably due to use of the debug menu. If you only used " - "the debug menu to work around a game bug, then you can re-enable conducts via the " - "debug menu (\"Enable achievements\" under the \"Game\" submenu)." ) - : _( "Achievements are disabled, probably due to use of the debug menu. If you only used " - "the debug menu to work around a game bug, then you can re-enable achievements via the " - "debug menu (\"Enable achievements\" under the \"Game\" submenu)." ) ); - return; - } // Load past game info beforehand because otherwise it may erase an `achievement_tracker` // within a call to its method when lazy-loaded, causing dangling pointer. - get_past_games( false ); + get_past_games(); std::vector valid_achievements = achievements.valid_achievements(); valid_achievements.erase( std::remove_if( valid_achievements.begin(), valid_achievements.end(), [&]( const achievement * a ) { - return achievements.is_hidden( a ) || a->is_conduct() != use_conducts; + return achievements.is_hidden( a ); } ), valid_achievements.end() ); - if( valid_achievements.empty() ) { - ImGui::TextWrapped( "%s", - use_conducts - ? _( "This game has no valid conducts." ) - : _( "This game has no valid achievements." ) ); - return; - } + using sortable_achievement = std::tuple; std::vector sortable_achievements; @@ -150,8 +139,71 @@ void scores_ui_impl::draw_achievements_text( bool use_conducts ) return std::make_tuple( comp, ach->name().translated(), ach ); } ); std::sort( sortable_achievements.begin(), sortable_achievements.end(), localized_compare ); - for( const sortable_achievement &ach : sortable_achievements ) { - cataimgui::draw_colored_text( achievements.ui_text_for( std::get( ach ) ) ); + for( const sortable_achievement &entry : sortable_achievements ) { + const achievement *ach = std::get( entry ); + if( ach->is_conduct() ) { + conducts_text.emplace_back( achievements.ui_text_for( ach ) ); + } else { + achievements_text.emplace_back( achievements.ui_text_for( ach ) ); + } + } + + stats_tracker &stats = g->stats(); + std::vector valid_scores = stats.valid_scores(); + scores_text.reserve( stats.valid_scores().size() ); + for( const score *scr : valid_scores ) { + scores_text.emplace_back( scr->description( stats ).c_str() ); + } + + const kill_tracker &kills_data = g->get_kill_tracker(); + monster_kills = kills_data.monster_kill_count(); + npc_kills = kills_data.npc_kill_count(); + total_kills = kills_data.total_kill_count(); + + for( const auto &entry : kills_data.kills ) { + const int num_kills = entry.second; + const mtype &m = entry.first.obj(); + const std::string &symbol = m.sym; + nc_color color = m.color; + const std::string &name = m.nname(); + monster_kills_data.emplace_back( num_kills, symbol, color, name ); + } + auto sort_by_count_then_name = []( auto & a, auto & b ) { + return + std::tie( std::get<0>( a ), std::get<3>( b ) ) + > + std::tie( std::get<0>( b ), std::get<3>( a ) ); + }; + std::sort( monster_kills_data.begin(), monster_kills_data.end(), sort_by_count_then_name ); + for( const auto &entry : kills_data.npc_kills ) { + npc_kills_data.emplace_back( entry ); + } + std::sort( npc_kills_data.begin(), npc_kills_data.end(), localized_compare ); +} + +void scores_ui_impl::draw_achievements_text( bool use_conducts ) const +{ + if( !g->achievements().is_enabled() ) { + ImGui::TextWrapped( "%s", + use_conducts + ? _( "Conducts are disabled, probably due to use of the debug menu. If you only used " + "the debug menu to work around a game bug, then you can re-enable conducts via the " + "debug menu (\"Enable achievements\" under the \"Game\" submenu)." ) + : _( "Achievements are disabled, probably due to use of the debug menu. If you only used " + "the debug menu to work around a game bug, then you can re-enable achievements via the " + "debug menu (\"Enable achievements\" under the \"Game\" submenu)." ) ); + return; + } + if( use_conducts && conducts_text.empty() ) { + ImGui::TextWrapped( "%s", _( "This game has no valid conducts." ) ); + return; + } + if( !use_conducts && achievements_text.empty() ) { + ImGui::TextWrapped( "%s", _( "This game has no valid achievements." ) ); + return; + } + for( const std::string &entry : use_conducts ? conducts_text : achievements_text ) { + cataimgui::draw_colored_text( entry ); ImGui::Separator(); } ImGui::NewLine(); @@ -162,16 +214,14 @@ void scores_ui_impl::draw_achievements_text( bool use_conducts ) ); } -void scores_ui_impl::draw_scores_text() +void scores_ui_impl::draw_scores_text() const { - stats_tracker &stats = g->stats(); - std::vector valid_scores = stats.valid_scores(); - if( valid_scores.empty() ) { + if( scores_text.empty() ) { ImGui::TextWrapped( "%s", _( "This game has no valid scores." ) ); return; } - for( const score *scr : valid_scores ) { - ImGui::TextWrapped( "%s", scr->description( stats ).c_str() ); + for( const std::string &entry : scores_text ) { + ImGui::TextWrapped( "%s", entry.c_str() ); } ImGui::NewLine(); ImGui::TextWrapped( "%s", @@ -179,16 +229,10 @@ void scores_ui_impl::draw_scores_text() ); } -void scores_ui_impl::draw_kills_text() +void scores_ui_impl::draw_kills_text() const { - const kill_tracker &kills_data = g->get_kill_tracker(); - - const int monster_kills = kills_data.monster_kill_count(); - const int npc_kills = kills_data.npc_kill_count(); - if( get_option( "STATS_THROUGH_KILLS" ) && ImGui::CollapsingHeader( _( "Stats through kills:" ), ImGuiTreeNodeFlags_DefaultOpen ) ) { - const int total_kills = kills_data.total_kill_count(); ImGui::TextWrapped( _( "Total kills: %d" ), total_kills ); ImGui::NewLine(); ImGui::TextWrapped( _( "Experience: %d (%d points available)" ), @@ -197,20 +241,19 @@ void scores_ui_impl::draw_kills_text() } if( ImGui::CollapsingHeader( string_format( _( "Monster kills (%d):" ), monster_kills ).c_str(), - ImGuiTreeNodeFlags_DefaultOpen ) ) { + monster_group_collapsed ? ImGuiTreeNodeFlags_None : ImGuiTreeNodeFlags_DefaultOpen ) ) { if( monster_kills == 0 ) { ImGui::TextWrapped( "%s", _( "You haven't killed any monsters yet!" ) ); } else { - for( const auto &entry : kills_data.kills ) { - const int num_kills = entry.second; - const mtype &m = entry.first.obj(); - const std::string &name = m.nname(); - const std::string &symbol = m.sym; - nc_color color = m.color; - - ImGui::TextColored( c_light_gray, "%d ", num_kills ); - ImGui::SameLine( 0, 0 ); + for( const auto &entry : monster_kills_data ) { + const int num_kills = std::get<0>( entry ); + const std::string &symbol = std::get<1>( entry ); + nc_color color = std::get<2>( entry ); + const std::string &name = std::get<3>( entry ); + cataimgui::PushMonoFont(); + ImGui::TextColored( c_light_gray, "%5d ", num_kills ); + ImGui::SameLine( 0, 0 ); ImGui::TextColored( color, "%s", symbol.c_str() ); ImGui::PopFont(); ImGui::SameLine( 0, 0 ); @@ -219,14 +262,14 @@ void scores_ui_impl::draw_kills_text() } } if( ImGui::CollapsingHeader( string_format( _( "NPC kills (%d):" ), npc_kills ).c_str(), - ImGuiTreeNodeFlags_DefaultOpen ) ) { + npc_group_collapsed ? ImGuiTreeNodeFlags_None : ImGuiTreeNodeFlags_DefaultOpen ) ) { if( npc_kills == 0 ) { ImGui::TextWrapped( "%s", _( "You haven't killed any NPCs yet!" ) ); } else { - for( const auto &npc_name : kills_data.npc_kills ) { - ImGui::TextColored( c_light_gray, "%d ", 1 ); - ImGui::SameLine( 0, 0 ); + for( const std::string &npc_name : npc_kills_data ) { cataimgui::PushMonoFont(); + ImGui::TextColored( c_light_gray, "%5d ", 1 ); + ImGui::SameLine( 0, 0 ); ImGui::TextColored( c_magenta, "%s", "@" ); ImGui::PopFont(); ImGui::SameLine( 0, 0 ); @@ -242,76 +285,84 @@ void scores_ui_impl::draw_controls() if( last_action == "QUIT" ) { return; + } else if( last_action == "TOGGLE_MONSTER_GROUP" ) { + monster_group_collapsed = !monster_group_collapsed; + } else if( last_action == "TOGGLE_NPC_GROUP" ) { + npc_group_collapsed = !npc_group_collapsed; } else if( last_action == "UP" ) { - ImGui::SetKeyboardFocusHere( -1 ); + ImGui::SetScrollY( ImGui::GetScrollY() - ImGui::GetTextLineHeightWithSpacing() ); } else if( last_action == "DOWN" ) { - ImGui::SetKeyboardFocusHere( 1 ); + ImGui::SetScrollY( ImGui::GetScrollY() + ImGui::GetTextLineHeightWithSpacing() ); } else if( last_action == "NEXT_TAB" || last_action == "RIGHT" ) { + ImGui::SetScrollY( 0 ); switch_tab = selected_tab; ++switch_tab; } else if( last_action == "PREV_TAB" || last_action == "LEFT" ) { + ImGui::SetScrollY( 0 ); switch_tab = selected_tab; --switch_tab; } else if( last_action == "PAGE_UP" ) { - ImGui::SetWindowFocus(); // Dumb hack! Clear our focused item so listbox selection isn't nav highlighted. - ImGui::SetScrollY( ImGui::GetScrollY() - ( window_height / 5.0f ) ); + ImGui::SetScrollY( ImGui::GetScrollY() - window_height ); } else if( last_action == "PAGE_DOWN" ) { - ImGui::SetWindowFocus(); // Dumb hack! Clear our focused item so listbox selection isn't nav highlighted. - ImGui::SetScrollY( ImGui::GetScrollY() + ( window_height / 5.0f ) ); + ImGui::SetScrollY( ImGui::GetScrollY() + window_height ); + } else if( last_action == "HOME" ) { + ImGui::SetScrollY( 0 ); + } else if( last_action == "END" ) { + ImGui::SetScrollY( ImGui::GetScrollMaxY() ); } ImGuiTabItemFlags_ flags = ImGuiTabItemFlags_None; if( ImGui::BeginTabBar( "##TAB_BAR" ) ) { flags = ImGuiTabItemFlags_None; - if( switch_tab == scores_ui_tab_enum::achievements ) { + if( switch_tab == scores_ui_tab::achievements ) { flags = ImGuiTabItemFlags_SetSelected; - switch_tab = scores_ui_tab_enum::num_tabs; + switch_tab = enum_traits::last; } if( ImGui::BeginTabItem( _( "ACHIEVEMENTS" ), nullptr, flags ) ) { - selected_tab = scores_ui_tab_enum::achievements; + selected_tab = scores_ui_tab::achievements; ImGui::EndTabItem(); } flags = ImGuiTabItemFlags_None; - if( switch_tab == scores_ui_tab_enum::conducts ) { + if( switch_tab == scores_ui_tab::conducts ) { flags = ImGuiTabItemFlags_SetSelected; - switch_tab = scores_ui_tab_enum::num_tabs; + switch_tab = enum_traits::last; } if( ImGui::BeginTabItem( _( "CONDUCTS" ), nullptr, flags ) ) { - selected_tab = scores_ui_tab_enum::conducts; + selected_tab = scores_ui_tab::conducts; ImGui::EndTabItem(); } flags = ImGuiTabItemFlags_None; - if( switch_tab == scores_ui_tab_enum::scores ) { + if( switch_tab == scores_ui_tab::scores ) { flags = ImGuiTabItemFlags_SetSelected; - switch_tab = scores_ui_tab_enum::num_tabs; + switch_tab = enum_traits::last; } if( ImGui::BeginTabItem( _( "SCORES" ), nullptr, flags ) ) { - selected_tab = scores_ui_tab_enum::scores; + selected_tab = scores_ui_tab::scores; ImGui::EndTabItem(); } flags = ImGuiTabItemFlags_None; - if( switch_tab == scores_ui_tab_enum::kills ) { + if( switch_tab == scores_ui_tab::kills ) { flags = ImGuiTabItemFlags_SetSelected; - switch_tab = scores_ui_tab_enum::num_tabs; + switch_tab = enum_traits::last; } if( ImGui::BeginTabItem( _( "KILLS" ), nullptr, flags ) ) { - selected_tab = scores_ui_tab_enum::kills; + selected_tab = scores_ui_tab::kills; ImGui::EndTabItem(); } ImGui::EndTabBar(); } - if( selected_tab == scores_ui_tab_enum::achievements ) { - draw_achievements_text( false ); + if( selected_tab == scores_ui_tab::achievements ) { + draw_achievements_text(); } - if( selected_tab == scores_ui_tab_enum::conducts ) { + if( selected_tab == scores_ui_tab::conducts ) { draw_achievements_text( true ); } - if( selected_tab == scores_ui_tab_enum::scores ) { + if( selected_tab == scores_ui_tab::scores ) { draw_scores_text(); } - if( selected_tab == scores_ui_tab_enum::kills ) { + if( selected_tab == scores_ui_tab::kills ) { draw_kills_text(); } diff --git a/src/sdltiles.cpp b/src/sdltiles.cpp index 0d613e93f632b..4793bed30cfe0 100644 --- a/src/sdltiles.cpp +++ b/src/sdltiles.cpp @@ -1349,7 +1349,7 @@ void cata_cursesport::curses_drawwindow( const catacurses::window &w ) // skip the normal drawing code for it. tilecontext->draw( point( win->pos.x * fontwidth, win->pos.y * fontheight ), - g->ter_view_p, + g->ter_view_p.raw(), TERRAIN_WINDOW_TERM_WIDTH * font->width, TERRAIN_WINDOW_TERM_HEIGHT * font->height, overlay_strings, @@ -1460,7 +1460,7 @@ void cata_cursesport::curses_drawwindow( const catacurses::window &w ) clear_window_area( w ); tilecontext->draw_minimap( point( win->pos.x * fontwidth, win->pos.y * fontheight ), - tripoint( get_player_character().pos().xy(), g->ter_view_p.z ), + tripoint( get_player_character().pos_bub().raw().xy(), g->ter_view_p.z() ), win->width * font->width, win->height * font->height ); update = true; diff --git a/src/talker.h b/src/talker.h index 9834426d68d2c..4082933be5532 100644 --- a/src/talker.h +++ b/src/talker.h @@ -97,6 +97,9 @@ class const_talker virtual tripoint pos() const { return {}; } + virtual tripoint_bub_ms pos_bub() const { + return {}; + } virtual tripoint_abs_ms global_pos() const { return {}; } @@ -667,7 +670,7 @@ class talker: virtual public const_talker virtual computer *get_computer() { return nullptr; } - virtual void set_pos( tripoint ) {} + virtual void set_pos( tripoint_bub_ms ) {} virtual void update_missions( const std::vector & ) {} virtual void set_str_max( int ) {} virtual void set_dex_max( int ) {} diff --git a/src/talker_character.cpp b/src/talker_character.cpp index 8ab59369e6fb9..9da74259faeb1 100644 --- a/src/talker_character.cpp +++ b/src/talker_character.cpp @@ -67,6 +67,11 @@ tripoint talker_character_const::pos() const return me_chr_const->pos(); } +tripoint_bub_ms talker_character_const::pos_bub() const +{ + return me_chr_const->pos_bub(); +} + tripoint_abs_ms talker_character_const::global_pos() const { return me_chr_const->get_location(); @@ -77,11 +82,6 @@ tripoint_abs_omt talker_character_const::global_omt_location() const return me_chr_const->global_omt_location(); } -void talker_character::set_pos( tripoint new_pos ) -{ - me_chr->setpos( new_pos ); -} - int talker_character_const::get_cur_hp( const bodypart_id &bp ) const { return me_chr_const->get_hp( bp ); @@ -130,6 +130,11 @@ dealt_damage_instance talker_character_const::deal_damage( Creature *source, bod return source->deal_damage( source, bp, dam ); } +void talker_character::set_pos( tripoint_bub_ms new_pos ) +{ + me_chr->setpos( new_pos ); +} + void talker_character::set_str_max( int value ) { me_chr->str_max = value; diff --git a/src/talker_character.h b/src/talker_character.h index fb3aa6c27c1a7..6003ad28b19f5 100644 --- a/src/talker_character.h +++ b/src/talker_character.h @@ -59,6 +59,7 @@ class talker_character_const: virtual public const_talker int posy() const override; int posz() const override; tripoint pos() const override; + tripoint_bub_ms pos_bub() const override; tripoint_abs_ms global_pos() const override; tripoint_abs_omt global_omt_location() const override; int get_cur_hp( const bodypart_id &bp ) const override; @@ -244,7 +245,7 @@ class talker_character: virtual public talker return me_chr; } - void set_pos( tripoint new_pos ) override; + void set_pos( tripoint_bub_ms new_pos ) override; // stats, skills, traits, bionics, and magic void set_str_max( int value ) override; diff --git a/src/talker_furniture.cpp b/src/talker_furniture.cpp index 030ac0d289c38..1999305603cf1 100644 --- a/src/talker_furniture.cpp +++ b/src/talker_furniture.cpp @@ -33,6 +33,11 @@ tripoint talker_furniture_const::pos() const return me_comp->loc; } +tripoint_bub_ms talker_furniture_const::pos_bub() const +{ + return tripoint_bub_ms( me_comp->loc ); +} + tripoint_abs_ms talker_furniture_const::global_pos() const { return get_map().getglobal( me_comp->loc ); diff --git a/src/talker_furniture.h b/src/talker_furniture.h index b4abe44321658..2f9176c970dae 100644 --- a/src/talker_furniture.h +++ b/src/talker_furniture.h @@ -33,6 +33,7 @@ class talker_furniture_const: public const_talker_cloner int posy() const override; int posz() const override; tripoint pos() const override; + tripoint_bub_ms pos_bub() const override; tripoint_abs_ms global_pos() const override; tripoint_abs_omt global_omt_location() const override; diff --git a/src/talker_item.cpp b/src/talker_item.cpp index fb4dea54cc134..3b3005de24452 100644 --- a/src/talker_item.cpp +++ b/src/talker_item.cpp @@ -41,6 +41,11 @@ tripoint talker_item_const::pos() const return me_it_const->position(); } +tripoint_bub_ms talker_item_const::pos_bub() const +{ + return me_it_const->pos_bub(); +} + tripoint_abs_ms talker_item_const::global_pos() const { return get_map().getglobal( me_it_const->pos_bub() ); diff --git a/src/talker_item.h b/src/talker_item.h index 78dd7b5fc77fe..ae5de10b6c370 100644 --- a/src/talker_item.h +++ b/src/talker_item.h @@ -37,6 +37,7 @@ class talker_item_const: public const_talker_cloner int posy() const override; int posz() const override; tripoint pos() const override; + tripoint_bub_ms pos_bub() const override; tripoint_abs_ms global_pos() const override; tripoint_abs_omt global_omt_location() const override; diff --git a/src/talker_monster.cpp b/src/talker_monster.cpp index c111b73a6220b..d560ebeb517c4 100644 --- a/src/talker_monster.cpp +++ b/src/talker_monster.cpp @@ -41,6 +41,11 @@ tripoint talker_monster_const::pos() const return me_mon_const->pos(); } +tripoint_bub_ms talker_monster_const::pos_bub() const +{ + return me_mon_const->pos_bub(); +} + tripoint_abs_ms talker_monster_const::global_pos() const { return me_mon_const->get_location(); diff --git a/src/talker_monster.h b/src/talker_monster.h index bbd8e7ce814a7..f6176b6d41077 100644 --- a/src/talker_monster.h +++ b/src/talker_monster.h @@ -49,6 +49,7 @@ class talker_monster_const: public const_talker_cloner int posy() const override; int posz() const override; tripoint pos() const override; + tripoint_bub_ms pos_bub() const override; tripoint_abs_ms global_pos() const override; tripoint_abs_omt global_omt_location() const override; diff --git a/src/teleport.cpp b/src/teleport.cpp index 287021146810c..79e477af9c632 100644 --- a/src/teleport.cpp +++ b/src/teleport.cpp @@ -221,7 +221,7 @@ bool teleport::teleport_to_point( Creature &critter, tripoint_bub_ms target, boo p->add_effect( effect_teleglow, 30_minutes ); } if( c_is_u ) { - g->place_player( p->pos() ); + g->place_player( p->pos_bub() ); g->update_map( *p ); } for( const effect &grab : critter.get_effects_with_flag( json_flag_GRAB ) ) { diff --git a/src/ui.cpp b/src/ui.cpp index e03cdee39b5ff..da4a237de2eb0 100644 --- a/src/ui.cpp +++ b/src/ui.cpp @@ -683,7 +683,7 @@ void uilist::calc_data() vmax = entries.size(); - ImVec2 title_size = {}; + ImVec2 title_size = ImVec2(); bool has_titlebar = !title.empty(); if( has_titlebar ) { title_size = calc_size( title ); @@ -691,19 +691,19 @@ void uilist::calc_data() title_size.y += ( s.ItemSpacing.y * expected_num_lines ) + ( s.ItemSpacing.y * 2.0 ); } - ImVec2 text_size = {}; + ImVec2 text_size = ImVec2(); if( !text.empty() ) { text_size = calc_size( text ); float expected_num_lines = text_size.y / ImGui::GetTextLineHeight(); text_size.y += ( s.ItemSpacing.y * expected_num_lines ) + ( s.ItemSpacing.y * 2.0 ); } - ImVec2 tabs_size = {}; + ImVec2 tabs_size = ImVec2(); if( !categories.empty() ) { tabs_size.y = ImGui::GetTextLineHeightWithSpacing() + ( 2.0 * s.FramePadding.y ); } - ImVec2 desc_size = {}; + ImVec2 desc_size = ImVec2(); if( desc_enabled ) { desc_size = calc_size( footer_text ); for( const uilist_entry &ent : entries ) { @@ -747,9 +747,9 @@ void uilist::calc_data() max_avail_height = std::min( max_avail_height, desired_height ); } } - calculated_menu_size.y = std::min( max_avail_height - additional_height + - ( s.FramePadding.y * 2.0 ), - vmax * ImGui::GetTextLineHeightWithSpacing() + ( s.FramePadding.y * 2.0 ) ); + calculated_menu_size.y = std::min( + max_avail_height - additional_height + ( s.FramePadding.y * 2.0 ), + vmax * ImGui::GetTextLineHeightWithSpacing() + ( s.FramePadding.y * 2.0 ) ); extra_space_left = 0.0; extra_space_right = 0.0; @@ -1226,7 +1226,7 @@ pointmenu_cb::impl_t::impl_t( const std::vector &pts ) : points( pts ) last_view = player_character.view_offset; terrain_draw_cb = make_shared_fast( [this, &player_character]() { if( last >= 0 && static_cast( last ) < points.size() ) { - g->draw_trail_to_square( player_character.view_offset.raw(), true ); + g->draw_trail_to_square( player_character.view_offset, true ); } } ); g->add_draw_callback( terrain_draw_cb ); diff --git a/src/veh_appliance.cpp b/src/veh_appliance.cpp index 52a5daac78929..cbc5bac267d57 100644 --- a/src/veh_appliance.cpp +++ b/src/veh_appliance.cpp @@ -195,13 +195,15 @@ void veh_app_interact::init_ui_windows() //NOLINTNEXTLINE(cata-use-named-point-constants) w_info = catacurses::newwin( height_info, width_info, topleft + point( 1, 1 ) ); + // Try to align the imgui window to be below the header. + // to that end, we have some awkward math translating character positions to screen positions here: ImVec2 text_metrics = { ImGui::CalcTextSize( "X" ).x, ImGui::GetTextLineHeight() }; ImVec2 origin = text_metrics * ImVec2{ static_cast( topleft.x ), static_cast( topleft.y + win_height ) }; ImVec2 size = text_metrics * ImVec2{ static_cast( win_width ), static_cast( height_input ) }; imenu.desired_bounds = { origin.x, origin.y, - size.x, - size.y + 4.0f * ( ImGui::GetStyle().FramePadding.y + ImGui::GetStyle().WindowBorderSize ) + size.x, // align the width of the input to be the same as the header + -1, // but let uilist choose the height as it pleases. }; imenu.allow_cancel = true; @@ -605,7 +607,6 @@ void veh_app_interact::populate_app_actions() imenu.addentry( -1, it._enabled, hotkey, it._text ); app_actions.emplace_back( it._on_submit ); } - imenu.setup(); } shared_ptr_fast veh_app_interact::create_or_get_ui_adaptor() diff --git a/src/veh_interact.cpp b/src/veh_interact.cpp index fe56705f555f6..04579e665b199 100644 --- a/src/veh_interact.cpp +++ b/src/veh_interact.cpp @@ -210,24 +210,24 @@ void orient_part( vehicle *veh, const vpart_info &vpinfo, int partnum, } player_character.view_offset = offset - player_character.pos_bub(); - point delta; + point_rel_ms delta; do { popup( _( "Press space, choose a facing direction for the new %s and " "confirm with enter." ), vpinfo.name() ); - const std::optional chosen = g->look_around(); + const std::optional chosen = g->look_around(); if( !chosen ) { continue; } - delta = ( *chosen - offset.raw() ).xy(); + delta = ( *chosen - offset ).xy(); // atan2 only gives reasonable values when delta is not all zero - } while( delta == point::zero ); + } while( delta == point_rel_ms::zero ); // Restore previous view offsets. player_character.view_offset = old_view_offset; - units::angle dir = normalize( atan2( delta ) - veh->face.dir() ); + units::angle dir = normalize( atan2( delta.raw() ) - veh->face.dir() ); veh->part( partnum ).direction = dir; } diff --git a/src/veh_shape.cpp b/src/veh_shape.cpp index 27be92717c424..ac6de5b2306c9 100644 --- a/src/veh_shape.cpp +++ b/src/veh_shape.cpp @@ -206,7 +206,7 @@ bool veh_shape::set_cursor_pos( const tripoint_bub_ms &new_pos ) bool veh_shape::handle_cursor_movement( const std::string &action ) { if( action == "MOUSE_MOVE" || action == "TIMEOUT" ) { - tripoint edge_scroll = g->mouse_edge_scrolling_terrain( ctxt ); + tripoint_rel_ms edge_scroll = g->mouse_edge_scrolling_terrain( ctxt ); set_cursor_pos( get_cursor_pos() + edge_scroll ); } else if( const std::optional delta = ctxt.get_direction( action ) ) { set_cursor_pos( get_cursor_pos() + *delta ); // move cursor with directional keys diff --git a/src/veh_utils.cpp b/src/veh_utils.cpp index a3be60ef14b7b..1fc5a3366feb8 100644 --- a/src/veh_utils.cpp +++ b/src/veh_utils.cpp @@ -373,7 +373,7 @@ class veh_menu_cb : public uilist_callback last_view = player_character.view_offset; terrain_draw_cb = make_shared_fast( [this, &player_character]() { if( draw_trail && last >= 0 && static_cast( last ) < points.size() ) { - g->draw_trail_to_square( player_character.view_offset.raw(), true ); + g->draw_trail_to_square( player_character.view_offset, true ); } } ); g->add_draw_callback( terrain_draw_cb ); diff --git a/src/vehicle.h b/src/vehicle.h index 2e0246584ccca..eb49f8986dc1a 100644 --- a/src/vehicle.h +++ b/src/vehicle.h @@ -940,7 +940,7 @@ class vehicle // initializes parts and fuel state for randomly generated vehicle and calls refresh() void init_state( map &placed_on, int init_veh_fuel, int init_veh_status, - const bool force_status = false ); + bool force_status = false ); // damages all parts of a vehicle by a random amount void smash( map &m, float hp_percent_loss_min = 0.1f, float hp_percent_loss_max = 1.2f, diff --git a/src/vehicle_use.cpp b/src/vehicle_use.cpp index d23aecb156148..2d768e8644a0b 100644 --- a/src/vehicle_use.cpp +++ b/src/vehicle_use.cpp @@ -372,7 +372,7 @@ void vehicle::build_electronics_menu( veh_menu &menu ) menu.add( _( "Play arcade machine" ) ) .hotkey( "ARCADE" ) .enable( !!arc_itm ) - .on_submit( [arc_itm] { iuse::portable_game( &get_avatar(), arc_itm, tripoint::zero ); } ); + .on_submit( [arc_itm] { iuse::portable_game( &get_avatar(), arc_itm, tripoint_bub_ms::zero ); } ); break; } } @@ -938,7 +938,7 @@ void vehicle::play_music() const { Character &player_character = get_player_character(); for( const vpart_reference &vp : get_enabled_parts( "STEREO" ) ) { - iuse::play_music( &player_character, vp.pos_bub().raw(), 15, 30 ); + iuse::play_music( &player_character, vp.pos_bub(), 15, 30 ); } } @@ -1867,7 +1867,7 @@ void vehicle::build_interact_menu( veh_menu &menu, const tripoint &p, bool with_ .hotkey( "EXAMINE_VEHICLE" ) .on_submit( [this, vp] { const vpart_position non_fake( *this, get_non_fake_part( vp.part_index() ) ); - const point start_pos = non_fake.mount_pos().raw().rotate( 2 ); + const point_rel_ms start_pos = non_fake.mount_pos().rotate( 2 ); g->exam_vehicle( *this, start_pos ); } ); diff --git a/src/wish.cpp b/src/wish.cpp index 10d83facaea7a..56e76ddf2a048 100644 --- a/src/wish.cpp +++ b/src/wish.cpp @@ -814,9 +814,9 @@ void debug_menu::wishmonster( const std::optional &p ) wmenu.query(); if( wmenu.ret >= 0 ) { const mtype_id &mon_type = mtypes[ wmenu.ret ]->id; - if( std::optional spawn = p ? p : g->look_around() ) { + if( std::optional spawn = p ? tripoint_bub_ms( p.value() ) : g->look_around() ) { int num_spawned = 0; - for( const tripoint &destination : closest_points_first( *spawn, cb.group ) ) { + for( const tripoint_bub_ms &destination : closest_points_first( *spawn, cb.group ) ) { monster *const mon = g->place_critter_at( mon_type, destination ); if( !mon ) { continue; diff --git a/src/worldfactory.cpp b/src/worldfactory.cpp index 0a69bcedd1fbe..08df8b2ad2f46 100644 --- a/src/worldfactory.cpp +++ b/src/worldfactory.cpp @@ -307,7 +307,7 @@ bool WORLD::save( const bool is_conversion ) const } if( !is_conversion ) { - const auto savefile = folder_path() / PATH_INFO::worldoptions(); + const cata_path savefile = folder_path() / PATH_INFO::worldoptions(); const bool saved = write_to_file( savefile, [&]( std::ostream & fout ) { JsonOut jout( fout ); @@ -423,7 +423,7 @@ void worldfactory::init() if( newworld->save( true ) ) { const cata_path origin_path = old_world.folder_path(); // move files from origin_path into new world path - for( auto &origin_file : get_files_from_path( ".", origin_path, false ) ) { + for( cata_path &origin_file : get_files_from_path( ".", origin_path, false ) ) { std::string filename = origin_file.get_relative_path().filename().generic_u8string(); if( rename_file( origin_file, ( newworld->folder_path() / filename ) ) ) { @@ -2153,15 +2153,15 @@ void worldfactory::delete_world( const std::string &worldname, const bool delete auto end = std::remove_if( file_paths.begin(), file_paths.end(), isForbidden ); file_paths.erase( end, file_paths.end() ); - for( auto &file_path : file_paths ) { + for( cata_path &file_path : file_paths ) { fs::path folder_path = file_path.get_unrelative_path().parent_path(); - while( folder_path.filename() != worldname ) { + while( folder_path.filename() != fs::u8path( worldname ) ) { directory_paths.insert( folder_path ); folder_path = folder_path.parent_path(); } } - for( auto &file : file_paths ) { + for( cata_path &file : file_paths ) { remove_file( file ); } diff --git a/tests/battery_mod_test.cpp b/tests/battery_mod_test.cpp index 1572cbfc3b694..dbdf4d343600e 100644 --- a/tests/battery_mod_test.cpp +++ b/tests/battery_mod_test.cpp @@ -174,7 +174,7 @@ TEST_CASE( "battery_tool_mod_test", "[battery][mod]" ) Character *dummy = &get_avatar(); clear_avatar(); - actor->use( dummy, flashlight, dummy->pos() ); + actor->use( dummy, flashlight, dummy->pos_bub() ); // Regression tests for #42764 / #42854 THEN( "mod remains installed" ) { diff --git a/tests/eoc_test.cpp b/tests/eoc_test.cpp index d379bd0e1f611..77897d49d912c 100644 --- a/tests/eoc_test.cpp +++ b/tests/eoc_test.cpp @@ -1346,7 +1346,7 @@ TEST_CASE( "EOC_loc_relative_test", "[eoc]" ) clear_map(); map &m = get_map(); - g->place_player( tripoint::zero ); + g->place_player( tripoint_bub_ms::zero ); const tripoint_abs_ms start = get_avatar().get_location(); const tripoint_bub_ms tgt = m.bub_from_abs( start + tripoint::north ); diff --git a/tests/item_tname_test.cpp b/tests/item_tname_test.cpp index d8a6f54efb8d5..6746a7375391c 100644 --- a/tests/item_tname_test.cpp +++ b/tests/item_tname_test.cpp @@ -961,6 +961,6 @@ TEST_CASE( "tname_i18n_order", "[item][tname][translations]" ) CHECK( backpack.tname() == "++ backpack (burnt) (filthy)" ); - set_language_from_options(); + set_language( "en" ); } #endif diff --git a/tests/iteminfo_test.cpp b/tests/iteminfo_test.cpp index 90f1479740bdc..7b13279d7d1c1 100644 --- a/tests/iteminfo_test.cpp +++ b/tests/iteminfo_test.cpp @@ -2482,7 +2482,7 @@ TEST_CASE( "tool_info", "[iteminfo][tool]" ) CHECK( item_info_str( oxy_torch, magazine_compat ) == "--\n" "Compatible magazines:\n" - "Types: small welding tank and welding tank\n" ); + "Types: small welding tank, tiny welding tank, and welding tank\n" ); } } diff --git a/tests/iuse_actor_test.cpp b/tests/iuse_actor_test.cpp index b1945f2286fe6..f0c0f0f924faf 100644 --- a/tests/iuse_actor_test.cpp +++ b/tests/iuse_actor_test.cpp @@ -108,7 +108,7 @@ TEST_CASE( "tool_transform_when_activated", "[iuse][tool][transform]" ) const use_function *use = flashlight.type->get_use( "transform" ); REQUIRE( use != nullptr ); const iuse_transform *actor = dynamic_cast( use->get_actor_ptr() ); - actor->use( dummy, flashlight, dummy->pos() ); + actor->use( dummy, flashlight, dummy->pos_bub() ); THEN( "it becomes active" ) { CHECK( flashlight.active ); diff --git a/tests/map_test.cpp b/tests/map_test.cpp index 112fe0719aaa1..318777c45fea0 100644 --- a/tests/map_test.cpp +++ b/tests/map_test.cpp @@ -163,7 +163,7 @@ TEST_CASE( "place_player_can_safely_move_multiple_submaps" ) // Regression test for the situation where game::place_player would misuse // map::shift if the resulting shift exceeded a single submap, leading to a // broken active item cache. - g->place_player( tripoint::zero ); + g->place_player( tripoint_bub_ms::zero ); get_map().check_submap_active_item_consistency(); } diff --git a/tests/math_parser_test.cpp b/tests/math_parser_test.cpp index 1b1edc39abf77..d9a1b4a21a803 100644 --- a/tests/math_parser_test.cpp +++ b/tests/math_parser_test.cpp @@ -18,6 +18,19 @@ TEST_CASE( "math_parser_parsing", "[math_parser]" ) dialogue d( std::make_unique(), std::make_unique() ); math_exp testexp; + std::locale const &oldloc = std::locale(); + on_out_of_scope reset_loc( [&oldloc]() { + std::locale::global( oldloc ); + char *discard [[maybe_unused]] = std::setlocale( LC_ALL, oldloc.name().c_str() ); + } ); + try { + std::locale::global( std::locale( "de_DE.UTF-8" ) ); + char *discard [[maybe_unused]] = std::setlocale( LC_ALL, "de_DE.UTF-8" ); + } catch( std::runtime_error &e ) { + WARN( "couldn't set locale for math_parser test: " << e.what() ); + } + CAPTURE( std::setlocale( LC_ALL, nullptr ), std::locale().name(), std::to_string( 1.2 ) ); + CHECK_FALSE( testexp.parse( "" ) ); CHECK( testexp.eval( d ) == Approx( 0.0 ) ); CHECK( testexp.parse( "50" ) ); @@ -135,16 +148,6 @@ TEST_CASE( "math_parser_parsing", "[math_parser]" ) CHECK( std::isnan( testexp.eval( d ) ) ); // locale-independent decimal point - std::locale const &oldloc = std::locale(); - on_out_of_scope reset_loc( [&oldloc]() { - std::locale::global( oldloc ); - } ); - try { - std::locale::global( std::locale( "de_DE.UTF-8" ) ); - } catch( std::runtime_error &e ) { - WARN( "couldn't set locale for math_parser test: " << e.what() ); - } - CAPTURE( std::setlocale( LC_ALL, nullptr ), std::locale().name() ); CHECK( testexp.parse( "2 * 1.5" ) ); CHECK( testexp.eval( d ) == Approx( 3 ) ); diff --git a/tests/npc_test.cpp b/tests/npc_test.cpp index 844af39fb85d1..58f40f1a583bb 100644 --- a/tests/npc_test.cpp +++ b/tests/npc_test.cpp @@ -352,7 +352,7 @@ TEST_CASE( "npc-board-player-vehicle" ) for( std::pair &given : test_data::npc_boarding_data ) { GIVEN( given.first ) { npc_boarding_test_data &data = given.second; - g->place_player( data.player_pos.raw() ); + g->place_player( data.player_pos ); clear_map(); map &here = get_map(); Character &pc = get_player_character(); @@ -435,7 +435,7 @@ TEST_CASE( "npc-movement" ) const ter_id t_floor( "t_floor" ); const furn_id f_rubble( "f_rubble" ); - g->place_player( tripoint( 60, 60, 0 ) ); + g->place_player( { 60, 60, 0 } ); clear_map(); @@ -542,7 +542,7 @@ TEST_CASE( "npc-movement" ) for( int y = 0; y < height; ++y ) { for( int x = 0; x < width; ++x ) { if( setup[y][x] == 'V' ) { - g->place_player( player_character.pos() + point( x, y ) ); + g->place_player( player_character.pos_bub() + point( x, y ) ); break; } } diff --git a/tests/player_activities_test.cpp b/tests/player_activities_test.cpp index 366ddabae4ae2..ae98243c58445 100644 --- a/tests/player_activities_test.cpp +++ b/tests/player_activities_test.cpp @@ -384,7 +384,7 @@ TEST_CASE( "shearing", "[activity][shearing][animals]" ) const use_function *use = elec_shears.type->get_use( "transform" ); REQUIRE( use != nullptr ); const iuse_transform *actor = dynamic_cast( use->get_actor_ptr() ); - actor->use( &dummy, elec_shears, dummy.pos() ); + actor->use( &dummy, elec_shears, dummy.pos_bub() ); dummy.i_add( elec_shears ); REQUIRE( dummy.max_quality( qual_SHEAR ) == 3 ); @@ -430,7 +430,7 @@ TEST_CASE( "shearing", "[activity][shearing][animals]" ) const use_function *use = elec_shears.type->get_use( "transform" ); REQUIRE( use != nullptr ); const iuse_transform *actor = dynamic_cast( use->get_actor_ptr() ); - actor->use( &dummy, elec_shears, dummy.pos() ); + actor->use( &dummy, elec_shears, dummy.pos_bub() ); dummy.i_add( elec_shears ); REQUIRE( dummy.max_quality( qual_SHEAR ) == 3 ); diff --git a/tests/vision_test.cpp b/tests/vision_test.cpp index 78408b6923d5a..ff4fe3e8850ac 100644 --- a/tests/vision_test.cpp +++ b/tests/vision_test.cpp @@ -154,7 +154,7 @@ struct vision_test_case { void test_all() const { Character &player_character = get_player_character(); - g->place_player( tripoint( 60, 60, 0 ) ); + g->place_player( { 60, 60, 0 } ); player_character.clear_worn(); // Remove any light-emitting clothing player_character.clear_effects(); player_character.clear_bionics();