diff --git a/locale/en/pirates.cfg b/locale/en/pirates.cfg index 65832ef2..b91cff09 100644 --- a/locale/en/pirates.cfg +++ b/locale/en/pirates.cfg @@ -286,6 +286,8 @@ class_doctor=Doctor class_doctor_explanation_advanced=When eating fish they additionally heal themselves and nearby players (__1__ tile radius) for __2__% of max hp. class_shaman=Shaman class_shaman_explanation_advanced=Shamans energize themselves when standing next to accumulators. They can use this accumulated energy to summon biters when eating fish.\nShamans also passively absorb small amount of energy from the sun.\nSummoned biters last for __1__ mins. +class_luminous=Luminous +class_luminous_explanation_advanced=They glow brightly in the dark. class_explanation=__1__: __2__ class_explanation_upgraded_class=__1__: An upgrade of __2__. __3__ @@ -553,7 +555,7 @@ gui_runs_wait_to_join=Wait to join... __1__ gui_info_main_tooltip=Notes and updates on Pirate Ship. gui_crews=Crews -gui_crews_main_tooltip=View the ongoing crews, and make proposals for new ones. +gui_crews_main_tooltip=View all the crews on the server, and create new ones. gui_minimap_main_tooltip=View the outside world. diff --git a/maps/pirates/roles/classes.lua b/maps/pirates/roles/classes.lua index 7eb3c098..9930cbf4 100644 --- a/maps/pirates/roles/classes.lua +++ b/maps/pirates/roles/classes.lua @@ -39,6 +39,7 @@ local enum = { MEDIC = 'medic', DOCTOR = 'doctor', SHAMAN = 'shaman', + LUMINOUS = 'luminous', } Public.enum = enum @@ -75,6 +76,7 @@ Public.eng_form = { [enum.MEDIC] = 'Medic', [enum.DOCTOR] = 'Doctor', [enum.SHAMAN] = 'Shaman', + [enum.LUMINOUS] = 'Luminous', } function Public.display_form(class) @@ -162,6 +164,8 @@ function Public.explanation(class, add_is_class_obtainable) elseif class == enum.SHAMAN then local live_time = Math.ceil(Balance.shaman_summoned_biter_time_to_live / 60) full_explanation = {'', {explanation, live_time}} + elseif class == enum.LUMINOUS then + full_explanation = {'', {explanation}} else full_explanation = {'', {explanation}} end @@ -235,6 +239,7 @@ function Public.initial_class_pool() enum.SOLDIER, enum.MEDIC, enum.SHAMAN, + enum.LUMINOUS, } end @@ -662,6 +667,7 @@ function Public.get_class(player_index) end + local event = require 'utils.event' event.add(defines.events.on_player_used_capsule, class_on_player_used_capsule) diff --git a/maps/pirates/roles/tick_functions.lua b/maps/pirates/roles/tick_functions.lua index a9585653..9c01bd0a 100644 --- a/maps/pirates/roles/tick_functions.lua +++ b/maps/pirates/roles/tick_functions.lua @@ -218,6 +218,21 @@ function Public.class_renderings(tickinterval) draw_on_ground = true, } } + elseif class == Classes.enum.LUMINOUS then + class_renderings[player_index] = { + rendering = rendering.draw_light({ + surface = player.surface, + target = player.character, + color = {r = 1, g = 1, b = 1}, + sprite = 'utility/light_medium', + scale = 10, + intensity = 1, + minimum_darkness = 0, + oriented = true, + visible = true, + only_in_alt_mode = false + }) + } end end else