Skip to content

Commit

Permalink
Compatibility patch for the Extra Map Options mod
Browse files Browse the repository at this point in the history
Fixed mini map icons/decorations appearing in other biomes lakes
Added ace's replant mechanic for the biome trees
  • Loading branch information
BrunoSupremo committed Mar 21, 2019
1 parent aff2302 commit e4a64b5
Show file tree
Hide file tree
Showing 31 changed files with 894 additions and 672 deletions.
5 changes: 1 addition & 4 deletions archipelago_biome_server.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
archipelago_biome = {}
print("Archipelago Biome Mod version 19.2.10")
print("Archipelago Biome Mod version 19.3.21")

function archipelago_biome:_on_required_loaded()
end
Expand All @@ -11,9 +11,6 @@ function archipelago_biome:_on_biome_set(e)
if e.biome_uri ~= "archipelago_biome:biome:archipelago" then
return
end
local custom_world_generation_service = require('services.server.world_generation.custom_world_generation_service')
local world_generation_service = radiant.mods.require('stonehearth.services.server.world_generation.world_generation_service')
radiant.mixin(world_generation_service, custom_world_generation_service)

local custom_landscaper = require('services.server.world_generation.custom_landscaper')
local landscaper = radiant.mods.require('stonehearth.services.server.world_generation.landscaper')
Expand Down
8 changes: 7 additions & 1 deletion components/wave/wave.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function ArchipelagoWave:post_activate()
self.timer = stonehearth.calendar:set_timer('rotate wave to correct orientation', "1m", function()
self:rotate()
self.timer = nil
end)
end)

local interval = 2000 + rng:get_int(1,2000)
self.wave_timer = stonehearth.calendar:set_interval("ArchipelagoWave wave_timer", interval, function() self:run_effect() end, interval)
Expand All @@ -21,6 +21,12 @@ function ArchipelagoWave:rotate()
local location = radiant.entities.get_world_grid_location(self._entity)
if not location then
return
else
if location.y>40 then
--to avoid waves in the foothills/mountains rivers
radiant.entities.destroy_entity(self._entity)
return
end
end
local intersected_entities = radiant.terrain.get_entities_at_point(location)
local has_water=false
Expand Down
59 changes: 4 additions & 55 deletions data/biome/archipelago_generation_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -566,13 +566,15 @@
"stonehearth:plants:brightbell": 2,
"stonehearth:plants:frostsnap": 2,
"stonehearth:plants:foxlily": 1,
"archipelago_biome:trees:papaya": 2
"archipelago_biome:trees:papaya": 2,
"archipelago_biome:terrain:cave":0.8
},
"2": {
"archipelago_biome:plants:hibiscus": 1,
"archipelago_biome:plants:blue_hibiscus": 0.1,
"stonehearth:plants:brightbell": 1,
"stonehearth:plants:frostsnap": 1
"stonehearth:plants:frostsnap": 1,
"archipelago_biome:terrain:cave":1
}
}
},
Expand Down Expand Up @@ -639,59 +641,6 @@
"small": 0.2,
"medium": 0.4
}
},
"caves": {
"weights": {
"plains": {
"1": {
"archipelago_biome:terrain:cave":1
}
},
"foothills": {
"1": {
"archipelago_biome:terrain:cave":1
}
},
"mountains": {
"1": {
"archipelago_biome:terrain:cave":1
}
}
},
"noise_map_parameters": {
"terrain_based": {
"plains": {
"1": {
"probability": 0,
"density": 0
}
},
"foothills": {
"1": {
"probability": 0,
"density": 0
}
},
"mountains": {
"1": {
"probability": 0.26,
"density": 1
},
"2": {
"probability": 0.21,
"density": 1
},
"4": {
"probability": 0.2,
"density": 1
},
"6": {
"probability": 0.1,
"density": 1
}
}
}
}
}
},
"water": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"display_name": "i18n(archipelago_biome:entities.decoration.fish_container.display_name)",
"description": "i18n(archipelago_biome:entities.decoration.fish_container.description)",
"icon": "file(fish_container.png)",
"category": "decoration",
"category": "storage",
"material_tags":["wood", "decoration", "crafted", "stockpile_decoration"]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"display_name": "i18n(archipelago_biome:entities.decoration.fruit_container.display_name)",
"description": "i18n(archipelago_biome:entities.decoration.fruit_container.description)",
"icon": "file(fruit_container.png)",
"category": "decoration",
"category": "storage",
"material_tags":["wood", "decoration", "crafted", "stockpile_decoration"]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"display_name": "i18n(archipelago_biome:entities.decoration.pearl_container.display_name)",
"description": "i18n(archipelago_biome:entities.decoration.pearl_container.description)",
"icon": "file(pearl_container.png)",
"category": "decoration",
"category": "storage",
"material_tags":["wood", "decoration", "crafted", "stockpile_decoration"]
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"type": "entity",
"components": {
"model_variants": {
"default": {
"models": [
"file(large_bend_palm_stump.qb)"
]
}
},
"stonehearth:resource_node": {
"harvest_overlay_effect": "stonehearth:effects:chop_overlay_effect",
"harvester_effect": "chop",
"resource": "stonehearth:resources:wood:oak_log"
},
"mob": {
"model_origin": {"x": -4, "y": 0, "z": 0 },
"region_origin": {"x": -3.5, "y": 0, "z": 0.5 }
},
"destination": {
"region": [
{
"min": {"x": 0, "y": 0, "z": 0 },
"max": {"x": 1, "y": 1, "z": 1 }
}
]
},
"region_collision_shape": {
"region": [
{
"min": {"x": 0, "y": 0, "z": 0 },
"max": {"x": 1, "y": 1, "z": 1 }
}
]
}
},
"entity_data": {
"stonehearth:catalog": {
"display_name": "i18n(tree_stump:entities.trees.stump)",
"description": "i18n(tree_stump:entities.trees.stump_description)"
}
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,11 @@
}
},
"entity_data": {
"archipelago_biome:climbable":{
"path":[
{"x":4,"y":0},
{"x":4,"y":8},
{"x":0,"y":8},
{"x":0,"y":11}
]
"stonehearth:stump_data": {
"stump_alias": "archipelago_biome:trees:bend_palm:large:stump"
},
"stonehearth_ace:replant_data": {
"seed_alias": "archipelago_biome:trees:palm:seed"
},
"stonehearth:catalog": {
"display_name": "i18n(archipelago_biome:entities.trees.bend_palm_tree.large_bend_palm_tree.display_name)"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"type": "entity",
"components": {
"model_variants": {
"default": {
"models": [
"file(small_bend_palm_stump.qb)"
]
}
},
"stonehearth:resource_node": {
"harvest_overlay_effect": "stonehearth:effects:chop_overlay_effect",
"harvester_effect": "chop",
"resource": "stonehearth:resources:wood:oak_log"
},
"mob": {
"model_origin": {"x": -4, "y": 0, "z": 0 },
"region_origin": {"x": -3.5, "y": 0, "z": 0.5 }
},
"destination": {
"region": [
{
"min": {"x": 0, "y": 0, "z": 0 },
"max": {"x": 1, "y": 1, "z": 1 }
}
]
},
"region_collision_shape": {
"region": [
{
"min": {"x": 0, "y": 0, "z": 0 },
"max": {"x": 1, "y": 1, "z": 1 }
}
]
}
},
"entity_data": {
"stonehearth:catalog": {
"display_name": "i18n(tree_stump:entities.trees.stump)",
"description": "i18n(tree_stump:entities.trees.stump_description)"
}
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,11 @@
}
},
"entity_data": {
"archipelago_biome:climbable":{
"path":[
{"x":4,"y":0},
{"x":4,"y":5},
{"x":0,"y":5},
{"x":0,"y":6}
]
"stonehearth:stump_data": {
"stump_alias": "archipelago_biome:trees:bend_palm:small:stump"
},
"stonehearth_ace:replant_data": {
"seed_alias": "archipelago_biome:trees:palm:seed"
},
"stonehearth:catalog": {
"display_name": "i18n(archipelago_biome:entities.trees.bend_palm_tree.small_bend_palm_tree.display_name)"
Expand Down
6 changes: 6 additions & 0 deletions entities/trees/dranden/dranden.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@
}
},
"entity_data": {
"stonehearth:stump_data": {
"stump_alias": "archipelago_biome:trees:dranden:small:stump"
},
"stonehearth_ace:replant_data": {
"seed_alias": "archipelago_biome:trees:dranden:seed"
},
"stonehearth:catalog": {
"display_name": "i18n(archipelago_biome:entities.trees.dranden.display_name)",
"description": "i18n(archipelago_biome:entities.trees.dranden.description)",
Expand Down
46 changes: 46 additions & 0 deletions entities/trees/dranden/dranden_stump.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"type": "entity",
"components": {
"render_info": {
"scale": 0.5
},
"model_variants": {
"default": {
"models": [
"file(dranden_stump.qb)"
]
}
},
"stonehearth:resource_node": {
"harvest_overlay_effect": "stonehearth:effects:chop_overlay_effect",
"harvester_effect": "chop",
"resource": "stonehearth:resources:wood:oak_log"
},
"destination": {
"region": [
{
"min": {"x": -3, "y": 0, "z": -2 },
"max": {"x": 2, "y": 1, "z": 3 }
}
]
},
"mob": {
"model_origin": {"x": 0, "y": 0, "z": 0 },
"region_origin": {"x": -0.5, "y": 0, "z": 0.5 }
},
"region_collision_shape": {
"region": [
{
"min": {"x": -3, "y": 0, "z": -2 },
"max": {"x": 2, "y": 3, "z": 3 }
}
]
}
},
"entity_data": {
"stonehearth:catalog": {
"display_name": "i18n(tree_stump:entities.trees.stump)",
"description": "i18n(tree_stump:entities.trees.stump_description)"
}
}
}
Binary file added entities/trees/dranden/dranden_stump.qb
Binary file not shown.
46 changes: 46 additions & 0 deletions entities/trees/palm_tree/large_palm_tree/large_palm_stump.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"type": "entity",
"components": {
"render_info": {
"scale": 0.1
},
"model_variants": {
"default": {
"models": [
"file(large_palm_stump.qb)"
]
}
},
"stonehearth:resource_node": {
"harvest_overlay_effect": "stonehearth:effects:chop_overlay_effect",
"harvester_effect": "chop",
"resource": "stonehearth:resources:wood:oak_log"
},
"destination": {
"region": [
{
"min": { "x": -1, "y": 0, "z": 0 },
"max": { "x": 0, "y": 1, "z": 1 }
}
]
},
"mob": {
"model_origin": { "x": 0, "y": 0, "z": 0 },
"region_origin": { "x": -0.5, "y": 0, "z": 0.5 }
},
"region_collision_shape": {
"region": [
{
"min": { "x": -1, "y": 0, "z": 0 },
"max": { "x": 0, "y": 2, "z": 1 }
}
]
}
},
"entity_data": {
"stonehearth:catalog": {
"display_name": "i18n(tree_stump:entities.trees.stump)",
"description": "i18n(tree_stump:entities.trees.stump_description)"
}
}
}
Binary file not shown.
10 changes: 5 additions & 5 deletions entities/trees/palm_tree/large_palm_tree/large_palm_tree.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
}
},
"entity_data": {
"archipelago_biome:climbable":{
"path":[
{"x":0,"y":0},
{"x":0,"y":13}
]
"stonehearth:stump_data": {
"stump_alias": "archipelago_biome:trees:palm:large:stump"
},
"stonehearth_ace:replant_data": {
"seed_alias": "archipelago_biome:trees:palm:seed"
},
"stonehearth:catalog": {
"display_name": "i18n(archipelago_biome:entities.trees.palm_tree.large_palm_tree.display_name)"
Expand Down
Loading

0 comments on commit e4a64b5

Please sign in to comment.