mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 12:29:23 +01:00
Exoplanet Random Plants (#17967)
* icons * and now, we suffer * i keep screaming but god wont answer * adapt seed * Update code/modules/hydroponics/trays/tray_update_icons.dm Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it> * Update code/modules/hydroponics/trays/tray_update_icons.dm Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it> * Update code/modules/hydroponics/trays/tray_update_icons.dm Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it> * Update code/modules/hydroponics/trays/tray_update_icons.dm Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it> * addresses requested changes --------- Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it>
This commit is contained in:
@@ -2790,6 +2790,7 @@
|
||||
#include "code\modules\overmap\contacts\tracker.dm"
|
||||
#include "code\modules\overmap\events\event.dm"
|
||||
#include "code\modules\overmap\exoplanets\exoplanet.dm"
|
||||
#include "code\modules\overmap\exoplanets\exoplanet_flora.dm"
|
||||
#include "code\modules\overmap\exoplanets\exoplanet_skybox.dm"
|
||||
#include "code\modules\overmap\exoplanets\_defines\planetgen.dm"
|
||||
#include "code\modules\overmap\exoplanets\biomes\_biome.dm"
|
||||
|
||||
@@ -9,6 +9,11 @@
|
||||
#define SEED_NOUN_SEEDS "seeds"
|
||||
#define SEED_NOUN_EGGS "eggs"
|
||||
|
||||
#define GROWTH_WORMS "worms"
|
||||
#define GROWTH_VINES "vines"
|
||||
#define GROWTH_BIOMASS "biomass"
|
||||
#define GROWTH_MOLD "mold"
|
||||
|
||||
// Definitions for genes (trait groupings)
|
||||
#define GENE_BIOCHEMISTRY "biochemistry"
|
||||
#define GENE_HARDINESS "hardiness"
|
||||
@@ -67,3 +72,5 @@
|
||||
#define TRAIT_FLESH_COLOUR 39
|
||||
#define TRAIT_SPOROUS 40
|
||||
#define TRAIT_BIOLUM_PWR 41
|
||||
#define TRAIT_LARGE 42
|
||||
#define TRAIT_LEAVES_COLOUR 43
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
but natives aren't known to treat settlements kindly."
|
||||
skybox_icon = "badlands"
|
||||
sector_welcome_message = 'sound/AI/welcome_badlands.ogg'
|
||||
possible_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid, /obj/effect/overmap/visitable/sector/exoplanet/grass/grove, /obj/effect/overmap/visitable/sector/exoplanet/barren, /obj/effect/overmap/visitable/sector/exoplanet/lava, /obj/effect/overmap/visitable/sector/exoplanet/desert)
|
||||
possible_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid, /obj/effect/overmap/visitable/sector/exoplanet/grass/grove, /obj/effect/overmap/visitable/sector/exoplanet/barren, /obj/effect/overmap/visitable/sector/exoplanet/lava, /obj/effect/overmap/visitable/sector/exoplanet/desert, /obj/effect/overmap/visitable/sector/exoplanet/snow)
|
||||
starlight_color = "#b13636"
|
||||
starlight_power = 2
|
||||
starlight_range = 4
|
||||
@@ -16,7 +16,7 @@
|
||||
amount of old, dying stars and impassable nebulae. Due to close proximity to patrols on either end of this space, it isn't frequented much by criminal elements and is one of the \
|
||||
safer parts of the known Frontier. After 2462, the Republic of Elyra has occupied the majority of Valley Hale, now bordering the Republic of Biesel."
|
||||
skybox_icon = "valley_hale"
|
||||
possible_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid, /obj/effect/overmap/visitable/sector/exoplanet/grass/grove, /obj/effect/overmap/visitable/sector/exoplanet/barren, /obj/effect/overmap/visitable/sector/exoplanet/lava, /obj/effect/overmap/visitable/sector/exoplanet/desert)
|
||||
possible_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid, /obj/effect/overmap/visitable/sector/exoplanet/grass/grove, /obj/effect/overmap/visitable/sector/exoplanet/barren, /obj/effect/overmap/visitable/sector/exoplanet/lava, /obj/effect/overmap/visitable/sector/exoplanet/desert, /obj/effect/overmap/visitable/sector/exoplanet/snow)
|
||||
starlight_color = "#e68831"
|
||||
starlight_power = 2
|
||||
starlight_range = 4
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = SECTOR_COALITION
|
||||
description = "The Coalition of Colonies is an independent, space-faring nation formed of once-Solarian colonies residing in the frontier. Population estimates range from 85 to 110 billion, with an accurate census being nearly impossible due to the decentralized government of the Coalition. Founded in a revolt against the governance of the Association of Sovereign Solarian Nations, or the Sol Alliance, it won its independence in the prolonged Interstellar War. The Coalition is one of the most diverse entities in known space culturally, socially, and politically."
|
||||
skybox_icon = "weeping_stars"//the region that covers most of the coalition, presumably
|
||||
possible_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid, /obj/effect/overmap/visitable/sector/exoplanet/grass/grove, /obj/effect/overmap/visitable/sector/exoplanet/barren, /obj/effect/overmap/visitable/sector/exoplanet/lava, /obj/effect/overmap/visitable/sector/exoplanet/desert)
|
||||
possible_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid, /obj/effect/overmap/visitable/sector/exoplanet/grass/grove, /obj/effect/overmap/visitable/sector/exoplanet/barren, /obj/effect/overmap/visitable/sector/exoplanet/lava, /obj/effect/overmap/visitable/sector/exoplanet/desert, /obj/effect/overmap/visitable/sector/exoplanet/snow)
|
||||
// cargo_price_coef = TBD
|
||||
starlight_color = "#615bff"
|
||||
starlight_power = 2
|
||||
@@ -16,7 +16,7 @@
|
||||
name = SECTOR_WEEPING_STARS
|
||||
description = "The region most devastated by the Interstellar War, the majority of the Weeping Stars has yet to recover from the damage it suffered during the War and much of it remains underdeveloped and sparsely inhabited. During the hegemonic era of the Solarian Alliance, when the Alliance stretched from Sol to the edge of known space, this region was known as the Inner Solarian Frontier and was intended to serve as a highly-developed region for humanity to thrive in. Massive amounts of funds were used to build an infrastructure which was still incomplete when war broke out in 2277, and the shattered ruins of long-lost Solarian hegemonic era structures and projects are present throughout the region."
|
||||
skybox_icon = "weeping_stars"
|
||||
possible_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid, /obj/effect/overmap/visitable/sector/exoplanet/grass/grove, /obj/effect/overmap/visitable/sector/exoplanet/barren, /obj/effect/overmap/visitable/sector/exoplanet/lava, /obj/effect/overmap/visitable/sector/exoplanet/desert)
|
||||
possible_exoplanets = list(/obj/effect/overmap/visitable/sector/exoplanet/barren/asteroid, /obj/effect/overmap/visitable/sector/exoplanet/grass/grove, /obj/effect/overmap/visitable/sector/exoplanet/barren, /obj/effect/overmap/visitable/sector/exoplanet/lava, /obj/effect/overmap/visitable/sector/exoplanet/desert, /obj/effect/overmap/visitable/sector/exoplanet/snow)
|
||||
cargo_price_coef = list("nt" = 1.2, "hpi" = 0.8, "zhu" = 0.8, "een" = 1.2, "get" = 1.2, "arz" = 1.2, "blm" = 1.2, "iac" = 1.2, "zsc" = 0.8, "vfc" = 1.2, "bis" = 0.8, "xmg" = 0.8, "npi" = 0.8)
|
||||
starlight_color = "#615bff"
|
||||
starlight_power = 2
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
set_trait(TRAIT_IDEAL_HEAT, 293) // Preferred temperature in Kelvin.
|
||||
set_trait(TRAIT_NUTRIENT_CONSUMPTION, 0.25) // Plant eats this much per tick.
|
||||
set_trait(TRAIT_PLANT_COLOUR, "#46B543") // Colour of the plant icon.
|
||||
set_trait(TRAIT_LARGE, 0) //0 = normal plant, 1 = big tree
|
||||
|
||||
setup_traits()
|
||||
|
||||
@@ -369,7 +370,7 @@
|
||||
display_name = "[name] plant"
|
||||
|
||||
//Creates a random seed. MAKE SURE THE LINE HAS DIVERGED BEFORE THIS IS CALLED.
|
||||
/datum/seed/proc/randomize()
|
||||
/datum/seed/proc/randomize(var/list/native_gases = list(GAS_OXYGEN, GAS_NITROGEN, GAS_CO2, GAS_PHORON, GAS_HYDROGEN))
|
||||
roundstart = FALSE
|
||||
mysterious = TRUE
|
||||
|
||||
@@ -404,12 +405,12 @@
|
||||
|
||||
if(prob(5))
|
||||
consume_gasses = list()
|
||||
var/gas = pick(GAS_OXYGEN,GAS_NITROGEN,GAS_PHORON,GAS_CO2,GAS_HYDROGEN)
|
||||
var/gas = pick_n_take(native_gases)
|
||||
consume_gasses[gas] = rand(3,9)
|
||||
|
||||
if(prob(5))
|
||||
exude_gasses = list()
|
||||
var/gas = pick(GAS_OXYGEN,GAS_NITROGEN,GAS_PHORON,GAS_CO2,GAS_HYDROGEN)
|
||||
var/gas = pick_n_take(native_gases)
|
||||
exude_gasses[gas] = rand(3,9)
|
||||
|
||||
chems = list()
|
||||
@@ -691,9 +692,9 @@
|
||||
if(GENE_ENVIRONMENT)
|
||||
traits_to_copy = list(TRAIT_IDEAL_HEAT,TRAIT_IDEAL_LIGHT,TRAIT_LIGHT_TOLERANCE)
|
||||
if(GENE_PIGMENT)
|
||||
traits_to_copy = list(TRAIT_PLANT_COLOUR,TRAIT_PRODUCT_COLOUR,TRAIT_BIOLUM_COLOUR)
|
||||
traits_to_copy = list(TRAIT_PLANT_COLOUR,TRAIT_PRODUCT_COLOUR,TRAIT_BIOLUM_COLOUR,TRAIT_LEAVES_COLOUR)
|
||||
if(GENE_STRUCTURE)
|
||||
traits_to_copy = list(TRAIT_PLANT_ICON,TRAIT_PRODUCT_ICON,TRAIT_HARVEST_REPEAT, TRAIT_SPOROUS)
|
||||
traits_to_copy = list(TRAIT_PLANT_ICON,TRAIT_PRODUCT_ICON,TRAIT_HARVEST_REPEAT, TRAIT_SPOROUS, TRAIT_LARGE)
|
||||
if(GENE_FRUIT)
|
||||
traits_to_copy = list(TRAIT_STINGS,TRAIT_EXPLOSIVE,TRAIT_FLESH_COLOUR,TRAIT_JUICY)
|
||||
if(GENE_SPECIAL)
|
||||
@@ -807,3 +808,41 @@
|
||||
growth_stages = SSplants.plant_sprites[get_trait(TRAIT_PLANT_ICON)]
|
||||
else
|
||||
growth_stages = 0
|
||||
|
||||
/datum/seed/proc/get_growth_type()
|
||||
if(get_trait(TRAIT_SPREAD) == 2)
|
||||
switch(seed_noun)
|
||||
if(SEED_NOUN_CUTTINGS)
|
||||
return GROWTH_WORMS
|
||||
if(SEED_NOUN_NODES)
|
||||
return GROWTH_BIOMASS
|
||||
if(SEED_NOUN_SPORES)
|
||||
return GROWTH_MOLD
|
||||
else
|
||||
return GROWTH_VINES
|
||||
return 0
|
||||
|
||||
/datum/seed/proc/get_icon(growth_stage)
|
||||
var/image/res = image('icons/obj/hydroponics_growing.dmi', "[get_trait(TRAIT_PLANT_ICON)]-[growth_stage]")
|
||||
if(get_growth_type())
|
||||
res.icon_state = "[get_growth_type()]-[growth_stage]"
|
||||
else
|
||||
res.icon_state = "[get_trait(TRAIT_PLANT_ICON)]-[growth_stage]"
|
||||
|
||||
if(get_growth_type())
|
||||
res.icon = 'icons/obj/hydroponics_vines.dmi'
|
||||
|
||||
res.color = get_trait(TRAIT_PLANT_COLOUR)
|
||||
|
||||
if(get_trait(TRAIT_LARGE))
|
||||
res.icon = 'icons/obj/hydroponics_large.dmi'
|
||||
res.pixel_x = -8
|
||||
res.pixel_y = -16
|
||||
|
||||
if(get_trait(TRAIT_LEAVES_COLOUR))
|
||||
var/image/I = image(res.icon, "[get_trait(TRAIT_PLANT_ICON)]-[growth_stage]-leaves")
|
||||
I.color = get_trait(TRAIT_LEAVES_COLOUR)
|
||||
I.appearance_flags = RESET_COLOR
|
||||
res.overlays += I
|
||||
|
||||
return res
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
opacity = 0
|
||||
density = 0
|
||||
icon = 'icons/obj/hydroponics_growing.dmi'
|
||||
icon_state = "bush4-1"
|
||||
icon_state = ""
|
||||
layer = 3
|
||||
movable_flags = MOVABLE_FLAG_PROXMOVE
|
||||
pass_flags = PASSTABLE
|
||||
@@ -100,18 +100,10 @@
|
||||
|
||||
name = seed.display_name
|
||||
max_health = round(seed.get_trait(TRAIT_ENDURANCE)/2)
|
||||
if(seed.get_trait(TRAIT_SPREAD)==2)
|
||||
if(seed.get_trait(TRAIT_SPREAD)==GROWTH_VINES)
|
||||
max_growth = VINE_GROWTH_STAGES
|
||||
growth_threshold = max_health/VINE_GROWTH_STAGES
|
||||
icon = 'icons/obj/hydroponics_vines.dmi'
|
||||
growth_type = 2 // Vines by default.
|
||||
if(seed.get_trait(TRAIT_CARNIVOROUS) == 2)
|
||||
growth_type = 1 // WOOOORMS.
|
||||
else if(!(seed.seed_noun in list(SEED_NOUN_SEEDS,SEED_NOUN_PITS)))
|
||||
if(seed.seed_noun == SEED_NOUN_NODES)
|
||||
growth_type = 3 // Biomass
|
||||
else
|
||||
growth_type = 4 // Mold
|
||||
growth_type = seed.get_growth_type()
|
||||
else
|
||||
max_growth = seed.growth_stages
|
||||
growth_threshold = max_health/seed.growth_stages
|
||||
@@ -123,7 +115,7 @@
|
||||
|
||||
mature_time = world.time + seed.get_trait(TRAIT_MATURATION) + 15 //prevent vines from maturing until at least a few seconds after they've been created.
|
||||
spread_chance = seed.get_trait(TRAIT_POTENCY)
|
||||
spread_distance = ((growth_type > 0) ? round(spread_chance * 0.6) : round(spread_chance * 0.3))
|
||||
spread_distance = (growth_type ? round(spread_chance * 0.6) : round(spread_chance * 0.3))
|
||||
update_icon()
|
||||
addtimer(CALLBACK(src, PROC_REF(post_initialize)), 1)
|
||||
|
||||
@@ -140,7 +132,7 @@
|
||||
/obj/effect/plant/update_icon()
|
||||
//TODO: should really be caching this.
|
||||
refresh_icon()
|
||||
if(growth_type == 0 && !floor)
|
||||
if(!growth_type && !floor)
|
||||
src.transform = null
|
||||
var/matrix/M = matrix()
|
||||
// should make the plant flush against the wall it's meant to be growing from.
|
||||
@@ -172,6 +164,7 @@
|
||||
last_biolum = null
|
||||
|
||||
/obj/effect/plant/proc/refresh_icon()
|
||||
overlays.Cut()
|
||||
var/growth = 0
|
||||
if(growth_threshold)
|
||||
growth = min(max_growth,round(health/growth_threshold))
|
||||
@@ -181,25 +174,17 @@
|
||||
max_growth--
|
||||
if(at_fringe >= (spread_distance-2))
|
||||
max_growth--
|
||||
max_growth = max(1,max_growth)
|
||||
if(growth_type > 0)
|
||||
switch(growth_type)
|
||||
if(1)
|
||||
icon_state = "worms"
|
||||
if(2)
|
||||
icon_state = "vines-[growth]"
|
||||
if(3)
|
||||
icon_state = "mass-[growth]"
|
||||
if(4)
|
||||
icon_state = "mold-[growth]"
|
||||
else
|
||||
icon_state = "[seed.get_trait(TRAIT_PLANT_ICON)]-[growth]"
|
||||
|
||||
if(growth>2 && growth == max_growth)
|
||||
layer = (seed && seed.force_layer) ? seed.force_layer : 5
|
||||
opacity = 1
|
||||
if(growth_type in list(GROWTH_VINES,GROWTH_BIOMASS))
|
||||
opacity = 1
|
||||
if(islist(seed.chems) && !isnull(seed.chems[/singleton/reagent/woodpulp]))
|
||||
opacity = 1
|
||||
density = 1
|
||||
if(seed.get_trait(TRAIT_LARGE))
|
||||
density = 1
|
||||
opacity = 1
|
||||
else
|
||||
layer = (seed && seed.force_layer) ? seed.force_layer : 5
|
||||
density = 0
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
if(istype(mover) && mover.checkpass(PASSTABLE))
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
return !density
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/proc/check_health()
|
||||
if(seed && !dead && health <= 0)
|
||||
|
||||
@@ -40,9 +40,6 @@
|
||||
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/close_lid_verb
|
||||
verbs -= /obj/machinery/portable_atmospherics/hydroponics/verb/setlight
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/soil/CanPass()
|
||||
return 1
|
||||
|
||||
// Holder for vine plants.
|
||||
// Icons for plants are generated as overlays, so setting it to invisible wouldn't work.
|
||||
// Hence using a blank icon.
|
||||
@@ -52,14 +49,16 @@
|
||||
icon = 'icons/obj/seeds.dmi'
|
||||
icon_state = "blank"
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/New(var/newloc,var/datum/seed/newseed)
|
||||
/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/Initialize(var/newloc,var/datum/seed/newseed,var/start_mature)
|
||||
..()
|
||||
seed = newseed
|
||||
dead = 0
|
||||
age = 1
|
||||
age = start_mature ? seed.get_trait(TRAIT_MATURATION) : 1
|
||||
health = seed.get_trait(TRAIT_ENDURANCE)
|
||||
lastcycle = world.time
|
||||
pixel_y = rand(-5,5)
|
||||
waterlevel = 100
|
||||
nutrilevel = 100
|
||||
check_health()
|
||||
|
||||
/obj/machinery/portable_atmospherics/hydroponics/soil/invisible/remove_dead()
|
||||
|
||||
@@ -40,17 +40,11 @@
|
||||
if(maturation < 1)
|
||||
maturation = 1
|
||||
overlay_stage = maturation ? max(1,round(age/maturation)) : 1
|
||||
var/ikey = "[seed.get_trait(TRAIT_PLANT_ICON)]-[overlay_stage]"
|
||||
var/image/plant_overlay = SSplants.plant_icon_cache["[ikey]-[seed.get_trait(TRAIT_PLANT_COLOUR)]"]
|
||||
if(!plant_overlay)
|
||||
plant_overlay = image('icons/obj/hydroponics_growing.dmi', "[ikey]")
|
||||
plant_overlay.color = seed.get_trait(TRAIT_PLANT_COLOUR)
|
||||
SSplants.plant_icon_cache["[ikey]-[seed.get_trait(TRAIT_PLANT_COLOUR)]"] = plant_overlay
|
||||
|
||||
var/image/plant_overlay = seed.get_icon(overlay_stage)
|
||||
add_overlay(plant_overlay)
|
||||
|
||||
if(harvest && overlay_stage == seed.growth_stages)
|
||||
ikey = "[seed.get_trait(TRAIT_PRODUCT_ICON)]"
|
||||
var/ikey = "[seed.get_trait(TRAIT_PRODUCT_ICON)]"
|
||||
var/image/harvest_overlay = SSplants.plant_icon_cache["product-[ikey]-[seed.get_trait(TRAIT_PLANT_COLOUR)]"]
|
||||
if(!harvest_overlay)
|
||||
harvest_overlay = image('icons/obj/hydroponics_products.dmi', "[ikey]")
|
||||
@@ -73,6 +67,13 @@
|
||||
if(harvest)
|
||||
add_overlay("over_harvest3")
|
||||
|
||||
if(seed && seed.get_trait(TRAIT_LARGE))
|
||||
density = TRUE
|
||||
opacity = TRUE
|
||||
else
|
||||
density = FALSE
|
||||
opacity = FALSE
|
||||
|
||||
// Update bioluminescence.
|
||||
if(seed && seed.get_trait(TRAIT_BIOLUM))
|
||||
var/pwr
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
rock_colors = list(COLOR_BEIGE, COLOR_PALE_YELLOW, COLOR_GRAY80, COLOR_BROWN)
|
||||
plant_colors = list("#efdd6f","#7b4a12","#e49135","#ba6222","#5c755e","#420d22")
|
||||
possible_themes = list(/datum/exoplanet_theme/desert)
|
||||
flora_diversity = 4
|
||||
has_trees = FALSE
|
||||
surface_color = "#d6cca4"
|
||||
water_color = null
|
||||
ruin_planet_type = PLANET_DESERT
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
weather = "Global full-atmosphere hydrological weather system. Dangerous meteorological activity not present"
|
||||
surfacewater = "63% surface water, majority readings not visibly potable. Expected mineral toxicity or salt presence in water bodies"
|
||||
planetary_area = /area/exoplanet/grass
|
||||
flora_diversity = 7
|
||||
has_trees = TRUE
|
||||
rock_colors = list(COLOR_ASTEROID_ROCK, COLOR_GRAY80, COLOR_BROWN)
|
||||
plant_colors = list("#3c772e","#27614b","#3f8d35","#185f18","#799628", "RANDOM")
|
||||
possible_themes = list(/datum/exoplanet_theme/grass)
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
rock_colors = list(COLOR_BEIGE, COLOR_PALE_YELLOW, COLOR_GRAY80, COLOR_BROWN)
|
||||
grass_color = null
|
||||
plant_colors = null
|
||||
flora_diversity = 7
|
||||
has_trees = TRUE
|
||||
possible_themes = list(/datum/exoplanet_theme/jungle)
|
||||
ruin_planet_type = PLANET_GROVE
|
||||
ruin_allowed_tags = RUIN_LOWPOP|RUIN_SCIENCE|RUIN_HOSTILE|RUIN_WRECK|RUIN_NATURAL
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
rock_colors = null//pre colored
|
||||
plant_colors = null//pre colored
|
||||
generated_name = FALSE
|
||||
flora_diversity = 0
|
||||
has_trees = FALSE
|
||||
ruin_planet_type = PLANET_LORE
|
||||
ruin_type_whitelist = list(/datum/map_template/ruin/exoplanet/konyang_landing_zone, /datum/map_template/ruin/exoplanet/konyang_jeweler_nest, /datum/map_template/ruin/exoplanet/konyang_village, /datum/map_template/ruin/exoplanet/konyang_telecomms_outpost, /datum/map_template/ruin/exoplanet/pirate_outpost, /datum/map_template/ruin/exoplanet/pirate_moonshine)
|
||||
possible_themes = list(/datum/exoplanet_theme/konyang)
|
||||
|
||||
@@ -123,12 +123,15 @@
|
||||
surfacewater = "Majority frozen, 78% surface water. Significant tidal forces from natural satellite"
|
||||
rock_colors = null
|
||||
plant_colors = null
|
||||
flora_diversity = 0
|
||||
has_trees = FALSE
|
||||
possible_themes = list(/datum/exoplanet_theme/snow/adhomai)
|
||||
features_budget = 8
|
||||
surface_color = "#e8faff"
|
||||
water_color = "#b5dfeb"
|
||||
generated_name = FALSE
|
||||
ruin_planet_type = PLANET_LORE
|
||||
small_flora_types = list(/datum/seed/shand, /datum/seed/mtear, /datum/seed/earthenroot, /datum/seed/nifberries, /datum/seed/mushroom/nfrihi, /datum/seed/nmshaan)
|
||||
ruin_type_whitelist = list (/datum/map_template/ruin/exoplanet/adhomai_hunting, /datum/map_template/ruin/exoplanet/adhomai_minefield, /datum/map_template/ruin/exoplanet/adhomai_village,
|
||||
/datum/map_template/ruin/exoplanet/adhomai_abandoned_village, /datum/map_template/ruin/exoplanet/adhomai_battlefield, /datum/map_template/ruin/exoplanet/adhomai_cavern, /datum/map_template/ruin/exoplanet/adhomai_bar,
|
||||
/datum/map_template/ruin/exoplanet/adhomai_war_memorial, /datum/map_template/ruin/exoplanet/adhomai_raskara_ritual, /datum/map_template/ruin/exoplanet/adhomai_raskariim_hideout, /datum/map_template/ruin/exoplanet/adhomai_cavern_geist,
|
||||
|
||||
@@ -7,11 +7,15 @@
|
||||
weather = "Global full-atmosphere hydrological weather system. Barely-habitable ambient low temperatures. Frequently dangerous, unpredictable meteorological upsets"
|
||||
surfacewater = "Majority frozen, 70% surface water"
|
||||
planetary_area = /area/exoplanet/snow
|
||||
flora_diversity = 4
|
||||
has_trees = TRUE
|
||||
rock_colors = list(COLOR_DARK_BLUE_GRAY, COLOR_GUNMETAL, COLOR_GRAY80, COLOR_DARK_GRAY)
|
||||
plant_colors = list("#d0fef5","#93e1d8","#93e1d8", "#b2abbf", "#3590f3", "#4b4e6d")
|
||||
possible_themes = list(/datum/exoplanet_theme/snow)
|
||||
surface_color = "#e8faff"
|
||||
water_color = "#b5dfeb"
|
||||
ruin_planet_type = PLANET_SNOW
|
||||
ruin_allowed_tags = RUIN_LOWPOP|RUIN_MINING|RUIN_SCIENCE|RUIN_HOSTILE|RUIN_WRECK|RUIN_NATURAL
|
||||
|
||||
/obj/effect/overmap/visitable/sector/exoplanet/snow/generate_atmosphere()
|
||||
..()
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
spawn_types = list(
|
||||
SMALL_FLORA = list(
|
||||
/obj/structure/flora/rock/desert = 3,
|
||||
/obj/structure/flora/rock/desert/scrub = 2
|
||||
/obj/structure/flora/rock/desert/scrub = 2,
|
||||
/obj/effect/landmark/exoplanet_spawn/plant = 2
|
||||
),
|
||||
LARGE_FLORA = list(
|
||||
/obj/effect/floor_decal/dune/random = 3,
|
||||
@@ -35,6 +36,7 @@
|
||||
SMALL_FLORA = list(
|
||||
/obj/structure/flora/rock/desert = 1,
|
||||
/obj/structure/flora/rock/desert/scrub = 3,
|
||||
/obj/effect/landmark/exoplanet_spawn/plant = 1
|
||||
),
|
||||
LARGE_FLORA = list(
|
||||
/obj/structure/flora/tree/desert/tiny = 1
|
||||
@@ -61,6 +63,7 @@
|
||||
SMALL_FLORA = list(
|
||||
/obj/structure/flora/rock/desert = 1,
|
||||
/obj/structure/flora/rock/desert/scrub = 1,
|
||||
/obj/effect/landmark/exoplanet_spawn/plant = 1
|
||||
),
|
||||
LARGE_FLORA = list(
|
||||
/obj/structure/flora/tree/desert/tiny = 4,
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
/obj/structure/flora/ausbushes/grassybush = 1,
|
||||
/obj/structure/flora/ausbushes/palebush = 1,
|
||||
/obj/structure/flora/ausbushes = 1,
|
||||
/obj/structure/flora/ausbushes/fernybush = 1
|
||||
/obj/structure/flora/ausbushes/fernybush = 1,
|
||||
/obj/effect/landmark/exoplanet_spawn/plant = 1
|
||||
),
|
||||
WILDLIFE = list(
|
||||
/mob/living/simple_animal/yithian = 2,
|
||||
@@ -47,7 +48,8 @@
|
||||
),
|
||||
SMALL_FLORA = list(
|
||||
/obj/structure/flora/ausbushes/reedbush = 1,
|
||||
/obj/structure/flora/ausbushes/stalkybush = 1
|
||||
/obj/structure/flora/ausbushes/stalkybush = 1,
|
||||
/obj/effect/landmark/exoplanet_spawn/plant = 1
|
||||
),
|
||||
WILDLIFE = list(
|
||||
/mob/living/simple_animal/yithian = 2,
|
||||
@@ -80,7 +82,9 @@
|
||||
/obj/structure/flora/ausbushes/grassybush = 1,
|
||||
/obj/structure/flora/ausbushes/palebush = 1,
|
||||
/obj/structure/flora/ausbushes = 1,
|
||||
/obj/structure/flora/ausbushes/fernybush = 1
|
||||
/obj/structure/flora/ausbushes/fernybush = 1,
|
||||
/obj/effect/landmark/exoplanet_spawn/plant = 1,
|
||||
/obj/effect/landmark/exoplanet_spawn/plant = 1
|
||||
),
|
||||
WILDLIFE = list(
|
||||
/mob/living/simple_animal/yithian = 2,
|
||||
@@ -98,7 +102,8 @@
|
||||
exclusive_generators = list(LARGE_FLORA)
|
||||
spawn_types = list(
|
||||
LARGE_FLORA = list(
|
||||
/obj/structure/flora/tree/grove = 1
|
||||
/obj/structure/flora/tree/grove = 1,
|
||||
/obj/effect/landmark/exoplanet_spawn/large_plant = 1
|
||||
),
|
||||
SMALL_FLORA = list(
|
||||
/obj/structure/flora/ausbushes/ywflowers = 1,
|
||||
@@ -107,7 +112,8 @@
|
||||
/obj/structure/flora/ausbushes/grassybush = 1,
|
||||
/obj/structure/flora/ausbushes/palebush = 1,
|
||||
/obj/structure/flora/ausbushes = 1,
|
||||
/obj/structure/flora/ausbushes/fernybush = 1
|
||||
/obj/structure/flora/ausbushes/fernybush = 1,
|
||||
/obj/effect/landmark/exoplanet_spawn/plant = 1
|
||||
),
|
||||
WILDLIFE = list(
|
||||
/mob/living/simple_animal/yithian = 2,
|
||||
|
||||
@@ -9,13 +9,15 @@
|
||||
spawn_types = list(
|
||||
LARGE_FLORA = list(
|
||||
/obj/structure/flora/tree/jungle/small/random = 5,
|
||||
/obj/structure/flora/tree/jungle/random = 1
|
||||
/obj/structure/flora/tree/jungle/random = 1,
|
||||
/obj/effect/landmark/exoplanet_spawn/large_plant = 1
|
||||
),
|
||||
SMALL_FLORA = list(
|
||||
/obj/structure/flora/bush/jungle/large/random = 1,
|
||||
/obj/structure/flora/bush/jungle/random = 3,
|
||||
/obj/structure/flora/bush/jungle/b/random = 3,
|
||||
/obj/structure/flora/bush/jungle/c/random = 3
|
||||
/obj/structure/flora/bush/jungle/c/random = 3,
|
||||
/obj/effect/landmark/exoplanet_spawn/plant = 3
|
||||
),
|
||||
GRASSES = list(
|
||||
/obj/structure/flora/grass/junglegrass/random = 4,
|
||||
@@ -40,7 +42,8 @@
|
||||
SMALL_FLORA = list(
|
||||
/obj/structure/flora/bush/jungle/random = 3,
|
||||
/obj/structure/flora/bush/jungle/b/random = 3,
|
||||
/obj/structure/flora/bush/jungle/c/random = 3
|
||||
/obj/structure/flora/bush/jungle/c/random = 3,
|
||||
/obj/effect/landmark/exoplanet_spawn/plant = 3
|
||||
),
|
||||
GRASSES = list(
|
||||
/obj/structure/flora/grass/junglegrass/random = 4,
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
/obj/effect/floor_decal/fungus/random = 1
|
||||
),
|
||||
SMALL_FLORA = list(
|
||||
/obj/structure/flora/bush/mushroom = 1
|
||||
/obj/structure/flora/bush/mushroom = 1,
|
||||
/obj/effect/landmark/exoplanet_spawn/plant = 1
|
||||
),
|
||||
WILDLIFE = list(
|
||||
/mob/living/simple_animal/yithian = 1,
|
||||
|
||||
@@ -18,12 +18,14 @@
|
||||
/obj/effect/floor_decal/snowdrift/large/random = 4,
|
||||
/obj/structure/flora/rock/snow = 4,
|
||||
/obj/structure/flora/tree/dead = 2,
|
||||
/obj/structure/flora/tree/pine = 1
|
||||
/obj/structure/flora/tree/pine = 1,
|
||||
/obj/effect/landmark/exoplanet_spawn/large_plant = 1
|
||||
),
|
||||
SMALL_FLORA = list(
|
||||
/obj/structure/flora/bush = 2,
|
||||
/obj/effect/floor_decal/snowrocks = 1,
|
||||
/obj/effect/floor_decal/snowdrift/random = 1
|
||||
/obj/effect/floor_decal/snowdrift/random = 1,
|
||||
/obj/effect/landmark/exoplanet_spawn/plant = 2
|
||||
),
|
||||
WILDLIFE = list(
|
||||
/mob/living/simple_animal/hostile/retaliate/samak = 1,
|
||||
@@ -49,12 +51,14 @@
|
||||
LARGE_FLORA = list(
|
||||
/obj/structure/flora/rock/snow = 1,
|
||||
/obj/structure/flora/tree/dead = 2,
|
||||
/obj/structure/flora/tree/pine = 4
|
||||
/obj/structure/flora/tree/pine = 4,
|
||||
/obj/effect/landmark/exoplanet_spawn/large_plant = 3
|
||||
),
|
||||
SMALL_FLORA = list(
|
||||
/obj/structure/flora/bush = 3,
|
||||
/obj/effect/floor_decal/snowrocks = 1,
|
||||
/obj/effect/floor_decal/snowdrift/random = 1
|
||||
/obj/effect/floor_decal/snowdrift/random = 1,
|
||||
/obj/effect/landmark/exoplanet_spawn/plant = 3
|
||||
),
|
||||
WILDLIFE = list(
|
||||
/mob/living/simple_animal/hostile/retaliate/samak = 1,
|
||||
@@ -78,7 +82,8 @@
|
||||
),
|
||||
SMALL_FLORA = list(
|
||||
/obj/structure/flora/bush/adhomai = 3,
|
||||
/obj/effect/floor_decal/snowdrift/random = 1
|
||||
/obj/effect/floor_decal/snowdrift/random = 1,
|
||||
/obj/effect/landmark/exoplanet_spawn/plant = 2
|
||||
),
|
||||
WILDLIFE = list(
|
||||
/mob/living/simple_animal/ice_tunneler = 1,
|
||||
@@ -109,7 +114,8 @@
|
||||
),
|
||||
SMALL_FLORA = list(
|
||||
/obj/structure/flora/bush/adhomai = 3,
|
||||
/obj/effect/floor_decal/snowdrift/random = 1
|
||||
/obj/effect/floor_decal/snowdrift/random = 1,
|
||||
/obj/effect/landmark/exoplanet_spawn/plant = 2
|
||||
),
|
||||
WILDLIFE = list(
|
||||
/mob/living/simple_animal/ice_tunneler = 1,
|
||||
|
||||
@@ -35,6 +35,11 @@
|
||||
var/list/actors = list() //things that appear in engravings on xenoarch finds.
|
||||
var/list/species = list() //list of names to use for simple animals
|
||||
|
||||
var/flora_diversity = 0
|
||||
var/has_trees = FALSE
|
||||
var/list/small_flora_types = list()
|
||||
var/list/big_flora_types = list()
|
||||
|
||||
var/repopulating = 0
|
||||
var/repopulate_types = list() // animals which have died that may come back
|
||||
|
||||
@@ -114,6 +119,7 @@
|
||||
/obj/effect/overmap/visitable/sector/exoplanet/proc/build_level()
|
||||
generate_habitability()
|
||||
generate_atmosphere()
|
||||
generate_flora()
|
||||
generate_map()
|
||||
generate_features()
|
||||
generate_landing(2)
|
||||
@@ -433,3 +439,15 @@
|
||||
colors += gas_data.tile_overlay_color[g]
|
||||
if(colors.len)
|
||||
return MixColors(colors)
|
||||
|
||||
/obj/effect/landmark/exoplanet_spawn/Initialize()
|
||||
..()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/effect/landmark/exoplanet_spawn/LateInitialize(mapload)
|
||||
var/obj/effect/overmap/visitable/sector/exoplanet/E = map_sectors["[z]"]
|
||||
if (istype(E))
|
||||
do_spawn(E)
|
||||
|
||||
/obj/effect/landmark/exoplanet_spawn/proc/do_spawn(obj/effect/overmap/visitable/sector/exoplanet/planet)
|
||||
return
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/obj/effect/overmap/visitable/sector/exoplanet/proc/generate_flora()
|
||||
if(flora_diversity == 0)
|
||||
return
|
||||
|
||||
for(var/i = 1 to flora_diversity)
|
||||
var/datum/seed/S = new()
|
||||
if(atmosphere?.gas)
|
||||
S.randomize(atmosphere.gas.Copy())
|
||||
else
|
||||
S.randomize()
|
||||
var/plant_icon = "alien[rand(1,7)]"
|
||||
S.set_trait(TRAIT_PRODUCT_ICON,plant_icon)
|
||||
S.set_trait(TRAIT_PLANT_ICON, plant_icon)
|
||||
var/color = pick(plant_colors)
|
||||
if(color == "RANDOM")
|
||||
color = get_random_colour(0,75,190)
|
||||
S.set_trait(TRAIT_PLANT_COLOUR,color)
|
||||
adapt_seed(S)
|
||||
small_flora_types += S
|
||||
if(has_trees)
|
||||
var/tree_diversity = max(1, flora_diversity/2)
|
||||
for(var/i = 1 to tree_diversity)
|
||||
var/datum/seed/S = new()
|
||||
S.randomize()
|
||||
S.set_trait(TRAIT_PRODUCT_ICON,"alien[rand(1,5)]")
|
||||
S.set_trait(TRAIT_PLANT_ICON,"tree")
|
||||
S.set_trait(TRAIT_SPREAD,0)
|
||||
S.set_trait(TRAIT_HARVEST_REPEAT,1)
|
||||
S.set_trait(TRAIT_LARGE,1)
|
||||
var/color = pick(plant_colors)
|
||||
if (color == "RANDOM")
|
||||
color = get_random_colour(0,75,190)
|
||||
S.set_trait(TRAIT_LEAVES_COLOUR,color)
|
||||
S.chems[/singleton/reagent/woodpulp] = list(1)
|
||||
adapt_seed(S)
|
||||
big_flora_types += S
|
||||
|
||||
/obj/effect/landmark/exoplanet_spawn/plant
|
||||
name = "spawn exoplanet plant"
|
||||
|
||||
/obj/effect/landmark/exoplanet_spawn/plant/do_spawn(var/obj/effect/overmap/visitable/sector/exoplanet/planet)
|
||||
if(LAZYLEN(planet.small_flora_types))
|
||||
new /obj/machinery/portable_atmospherics/hydroponics/soil/invisible(get_turf(src), pick(planet.small_flora_types), TRUE)
|
||||
|
||||
/obj/effect/landmark/exoplanet_spawn/large_plant
|
||||
name = "spawn exoplanet large plant"
|
||||
|
||||
/obj/effect/landmark/exoplanet_spawn/large_plant/do_spawn(var/obj/effect/overmap/visitable/sector/exoplanet/planet)
|
||||
if(LAZYLEN(planet.big_flora_types))
|
||||
new /obj/machinery/portable_atmospherics/hydroponics/soil/invisible(get_turf(src), pick(planet.big_flora_types), TRUE)
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# balance
|
||||
# admin
|
||||
# backend
|
||||
# security
|
||||
# refactor
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: RustingWithYou
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- tweak: "Exoplanets will now spawn randomly generated plants."
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 46 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 25 KiB |
Reference in New Issue
Block a user