mirror of
https://github.com/Relintai/world_generator.git
synced 2024-11-12 10:15:07 +01:00
Typo fix and update.
This commit is contained in:
parent
128f40a6f6
commit
572d7c7493
@ -8,12 +8,12 @@ bool WorldGeneratorPropData::can_spawn(int seed) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ref<VoxelmanProp> WorldGeneratorPropData::get_prop(int seed) {
|
Ref<PropData> WorldGeneratorPropData::get_prop(int seed) {
|
||||||
if (has_method("_get_prop")) {
|
if (has_method("_get_prop")) {
|
||||||
return call("_get_prop", seed);
|
return call("_get_prop", seed);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Ref<VoxelmanProp>(NULL);
|
return Ref<PropData>(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
WorldGeneratorPropData::WorldGeneratorPropData() {
|
WorldGeneratorPropData::WorldGeneratorPropData() {
|
||||||
@ -25,7 +25,7 @@ WorldGeneratorPropData::~WorldGeneratorPropData() {
|
|||||||
|
|
||||||
void WorldGeneratorPropData::_bind_methods() {
|
void WorldGeneratorPropData::_bind_methods() {
|
||||||
BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::BOOL, "can"), "_can_spawn", PropertyInfo(Variant::INT, "seed")));
|
BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::BOOL, "can"), "_can_spawn", PropertyInfo(Variant::INT, "seed")));
|
||||||
BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "prop", PROPERTY_HINT_RESOURCE_TYPE, "VoxelmanProp"), "_get_prop", PropertyInfo(Variant::INT, "seed")));
|
BIND_VMETHOD(MethodInfo(PropertyInfo(Variant::OBJECT, "prop", PROPERTY_HINT_RESOURCE_TYPE, "PropData"), "_get_prop", PropertyInfo(Variant::INT, "seed")));
|
||||||
|
|
||||||
ClassDB::bind_method(D_METHOD("can_spawn", "seed"), &WorldGeneratorPropData::can_spawn);
|
ClassDB::bind_method(D_METHOD("can_spawn", "seed"), &WorldGeneratorPropData::can_spawn);
|
||||||
ClassDB::bind_method(D_METHOD("get_prop", "seed"), &WorldGeneratorPropData::get_prop);
|
ClassDB::bind_method(D_METHOD("get_prop", "seed"), &WorldGeneratorPropData::get_prop);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#ifndef PROP_DATA_H
|
#ifndef WORLD_GENERATOR_PROP_DATA_H
|
||||||
#define PROP_DATA_H
|
#define WORLD_GENERATOR_PROP_DATA_H
|
||||||
|
|
||||||
#include "core/resource.h"
|
#include "core/resource.h"
|
||||||
|
|
||||||
#include "../../voxelman/props/voxelman_prop.h"
|
#include "../../voxelman/props/prop_data.h"
|
||||||
|
|
||||||
class WorldGeneratorPropData : public Resource {
|
class WorldGeneratorPropData : public Resource {
|
||||||
GDCLASS(WorldGeneratorPropData, Resource);
|
GDCLASS(WorldGeneratorPropData, Resource);
|
||||||
@ -11,7 +11,7 @@ class WorldGeneratorPropData : public Resource {
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
bool can_spawn(int seed);
|
bool can_spawn(int seed);
|
||||||
Ref<VoxelmanProp> get_prop(int seed);
|
Ref<PropData> get_prop(int seed);
|
||||||
|
|
||||||
WorldGeneratorPropData();
|
WorldGeneratorPropData();
|
||||||
~WorldGeneratorPropData();
|
~WorldGeneratorPropData();
|
||||||
|
Loading…
Reference in New Issue
Block a user