mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 07:59:01 +01:00
Adds interactions for exoplanet foliage and terrain (#17079)
* im gay * Update code/modules/overmap/exoplanets/decor/_turfs.dm Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com> --------- Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com> Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
This commit is contained in:
co-authored by
SleepyGemmy
Fluffy
parent
6867499973
commit
82544e7216
@@ -18,9 +18,9 @@
|
||||
/obj/structure/flora/bush/jungle/c/random = 3
|
||||
),
|
||||
GRASSES = list(
|
||||
/obj/effect/floor_decal/junglegrass/random = 4,
|
||||
/obj/effect/floor_decal/junglegrass/dense/random = 2,
|
||||
/obj/effect/floor_decal/junglegrass/rocky/random = 1
|
||||
/obj/structure/flora/grass/junglegrass/random = 4,
|
||||
/obj/structure/flora/grass/junglegrass/dense/random = 2,
|
||||
/obj/structure/flora/grass/junglegrass/rocky/random = 1
|
||||
),
|
||||
WILDLIFE = list(
|
||||
/mob/living/simple_animal/yithian = 1,
|
||||
@@ -43,9 +43,9 @@
|
||||
/obj/structure/flora/bush/jungle/c/random = 3
|
||||
),
|
||||
GRASSES = list(
|
||||
/obj/effect/floor_decal/junglegrass/random = 4,
|
||||
/obj/effect/floor_decal/junglegrass/dense/random = 2,
|
||||
/obj/effect/floor_decal/junglegrass/rocky/random = 1
|
||||
/obj/structure/flora/grass/junglegrass/random = 4,
|
||||
/obj/structure/flora/grass/junglegrass/dense/random = 2,
|
||||
/obj/structure/flora/grass/junglegrass/rocky/random = 1
|
||||
),
|
||||
WILDLIFE = list(
|
||||
/mob/living/simple_animal/yithian = 1,
|
||||
|
||||
@@ -43,6 +43,14 @@
|
||||
if(T.use(1))
|
||||
playsound(src, 'sound/items/Deconstruct.ogg', 80, 1)
|
||||
ChangeTurf(/turf/simulated/floor, FALSE, FALSE, FALSE, TRUE)
|
||||
else if(diggable && istype(C,/obj/item/material/minihoe))
|
||||
visible_message(SPAN_NOTICE("\The [user] starts clearing \the [src]"))
|
||||
if(C.use_tool(src, user, 50, volume = 50))
|
||||
to_chat(user, SPAN_NOTICE("You make a small clearing."))
|
||||
new /obj/structure/clearing(src)
|
||||
diggable = FALSE
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("You stop shoveling."))
|
||||
|
||||
/turf/simulated/floor/exoplanet/ex_act(severity)
|
||||
switch(severity)
|
||||
|
||||
@@ -1,3 +1,34 @@
|
||||
/obj/structure/flora/bush
|
||||
name = "bush"
|
||||
desc = "A bush."
|
||||
icon = 'icons/obj/flora/snowflora.dmi'
|
||||
icon_state = "snowbush1"
|
||||
density = FALSE
|
||||
|
||||
/obj/structure/flora/bush/Initialize()
|
||||
. = ..()
|
||||
icon_state = "snowbush[rand(1, 6)]"
|
||||
|
||||
/obj/structure/flora/bush/attackby(var/obj/item/W, var/mob/user)
|
||||
if(istype(W, /obj/item/material/scythe))
|
||||
shake_animation()
|
||||
if(W.use_tool(src, user, 50, volume = 50))
|
||||
if(prob(50))
|
||||
new /obj/item/stack/material/wood(get_turf(src), 2)
|
||||
if(prob(40))
|
||||
new /obj/item/stack/material/wood(get_turf(src), 4)
|
||||
if(prob(10))
|
||||
var/pickberry = pick(list(/obj/item/seeds/berryseed, /obj/item/seeds/blueberryseed))
|
||||
new /obj/item/stack/material/wood(get_turf(src), 4)
|
||||
new pickberry(get_turf(src), 4)
|
||||
to_chat(user, SPAN_NOTICE("You find some seeds as you hack the bush away."))
|
||||
to_chat(user, SPAN_NOTICE("You slice at the bush!"))
|
||||
qdel(src)
|
||||
else if(istype(W, /obj/item/material/hatchet))
|
||||
shake_animation()
|
||||
if(W.use_tool(src, user, 50, volume = 50))
|
||||
to_chat(user, SPAN_NOTICE("You chop at the bush!"))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/flora/ausbushes
|
||||
name = "bush"
|
||||
@@ -9,22 +40,3 @@
|
||||
/obj/structure/flora/ausbushes/New()
|
||||
..()
|
||||
icon_state = "firstbush_[rand(1, 4)]"
|
||||
|
||||
/obj/structure/flora/ausbushes/attackby(var/obj/item/W, var/mob/user)
|
||||
if(istype(W, /obj/item/material/scythe))
|
||||
if(prob(50))
|
||||
new /obj/item/stack/material/wood(get_turf(src), 2)
|
||||
if(prob(40))
|
||||
new /obj/item/stack/material/wood(get_turf(src), 4)
|
||||
if(prob(10))
|
||||
var/pickberry = pick(list(/obj/item/seeds/berryseed, /obj/item/seeds/blueberryseed))
|
||||
new /obj/item/stack/material/wood(get_turf(src), 4)
|
||||
new pickberry(get_turf(src), 4)
|
||||
to_chat(user, SPAN_NOTICE("You find some seeds as you hack the bush away."))
|
||||
to_chat(user, SPAN_NOTICE("You slice at the bush!"))
|
||||
qdel(src)
|
||||
playsound(src, 'sound/effects/woodcutting.ogg', 50, TRUE)
|
||||
if(istype(W, /obj/item/material/hatchet)) // No items.
|
||||
to_chat(user, SPAN_NOTICE("You chop at the bush!"))
|
||||
qdel(src)
|
||||
playsound(src, 'sound/effects/woodcutting.ogg', 50, TRUE)
|
||||
|
||||
@@ -1,23 +1,24 @@
|
||||
/obj/effect/floor_decal/junglegrass
|
||||
/obj/structure/flora/grass/junglegrass
|
||||
name = "jungle grass"
|
||||
icon = 'icons/obj/flora/jungleflora.dmi'
|
||||
icon_state = "grassb"
|
||||
density = FALSE
|
||||
|
||||
/obj/effect/floor_decal/junglegrass/random/Initialize(mapload, newdir, newcolour, bypass, set_icon_state)
|
||||
/obj/structure/flora/grass/junglegrass/random/Initialize(mapload, newdir, newcolour, bypass, set_icon_state)
|
||||
icon_state = "grassb[rand(1,5)]"
|
||||
. = ..()
|
||||
|
||||
/obj/effect/floor_decal/junglegrass/dense
|
||||
/obj/structure/flora/grass/junglegrass/dense
|
||||
icon_state = "grassa"
|
||||
|
||||
/obj/effect/floor_decal/junglegrass/dense/random/Initialize(mapload, newdir, newcolour, bypass, set_icon_state)
|
||||
/obj/structure/flora/grass/junglegrass/dense/random/Initialize(mapload, newdir, newcolour, bypass, set_icon_state)
|
||||
icon_state = "grassa[rand(1,5)]"
|
||||
. = ..()
|
||||
|
||||
/obj/effect/floor_decal/junglegrass/rocky
|
||||
/obj/structure/flora/grass/junglegrass/rocky
|
||||
icon_state = "rock"
|
||||
|
||||
/obj/effect/floor_decal/junglegrass/rocky/random/Initialize(mapload, newdir, newcolour, bypass, set_icon_state)
|
||||
/obj/structure/flora/grass/junglegrass/rocky/random/Initialize(mapload, newdir, newcolour, bypass, set_icon_state)
|
||||
icon_state = "rock[rand(1,5)]"
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -5,6 +5,18 @@
|
||||
icon = 'icons/obj/flora/snowflora.dmi'
|
||||
density = FALSE
|
||||
|
||||
/obj/structure/flora/grass/attackby(var/obj/item/W, var/mob/user)
|
||||
if(istype(W, /obj/item/material/scythe))
|
||||
shake_animation()
|
||||
if(W.use_tool(src, user, 10, volume = 50))
|
||||
to_chat(user, SPAN_NOTICE("You slice the grass away with the scythe!"))
|
||||
qdel(src)
|
||||
else if(istype(W, /obj/item/material/hatchet))
|
||||
shake_animation()
|
||||
if(W.use_tool(src, user, 50, volume = 50))
|
||||
to_chat(user, SPAN_NOTICE("You chop at the grass!"))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/flora/grass/brown
|
||||
icon_state = "snowgrass1bb"
|
||||
|
||||
@@ -25,15 +37,3 @@
|
||||
/obj/structure/flora/grass/both/New()
|
||||
..()
|
||||
icon_state = "snowgrassall[rand(1, 3)]"
|
||||
|
||||
// Bushes
|
||||
/obj/structure/flora/bush
|
||||
name = "bush"
|
||||
desc = "A bush."
|
||||
icon = 'icons/obj/flora/snowflora.dmi'
|
||||
icon_state = "snowbush1"
|
||||
density = FALSE
|
||||
|
||||
/obj/structure/flora/bush/Initialize()
|
||||
. = ..()
|
||||
icon_state = "snowbush[rand(1, 6)]"
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/obj/structure/clearing
|
||||
name = "clearing"
|
||||
desc = "A small clearing from surrounding terrain or foliage."
|
||||
icon = 'icons/obj/flora/clearing.dmi'
|
||||
icon_state = "smooth"
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
smooth = SMOOTH_MORE
|
||||
canSmoothWith = list(
|
||||
/obj/structure/clearing,
|
||||
/obj/structure/lattice/catwalk,
|
||||
/obj/structure/lattice/catwalk/indoor,
|
||||
/turf/simulated/floor/concrete,
|
||||
/turf/simulated/floor/plating,
|
||||
/turf/simulated/floor/tiled,
|
||||
/turf/simulated/floor/wood,
|
||||
/turf/simulated/wall
|
||||
)
|
||||
|
||||
/obj/structure/clearing/attackby(obj/item/W, mob/user)
|
||||
if(istype(W,/obj/item/material/minihoe))
|
||||
visible_message(SPAN_NOTICE("\The [user] starts adjusting the \the [src]"))
|
||||
if(W.use_tool(src, user, 50, volume = 50))
|
||||
visible_message(SPAN_NOTICE("\The [user] adjusts \the [src]!"))
|
||||
qdel(src)
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("You stop adjusting the terrain."))
|
||||
return
|
||||
|
||||
/obj/structure/clearing/update_icon()
|
||||
if(istype(loc,/turf/simulated/floor/exoplanet))
|
||||
var/turf/simulated/floor/exoplanet/E = loc
|
||||
if(E.dirt_color)
|
||||
color = E.dirt_color
|
||||
Reference in New Issue
Block a user