diff --git a/modules/authority/locale_marker.cpp b/modules/authority/locale_marker.cpp deleted file mode 100644 index 1bc7efec..00000000 --- a/modules/authority/locale_marker.cpp +++ /dev/null @@ -1,52 +0,0 @@ -#include "locale_marker.h" -#include "authority/game_state.h" -#include "core/config/engine.h" -#include "core/input/input_enums.h" -#include "macros.h" - -void LocaleMarker::_bind_methods() { - BIND_HPROPERTY(Variant::STRING, locale_scene, PROPERTY_HINT_FILE, "*.tscn,*.scn"); - BIND_PROPERTY(Variant::STRING, entrance_path); -} - -void LocaleMarker::_notification(int what) { - if (Engine::get_singleton()->is_editor_hint()) { - return; - } - switch (what) { - default: - return; - case NOTIFICATION_READY: - this->ready(); - return; - } -} - -void LocaleMarker::ready() { - this->connect(this->sig_input_event, callable_mp(this, &self_type::on_input_event)); -} - -void LocaleMarker::on_input_event(Node *camera, Ref event, Vector3 position, Vector3 normal, int shape_ind) { - Ref clicked{ event }; - if (clicked.is_valid() && clicked->get_button_index() == MouseButton::LEFT) { - GameState::get_singleton()->set_locale_uid(this->locale_scene); - GameState::get_singleton()->set_locale_entrance_path(this->entrance_path); - get_tree()->change_scene_to_file(this->locale_scene); - } -} - -void LocaleMarker::set_locale_scene(String const &path) { - this->locale_scene = path; -} - -String LocaleMarker::get_locale_scene() const { - return this->locale_scene; -} - -void LocaleMarker::set_entrance_path(String const &node_path) { - this->entrance_path = node_path; -} - -String LocaleMarker::get_entrance_path() const { - return this->entrance_path; -} diff --git a/modules/authority/locale_marker.h b/modules/authority/locale_marker.h deleted file mode 100644 index 15295510..00000000 --- a/modules/authority/locale_marker.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef LOCALE_MARKER_H -#define LOCALE_MARKER_H - -#include "core/input/input_event.h" -#include "scene/3d/physics/area_3d.h" -#include "scene/main/node.h" - -class LocaleMarker : public Area3D { - GDCLASS(LocaleMarker, Area3D); - static void _bind_methods(); - void _notification(int what); - void ready(); - void on_input_event(Node *camera, Ref event, Vector3 position, Vector3 normal, int shape_ind); - -public: - void set_locale_scene(String const &value); - String get_locale_scene() const; - void set_entrance_path(String const &value); - String get_entrance_path() const; - -private: - String locale_scene{ "res://" }; - String entrance_path{ "%" }; - String const sig_input_event{ "input_event" }; -}; - -#endif // !LOCALE_MARKER_H diff --git a/modules/authority/party_member_data.cpp b/modules/authority/party_member_data.cpp deleted file mode 100644 index 46d95c8f..00000000 --- a/modules/authority/party_member_data.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "party_member_data.h" -#include "macros.h" - -void PartyMemberData::_bind_methods() { - BIND_PROPERTY(Variant::STRING, first_name); - BIND_PROPERTY(Variant::INT, player_trust); - BIND_PROPERTY(Variant::INT, player_fear); -} - -int PartyMemberData::get_player_authority() const { - return this->player_fear + this->player_trust; -} - -void PartyMemberData::set_first_name(String name) { - this->first_name = name; -} - -String PartyMemberData::get_first_name() const { - return this->first_name; -} - -void PartyMemberData::set_player_trust(int value) { - this->player_trust = value; -} - -int PartyMemberData::get_player_trust() const { - return this->player_trust; -} - -void PartyMemberData::set_player_fear(int value) { - this->player_fear = value; -} - -int PartyMemberData::get_player_fear() const { - return this->player_fear; -} diff --git a/modules/authority/party_member_data.h b/modules/authority/party_member_data.h deleted file mode 100644 index 91c9a5c1..00000000 --- a/modules/authority/party_member_data.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef PARTY_MEMBER_DATA_H -#define PARTY_MEMBER_DATA_H - -#include "core/io/resource.h" - -class PartyMemberData : public Resource { - GDCLASS(PartyMemberData, Resource); - static void _bind_methods(); - -public: - int get_player_authority() const; - - void set_first_name(String name); - String get_first_name() const; - void set_player_trust(int value); - int get_player_trust() const; - void set_player_fear(int value); - int get_player_fear() const; - -private: - String first_name{ "Firstname" }; - int player_trust{ 1 }; - int player_fear{ 1 }; -}; - -#endif // !PARTY_MEMBER_DATA_H