-
Notifications
You must be signed in to change notification settings - Fork 223
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3657 from MistakeNot4892/poiloader
Generalizes the ruin loader.
- Loading branch information
Showing
39 changed files
with
179 additions
and
162 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
This file was deleted.
Oops, something went wrong.
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,9 @@ | ||
//Flags for exoplanet ruin picking | ||
|
||
#define TEMPLATE_TAG_HABITAT BITFLAG(0) //long term habitat | ||
#define TEMPLATE_TAG_HUMAN BITFLAG(1) //human-made structure | ||
#define TEMPLATE_TAG_ALIEN BITFLAG(2) //artificial structure of an unknown origin | ||
#define TEMPLATE_TAG_WRECK BITFLAG(3) //crashed vessel | ||
#define TEMPLATE_TAG_NATURAL BITFLAG(4) //naturally occuring structure | ||
#define TEMPLATE_TAG_WATER BITFLAG(5) //ruin depending on planet having water accessible | ||
#define TEMPLATE_TAG_HABITABLE BITFLAG(6) //ruin depending on planet being habitable |
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
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
22 changes: 2 additions & 20 deletions
22
code/modules/maps/template_types/random_exoplanet/random_planet_subtemplates.dm
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 |
---|---|---|
@@ -1,24 +1,6 @@ | ||
///Picks all ruins and tries to spawn them on the levels that make up the planet. | ||
/datum/map_template/planetoid/random/proc/generate_features(var/datum/planetoid_data/gen_data, var/list/created_level_data, var/whitelist = ruin_tags_whitelist, var/blacklist = ruin_tags_blacklist) | ||
var/my_budget = gen_data._budget_override || subtemplate_budget | ||
if(my_budget <= 0) | ||
return | ||
|
||
var/list/possible_subtemplates = list() | ||
var/list/ruins = SSmapping.get_templates_by_category(ruin_category) | ||
for(var/ruin_name in ruins) | ||
var/datum/map_template/ruin = ruins[ruin_name] | ||
var/ruin_tags = ruin.get_ruin_tags() | ||
if(whitelist && !(whitelist & ruin_tags)) | ||
continue | ||
if(blacklist & ruin_tags) | ||
continue | ||
possible_subtemplates += ruin | ||
|
||
if(!length(possible_subtemplates)) | ||
return //If we don't have any ruins, don't bother | ||
|
||
/datum/map_template/planetoid/random/proc/generate_features(var/datum/planetoid_data/gen_data, var/list/created_level_data, var/whitelist = template_tags_whitelist, var/blacklist = template_tags_blacklist) | ||
//#TODO: Properly handle generating ruins and sites on the various levels of the planet. | ||
var/datum/level_data/planetoid/surface_level = SSmapping.levels_by_id[gen_data.surface_level_id] | ||
//#TODO: dimensions and area have to be handled on a per level_data basis!! | ||
LAZYADD(gen_data.subtemplates, surface_level.seed_ruins(my_budget, possible_subtemplates)) | ||
LAZYADD(gen_data.subtemplates, surface_level.spawn_subtemplates((gen_data._budget_override || subtemplate_budget), template_category, blacklist, whitelist)) |
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
Oops, something went wrong.