Skip to content

Commit

Permalink
Merge pull request #75403 from Standing-Storm/sky-island-temperature
Browse files Browse the repository at this point in the history
[Sky Island] Add bunker climate control upgrade
  • Loading branch information
Maleclypse authored Aug 3, 2024
2 parents 56ce45a + 45bc7b1 commit e218158
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 1 deletion.
13 changes: 13 additions & 0 deletions data/mods/Sky_Island/dialog_statue.json
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,19 @@
"effect": [ { "assign_mission": "SKYISLAND_BUILD_centralskylight4" } ],
"topic": "SKYISLAND_UPGRADES_INFRASTRUCTURE"
},
{
"text": "Construct: Climate Control",
"condition": {
"and": [
{ "not": { "u_has_mission": "SKYISLAND_bunker_temperature_adaptation" } },
{ "math": [ "skyisland_build_bigroom", ">=", "2" ] },
{ "math": [ "islandrank", ">=", "3" ] },
{ "math": [ "skyisland_bunker_temperature_adaptation", "==", "0" ] }
]
},
"effect": [ { "assign_mission": "SKYISLAND_bunker_temperature_adaptation" } ],
"topic": "SKYISLAND_UPGRADES_INFRASTRUCTURE"
},
{ "text": "Nevermind.", "topic": "SKYISLAND_UPGRADE" }
]
}
Expand Down
5 changes: 5 additions & 0 deletions data/mods/Sky_Island/island_upgrades.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@
"id": "EOC_skyisland_build_centralskylight4",
"effect": [ { "mapgen_update": "mx_skyisland_skylight4", "target_var": { "global_val": "OM_island_center" } } ]
},
{
"type": "effect_on_condition",
"id": "EOC_skyisland_build_climatecontrol",
"effect": [ { "u_add_trait": "mut_skyisland_temperature_adaptation" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_memorize_island",
Expand Down
2 changes: 1 addition & 1 deletion data/mods/Sky_Island/missions_and_mapgen.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{ "u_add_trait": "awayfromhome" },
{ "math": [ "timeawayfromhome", "=", "0 - bonuspulses" ] },
{ "u_add_effect": "warpsickness", "intensity": 6, "duration": "PERMANENT" },
{ "run_eocs": [ "EOC_create_slaughter" ] },
{ "run_eocs": [ "EOC_create_slaughter", "EOC_SKY_ISLAND_CLIMATE_RESET" ] },
{
"switch": { "math": [ "bonusmissions" ] },
"cases": [
Expand Down
40 changes: 40 additions & 0 deletions data/mods/Sky_Island/mutations.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[
{
"type": "mutation",
"id": "mut_skyisland_temperature_adaptation",
"name": { "str": "Climate Control" },
"points": 0,
"description": "The climate is controlled for you when you are in the bunker.",
"valid": false,
"player_display": false,
"purifiable": false
},
{
"type": "effect_on_condition",
"id": "EOC_SKY_ISLAND_CLIMATE_CONTROL",
"recurrence": [ "3 seconds", "3 seconds" ],
"condition": {
"and": [
{ "u_has_trait": "mut_skyisland_temperature_adaptation" },
{ "u_at_om_location": "open_air" },
{ "math": [ "u_val('pos_z')", "==", "6" ] }
]
},
"deactivate_condition": { "not": { "u_has_trait": "mut_skyisland_temperature_adaptation" } },
"effect": [ { "math": [ "weather('temperature')", "=", "from_fahrenheit( 70 )" ] } ]
},
{
"type": "effect_on_condition",
"id": "EOC_SKY_ISLAND_CLIMATE_CONTROL_SURFACE",
"eoc_type": "EVENT",
"required_event": "avatar_enters_omt",
"condition": { "and": [ { "u_has_trait": "mut_skyisland_temperature_adaptation" }, { "u_at_om_location": "sky_island_core" } ] },
"effect": [ { "run_eocs": "EOC_SKY_ISLAND_CLIMATE_RESET" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_SKY_ISLAND_CLIMATE_RESET",
"condition": { "u_has_trait": "mut_skyisland_temperature_adaptation" },
"effect": [ "next_weather" ]
}
]
66 changes: 66 additions & 0 deletions data/mods/Sky_Island/upgrade_missions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2486,6 +2486,72 @@
[ [ "cordage", 1, "LIST" ] ]
]
},
{
"id": "SKYISLAND_bunker_temperature_adaptation",
"type": "mission_definition",
"name": "Construct: Climate Control",
"description": "Completing this mission will instantly enhance the bunker on your home island.\n\nCraft a Lukewarm Sphere from simple tools and common building materials. The Heart of the Island has already placed the recipe inside your mind.\n\nNew Infrastructure: Climate Control. Control the climate within the bunker so it's not too warm in the summer or too cold in the winter.",
"goal": "MGOAL_FIND_ITEM",
"item": "buildkey_climatecontrol",
"count": 1,
"difficulty": 0,
"value": 0,
"has_generic_rewards": false,
"start": {
"effect": [
{ "u_learn_recipe": "buildkey_climatecontrol" },
{
"u_message": "The bunker is expansive, but it's too hot in summer and much too cold in winter. A climate control system would make it a more comfortable place to rest when not on raids. Time to get to work.\nA new recipe has been learned. Craft this artifact to permanently upgrade the island.\n\nNew Infrastructure: Climate Control. Control the climate within the bunker so it's not too warm in the summer or too cold in the winter.",
"popup": true
}
]
},
"end": {
"effect": [
{ "math": [ "skyisland_bunker_temperature_adaptation", "=", "1" ] },
{ "u_forget_recipe": "buildkey_climatecontrol" },
{ "run_eocs": "EOC_skyisland_build_climatecontrol" },
{ "u_message": "Construction complete. The bunker's temperature is now controlled.", "popup": true }
]
}
},
{
"id": "buildkey_climatecontrol",
"type": "GENERIC",
"category": "spare_parts",
"name": { "str": "Lukewarm Sphere" },
"description": "This strange metaphysical artifact is used to build infrastructure on the island. Will be used automatically upon crafting, and can only be used once.\n\nASSOCIATED BUILD: Climate Control",
"volume": "25000 ml",
"weight": "15000 g",
"longest_side": "90 cm",
"material": [ "stone" ],
"symbol": "V",
"color": "white"
},
{
"result": "buildkey_climatecontrol",
"type": "recipe",
"activity_level": "NO_EXERCISE",
"category": "CC_WARP",
"subcategory": "CSC_WARP_UPGRADES",
"skill_used": "survival",
"difficulty": 0,
"time": "15 m",
"flags": [ "SECRET", "BLIND_EASY" ],
"reversible": false,
"tools": [ [ [ "fakeitem_statue", -1 ] ] ],
"qualities": [ { "id": "SEW", "level": 3 }, { "id": "FABRIC_CUT", "level": 2 }, { "id": "BLOW_HOT_AIR", "level": 1 } ],
"components": [
[ [ "coat_winter", 1 ] ],
[ [ "down_blanket", 1 ] ],
[ [ "mask_ski", 1 ] ],
[ [ "umbrella", 1 ], [ "teleumbrella", 1 ] ],
[ [ "flag_swimsuit", 1 ], [ "trunks", 1 ], [ "bikini_bottom_short", 1 ], [ "bikini_bottom", 1 ] ],
[ [ "tshirt_cropped", 1 ] ],
[ [ "large_space_heater", 1 ] ],
[ [ "mountable_cooler", 1 ] ]
]
},
{
"id": "SKYISLAND_BUILD_westroom1",
"type": "mission_definition",
Expand Down

0 comments on commit e218158

Please sign in to comment.