-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathJungleBiomes.dm
228 lines (197 loc) · 7.15 KB
/
JungleBiomes.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
/datum/biome/jungleland
/// how dense the closed turf is relative to the open turf
var/cellular_noise_map_id = MED_DENSITY
var/turf/closed_turf = /turf/closed/mineral/random
/// Spawns on closed_turf
var/list/dense_flora = list()
/// Probability of dense_flora
var/dense_flora_density = 100
/// Spawns on turf_type
var/list/loose_flora = list()
/// Probability of loose flora
var/loose_flora_density = 0
/// If mobs can be spawned on closed_turf tiles
var/spawn_fauna_on_closed = FALSE
var/area/jungleland/this_area = /area/jungleland
/datum/biome/jungleland/New()
. = ..()
this_area = new this_area()
/datum/biome/jungleland/generate_turf(turf/gen_turf,list/density_map)
var/closed = text2num(density_map[cellular_noise_map_id][world.maxx * (gen_turf.y - 1) + gen_turf.x])
var/turf/chosen_turf
if(closed)
chosen_turf = closed_turf
spawn_dense_flora(gen_turf)
else
chosen_turf = turf_type
spawn_loose_flora(gen_turf)
if((!closed || spawn_fauna_on_closed) && length(fauna_types) && prob(fauna_density))
var/mob/fauna = pickweight(fauna_types)
new fauna(gen_turf)
. = gen_turf.ChangeTurf(chosen_turf, initial(chosen_turf.baseturfs), CHANGETURF_DEFER_CHANGE)
/datum/biome/jungleland/proc/spawn_dense_flora(turf/gen_turf)
if(length(dense_flora) && prob(dense_flora_density))
var/obj/structure/flora = pickweight(dense_flora)
new flora(gen_turf)
/datum/biome/jungleland/proc/spawn_loose_flora(turf/gen_turf)
if(length(loose_flora) && prob(loose_flora_density))
var/obj/structure/flora = pickweight(loose_flora)
new flora(gen_turf)
/**
* Tar wastes
*/
/datum/biome/jungleland/tar_wastes
turf_type = /turf/open/floor/plating/dirt/jungleland/obsidian
closed_turf = /turf/open/water/smooth/tar_basin
loose_flora = list(
/obj/structure/flora/rock = 2,
/obj/structure/flora/rock/pile = 2
)
loose_flora_density = 10
fauna_density = 0.5
fauna_types = list(
/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/random = 33,
/mob/living/simple_animal/hostile/asteroid/goliath/beast = 33,
/mob/living/simple_animal/hostile/asteroid/goldgrub = 25,
/mob/living/simple_animal/hostile/asteroid/marrowweaver = 7,
/mob/living/simple_animal/hostile/asteroid/yog_jungle/skin_twister = 1,
)
this_area = /area/jungleland/tar_wastes
/**
* Dry swamp
*/
/datum/biome/jungleland/dry_swamp
turf_type = /turf/open/floor/plating/dirt/jungleland/deep_sand
closed_turf = /turf/open/water/smooth/toxic_pit
cellular_noise_map_id = LOW_DENSITY
dense_flora = list(
/obj/structure/flora/rock/pile = 10,
/obj/structure/flora/rock/jungle = 5,
/obj/structure/flora/rock = 5,
/obj/structure/flora/ausbushes/stalkybush = 5,
/obj/structure/herb/magnus_purpura = 1
)
dense_flora_density = 10
loose_flora = list(
/obj/structure/flora/rock = 20,
/obj/structure/flora/rock/jungle = 20,
/obj/structure/flora/rock/pile = 20,
/obj/structure/flora/stump = 20,
/obj/structure/flora/tree/jungle/small = 10,
/obj/structure/herb/lantern = 2,
/obj/structure/herb/cinchona = 1,
/obj/structure/flytrap = 1
)
loose_flora_density = 10
fauna_types = list(
/mob/living/simple_animal/hostile/asteroid/yog_jungle/emeraldspider = 15,
/mob/living/simple_animal/hostile/asteroid/wasp/mosquito = 15,
/mob/living/simple_animal/hostile/asteroid/yog_jungle/blobby = 10,
/mob/living/simple_animal/hostile/asteroid/yog_jungle/meduracha = 10,
/mob/living/simple_animal/hostile/asteroid/yog_jungle/skin_twister = 1
)
fauna_density = 0.4
spawn_fauna_on_closed = TRUE
this_area = /area/jungleland/dry_swamp
/**
* Toxic pit
*/
/datum/biome/jungleland/toxic_pit
turf_type = /turf/open/floor/plating/dirt/jungleland/shallow_mud
closed_turf = /turf/open/water/smooth/toxic_pit
dense_flora = list(
/obj/structure/flora/ausbushes/stalkybush = 10,
/obj/structure/flora/ausbushes/reedbush = 10,
/obj/structure/herb/magnus_purpura = 1
)
dense_flora_density = 15
loose_flora = list(
/obj/structure/flora/rock/jungle = 30,
/obj/structure/flora/rock = 15,
/obj/structure/flora/ausbushes = 10,
/obj/structure/flora/ausbushes/fernybush = 10,
/obj/structure/herb/liberal_hats = 10,
/obj/structure/flora/tree/jungle/small = 5,
/obj/structure/herb/lantern = 4,
/obj/structure/flytrap = 2,
/obj/structure/herb/explosive_shrooms = 1,
/obj/structure/flora/tree/jungle = 1
)
loose_flora_density = 20
fauna_types = list(
/mob/living/simple_animal/hostile/asteroid/yog_jungle/meduracha = 50,
/mob/living/simple_animal/hostile/asteroid/wasp/mosquito = 40,
/mob/living/simple_animal/hostile/asteroid/yog_jungle/blobby = 25,
/mob/living/simple_animal/hostile/asteroid/yog_jungle/emeraldspider = 2,
/mob/living/simple_animal/hostile/asteroid/yog_jungle/skin_twister = 1
)
fauna_density = 0.7
spawn_fauna_on_closed = TRUE
this_area = /area/jungleland/toxic_pit
/**
* Dying forest
*/
/datum/biome/jungleland/dying_forest
turf_type = /turf/open/floor/plating/dirt/jungleland/deep_sand
closed_turf = /turf/open/floor/plating/dirt/jungleland/shallow_mud
cellular_noise_map_id = LOW_DENSITY
dense_flora = list(
/obj/structure/flora/tree/dead/jungle = 8,
/obj/structure/flora/tree/jungle/small = 4,
/obj/structure/flora/stump=4,
/obj/structure/herb/cinchona = 1
)
dense_flora_density = 90
loose_flora = list(
/obj/structure/flora/rock/jungle = 2,
/obj/structure/flora/rock/pile = 2,
/obj/structure/flora/rock = 1,
)
loose_flora_density = 20
fauna_types = list(
/mob/living/simple_animal/hostile/asteroid/yog_jungle/corrupted_dryad = 60,
/mob/living/simple_animal/hostile/asteroid/goldgrub = 30,
/mob/living/simple_animal/hostile/asteroid/wasp/mosquito = 10,
/mob/living/simple_animal/hostile/asteroid/yog_jungle/skin_twister = 1
)
fauna_density = 0.8
this_area = /area/jungleland/dying_forest
/**
* Jungle
*/
/datum/biome/jungleland/jungle
turf_type = /turf/open/floor/plating/dirt/jungleland/jungle
closed_turf = /turf/open/floor/plating/dirt/jungleland/jungle
cellular_noise_map_id = HIGH_DENSITY
dense_flora = list(
/obj/structure/flora/tree/jungle = 6,
/obj/structure/flora/junglebush/large = 2,
/obj/structure/flora/rock/pile/largejungle = 2,
/obj/structure/flora/junglebush = 1,
/obj/structure/flora/junglebush/b = 1,
/obj/structure/flora/junglebush/c = 1
)
dense_flora_density = 70
loose_flora = list(
/obj/structure/flora/grass/jungle = 60,
/obj/structure/flora/grass/jungle/b = 40,
/obj/structure/flora/ausbushes = 40,
/obj/structure/flora/ausbushes/leafybush = 20,
/obj/structure/flora/ausbushes/sparsegrass = 20,
/obj/structure/flora/ausbushes/fullgrass = 20,
/obj/structure/flora/ausbushes/fernybush = 20,
/obj/structure/herb/lantern = 5,
/obj/structure/herb/fruit = 5,
/obj/structure/flytrap = 2,
/obj/structure/herb/explosive_shrooms = 1
)
loose_flora_density = 60
fauna_types = list(
/mob/living/simple_animal/hostile/asteroid/yog_jungle/dryad = 65,
/mob/living/simple_animal/hostile/asteroid/yog_jungle/emeraldspider = 15,
/mob/living/simple_animal/hostile/asteroid/wasp/mosquito = 10,
/mob/living/simple_animal/hostile/asteroid/wasp/yellowjacket = 10,
/mob/living/simple_animal/hostile/asteroid/yog_jungle/skin_twister = 1,
)
fauna_density = 0.65
this_area = /area/jungleland/proper