-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A lot of changes... mainly GDSC meta entity, ...
Some changes include changing type of UNIT_TIME to chrono::seconds instead of float, this actually saved a possible error, and also makes much sense than previous float Better language ettiquite 🥲 Dependency version upgrade More CMakeLists changes, including now can access the 'db' directory
- Loading branch information
Showing
21 changed files
with
375 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,3 +81,4 @@ pkg/ | |
|
||
worldlinesim | ||
logs | ||
.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../../src/Entities/Meta/Custom/GDSC/README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#pragma once | ||
|
||
#include "entity.hpp" | ||
#include "Entities/human.hpp" | ||
#include "entity_types.hpp" | ||
#include "world.hpp" | ||
#include <optional> | ||
#include <string> | ||
#include <map> | ||
|
||
using SamajdharHuman = Human; // @adi Hata dena baad me, jab Humans intelligent ho | ||
|
||
class GDSC; | ||
|
||
class Member: SamajdharHuman { | ||
std::string role; | ||
float talkative_factor; | ||
float listening_factor; | ||
std::string last_msg; | ||
std::map<std::string, std::pair<uint64_t,float>> | ||
interactions; // {"name" : {"total talk (bytes)", "inference score"} } | ||
|
||
GDSC* /*const*/ gdsc; | ||
|
||
std::string m_chose_member(); | ||
|
||
public: | ||
// @adi Future C:2 | ||
void mouth_speak(/*const std::string prefix_name*/); | ||
void refresh_metric(); | ||
void ears_listen(std::string sounds); | ||
Member(World_Ptr const world, const std::string& name, Gender gender, const std::string& role = "Member", float talkative_factor = 0.5, float listening_factor = 0.6): | ||
role(role), | ||
// gdsc(gdsc), | ||
talkative_factor(talkative_factor), | ||
listening_factor(listening_factor), | ||
Human (world, name, gender) {} | ||
|
||
// Overloads | ||
void _Action1() override {} | ||
void _Action2() override {} | ||
|
||
void simulateExistence() override; | ||
void pauseExistence() override; | ||
|
||
friend class GDSC; | ||
}; | ||
|
||
class GDSC: public Entity { | ||
std::string full_name; | ||
std::map<std::string, Member> group; | ||
bool pause_requested{false}, pause_acknowledged{false}; | ||
World_Ptr const parent_world; | ||
std::map< std::string, Member > _get_members_from_file(const std::string& filepath); | ||
public: | ||
void broadcast(std::string msg); | ||
const std::map<std::string, Member>& get_members_ref() const; | ||
GDSC(World_Ptr const world, const std::string& full_name, const std::map<std::string, Member>& members); | ||
GDSC(World_Ptr const world, const std::string& full_name, const std::string& member_details_yaml); | ||
|
||
// Overloads | ||
void _Action1() override {} | ||
void _Action2() override {} | ||
std::optional<Entity_Point> getPrimaryPos() const override { return std::nullopt; } | ||
EntityState* _get_current_state() const { return new EntityState( Entity_Types::META ); } | ||
|
||
void simulateExistence() override; | ||
void pauseExistence() override; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## GDSC - Meta Entity | ||
|
||
GDSC is the first Meta Entity in the worldline simulation, in it's whole history... :D | ||
|
||
> **Meta Entity** - Entities that aren't actually living beings (etc..), but instead a group of individual entities, think of like the solar system, where we friends/entities are the planets, we have most interactions inside, but not 'isolated', can interact with outside too |
Oops, something went wrong.