mirror of
https://github.com/Relintai/world_generator.git
synced 2024-11-12 10:15:07 +01:00
Automatically setup scripts aswell in the base classes.
This commit is contained in:
parent
457de8cb4c
commit
bc7b040fc3
@ -294,6 +294,9 @@ Ref<Biome> Biome::_instance(const int seed, Ref<Biome> biome) {
|
||||
if (!inst.is_valid())
|
||||
inst.instance();
|
||||
|
||||
if (inst->get_script().is_null() && !get_script().is_null())
|
||||
inst->set_script(get_script());
|
||||
|
||||
inst->set_current_seed(seed);
|
||||
inst->set_level_range(_level_range);
|
||||
|
||||
|
@ -476,6 +476,9 @@ Ref<Dungeon> Dungeon::_instance(const int seed, Ref<Dungeon> dungeon) {
|
||||
if (!inst.is_valid())
|
||||
inst.instance();
|
||||
|
||||
if (inst->get_script().is_null() && !get_script().is_null())
|
||||
inst->set_script(get_script());
|
||||
|
||||
inst->set_current_seed(seed);
|
||||
inst->set_level_range(_level_range);
|
||||
|
||||
|
@ -334,6 +334,9 @@ Ref<DungeonRoom> DungeonRoom::_instance(const int seed, Ref<DungeonRoom> dungeon
|
||||
if (!inst.is_valid())
|
||||
inst.instance();
|
||||
|
||||
if (inst->get_script().is_null() && !get_script().is_null())
|
||||
inst->set_script(get_script());
|
||||
|
||||
inst->set_current_seed(seed);
|
||||
inst->set_level_range(_level_range);
|
||||
|
||||
|
@ -239,6 +239,9 @@ Ref<Planet> Planet::_instance(const int seed, Ref<Planet> planet) {
|
||||
if (!inst.is_valid())
|
||||
inst.instance();
|
||||
|
||||
if (inst->get_script().is_null() && !get_script().is_null())
|
||||
inst->set_script(get_script());
|
||||
|
||||
inst->set_id(_id);
|
||||
inst->set_current_seed(seed);
|
||||
inst->set_level_range(_level_range);
|
||||
|
Loading…
Reference in New Issue
Block a user