From 7438a08fe9752969509fd569e108e4c6b0d24ac4 Mon Sep 17 00:00:00 2001 From: Daid Date: Fri, 15 Nov 2024 16:16:08 +0100 Subject: [PATCH] Add ships log to player ships... --- scripts/api/entity/playerspaceship.lua | 1 + src/script/components.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/scripts/api/entity/playerspaceship.lua b/scripts/api/entity/playerspaceship.lua index dd0ec59be..22f95f0fa 100644 --- a/scripts/api/entity/playerspaceship.lua +++ b/scripts/api/entity/playerspaceship.lua @@ -9,6 +9,7 @@ function PlayerSpaceship() local e = createEntity() e.components = { player_control = {}, + ship_log = {}, custom_ship_functions = {}, transform = {rotation=random(0, 360)}, callsign = {callsign=generateRandomCallSign()}, diff --git a/src/script/components.cpp b/src/script/components.cpp index 09edb2063..7af772f16 100644 --- a/src/script/components.cpp +++ b/src/script/components.cpp @@ -43,6 +43,7 @@ #include "components/pickup.h" #include "components/customshipfunction.h" #include "components/zone.h" +#include "components/shiplog.h" #define STRINGIFY(n) #n @@ -591,6 +592,7 @@ void initComponentScriptBindings() BIND_MEMBER(PlayerControl, allowed_positions); sp::script::ComponentHandler::name("hacking_device"); BIND_MEMBER(HackingDevice, effectiveness); + sp::script::ComponentHandler::name("ship_log"); sp::script::ComponentHandler::name("move_to"); BIND_MEMBER(MoveTo, speed);