Skip to content

Commit

Permalink
Merge pull request #9 from Paxilmaniac/the-bog
Browse files Browse the repository at this point in the history
The bog
  • Loading branch information
Paxilmaniac authored Jun 26, 2024
2 parents f930814 + 488fdf3 commit f1d044b
Show file tree
Hide file tree
Showing 13 changed files with 64,461 additions and 64,236 deletions.
128,467 changes: 64,241 additions & 64,226 deletions _maps/map_files/fantasystation/fantasyland.dmm

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1169,4 +1169,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai

///Trait given to the birthday boy
#define TRAIT_BIRTHDAY_BOY "birthday_boy"

/// Trait for if the trait owner can pass through deep water without anything bad happening
#define TRAIT_DEEP_WATER_PASSER "ice_road_trucker"

// END TRAIT DEFINES
1 change: 1 addition & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_WADDLING" = TRAIT_WADDLING,
"TRAIT_WEATHER_IMMUNE" = TRAIT_WEATHER_IMMUNE,
"TRAIT_CHASM_STOPPER" = TRAIT_CHASM_STOPPER,
"TRAIT_DEEP_WATER_PASSER" = TRAIT_DEEP_WATER_PASSER,
),
/datum/controller/subsystem/economy = list(
"TRAIT_MARKET_CRASHING" = TRAIT_MARKET_CRASHING,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@
ambientsounds = list()

/area/vintage/surface_generator
name = "Surface"
name = "Surface Forest"
map_generator = /datum/map_generator/cave_generator/fantasy_surface
area_has_base_lighting = TRUE
base_lighting_alpha = 255

/area/vintage/surface_generator/swamp
name = "Surface Swamp"
map_generator = /datum/map_generator/cave_generator/fantasy_surface/swamp

/area/vintage/caves
name = "Underground"
icon_state = "explored"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/datum/biome/fantasy_swamp_water
turf_type = /turf/open/water/vintage/swamp

flora_types = list(
/obj/structure/flora/fantasy_regrowing = 2,
/obj/structure/flora/fantasy_tree/pet_bush/swamp/random_icon = 1,
)
feature_types = list(
/obj/effect/spawner/random/rock_and_roll = 3,
/obj/effect/spawner/random/rock_and_roll/super = 2,
/obj/effect/spawner/random/rock_and_roll/lots_of_them = 1,
)
fauna_types = list()

flora_density = 25
feature_density = 10
fauna_density = 0

/datum/biome/fantasy_swamp_water_surroundings
turf_type = /turf/open/misc/fire_clay

flora_types = list(
/obj/structure/flora/fantasy_tree/pet_bush/swamp/random_icon = 2,
/obj/structure/flora/fantasy_tree/swamp/random_icon = 1,
)
feature_types = list()
fauna_types = list()

flora_density = 40
feature_density = 0
fauna_density = 0

/datum/biome/fantasy_the_slop_swamp
turf_type = /turf/open/misc/muck_slop

flora_types = list(
/obj/structure/flora/fantasy_regrowing = 2,
/obj/structure/flora/fantasy_tree/pet_bush/swamp/random_icon = 2,
/obj/structure/flora/fantasy_tree/swamp/random_icon = 1,
)
feature_types = list(
/obj/effect/spawner/random/rock_and_roll = 3,
/obj/effect/spawner/random/rock_and_roll/super = 2,
/obj/effect/spawner/random/rock_and_roll/lots_of_them = 1,
)
fauna_types = list()

flora_density = 50
feature_density = 10
fauna_density = 0

/datum/biome/fantasy_regular_soil/swamp
turf_type = /turf/open/misc/regular_soil

flora_types = list(
/obj/structure/flora/fantasy_tree/stump/swamp/random_icon = 1,
/obj/structure/flora/fantasy_tree/swamp/random_icon = 2,
/obj/structure/flora/fantasy_tree/pet_bush/swamp/random_icon = 5,
/obj/structure/flora/fantasy_regrowing = 8,
)
feature_types = list(
/obj/effect/spawner/random/rock_and_roll = 3,
/obj/effect/spawner/random/rock_and_roll/super = 2,
/obj/effect/spawner/random/rock_and_roll/lots_of_them = 1,
)
fauna_types = list()

flora_density = 50
feature_density = 5
fauna_density = 0

/datum/biome/fantasy_grassy_swamp
turf_type = /turf/open/misc/fantasy_grass

flora_types = list(
/obj/structure/flora/fantasy_regrowing = 4,
/obj/structure/flora/fantasy_tree/pet_bush/swamp/random_icon = 1,
)
feature_types = list(
/obj/effect/spawner/random/rock_and_roll = 3,
/obj/effect/spawner/random/rock_and_roll/super = 2,
/obj/effect/spawner/random/rock_and_roll/lots_of_them = 1,
)
fauna_types = list()

flora_density = 75
feature_density = 10
fauna_density = 0
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ GLOBAL_LIST_EMPTY(tagged_river_nodes)
var/turf/open/shallow_turf = /turf/open/water/vintage
var/turf/open/deep_turf = /turf/open/water/vintage/deep

var/list/turfs_to_mud = list()
var/list/turfs_to_shallow = list()
var/list/turfs_to_deep = list()

Expand All @@ -30,8 +31,8 @@ GLOBAL_LIST_EMPTY(tagged_river_nodes)
break
var/detouring = FALSE
var/cur_dir = get_dir(cur_turf, target_turf)
var/turf/last_turf = cur_turf
while(cur_turf != target_turf)

if(detouring)
if(prob(20))
detouring = FALSE
Expand All @@ -46,8 +47,10 @@ GLOBAL_LIST_EMPTY(tagged_river_nodes)
cur_dir = get_dir(cur_turf, target_turf)

cur_turf = get_step(cur_turf, cur_dir)
if(!isnull(cur_turf))
turfs_to_shallow += cur_turf
if(isnull(cur_turf))
cur_turf = last_turf
continue
turfs_to_mud += cur_turf

for(var/obj/effect/landmark/river_waypoint/waypoints as anything in river_nodes_east)
if (waypoints.z != target_z || waypoints.connected)
Expand All @@ -60,6 +63,7 @@ GLOBAL_LIST_EMPTY(tagged_river_nodes)
break
var/detouring = FALSE
var/cur_dir = get_dir(cur_turf, target_turf)
var/turf/last_turf = cur_turf
while(cur_turf != target_turf)

if(detouring)
Expand All @@ -76,8 +80,15 @@ GLOBAL_LIST_EMPTY(tagged_river_nodes)
cur_dir = get_dir(cur_turf, target_turf)

cur_turf = get_step(cur_turf, cur_dir)
if(!isnull(cur_turf))
turfs_to_shallow += cur_turf
if(isnull(cur_turf))
cur_turf = last_turf
continue
turfs_to_mud += cur_turf

for(var/turf/turf_to_generate_mud in turfs_to_mud)
var/turf/mud_turf = new edge_turf(turf_to_generate_mud)
turfs_to_shallow += mud_turf
mud_turf.spread_better(30, 5, whitelist_area)

for(var/turf/turf_to_generate_shallow in turfs_to_shallow)
var/turf/river_turf = new shallow_turf(turf_to_generate_shallow)
Expand Down Expand Up @@ -105,6 +116,10 @@ GLOBAL_LIST_EMPTY(tagged_river_nodes)
. = ..()
GLOB.tagged_river_nodes += src

/obj/effect/landmark/river_waypoint/fantasystation/Destroy()
GLOB.tagged_river_nodes -= src
return ..()

/turf/proc/spread_better(probability = 30, prob_loss = 25, whitelisted_area)
if(probability <= 0)
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
string_gen = rustg_cnoise_generate("[initial_closed_chance]", "[smoothing_iterations]", "[birth_limit]", "[death_limit]", "[world.maxx]", "[world.maxy]") //Generate the raw CA data

var/humidity_gen = list()
humidity_gen[BIOME_HIGH_HUMIDITY] = rustg_dbp_generate("[humidity_seed]", "60", "75", "[world.maxx]", "-0.1", "1.1")
humidity_gen[BIOME_MEDIUM_HUMIDITY] = rustg_dbp_generate("[humidity_seed]", "60", "75", "[world.maxx]", "-0.3", "-0.1")
humidity_gen[BIOME_HIGH_HUMIDITY] = rustg_dbp_generate("[humidity_seed]", "60", "[perlin_zoom]", "[world.maxx]", "-0.1", "1.1")
humidity_gen[BIOME_MEDIUM_HUMIDITY] = rustg_dbp_generate("[humidity_seed]", "60", "[perlin_zoom]", "[world.maxx]", "-0.3", "-0.1")

var/heat_gen = list()
heat_gen[BIOME_HIGH_HEAT] = rustg_dbp_generate("[heat_seed]", "60", "75", "[world.maxx]", "-0.1", "1.1")
heat_gen[BIOME_MEDIUM_HEAT] = rustg_dbp_generate("[heat_seed]", "60", "75", "[world.maxx]", "-0.3", "-0.1")
heat_gen[BIOME_HIGH_HEAT] = rustg_dbp_generate("[heat_seed]", "60", "[perlin_zoom]", "[world.maxx]", "-0.1", "1.1")
heat_gen[BIOME_MEDIUM_HEAT] = rustg_dbp_generate("[heat_seed]", "60", "[perlin_zoom]", "[world.maxx]", "-0.3", "-0.1")

var/list/expanded_closed_turfs = src.closed_turf_types
var/list/expanded_open_turfs = src.open_turf_types
Expand Down Expand Up @@ -92,3 +92,23 @@
log_world(message)

#undef BIOME_RANDOM_SQUARE_DRIFT

/datum/map_generator/cave_generator/fantasy_surface/swamp
perlin_zoom = 20
possible_biomes = list(
BIOME_LOW_HEAT = list(
BIOME_LOW_HUMIDITY = /datum/biome/fantasy_the_slop_swamp,
BIOME_MEDIUM_HUMIDITY = /datum/biome/fantasy_swamp_water_surroundings,
BIOME_HIGH_HUMIDITY = /datum/biome/fantasy_swamp_water,
),
BIOME_MEDIUM_HEAT = list(
BIOME_LOW_HUMIDITY = /datum/biome/fantasy_grassy_swamp,
BIOME_MEDIUM_HUMIDITY = /datum/biome/fantasy_swamp_water_surroundings,
BIOME_HIGH_HUMIDITY = /datum/biome/fantasy_swamp_water,
),
BIOME_HIGH_HEAT = list(
BIOME_LOW_HUMIDITY = /datum/biome/fantasy_grassy_swamp,
BIOME_MEDIUM_HUMIDITY = /datum/biome/fantasy_regular_soil/swamp,
BIOME_HIGH_HUMIDITY = /datum/biome/fantasy_the_slop_swamp,
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@
to_chat(user, span_notice("You manage to remove [src]."))
qdel(src)

/obj/structure/flora/fantasy_tree/swamp
name = "swamp tree"
desc = "A large tree. This one is commonly seen around swamps and bogs."
icon_state = "swamp_tree_1"

/obj/structure/flora/fantasy_tree/stump/swamp
icon_state = "swamp_tree_1_stump"

/obj/structure/flora/fantasy_tree/pet_bush
name = "bush"
desc = "A large bush."
Expand Down Expand Up @@ -89,6 +97,11 @@
/obj/structure/flora/fantasy_tree/pet_bush/get_seethrough_map()
return SEE_THROUGH_MAP_DEFAULT

/obj/structure/flora/fantasy_tree/pet_bush/swamp
name = "swamp bush"
desc = "A large bush. This one is commonly seen in swamps and bogs"
icon_state = "swamp_bush_1"

// Random icon versions of the above

/obj/structure/flora/fantasy_tree/random_icon
Expand All @@ -115,6 +128,30 @@
icon_state = pick(random_states)
update_appearance()

/obj/structure/flora/fantasy_tree/swamp/random_icon

/obj/structure/flora/fantasy_tree/swamp/random_icon/Initialize(mapload)
. = ..()
var/list/random_states = list(
"swamp_tree_1",
"swamp_tree_2",
"swamp_tree_3",
)
icon_state = pick(random_states)
update_appearance()

/obj/structure/flora/fantasy_tree/stump/swamp/random_icon

/obj/structure/flora/fantasy_tree/stump/swamp/random_icon/Initialize(mapload)
. = ..()
var/list/random_states = list(
"swamp_tree_1_stump",
"swamp_tree_2_stump",
"swamp_tree_3_stump",
)
icon_state = pick(random_states)
update_appearance()

/obj/structure/flora/fantasy_tree/pet_bush/random_icon

/obj/structure/flora/fantasy_tree/pet_bush/random_icon/Initialize(mapload)
Expand All @@ -127,3 +164,15 @@
)
icon_state = pick(random_states)
update_appearance()

/obj/structure/flora/fantasy_tree/pet_bush/swamp/random_icon

/obj/structure/flora/fantasy_tree/pet_bush/swamp/Initialize(mapload)
. = ..()
var/list/random_states = list(
"swamp_bush_1",
"swamp_bush_2",
"swamp_bush_3",
)
icon_state = pick(random_states)
update_appearance()
28 changes: 28 additions & 0 deletions code/modules/fantasystation_map_generation/turfs/water.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,31 @@
icon_state = "deepwater"
baseturfs = /turf/open/water/vintage/deep
immerse_overlay_color = "#247296"

/turf/open/water/vintage/deep/Entered(atom/movable/arrived, atom/old_loc, list/atom/old_locs)
. = ..()
// If the thing is an abstract object, do we really need to worry about it?
if(arrived.invisibility == INVISIBILITY_ABSTRACT)
return
// If they are buckled to something, then they are either on a boat or buckled to a mob, which will get repelled anyways
if(ismob(arrived))
var/mob/arriving_mob = arrived
if(arriving_mob.buckled)
return
// If the arrived thing is allowed to pass water, then we're not worried about throwing them away
if(HAS_TRAIT(arrived, TRAIT_DEEP_WATER_PASSER))
return
// If they fail the above, however....
var/atom/throw_target = get_edge_target_turf(arrived, get_dir(src, old_loc))
if(isliving(arrived))
to_chat(arrived, span_userdanger("The fierce currents wash you away!"))
playsound(src, 'sound/effects/submerge.ogg', 50, TRUE)
arrived.throw_at(throw_target, 1, 2)
arrived.forceMove(old_loc) // Safety measure (DIAGONAL MOVEMENT!!!)

/turf/open/water/vintage/swamp
name = "murky water"
desc = "Gnarly green water that you can barely see through. It's likely there's a million different bugs and parasites in this, but you'd win, right?"
icon_state = "swamp"
baseturfs = /turf/open/water/vintage/swamp
immerse_overlay_color = "#547e64"
Binary file modified icons/obj/fantasystation_obj/tall_plants.dmi
Binary file not shown.
Binary file modified icons/obj/fantasystation_obj/trees.dmi
Binary file not shown.
Binary file modified icons/turf/fantasystation/water.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -4069,6 +4069,7 @@
#include "code\modules\fantasystation_map_generation\map_generator_and_areas\surface_generator.dm"
#include "code\modules\fantasystation_map_generation\map_generator_and_areas\biome_types\dirt_biomes.dm"
#include "code\modules\fantasystation_map_generation\map_generator_and_areas\biome_types\pond_biomes.dm"
#include "code\modules\fantasystation_map_generation\map_generator_and_areas\biome_types\swamp_biomes.dm"
#include "code\modules\fantasystation_map_generation\random_resources\dunegrass.dm"
#include "code\modules\fantasystation_map_generation\random_resources\regrowing_wild_plants.dm"
#include "code\modules\fantasystation_map_generation\random_resources\rock_and_stone.dm"
Expand Down

0 comments on commit f1d044b

Please sign in to comment.