|
33 | 33 | return 0.0
|
34 | 34 |
|
35 | 35 |
|
| 36 | + |
| 37 | +var/list/foliage_choices=list( |
| 38 | +/obj/structure/flora/ausbushes, |
| 39 | +/obj/structure/flora/ausbushes/brflowers, |
| 40 | +/obj/structure/flora/ausbushes/fernybush, |
| 41 | +/obj/structure/flora/ausbushes/fullgrass, |
| 42 | +/obj/structure/flora/ausbushes/genericbush, |
| 43 | +/obj/structure/flora/ausbushes/grassybush, |
| 44 | +/obj/structure/flora/ausbushes/lavendergrass, |
| 45 | +/obj/structure/flora/ausbushes/leafybush, |
| 46 | +/obj/structure/flora/ausbushes/palebush, |
| 47 | +/obj/structure/flora/ausbushes/pointybush, |
| 48 | +/obj/structure/flora/ausbushes/ppflowers, |
| 49 | +/obj/structure/flora/ausbushes/reedbush, |
| 50 | +/obj/structure/flora/ausbushes/sparsegrass, |
| 51 | +/obj/structure/flora/ausbushes/stalkybush, |
| 52 | +/obj/structure/flora/ausbushes/sunnybush, |
| 53 | +) |
| 54 | + |
36 | 55 | /turf/unsimulated/floor/jungle/grass
|
37 | 56 | name="Jungle Grass"
|
38 | 57 | desc="A thick and lush carpet of various plant species, sustained by a regular supply to water."
|
39 | 58 | icon = 'icons/turf/floors.dmi'
|
40 | 59 | icon_state = "grass_alt1"
|
41 | 60 | turf_speed_multiplier=1.1 // tall grass.
|
42 | 61 |
|
| 62 | +/turf/unsimulated/floor/jungle/grass/New(var/loc,var/NO_GROW=FALSE) |
| 63 | + ..() |
| 64 | + if(NO_GROW) |
| 65 | + return |
| 66 | + |
| 67 | + if (prob(50)) |
| 68 | + var/plantseed = abs(( sin((x+rand(-2,2))*5.01+213.998) + sin((y+rand(-2,2))*4.56+71.294) )%%1.0) |
| 69 | + plantseed = 1+floor(plantseed*(foliage_choices.len-0.01))//mmm, dumb float math |
| 70 | + |
| 71 | + var/create=foliage_choices[plantseed] |
| 72 | + if(create) |
| 73 | + new create(src) |
| 74 | + turf_speed_multiplier+=0.6 |
| 75 | + else if(prob(20)) //10% overall |
| 76 | + if( !(locate(/obj/structure/flora/tree) in view(1,src)) ) |
| 77 | + new/obj/structure/flora/tree/shitty(src) |
| 78 | + |
| 79 | + |
| 80 | +/turf/unsimulated/floor/jungle/grass/Destroy() |
| 81 | + ..() |
| 82 | + for(var/obj/structure/flora/F in contents) |
| 83 | + qdel(F) |
| 84 | + |
43 | 85 | /turf/unsimulated/floor/jungle/grass/attackby(obj/item/C as obj, mob/user as mob)
|
| 86 | + ..() |
44 | 87 | if(!C || !user)
|
45 | 88 | return 0
|
46 | 89 | var/s=0.0
|
47 | 90 | s=item_terraforming_ispickaxe(C)
|
48 |
| - if(s>0.0) |
| 91 | + if(s>0.0 && !(locate(/obj/structure/flora) in contents)) |
49 | 92 | to_chat(user, "<span class='notice'>You start breaking up the soil</span>")
|
50 | 93 | if(do_after(user, src, 20/s ))
|
51 | 94 | ChangeTurf(/turf/unsimulated/floor/jungle/dirt)
|
|
67 | 110 | ..()
|
68 | 111 | icon_state="grass_alt[rand(1,4)]"
|
69 | 112 |
|
| 113 | +/turf/unsimulated/floor/jungle/grass/no_flora //BYOND... |
| 114 | +/turf/unsimulated/floor/jungle/grass/no_flora/New(var/loc) |
| 115 | + ..(loc,TRUE) |
| 116 | + |
70 | 117 |
|
71 | 118 | /turf/unsimulated/floor/jungle/mud
|
72 | 119 | name="Mud"
|
|
103 | 150 | name="Soil"
|
104 | 151 | desc="A mixture of sediments, clays, and decomposed matter."
|
105 | 152 | icon_state = "ironsand1"
|
106 |
| - var/obj/structure/ladder/hashole=null |
| 153 | + var/obj/structure/ladder/jungle_tunnel/hashole=null |
107 | 154 |
|
108 | 155 | /turf/unsimulated/floor/jungle/dirt/examine()
|
109 | 156 | ..()
|
|
116 | 163 | if(C.type== /obj/item/stack/tile/grass && !hashole)
|
117 | 164 | var/obj/item/stack/tile/T = C
|
118 | 165 | if(T.use(1))
|
119 |
| - ChangeTurf(/turf/unsimulated/floor/jungle/grass) |
| 166 | + ChangeTurf(/turf/unsimulated/floor/jungle/grass/no_flora) |
120 | 167 | var/s=0.0
|
121 | 168 | s=item_terraforming_isshovel(C)
|
122 | 169 | if(s>0.0 && !hashole)
|
|
129 | 176 | if(do_after(user, src, 80/s ))
|
130 | 177 | if(!hashole)
|
131 | 178 | to_chat(usr,"you finish making a hole.")
|
132 |
| - var/obj/structure/ladder/l_surf=new(src) |
133 |
| - var/obj/structure/ladder/l_tunnel=new(locate(x,y,2)) |
| 179 | + var/obj/structure/ladder/jungle_tunnel/l_surf=new(src) |
| 180 | + var/obj/structure/ladder/jungle_tunnel/l_tunnel=new(locate(x,y,2)) |
134 | 181 | l_tunnel.up=l_surf
|
135 | 182 | l_surf.down=l_tunnel
|
136 | 183 | hashole=l_surf
|
|
321 | 368 | desc="A very dense rock. Nothing seems to be able to dig through it."
|
322 | 369 | icon='icons/turf/walls.dmi'
|
323 | 370 | icon_state = "mariahive_noanimation"
|
324 |
| - var/obj/structure/ladder/hashole=null |
| 371 | + var/obj/structure/ladder/jungle_tunnel/hashole=null |
325 | 372 |
|
326 | 373 |
|
327 | 374 | /turf/unsimulated/floor/jungle/bedrock/New(var/loc)
|
328 |
| - if(locate(/obj/structure/ladder) in contents) |
| 375 | + if(locate(/obj/structure/ladder/jungle_tunnel) in contents) |
329 | 376 | icon_state="mariahive_noanimation_l"
|
330 | 377 |
|
331 |
| - var/turf/T=locate(x,y,1) |
332 |
| - if(T && (!istype(T,/turf/unsimulated/floor/jungle) || T.type==/turf/unsimulated/floor/jungle/path_plated || T.type==/turf/unsimulated/floor/jungle/water || T.type==/turf/unsimulated/floor/jungle/water_deep)) |
| 378 | + if(!cannot_dig_up()) |
333 | 379 | icon_state="mariahive_noanimation_d"
|
334 | 380 |
|
335 | 381 | /turf/unsimulated/floor/jungle/bedrock/attackby(obj/item/C as obj, mob/user as mob)
|
|
338 | 384 | var/s=0.0
|
339 | 385 | s=item_terraforming_ispickaxe(C)
|
340 | 386 | if(s>0.0 && !hashole)
|
341 |
| - var/turf/T=locate(x,y,1) //if there's no blockers above us |
342 |
| - if(T && istype(T,/turf/unsimulated/floor/jungle) && T.type!=/turf/unsimulated/floor/jungle/path_plated && T.type!=/turf/unsimulated/floor/jungle/water && T.type!=/turf/unsimulated/floor/jungle/water_deep && T.type!=/turf/unsimulated/floor/jungle/concrete ) |
| 387 | + if(!cannot_dig_up() ) |
343 | 388 | to_chat(usr,"you start digging upwards...")
|
344 | 389 | if(do_after(user, src, 80/s ))
|
345 |
| - T=locate(x,y,1) |
346 |
| - if(!hashole && T && istype(T,/turf/unsimulated/floor/jungle) && T.type!=/turf/unsimulated/floor/jungle/path_plated && T.type!=/turf/unsimulated/floor/jungle/water && T.type!=/turf/unsimulated/floor/jungle/water_deep && T.type!=/turf/unsimulated/floor/jungle/concrete ) |
| 390 | + if(!hashole && !cannot_dig_up() ) |
347 | 391 | to_chat(usr,"you finish making a hole.")
|
348 | 392 | icon_state="mariahive_noanimation_l"
|
349 | 393 |
|
350 |
| - var/obj/structure/ladder/l_tunnel=new(src) |
351 |
| - var/obj/structure/ladder/l_surf=new(locate(x,y,1)) |
| 394 | + var/obj/structure/ladder/jungle_tunnel/l_tunnel=new(src) |
| 395 | + var/obj/structure/ladder/jungle_tunnel/l_surf=new(locate(x,y,1)) |
352 | 396 |
|
353 | 397 | l_tunnel.up=l_surf
|
354 | 398 | l_surf.down=l_tunnel
|
|
362 | 406 | to_chat(usr,"something gets in your way.")
|
363 | 407 | return
|
364 | 408 | else
|
365 |
| - to_chat(usr,"something solid prevents you from tunneling upwards.") |
| 409 | + to_chat(usr,cannot_dig_up() || "something solid prevents you from tunneling upwards.") |
366 | 410 |
|
367 | 411 |
|
368 | 412 | /turf/unsimulated/floor/jungle/bedrock/examine()
|
369 | 413 | ..()
|
370 | 414 | if(icon_state=="mariahive_noanimation_d")
|
371 |
| - to_chat(usr,"it seems that there's something solid above you that you won't be able to dig through.") |
| 415 | + to_chat(usr,cannot_dig_up() || "it seems that there's something solid above you that you won't be able to dig through.") |
372 | 416 | return
|
373 | 417 | if(icon_state=="mariahive_noanimation_l")
|
374 | 418 | to_chat(usr,"there's a hole leading to the surface.")
|
|
381 | 425 | ..()
|
382 | 426 | icon_state="mariahive_noanimation"
|
383 | 427 |
|
384 |
| - if(locate(/obj/structure/ladder) in contents) |
| 428 | + if(locate(/obj/structure/ladder/jungle_tunnel) in contents) |
385 | 429 | icon_state="mariahive_noanimation_l"
|
386 | 430 |
|
387 |
| - var/turf/T=locate(x,y,1) |
388 |
| - if(T && (!istype(T,/turf/unsimulated/floor/jungle) || T.type==/turf/unsimulated/floor/jungle/path_plated || T.type==/turf/unsimulated/floor/jungle/water || T.type==/turf/unsimulated/floor/jungle/water_deep || T.type==/turf/unsimulated/floor/jungle/concrete)) |
| 431 | + if(cannot_dig_up()) |
389 | 432 | icon_state="mariahive_noanimation_d"
|
390 | 433 |
|
391 | 434 | if(recursive) //we reveal the state of surrounding bedrock. there's probably a better way to do this.
|
|
414 | 457 | if(T2 && T2.type==/turf/unsimulated/floor/jungle/bedrock)
|
415 | 458 | T2.Entered(Obj,FALSE)
|
416 | 459 |
|
| 460 | +/turf/unsimulated/floor/jungle/bedrock/proc/cannot_dig_up() |
| 461 | + var/turf/T=locate(x,y,1) |
| 462 | + var/T_T=T.type |
| 463 | + if(!istype(T,/turf/unsimulated/floor/jungle)) |
| 464 | + return "something hard blocks the way." |
| 465 | + if(T_T==/turf/unsimulated/floor/jungle/path_plated) |
| 466 | + return "something hard blocks the way." |
| 467 | + if(T_T==/turf/unsimulated/floor/jungle/water) |
| 468 | + return "something tells you that this is a really bad idea." |
| 469 | + if(T_T==/turf/unsimulated/floor/jungle/water_deep) |
| 470 | + return "something tells you that this is a really bad idea." |
| 471 | + if(T_T==/turf/unsimulated/floor/jungle/concrete) |
| 472 | + return "something hard blocks the way." |
| 473 | + if(locate(/obj/structure/flora/tree) in T.contents) |
| 474 | + return "there's too many roots in the way." |
| 475 | + return null |
417 | 476 |
|
418 | 477 | /turf/unsimulated/floor/jungle/bedrock/ex_act(severity)
|
419 | 478 | return
|
|
0 commit comments