diff --git a/code/game/turfs/flooring/flooring.dm b/code/game/turfs/flooring/flooring.dm index c58cfa65c3a..e676f27fdfe 100644 --- a/code/game/turfs/flooring/flooring.dm +++ b/code/game/turfs/flooring/flooring.dm @@ -115,6 +115,8 @@ var/list/flooring_types var/list/movable_atom_whitelist = list() var/list/movable_atom_blacklist = list() + var/check_season = FALSE //VOREStation Addition + /decl/flooring/proc/get_plating_type(var/turf/T) return plating_type @@ -621,3 +623,10 @@ var/list/flooring_types can_paint = 1 //VOREStation edit. Let's allow for some fun. can_engrave = 1 //VOREStation edit. Fun. flags = TURF_ACID_IMMUNE | TURF_CAN_BREAK | TURF_REMOVE_CROWBAR + +///// Season Time! ///// VOREStation Addition Start +/decl/flooring/grass/seasonal_grass + desc = "It's grass!" + icon = 'icons/seasonal/turf.dmi' + check_season = TRUE + has_base_range = 11 diff --git a/code/game/turfs/flooring/seasonal.dm b/code/game/turfs/flooring/seasonal.dm new file mode 100644 index 00000000000..d5c996530e4 --- /dev/null +++ b/code/game/turfs/flooring/seasonal.dm @@ -0,0 +1,214 @@ +var/world_time_season + +/proc/setup_season() + var/month = text2num(time2text(world.timeofday, "MM")) // get the current month + + switch(month) + if(1 to 2) + world_time_season = "winter" + if(3 to 5) + world_time_season = "spring" + if(6 to 8) + world_time_season = "summer" + if(9 to 11) + world_time_season = "autumn" + if(12) + world_time_season = "winter" + +/turf/simulated/floor/outdoors/grass/seasonal + name = "grass" + icon = 'icons/seasonal/turf.dmi' + icon_state = "s-grass" + + icon_edge = 'icons/seasonal/turf_edge.dmi' + + initial_flooring = /decl/flooring/grass/seasonal_grass +// initial_flooring = null + + grass_types = list() + var/static/list/overlays_cache = list() + var/animal_chance = 0.5 + var/animal_types = list() + var/tree_chance = 5 + var/tree_types = list() + var/snow_chance = 10 + +/turf/simulated/floor/outdoors/grass/seasonal/Initialize() + + switch(world_time_season) + if("spring") + tree_types = list( + /obj/structure/flora/tree/bigtree, + /obj/structure/flora/tree/jungle_small, + /obj/structure/flora/tree/jungle + ) + animal_types = list( + /mob/living/simple_mob/vore/alienanimals/teppi = 10, + /mob/living/simple_mob/vore/alienanimals/teppi/mutant = 1, + /mob/living/simple_mob/vore/redpanda = 40, + /mob/living/simple_mob/vore/redpanda/fae = 2, + /mob/living/simple_mob/vore/sheep = 20, + /mob/living/simple_mob/vore/rabbit/black = 20, + /mob/living/simple_mob/vore/rabbit/white = 20, + /mob/living/simple_mob/vore/rabbit/brown = 20, + /mob/living/simple_mob/vore/leopardmander = 2, + /mob/living/simple_mob/vore/horse/big = 10, + /mob/living/simple_mob/vore/bigdragon/friendly = 1, + /mob/living/simple_mob/vore/alienanimals/dustjumper = 20 + ) + grass_types = list( + /obj/structure/flora/ausbushes/sparsegrass, + /obj/structure/flora/ausbushes/fullgrass, + /obj/structure/flora/ausbushes/brflowers, + /obj/structure/flora/ausbushes/genericbush, + /obj/structure/flora/ausbushes/lavendergrass, + /obj/structure/flora/ausbushes/leafybush, + /obj/structure/flora/ausbushes/ppflowers, + /obj/structure/flora/ausbushes/sunnybush, + /obj/structure/flora/ausbushes/ywflowers, + /obj/structure/flora/mushroom + ) + + grass_chance = 30 + if("summer") + tree_types = list( + /obj/structure/flora/tree/bigtree, + /obj/structure/flora/tree/jungle_small, + /obj/structure/flora/tree/jungle + ) + animal_types = list( + /mob/living/simple_mob/vore/alienanimals/teppi = 10, + /mob/living/simple_mob/vore/alienanimals/teppi/mutant = 1, + /mob/living/simple_mob/vore/redpanda = 40, + /mob/living/simple_mob/vore/redpanda/fae = 2, + /mob/living/simple_mob/vore/sheep = 20, + /mob/living/simple_mob/vore/rabbit/black = 20, + /mob/living/simple_mob/vore/rabbit/white = 20, + /mob/living/simple_mob/vore/rabbit/brown = 20, + /mob/living/simple_mob/vore/leopardmander = 2, + /mob/living/simple_mob/vore/horse/big = 10, + /mob/living/simple_mob/vore/bigdragon/friendly = 1, + /mob/living/simple_mob/vore/alienanimals/dustjumper = 20 + ) + grass_types = list( + /obj/structure/flora/ausbushes/sparsegrass, + /obj/structure/flora/ausbushes/fullgrass + ) + + if("autumn") + tree_types = list( + /obj/structure/flora/tree/bigtree + ) + + animal_types = list( + /mob/living/simple_mob/vore/alienanimals/teppi = 10, + /mob/living/simple_mob/vore/alienanimals/teppi/mutant = 1, + /mob/living/simple_mob/vore/redpanda = 40, + /mob/living/simple_mob/vore/redpanda/fae = 2, + /mob/living/simple_mob/vore/sheep = 20, + /mob/living/simple_mob/vore/rabbit/black = 20, + /mob/living/simple_mob/vore/rabbit/white = 20, + /mob/living/simple_mob/vore/rabbit/brown = 20, + /mob/living/simple_mob/vore/horse/big = 10, + /mob/living/simple_mob/vore/alienanimals/dustjumper = 20 + ) + grass_types = list( + /obj/structure/flora/ausbushes/sparsegrass, + /obj/structure/flora/pumpkin, + /obj/structure/flora/ausbushes + ) + + grass_chance = 10 + animal_chance = 0.25 + if("winter") + grass_chance = 0 + tree_types = list( + /obj/structure/flora/tree/dead, + /obj/structure/flora/tree/pine + ) + + animal_types = list( + /mob/living/simple_mob/vore/rabbit/white = 40, + /mob/living/simple_mob/vore/alienanimals/teppi = 10, + /mob/living/simple_mob/vore/alienanimals/teppi/mutant = 1, + /mob/living/simple_mob/vore/redpanda = 10 + ) + if(prob(snow_chance)) + chill() + return + + grass_types = list( + /obj/structure/flora/grass/both, + /obj/structure/flora/grass/brown, + /obj/structure/flora/grass/green, + /obj/structure/flora/bush + ) + + grass_chance = 1 + animal_chance = 0.1 + + + if(tree_chance && prob(tree_chance) && !check_density()) + var/tree_type = pickweight(tree_types) + new tree_type(src) + + + if(animal_chance && prob(animal_chance) && !check_density()) + var/animal_type = pickweight(animal_types) + new animal_type(src) + + + . = ..() + +/turf/simulated/floor/outdoors/grass/seasonal/proc/update_desc() + + switch(world_time_season) + if("spring") + desc = "Lush green grass, flourishing! Little flowers peek out from between the blades here and there!" + if("summer") + desc = "Bright green grass, a little dry in the summer heat!" + if("autumn") + desc = "Golden grass, it's a little crunchy as it prepares for winter!" + if("winter") + desc = "Dry, seemingly dead grass! It's too cold for the grass..." + + +/turf/simulated/floor/outdoors/grass/seasonal/update_icon(update_neighbors) + . = ..() + update_desc() + switch(world_time_season) + if("spring") + if(prob(50)) + var/cache_key = "[world_time_season]-overlay[rand(1,19)]" + if(!overlays_cache[cache_key]) + var/image/I = image(icon = src.icon, icon_state = cache_key, layer = ABOVE_TURF_LAYER) // Icon should be abstracted out + I.plane = TURF_PLANE + overlays_cache[cache_key] = I + add_overlay(overlays_cache[cache_key]) + if("summer") + return + if("autumn") + if(prob(33)) + var/cache_key = "[world_time_season]-overlay[rand(1,6)]" + if(!overlays_cache[cache_key]) + var/image/I = image(icon = src.icon, icon_state = cache_key, layer = ABOVE_TURF_LAYER) // Icon should be abstracted out + I.plane = TURF_PLANE + overlays_cache[cache_key] = I + add_overlay(overlays_cache[cache_key]) + + if("winter") + return + +/turf/simulated/floor/outdoors/grass/seasonal/no_trees + tree_chance = 0 +/turf/simulated/floor/outdoors/grass/seasonal/no_mobs + animal_chance = 0 +/turf/simulated/floor/outdoors/grass/seasonal/no_trees_or_mobs + tree_chance = 0 + animal_chance = 0 +/turf/simulated/floor/outdoors/grass/seasonal/no_trees_or_mobs_or_snow + tree_chance = 0 + animal_chance = 0 + snow_chance = 0 +/turf/simulated/floor/outdoors/grass/seasonal/low_snow + snow_chance = 1 diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index a220d5a7a44..e7293865e3f 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -18,6 +18,8 @@ var/dirt = 0 var/special_temperature //Used for turf HE-Pipe interaction + var/icon_edge = 'icons/turf/outdoors_edge.dmi' //VOREStation Addition - Allows for alternative edge icon files + // This is not great. /turf/simulated/proc/wet_floor(var/wet_val = 1) if(wet > 2) //Can't mop up ice diff --git a/code/game/turfs/simulated/floor_icon.dm b/code/game/turfs/simulated/floor_icon.dm index 82153557a88..b1ab0fb2cbe 100644 --- a/code/game/turfs/simulated/floor_icon.dm +++ b/code/game/turfs/simulated/floor_icon.dm @@ -23,6 +23,9 @@ var/image/no_ceiling_image = null icon_state = flooring_override else icon_state = flooring.icon_base + //VOREStation Addition Start + if(flooring.check_season) + icon_state = "[icon_state]-[world_time_season]" //VOREStation Addition End if(flooring.has_base_range) icon_state = "[icon_state][rand(0,flooring.has_base_range)]" flooring_override = icon_state @@ -107,11 +110,11 @@ var/image/no_ceiling_image = null // Has to have it's own edge_blending_priority // Has to have a higher priority than us // Their icon_state is not our icon_state - // They don't forbid_turf_edge + // They don't forbid_turf_edge if(istype(T) && T.edge_blending_priority && edge_blending_priority < T.edge_blending_priority && icon_state != T.icon_state && !T.forbid_turf_edge()) var/cache_key = "[T.get_edge_icon_state()]-[checkdir]" // Usually [icon_state]-[dirnum] if(!turf_edge_cache[cache_key]) - var/image/I = image(icon = 'icons/turf/outdoors_edge.dmi', icon_state = "[T.get_edge_icon_state()]-edge", dir = checkdir, layer = ABOVE_TURF_LAYER) // Icon should be abstracted out + var/image/I = image(icon = T.icon_edge, icon_state = "[T.get_edge_icon_state()]-edge", dir = checkdir, layer = ABOVE_TURF_LAYER) // VOREStation Edit - icon_edge I.plane = TURF_PLANE turf_edge_cache[cache_key] = I add_overlay(turf_edge_cache[cache_key]) @@ -282,4 +285,3 @@ var/image/no_ceiling_image = null I.layer = layer flooring_cache[cache_key] = I return flooring_cache[cache_key] - diff --git a/code/game/world.dm b/code/game/world.dm index 01416b57ba8..a6cbb733856 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -39,6 +39,7 @@ //end-emergency fix src.update_status() + setup_season() //VOREStation Addition . = ..() @@ -741,4 +742,4 @@ var/global/game_id = null for(var/_ = 1 to 3) game_id = "[c[(t % l) + 1]][game_id]" t = round(t / l) - return 1 \ No newline at end of file + return 1 diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index d269d8901ed..6f22e803a17 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -647,7 +647,8 @@ stat(null, "Time Dilation: [round(SStime_track.time_dilation_current,1)]% AVG:([round(SStime_track.time_dilation_avg_fast,1)]%, [round(SStime_track.time_dilation_avg,1)]%, [round(SStime_track.time_dilation_avg_slow,1)]%)") if(ticker && ticker.current_state != GAME_STATE_PREGAME) stat("Station Time", stationtime2text()) - stat("Station Date", stationdate2text()) + var/date = "[stationdate2text()], [capitalize(world_time_season)]" + stat("Station Date", date) stat("Round Duration", roundduration2text()) if(client.holder) diff --git a/icons/seasonal/turf.dmi b/icons/seasonal/turf.dmi new file mode 100644 index 00000000000..a421e380949 Binary files /dev/null and b/icons/seasonal/turf.dmi differ diff --git a/icons/seasonal/turf_edge.dmi b/icons/seasonal/turf_edge.dmi new file mode 100644 index 00000000000..a8588dc467c Binary files /dev/null and b/icons/seasonal/turf_edge.dmi differ diff --git a/vorestation.dme b/vorestation.dme index 0a727dba962..71a810fbdcc 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1613,6 +1613,7 @@ #include "code\game\turfs\flooring\flooring_decals_vr.dm" #include "code\game\turfs\flooring\flooring_premade.dm" #include "code\game\turfs\flooring\flooring_vr.dm" +#include "code\game\turfs\flooring\seasonal.dm" #include "code\game\turfs\flooring\shuttle_vr.dm" #include "code\game\turfs\initialization\init.dm" #include "code\game\turfs\initialization\maintenance.dm"