Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.claude/settings.local.json
.vscode/lua-format.yaml
build.*
CLAUDE.md
feature.md
roadmap.md
skillsEmployee.md
1 change: 1 addition & 0 deletions docs
Submodule docs added at 993763
9 changes: 9 additions & 0 deletions l10n/l10n_de.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,17 @@
<text name="em_error_no_hired" text="Keine Mitarbeiter eingestellt. Stelle zuerst jemanden ein!" />
<text name="em_workflow_started" text="%s hat Workflow auf Feld %d gestartet: %s" />
<text name="em_workflow_start_failed" text="Workflow-Start für %s fehlgeschlagen (Fahrzeug/Gerät prüfen)." />
<text name="em_error_equipment_failed" text="%s: Ausrüstungsprüfung für %s fehlgeschlagen. Inkompatible Geräte abkoppeln oder Verfügbarkeit prüfen." />
<text name="em_workflow_saved" text="Workflow für %s gespeichert." />
<text name="em_workflow_scheduled" text="%s geplant für Start um %02d:00 Uhr." />
<text name="em_workflow_saved_hint" text="Workflow für %s gespeichert. Startet automatisch bei Schichtbeginn." />
<text name="em_shift_label" text="Schicht" />
<text name="em_shift_to" text="bis" />
<text name="em_btn_save_start" text="Speichern &amp; Starten" />
<text name="em_btn_save" text="Speichern" />
<text name="em_btn_stop" text="Stopp" />
<text name="em_workflow_stopped" text="%s gestoppt. Kein automatischer Start." />
<text name="em_workflow_queue_complete" text="Alle Aufgaben für %s abgeschlossen. Workflow pausiert." />
<text name="em_btn_workflow_editor" text="Workflow-Editor" />

<text name="em_tab_employees" text="Mitarbeiter" />
Expand Down Expand Up @@ -152,6 +158,9 @@
<text name="em_stat_parking" text="Parkplatz" />
<text name="em_no_parking" text="Nicht zugewiesen" />
<text name="em_status_returning" text="Rückkehr zum Parkplatz" />
<text name="em_status_driving_to_tool" text="Fahrt zum Werkzeug" />
<text name="em_status_attaching_tool" text="Werkzeug ankuppeln" />
<text name="em_status_returning_tool" text="Werkzeug zurückbringen" />

<text name="em_milestone_apprentice" text="Lehrling" />
<text name="em_milestone_companion" text="Geselle" />
Expand Down
10 changes: 10 additions & 0 deletions l10n/l10n_en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,17 @@
<text name="em_error_no_hired" text="No hired employees. Hire someone first!" />
<text name="em_workflow_started" text="%s started workflow on Field %d: %s" />
<text name="em_workflow_start_failed" text="Failed to start workflow for %s (check vehicle/equipment)." />
<text name="em_error_equipment_failed" text="%s: Equipment check failed for %s. Detach incompatible tools or check store availability." />
<text name="em_workflow_saved" text="Workflow saved for %s." />
<text name="em_workflow_scheduled" text="%s scheduled to start at %02d:00." />
<text name="em_workflow_saved_hint" text="Workflow saved for %s. Will auto-start at shift begin." />
<text name="em_shift_label" text="Shift" />
<text name="em_shift_to" text="to" />
<text name="em_btn_save_start" text="Save &amp; Start" />
<text name="em_btn_save" text="Save" />
<text name="em_btn_stop" text="Stop" />
<text name="em_workflow_stopped" text="%s stopped. Will not auto-start." />
<text name="em_workflow_queue_complete" text="All tasks completed for %s. Workflow paused." />
<text name="em_btn_workflow_editor" text="Workflow Editor" />

<text name="em_tab_employees" text="Employees" />
Expand All @@ -90,6 +96,7 @@
<text name="em_field_area" text="Area" />
<text name="em_field_crop" text="Current Crop" />
<text name="em_field_growth" text="Growth State" />
<text name="em_field_target_crop" text="Target Crop" />
<text name="em_field_condition" text="Condition" />
<text name="em_field_assigned_employee" text="Assigned Employee" />
<text name="em_field_empty" text="You don't own any fields yet." />
Expand Down Expand Up @@ -152,6 +159,9 @@
<text name="em_stat_parking" text="Parking Spot" />
<text name="em_no_parking" text="Not assigned" />
<text name="em_status_returning" text="Returning to parking" />
<text name="em_status_driving_to_tool" text="Driving to tool" />
<text name="em_status_attaching_tool" text="Attaching tool" />
<text name="em_status_returning_tool" text="Returning tool" />

<text name="em_milestone_apprentice" text="Apprentice" />
<text name="em_milestone_companion" text="Companion" />
Expand Down
9 changes: 9 additions & 0 deletions l10n/l10n_es.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,17 @@
<text name="em_error_no_hired" text="No hay empleados contratados. ¡Contrata a alguien primero!" />
<text name="em_workflow_started" text="%s inició el flujo de trabajo en el Campo %d: %s" />
<text name="em_workflow_start_failed" text="Error al iniciar el flujo para %s (verifica vehículo/equipamiento)." />
<text name="em_error_equipment_failed" text="%s: Error de equipamiento para %s. Desconecta herramientas incompatibles o verifica disponibilidad." />
<text name="em_workflow_saved" text="Flujo de trabajo guardado para %s." />
<text name="em_workflow_scheduled" text="%s programado para iniciar a las %02d:00." />
<text name="em_workflow_saved_hint" text="Flujo guardado para %s. Se iniciara automaticamente al comenzar el turno." />
<text name="em_shift_label" text="Turno" />
<text name="em_shift_to" text="a" />
<text name="em_btn_save_start" text="Guardar e Iniciar" />
<text name="em_btn_save" text="Guardar" />
<text name="em_btn_stop" text="Detener" />
<text name="em_workflow_stopped" text="%s detenido. No se iniciara automaticamente." />
<text name="em_workflow_queue_complete" text="Todas las tareas completadas para %s. Flujo en pausa." />
<text name="em_btn_workflow_editor" text="Editor de Flujo" />

<text name="em_tab_employees" text="Empleados" />
Expand Down Expand Up @@ -152,6 +158,9 @@
<text name="em_stat_parking" text="Plaza de Aparcamiento" />
<text name="em_no_parking" text="No asignado" />
<text name="em_status_returning" text="Volviendo al aparcamiento" />
<text name="em_status_driving_to_tool" text="Conduciendo hacia la herramienta" />
<text name="em_status_attaching_tool" text="Enganchando herramienta" />
<text name="em_status_returning_tool" text="Devolviendo herramienta" />

<text name="em_milestone_apprentice" text="Aprendiz" />
<text name="em_milestone_companion" text="Oficial" />
Expand Down
10 changes: 10 additions & 0 deletions l10n/l10n_fr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,17 @@
<text name="em_error_no_hired" text="Aucun employe engage. Engagez quelqu'un d'abord !" />
<text name="em_workflow_started" text="%s a demarre le flux sur le champ %d : %s" />
<text name="em_workflow_start_failed" text="Echec du demarrage du flux pour %s (verifiez vehicule/equipement)." />
<text name="em_error_equipment_failed" text="%s : Échec de l'équipement pour %s. Détachez les outils incompatibles ou vérifiez la disponibilité en magasin." />
<text name="em_workflow_saved" text="Flux sauvegarde pour %s." />
<text name="em_workflow_scheduled" text="%s programme pour demarrer a %02d:00." />
<text name="em_workflow_saved_hint" text="Flux sauvegarde pour %s. Demarrage automatique au debut du service." />
<text name="em_shift_label" text="Horaire" />
<text name="em_shift_to" text="a" />
<text name="em_btn_save_start" text="Sauvegarder et Demarrer" />
<text name="em_btn_save" text="Sauvegarder" />
<text name="em_btn_stop" text="Arreter" />
<text name="em_workflow_stopped" text="%s arrete. Ne demarrera pas automatiquement." />
<text name="em_workflow_queue_complete" text="Toutes les taches terminees pour %s. Flux en pause." />
<text name="em_btn_workflow_editor" text="Editeur de Flux" />

<text name="em_tab_employees" text="Employés" />
Expand All @@ -90,6 +96,7 @@
<text name="em_field_area" text="Superficie" />
<text name="em_field_crop" text="Culture Actuelle" />
<text name="em_field_growth" text="État de Croissance" />
<text name="em_field_target_crop" text="Culture Cible" />
<text name="em_field_condition" text="Condition" />
<text name="em_field_assigned_employee" text="Employé Assigné" />
<text name="em_field_empty" text="Vous ne possédez encore aucun champ." />
Expand Down Expand Up @@ -152,6 +159,9 @@
<text name="em_stat_parking" text="Place de parking" />
<text name="em_no_parking" text="Non assigne" />
<text name="em_status_returning" text="Retour au parking" />
<text name="em_status_driving_to_tool" text="En route vers l'outil" />
<text name="em_status_attaching_tool" text="Attelage de l'outil" />
<text name="em_status_returning_tool" text="Retour de l'outil" />

<text name="em_milestone_apprentice" text="Apprenti" />
<text name="em_milestone_companion" text="Compagnon" />
Expand Down
9 changes: 9 additions & 0 deletions l10n/l10n_it.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,17 @@
<text name="em_error_no_hired" text="Nessun dipendente assunto. Assumi qualcuno prima!" />
<text name="em_workflow_started" text="%s ha avviato il flusso sul campo %d: %s" />
<text name="em_workflow_start_failed" text="Avvio flusso fallito per %s (controlla veicolo/attrezzatura)." />
<text name="em_error_equipment_failed" text="%s: Controllo attrezzatura fallito per %s. Stacca attrezzi incompatibili o controlla disponibilità." />
<text name="em_workflow_saved" text="Flusso salvato per %s." />
<text name="em_workflow_scheduled" text="%s programmato per avvio alle %02d:00." />
<text name="em_workflow_saved_hint" text="Flusso salvato per %s. Si avviera automaticamente all'inizio del turno." />
<text name="em_shift_label" text="Orario" />
<text name="em_shift_to" text="a" />
<text name="em_btn_save_start" text="Salva e Avvia" />
<text name="em_btn_save" text="Salva" />
<text name="em_btn_stop" text="Ferma" />
<text name="em_workflow_stopped" text="%s fermato. Non si avviera automaticamente." />
<text name="em_workflow_queue_complete" text="Tutti i compiti completati per %s. Flusso in pausa." />
<text name="em_btn_workflow_editor" text="Editor Flussi" />

<text name="em_tab_employees" text="Dipendenti" />
Expand Down Expand Up @@ -155,6 +161,9 @@
<text name="em_stat_parking" text="Posto parcheggio" />
<text name="em_no_parking" text="Non assegnato" />
<text name="em_status_returning" text="Ritorno al parcheggio" />
<text name="em_status_driving_to_tool" text="In viaggio verso l'attrezzo" />
<text name="em_status_attaching_tool" text="Aggancio attrezzo" />
<text name="em_status_returning_tool" text="Restituzione attrezzo" />

<text name="em_milestone_apprentice" text="Apprendista" />
<text name="em_milestone_companion" text="Compagnon" />
Expand Down
9 changes: 9 additions & 0 deletions l10n/l10n_pl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,17 @@
<text name="em_error_no_hired" text="Brak zatrudnionych pracowników. Zatrudnij kogoś najpierw!" />
<text name="em_workflow_started" text="%s rozpoczął pracę na polu %d: %s" />
<text name="em_workflow_start_failed" text="Nie udało się rozpocząć pracy dla %s (sprawdź pojazd/sprzęt)." />
<text name="em_error_equipment_failed" text="%s: Sprawdzenie sprzętu nie powiodło się dla %s. Odłącz niekompatybilne narzędzia lub sprawdź dostępność." />
<text name="em_workflow_saved" text="Przepływ pracy zapisany dla %s." />
<text name="em_workflow_scheduled" text="%s zaplanowany do rozpoczecia o %02d:00." />
<text name="em_workflow_saved_hint" text="Przepływ pracy zapisany dla %s. Rozpocznie sie automatycznie na poczatku zmiany." />
<text name="em_shift_label" text="Zmiana" />
<text name="em_shift_to" text="do" />
<text name="em_btn_save_start" text="Zapisz i Rozpocznij" />
<text name="em_btn_save" text="Zapisz" />
<text name="em_btn_stop" text="Zatrzymaj" />
<text name="em_workflow_stopped" text="%s zatrzymany. Nie rozpocznie sie automatycznie." />
<text name="em_workflow_queue_complete" text="Wszystkie zadania ukończone dla %s. Przepływ wstrzymany." />
<text name="em_btn_workflow_editor" text="Edytor Przepływu" />

<text name="em_tab_employees" text="Pracownicy" />
Expand Down Expand Up @@ -152,6 +158,9 @@
<text name="em_stat_parking" text="Miejsce parkingowe" />
<text name="em_no_parking" text="Nieprzypisane" />
<text name="em_status_returning" text="Powrót na parking" />
<text name="em_status_driving_to_tool" text="Jazda do narzędzia" />
<text name="em_status_attaching_tool" text="Podłączanie narzędzia" />
<text name="em_status_returning_tool" text="Zwrot narzędzia" />

<text name="em_milestone_apprentice" text="Uczeń" />
<text name="em_milestone_companion" text="Czeladnik" />
Expand Down
4 changes: 2 additions & 2 deletions modDesc.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<modDesc descVersion="106">
<author>LeGrizzly</author>
<version>0.0.6-build-4</version>
<version>0.0.8-build-1</version>
<title>
<en><![CDATA[Advanced Employee Manager]]></en>
<fr><![CDATA[Gestion Avancée Des Employés]]></fr>
Expand All @@ -19,7 +19,7 @@
<es><![CDATA[Aporta un nuevo nivel de profundidad a la fuerza laboral de tu granja. Contrata y gestiona empleados con habilidades únicas para optimizar tus operaciones.]]></es>
</description>
<dependencies>
<dependency optional="true">FS25_DBAPI</dependency>
<dependency optional="true">FS25_SILODB</dependency>
</dependencies>
<iconFilename>images/icon_employee.dds</iconFilename>
<multiplayer supported="true" />
Expand Down
14 changes: 13 additions & 1 deletion scripts/ModGui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,21 @@ function ModGui:loadMenuFrame(class)

g_gui:loadGui(class.XML_FILENAME, class.CLASS_NAME, pageController, true)

local iconPath = 'images/MenuIcon.dds'
local iconSliceToFile = {
EM_IconMenu = "images/MenuIcon.dds",
EM_IconEmployee = "images/EMEmployeeIcon.dds",
EM_IconWorkflow = "images/EMWorkflowIcon.dds",
EM_IconField = "images/EMFieldIcon.dds",
EM_IconVehicle = "images/EMVehicleIcon.dds",
}

local iconPath = "images/MenuIcon.dds"
local uvs = {0, 0, 1024, 1024}

if class.MENU_ICON_SLICE_ID ~= nil and iconSliceToFile[class.MENU_ICON_SLICE_ID] ~= nil then
iconPath = iconSliceToFile[class.MENU_ICON_SLICE_ID]
end

local position = "pageSettings"
local predicate = function() return true end
addIngameMenuPage(pageController, pageName, iconPath, uvs, position, predicate)
Expand Down
6 changes: 3 additions & 3 deletions scripts/extensions/AIOverrideExtension.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,16 @@ function AIOverrideExtension.onToggleAI(vehicle, actionName, inputValue, callbac
if vehicle == nil then return end

local employee = g_employeeManager:getEmployeeByVehicle(vehicle)

if employee ~= nil then
if employee.currentJob ~= nil or vehicle:getIsAIActive() then
g_employeeManager:consoleStopJob(employee.id)
g_currentMission:showBlinkingWarning(string.format("Employee %s stopped.", employee.name), 2000)
g_currentMission:showBlinkingWarning(string.format(g_i18n:getText("em_employee_stopped") or "Employee %s stopped.", employee.name), 2000)
else
g_gui:showGui("MenuEmployeeManager")
end
else
-- No employee assigned: open EM menu (vanilla AI is disabled)
g_gui:showGui("MenuEmployeeManager")
g_currentMission:showBlinkingWarning("No employee assigned to this vehicle!", 2000)
end
end
20 changes: 18 additions & 2 deletions scripts/gui/EMEmployeeFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ EMEmployeeFrame.LIST_TYPE = {
HIRED = 2,
}

EMEmployeeFrame.MENU_ICON_SLICE_ID = 'EM_IconEmployee'

function EMEmployeeFrame:new()
local self = TabbedMenuFrameElement.new(nil, EMEmployeeFrame_mt)
self.employees = {}
Expand Down Expand Up @@ -120,8 +122,15 @@ function EMEmployeeFrame:populateCellForItemInSection(list, section, index, cell
elseif emp.isOnBreak then
statusText = g_i18n:getText("em_status_on_break")
elseif emp.currentJob then
if emp.currentJob.type == "RETURN_TO_PARKING" then
local jobType = emp.currentJob.type
if jobType == "RETURN_TO_PARKING" then
statusText = g_i18n:getText("em_status_returning")
elseif jobType == "DRIVING_TO_TOOL" then
statusText = g_i18n:getText("em_status_driving_to_tool")
elseif jobType == "APPROACHING_TOOL" or jobType == "ATTACHING_TOOL" then
statusText = g_i18n:getText("em_status_attaching_tool")
elseif jobType == "RETURNING_TOOL" then
statusText = g_i18n:getText("em_status_returning_tool")
else
statusText = emp.currentJob.workType or "Working"
end
Expand Down Expand Up @@ -373,8 +382,15 @@ function EMEmployeeFrame:displayWorkStats(employee)
if self.statCurrentJob then
if employee.currentJob then
local jobType = employee.currentJob.workType or employee.currentJob.type or "Unknown"
if employee.currentJob.type == "RETURN_TO_PARKING" then
local jt = employee.currentJob.type
if jt == "RETURN_TO_PARKING" then
jobType = g_i18n:getText("em_status_returning")
elseif jt == "DRIVING_TO_TOOL" then
jobType = g_i18n:getText("em_status_driving_to_tool")
elseif jt == "APPROACHING_TOOL" or jt == "ATTACHING_TOOL" then
jobType = g_i18n:getText("em_status_attaching_tool")
elseif jt == "RETURNING_TOOL" then
jobType = g_i18n:getText("em_status_returning_tool")
end
local fieldId = employee.currentJob.fieldId
if fieldId then
Expand Down
Loading