Turfs, props, flora, and cleanup

-Moves/rearranges a lot of the code/files on this branch, not done yet
-Requested turfs + special behavior
-Tweak to edge generation so we can use our files too
-Plants
-Props
This commit is contained in:
Darlantan
2022-12-05 08:41:14 -05:00
parent 3d2bf28a77
commit 73e3a1d16f
15 changed files with 351 additions and 432 deletions

View File

@@ -0,0 +1,186 @@
// TODO: split up icon files so all of this isn't reading from the turfs folder
/obj/structure/prop/desert_planet
icon = 'modular_chomp/icons/turf/desert_planet.dmi'
desc = "Sandy and smooth from erosion."
density = TRUE
anchored = TRUE
/obj/structure/prop/desert_planet/rock
name = "desert rock"
icon_state = "rock"
density = FALSE
/obj/structure/prop/desert_planet/largerock
name = "desert large rock"
icon_state = "largerock"
/obj/structure/prop/desert_planet/boulder1
name = "desert boulder"
icon_state = "boulder1"
/obj/structure/prop/desert_planet/boulder2
name = "desert boulder"
icon_state = "boulder2"
/obj/structure/prop/desert_planet/boulder3
name = "desert boulder"
icon_state = "boulder3"
/obj/structure/prop/desert_planet/boulder4
name = "desert boulder"
icon_state = "boulder4"
/obj/structure/prop/desert_planet64x64
name = "desert large boulder"
desc = "Sandy and smooth from erosion."
icon = 'modular_chomp/icons/turf/desert_planet_64x64.dmi'
density = TRUE
anchored = TRUE
bound_width = 64
bound_height = 64
can_buckle = FALSE
/obj/structure/prop/desert_planet64x64/largeboulder1
icon_state = "largeboulder1"
/obj/structure/prop/desert_planet64x64/largeboulder2
icon_state = "largeboulder2"
/obj/structure/prop/desert_planet64x64/largeboulder3
icon_state = "largeboulder3"
/obj/structure/prop/desert_planet64x64/cliff
name = "desert cliff"
desc = "A sheer cliff of smooth desert stone, quite steep."
icon_state = "cliff"
/obj/structure/prop/desert_planet64x64/shadow
name = "shadow"
desc = "The cliff shadow looks useful for cooling off from the heat."
icon_state = "shadow"
/obj/structure/prop/desert_planet160x160
name = "desert large boulder"
desc = "Sandy and smooth from erosion."
icon = 'modular_chomp/icons/turf/desert_planet_160x160.dmi'
density = TRUE
anchored = TRUE
bound_width = 160
bound_height = 160
can_buckle = FALSE
/obj/structure/prop/desert_planet160x160/largeboulder
icon_state = "large_boulder"
/obj/structure/prop/desert_planet160x160/tallboulder
icon_state = "tall_boulder"
/obj/structure/prop/desert_planet160x160/boulder
icon_state = "boulder"
/obj/structure/prop/desert_planet160x160/lcactus
name = "cactus"
desc = "Large and prickly."
icon_state = "lcactus"
/obj/structure/prop/desert_planet160x160/lcactus1
name = "cactus"
desc = "Large and prickly."
icon_state = "lcactus1"
/obj/structure/prop/desert_planet160x160/lcactus2
name = "cactus"
desc = "Large and prickly."
icon_state = "lcactus2"
/obj/structure/prop/desert_planet160x160/lcactus3
name = "cactus"
desc = "Large and prickly."
icon_state = "lcactus3"
/obj/structure/flora/desert_planet
name = "desert plant"
desc = "Probably a succulent"
icon = 'modular_chomp/icons/turf/desert_planet.dmi'
/obj/structure/flora/desert_planet/floralia
name = "floralia"
desc = "Faintly floral."
icon_state = "floralia"
/obj/structure/flora/desert_planet/ike
name = "ike"
desc = "Bushy."
icon_state = "ike"
/obj/structure/flora/desert_planet/barrelcactus
name = "barrel cactus"
desc = "Round and prickly."
icon_state = "barrelcactus"
/obj/structure/flora/tree/desert_planet
name = "palm tree"
desc = "Tall palm tree, makes for a good shade."
icon = 'modular_chomp/icons/turf/desert_planet_160x160.dmi'
density = FALSE
anchored = TRUE
bound_width = 160
bound_height = 160
can_buckle = FALSE
product = /obj/item/stack/material/log
product_amount = 50
health = 2000
max_health = 2000
//var/fruit
/obj/structure/flora/tree/desert_planet/palmtreeb
icon_state = "palmtreeb"
/obj/structure/flora/tree/desert_planet/palmtreeb1
icon_state = "palmtreeb1"
/obj/structure/flora/tree/desert_planet/palmtree
icon_state = "palmtree"
/obj/structure/flora/tree/desert_planet/palmtree1
icon_state = "palmtree1"
/obj/structure/flora/tree/desert_planet/mpalmtreeb
icon_state = "mpalmtreeb"
/obj/structure/flora/tree/desert_planet/mpalmtreeb1
icon_state = "mpalmtreeb1"
/obj/structure/flora/tree/desert_planet/mpalmtree
icon_state = "mpalmtree"
/obj/structure/flora/tree/desert_planet/mpalmtree1
icon_state = "mpalmtree1"
/obj/structure/flora/tree/desert_planet/spalmtree
icon_state = "spalmtree"
/obj/structure/flora/tree/desert_planet/spalmtree2
icon_state = "spalmtree2"
/obj/structure/flora/tree/desert_planet/spalmtree3
icon_state = "spalmtree3"
/obj/structure/flora/tree/desert_planet/spalmtree4
icon_state = "spalmtree4"
/obj/structure/flora/tree/desert_planet/desert_tree
name = "barren tree"
desc = "Completely barren."
icon_state = "desert_tree"
/obj/structure/flora/tree/desert_planet/desert_tree1
name = "gnarled tree"
desc = "Twisted but living."
icon_state = "desert_tree1"
/obj/structure/flora/tree/desert_planet/desert_tree3
name = "hardy tree"
desc = "Thriving despite the conditions."
icon_state = "desert_tree3"

View File

@@ -9,128 +9,193 @@
can_dig = false
*/
// Parent turf.
/turf/simulated/floor/outdoors/desert_planet
name = "sand"
desc = "Salty and gritty."
icon = 'modular_chomp/icons/turf/desert_planet.dmi'
modular_icon = TRUE // This must be true to add edges from our .dmi files.
/turf/simulated/floor/outdoors/desert_planet/sand
name = "sand"
desc = "Salty and gritty."
icon = 'modular_chomp/icons/turf/desert_planet.dmi'
icon_state = "sand"
edge_blending_priority = 3
turf_layers = list(/turf/simulated/floor/outdoors/desert_planet/sand)
icon_state = "sand0"
edge_blending_priority = 2
/* Testing
/decl/flooring/outdoors/sand
name = "sand"
desc = "Salty and gritty."
icon = 'modular_chomp/icons/turf/desert_planet.dmi'
icon_base = "sand"
footstep_sounds = list("human" = list(
'sound/effects/footstep/asteroid1.ogg',
'sound/effects/footstep/asteroid2.ogg',
'sound/effects/footstep/asteroid3.ogg',
'sound/effects/footstep/asteroid4.ogg',
'sound/effects/footstep/asteroid5.ogg',
'sound/effects/footstep/MedDirt1.ogg',
'sound/effects/footstep/MedDirt2.ogg',
'sound/effects/footstep/MedDirt3.ogg',
'sound/effects/footstep/MedDirt4.ogg'))
// Necessary to get the edges to generate correctly since we use a random-ish icon_state. Inelegant to hard code, but this is a one-off case.
/turf/simulated/floor/outdoors/desert_planet/sand/get_edge_icon_state()
return "sand"
/turf/simulated/floor/outdoors/sand/Initialize(mapload)
var/possiblesands = list(
"ironsand1" = 50,
"ironsand2" = 1,
"ironsand3" = 1,
"ironsand4" = 1,
"ironsand5" = 1,
"ironsand6" = 1,
"ironsand7" = 1,
"ironsand8" = 1,
"ironsand9" = 1,
"ironsand10" = 1,
"ironsand11" = 1,
"ironsand12" = 1,
"ironsand13" = 1,
"ironsand14" = 1,
"ironsand15" = 1
/turf/simulated/floor/outdoors/desert_planet/sand/Initialize(mapload)
. = ..()
icon_state = "sand[rand(0,2)]"
)
flooring_override = pickweight(possiblesands)
return ..()
/turf/simulated/floor/water/hotspring
name = "Hotsprings"
desc = "A natural hotspring connecting to an aquifer. It seems the facility was built ontop of it."
edge_blending_priority = -2
movement_cost = 8
depth = 2
water_state = "water_shallow"
outdoors = FALSE
/turf/simulated/floor/water/hotspring/Entered(atom/movable/AM, atom/oldloc)
if(istype(AM, /mob/living))
var/mob/living/L = AM
L.update_water()
if(L.check_submerged() <= 0)
return
if(!istype(oldloc, /turf/simulated/floor/water/hotspring))
to_chat(L, "<span class='warning'>You feel an overwhelming wave of warmth from entering \the [src]!</span>")
AM.water_act(5)
..()
*/
/turf/simulated/floor/outdoors/desert_planet/sand/attackby(var/obj/item/W, var/mob/user)
if(istype(W, /obj/item/weapon/shovel))
to_chat(user, "<span class='notice'>You begin to remove \the [src] with your [W].</span>")
if(do_after(user, 4 SECONDS * W.toolspeed))
to_chat(user, "<span class='notice'>\The [src] has been dug up, and now lies in a pile nearby.</span>")
icon_state = "sand_dug"
new /obj/item/weapon/ore/glass (src)
else
to_chat(user, "<span class='notice'>You decide to not finish removing \the [src].</span>")
else
..()
/turf/simulated/floor/outdoors/desert_planet/deep_sand
name = "sand"
desc = "Salty and gritty."
icon = 'modular_chomp/icons/turf/desert_planet.dmi'
icon_state = "deep_sand"
edge_blending_priority = 2
turf_layers = list(/turf/simulated/floor/outdoors/desert_planet/sand)
desc = "Really gets everywhere."
icon_state = "deep_sand0"
edge_blending_priority = 1
movement_cost = 3
/turf/simulated/floor/outdoors/desert_planet/deep_sand/Initialize(mapload)
. = ..()
icon_state = "deep_sand[rand(0,2)]"
/turf/simulated/floor/outdoors/desert_planet/grass
name = "grass"
desc = "Lively green grass, soft to walk on."
icon = 'modular_chomp/icons/turf/desert_planet.dmi'
icon_state = "grass"
edge_blending_priority = 6
turf_layers = list(/turf/simulated/floor/outdoors/desert_planet/sand)
edge_blending_priority = 5
/turf/simulated/floor/outdoors/desert_planet/deep_grass
name = "dense grass"
desc = "Dense patch of grass, seems like a soft spot to lay on."
icon = 'modular_chomp/icons/turf/desert_planet.dmi'
icon_state = "deep_grass"
edge_blending_priority = 7
turf_layers = list(/turf/simulated/floor/outdoors/desert_planet/sand)
edge_blending_priority = 6
/turf/simulated/floor/outdoors/desert_planet/gravel
name = "gravel"
desc = "Mix of dirt and sand, it crumbles in your hand."
icon = 'modular_chomp/icons/turf/desert_planet.dmi'
icon_state = "gravel"
edge_blending_priority = 5
turf_layers = list(/turf/simulated/floor/outdoors/desert_planet/sand)
edge_blending_priority = 3
/turf/simulated/floor/outdoors/desert_planet/mud
name = "mud"
desc = "Squishy damp dirt, smells muddy."
icon = 'modular_chomp/icons/turf/desert_planet.dmi'
icon_state = "mud"
edge_blending_priority = 4
turf_layers = list(/turf/simulated/floor/outdoors/desert_planet/sand)
// At last we've come full circle, a floor which is actually a wall.
/turf/simulated/floor/outdoors/desert_planet/sandrock
name = "sandstone"
desc = "Worn, patterned sandstone."
icon_state = "sandrock"
density = TRUE
opacity = TRUE
turf_layers = list(/turf/simulated/floor/outdoors/rocks)
var/last_act = 0
// Stolen from mineral turf code.
/turf/simulated/floor/outdoors/desert_planet/sandrock/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(!user.IsAdvancedToolUser())
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if(istype(W, /obj/item/weapon/pickaxe))
if(!istype(user.loc, /turf))
return
var/obj/item/weapon/pickaxe/P = W
if(last_act + P.digspeed > world.time)//prevents message spam
return
last_act = world.time
playsound(user, P.drill_sound, 20, 1)
to_chat(user, "<span class='notice'>You start [P.drill_verb].</span>")
if(do_after(user,P.digspeed))
to_chat(user, "<span class='notice'>You finish [P.drill_verb] \the [src].</span>")
new /obj/item/stack/material/sandstone(src)
density = FALSE
opacity = FALSE
demote() // Converts the turf to the next layer in turf_layers.
..()
/*
/obj/effect/floor_decal/desert_planet/floor/sand0_edge
name = "sand0_edge"
icon = 'icons/turf/desert_planet.dmi'
icon_state = "sand0_edge"
/obj/effect/floor_decal/desert_planet/floor/gravel_edge
name = "gravel_edge"
icon = 'icons/turf/desert_planet.dmi'
icon_state = "gravel_edge"
/obj/effect/floor_decal/desert_planet/floor/mud_edge
name = "mud_edge"
icon = 'icons/turf/desert_planet.dmi'
icon_state = "mud_edge"
/obj/effect/floor_decal/desert_planet/floor/grass_edge
name = "grass_edge"
icon = 'icons/turf/desert_planet.dmi'
icon_state = "grass_edge"
/obj/effect/floor_decal/desert_planet/floor/deep_grass_edge
name = "deep_grass_edge"
icon = 'icons/turf/desert_planet.dmi'
icon_state = "deep_grass_edge"
*/
/* #No idea how water tiles work
/turf/simulated/floor/outdoors/desert_planet/water
name = "water"
desc = "Clear cool water, looks potable."
icon = 'modular_chomp/icons/turf/desert_planet.dmi'
icon = 'icons/turf/desert_planet.dmi'
icon_state = "water"
edge_blending_priority = 8
var/water_state = "water_shallow"
var/under_state = "sand"
can_be_plated = FALSE
outdoors = OUTDOORS_YES
flags = TURF_ACID_IMMUNE
layer = WATER_FLOOR_LAYER
can_dirty = FALSE // It's water
var/depth = 1 // Higher numbers indicates deeper water.
var/reagent_type = "water"
edge_blending_priority = 2
turf_layers = list(/turf/simulated/floor/outdoors/desert_planet/sand)
/turf/simulated/floor/outdoors/desert_planet/deep_water
name = "deep water"
desc = "deep enough you can't see the bottom of it."
icon = 'modular_chomp/icons/turf/desert_planet.dmi'
icon = 'icons/turf/desert_planet.dmi'
icon_state = "deep_water"
edge_blending_priority = 9
var/water_state = "water_shallow"
var/under_state = "sand"
can_be_plated = FALSE
outdoors = OUTDOORS_YES
flags = TURF_ACID_IMMUNE
layer = WATER_FLOOR_LAYER
can_dirty = FALSE // It's water
var/depth = 2 // Higher numbers indicates deeper water.
var/reagent_type = "water"
edge_blending_priority = 4
turf_layers = list(/turf/simulated/floor/outdoors/desert_planet/sand)
//I want this for the water tiles
/turf/simulated/floor/water
name = "shallow water"
desc = "A body of water. It seems shallow enough to walk through, if needed."
icon = 'icons/turf/outdoors.dmi'
icon_state = "seashallow" // So it shows up in the map editor as water.
var/water_state = "water_shallow"
var/under_state = "rock"
edge_blending_priority = -1
movement_cost = 4
can_be_plated = FALSE
outdoors = OUTDOORS_YES
flags = TURF_ACID_IMMUNE
layer = WATER_FLOOR_LAYER
can_dirty = FALSE // It's water
var/depth = 1 // Higher numbers indicates deeper water.
var/reagent_type = "water"
// var/datum/looping_sound/water/soundloop CHOMPEdit: Removing soundloop for now.
*/

View File

@@ -0,0 +1,2 @@
/turf/simulated
var/modular_icon = FALSE // Currently necessary for turf edges which read from our .dmi files.

View File

@@ -0,0 +1,47 @@
/mob/living/simple_mob/animal/passive/dog/stray
name = "dog"
desc = "The most standard dog you have ever seen, it even smells like one."
tt_desc = "Canis lupus familiaris"
//faction = "mexico" //They are from Mexico. //Amusing but this prompts aggression from crew-aligned mobs.
icon = 'modular_chomp/icons/turf/desert_planet.dmi'
icon_state = "dog"
item_state = "dog"
icon_living = "dog"
icon_rest = "dog"
icon_dead = "dog"
health = 50
maxHealth = 50
mob_size = MOB_SMALL
pass_flags = PASSTABLE
can_pull_size = ITEMSIZE_TINY
can_pull_mobs = MOB_PULL_NONE
layer = MOB_LAYER
density = 1
movement_cooldown = 0.75 //roughly a bit faster than a person
response_help = "pets"
response_disarm = "rolls aside"
response_harm = "stomps"
melee_damage_lower = 5
melee_damage_upper = 7
attacktext = list("nips", "bumps", "scratches")
vore_taste = "wet dog"
min_oxy = 16 //Require atleast 16kPA oxygen
minbodytemp = 223 //Below -50 Degrees Celcius
maxbodytemp = 523 //Above 80 Degrees Celcius
heat_damage_per_tick = 3
cold_damage_per_tick = 3
meat_amount = 7
holder_type = /obj/item/weapon/holder/armadillo
ai_holder_type = /datum/ai_holder/simple_mob/armadillo
speak_emote = list("rumbles", "chirr?", "churr")
say_list_type = /datum/say_list/armadillo