feat(editor): added icons to players and player

This commit is contained in:
maelstrom 2025-07-08 14:48:50 +02:00
parent 3d23c446ea
commit d68b9d1f9d
5 changed files with 7 additions and 7 deletions

BIN
assets/icons/player.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

BIN
assets/icons/players.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

View file

@ -33,9 +33,9 @@ void DataModel::Init(bool runMode) {
if (runMode) service->OnRun();
}
if (runMode) {
GetService<Players>()->createLocalPlayer(0);
}
// if (runMode) {
// GetService<Players>()->createLocalPlayer(0);
// }
}
void DataModel::SaveToFile(std::optional<std::string> path) {

View file

@ -5,7 +5,7 @@
#include "objects/model.h"
#include <memory>
class DEF_INST_() Player : public Instance {
class DEF_INST_(explorer_icon="player") Player : public Instance {
AUTOGEN_PREAMBLE
public:
@ -15,8 +15,8 @@ public:
DEF_PROP_CATEGORY(DATA)
DEF_PROP_(readonly) int userId = 0;
DEF_PROP std::weak_ptr<Model> character;
DEF_PROP_CATEGORY(TEAM) //placeholder, we cant add TeamColor or Teams yet since no BrickColor
DEF_PROP bool neutral = true;
// DEF_PROP_CATEGORY(TEAM) //placeholder, we cant add TeamColor or Teams yet since no BrickColor
// DEF_PROP bool neutral = true;
static inline std::shared_ptr<Player> New() { return std::make_shared<Player>(); };
static inline std::shared_ptr<Instance> Create() { return std::make_shared<Player>(); };

View file

@ -4,7 +4,7 @@
#include "objects/base/service.h"
#include "objects/player.h"
class DEF_INST_SERVICE Players : public Service {
class DEF_INST_SERVICE_(explorer_icon="players") Players : public Service {
AUTOGEN_PREAMBLE
protected:
void InitService() override;