diff --git a/code/__DEFINES/icon_smoothing.dm b/code/__DEFINES/icon_smoothing.dm index ea7d4ae8056..5e903e50669 100644 --- a/code/__DEFINES/icon_smoothing.dm +++ b/code/__DEFINES/icon_smoothing.dm @@ -29,10 +29,11 @@ #define SMOOTH_GROUP_OPEN_FLOOR S_TURF(4) ///turf/open/floor -#define SMOOTH_GROUP_FLOOR_ASH S_TURF(5) ///turf/open/floor/plating/ashplanet/ash -#define SMOOTH_GROUP_FLOOR_ASH_ROCKY S_TURF(6) ///turf/open/floor/plating/ashplanet/rocky -#define SMOOTH_GROUP_FLOOR_ICE S_TURF(7) ///turf/open/floor/plating/ice -#define SMOOTH_GROUP_FLOOR_SNOWED S_TURF(8) ///turf/open/floor/plating/snowed +#define SMOOTH_GROUP_FLOOR_GRASS S_TURF(5) ///turf/open/floor/plating/grass +#define SMOOTH_GROUP_FLOOR_ASH S_TURF(6) ///turf/open/floor/plating/ashplanet/ash +#define SMOOTH_GROUP_FLOOR_ASH_ROCKY S_TURF(7) ///turf/open/floor/plating/ashplanet/rocky +#define SMOOTH_GROUP_FLOOR_ICE S_TURF(8) ///turf/open/floor/plating/ice +#define SMOOTH_GROUP_FLOOR_SNOWED S_TURF(9) ///turf/open/floor/plating/snowed #define SMOOTH_GROUP_CARPET S_TURF(10) ///turf/open/floor/carpet #define SMOOTH_GROUP_CARPET_BLACK S_TURF(11) ///turf/open/floor/carpet/black diff --git a/code/game/turfs/open/floor/fancy_floor.dm b/code/game/turfs/open/floor/fancy_floor.dm index 72d042a8881..71e60586287 100644 --- a/code/game/turfs/open/floor/fancy_floor.dm +++ b/code/game/turfs/open/floor/fancy_floor.dm @@ -69,7 +69,7 @@ /turf/open/floor/grass name = "grass patch" desc = "You can't tell if this is real grass or just cheap plastic imitation." - icon_state = "grass" + icon_state = "grass0" floor_tile = /obj/item/stack/tile/grass broken_states = list("sand") flags_1 = NONE @@ -84,7 +84,10 @@ /turf/open/floor/grass/Initialize() . = ..() - update_icon() + spawniconchange() + +/turf/open/floor/grass/proc/spawniconchange() + icon_state = "grass[rand(0,3)]" /turf/open/floor/grass/attackby(obj/item/C, mob/user, params) if((C.tool_behaviour == TOOL_SHOVEL) && params) @@ -98,12 +101,15 @@ /turf/open/floor/grass/fairy //like grass but fae-er name = "fairygrass patch" desc = "Something about this grass makes you want to frolic. Or get high." - icon_state = "fairygrass" + icon_state = "fairygrass0" floor_tile = /obj/item/stack/tile/fairygrass light_range = 2 light_power = 0.80 light_color = COLOR_BLUE_LIGHT +/turf/open/floor/grass/fairy/spawniconchange() + icon_state = "fairygrass[rand(0,3)]" + /turf/open/floor/grass/snow gender = PLURAL name = "snow" @@ -122,6 +128,9 @@ clawfootstep = FOOTSTEP_SAND heavyfootstep = FOOTSTEP_GENERIC_HEAVY +/turf/open/floor/grass/snow/spawniconchange() + return + /turf/open/floor/grass/snow/try_replace_tile(obj/item/stack/tile/T, mob/user, params) return @@ -137,8 +146,7 @@ initial_gas_mix = OPENTURF_LOW_PRESSURE slowdown = 0 -/turf/open/floor/grass/snow/basalt/Initialize() - . = ..() +/turf/open/floor/grass/snow/basalt/spawniconchange() if(prob(15)) icon_state = "basalt[rand(0, 12)]" set_basalt_light(src) @@ -162,13 +170,11 @@ clawfootstep = FOOTSTEP_SAND heavyfootstep = FOOTSTEP_GENERIC_HEAVY -/turf/open/floor/grass/fakebasalt/Initialize() - . = ..() +/turf/open/floor/grass/fakebasalt/spawniconchange() if(prob(15)) icon_state = "basalt[rand(0, 12)]" set_basalt_light(src) - /turf/open/floor/carpet name = "carpet" desc = "Soft velvet carpeting. Feels good between your toes." diff --git a/code/game/turfs/open/floor/plating/misc_plating.dm b/code/game/turfs/open/floor/plating/misc_plating.dm index b4cd7b5b823..4b2c02c5a11 100644 --- a/code/game/turfs/open/floor/plating/misc_plating.dm +++ b/code/game/turfs/open/floor/plating/misc_plating.dm @@ -271,13 +271,37 @@ /turf/open/floor/plating/grass name = "grass" desc = "A patch of grass." - icon_state = "grass" - broken_states = list("sand") + icon_state = "grass0" bullet_bounce_sound = null footstep = FOOTSTEP_GRASS barefootstep = FOOTSTEP_GRASS clawfootstep = FOOTSTEP_GRASS heavyfootstep = FOOTSTEP_GENERIC_HEAVY + smoothing_flags = SMOOTH_CORNERS + smoothing_groups = list(SMOOTH_GROUP_TURF_OPEN,SMOOTH_GROUP_FLOOR_GRASS) + canSmoothWith = list(SMOOTH_GROUP_CLOSED_TURFS,SMOOTH_GROUP_FLOOR_GRASS) + layer = HIGH_TURF_LAYER + var/smooth_icon = 'icons/turf/floors/grass.dmi' + +/turf/open/floor/plating/grass/Initialize() + . = ..() + if(smoothing_flags) + var/matrix/translation = new + translation.Translate(-9, -9) + transform = translation + icon = smooth_icon /turf/open/floor/plating/grass/lavaland initial_gas_mix = LAVALAND_DEFAULT_ATMOS + +/turf/open/floor/plating/sandy_dirt + gender = PLURAL + name = "dirt" + desc = "Upon closer examination, it's still dirt." + icon_state = "sand" + bullet_bounce_sound = null + footstep = FOOTSTEP_SAND + barefootstep = FOOTSTEP_SAND + clawfootstep = FOOTSTEP_SAND + heavyfootstep = FOOTSTEP_GENERIC_HEAVY + tiled_dirt = FALSE diff --git a/code/game/turfs/open/floor/plating/planet.dm b/code/game/turfs/open/floor/plating/planet.dm index 9f6c54a029f..e23f0979f47 100644 --- a/code/game/turfs/open/floor/plating/planet.dm +++ b/code/game/turfs/open/floor/plating/planet.dm @@ -45,12 +45,8 @@ initial_gas_mix = OPENTURF_DEFAULT_ATMOS planetary_atmos = TRUE desc = "Greener on the other side." - icon = 'icons/turf/floors.dmi' icon_state = "junglegrass" - -/turf/open/floor/plating/grass/jungle/Initialize() - .=..() - icon_state = "[initial(icon_state)][rand(1,3)]" + smooth_icon = 'icons/turf/floors/junglegrass.dmi' /turf/closed/mineral/random/jungle mineralSpawnChanceList = list(/obj/item/stack/ore/uranium = 5, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 10, diff --git a/code/modules/holodeck/turfs.dm b/code/modules/holodeck/turfs.dm index 6734f14d993..dd57d6d85a1 100644 --- a/code/modules/holodeck/turfs.dm +++ b/code/modules/holodeck/turfs.dm @@ -26,10 +26,14 @@ /turf/open/floor/holofloor/grass gender = PLURAL name = "lush grass" - icon_state = "grass" + icon_state = "grass0" bullet_bounce_sound = null tiled_dirt = FALSE +/turf/open/floor/holofloor/grass/Initialize() + . = ..() + icon_state = "grass[rand(0,3)]" + /turf/open/floor/holofloor/beach gender = PLURAL name = "sand" diff --git a/icons/obj/tiles.dmi b/icons/obj/tiles.dmi index 1b15dcd4f5d..8e012cfa944 100644 Binary files a/icons/obj/tiles.dmi and b/icons/obj/tiles.dmi differ diff --git a/icons/turf/floors.dmi b/icons/turf/floors.dmi index 8e16539f601..8200622ca3a 100644 Binary files a/icons/turf/floors.dmi and b/icons/turf/floors.dmi differ diff --git a/icons/turf/floors/grass.dmi b/icons/turf/floors/grass.dmi new file mode 100644 index 00000000000..994c4667e6f Binary files /dev/null and b/icons/turf/floors/grass.dmi differ diff --git a/icons/turf/floors/junglegrass.dmi b/icons/turf/floors/junglegrass.dmi new file mode 100644 index 00000000000..e7d93403e1c Binary files /dev/null and b/icons/turf/floors/junglegrass.dmi differ