-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds in base forest and mushroom forest generation
- Loading branch information
Showing
40 changed files
with
1,111 additions
and
40 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
//ATMOS MIX IDS | ||
#define FOREST_DEFAULT_ATMOS "FOREST_ATMOS" |
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,27 @@ | ||
|
||
// Hiding AI blackboard keys | ||
|
||
/// Whether or not the mob is currently hiding. | ||
#define BB_HIDING_HIDDEN "BB_hiding_hidden" | ||
/// The typecache (populated on `Initialize()` with the first argument of | ||
/// `/datum/element/can_hide/basic/New()`) of turfs that our mob can hide onto. | ||
#define BB_HIDING_CAN_HIDE_ON "BB_hiding_can_hide_on" | ||
/// The aggro range the mob has when hiding. | ||
#define BB_HIDING_AGGRO_RANGE "BB_hiding_aggro_range" | ||
/// The aggro range the mob has when NOT hiding (set dynamically). | ||
#define BB_HIDING_AGGRO_RANGE_NOT_HIDING "BB_hiding_aggro_range_not_hiding" | ||
/// The cooldown before the mob can hide again (set dynamically). | ||
#define BB_HIDING_COOLDOWN_BEFORE_HIDING "BB_hiding_cooldown_before_hiding" | ||
/// The cooldown before the mob can stop hiding (set dynamically). | ||
#define BB_HIDING_COOLDOWN_BEFORE_STOP_HIDING "BB_hiding_cooldown_before_stop_hiding" | ||
/// The minimum value for the cooldown before the mob can hide / come out of hiding again. | ||
#define BB_HIDING_COOLDOWN_MINIMUM "BB_hiding_cooldown_minimum" | ||
/// The maximum value for the cooldown before the mob can hide / come out of hiding again. | ||
#define BB_HIDING_COOLDOWN_MAXIMUM "BB_hiding_cooldown_maximum" | ||
/// The probability (in %) that the mob will stop hiding randomly every process. | ||
#define BB_HIDING_RANDOM_STOP_HIDING_CHANCE "BB_hiding_random_stop_hiding_chance" | ||
|
||
/// The default vision range when hiding, if none is specified. | ||
#define DEFAULT_HIDING_AGGRO_RANGE 2 | ||
/// The default chance to get out of hiding for every random hiding subtree process. | ||
#define DEFAULT_RANDOM_STOP_HIDING_CHANCE 2 |
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 +1,13 @@ | ||
#define LIGHT_COLOR_CLOCKWORK "#BE8700" | ||
|
||
//Colors for Bioluminescence plant traits. | ||
#define COLOR_BIOLUMINESCENCE_STANDARD "#C3E381" | ||
#define COLOR_BIOLUMINESCENCE_SHADOW "#AAD84B" | ||
#define COLOR_BIOLUMINESCENCE_YELLOW "#FFFF66" | ||
#define COLOR_BIOLUMINESCENCE_GREEN "#99FF99" | ||
#define COLOR_BIOLUMINESCENCE_BLUE "#6699FF" | ||
#define COLOR_BIOLUMINESCENCE_PURPLE "#D966FF" | ||
#define COLOR_BIOLUMINESCENCE_PINK "#FFB3DA" | ||
|
||
#define LIGHT_RANGE_FIRE_BLOSSOM_HARVESTED 2.7 | ||
#define LIGHT_POWER_FIRE_BLOSSOM_HARVESTED 1.5 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
## Title: MapGen Expansions | ||
|
||
MODULE ID: MAPEXPANSIONS | ||
|
||
### Credits: | ||
|
||
Credits to SableSteel (sable.steel on Discord, thlumyn on Github) for the sprites | ||
Credits to GoldenAlpharex for the biome generation and other code |
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,8 @@ | ||
/// Returns true if the map we're playing on is on a planet, but it DOES have space access. | ||
/datum/controller/subsystem/mapping/proc/is_planetary_with_space() | ||
return config.planetary && config.allow_space_when_planetary | ||
|
||
|
||
/datum/map_config | ||
/// Are we allowing space even if we're planetary? | ||
var/allow_space_when_planetary = FALSE |
59 changes: 59 additions & 0 deletions
59
monkestation/code/modules/map_gen_expansions/ai/behaviours/hiding.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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/// This behavior is to run any code that needs to be ran when the mob is going | ||
/// into hiding, or coming out from hiding. | ||
/datum/ai_behavior/toggle_hiding | ||
/// The blackboard cooldown key to check before we can hide. Only here | ||
/// to avoid copy-paste in other subtrees/behaviors, should only be SET, | ||
/// not READ here. | ||
var/cooldown_before_hiding_key = BB_HIDING_COOLDOWN_BEFORE_HIDING | ||
|
||
|
||
/datum/ai_behavior/toggle_hiding/setup(datum/ai_controller/controller, ...) | ||
. = ..() | ||
|
||
if(!controller.blackboard[BB_HIDING_AGGRO_RANGE_NOT_HIDING]) | ||
controller.set_blackboard_key(BB_HIDING_AGGRO_RANGE_NOT_HIDING, controller.blackboard[BB_AGGRO_RANGE]) | ||
|
||
|
||
/datum/ai_behavior/toggle_hiding/perform(seconds_per_tick, datum/ai_controller/controller, now_hiding) | ||
var/mob/living/basic/hiding_pawn = controller.pawn | ||
|
||
if(!istype(hiding_pawn)) | ||
finish_action(controller, FALSE) | ||
return | ||
|
||
var/mob/living/living_pawn = controller.pawn | ||
|
||
// Let's add some checks if we're trying to hide. | ||
if(now_hiding) | ||
// We can't hide if we can't move properly, or if we don't have any valid hiding locations. | ||
if(!(living_pawn.mobility_flags & MOBILITY_MOVE) || !isturf(living_pawn.loc) || living_pawn.pulledby || !islist(controller.blackboard[BB_HIDING_CAN_HIDE_ON])) | ||
finish_action(controller, FALSE) | ||
return | ||
|
||
// We can't hide if we don't match the proper turf type we need to hide onto. | ||
if(!controller.blackboard[BB_HIDING_CAN_HIDE_ON][living_pawn.loc.type]) | ||
finish_action(controller, FALSE) | ||
return | ||
|
||
var/hiding_status_changed = controller.blackboard[BB_HIDING_HIDDEN] != now_hiding | ||
|
||
if(!hiding_status_changed) | ||
finish_action(controller, TRUE) | ||
return | ||
|
||
controller.set_blackboard_key(BB_HIDING_HIDDEN, now_hiding) | ||
SEND_SIGNAL(living_pawn, COMSIG_MOVABLE_TOGGLE_HIDING, now_hiding, TRUE) | ||
|
||
var/new_vision_range = now_hiding ? controller.blackboard[BB_HIDING_AGGRO_RANGE] || DEFAULT_HIDING_AGGRO_RANGE : controller.blackboard[BB_HIDING_AGGRO_RANGE_NOT_HIDING] | ||
|
||
if(!now_hiding) | ||
var/cooldown_minimum = controller.blackboard[BB_HIDING_COOLDOWN_MINIMUM] || 1 MINUTES | ||
var/cooldown_maximum = controller.blackboard[BB_HIDING_COOLDOWN_MAXIMUM] || 3 MINUTES | ||
var/new_cooldown = world.time + rand(cooldown_minimum, cooldown_maximum) | ||
controller.set_blackboard_key(cooldown_before_hiding_key, new_cooldown) | ||
|
||
controller.set_blackboard_key(BB_AGGRO_RANGE, new_vision_range) | ||
|
||
finish_action(controller, TRUE) | ||
return | ||
|
9 changes: 9 additions & 0 deletions
9
monkestation/code/modules/map_gen_expansions/ai/idle_behaviours.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/datum/idle_behavior/idle_random_walk/hide | ||
|
||
|
||
/datum/idle_behavior/idle_random_walk/hide/perform_idle_behavior(seconds_per_tick, datum/ai_controller/controller) | ||
// You can't move when you're hidden. | ||
if(controller.blackboard[BB_HIDING_HIDDEN]) | ||
return FALSE | ||
|
||
return ..() |
9 changes: 9 additions & 0 deletions
9
monkestation/code/modules/map_gen_expansions/ai/subtree/find_target_not_hiding.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Prevents finding a target if hiding. | ||
/datum/ai_planning_subtree/simple_find_target/not_while_hiding | ||
operational_datums = list(/datum/element/can_hide) | ||
|
||
/datum/ai_planning_subtree/simple_find_target/not_while_hiding/SelectBehaviors(datum/ai_controller/controller, seconds_per_tick) | ||
if(controller.blackboard[BB_HIDING_HIDDEN]) | ||
return | ||
|
||
return ..() |
Oops, something went wrong.