diff --git a/data/build/building_brushes.json b/data/build/building_brushes.json index e16bc8a..78d4d41 100644 --- a/data/build/building_brushes.json +++ b/data/build/building_brushes.json @@ -122,10 +122,6 @@ "display_name": "i18n(swamp_goblins:data.build.building_brushes.colors.#5C6E4C)", "ordinal" : 10006 }, - "#918154" : { - "display_name": "i18n(swamp_goblins:data.build.building_brushes.colors.#918154)", - "ordinal" : 10007 - }, "#9C9F69" : { "display_name": "i18n(swamp_goblins:data.build.building_brushes.colors.#9C9F69)", "ordinal" : 10008 diff --git a/data/images/firefly_400x300.png b/data/images/firefly_400x300.png index 1c77417..b3b230e 100644 Binary files a/data/images/firefly_400x300.png and b/data/images/firefly_400x300.png differ diff --git a/data/images/story_board_image.png b/data/images/story_board_image.png index a27392a..9817eef 100644 Binary files a/data/images/story_board_image.png and b/data/images/story_board_image.png differ diff --git a/data/resource_constants.json b/data/resource_constants.json index fe70c48..79eefb5 100644 --- a/data/resource_constants.json +++ b/data/resource_constants.json @@ -1,13 +1,21 @@ { "resources": { "fiber resource": { - "stacks": 60 + "stacks": 60, + "builder_icon": "/swamp_goblins/entities/resources/fiber/builder_fiber.png", + "builder_icon_hover": "/swamp_goblins/entities/resources/fiber/builder_fiber.png", + "builder_sound_uri": "stonehearth:sounds:building_wall_wood", + "tooltip": "swamp_goblins:ui.game.build_mode2.tooltips.fiber_resource" }, "bone resource": { "name": "i18n(swamp_goblins:ui.data.constants.bone_resource_name)", "icon": "/swamp_goblins/entities/resources/bone/bone.png", "default_resource": "swamp_goblins:resources:bone", - "stacks": 60 + "stacks": 60, + "builder_icon": "/swamp_goblins/entities/resources/bone/builder_bone.png", + "builder_icon_hover": "/swamp_goblins/entities/resources/bone/builder_bone.png", + "builder_sound_uri": "stonehearth:sounds:building_wall_wood", + "tooltip": "swamp_goblins:ui.game.build_mode2.tooltips.bone_resource" } } } \ No newline at end of file diff --git a/entities/armor/bear_armor/bear_armor.json b/entities/armor/bear_armor/bear_armor.json index 7f186d4..08903e2 100644 --- a/entities/armor/bear_armor/bear_armor.json +++ b/entities/armor/bear_armor/bear_armor.json @@ -19,7 +19,7 @@ "render_type": "merge_with_model", "ilevel": 5, "required_job_level": 1, - "roles": "mail_wearer", + "roles": "goblin_worker_job", "equip_effect": "stonehearth:effects:weapon_level_up" } }, diff --git a/entities/armor/bear_helmet/bear_helmet.json b/entities/armor/bear_helmet/bear_helmet.json index 37386cf..bd74d64 100644 --- a/entities/armor/bear_helmet/bear_helmet.json +++ b/entities/armor/bear_helmet/bear_helmet.json @@ -19,7 +19,7 @@ "slot": "helmet", "ilevel": 3, "required_job_level": 1, - "roles": "mail_wearer", + "roles": "goblin_worker_job", "equip_effect": "stonehearth:effects:weapon_level_up" } }, diff --git a/entities/armor/bone_armor/bone_armor.json b/entities/armor/bone_armor/bone_armor.json index 335aa74..2a4acc9 100644 --- a/entities/armor/bone_armor/bone_armor.json +++ b/entities/armor/bone_armor/bone_armor.json @@ -19,7 +19,7 @@ "render_type": "merge_with_model", "ilevel": 5, "required_job_level": 1, - "roles": "mail_wearer", + "roles": "goblin_worker_job", "equip_effect": "stonehearth:effects:weapon_level_up" } }, diff --git a/entities/armor/bone_helmet/bone_helmet.json b/entities/armor/bone_helmet/bone_helmet.json index 6e56a0c..d2a99d2 100644 --- a/entities/armor/bone_helmet/bone_helmet.json +++ b/entities/armor/bone_helmet/bone_helmet.json @@ -19,7 +19,7 @@ "slot": "helmet", "ilevel": 3, "required_job_level": 1, - "roles": "mail_wearer", + "roles": "goblin_worker_job", "equip_effect": "stonehearth:effects:weapon_level_up" } }, diff --git a/entities/armor/chieftan_base_armor/chieftan_base_armor.json b/entities/armor/chieftan_base_armor/chieftan_base_armor.json index 767b337..231f6b6 100644 --- a/entities/armor/chieftan_base_armor/chieftan_base_armor.json +++ b/entities/armor/chieftan_base_armor/chieftan_base_armor.json @@ -16,8 +16,7 @@ "slot": "torso", "render_type": "merge_with_model", "ilevel": 1, - "_required_job_level": 1, - "roles": "worker_job", + "roles": "goblin_worker_job", "equip_effect": "stonehearth:effects:weapon_level_up", "additional_equipment": { "swamp_goblins:armor:chieftan_base_helmet": true diff --git a/entities/armor/chieftan_base_armor/chieftan_base_helmet.json b/entities/armor/chieftan_base_armor/chieftan_base_helmet.json index 02f6590..b7eaa5b 100644 --- a/entities/armor/chieftan_base_armor/chieftan_base_helmet.json +++ b/entities/armor/chieftan_base_armor/chieftan_base_helmet.json @@ -15,8 +15,7 @@ "slot": "helmet", "render_type": "merge_with_model", "ilevel": -1, - "_required_job_level": 1, - "roles": "worker_job" + "roles": "goblin_worker_job" } }, "entity_data": { diff --git a/entities/armor/fern_helmet/fern_helmet.json b/entities/armor/fern_helmet/fern_helmet.json index 76df649..7d72c5b 100644 --- a/entities/armor/fern_helmet/fern_helmet.json +++ b/entities/armor/fern_helmet/fern_helmet.json @@ -19,7 +19,7 @@ "slot": "helmet", "ilevel": 3, "required_job_level": 1, - "roles": "mail_wearer", + "roles": "goblin_worker_job", "equip_effect": "stonehearth:effects:weapon_level_up" } }, diff --git a/entities/armor/flower_helmet/flower_helmet.json b/entities/armor/flower_helmet/flower_helmet.json index 5761b20..29ed65b 100644 --- a/entities/armor/flower_helmet/flower_helmet.json +++ b/entities/armor/flower_helmet/flower_helmet.json @@ -19,7 +19,7 @@ "slot": "helmet", "ilevel": 3, "required_job_level": 1, - "roles": "mail_wearer", + "roles": "goblin_worker_job", "equip_effect": "stonehearth:effects:weapon_level_up" } }, diff --git a/entities/armor/leather_armor/leather_armor.json b/entities/armor/leather_armor/leather_armor.json index 6539c26..9c8daf8 100644 --- a/entities/armor/leather_armor/leather_armor.json +++ b/entities/armor/leather_armor/leather_armor.json @@ -19,7 +19,7 @@ "render_type": "merge_with_model", "ilevel": 5, "required_job_level": 1, - "roles": "mail_wearer", + "roles": "goblin_worker_job", "equip_effect": "stonehearth:effects:weapon_level_up" } }, diff --git a/entities/armor/leather_helmet/leather_helmet.json b/entities/armor/leather_helmet/leather_helmet.json index f9753cc..69eb3fd 100644 --- a/entities/armor/leather_helmet/leather_helmet.json +++ b/entities/armor/leather_helmet/leather_helmet.json @@ -25,7 +25,7 @@ "slot": "helmet", "ilevel": 3, "required_job_level": 1, - "roles": "mail_wearer", + "roles": "goblin_worker_job", "equip_effect": "stonehearth:effects:weapon_level_up" } }, diff --git a/entities/armor/log_armor/log_armor.json b/entities/armor/log_armor/log_armor.json index 3a54aaf..8c18f19 100644 --- a/entities/armor/log_armor/log_armor.json +++ b/entities/armor/log_armor/log_armor.json @@ -25,7 +25,7 @@ "render_type": "merge_with_model", "ilevel": 5, "required_job_level": 1, - "roles": "mail_wearer", + "roles": "goblin_worker_job", "equip_effect": "stonehearth:effects:weapon_level_up" } }, diff --git a/entities/armor/log_helmet/log_helmet.json b/entities/armor/log_helmet/log_helmet.json index 441a3c0..ed7e088 100644 --- a/entities/armor/log_helmet/log_helmet.json +++ b/entities/armor/log_helmet/log_helmet.json @@ -29,7 +29,7 @@ "slot": "helmet", "ilevel": 3, "required_job_level": 1, - "roles": "mail_wearer", + "roles": "goblin_worker_job", "equip_effect": "stonehearth:effects:weapon_level_up" } }, diff --git a/entities/armor/mushroom_armor/mushroom_armor.json b/entities/armor/mushroom_armor/mushroom_armor.json index 9962cb8..c0d422f 100644 --- a/entities/armor/mushroom_armor/mushroom_armor.json +++ b/entities/armor/mushroom_armor/mushroom_armor.json @@ -19,7 +19,7 @@ "render_type": "merge_with_model", "ilevel": 5, "required_job_level": 1, - "roles": "mail_wearer", + "roles": "goblin_worker_job", "equip_effect": "stonehearth:effects:weapon_level_up" } }, diff --git a/entities/armor/mushroom_helmet/mushroom_helmet.json b/entities/armor/mushroom_helmet/mushroom_helmet.json index b6c3d23..39ffb00 100644 --- a/entities/armor/mushroom_helmet/mushroom_helmet.json +++ b/entities/armor/mushroom_helmet/mushroom_helmet.json @@ -19,7 +19,7 @@ "slot": "helmet", "ilevel": 3, "required_job_level": 1, - "roles": "mail_wearer", + "roles": "goblin_worker_job", "equip_effect": "stonehearth:effects:weapon_level_up" } }, diff --git a/entities/armor/varanus_armor/varanus_armor.json b/entities/armor/varanus_armor/varanus_armor.json index 4a07183..719aa9c 100644 --- a/entities/armor/varanus_armor/varanus_armor.json +++ b/entities/armor/varanus_armor/varanus_armor.json @@ -19,7 +19,7 @@ "render_type": "merge_with_model", "ilevel": 5, "required_job_level": 1, - "roles": "mail_wearer", + "roles": "goblin_worker_job", "equip_effect": "stonehearth:effects:weapon_level_up" } }, diff --git a/entities/armor/varanus_helmet/varanus_helmet.json b/entities/armor/varanus_helmet/varanus_helmet.json index f2cf2c3..6f2a9f1 100644 --- a/entities/armor/varanus_helmet/varanus_helmet.json +++ b/entities/armor/varanus_helmet/varanus_helmet.json @@ -19,7 +19,7 @@ "slot": "helmet", "ilevel": 3, "required_job_level": 1, - "roles": "mail_wearer", + "roles": "goblin_worker_job", "equip_effect": "stonehearth:effects:weapon_level_up" } }, diff --git a/entities/resources/bone/builder_bone.png b/entities/resources/bone/builder_bone.png new file mode 100644 index 0000000..bbf6f5b Binary files /dev/null and b/entities/resources/bone/builder_bone.png differ diff --git a/entities/resources/fiber/builder_fiber.png b/entities/resources/fiber/builder_fiber.png new file mode 100644 index 0000000..bbd73e4 Binary files /dev/null and b/entities/resources/fiber/builder_fiber.png differ diff --git a/entities/weapons/skull_basher/skull_basher.json b/entities/weapons/skull_basher/skull_basher.json index 10c1aab..1ddf02a 100644 --- a/entities/weapons/skull_basher/skull_basher.json +++ b/entities/weapons/skull_basher/skull_basher.json @@ -20,7 +20,7 @@ "stonehearth:patrol" ], "ilevel": 14, - "roles": "footman_job", + "roles": "chief", "equip_effect": "stonehearth:effects:weapon_level_up" } }, diff --git a/jobs/beastmaster/beastmaster_description.json b/jobs/beastmaster/beastmaster_description.json index 0f389fc..cde5cdd 100644 --- a/jobs/beastmaster/beastmaster_description.json +++ b/jobs/beastmaster/beastmaster_description.json @@ -13,7 +13,7 @@ "torso": "file(beastmaster_outfit)", "mainhand": "swamp_goblins:beastmaster:staff" }, - "roles": "beastmaster_job crafter", + "roles": "goblin_beastmaster_job crafter", "talisman_uri": "swamp_goblins:beastmaster:talisman", "default_stance": "passive", "icon": "file(images/icon.png)", diff --git a/jobs/bonesmith/bonesmith_description.json b/jobs/bonesmith/bonesmith_description.json index 51ded1b..6a7222f 100644 --- a/jobs/bonesmith/bonesmith_description.json +++ b/jobs/bonesmith/bonesmith_description.json @@ -13,7 +13,7 @@ "torso": "file(bonesmith_outfit)", "mainhand": "swamp_goblins:bonesmith:saw" }, - "roles": "bonesmith_job crafter", + "roles": "goblin_bonesmith_job crafter", "talisman_uri": "swamp_goblins:bonesmith:talisman", "default_stance": "passive", "icon": "file(images/icon.png)", diff --git a/jobs/chief/chief_description.json b/jobs/chief/chief_description.json index 29b328b..c12f1aa 100644 --- a/jobs/chief/chief_description.json +++ b/jobs/chief/chief_description.json @@ -13,7 +13,7 @@ "torso": "file(chief_outfit)", "mainhand": "swamp_goblins:chief:staff" }, - "roles": "chief_job crafter", + "roles": "goblin_chief_job crafter", "talisman_uri": "swamp_goblins:chief:talisman", "default_stance": "passive", "icon": "file(images/icon.png)", diff --git a/jobs/earthmaster/earthmaster_description.json b/jobs/earthmaster/earthmaster_description.json index b3e635e..7238c93 100644 --- a/jobs/earthmaster/earthmaster_description.json +++ b/jobs/earthmaster/earthmaster_description.json @@ -13,7 +13,7 @@ "torso": "file(earthmaster_outfit)", "mainhand": "swamp_goblins:earthmaster:staff" }, - "roles": "earthmaster_job crafter", + "roles": "goblin_earthmaster_job crafter", "talisman_uri": "swamp_goblins:earthmaster:talisman", "default_stance": "passive", "icon": "file(images/icon.png)", diff --git a/jobs/firemaster/firemaster_description.json b/jobs/firemaster/firemaster_description.json index ad70389..b5235e2 100644 --- a/jobs/firemaster/firemaster_description.json +++ b/jobs/firemaster/firemaster_description.json @@ -13,7 +13,7 @@ "torso": "file(firemaster_outfit)", "mainhand": "swamp_goblins:firemaster:staff" }, - "roles": "firemaster_job crafter", + "roles": "goblin_firemaster_job crafter", "talisman_uri": "swamp_goblins:firemaster:talisman", "default_stance": "passive", "icon": "file(images/icon.png)", diff --git a/jobs/muckscrabbler/muckscrabbler_description.json b/jobs/muckscrabbler/muckscrabbler_description.json index 58b92ab..9e07db4 100644 --- a/jobs/muckscrabbler/muckscrabbler_description.json +++ b/jobs/muckscrabbler/muckscrabbler_description.json @@ -13,7 +13,7 @@ "torso": "file(muckscrabbler_outfit)", "mainhand": "swamp_goblins:muckscrabbler:staff" }, - "roles": "muckscrabbler_job crafter", + "roles": "goblin_muckscrabbler_job crafter", "talisman_uri": "swamp_goblins:muckscrabbler:talisman", "default_stance": "passive", "icon": "file(images/icon.png)", diff --git a/jobs/peon/peon_description.json b/jobs/peon/peon_description.json index d8a4bdd..9dfa1f6 100644 --- a/jobs/peon/peon_description.json +++ b/jobs/peon/peon_description.json @@ -13,7 +13,7 @@ "torso": "file(peon_outfit)", "mainhand": "swamp_goblins:peon:staff" }, - "roles": "peon_job crafter", + "roles": "goblin_peon_job crafter", "talisman_uri": "swamp_goblins:peon:talisman", "default_stance": "passive", "icon": "file(images/icon.png)", diff --git a/jobs/shadow_walker/shadow_walker_description.json b/jobs/shadow_walker/shadow_walker_description.json index eac8eb8..eb7a047 100644 --- a/jobs/shadow_walker/shadow_walker_description.json +++ b/jobs/shadow_walker/shadow_walker_description.json @@ -13,7 +13,7 @@ "torso": "file(shadow_walker_outfit)", "mainhand": "swamp_goblins:shadow_walker:staff" }, - "roles": "shadow_walker_job crafter", + "roles": "goblin_shadow_walker_job crafter", "talisman_uri": "swamp_goblins:shadow_walker:talisman", "default_stance": "passive", "icon": "file(images/icon.png)", diff --git a/jobs/shaman/shaman_description.json b/jobs/shaman/shaman_description.json index a498cf5..65c9fe5 100644 --- a/jobs/shaman/shaman_description.json +++ b/jobs/shaman/shaman_description.json @@ -13,7 +13,7 @@ "torso": "file(shaman_outfit)", "mainhand": "swamp_goblins:shaman:staff" }, - "roles": "shaman_job crafter", + "roles": "goblin_shaman_job crafter", "talisman_uri": "swamp_goblins:shaman:talisman", "default_stance": "passive", "icon": "file(images/icon.png)", diff --git a/jobs/shaman/shaman_workbench/shaman_workbench_iconic.qb b/jobs/shaman/shaman_workbench/shaman_workbench_iconic.qb index 23afdb4..a589396 100644 Binary files a/jobs/shaman/shaman_workbench/shaman_workbench_iconic.qb and b/jobs/shaman/shaman_workbench/shaman_workbench_iconic.qb differ diff --git a/jobs/spirit_walker/spirit_walker_description.json b/jobs/spirit_walker/spirit_walker_description.json index 05c53d8..7f84487 100644 --- a/jobs/spirit_walker/spirit_walker_description.json +++ b/jobs/spirit_walker/spirit_walker_description.json @@ -13,7 +13,7 @@ "torso": "file(spirit_walker_outfit)", "mainhand": "swamp_goblins:spirit_walker:staff" }, - "roles": "spirit_walker_job crafter", + "roles": "goblin_spirit_walker_job crafter", "talisman_uri": "swamp_goblins:spirit_walker:talisman", "default_stance": "passive", "icon": "file(images/icon.png)", diff --git a/jobs/warrior/warrior_description.json b/jobs/warrior/warrior_description.json index 7874f4d..d83eed6 100644 --- a/jobs/warrior/warrior_description.json +++ b/jobs/warrior/warrior_description.json @@ -13,7 +13,7 @@ "torso": "file(warrior_outfit)", "mainhand": "swamp_goblins:warrior:staff" }, - "roles": "warrior_job crafter", + "roles": "goblin_warrior_job crafter", "talisman_uri": "swamp_goblins:warrior:talisman", "default_stance": "passive", "icon": "file(images/icon.png)", diff --git a/jobs/worker/worker_description.json b/jobs/worker/worker_description.json index 1171bf5..25f6458 100644 --- a/jobs/worker/worker_description.json +++ b/jobs/worker/worker_description.json @@ -4,7 +4,7 @@ "description": "i18n(swamp_goblins:jobs.rabble.rabble_description.description)", "abilities": "file(worker_abilities.json)", "default_stance": "aggressive", - "roles": "worker_job melee_combat combat", + "roles": "goblin_worker_job melee_combat combat", "controller": "swamp_goblins:class:worker", "equipment": { "mixintypes":{ diff --git a/locales/en.json b/locales/en.json index 4c0e7c6..488e091 100644 --- a/locales/en.json +++ b/locales/en.json @@ -26,8 +26,8 @@ "initial_town_name": "Small Goblin Clan", "display_name": "Firefly Clan", "quote": "", - "long_description": "WIP wip WIP wip long_description", - "post_selection_description": ", WIP wip WIP wip." + "long_description": "Living in the swamp as a shamanistic tribe setup. This way of living has given them a perception on life, that are a bit different than their greenskinned cousins.", + "post_selection_description": ", a rowdy gang of goblins." } }, "build": { @@ -46,7 +46,6 @@ "#A6C780": "Light Fiber (Swamp)", "#7B9067": "Fiber (Swamp)", "#5C6E4C": "Dark Fiber (Swamp)", - "#918154": "Sleeping Fiber (Swamp)", "#9C9F69": "Fresh Leaf (Swamp)", "#8B8E57": "Old leaf (Swamp)", "#7C7F48": "Light Leaf (Swamp)", @@ -312,7 +311,7 @@ } }, "recipes":{ - "potions":"Potions" + "potions":"Potions" } }, "spirit_walker": { @@ -377,6 +376,12 @@ }, "ui": { "game": { + "build_mode2":{ + "tooltips":{ + "fiber_resource":"Fiber", + "bone_resource":"Bone" + } + }, "menu": { "crafter_menu": { "items": { diff --git a/services/server/swimming/custom_swimming_service.lua b/services/server/swimming/custom_swimming_service.lua index 7461022..2c4b09e 100644 --- a/services/server/swimming/custom_swimming_service.lua +++ b/services/server/swimming/custom_swimming_service.lua @@ -3,57 +3,6 @@ local Cube3 = _radiant.csg.Cube3 CustomSwimmingService = class() function CustomSwimmingService:_is_swimming(entity) - local biome_name = stonehearth.world_generation:get_biome_alias() - local colon_position = string.find (biome_name, ":", 1, true) or -1 - local mod_name_containing_the_biome = string.sub (biome_name, 1, colon_position-1) - local fn = "_is_swimming_" .. mod_name_containing_the_biome - if self[fn] ~= nil then - --found a function for the biome being used, named: - -- self:_is_swimming_(args,...) - return self[fn](self, entity) - else - --there is no function for this specific biome, so call a copy of the original from stonehearth - return self:_is_swimming_original(entity) - end -end - -function CustomSwimmingService:_is_swimming_original(entity) - if not entity or not entity:is_valid() then - return false - end - - local location = radiant.entities.get_world_grid_location(entity) - if not location then - return false - end - local mob_collision_type = entity:add_component('mob'):get_mob_collision_type() - local entity_height = self._mob_heights[mob_collision_type] - if not entity_height then - log:warning('unsupported mob_collision_type for swimming') - return false - end - - local cube = Cube3(location) - cube.max.y = cube.min.y + entity_height - local intersected_entities = radiant.terrain.get_entities_in_cube(cube) - local swimming = false - - for id, entity in pairs(intersected_entities) do - local water_component = entity:get_component('stonehearth:water') - if water_component then - local water_level = water_component:get_water_level() - local swim_level = location.y + entity_height * 0.5 - if water_level > swim_level then - swimming = true - break - end - end - end - - return swimming -end - -function CustomSwimmingService:_is_swimming_swamp_goblins(entity) if not entity or not entity:is_valid() then return false end diff --git a/swamp_biome_selected/manifest.json b/swamp_biome_selected/manifest.json index bc689b6..5056c77 100644 --- a/swamp_biome_selected/manifest.json +++ b/swamp_biome_selected/manifest.json @@ -1,6 +1,7 @@ { "info" : { "name" : "swamp_selected", + "deferred_load": true, "version" : 3 }, "default_locale": "en", diff --git a/swamp_goblins_server.lua b/swamp_goblins_server.lua index 7d8b244..66f5e38 100644 --- a/swamp_goblins_server.lua +++ b/swamp_goblins_server.lua @@ -4,11 +4,16 @@ version = 24 local log = radiant.log.create_logger('version') log:error("Swamp Goblins mod for alpha %d", swamp_goblins.version) -function swamp_goblins:_on_required_loaded() +function swamp_goblins:_on_services_init() + if stonehearth.world_generation:get_biome_alias() ~= "swamp_goblins:biome:swamp" then + return + end local custom_swimming_service = require('services.server.swimming.custom_swimming_service') local swimming_service = radiant.mods.require('stonehearth.services.server.swimming.swimming_service') radiant.mixin(swimming_service, custom_swimming_service) +end +function swamp_goblins:_on_required_loaded() local custom_biome = require('services.server.world_generation.custom_biome') local biome = radiant.mods.require('stonehearth.services.server.world_generation.biome') radiant.mixin(biome, custom_biome) @@ -35,6 +40,7 @@ function swamp_goblins:_on_biome_set(e) radiant.mixin(landscaper, custom_landscaper) end +radiant.events.listen_once(radiant, 'radiant:services:init', swamp_goblins, swamp_goblins._on_services_init) radiant.events.listen_once(radiant, 'radiant:required_loaded', swamp_goblins, swamp_goblins._on_required_loaded) radiant.events.listen_once(radiant, 'stonehearth:biome_set', swamp_goblins, swamp_goblins._on_biome_set)