feat: reorienting prototype goals

This commit is contained in:
Sara 2025-07-04 15:59:45 +02:00
parent 049ac16541
commit 062633c742
4 changed files with 0 additions and 141 deletions

View file

@ -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<InputEvent> event, Vector3 position, Vector3 normal, int shape_ind) {
Ref<InputEventMouseButton> 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;
}

View file

@ -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<InputEvent> 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

View file

@ -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;
}

View file

@ -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