The Mapping Update
Cleans up the map (again) Makes mining code more better
This commit is contained in:
@@ -8,12 +8,10 @@
|
||||
//Making the station dirty, one tile at a time. Called by master controller's setup_objects
|
||||
|
||||
/turf/open/floor/proc/MakeDirty()
|
||||
// We start with a 1/3 chance of having this proc called by Initialize()
|
||||
if(CONFIG_GET(flag/persistent_debris_only))
|
||||
return
|
||||
|
||||
if(prob(66)) //fastest possible exit 2/3 of the time
|
||||
return
|
||||
|
||||
if(!(flags_1 & CAN_BE_DIRTY_1))
|
||||
return
|
||||
|
||||
@@ -31,22 +29,23 @@
|
||||
var/static/list/high_dirt_areas = typecacheof(list(/area/science/test_area,
|
||||
/area/mine/production,
|
||||
/area/mine/living_quarters,
|
||||
/area/commons/vacant_room/office,
|
||||
/area/ruin/space))
|
||||
if(is_type_in_typecache(A, high_dirt_areas))
|
||||
new /obj/effect/decal/cleanable/dirt(src) //vanilla, but it works
|
||||
new /obj/effect/decal/cleanable/dirt(src) //vanilla, but it works
|
||||
return
|
||||
|
||||
|
||||
if(prob(80)) //mid dirt - 1/15
|
||||
if(prob(80)) //mid dirt - 1/15
|
||||
return
|
||||
|
||||
//Construction zones. Blood, sweat, and oil. Oh, and dirt.
|
||||
var/static/list/engine_dirt_areas = typecacheof(list(/area/engine,
|
||||
/area/crew_quarters/heads/chief,
|
||||
/area/ruin/space/derelict/assembly_line,
|
||||
var/static/list/engine_dirt_areas = typecacheof(list(/area/engineering,
|
||||
/area/command/heads_quarters/ce,
|
||||
/area/science/robotics,
|
||||
/area/maintenance,
|
||||
/area/construction,
|
||||
/area/commons/vacant_room/commissary,
|
||||
/area/survivalpod))
|
||||
if(is_type_in_typecache(A, engine_dirt_areas))
|
||||
if(prob(3))
|
||||
@@ -62,7 +61,7 @@
|
||||
return
|
||||
|
||||
//Bathrooms. Blood, vomit, and shavings in the sinks.
|
||||
var/static/list/bathroom_dirt_areas = typecacheof(list( /area/crew_quarters/toilet,
|
||||
var/static/list/bathroom_dirt_areas = typecacheof(list( /area/commons/toilet,
|
||||
/area/awaymission/research/interior/bathroom))
|
||||
if(is_type_in_typecache(A, bathroom_dirt_areas))
|
||||
if(prob(40))
|
||||
@@ -72,21 +71,24 @@
|
||||
new /obj/effect/decal/cleanable/blood/old(src)
|
||||
return
|
||||
|
||||
//Hangars and pods covered in oil.
|
||||
var/static/list/oily_areas = typecacheof(/area/quartermaster)
|
||||
// Cargo bays covered in oil.
|
||||
var/static/list/oily_areas = typecacheof(/area/cargo)
|
||||
if(is_type_in_typecache(A, oily_areas))
|
||||
if(prob(25))
|
||||
new /obj/effect/decal/cleanable/oil(src)
|
||||
// else if(prob(20))
|
||||
// // or occasionally the signs of opened packages
|
||||
// new /obj/effect/decal/cleanable/wrapping(src)
|
||||
return
|
||||
|
||||
|
||||
if(prob(75)) //low dirt - 1/60
|
||||
if(prob(75)) //low dirt - 1/60
|
||||
return
|
||||
|
||||
//Areas where gibs will be present. Robusting probably happened some time ago.
|
||||
var/static/list/gib_covered_areas = typecacheof(list(/area/ai_monitored/turret_protected,
|
||||
/area/security,
|
||||
/area/crew_quarters/heads/hos))
|
||||
/area/command/heads_quarters/hos))
|
||||
if(is_type_in_typecache(A, gib_covered_areas))
|
||||
if(prob(20))
|
||||
if(prob(5))
|
||||
@@ -96,8 +98,8 @@
|
||||
return
|
||||
|
||||
//Kitchen areas. Broken eggs, flour, spilled milk (no crying allowed.)
|
||||
var/static/list/kitchen_dirt_areas = typecacheof(list(/area/crew_quarters/kitchen,
|
||||
/area/crew_quarters/cafeteria))
|
||||
var/static/list/kitchen_dirt_areas = typecacheof(list(/area/service/kitchen,
|
||||
/area/service/cafeteria))
|
||||
if(is_type_in_typecache(A, kitchen_dirt_areas))
|
||||
if(prob(60))
|
||||
if(prob(50))
|
||||
@@ -108,7 +110,7 @@
|
||||
|
||||
//Medical areas. Mostly clean by space-OSHA standards, but has some blood and oil spread about.
|
||||
var/static/list/medical_dirt_areas = typecacheof(list(/area/medical,
|
||||
/area/crew_quarters/heads/cmo))
|
||||
/area/command/heads_quarters/cmo))
|
||||
if(is_type_in_typecache(A, medical_dirt_areas))
|
||||
if(prob(66))
|
||||
if(prob(5))
|
||||
@@ -124,10 +126,10 @@
|
||||
|
||||
//Science messes. Mostly green glowy stuff -WHICH YOU SHOULD NOT INJEST-.
|
||||
var/static/list/science_dirt_areas = typecacheof(list(/area/science,
|
||||
/area/crew_quarters/heads/hor))
|
||||
if(is_type_in_typecache(A, medical_dirt_areas))
|
||||
/area/command/heads_quarters/rd))
|
||||
if(is_type_in_typecache(A, science_dirt_areas))
|
||||
if(prob(20))
|
||||
new /obj/effect/decal/cleanable/greenglow(src) //this cleans itself up but it might startle you when you see it.
|
||||
new /obj/effect/decal/cleanable/greenglow(src) //this cleans itself up but it might startle you when you see it.
|
||||
return
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
icon_regular_floor = "floor"
|
||||
else
|
||||
icon_regular_floor = icon_state
|
||||
if(mapload)
|
||||
if(mapload && prob(66)) // 2/3 instead of 1/3 (default)
|
||||
MakeDirty()
|
||||
|
||||
/turf/open/floor/ex_act(severity, target)
|
||||
|
||||
@@ -80,11 +80,11 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You begin adding glass to the floor...</span>")
|
||||
if(do_after(user, 5, target = src))
|
||||
if (G.get_amount() >= 2 && !istype(src, /turf/open/transparent/glass))
|
||||
if (G.get_amount() >= 2 && !istype(src, /turf/open/floor/glass))
|
||||
for(var/obj/effect/decal/cleanable/decal in src)
|
||||
if(decal.wiped_by_floor_change)
|
||||
qdel(decal)
|
||||
PlaceOnTop(/turf/open/transparent/glass, flags = CHANGETURF_INHERIT_AIR)
|
||||
PlaceOnTop(/turf/open/floor/glass, flags = CHANGETURF_INHERIT_AIR)
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 80, 1)
|
||||
G.use(2)
|
||||
to_chat(user, "<span class='notice'>You add glass to the floor.</span>")
|
||||
@@ -100,11 +100,11 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>You begin adding reinforced glass to the floor...</span>")
|
||||
if(do_after(user, 10, target = src))
|
||||
if (RG.get_amount() >= 2 && !istype(src, /turf/open/transparent/glass/reinforced))
|
||||
if (RG.get_amount() >= 2 && !istype(src, /turf/open/floor/glass/reinforced))
|
||||
for(var/obj/effect/decal/cleanable/decal in src)
|
||||
if(decal.wiped_by_floor_change)
|
||||
qdel(decal)
|
||||
PlaceOnTop(/turf/open/transparent/glass/reinforced, flags = CHANGETURF_INHERIT_AIR)
|
||||
PlaceOnTop(/turf/open/floor/glass/reinforced, flags = CHANGETURF_INHERIT_AIR)
|
||||
playsound(src, 'sound/items/deconstruct.ogg', 80, 1)
|
||||
RG.use(2)
|
||||
to_chat(user, "<span class='notice'>You add reinforced glass to the floor.</span>")
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "asteroid"
|
||||
icon_plating = "asteroid"
|
||||
postdig_icon_change = TRUE
|
||||
footstep = FOOTSTEP_SAND
|
||||
barefootstep = FOOTSTEP_SAND
|
||||
clawfootstep = FOOTSTEP_SAND
|
||||
@@ -16,13 +15,19 @@
|
||||
/// Environment type for the turf
|
||||
var/environment_type = "asteroid"
|
||||
/// Base turf type to be created by the tunnel
|
||||
var/turf_type = /turf/open/floor/plating/asteroid //Because caves do whacky shit to revert to normal
|
||||
/// Probability the floor has a different icon state
|
||||
var/turf_type = /turf/open/floor/plating/asteroid
|
||||
/// Probability floor has a different icon state
|
||||
var/floor_variance = 20
|
||||
attachment_holes = FALSE
|
||||
/// Itemstack to drop when dug by a shovel
|
||||
var/obj/item/stack/digResult = /obj/item/stack/ore/glass/basalt
|
||||
/// Whether the turf has been dug or not
|
||||
var/dug
|
||||
/// Whether to change the turf's icon_state to "[base_icon_state]_dug" when its dugged up
|
||||
postdig_icon_change = TRUE
|
||||
|
||||
// /turf/open/floor/plating/asteroid/setup_broken_states()
|
||||
// return list("asteroid_dug")
|
||||
|
||||
/turf/open/floor/plating/asteroid/Initialize()
|
||||
var/proper_name = name
|
||||
@@ -33,19 +38,18 @@
|
||||
|
||||
/// Drops itemstack when dug and changes icon
|
||||
/turf/open/floor/plating/asteroid/proc/getDug()
|
||||
dug = TRUE
|
||||
new digResult(src, 5)
|
||||
if(postdig_icon_change)
|
||||
if(!postdig_icon)
|
||||
icon_plating = "[environment_type]_dug"
|
||||
icon_state = "[environment_type]_dug"
|
||||
dug = TRUE
|
||||
icon_plating = "[environment_type]_dug"
|
||||
icon_state = "[environment_type]_dug"
|
||||
|
||||
/// If the user can dig the turf
|
||||
/turf/open/floor/plating/asteroid/proc/can_dig(mob/user)
|
||||
if(!dug)
|
||||
return TRUE
|
||||
if(user)
|
||||
to_chat(user, "<span class='notice'>Looks like someone has dug here already.</span>")
|
||||
to_chat(user, "<span class='warning'>Looks like someone has dug here already!</span>")
|
||||
|
||||
/turf/open/floor/plating/asteroid/try_replace_tile(obj/item/stack/tile/T, mob/user, params)
|
||||
return
|
||||
@@ -59,6 +63,9 @@
|
||||
/turf/open/floor/plating/asteroid/MakeDry()
|
||||
return
|
||||
|
||||
// /turf/open/floor/plating/asteroid/crush()
|
||||
// return
|
||||
|
||||
/turf/open/floor/plating/asteroid/attackby(obj/item/W, mob/user, params)
|
||||
. = ..()
|
||||
if(!.)
|
||||
@@ -99,6 +106,9 @@
|
||||
floor_variance = 15
|
||||
digResult = /obj/item/stack/ore/glass/basalt
|
||||
|
||||
// /turf/open/floor/plating/asteroid/basalt/setup_broken_states()
|
||||
// return list("basalt_dug")
|
||||
|
||||
/turf/open/floor/plating/asteroid/basalt/lava //lava underneath
|
||||
baseturfs = /turf/open/lava/smooth
|
||||
|
||||
@@ -128,280 +138,16 @@
|
||||
planetary_atmos = TRUE
|
||||
baseturfs = /turf/open/lava/smooth/lava_land_surface
|
||||
|
||||
|
||||
|
||||
// /turf/open/floor/plating/asteroid/lowpressure
|
||||
// initial_gas_mix = OPENTURF_LOW_PRESSURE
|
||||
// baseturfs = /turf/open/floor/plating/asteroid/lowpressure
|
||||
// turf_type = /turf/open/floor/plating/asteroid/lowpressure
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless
|
||||
initial_gas_mix = AIRLESS_ATMOS
|
||||
baseturfs = /turf/open/floor/plating/asteroid/airless
|
||||
turf_type = /turf/open/floor/plating/asteroid/airless
|
||||
|
||||
|
||||
#define SPAWN_MEGAFAUNA "bluh bluh huge boss"
|
||||
#define SPAWN_BUBBLEGUM 6
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless/cave
|
||||
/// Length of the tunnel
|
||||
var/length = 100
|
||||
/// Mobs that can spawn in the tunnel, weighted list
|
||||
var/list/mob_spawn_list
|
||||
/// Megafauna that can spawn in the tunnel, weighted list
|
||||
var/list/megafauna_spawn_list
|
||||
/// Flora that can spawn in the tunnel, weighted list
|
||||
var/list/flora_spawn_list
|
||||
//terrain to spawn weighted list
|
||||
var/list/terrain_spawn_list
|
||||
/// Turf type to choose when spawning in tunnel at 1% chance, weighted list
|
||||
var/list/choose_turf_type
|
||||
/// if the tunnel should keep being created
|
||||
var/sanity = 1
|
||||
/// Cave direction to move
|
||||
var/forward_cave_dir = 1
|
||||
/// Backwards cave direction for tracking
|
||||
var/backward_cave_dir = 2
|
||||
/// If the tunnel is moving backwards
|
||||
var/going_backwards = TRUE
|
||||
/// If this is a cave creating type
|
||||
var/has_data = FALSE
|
||||
/// The non-cave creating type
|
||||
var/data_having_type = /turf/open/floor/plating/asteroid/airless/cave/has_data
|
||||
/// Option tunnel width, wegihted list
|
||||
var/list/pick_tunnel_width
|
||||
turf_type = /turf/open/floor/plating/asteroid/airless
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless/cave/has_data //subtype for producing a tunnel with given data
|
||||
has_data = TRUE
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless/cave/volcanic
|
||||
mob_spawn_list = list(/mob/living/simple_animal/hostile/asteroid/goliath/beast/random = 50, /obj/structure/spawner/lavaland/goliath = 3, \
|
||||
/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/random = 40, /obj/structure/spawner/lavaland = 2, \
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelord/legion/random = 30, /obj/structure/spawner/lavaland/legion = 3, \
|
||||
SPAWN_MEGAFAUNA = 6, /mob/living/simple_animal/hostile/asteroid/goldgrub = 10)
|
||||
|
||||
data_having_type = /turf/open/floor/plating/asteroid/airless/cave/volcanic/has_data
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless/cave/volcanic/has_data //subtype for producing a tunnel with given data
|
||||
has_data = TRUE
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless/cave/snow
|
||||
gender = PLURAL
|
||||
name = "snow"
|
||||
desc = "Looks cold."
|
||||
icon = 'icons/turf/snow.dmi'
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/icemoon
|
||||
icon_state = "snow"
|
||||
icon_plating = "snow"
|
||||
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
|
||||
slowdown = 2
|
||||
environment_type = "snow"
|
||||
flags_1 = NONE
|
||||
planetary_atmos = TRUE
|
||||
burnt_states = list("snow_dug")
|
||||
bullet_sizzle = TRUE
|
||||
bullet_bounce_sound = null
|
||||
digResult = /obj/item/stack/sheet/mineral/snow
|
||||
mob_spawn_list = list(/mob/living/simple_animal/hostile/asteroid/wolf = 50, /obj/structure/spawner/ice_moon = 3, \
|
||||
/mob/living/simple_animal/hostile/asteroid/polarbear = 30, /obj/structure/spawner/ice_moon/polarbear = 3, \
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelord/legion/snow = 50, /mob/living/simple_animal/hostile/asteroid/goldgrub = 10, \
|
||||
/mob/living/simple_animal/hostile/asteroid/lobstrosity = 15)
|
||||
flora_spawn_list = list(/obj/structure/flora/tree/pine = 2, /obj/structure/flora/grass/both = 12, /obj/structure/flora/rock/icy = 6, /obj/structure/flora/rock/pile/icy = 6)
|
||||
data_having_type = /turf/open/floor/plating/asteroid/airless/cave/snow/has_data
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/icemoon
|
||||
choose_turf_type = list(/turf/open/floor/plating/asteroid/snow/icemoon = 19, /turf/open/floor/plating/ice/icemoon = 1)
|
||||
pick_tunnel_width = list("1" = 6, "2" = 1)
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless/cave/snow/underground
|
||||
mob_spawn_list = list(/mob/living/simple_animal/hostile/asteroid/ice_demon = 50, /obj/structure/spawner/ice_moon/demonic_portal = 3, \
|
||||
/mob/living/simple_animal/hostile/asteroid/ice_whelp = 30, /obj/structure/spawner/ice_moon/demonic_portal/ice_whelp = 3, \
|
||||
/mob/living/simple_animal/hostile/asteroid/hivelord/legion/snow = 50, /obj/structure/spawner/ice_moon/demonic_portal/snowlegion = 3)
|
||||
flora_spawn_list = list(/obj/structure/flora/rock/icy = 6, /obj/structure/flora/rock/pile/icy = 6)
|
||||
data_having_type = /turf/open/floor/plating/asteroid/airless/cave/snow/underground/has_data
|
||||
choose_turf_type = null
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless/cave/snow/has_data //subtype for producing a tunnel with given data
|
||||
has_data = TRUE
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless/cave/snow/underground/has_data //subtype for producing a tunnel with given data
|
||||
has_data = TRUE
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless/cave/Initialize()
|
||||
if (!mob_spawn_list)
|
||||
mob_spawn_list = list(/mob/living/simple_animal/hostile/asteroid/goldgrub = 1, /mob/living/simple_animal/hostile/asteroid/goliath = 5, /mob/living/simple_animal/hostile/asteroid/basilisk = 4, /mob/living/simple_animal/hostile/asteroid/hivelord = 3)
|
||||
if (!megafauna_spawn_list)
|
||||
megafauna_spawn_list = list(/mob/living/simple_animal/hostile/megafauna/dragon = 4, /mob/living/simple_animal/hostile/megafauna/colossus = 2, /mob/living/simple_animal/hostile/megafauna/bubblegum = SPAWN_BUBBLEGUM)
|
||||
if (!flora_spawn_list)
|
||||
flora_spawn_list = list(/obj/structure/flora/ash/leaf_shroom = 2 , /obj/structure/flora/ash/cap_shroom = 2 , /obj/structure/flora/ash/stem_shroom = 2 , /obj/structure/flora/ash/cacti = 1, /obj/structure/flora/ash/tall_shroom = 2)
|
||||
if(!terrain_spawn_list)
|
||||
terrain_spawn_list = list(/obj/structure/geyser/random = 1)
|
||||
. = ..()
|
||||
if(!has_data)
|
||||
produce_tunnel_from_data()
|
||||
|
||||
/// Sets the tunnel length and direction
|
||||
/turf/open/floor/plating/asteroid/airless/cave/proc/get_cave_data(set_length, exclude_dir = -1)
|
||||
// If set_length (arg1) isn't defined, get a random length; otherwise assign our length to the length arg.
|
||||
if(!set_length)
|
||||
length = rand(25, 50)
|
||||
else
|
||||
length = set_length
|
||||
|
||||
// Get our directiosn
|
||||
forward_cave_dir = pick(GLOB.alldirs - exclude_dir)
|
||||
// Get the opposite direction of our facing direction
|
||||
backward_cave_dir = angle2dir(dir2angle(forward_cave_dir) + 180)
|
||||
|
||||
/// Gets the tunnel length and direction then makes the tunnel
|
||||
/turf/open/floor/plating/asteroid/airless/cave/proc/produce_tunnel_from_data(tunnel_length, excluded_dir = -1)
|
||||
get_cave_data(tunnel_length, excluded_dir)
|
||||
// Make our tunnels
|
||||
make_tunnel(forward_cave_dir)
|
||||
if(going_backwards)
|
||||
make_tunnel(backward_cave_dir)
|
||||
// Kill ourselves by replacing ourselves with a normal floor.
|
||||
SpawnFloor(src)
|
||||
|
||||
/**
|
||||
* Makes the tunnel and spawns things inside of it
|
||||
*
|
||||
* Picks a tunnel width for the tunnel and then starts spawning turfs in the direction it moves in
|
||||
* Can randomly change directions of the tunnel, stops if it hits the edge of the map, or a no tunnel area
|
||||
* Can randomly make new tunnels out of itself
|
||||
*
|
||||
*/
|
||||
/turf/open/floor/plating/asteroid/airless/cave/proc/make_tunnel(dir)
|
||||
var/turf/closed/mineral/tunnel = src
|
||||
var/next_angle = pick(45, -45)
|
||||
|
||||
var/tunnel_width = 1
|
||||
if(pick_tunnel_width)
|
||||
tunnel_width = text2num(pickweight(pick_tunnel_width))
|
||||
|
||||
for(var/i = 0; i < length; i++)
|
||||
if(!sanity)
|
||||
break
|
||||
|
||||
var/list/L = list(45)
|
||||
if(ISODD(dir2angle(dir))) // We're going at an angle and we want thick angled tunnels.
|
||||
L += -45
|
||||
|
||||
// Expand the edges of our tunnel
|
||||
for(var/edge_angle in L)
|
||||
var/turf/closed/mineral/edge = tunnel
|
||||
for(var/current_tunnel_width = 1 to tunnel_width)
|
||||
edge = get_step(edge, angle2dir(dir2angle(dir) + edge_angle))
|
||||
if(istype(edge))
|
||||
SpawnFloor(edge)
|
||||
|
||||
if(!sanity)
|
||||
break
|
||||
|
||||
// Move our tunnel forward
|
||||
tunnel = get_step(tunnel, dir)
|
||||
|
||||
if(istype(tunnel))
|
||||
// Small chance to have forks in our tunnel; otherwise dig our tunnel.
|
||||
if(i > 3 && prob(20))
|
||||
if(isarea(tunnel.loc))
|
||||
|
||||
var/area/A = tunnel.loc
|
||||
if(!A.tunnel_allowed)
|
||||
sanity = 0
|
||||
break
|
||||
var/turf/open/floor/plating/asteroid/airless/cave/C = tunnel.ChangeTurf(data_having_type, null, CHANGETURF_IGNORE_AIR)
|
||||
C.going_backwards = FALSE
|
||||
C.produce_tunnel_from_data(rand(10, 15), dir)
|
||||
else
|
||||
SpawnFloor(tunnel)
|
||||
else //if(!istype(tunnel, parent)) // We hit space/normal/wall, stop our tunnel.
|
||||
break
|
||||
|
||||
// Chance to change our direction left or right.
|
||||
if(i > 2 && prob(33))
|
||||
// We can't go a full loop though
|
||||
next_angle = -next_angle
|
||||
setDir(angle2dir(dir2angle(dir) )+ next_angle)
|
||||
|
||||
|
||||
/// Spawns the floor of the tunnel and any type of structure or mob it can have
|
||||
/turf/open/floor/plating/asteroid/airless/cave/proc/SpawnFloor(turf/T)
|
||||
var/area/A = T.loc
|
||||
if(!A.tunnel_allowed)
|
||||
sanity = 0
|
||||
return
|
||||
if(choose_turf_type)
|
||||
turf_type = pickweight(choose_turf_type)
|
||||
if(turf_type == initial(turf_type)) // Don't spawn different turf types under flora or terrain
|
||||
var/spawned_flora = FALSE
|
||||
if(is_mining_level(z))
|
||||
spawned_flora = SpawnFlora(T)
|
||||
if(!spawned_flora) // no rocks beneath mob spawners / mobs.
|
||||
SpawnMonster(T)
|
||||
SpawnTerrain(T)
|
||||
T.ChangeTurf(turf_type, null, CHANGETURF_IGNORE_AIR)
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless/cave/proc/SpawnTerrain(turf/T)
|
||||
if(prob(1))
|
||||
if(istype(loc, /area/mine/explored) || istype(loc, /area/lavaland/surface/outdoors/explored))
|
||||
return
|
||||
var/randumb = pickweight(terrain_spawn_list)
|
||||
for(var/obj/structure/geyser/F in range(7, T))
|
||||
if(istype(F, randumb))
|
||||
return
|
||||
new randumb(T)
|
||||
|
||||
/// Spawns a random mob or megafauna in the tunnel
|
||||
/turf/open/floor/plating/asteroid/airless/cave/proc/SpawnMonster(turf/T)
|
||||
if(!isarea(loc))
|
||||
return
|
||||
var/area/A = loc
|
||||
if(prob(30))
|
||||
if(!A.mob_spawn_allowed)
|
||||
return
|
||||
var/randumb = pickweight(mob_spawn_list)
|
||||
if(!randumb)
|
||||
return
|
||||
while(randumb == SPAWN_MEGAFAUNA)
|
||||
if(A.megafauna_spawn_allowed && megafauna_spawn_list && megafauna_spawn_list.len) //this is danger. it's boss time.
|
||||
var/maybe_boss = pickweight(megafauna_spawn_list)
|
||||
if(megafauna_spawn_list[maybe_boss])
|
||||
randumb = maybe_boss
|
||||
if(ispath(maybe_boss, /mob/living/simple_animal/hostile/megafauna/bubblegum)) //there can be only one bubblegum, so don't waste spawns on it
|
||||
megafauna_spawn_list[maybe_boss] = 0
|
||||
else //this is not danger, don't spawn a boss, spawn something else
|
||||
randumb = pickweight(mob_spawn_list)
|
||||
|
||||
for(var/mob/living/simple_animal/hostile/H in urange(12,T)) //prevents mob clumps
|
||||
if((ispath(randumb, /mob/living/simple_animal/hostile/megafauna) || ismegafauna(H)) && get_dist(src, H) <= 7)
|
||||
return //if there's a megafauna within standard view don't spawn anything at all
|
||||
if(ispath(randumb, /mob/living/simple_animal/hostile/asteroid) || istype(H, /mob/living/simple_animal/hostile/asteroid))
|
||||
return //if the random is a standard mob, avoid spawning if there's another one within 12 tiles
|
||||
if((ispath(randumb, /obj/structure/spawner/lavaland) || istype(H, /obj/structure/spawner/lavaland)) && get_dist(src, H) <= 2)
|
||||
return //prevents tendrils spawning in each other's collapse range
|
||||
|
||||
new randumb(T)
|
||||
return TRUE
|
||||
|
||||
#undef SPAWN_MEGAFAUNA
|
||||
#undef SPAWN_BUBBLEGUM
|
||||
|
||||
/// Spawns a random flora in the tunnel, can spawn clumps of them.
|
||||
/turf/open/floor/plating/asteroid/airless/cave/proc/SpawnFlora(turf/T)
|
||||
if(prob(12))
|
||||
if(isarea(loc))
|
||||
var/area/A = loc
|
||||
if(!A.flora_allowed)
|
||||
return
|
||||
var/randumb = pickweight(flora_spawn_list)
|
||||
if(!randumb)
|
||||
return
|
||||
for(var/obj/structure/flora/F in range(4, T)) // Allows for growing patches, but not ridiculous stacks of flora
|
||||
if(!istype(F, randumb))
|
||||
return
|
||||
new randumb(T)
|
||||
return TRUE
|
||||
|
||||
/turf/open/floor/plating/asteroid/snow
|
||||
gender = PLURAL
|
||||
name = "snow"
|
||||
@@ -420,6 +166,9 @@
|
||||
bullet_bounce_sound = null
|
||||
digResult = /obj/item/stack/sheet/mineral/snow
|
||||
|
||||
// /turf/open/floor/plating/asteroid/snow/setup_broken_states()
|
||||
// return list("snow_dug")
|
||||
|
||||
/turf/open/floor/plating/asteroid/snow/burn_tile()
|
||||
if(!burnt)
|
||||
visible_message("<span class='danger'>[src] melts away!.</span>")
|
||||
@@ -430,8 +179,9 @@
|
||||
return FALSE
|
||||
|
||||
/turf/open/floor/plating/asteroid/snow/icemoon
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/icemoon
|
||||
baseturfs = /turf/open/openspace/icemoon
|
||||
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
|
||||
slowdown = 0
|
||||
|
||||
/turf/open/lava/plasma/ice_moon
|
||||
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
|
||||
@@ -442,24 +192,22 @@
|
||||
name = "icy snow"
|
||||
desc = "Looks colder."
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice
|
||||
initial_gas_mix = "o2=0;n2=82;plasma=24;TEMP=120"
|
||||
initial_gas_mix = "n2=82;plasma=24;TEMP=120"
|
||||
floor_variance = 0
|
||||
icon_state = "snow-ice"
|
||||
icon_plating = "snow-ice"
|
||||
environment_type = "snow_cavern"
|
||||
environment_type = "snow-ice"
|
||||
footstep = FOOTSTEP_FLOOR
|
||||
barefootstep = FOOTSTEP_HARD_BAREFOOT
|
||||
clawfootstep = FOOTSTEP_HARD_CLAW
|
||||
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
|
||||
|
||||
// /turf/open/floor/plating/asteroid/snow/ice/setup_broken_states()
|
||||
// return list("snow-ice")
|
||||
/turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
|
||||
planetary_atmos = TRUE
|
||||
|
||||
/turf/open/floor/plating/asteroid/snow/ice/icemoon/solarpanel
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "solarpanel"
|
||||
slowdown = 0
|
||||
|
||||
/turf/open/floor/plating/asteroid/snow/ice/burn_tile()
|
||||
return FALSE
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
/turf/open/floor/glass
|
||||
name = "Glass floor"
|
||||
desc = "Dont jump on it, or do, I'm not your mom."
|
||||
icon = 'icons/turf/floors/glass.dmi'
|
||||
icon_state = "floor_glass"
|
||||
baseturfs = /turf/open/openspace
|
||||
intact = FALSE //this means wires go on top
|
||||
smooth = SMOOTH_MORE
|
||||
canSmoothWith = list(/turf/open/floor/glass, /turf/open/floor/glass/reinforced)
|
||||
footstep = FOOTSTEP_PLATING
|
||||
barefootstep = FOOTSTEP_HARD_BAREFOOT
|
||||
clawfootstep = FOOTSTEP_HARD_CLAW
|
||||
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
|
||||
floor_tile = /obj/item/stack/sheet/glass
|
||||
|
||||
// /turf/open/floor/glass/setup_broken_states()
|
||||
// return list("glass-damaged1", "glass-damaged2", "glass-damaged3")
|
||||
|
||||
|
||||
/turf/open/floor/glass/Initialize()
|
||||
icon_state = "" //Prevent the normal icon from appearing behind the smooth overlays
|
||||
..()
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/turf/open/floor/glass/LateInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/turf_z_transparency, TRUE)
|
||||
|
||||
/// n(omegalul)
|
||||
/turf/open/floor/glass/crowbar_act(mob/living/user, obj/item/I)
|
||||
return TRUE
|
||||
|
||||
/turf/open/floor/glass/wrench_act(mob/living/user, obj/item/I)
|
||||
to_chat(user, "<span class='notice'>You begin removing glass...</span>")
|
||||
if(I.use_tool(src, user, 30, volume=80))
|
||||
if(!istype(src, /turf/open/floor/glass))
|
||||
return TRUE
|
||||
if(floor_tile)
|
||||
new floor_tile(src, 2)
|
||||
ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
|
||||
return TRUE
|
||||
|
||||
/turf/open/floor/glass/reinforced
|
||||
name = "Reinforced glass floor"
|
||||
desc = "Do jump on it, it can take it."
|
||||
icon = 'icons/turf/floors/reinf_glass.dmi'
|
||||
icon_state = "floor_glass"
|
||||
// base_icon_state = "reinf_glass"
|
||||
|
||||
// /turf/open/floor/glass/reinforced/setup_broken_states()
|
||||
// return list("reinf_glass-damaged1", "reinf_glass-damaged2", "reinf_glass-damaged3")
|
||||
|
||||
/turf/open/floor/glass/reinforced/wrench_act(mob/living/user, obj/item/I)
|
||||
to_chat(user, "<span class='notice'>You begin removing reinforced glass...</span>")
|
||||
if(I.use_tool(src, user, 30, volume=80))
|
||||
if(!istype(src, /turf/open/floor/glass/reinforced))
|
||||
return TRUE
|
||||
if(floor_tile)
|
||||
new floor_tile(src, 2)
|
||||
ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
|
||||
return TRUE
|
||||
@@ -1,43 +1,59 @@
|
||||
#define MINING_MESSAGE_COOLDOWN 20
|
||||
|
||||
/**********************Mineral deposits**************************/
|
||||
|
||||
/turf/closed/mineral //wall piece
|
||||
name = "rock"
|
||||
icon = 'icons/turf/mining.dmi'
|
||||
icon_state = "rock"
|
||||
var/smooth_icon = 'icons/turf/smoothrocks.dmi'
|
||||
smooth = SMOOTH_MORE|SMOOTH_BORDER
|
||||
canSmoothWith = null
|
||||
baseturfs = /turf/open/floor/plating/asteroid/airless
|
||||
initial_gas_mix = AIRLESS_ATMOS
|
||||
opacity = 1
|
||||
opacity = TRUE
|
||||
density = TRUE
|
||||
blocks_air = 1
|
||||
blocks_air = TRUE
|
||||
layer = EDGED_TURF_LAYER
|
||||
// base_icon_state = "smoothrocks"
|
||||
temperature = TCMB
|
||||
var/smooth_icon = 'icons/turf/smoothrocks.dmi'
|
||||
var/environment_type = "asteroid"
|
||||
var/turf/open/floor/plating/turf_type = /turf/open/floor/plating/asteroid/airless
|
||||
var/mineralType = null
|
||||
var/obj/item/stack/ore/mineralType = null
|
||||
var/mineralAmt = 3
|
||||
var/spread = 0 //will the seam spread?
|
||||
var/spreadChance = 0 //the percentual chance of an ore spreading to the neighbouring tiles
|
||||
var/last_act = 0
|
||||
var/scan_state = "" //Holder for the image we display when we're pinged by a mining scanner
|
||||
var/defer_change = 0
|
||||
// If true you can mine the mineral turf with your hands
|
||||
var/weak_turf = FALSE
|
||||
|
||||
/turf/closed/mineral/Initialize()
|
||||
if (!canSmoothWith)
|
||||
canSmoothWith = list(/turf/closed/mineral, /turf/closed/indestructible)
|
||||
. = ..()
|
||||
var/matrix/M = new
|
||||
M.Translate(-4, -4)
|
||||
transform = M
|
||||
icon = smooth_icon
|
||||
. = ..()
|
||||
if (mineralType && mineralAmt && spread && spreadChance)
|
||||
|
||||
|
||||
/turf/closed/mineral/proc/Spread_Vein()
|
||||
var/spreadChance = initial(mineralType.spreadChance)
|
||||
if(spreadChance)
|
||||
for(var/dir in GLOB.cardinals)
|
||||
if(prob(spreadChance))
|
||||
var/turf/T = get_step(src, dir)
|
||||
if(istype(T, /turf/closed/mineral/random))
|
||||
Spread(T)
|
||||
var/turf/closed/mineral/random/M = T
|
||||
if(istype(M) && !M.mineralType)
|
||||
M.Change_Ore(mineralType)
|
||||
|
||||
/turf/closed/mineral/proc/Change_Ore(ore_type, random = 0)
|
||||
if(random)
|
||||
mineralAmt = rand(1, 5)
|
||||
if(ispath(ore_type, /obj/item/stack/ore)) //If it has a scan_state, switch to it
|
||||
var/obj/item/stack/ore/the_ore = ore_type
|
||||
scan_state = initial(the_ore.scan_state) // I SAID. SWITCH. TO. IT.
|
||||
mineralType = ore_type // Everything else assumes that this is typed correctly so don't set it to non-ores thanks.
|
||||
|
||||
/turf/closed/mineral/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
|
||||
if(turf_type)
|
||||
@@ -48,7 +64,6 @@
|
||||
|
||||
|
||||
/turf/closed/mineral/attackby(obj/item/pickaxe/I, mob/user, params)
|
||||
var/stored_dir = user.dir
|
||||
if (!user.IsAdvancedToolUser())
|
||||
to_chat(usr, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
@@ -69,7 +84,7 @@
|
||||
if(ismineralturf(src))
|
||||
if(I.digrange > 0)
|
||||
for(var/turf/closed/mineral/M in range(user,range))
|
||||
if(get_dir(user,M)&stored_dir)
|
||||
if(get_dir(user,M) & user.dir)
|
||||
M.gets_drilled(user)
|
||||
dug_tiles += M
|
||||
to_chat(user, "<span class='notice'>You finish cutting into the rock.</span>")
|
||||
@@ -79,30 +94,63 @@
|
||||
else
|
||||
return attack_hand(user)
|
||||
|
||||
/turf/closed/mineral/proc/gets_drilled()
|
||||
/turf/closed/mineral/attack_hand(mob/user)
|
||||
if(!weak_turf)
|
||||
return ..()
|
||||
var/turf/user_turf = user.loc
|
||||
if (!isturf(user_turf))
|
||||
return
|
||||
if(last_act + MINING_MESSAGE_COOLDOWN > world.time)//prevents message spam
|
||||
return
|
||||
last_act = world.time
|
||||
to_chat(user, "<span class='notice'>You start pulling out pieces of [src] with your hands...</span>")
|
||||
if(!do_after(user, 15 SECONDS, target = src))
|
||||
return
|
||||
if(ismineralturf(src))
|
||||
to_chat(user, "<span class='notice'>You finish pulling apart [src].</span>")
|
||||
gets_drilled(user)
|
||||
|
||||
/turf/closed/mineral/proc/gets_drilled(user, give_exp = FALSE)
|
||||
if (mineralType && (mineralAmt > 0))
|
||||
new mineralType(src, mineralAmt)
|
||||
SSblackbox.record_feedback("tally", "ore_mined", mineralAmt, mineralType)
|
||||
// if(ishuman(user))
|
||||
// var/mob/living/carbon/human/H = user
|
||||
// if(give_exp)
|
||||
// if (mineralType && (mineralAmt > 0))
|
||||
// H.mind.adjust_experience(/datum/skill/mining, initial(mineralType.mine_experience) * mineralAmt)
|
||||
// else
|
||||
// H.mind.adjust_experience(/datum/skill/mining, 4)
|
||||
|
||||
for(var/obj/effect/temp_visual/mining_overlay/M in src)
|
||||
qdel(M)
|
||||
var/flags = NONE
|
||||
if(defer_change) // TODO: make the defer change var a var for any changeturf flag
|
||||
flags = CHANGETURF_DEFER_CHANGE
|
||||
ScrapeAway(null, flags)
|
||||
var/turf/open/mined = ScrapeAway(null, flags)
|
||||
addtimer(CALLBACK(src, .proc/AfterChange), 1, TIMER_UNIQUE)
|
||||
playsound(src, 'sound/effects/break_stone.ogg', 50, 1) //beautiful destruction
|
||||
playsound(src, 'sound/effects/break_stone.ogg', 50, TRUE) //beautiful destruction
|
||||
mined.update_visuals()
|
||||
|
||||
/turf/closed/mineral/attack_animal(mob/living/simple_animal/user)
|
||||
/turf/closed/mineral/attack_animal(mob/living/simple_animal/user, list/modifiers)
|
||||
if((user.environment_smash & ENVIRONMENT_SMASH_WALLS) || (user.environment_smash & ENVIRONMENT_SMASH_RWALLS))
|
||||
gets_drilled()
|
||||
gets_drilled(user)
|
||||
..()
|
||||
|
||||
/turf/closed/mineral/attack_alien(mob/living/carbon/alien/M)
|
||||
to_chat(M, "<span class='notice'>You start digging into the rock...</span>")
|
||||
playsound(src, 'sound/effects/break_stone.ogg', 50, 1)
|
||||
if(do_after(M, 40, target = src))
|
||||
to_chat(M, "<span class='notice'>You tunnel into the rock.</span>")
|
||||
gets_drilled(M)
|
||||
/turf/closed/mineral/attack_alien(mob/living/carbon/alien/user, list/modifiers)
|
||||
to_chat(user, "<span class='notice'>You start digging into the rock...</span>")
|
||||
playsound(src, 'sound/effects/break_stone.ogg', 50, TRUE)
|
||||
if(do_after(user, 4 SECONDS, target = src))
|
||||
to_chat(user, "<span class='notice'>You tunnel into the rock.</span>")
|
||||
gets_drilled(user)
|
||||
|
||||
/turf/closed/mineral/attack_hulk(mob/living/carbon/human/H)
|
||||
..()
|
||||
if(do_after(H, 50, target = src))
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, TRUE)
|
||||
H.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ), forced = "hulk")
|
||||
gets_drilled(H)
|
||||
return TRUE
|
||||
|
||||
/turf/closed/mineral/Bumped(atom/movable/AM)
|
||||
..()
|
||||
@@ -128,72 +176,57 @@
|
||||
switch(severity)
|
||||
if(3)
|
||||
if (prob(75))
|
||||
gets_drilled(null, 1)
|
||||
gets_drilled(null, FALSE)
|
||||
if(2)
|
||||
if (prob(90))
|
||||
gets_drilled(null, 1)
|
||||
gets_drilled(null, FALSE)
|
||||
if(1)
|
||||
gets_drilled(null, 1)
|
||||
gets_drilled(null, FALSE)
|
||||
return
|
||||
|
||||
/turf/closed/mineral/Spread(turf/T)
|
||||
T.ChangeTurf(type)
|
||||
|
||||
/turf/closed/mineral/random
|
||||
var/list/mineralSpawnChanceList = list(/turf/closed/mineral/uranium = 5, /turf/closed/mineral/diamond = 1, /turf/closed/mineral/gold = 10,
|
||||
/turf/closed/mineral/silver = 12, /turf/closed/mineral/plasma = 20, /turf/closed/mineral/iron = 40, /turf/closed/mineral/titanium = 11,
|
||||
/turf/closed/mineral/gibtonite = 4, /turf/open/floor/plating/asteroid/airless/cave = 2, /turf/closed/mineral/bscrystal = 1)
|
||||
var/list/mineralSpawnChanceList = list(/obj/item/stack/ore/uranium = 5, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 10,
|
||||
/obj/item/stack/ore/silver = 12, /obj/item/stack/ore/plasma = 20, /obj/item/stack/ore/iron = 40, /obj/item/stack/ore/titanium = 11,
|
||||
/turf/closed/mineral/gibtonite = 4, /obj/item/stack/ore/bluespace_crystal = 1)
|
||||
//Currently, Adamantine won't spawn as it has no uses. -Durandan
|
||||
var/mineralChance = 13
|
||||
var/display_icon_state = "rock"
|
||||
|
||||
/turf/closed/mineral/random/more_caves
|
||||
mineralSpawnChanceList = list(/turf/closed/mineral/uranium = 5, /turf/closed/mineral/diamond = 1, /turf/closed/mineral/gold = 10,
|
||||
/turf/closed/mineral/silver = 12, /turf/closed/mineral/plasma = 20, /turf/closed/mineral/iron = 40, /turf/closed/mineral/titanium = 11,
|
||||
/turf/closed/mineral/gibtonite = 4, /turf/open/floor/plating/asteroid/airless/cave = 15, /turf/closed/mineral/bscrystal = 1)
|
||||
|
||||
/turf/closed/mineral/random/Initialize()
|
||||
|
||||
mineralSpawnChanceList = typelist("mineralSpawnChanceList", mineralSpawnChanceList)
|
||||
|
||||
if (display_icon_state)
|
||||
icon_state = display_icon_state
|
||||
. = ..()
|
||||
if (prob(mineralChance))
|
||||
var/path = pickweight(mineralSpawnChanceList)
|
||||
var/turf/T = ChangeTurf(path,null,CHANGETURF_IGNORE_AIR)
|
||||
if(ispath(path, /turf))
|
||||
var/stored_flags = 0
|
||||
if(flags_1 & NO_RUINS_1)
|
||||
stored_flags |= NO_RUINS_1
|
||||
var/turf/T = ChangeTurf(path,null,CHANGETURF_IGNORE_AIR)
|
||||
T.flags_1 |= stored_flags
|
||||
|
||||
if(T && ismineralturf(T))
|
||||
var/turf/closed/mineral/M = T
|
||||
M.mineralAmt = rand(1, 5)
|
||||
M.environment_type = src.environment_type
|
||||
M.turf_type = src.turf_type
|
||||
M.baseturfs = src.baseturfs
|
||||
src = M
|
||||
M.levelupdate()
|
||||
T.baseturfs = src.baseturfs
|
||||
if(ismineralturf(T))
|
||||
var/turf/closed/mineral/M = T
|
||||
M.turf_type = src.turf_type
|
||||
M.mineralAmt = rand(1, 5)
|
||||
M.environment_type = src.environment_type
|
||||
src = M
|
||||
M.levelupdate()
|
||||
else
|
||||
src = T
|
||||
T.levelupdate()
|
||||
|
||||
|
||||
/turf/closed/mineral/random/no_caves
|
||||
mineralSpawnChanceList = list(/turf/closed/mineral/uranium = 5, /turf/closed/mineral/diamond = 1, /turf/closed/mineral/gold = 10,
|
||||
/turf/closed/mineral/silver = 12, /turf/closed/mineral/plasma = 20, /turf/closed/mineral/iron = 40, /turf/closed/mineral/titanium = 11,
|
||||
/turf/closed/mineral/gibtonite = 4, /turf/closed/mineral/bscrystal = 1)
|
||||
|
||||
/turf/closed/mineral/random/no_caves/earth_like
|
||||
icon_state = "rock_oxy"
|
||||
turf_type = /turf/open/floor/plating/asteroid
|
||||
baseturfs = /turf/open/floor/plating/asteroid
|
||||
mineralSpawnChanceList = list(/turf/closed/mineral/uranium/earth_like = 5, /turf/closed/mineral/diamond/earth_like = 1, /turf/closed/mineral/gold/earth_like = 10,
|
||||
/turf/closed/mineral/silver/earth_like = 12, /turf/closed/mineral/plasma/earth_like = 20, /turf/closed/mineral/iron/earth_like = 40,
|
||||
/turf/closed/mineral/titanium/earth_like = 11, /turf/closed/mineral/gibtonite/earth_like = 4, /turf/closed/mineral/bscrystal/earth_like = 1)
|
||||
initial_gas_mix = OPENTURF_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
else
|
||||
Change_Ore(path, 1)
|
||||
Spread_Vein(path)
|
||||
|
||||
/turf/closed/mineral/random/high_chance
|
||||
icon_state = "rock_highchance"
|
||||
mineralChance = 25
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium = 35, /turf/closed/mineral/diamond = 30, /turf/closed/mineral/gold = 45, /turf/closed/mineral/titanium = 45,
|
||||
/turf/closed/mineral/silver = 50, /turf/closed/mineral/plasma = 50, /turf/closed/mineral/bscrystal = 20)
|
||||
/obj/item/stack/ore/uranium = 35, /obj/item/stack/ore/diamond = 30, /obj/item/stack/ore/gold = 45, /obj/item/stack/ore/titanium = 45,
|
||||
/obj/item/stack/ore/silver = 50, /obj/item/stack/ore/plasma = 50, /obj/item/stack/ore/bluespace_crystal = 20)
|
||||
|
||||
/turf/closed/mineral/random/high_chance/volcanic
|
||||
environment_type = "basalt"
|
||||
@@ -202,55 +235,16 @@
|
||||
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium/volcanic = 35, /turf/closed/mineral/diamond/volcanic = 30, /turf/closed/mineral/gold/volcanic = 45, /turf/closed/mineral/titanium/volcanic = 45,
|
||||
/turf/closed/mineral/silver/volcanic = 50, /turf/closed/mineral/plasma/volcanic = 50, /turf/closed/mineral/bscrystal/volcanic = 20)
|
||||
|
||||
/turf/closed/mineral/random/high_chance/snow
|
||||
name = "snowy mountainside"
|
||||
icon = 'icons/turf/mining.dmi'
|
||||
smooth_icon = 'icons/turf/walls/mountain_wall.dmi'
|
||||
icon_state = "mountainrock"
|
||||
smooth = SMOOTH_MORE|SMOOTH_BORDER
|
||||
canSmoothWith = list (/turf/closed)
|
||||
defer_change = TRUE
|
||||
environment_type = "snow"
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/icemoon
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/icemoon
|
||||
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium/ice/icemoon = 35, /turf/closed/mineral/diamond/ice/icemoon = 30, /turf/closed/mineral/gold/ice/icemoon = 45, /turf/closed/mineral/titanium/ice/icemoon = 45,
|
||||
/turf/closed/mineral/silver/ice/icemoon = 50, /turf/closed/mineral/plasma/ice/icemoon = 50, /turf/closed/mineral/bscrystal/ice/icemoon = 20)
|
||||
|
||||
/turf/closed/mineral/random/high_chance/earth_like
|
||||
icon_state = "rock_highchance_oxy"
|
||||
turf_type = /turf/open/floor/plating/asteroid
|
||||
baseturfs = /turf/open/floor/plating/asteroid
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium/earth_like = 35, /turf/closed/mineral/diamond/earth_like = 30, /turf/closed/mineral/gold/earth_like = 45,
|
||||
/turf/closed/mineral/titanium/earth_like = 45, /turf/closed/mineral/silver/earth_like = 50, /turf/closed/mineral/plasma/earth_like = 50,
|
||||
/turf/closed/mineral/bscrystal/earth_like = 20)
|
||||
initial_gas_mix = OPENTURF_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/obj/item/stack/ore/uranium = 35, /obj/item/stack/ore/diamond = 30, /obj/item/stack/ore/gold = 45, /obj/item/stack/ore/titanium = 45,
|
||||
/obj/item/stack/ore/silver = 50, /obj/item/stack/ore/plasma = 50, /obj/item/stack/ore/bluespace_crystal)
|
||||
|
||||
/turf/closed/mineral/random/low_chance
|
||||
icon_state = "rock_lowchance"
|
||||
mineralChance = 6
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium = 2, /turf/closed/mineral/diamond = 1, /turf/closed/mineral/gold = 4, /turf/closed/mineral/titanium = 4,
|
||||
/turf/closed/mineral/silver = 6, /turf/closed/mineral/plasma = 15, /turf/closed/mineral/iron = 40,
|
||||
/turf/closed/mineral/gibtonite = 2, /turf/closed/mineral/bscrystal = 1)
|
||||
|
||||
/turf/closed/mineral/random/low_chance/earth_like
|
||||
icon_state = "rock_lowchance_oxy"
|
||||
turf_type = /turf/open/floor/plating/asteroid
|
||||
baseturfs = /turf/open/floor/plating/asteroid
|
||||
initial_gas_mix = OPENTURF_DEFAULT_ATMOS
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium/earth_like = 2, /turf/closed/mineral/diamond/earth_like = 1, /turf/closed/mineral/gold/earth_like = 4,
|
||||
/turf/closed/mineral/titanium/earth_like = 4, /turf/closed/mineral/silver/earth_like = 6, /turf/closed/mineral/plasma/earth_like = 15,
|
||||
/turf/closed/mineral/iron/earth_like = 40, /turf/closed/mineral/gibtonite/earth_like = 2, /turf/closed/mineral/bscrystal/earth_like = 1)
|
||||
defer_change = TRUE
|
||||
/obj/item/stack/ore/uranium = 2, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 4, /obj/item/stack/ore/titanium = 4,
|
||||
/obj/item/stack/ore/silver = 6, /obj/item/stack/ore/plasma = 15, /obj/item/stack/ore/iron = 40,
|
||||
/turf/closed/mineral/gibtonite = 2, /obj/item/stack/ore/bluespace_crystal = 1)
|
||||
|
||||
/turf/closed/mineral/random/volcanic
|
||||
environment_type = "basalt"
|
||||
@@ -261,15 +255,9 @@
|
||||
|
||||
mineralChance = 10
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium/volcanic = 5, /turf/closed/mineral/diamond/volcanic = 1, /turf/closed/mineral/gold/volcanic = 10, /turf/closed/mineral/titanium/volcanic = 11,
|
||||
/turf/closed/mineral/silver/volcanic = 12, /turf/closed/mineral/plasma/volcanic = 20, /turf/closed/mineral/iron/volcanic = 40,
|
||||
/turf/closed/mineral/gibtonite/volcanic = 4, /turf/open/floor/plating/asteroid/airless/cave/volcanic = 1, /turf/closed/mineral/bscrystal/volcanic = 1)
|
||||
|
||||
/turf/closed/mineral/random/volcanic/more_caves
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium/volcanic = 5, /turf/closed/mineral/diamond/volcanic = 1, /turf/closed/mineral/gold/volcanic = 10, /turf/closed/mineral/titanium/volcanic = 11,
|
||||
/turf/closed/mineral/silver/volcanic = 12, /turf/closed/mineral/plasma/volcanic = 20, /turf/closed/mineral/iron/volcanic = 40,
|
||||
/turf/closed/mineral/gibtonite/volcanic = 4, /turf/open/floor/plating/asteroid/airless/cave/volcanic = 15, /turf/closed/mineral/bscrystal/volcanic = 1)
|
||||
/obj/item/stack/ore/uranium = 5, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 10, /obj/item/stack/ore/titanium = 11,
|
||||
/obj/item/stack/ore/silver = 12, /obj/item/stack/ore/plasma = 20, /obj/item/stack/ore/iron = 40,
|
||||
/turf/closed/mineral/gibtonite/volcanic = 4, /obj/item/stack/ore/bluespace_crystal = 1)
|
||||
|
||||
/turf/closed/mineral/random/snow
|
||||
name = "snowy mountainside"
|
||||
@@ -283,38 +271,43 @@
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/icemoon
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/icemoon
|
||||
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
|
||||
weak_turf = TRUE
|
||||
|
||||
mineralChance = 10
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium/ice/icemoon = 5, /turf/closed/mineral/diamond/ice/icemoon = 1, /turf/closed/mineral/gold/ice/icemoon = 10, /turf/closed/mineral/titanium/ice/icemoon = 11,
|
||||
/turf/closed/mineral/silver/ice/icemoon = 12, /turf/closed/mineral/plasma/ice/icemoon = 20, /turf/closed/mineral/iron/ice/icemoon = 40,
|
||||
/turf/closed/mineral/gibtonite/ice/icemoon = 4, /turf/open/floor/plating/asteroid/airless/cave/snow = 1, /turf/closed/mineral/bscrystal/ice/icemoon = 1)
|
||||
/turf/closed/mineral/random/snow/Change_Ore(ore_type, random = 0)
|
||||
. = ..()
|
||||
if(mineralType)
|
||||
smooth_icon = 'icons/turf/walls/icerock_wall.dmi'
|
||||
icon = 'icons/turf/walls/icerock_wall.dmi'
|
||||
icon_state = "icerock_wall-0"
|
||||
// base_icon_state = "icerock_wall"
|
||||
smooth = SMOOTH_MORE|SMOOTH_BORDER
|
||||
|
||||
/turf/closed/mineral/random/snow/no_caves
|
||||
/turf/closed/mineral/random/snow
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium/ice/icemoon = 5, /turf/closed/mineral/diamond/ice/icemoon = 1, /turf/closed/mineral/gold/ice/icemoon = 10, /turf/closed/mineral/titanium/ice/icemoon = 11,
|
||||
/turf/closed/mineral/silver/ice/icemoon = 12, /turf/closed/mineral/plasma/ice/icemoon = 20, /turf/closed/mineral/iron/ice/icemoon = 40,
|
||||
/turf/closed/mineral/gibtonite/ice/icemoon = 4, /turf/closed/mineral/bscrystal/ice/icemoon = 1)
|
||||
|
||||
/turf/closed/mineral/random/labormineral
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium = 3, /turf/closed/mineral/diamond = 1, /turf/closed/mineral/gold = 8, /turf/closed/mineral/titanium = 8,
|
||||
/turf/closed/mineral/silver = 20, /turf/closed/mineral/plasma = 30, /turf/closed/mineral/iron = 95,
|
||||
/turf/closed/mineral/gibtonite = 2)
|
||||
icon_state = "rock_labor"
|
||||
/obj/item/stack/ore/uranium = 5, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 10, /obj/item/stack/ore/titanium = 11,
|
||||
/obj/item/stack/ore/silver = 12, /obj/item/stack/ore/plasma = 20, /obj/item/stack/ore/iron = 40,
|
||||
/turf/closed/mineral/gibtonite/ice/icemoon = 4, /obj/item/stack/ore/bluespace_crystal = 1)
|
||||
|
||||
/turf/closed/mineral/random/snow/underground
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/icemoon
|
||||
// abundant ore
|
||||
mineralChance = 20
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium/ice/icemoon = 5, /turf/closed/mineral/diamond/ice/icemoon = 1, /turf/closed/mineral/gold/ice/icemoon = 10, /turf/closed/mineral/titanium/ice/icemoon = 11,
|
||||
/turf/closed/mineral/silver/ice/icemoon = 12, /turf/closed/mineral/plasma/ice/icemoon = 20, /turf/closed/mineral/iron/ice/icemoon = 40,
|
||||
/turf/closed/mineral/gibtonite/ice/icemoon = 4, /turf/open/floor/plating/asteroid/airless/cave/snow/underground = 1, /turf/closed/mineral/bscrystal/ice/icemoon = 1)
|
||||
/obj/item/stack/ore/uranium = 10, /obj/item/stack/ore/diamond = 4, /obj/item/stack/ore/gold = 20, /obj/item/stack/ore/titanium = 22,
|
||||
/obj/item/stack/ore/silver = 24, /obj/item/stack/ore/plasma = 20, /obj/item/stack/ore/iron = 20, /obj/item/stack/ore/bananium = 1,
|
||||
/turf/closed/mineral/gibtonite/ice/icemoon = 8, /obj/item/stack/ore/bluespace_crystal = 2)
|
||||
|
||||
/turf/closed/mineral/random/snow/more_caves
|
||||
/turf/closed/mineral/random/snow/high_chance
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium/ice/icemoon = 5, /turf/closed/mineral/diamond/ice/icemoon = 1, /turf/closed/mineral/gold/ice/icemoon = 10, /turf/closed/mineral/titanium/ice/icemoon = 11,
|
||||
/turf/closed/mineral/silver/ice/icemoon = 12, /turf/closed/mineral/plasma/ice/icemoon = 20, /turf/closed/mineral/iron/ice/icemoon = 40,
|
||||
/turf/closed/mineral/gibtonite/ice/icemoon = 4, /turf/open/floor/plating/asteroid/airless/cave/snow = 15, /turf/closed/mineral/bscrystal/ice/icemoon = 1)
|
||||
/obj/item/stack/ore/uranium = 35, /obj/item/stack/ore/diamond = 30, /obj/item/stack/ore/gold = 45, /obj/item/stack/ore/titanium = 45,
|
||||
/obj/item/stack/ore/silver = 50, /obj/item/stack/ore/plasma = 50, /obj/item/stack/ore/bluespace_crystal = 20)
|
||||
|
||||
/turf/closed/mineral/random/labormineral
|
||||
icon_state = "rock_labor"
|
||||
mineralSpawnChanceList = list(
|
||||
/obj/item/stack/ore/uranium = 3, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 8, /obj/item/stack/ore/titanium = 8,
|
||||
/obj/item/stack/ore/silver = 20, /obj/item/stack/ore/plasma = 30, /obj/item/stack/ore/iron = 95,
|
||||
/turf/closed/mineral/gibtonite = 2)
|
||||
|
||||
/turf/closed/mineral/random/labormineral/volcanic
|
||||
environment_type = "basalt"
|
||||
@@ -323,16 +316,17 @@
|
||||
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium/volcanic = 3, /turf/closed/mineral/diamond/volcanic = 1, /turf/closed/mineral/gold/volcanic = 8, /turf/closed/mineral/titanium/volcanic = 8,
|
||||
/turf/closed/mineral/silver/volcanic = 20, /turf/closed/mineral/plasma/volcanic = 30, /turf/closed/mineral/bscrystal/volcanic = 1, /turf/closed/mineral/gibtonite/volcanic = 2,
|
||||
/turf/closed/mineral/iron/volcanic = 95)
|
||||
/obj/item/stack/ore/uranium = 3, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 8, /obj/item/stack/ore/titanium = 8,
|
||||
/obj/item/stack/ore/silver = 20, /obj/item/stack/ore/plasma = 30, /obj/item/stack/ore/bluespace_crystal = 1, /turf/closed/mineral/gibtonite/volcanic = 2,
|
||||
/obj/item/stack/ore/iron = 95)
|
||||
|
||||
//Subtypes for placing ores manually.
|
||||
// Subtypes for mappers placing ores manually.
|
||||
/turf/closed/mineral/random/labormineral/ice
|
||||
name = "snowy mountainside"
|
||||
icon = 'icons/turf/mining.dmi'
|
||||
smooth_icon = 'icons/turf/walls/mountain_wall.dmi'
|
||||
icon_state = "mountainrock"
|
||||
// base_icon_state = "mountain_wall"
|
||||
smooth = SMOOTH_MORE|SMOOTH_BORDER
|
||||
canSmoothWith = list (/turf/closed)
|
||||
defer_change = TRUE
|
||||
@@ -340,124 +334,57 @@
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/icemoon
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/icemoon
|
||||
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
|
||||
|
||||
defer_change = TRUE
|
||||
mineralSpawnChanceList = list(
|
||||
/turf/closed/mineral/uranium/ice/icemoon = 3, /turf/closed/mineral/diamond/ice/icemoon = 1, /turf/closed/mineral/gold/ice/icemoon = 8, /turf/closed/mineral/titanium/ice/icemoon = 8,
|
||||
/turf/closed/mineral/silver/ice/icemoon = 20, /turf/closed/mineral/plasma/ice/icemoon = 30, /turf/closed/mineral/bscrystal/ice/icemoon = 1, /turf/closed/mineral/gibtonite/ice/icemoon = 2,
|
||||
/turf/closed/mineral/iron/ice/icemoon = 95)
|
||||
|
||||
/obj/item/stack/ore/uranium = 3, /obj/item/stack/ore/diamond = 1, /obj/item/stack/ore/gold = 8, /obj/item/stack/ore/titanium = 8,
|
||||
/obj/item/stack/ore/silver = 20, /obj/item/stack/ore/plasma = 30, /obj/item/stack/ore/bluespace_crystal = 1, /turf/closed/mineral/gibtonite/volcanic = 2,
|
||||
/obj/item/stack/ore/iron = 95)
|
||||
|
||||
/turf/closed/mineral/random/labormineral/ice/Change_Ore(ore_type, random = 0)
|
||||
. = ..()
|
||||
if(mineralType)
|
||||
smooth_icon = 'icons/turf/walls/icerock_wall.dmi'
|
||||
icon = 'icons/turf/walls/icerock_wall.dmi'
|
||||
icon_state = "icerock_wall-0"
|
||||
// base_icon_state = "icerock_wall"
|
||||
smooth = SMOOTH_MORE|SMOOTH_BORDER
|
||||
|
||||
/turf/closed/mineral/iron
|
||||
mineralType = /obj/item/stack/ore/iron
|
||||
spreadChance = 20
|
||||
spread = 1
|
||||
scan_state = "rock_Iron"
|
||||
|
||||
/turf/closed/mineral/iron/volcanic
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
|
||||
defer_change = 1
|
||||
|
||||
/turf/closed/mineral/iron/earth_like
|
||||
icon_state = "rock_oxy"
|
||||
turf_type = /turf/open/floor/plating/asteroid
|
||||
baseturfs = /turf/open/floor/plating/asteroid
|
||||
initial_gas_mix = OPENTURF_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/iron/ice
|
||||
environment_type = "snow_cavern"
|
||||
icon_state = "icerock_iron"
|
||||
smooth_icon = 'icons/turf/walls/icerock_wall.dmi'
|
||||
// base_icon_state = "icerock_wall"
|
||||
// smoothing_flags = SMOOTH_BITMASK | SMOOTH_BORDER
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/ice
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice
|
||||
initial_gas_mix = FROZEN_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/iron/ice/icemoon
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
|
||||
|
||||
|
||||
/turf/closed/mineral/uranium
|
||||
mineralType = /obj/item/stack/ore/uranium
|
||||
spreadChance = 5
|
||||
spread = 1
|
||||
scan_state = "rock_Uranium"
|
||||
|
||||
/turf/closed/mineral/uranium/volcanic
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/uranium/ice
|
||||
environment_type = "snow_cavern"
|
||||
icon_state = "icerock_Uranium"
|
||||
smooth_icon = 'icons/turf/walls/icerock_wall.dmi'
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/ice
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice
|
||||
initial_gas_mix = FROZEN_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/uranium/ice/icemoon
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
|
||||
|
||||
/turf/closed/mineral/uranium/earth_like
|
||||
icon_state = "rock_oxy"
|
||||
turf_type = /turf/open/floor/plating/asteroid
|
||||
baseturfs = /turf/open/floor/plating/asteroid
|
||||
initial_gas_mix = OPENTURF_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
|
||||
/turf/closed/mineral/diamond
|
||||
mineralType = /obj/item/stack/ore/diamond
|
||||
spreadChance = 0
|
||||
spread = 1
|
||||
scan_state = "rock_Diamond"
|
||||
|
||||
/turf/closed/mineral/diamond/volcanic
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/diamond/earth_like
|
||||
icon_state = "rock_oxy"
|
||||
turf_type = /turf/open/floor/plating/asteroid
|
||||
baseturfs = /turf/open/floor/plating/asteroid
|
||||
initial_gas_mix = OPENTURF_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/diamond/ice
|
||||
environment_type = "snow_cavern"
|
||||
icon_state = "icerock_diamond"
|
||||
smooth_icon = 'icons/turf/walls/icerock_wall.dmi'
|
||||
// base_icon_state = "icerock_wall"
|
||||
// smoothing_flags = SMOOTH_BITMASK | SMOOTH_BORDER
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/ice
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice
|
||||
initial_gas_mix = FROZEN_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/diamond/ice/icemoon
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
|
||||
|
||||
|
||||
/turf/closed/mineral/gold
|
||||
mineralType = /obj/item/stack/ore/gold
|
||||
spreadChance = 5
|
||||
spread = 1
|
||||
scan_state = "rock_Gold"
|
||||
|
||||
/turf/closed/mineral/gold/volcanic
|
||||
@@ -467,56 +394,10 @@
|
||||
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/gold/earth_like
|
||||
icon_state = "rock_oxy"
|
||||
turf_type = /turf/open/floor/plating/asteroid
|
||||
baseturfs = /turf/open/floor/plating/asteroid
|
||||
initial_gas_mix = OPENTURF_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/gold/ice
|
||||
environment_type = "snow_cavern"
|
||||
icon_state = "icerock_gold"
|
||||
smooth_icon = 'icons/turf/walls/icerock_wall.dmi'
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/ice
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice
|
||||
initial_gas_mix = FROZEN_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/gold/ice/icemoon
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
|
||||
|
||||
/turf/closed/mineral/silver
|
||||
mineralType = /obj/item/stack/ore/silver
|
||||
spreadChance = 5
|
||||
spread = 1
|
||||
scan_state = "rock_Silver"
|
||||
|
||||
/turf/closed/mineral/silver/volcanic
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/silver/earth_like
|
||||
icon_state = "rock_oxy"
|
||||
turf_type = /turf/open/floor/plating/asteroid
|
||||
baseturfs = /turf/open/floor/plating/asteroid
|
||||
initial_gas_mix = OPENTURF_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/silver/ice
|
||||
environment_type = "snow_cavern"
|
||||
icon_state = "icerock_silver"
|
||||
smooth_icon = 'icons/turf/walls/icerock_wall.dmi'
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/ice
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice
|
||||
initial_gas_mix = FROZEN_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/silver/ice/icemoon
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
@@ -524,107 +405,31 @@
|
||||
|
||||
/turf/closed/mineral/titanium
|
||||
mineralType = /obj/item/stack/ore/titanium
|
||||
spreadChance = 5
|
||||
spread = 1
|
||||
scan_state = "rock_Titanium"
|
||||
|
||||
/turf/closed/mineral/titanium/volcanic
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/titanium/earth_like
|
||||
icon_state = "rock_oxy"
|
||||
turf_type = /turf/open/floor/plating/asteroid
|
||||
baseturfs = /turf/open/floor/plating/asteroid
|
||||
initial_gas_mix = OPENTURF_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/titanium/ice
|
||||
environment_type = "snow_cavern"
|
||||
icon_state = "icerock_titanium"
|
||||
smooth_icon = 'icons/turf/walls/icerock_wall.dmi'
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/ice
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice
|
||||
initial_gas_mix = FROZEN_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/titanium/ice/icemoon
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
|
||||
|
||||
/turf/closed/mineral/plasma
|
||||
mineralType = /obj/item/stack/ore/plasma
|
||||
spreadChance = 8
|
||||
spread = 1
|
||||
scan_state = "rock_Plasma"
|
||||
|
||||
/turf/closed/mineral/plasma/volcanic
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/plasma/earth_like
|
||||
icon_state = "rock_oxy"
|
||||
turf_type = /turf/open/floor/plating/asteroid
|
||||
baseturfs = /turf/open/floor/plating/asteroid
|
||||
initial_gas_mix = OPENTURF_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/plasma/ice
|
||||
environment_type = "snow_cavern"
|
||||
icon_state = "icerock_plasma"
|
||||
smooth_icon = 'icons/turf/walls/icerock_wall.dmi'
|
||||
// base_icon_state = "icerock_wall"
|
||||
// smoothing_flags = SMOOTH_BITMASK | SMOOTH_BORDER
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/ice
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice
|
||||
initial_gas_mix = FROZEN_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/plasma/ice/icemoon
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
|
||||
|
||||
|
||||
/turf/closed/mineral/bananium
|
||||
mineralType = /obj/item/stack/ore/bananium
|
||||
mineralAmt = 3
|
||||
spreadChance = 0
|
||||
spread = 0
|
||||
scan_state = "rock_Bananium"
|
||||
|
||||
/turf/closed/mineral/bananium/earth_like
|
||||
icon_state = "rock_oxy"
|
||||
turf_type = /turf/open/floor/plating/asteroid
|
||||
baseturfs = /turf/open/floor/plating/asteroid
|
||||
initial_gas_mix = OPENTURF_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/bananium/ice
|
||||
environment_type = "snow_cavern"
|
||||
icon_state = "icerock_Bananium"
|
||||
smooth_icon = 'icons/turf/walls/icerock_wall.dmi'
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/ice
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice
|
||||
initial_gas_mix = FROZEN_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/bananium/ice/icemoon
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
|
||||
|
||||
|
||||
/turf/closed/mineral/bscrystal
|
||||
mineralType = /obj/item/stack/ore/bluespace_crystal
|
||||
mineralAmt = 1
|
||||
spreadChance = 0
|
||||
spread = 0
|
||||
scan_state = "rock_BScrystal"
|
||||
|
||||
/turf/closed/mineral/bscrystal/volcanic
|
||||
@@ -634,27 +439,6 @@
|
||||
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/bscrystal/earth_like
|
||||
icon_state = "rock_oxy"
|
||||
turf_type = /turf/open/floor/plating/asteroid
|
||||
baseturfs = /turf/open/floor/plating/asteroid
|
||||
initial_gas_mix = OPENTURF_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/bscrystal/ice
|
||||
environment_type = "snow_cavern"
|
||||
icon_state = "icerock_BScrystal"
|
||||
smooth_icon = 'icons/turf/walls/icerock_wall.dmi'
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/ice
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice
|
||||
initial_gas_mix = FROZEN_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/bscrystal/ice/icemoon
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice/icemoon
|
||||
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
|
||||
|
||||
/turf/closed/mineral/volcanic
|
||||
environment_type = "basalt"
|
||||
turf_type = /turf/open/floor/plating/asteroid/basalt
|
||||
@@ -667,18 +451,12 @@
|
||||
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/earth_like
|
||||
icon_state = "rock_oxy"
|
||||
turf_type = /turf/open/floor/plating/asteroid
|
||||
baseturfs = /turf/open/floor/plating/asteroid
|
||||
initial_gas_mix = OPENTURF_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/ash_rock //wall piece
|
||||
name = "rock"
|
||||
icon = 'icons/turf/mining.dmi'
|
||||
smooth_icon = 'icons/turf/walls/rock_wall.dmi'
|
||||
icon_state = "rock2"
|
||||
// base_icon_state = "rock_wall"
|
||||
smooth = SMOOTH_MORE|SMOOTH_BORDER
|
||||
canSmoothWith = list (/turf/closed)
|
||||
baseturfs = /turf/open/floor/plating/ashplanet/wateryrock
|
||||
@@ -692,6 +470,7 @@
|
||||
icon = 'icons/turf/mining.dmi'
|
||||
smooth_icon = 'icons/turf/walls/mountain_wall.dmi'
|
||||
icon_state = "mountainrock"
|
||||
// base_icon_state = "mountain_wall"
|
||||
smooth = SMOOTH_MORE|SMOOTH_BORDER
|
||||
canSmoothWith = list (/turf/closed)
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow
|
||||
@@ -710,6 +489,7 @@
|
||||
icon = 'icons/turf/mining.dmi'
|
||||
smooth_icon = 'icons/turf/walls/icerock_wall.dmi'
|
||||
icon_state = "icerock"
|
||||
// base_icon_state = "icerock_wall"
|
||||
smooth = SMOOTH_MORE|SMOOTH_BORDER
|
||||
canSmoothWith = list (/turf/closed)
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice
|
||||
@@ -725,8 +505,6 @@
|
||||
|
||||
/turf/closed/mineral/gibtonite
|
||||
mineralAmt = 1
|
||||
spreadChance = 0
|
||||
spread = 0
|
||||
scan_state = "rock_Gibtonite"
|
||||
var/det_time = 8 //Countdown till explosion, but also rewards the player for how close you were to detonation when you defuse it
|
||||
var/stage = GIBTONITE_UNSTRUCK //How far into the lifecycle of gibtonite we are
|
||||
@@ -746,21 +524,15 @@
|
||||
|
||||
/turf/closed/mineral/gibtonite/proc/explosive_reaction(mob/user = null, triggered_by_explosion = 0)
|
||||
if(stage == GIBTONITE_UNSTRUCK)
|
||||
activated_overlay = mutable_appearance('icons/turf/smoothrocks.dmi', "rock_Gibtonite_active", ON_EDGED_TURF_LAYER)
|
||||
activated_overlay = mutable_appearance('icons/turf/smoothrocks.dmi', "rock_Gibtonite_inactive", ON_EDGED_TURF_LAYER) //shows in gaps between pulses if there are any
|
||||
add_overlay(activated_overlay)
|
||||
name = "gibtonite deposit"
|
||||
desc = "An active gibtonite reserve. Run!"
|
||||
stage = GIBTONITE_ACTIVE
|
||||
visible_message("<span class='danger'>There was gibtonite inside! It's going to explode!</span>")
|
||||
var/turf/bombturf = get_turf(src)
|
||||
visible_message("<span class='danger'>There's gibtonite inside! It's going to explode!</span>")
|
||||
|
||||
var/notify_admins = 0
|
||||
if(z != 5)
|
||||
notify_admins = 1
|
||||
if(!triggered_by_explosion)
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] has triggered a gibtonite deposit reaction at [ADMIN_VERBOSEJMP(bombturf)].")
|
||||
else
|
||||
message_admins("An explosion has triggered a gibtonite deposit reaction at [ADMIN_VERBOSEJMP(bombturf)].")
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/notify_admins = !is_mining_level(z)
|
||||
|
||||
if(!triggered_by_explosion)
|
||||
log_game("[key_name(user)] has triggered a gibtonite deposit reaction at [AREACOORD(bombturf)].")
|
||||
@@ -769,9 +541,10 @@
|
||||
|
||||
countdown(notify_admins)
|
||||
|
||||
/turf/closed/mineral/gibtonite/proc/countdown(notify_admins = 0)
|
||||
set waitfor = 0
|
||||
/turf/closed/mineral/gibtonite/proc/countdown(notify_admins = FALSE)
|
||||
set waitfor = FALSE
|
||||
while(istype(src, /turf/closed/mineral/gibtonite) && stage == GIBTONITE_ACTIVE && det_time > 0 && mineralAmt >= 1)
|
||||
flick_overlay_view(image('icons/turf/smoothrocks.dmi', src, "rock_Gibtonite_active"), src, 5) //makes the animation pulse one time per tick
|
||||
det_time--
|
||||
sleep(5)
|
||||
if(istype(src, /turf/closed/mineral/gibtonite))
|
||||
@@ -790,18 +563,18 @@
|
||||
stage = GIBTONITE_STABLE
|
||||
if(det_time < 0)
|
||||
det_time = 0
|
||||
visible_message("<span class='notice'>The chain reaction was stopped! The gibtonite had [det_time] reactions left till the explosion!</span>")
|
||||
visible_message("<span class='notice'>The chain reaction stopped! The gibtonite had [det_time] reactions left till the explosion!</span>")
|
||||
|
||||
/turf/closed/mineral/gibtonite/gets_drilled(mob/user, triggered_by_explosion = 0)
|
||||
/turf/closed/mineral/gibtonite/gets_drilled(mob/user, triggered_by_explosion = FALSE)
|
||||
if(stage == GIBTONITE_UNSTRUCK && mineralAmt >= 1) //Gibtonite deposit is activated
|
||||
playsound(src,'sound/effects/hit_on_shattered_glass.ogg',50,1)
|
||||
playsound(src,'sound/effects/hit_on_shattered_glass.ogg',50,TRUE)
|
||||
explosive_reaction(user, triggered_by_explosion)
|
||||
return
|
||||
if(stage == GIBTONITE_ACTIVE && mineralAmt >= 1) //Gibtonite deposit goes kaboom
|
||||
var/turf/bombturf = get_turf(src)
|
||||
mineralAmt = 0
|
||||
stage = GIBTONITE_DETONATE
|
||||
explosion(bombturf,1,2,5, adminlog = 0)
|
||||
explosion(bombturf,1,2,5, adminlog = FALSE)
|
||||
if(stage == GIBTONITE_STABLE) //Gibtonite deposit is now benign and extractable. Depending on how close you were to it blowing up before defusing, you get better quality ore.
|
||||
var/obj/item/gibtonite/G = new (src)
|
||||
if(det_time <= 0)
|
||||
@@ -825,18 +598,12 @@
|
||||
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
/turf/closed/mineral/gibtonite/earth_like
|
||||
icon_state = "rock_oxy"
|
||||
turf_type = /turf/open/floor/plating/asteroid
|
||||
baseturfs = /turf/open/floor/plating/asteroid
|
||||
initial_gas_mix = OPENTURF_DEFAULT_ATMOS
|
||||
defer_change = TRUE
|
||||
|
||||
|
||||
/turf/closed/mineral/gibtonite/ice
|
||||
environment_type = "snow_cavern"
|
||||
icon_state = "icerock_Gibtonite"
|
||||
smooth_icon = 'icons/turf/walls/icerock_wall.dmi'
|
||||
// base_icon_state = "icerock_wall"
|
||||
// smoothing_flags = SMOOTH_BITMASK | SMOOTH_BORDER
|
||||
turf_type = /turf/open/floor/plating/asteroid/snow/ice
|
||||
baseturfs = /turf/open/floor/plating/asteroid/snow/ice
|
||||
initial_gas_mix = FROZEN_ATMOS
|
||||
@@ -856,18 +623,18 @@
|
||||
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
|
||||
defer_change = 1
|
||||
smooth_icon = 'icons/turf/walls/rock_wall.dmi'
|
||||
// base_icon_state = "rock_wall"
|
||||
// smoothing_flags = SMOOTH_BITMASK | SMOOTH_BORDER
|
||||
|
||||
// /turf/closed/mineral/strong/attackby(obj/item/I, mob/user, params)
|
||||
// if(!ishuman(user))
|
||||
// to_chat(usr, "<span class='warning'>Only a more advanced species could break a rock such as this one!</span>")
|
||||
// return FALSE
|
||||
// if(user.mind?.get_skill_level(/datum/skill/mining) >= SKILL_LEVEL_MASTER)
|
||||
// . = ..()
|
||||
// else
|
||||
// to_chat(usr, "<span class='warning'>The rock seems to be too strong to destroy. Maybe I can break it once I become a master miner.</span>")
|
||||
|
||||
/*
|
||||
/turf/closed/mineral/strong/attackby(obj/item/I, mob/user, params)
|
||||
if(!ishuman(user))
|
||||
to_chat(usr, "<span class='warning'>Only a more advanced species could break a rock such as this one!</span>")
|
||||
return FALSE
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.mind.get_skill_level(/datum/skill/mining) >= SKILL_LEVEL_MASTER)
|
||||
. = ..()
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>The rock seems to be too strong to destroy. Maybe I can break it once I become a master miner.</span>")
|
||||
*/
|
||||
|
||||
/turf/closed/mineral/strong/gets_drilled(mob/user)
|
||||
if(!ishuman(user))
|
||||
@@ -896,3 +663,5 @@
|
||||
|
||||
/turf/closed/mineral/strong/ex_act(severity, target)
|
||||
return
|
||||
|
||||
#undef MINING_MESSAGE_COOLDOWN
|
||||
|
||||
@@ -0,0 +1,186 @@
|
||||
GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdrop, new)
|
||||
|
||||
/atom/movable/openspace_backdrop
|
||||
name = "openspace_backdrop"
|
||||
|
||||
anchored = TRUE
|
||||
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "grey"
|
||||
plane = OPENSPACE_BACKDROP_PLANE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
layer = SPLASHSCREEN_LAYER
|
||||
//I don't know why the others are aligned but I shall do the same.
|
||||
vis_flags = VIS_INHERIT_ID
|
||||
|
||||
/turf/open/openspace
|
||||
name = "open space"
|
||||
desc = "Watch your step!"
|
||||
icon_state = "transparent"
|
||||
baseturfs = /turf/open/openspace
|
||||
CanAtmosPassVertical = ATMOS_PASS_YES
|
||||
baseturfs = /turf/open/openspace
|
||||
intact = FALSE //this means wires go on top
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
var/can_cover_up = TRUE
|
||||
var/can_build_on = TRUE
|
||||
|
||||
/turf/open/openspace/airless
|
||||
initial_gas_mix = AIRLESS_ATMOS
|
||||
|
||||
// /turf/open/transparent/openspace/debug/update_multiz()
|
||||
// ..()
|
||||
// return TRUE
|
||||
|
||||
// ///No bottom level for openspace.
|
||||
// /turf/open/transparent/openspace/show_bottom_level()
|
||||
// return FALSE
|
||||
|
||||
/turf/open/openspace/Initialize() // handle plane and layer here so that they don't cover other obs/turfs in Dream Maker
|
||||
. = ..()
|
||||
vis_contents += GLOB.openspace_backdrop_one_for_all //Special grey square for projecting backdrop darkness filter on it.
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/turf/open/openspace/LateInitialize()
|
||||
. = ..()
|
||||
AddElement(/datum/element/turf_z_transparency, FALSE)
|
||||
|
||||
/turf/open/openspace/can_have_cabling()
|
||||
if(locate(/obj/structure/lattice/catwalk, src))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/turf/open/openspace/zAirIn()
|
||||
return TRUE
|
||||
|
||||
/turf/open/openspace/zAirOut()
|
||||
return TRUE
|
||||
|
||||
/turf/open/openspace/zPassIn(atom/movable/A, direction, turf/source)
|
||||
if(direction == DOWN)
|
||||
for(var/obj/O in contents)
|
||||
if(O.obj_flags & BLOCK_Z_IN_DOWN)
|
||||
return FALSE
|
||||
return TRUE
|
||||
if(direction == UP)
|
||||
for(var/obj/O in contents)
|
||||
if(O.obj_flags & BLOCK_Z_IN_UP)
|
||||
return FALSE
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/turf/open/openspace/zPassOut(atom/movable/A, direction, turf/destination)
|
||||
if(A.anchored)
|
||||
return FALSE
|
||||
if(direction == DOWN)
|
||||
for(var/obj/O in contents)
|
||||
if(O.obj_flags & BLOCK_Z_OUT_DOWN)
|
||||
return FALSE
|
||||
return TRUE
|
||||
if(direction == UP)
|
||||
for(var/obj/O in contents)
|
||||
if(O.obj_flags & BLOCK_Z_OUT_UP)
|
||||
return FALSE
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/turf/open/openspace/proc/CanCoverUp()
|
||||
return can_cover_up
|
||||
|
||||
/turf/open/openspace/proc/CanBuildHere()
|
||||
return can_build_on
|
||||
|
||||
/turf/open/openspace/attackby(obj/item/C, mob/user, params)
|
||||
..()
|
||||
if(!CanBuildHere())
|
||||
return
|
||||
if(istype(C, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/R = C
|
||||
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
|
||||
var/obj/structure/lattice/catwalk/W = locate(/obj/structure/lattice/catwalk, src)
|
||||
if(W)
|
||||
to_chat(user, "<span class='warning'>There is already a catwalk here!</span>")
|
||||
return
|
||||
if(L)
|
||||
if(R.use(1))
|
||||
qdel(L)
|
||||
to_chat(user, "<span class='notice'>You construct a catwalk.</span>")
|
||||
playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE)
|
||||
new/obj/structure/lattice/catwalk(src)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need two rods to build a catwalk!</span>")
|
||||
return
|
||||
if(R.use(1))
|
||||
to_chat(user, "<span class='notice'>You construct a lattice.</span>")
|
||||
playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE)
|
||||
ReplaceWithLattice()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one rod to build a lattice.</span>")
|
||||
return
|
||||
if(istype(C, /obj/item/stack/tile/plasteel))
|
||||
if(!CanCoverUp())
|
||||
return
|
||||
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
|
||||
if(L)
|
||||
var/obj/item/stack/tile/plasteel/S = C
|
||||
if(S.use(1))
|
||||
qdel(L)
|
||||
playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE)
|
||||
to_chat(user, "<span class='notice'>You build a floor.</span>")
|
||||
PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR)
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You need one floor tile to build a floor!</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>The plating is going to need some support! Place iron rods first.</span>")
|
||||
|
||||
/turf/open/openspace/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
|
||||
if(!CanBuildHere())
|
||||
return FALSE
|
||||
|
||||
switch(the_rcd.mode)
|
||||
if(RCD_FLOORWALL)
|
||||
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
|
||||
if(L)
|
||||
return list("mode" = RCD_FLOORWALL, "delay" = 0, "cost" = 1)
|
||||
else
|
||||
return list("mode" = RCD_FLOORWALL, "delay" = 0, "cost" = 3)
|
||||
return FALSE
|
||||
|
||||
/turf/open/openspace/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
|
||||
switch(passed_mode)
|
||||
if(RCD_FLOORWALL)
|
||||
to_chat(user, "<span class='notice'>You build a floor.</span>")
|
||||
PlaceOnTop(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/turf/open/openspace/icemoon
|
||||
name = "ice chasm"
|
||||
baseturfs = /turf/open/openspace/icemoon
|
||||
initial_gas_mix = ICEMOON_DEFAULT_ATMOS
|
||||
planetary_atmos = TRUE
|
||||
var/replacement_turf = /turf/open/floor/plating/asteroid/snow/icemoon
|
||||
/// Replaces itself with replacement_turf if the turf below this one is in a no ruins allowed area (usually ruins themselves)
|
||||
var/protect_ruin = TRUE
|
||||
/// If true mineral turfs below this openspace turf will be mined automatically
|
||||
var/drill_below = TRUE
|
||||
|
||||
/turf/open/openspace/icemoon/Initialize()
|
||||
. = ..()
|
||||
var/turf/T = below()
|
||||
if(T.flags_1 & NO_RUINS_1 && protect_ruin)
|
||||
ChangeTurf(replacement_turf, null, CHANGETURF_IGNORE_AIR)
|
||||
return
|
||||
if(!ismineralturf(T) || !drill_below)
|
||||
return
|
||||
var/turf/closed/mineral/M = T
|
||||
M.mineralAmt = 0
|
||||
M.gets_drilled()
|
||||
baseturfs = /turf/open/openspace/icemoon //This is to ensure that IF random turf generation produces a openturf, there won't be other turfs assigned other than openspace.
|
||||
|
||||
/turf/open/openspace/icemoon/keep_below
|
||||
drill_below = FALSE
|
||||
|
||||
/turf/open/openspace/icemoon/ruins
|
||||
protect_ruin = FALSE
|
||||
drill_below = FALSE
|
||||
Reference in New Issue
Block a user