The Mapping Update

Cleans up the map (again)
Makes mining code more better
This commit is contained in:
Letter N
2021-03-12 12:11:35 +08:00
parent cc81a6d65e
commit 935e46b492
149 changed files with 206322 additions and 206270 deletions
File diff suppressed because it is too large Load Diff
+4
View File
@@ -30,3 +30,7 @@
var/obj/machinery/camera/cam = X
cam.lostTargetRef(WEAKREF(O))
return
/area/ai_monitored/turret_protected/ai/Initialize()
. = ..()
src.area_flags |= ABDUCTOR_PROOF
+50 -52
View File
@@ -13,6 +13,8 @@
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
invisibility = INVISIBILITY_LIGHTING
var/area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA
var/fire = null
///Whether there is an atmos alarm in this area
var/atmosalm = FALSE
@@ -60,7 +62,7 @@
///This datum, if set, allows terrain generation behavior to be ran on Initialize()
// var/datum/map_generator/map_generator
var/datum/map_generator/map_generator
///Used to decide what kind of reverb the area makes sound have
var/sound_environment = SOUND_ENVIRONMENT_NONE
@@ -70,12 +72,8 @@
/// Set in New(); preserves the name set by the map maker, even if renamed by the Blueprints.
var/map_name
/// If it's valid territory for gangs/cults to summon
var/valid_territory = TRUE
/// malf ais can hack this
var/valid_malf_hack = TRUE
/// if blobs can spawn there and if it counts towards their score.
var/blob_allowed = TRUE
/// whether servants can warp into this area from Reebe
var/clockwork_warp_allowed = TRUE
/// Message to display when the clockwork warp fails
@@ -107,14 +105,10 @@
var/static_light = 0
var/static_environ
/// Are you forbidden from teleporting to the area? (centcom, mobs, wizard, hand teleporter)
var/noteleport = FALSE
/// Hides area from player Teleport function.
var/hidden = FALSE
/// Is the area teleport-safe: no space / radiation / aggresive mobs / other dangers
var/safe = FALSE
/// If false, loading multiple maps with this area type will create multiple instances.
var/unique = TRUE
var/no_air = null
@@ -157,7 +151,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
/proc/process_teleport_locs()
for(var/V in GLOB.sortedAreas)
var/area/AR = V
if(istype(AR, /area/shuttle) || AR.noteleport)
if(istype(AR, /area/shuttle) || (AR.area_flags & NOTELEPORT))
continue
if(GLOB.teleportlocs[AR.name])
continue
@@ -177,7 +171,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
/area/New()
// This interacts with the map loader, so it needs to be set immediately
// rather than waiting for atoms to initialize.
if (unique)
if (area_flags & UNIQUE_AREA)
GLOB.areas_by_type[type] = src
if(!minimap_color) // goes in New() because otherwise it doesn't fucking work
@@ -228,7 +222,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
reg_in_areas_in_z()
//so far I'm only implementing it on mapped unique areas, it's easier this way.
if(unique && sub_areas)
if((area_flags & UNIQUE_AREA) && sub_areas)
if(type in sub_areas)
WARNING("\"[src]\" typepath found inside its own sub-areas list, please make sure it doesn't share its parent type initial sub-areas value.")
sub_areas = null
@@ -261,21 +255,20 @@ GLOBAL_LIST_EMPTY(teleportlocs)
power_change() // all machines set to current power level, also updates icon
update_beauty()
/// Soon ™
/area/proc/RunGeneration()
// if(map_generator)
// map_generator = new map_generator()
// var/list/turfs = list()
// for(var/turf/T in contents)
// turfs += T
// map_generator.generate_terrain(turfs)
if(map_generator)
map_generator = new map_generator()
var/list/turfs = list()
for(var/turf/T in contents)
turfs += T
map_generator.generate_terrain(turfs)
/area/proc/test_gen()
// if(map_generator)
// var/list/turfs = list()
// for(var/turf/T in contents)
// turfs += T
// map_generator.generate_terrain(turfs)
if(map_generator)
var/list/turfs = list()
for(var/turf/T in contents)
turfs += T
map_generator.generate_terrain(turfs)
/**
* Register this area as belonging to a z level
@@ -327,6 +320,8 @@ GLOBAL_LIST_EMPTY(teleportlocs)
* Sends to all ai players, alert consoles, drones and alarm monitor programs in the world
*/
/area/proc/poweralert(state, obj/source)
if (area_flags & NO_ALERTS)
return
if (state != poweralm)
poweralm = state
if(istype(source)) //Only report power alarms on the z-level where the source is located.
@@ -358,6 +353,8 @@ GLOBAL_LIST_EMPTY(teleportlocs)
p.triggerAlarm("Power", src, cameras, source)
/area/proc/atmosalert(danger_level, obj/source)
if (area_flags & NO_ALERTS)
return
if(danger_level != atmosalm)
if (danger_level==2)
@@ -420,19 +417,19 @@ GLOBAL_LIST_EMPTY(teleportlocs)
if (!fire)
set_fire_alarm_effects(TRUE)
ModifyFiredoors(FALSE)
for (var/item in GLOB.alert_consoles)
var/obj/machinery/computer/station_alert/a = item
a.triggerAlarm("Fire", src, cameras, source)
for (var/item in GLOB.silicon_mobs)
var/mob/living/silicon/aiPlayer = item
aiPlayer.triggerAlarm("Fire", src, cameras, source)
for (var/item in GLOB.drones_list)
var/mob/living/simple_animal/drone/D = item
D.triggerAlarm("Fire", src, cameras, source)
for(var/item in GLOB.alarmdisplay)
var/datum/computer_file/program/alarm_monitor/p = item
p.triggerAlarm("Fire", src, cameras, source)
if (!(area_flags & NO_ALERTS)) //Check here instead at the start of the proc so that fire alarms can still work locally even in areas that don't send alerts
for (var/item in GLOB.alert_consoles)
var/obj/machinery/computer/station_alert/a = item
a.triggerAlarm("Fire", src, cameras, source)
for (var/item in GLOB.silicon_mobs)
var/mob/living/silicon/aiPlayer = item
aiPlayer.triggerAlarm("Fire", src, cameras, source)
for (var/item in GLOB.drones_list)
var/mob/living/simple_animal/drone/D = item
D.triggerAlarm("Fire", src, cameras, source)
for(var/item in GLOB.alarmdisplay)
var/datum/computer_file/program/alarm_monitor/p = item
p.triggerAlarm("Fire", src, cameras, source)
START_PROCESSING(SSobj, src)
@@ -441,18 +438,19 @@ GLOBAL_LIST_EMPTY(teleportlocs)
set_fire_alarm_effects(FALSE)
ModifyFiredoors(TRUE)
for (var/item in GLOB.silicon_mobs)
var/mob/living/silicon/aiPlayer = item
aiPlayer.cancelAlarm("Fire", src, source)
for (var/item in GLOB.alert_consoles)
var/obj/machinery/computer/station_alert/a = item
a.cancelAlarm("Fire", src, source)
for (var/item in GLOB.drones_list)
var/mob/living/simple_animal/drone/D = item
D.cancelAlarm("Fire", src, source)
for(var/item in GLOB.alarmdisplay)
var/datum/computer_file/program/alarm_monitor/p = item
p.cancelAlarm("Fire", src, source)
if (!(area_flags & NO_ALERTS)) //Check here instead at the start of the proc so that fire alarms can still work locally even in areas that don't send alerts
for (var/item in GLOB.silicon_mobs)
var/mob/living/silicon/aiPlayer = item
aiPlayer.cancelAlarm("Fire", src, source)
for (var/item in GLOB.alert_consoles)
var/obj/machinery/computer/station_alert/a = item
a.cancelAlarm("Fire", src, source)
for (var/item in GLOB.drones_list)
var/mob/living/simple_animal/drone/D = item
D.cancelAlarm("Fire", src, source)
for(var/item in GLOB.alarmdisplay)
var/datum/computer_file/program/alarm_monitor/p = item
p.cancelAlarm("Fire", src, source)
STOP_PROCESSING(SSobj, src)
@@ -467,7 +465,7 @@ GLOBAL_LIST_EMPTY(teleportlocs)
DOOR.lock()
/area/proc/burglaralert(obj/trigger)
if(always_unpowered) //no burglar alarms in space/asteroid
if (area_flags & NO_ALERTS)
return
//Trigger alarm effect
@@ -675,9 +673,9 @@ GLOBAL_LIST_EMPTY(teleportlocs)
power_light = FALSE
power_environ = FALSE
always_unpowered = FALSE
valid_territory = FALSE
valid_malf_hack = FALSE
blob_allowed = FALSE
area_flags &= ~VALID_TERRITORY
area_flags &= ~BLOBS_ALLOWED
addSorted()
/area/proc/update_areasize()
+6
View File
@@ -8,6 +8,7 @@ Unused icons for new areas are "awaycontent1" ~ "awaycontent30"
name = "Strange Location"
icon_state = "away"
has_gravity = STANDARD_GRAVITY
// ambience_index = AMBIENCE_AWAY
ambientsounds = AWAY_MISSION
sound_environment = SOUND_ENVIRONMENT_ROOM
@@ -27,3 +28,8 @@ Unused icons for new areas are "awaycontent1" ~ "awaycontent30"
/area/awaymission/vr
name = "Virtual Reality"
icon_state = "awaycontent1"
requires_power = FALSE
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
var/pacifist = TRUE // if when you enter this zone, you become a pacifist or not
var/death = FALSE // if when you enter this zone, you die
// network_root_id = "VR"
+20 -12
View File
@@ -1,14 +1,17 @@
// CENTCOM
// Side note, be sure to change the network_root_id of any areas that are not a part of centcom
// and just using the z space as safe harbor. It shouldn't matter much as centcom z is isolated
// from everything anyway
/area/centcom
name = "CentCom"
icon_state = "centcom"
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
requires_power = FALSE
has_gravity = STANDARD_GRAVITY
noteleport = TRUE
blob_allowed = FALSE //Should go without saying, no blobs should take over centcom as a win condition.
area_flags = VALID_TERRITORY | UNIQUE_AREA | NOTELEPORT
flags_1 = NONE
/area/centcom/control
@@ -33,6 +36,7 @@
name = "VIP Zone"
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
// dear mappers who make winterball: THROW YOUR AREAS IN A DIFFERENT MAP, THIS IS DEFAULT GAME STUFF NOT EVENT STUFF
/area/centcom/winterball
name = "winterball Zone"
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
@@ -56,7 +60,7 @@
var/loading_id = ""
/area/centcom/supplypod/loading/Initialize()
. = ..()
. = ..()
if(!loading_id)
CRASH("[type] created without a loading_id")
if(GLOB.supplypod_loading_bays[loading_id])
@@ -128,17 +132,19 @@
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
requires_power = FALSE
has_gravity = STANDARD_GRAVITY
noteleport = TRUE
area_flags = VALID_TERRITORY | UNIQUE_AREA | NOTELEPORT
flags_1 = NONE
// network_root_id = "MAGIC_NET"
//Abductors
/area/abductor_ship
name = "Abductor Ship"
icon_state = "yellow"
requires_power = FALSE
noteleport = TRUE
area_flags = VALID_TERRITORY | UNIQUE_AREA | NOTELEPORT
has_gravity = STANDARD_GRAVITY
flags_1 = NONE
// network_root_id = "ALIENS"
//Syndicates
/area/syndicate_mothership
@@ -146,26 +152,28 @@
icon_state = "syndie-ship"
requires_power = FALSE
has_gravity = STANDARD_GRAVITY
noteleport = TRUE
blob_allowed = FALSE //Not... entirely sure this will ever come up... but if the bus makes blobs AND ops, it shouldn't aim for the ops to win.
area_flags = VALID_TERRITORY | UNIQUE_AREA | NOTELEPORT
flags_1 = NONE
// ambience_index = AMBIENCE_DANGER
ambientsounds = HIGHSEC
// network_root_id = SYNDICATE_NETWORK_ROOT
/area/syndicate_mothership/control
name = "Syndicate Control Room"
icon_state = "syndie-control"
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
// network_root_id = SYNDICATE_NETWORK_ROOT
/area/syndicate_mothership/elite_squad
name = "Syndicate Elite Squad"
icon_state = "syndie-elite"
// network_root_id = SYNDICATE_NETWORK_ROOT
/area/fabric_of_reality
name = "Tear in the Fabric of Reality"
requires_power = FALSE
has_gravity = TRUE
noteleport = TRUE
blob_allowed = FALSE
area_flags = UNIQUE_AREA | NOTELEPORT
//CAPTURE THE FLAG
@@ -174,6 +182,7 @@
icon_state = "yellow"
requires_power = FALSE
has_gravity = STANDARD_GRAVITY
flags_1 = NONE
/area/ctf/control_room
name = "Control Room A"
@@ -209,11 +218,10 @@
icon_state = "yellow"
requires_power = FALSE
has_gravity = STANDARD_GRAVITY
noteleport = TRUE
hidden = TRUE
area_flags = HIDDEN_AREA | NOTELEPORT | UNIQUE_AREA
ambientsounds = REEBE
/area/reebe/city_of_cogs
name = "City of Cogs"
icon_state = "purple"
hidden = FALSE
area_flags = NOTELEPORT | UNIQUE_AREA
+4 -3
View File
@@ -2,12 +2,13 @@
name = "Holodeck"
icon_state = "Holodeck"
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
flags_1 = 0
hidden = TRUE
flags_1 = NONE
area_flags = VALID_TERRITORY | UNIQUE_AREA
sound_environment = SOUND_ENVIRONMENT_PADDED_CELL
var/obj/machinery/computer/holodeck/linked
var/restricted = 0 // if true, program goes on emag list
var/restricted = FALSE // if true, program goes on emag list
// network_root_id = "HOLODECK"
/*
Power tracking: Use the holodeck computer's power grid
+68 -45
View File
@@ -3,44 +3,49 @@
/area/mine
icon_state = "mining"
has_gravity = STANDARD_GRAVITY
flora_allowed = TRUE
area_flags = VALID_TERRITORY | UNIQUE_AREA | FLORA_ALLOWED
/area/mine/explored
name = "Mine"
icon_state = "explored"
music = null
always_unpowered = TRUE
requires_power = TRUE
poweralm = FALSE
power_environ = FALSE
power_equip = FALSE
power_light = FALSE
outdoors = TRUE
flags_1 = NONE
// ambience_index = AMBIENCE_MINING
ambientsounds = MINING
flora_allowed = FALSE
area_flags = VALID_TERRITORY | UNIQUE_AREA | NO_ALERTS
sound_environment = SOUND_AREA_STANDARD_STATION
// min_ambience_cooldown = 70 SECONDS
// max_ambience_cooldown = 220 SECONDS
/area/mine/unexplored
name = "Mine"
icon_state = "unexplored"
music = null
always_unpowered = TRUE
requires_power = TRUE
poweralm = FALSE
power_environ = FALSE
power_equip = FALSE
power_light = FALSE
outdoors = TRUE
flags_1 = NONE
// ambience_index = AMBIENCE_MINING
ambientsounds = MINING
tunnel_allowed = TRUE
area_flags = VALID_TERRITORY | UNIQUE_AREA | NO_ALERTS | CAVES_ALLOWED | FLORA_ALLOWED | MOB_SPAWN_ALLOWED | MEGAFAUNA_SPAWN_ALLOWED
map_generator = /datum/map_generator/cave_generator
// min_ambience_cooldown = 70 SECONDS
// max_ambience_cooldown = 220 SECONDS
/area/mine/lobby
name = "Mining Station"
icon_state = "mining_lobby"
/area/mine/storage
name = "Mining Station Storage"
icon_state = "mining_storage"
/area/mine/production
name = "Mining Station Starboard Wing"
@@ -62,19 +67,27 @@
/area/mine/cafeteria
name = "Mining Station Cafeteria"
icon_state = "mining_labor_cafe"
/area/mine/hydroponics
name = "Mining Station Hydroponics"
icon_state = "mining_labor_hydro"
/area/mine/sleeper
name = "Mining Station Emergency Sleeper"
/area/mine/mechbay
name = "Mining Station Mech Bay"
icon_state = "mechbay"
/area/mine/laborcamp
name = "Labor Camp"
icon_state = "mining_labor"
/area/mine/laborcamp/security
name = "Labor Camp Security"
icon_state = "security"
// ambience_index = AMBIENCE_DANGER
ambientsounds = HIGHSEC
@@ -86,33 +99,36 @@
icon_state = "mining"
has_gravity = STANDARD_GRAVITY
flags_1 = NONE
flora_allowed = TRUE
area_flags = VALID_TERRITORY | UNIQUE_AREA | FLORA_ALLOWED
sound_environment = SOUND_AREA_LAVALAND
/area/lavaland/surface
name = "Lavaland"
icon_state = "explored"
music = null
always_unpowered = TRUE
poweralm = FALSE
power_environ = FALSE
power_equip = FALSE
power_light = FALSE
requires_power = TRUE
// ambience_index = AMBIENCE_MINING
ambientsounds = MINING
area_flags = VALID_TERRITORY | UNIQUE_AREA | FLORA_ALLOWED | NO_ALERTS
// min_ambience_cooldown = 70 SECONDS
// max_ambience_cooldown = 220 SECONDS
/area/lavaland/underground
name = "Lavaland Caves"
icon_state = "unexplored"
music = null
always_unpowered = TRUE
requires_power = TRUE
poweralm = FALSE
power_environ = FALSE
power_equip = FALSE
power_light = FALSE
// ambience_index = AMBIENCE_MINING
ambientsounds = MINING
area_flags = VALID_TERRITORY | UNIQUE_AREA | FLORA_ALLOWED | NO_ALERTS
// min_ambience_cooldown = 70 SECONDS
// max_ambience_cooldown = 220 SECONDS
/area/lavaland/surface/outdoors
name = "Lavaland Wastes"
@@ -120,16 +136,16 @@
/area/lavaland/surface/outdoors/unexplored //monsters and ruins spawn here
icon_state = "unexplored"
tunnel_allowed = TRUE
mob_spawn_allowed = TRUE
area_flags = VALID_TERRITORY | UNIQUE_AREA | CAVES_ALLOWED | FLORA_ALLOWED | MOB_SPAWN_ALLOWED | NO_ALERTS
map_generator = /datum/map_generator/cave_generator/lavaland
/area/lavaland/surface/outdoors/unexplored/danger //megafauna will also spawn here
icon_state = "danger"
megafauna_spawn_allowed = TRUE
area_flags = VALID_TERRITORY | UNIQUE_AREA | CAVES_ALLOWED | FLORA_ALLOWED | MOB_SPAWN_ALLOWED | MEGAFAUNA_SPAWN_ALLOWED | NO_ALERTS
/area/lavaland/surface/outdoors/explored
name = "Lavaland Labor Camp"
flora_allowed = FALSE
area_flags = VALID_TERRITORY | UNIQUE_AREA | NO_ALERTS
@@ -139,61 +155,68 @@
icon_state = "mining"
has_gravity = STANDARD_GRAVITY
flags_1 = NONE
flora_allowed = TRUE
blob_allowed = FALSE
area_flags = UNIQUE_AREA | FLORA_ALLOWED
sound_environment = SOUND_AREA_ICEMOON
/area/icemoon/surface
name = "Icemoon"
icon_state = "explored"
always_unpowered = TRUE
poweralm = FALSE
power_environ = FALSE
power_equip = FALSE
power_light = FALSE
requires_power = TRUE
// ambience_index = AMBIENCE_MINING
ambientsounds = MINING
area_flags = UNIQUE_AREA | FLORA_ALLOWED | NO_ALERTS
// min_ambience_cooldown = 70 SECONDS
// max_ambience_cooldown = 220 SECONDS
/area/icemoon/surface/outdoors // weather happens here
name = "Icemoon Wastes"
outdoors = TRUE
/area/icemoon/surface/outdoors/labor_camp
name = "Icemoon Labor Camp"
area_flags = UNIQUE_AREA | NO_ALERTS
/area/icemoon/surface/outdoors/unexplored //monsters and ruins spawn here
icon_state = "unexplored"
area_flags = UNIQUE_AREA | FLORA_ALLOWED | MOB_SPAWN_ALLOWED | CAVES_ALLOWED | NO_ALERTS
/area/icemoon/surface/outdoors/unexplored/rivers // rivers spawn here
icon_state = "danger"
map_generator = /datum/map_generator/cave_generator/icemoon/surface
/area/icemoon/surface/outdoors/unexplored/rivers/no_monsters
area_flags = UNIQUE_AREA | FLORA_ALLOWED | CAVES_ALLOWED | NO_ALERTS
/area/icemoon/underground
name = "Icemoon Caves"
outdoors = TRUE
always_unpowered = TRUE
requires_power = TRUE
poweralm = FALSE
power_environ = FALSE
power_equip = FALSE
power_light = FALSE
// ambience_index = AMBIENCE_MINING
ambientsounds = MINING
area_flags = UNIQUE_AREA | FLORA_ALLOWED | NO_ALERTS
// min_ambience_cooldown = 70 SECONDS
// max_ambience_cooldown = 220 SECONDS
/area/icemoon/underground/unexplored // mobs and megafauna and ruins spawn here
name = "Icemoon Caves"
icon_state = "unexplored"
tunnel_allowed = TRUE
mob_spawn_allowed = TRUE
megafauna_spawn_allowed = TRUE
area_flags = CAVES_ALLOWED | FLORA_ALLOWED | MOB_SPAWN_ALLOWED | MEGAFAUNA_SPAWN_ALLOWED | NO_ALERTS
/area/icemoon/underground/unexplored/rivers // rivers spawn here
icon_state = "danger"
map_generator = /datum/map_generator/cave_generator/icemoon
/area/icemoon/underground/explored
/area/icemoon/underground/unexplored/rivers/deep
map_generator = /datum/map_generator/cave_generator/icemoon/deep
/area/icemoon/underground/explored // ruins can't spawn here
name = "Icemoon Underground"
flora_allowed = FALSE
/area/icemoon/surface/outdoors
name = "Icemoon Wastes"
outdoors = TRUE
/area/icemoon/surface/outdoors/labor_camp
name = "Icemoon Labor Camp"
flora_allowed = FALSE
/area/icemoon/surface/outdoors/unexplored //monsters and ruins spawn here
icon_state = "unexplored"
tunnel_allowed = TRUE
mob_spawn_allowed = TRUE
/area/icemoon/surface/outdoors/unexplored/rivers // rivers spawn here
icon_state = "danger"
/area/icemoon/surface/outdoors/unexplored/rivers/no_monsters
mob_spawn_allowed = FALSE
area_flags = UNIQUE_AREA | NO_ALERTS
+51 -23
View File
@@ -2,9 +2,7 @@
/area/ruin/space
has_gravity = FALSE
blob_allowed = FALSE //Nope, no winning in space as a blob. Gotta eat the station.
outdoors = TRUE
ambientsounds = SPACE
area_flags = UNIQUE_AREA
/area/ruin/space/has_grav
has_gravity = STANDARD_GRAVITY
@@ -12,7 +10,6 @@
/area/ruin/space/has_grav/powered
requires_power = FALSE
/area/ruin/fakespace
icon_state = "space"
requires_power = TRUE
@@ -22,10 +19,8 @@
power_light = FALSE
power_equip = FALSE
power_environ = FALSE
valid_territory = FALSE
outdoors = TRUE
ambientsounds = SPACE
blob_allowed = FALSE
/////////////
@@ -133,22 +128,20 @@
/area/ruin/space/diner
name = "Space Diner"
area_flags = UNIQUE_AREA
/area/ruin/space/diner/interior
name = "Space Diner"
icon_state = "maintbar"
has_gravity = STANDARD_GRAVITY
blob_allowed = FALSE //Nope, no winning in the diner as a blob. Gotta eat the main station.
/area/ruin/space/diner/solars
requires_power = FALSE
dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT
valid_territory = FALSE
blob_allowed = FALSE
flags_1 = NONE
ambientsounds = ENGINEERING
name = "Space Diner Solar Array"
icon_state = "yellow"
requires_power = FALSE
dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT
flags_1 = NONE
ambientsounds = ENGINEERING
//Ruin of "Skelter" ship
@@ -257,7 +250,7 @@
//Ruin of old teleporter
/area/ruin/space/oldteleporter
name = "Old teleporter"
name = "Old Teleporter"
icon_state = "teleporter"
@@ -301,7 +294,7 @@
icon_state = "storage_wing"
/area/ruin/space/has_grav/deepstorage/dorm
name = "Deep Storage Dormory"
name = "Deep Storage Dormitory"
icon_state = "crew_quarters"
/area/ruin/space/has_grav/deepstorage/kitchen
@@ -339,7 +332,9 @@
/area/ruin/space/has_grav/ancientstation/atmo
name = "Beta Station Atmospherics"
icon_state = "red"
has_gravity = FALSE
// ambience_index = AMBIENCE_ENGI
ambientsounds = ENGINEERING
has_gravity = TRUE
/area/ruin/space/has_grav/ancientstation/betanorth
name = "Beta Station North Corridor"
@@ -349,9 +344,15 @@
name = "Station Solar Array"
icon_state = "panelsAP"
/area/ruin/space/has_grav/ancientstation/betacorridor
name = "Beta Station Main Corridor"
icon_state = "bluenew"
/area/ruin/space/has_grav/ancientstation/engi
name = "Charlie Station Engineering"
icon_state = "engine"
// ambience_index = AMBIENCE_ENGI
ambientsounds = ENGINEERING
/area/ruin/space/has_grav/ancientstation/comm
name = "Charlie Station Command"
@@ -385,6 +386,27 @@
name = "Hivebot Mothership"
icon_state = "teleporter"
/area/ruin/space/has_grav/ancientstation/deltaai
name = "Delta Station AI Core"
icon_state = "ai"
ambientsounds = list('sound/ambience/ambimalf.ogg', 'sound/ambience/ambitech.ogg', 'sound/ambience/ambitech2.ogg', 'sound/ambience/ambiatmos.ogg', 'sound/ambience/ambiatmos2.ogg')
/area/ruin/space/has_grav/ancientstation/mining
name = "Beta Station Mining Equipment"
icon_state = "mining"
/area/ruin/space/has_grav/ancientstation/medbay
name = "Beta Station Medbay"
icon_state = "medbay"
/area/ruin/space/has_grav/ancientstation/betastorage
name = "Beta Station Storage"
icon_state = "storage"
/area/solars/ancientstation
name = "Charlie Station Solar Array"
icon_state = "panelsP"
//DERELICT
/area/ruin/space/derelict
@@ -469,11 +491,11 @@
name = "Abandoned Ship"
icon_state = "yellow"
/area/solar/derelict_starboard
/area/solars/derelict_starboard
name = "Derelict Starboard Solar Array"
icon_state = "panelsS"
/area/solar/derelict_aft
/area/solars/derelict_aft
name = "Derelict Aft Solar Array"
icon_state = "yellow"
@@ -496,28 +518,24 @@
power_light = FALSE
power_environ = FALSE
//DJSTATION
/area/ruin/space/djstation
name = "Ruskie DJ Station"
icon_state = "DJ"
has_gravity = STANDARD_GRAVITY
blob_allowed = FALSE //Nope, no winning on the DJ station as a blob. Gotta eat the main station.
/area/ruin/space/djstation/solars
name = "DJ Station Solars"
icon_state = "DJ"
has_gravity = STANDARD_GRAVITY
//ABANDONED TELEPORTER
/area/ruin/space/abandoned_tele
name = "Abandoned Teleporter"
icon_state = "teleporter"
music = "signal"
ambientsounds = list('sound/ambience/ambimalf.ogg')
ambientsounds = list('sound/ambience/ambimalf.ogg', 'sound/ambience/signal.ogg')
//OLD AI SAT
@@ -561,3 +579,13 @@
/area/ruin/space/has_grav/powered/advancedlab
name = "Abductor Replication Lab"
icon_state = "yellow"
//HELL'S FACTORY OPERATING FACILITY
// /area/ruin/space/has_grav/hellfactory
// name = "Hell Factory"
// icon_state = "yellow"
// /area/ruin/space/has_grav/hellfactoryoffice
// name = "Hell Factory Office"
// icon_state = "red"
// area_flags = VALID_TERRITORY | BLOBS_ALLOWED | UNIQUE_AREA | NOTELEPORT
+45 -26
View File
@@ -8,10 +8,11 @@
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
has_gravity = STANDARD_GRAVITY
always_unpowered = FALSE
valid_territory = FALSE
icon_state = "shuttle"
// Loading the same shuttle map at a different time will produce distinct area instances.
unique = FALSE
area_flags = NO_ALERTS
icon_state = "shuttle"
flags_1 = CAN_BE_DIRTY_1
// area_limited_icon_smoothing = /area/shuttle
sound_environment = SOUND_ENVIRONMENT_ROOM
/area/shuttle/Initialize()
@@ -32,7 +33,8 @@
/area/shuttle/syndicate
name = "Syndicate Infiltrator"
blob_allowed = FALSE
// ambience_index = AMBIENCE_DANGER
// area_limited_icon_smoothing = /area/shuttle/syndicate
ambientsounds = HIGHSEC
canSmoothWithAreas = /area/shuttle/syndicate
@@ -57,7 +59,6 @@
/area/shuttle/pirate
name = "Pirate Shuttle"
blob_allowed = FALSE
requires_power = TRUE
canSmoothWithAreas = /area/shuttle/pirate
@@ -65,12 +66,22 @@
name = "Pirate Shuttle Vault"
requires_power = FALSE
/area/shuttle/pirate/flying_dutchman
name = "Flying Dutchman"
requires_power = FALSE
////////////////////////////Bounty Hunter Shuttles////////////////////////////
/area/shuttle/hunter
name = "Hunter Shuttle"
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
////////////////////////////White Ship////////////////////////////
/area/shuttle/abandoned
name = "Abandoned Ship"
blob_allowed = FALSE
requires_power = TRUE
// area_limited_icon_smoothing = /area/shuttle/abandoned
canSmoothWithAreas = /area/shuttle/abandoned
/area/shuttle/abandoned/bridge
@@ -94,13 +105,6 @@
/area/shuttle/abandoned/pod
name = "Abandoned Ship Pod"
////////////////////////////Bounty Hunter Shuttles////////////////////////////
/area/shuttle/hunter
name = "Hunter Shuttle"
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
blob_allowed = FALSE
canSmoothWithAreas = /area/shuttle/hunter
////////////////////////////Single-area shuttles////////////////////////////
/area/shuttle/transit
@@ -117,44 +121,67 @@
/area/shuttle/arrival
name = "Arrival Shuttle"
unique = TRUE // SSjob refers to this area for latejoiners
area_flags = UNIQUE_AREA// SSjob refers to this area for latejoiners
/area/shuttle/pod_1
name = "Escape Pod One"
area_flags = BLOBS_ALLOWED
/area/shuttle/pod_2
name = "Escape Pod Two"
area_flags = BLOBS_ALLOWED
/area/shuttle/pod_3
name = "Escape Pod Three"
area_flags = BLOBS_ALLOWED
/area/shuttle/pod_4
name = "Escape Pod Four"
area_flags = BLOBS_ALLOWED
/area/shuttle/mining
name = "Mining Shuttle"
blob_allowed = FALSE
area_flags = NONE //Set this so it doesn't inherit NO_ALERTS
/area/shuttle/mining/large
name = "Mining Shuttle"
requires_power = TRUE
/area/shuttle/labor
name = "Labor Camp Shuttle"
blob_allowed = FALSE
area_flags = NONE //Set this so it doesn't inherit NO_ALERTS
/area/shuttle/supply
name = "Supply Shuttle"
blob_allowed = FALSE
area_flags = NOTELEPORT
/area/shuttle/escape
name = "Emergency Shuttle"
area_flags = BLOBS_ALLOWED
// area_limited_icon_smoothing = /area/shuttle/escape
canSmoothWithAreas = /area/shuttle/escape
flags_1 = CAN_BE_DIRTY_1 // | CULT_PERMITTED_1
/area/shuttle/escape/backup
name = "Backup Emergency Shuttle"
/area/shuttle/escape/brig
name = "Escape Shuttle Brig"
icon_state = "shuttlered"
/area/shuttle/escape/luxury
name = "Luxurious Emergency Shuttle"
// area_flags = NOTELEPORT
/area/shuttle/escape/simulation
name = "Medieval Reality Simulation Dome"
icon_state = "shuttlectf"
area_flags = NOTELEPORT
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
/area/shuttle/escape/arena
name = "The Arena"
noteleport = TRUE
area_flags = NOTELEPORT
/area/shuttle/escape/meteor
name = "\proper a meteor with engines strapped to it"
@@ -162,34 +189,26 @@
/area/shuttle/transport
name = "Transport Shuttle"
blob_allowed = FALSE
/area/shuttle/assault_pod
name = "Steel Rain"
blob_allowed = FALSE
/area/shuttle/sbc_starfury
name = "SBC Starfury"
blob_allowed = FALSE
/area/shuttle/sbc_fighter1
name = "SBC Fighter 1"
blob_allowed = FALSE
/area/shuttle/sbc_fighter2
name = "SBC Fighter 2"
blob_allowed = FALSE
/area/shuttle/sbc_corvette
name = "SBC corvette"
blob_allowed = FALSE
/area/shuttle/syndicate_scout
name = "Syndicate Scout"
blob_allowed = FALSE
/area/shuttle/caravan
blob_allowed = FALSE
requires_power = TRUE
/area/shuttle/caravan/syndicate1
+6 -24
View File
@@ -5,28 +5,16 @@
continue
S.charge = 0
S.output_level = 0
S.output_attempt = 0
S.output_attempt = FALSE
S.update_icon()
S.power_change()
var/list/skipped_areas = list(/area/engine/engineering, /area/engine/supermatter, /area/engine/atmospherics_engine, /area/ai_monitored/turret_protected/ai)
for(var/area/A in world)
if( !A.requires_power || A.always_unpowered || A.base_area)
for(var/area/A in GLOB.the_station_areas)
if(!A.requires_power || A.always_unpowered )
continue
if(GLOB.typecache_powerfailure_safe_areas[A.type])
continue
var/skip = 0
for(var/area_type in skipped_areas)
if(istype(A,area_type))
skip = 1
break
if(A.contents)
for(var/atom/AT in A.contents)
if(!is_station_level(AT.z)) //Only check one, it's enough.
skip = 1
break
if(skip)
continue
A.power_light = FALSE
A.power_equip = FALSE
A.power_environ = FALSE
@@ -35,13 +23,7 @@
for(var/obj/machinery/power/apc/C in GLOB.apcs_list)
if(C.cell && is_station_level(C.z))
var/area/A = C.area
var/skip = 0
for(var/area_type in skipped_areas)
if(istype(A,area_type))
skip = 1
break
if(skip)
if(GLOB.typecache_powerfailure_safe_areas[A.type])
continue
C.cell.charge = 0
+1 -1
View File
@@ -413,7 +413,7 @@
for(var/z in SSmapping.levels_by_trait(ZTRAIT_STATION)) //First, collect all area types on the station zlevel
for(var/ar in SSmapping.areas_in_z["[z]"])
var/area/A = ar
if(!(A.type in valid_territories) && A.valid_territory)
if(!(A.type in valid_territories) && (A.area_flags & VALID_TERRITORY))
valid_territories |= A.type
return valid_territories.len
+1 -1
View File
@@ -1240,7 +1240,7 @@ GLOBAL_LIST_EMPTY(possible_sabotages)
var/payout_bonus = 0
var/area/dropoff = null
var/static/list/blacklisted_areas = typecacheof(list(/area/ai_monitored/turret_protected,
/area/solar/,
/area/solarss/,
/area/ruin/, //thank you station space ruins
/area/science/test_area/,
/area/shuttle/))
+1 -1
View File
@@ -200,6 +200,6 @@
if(is_centcom_level(T.z) || is_away_level(T.z))
return FALSE
var/area/A = get_area(T)
if(!A || A.noteleport)
if(!A || (A.area_flags & NOTELEPORT))
return FALSE
return TRUE
+1 -1
View File
@@ -443,7 +443,7 @@
// Check area validity.
// Reject space, player-created areas, and non-station z-levels.
var/area/A = get_base_area(target)
if(!A || (!is_station_level(A.z)) || !A.valid_territory)
if(!A || (!is_station_level(A.z)) || !(A.area_flags & VALID_TERRITORY))
to_chat(user, "<span class='warning'>[A] is unsuitable for tagging.</span>")
return FALSE
@@ -592,7 +592,7 @@ GLOBAL_LIST_INIT(runed_metal_recipes, list ( \
return
var/turf/T = get_turf(user) //we may have moved. adjust as needed...
var/area/A = get_area(user)
if((!is_station_level(T.z) && !is_mining_level(T.z)) || (A && !A.blob_allowed))
if((!is_station_level(T.z) && !is_mining_level(T.z)) || (A && !(A.flags_1 & CULT_PERMITTED_1)))
to_chat(user, "<span class='warning'>The veil is not weak enough here.</span>")
return FALSE
return ..()
+6 -6
View File
@@ -139,14 +139,14 @@
/obj/item/hand_tele/attack_self(mob/user)
var/turf/current_location = get_turf(user)//What turf is the user on?
var/area/current_area = current_location.loc
if(!current_location || current_area.noteleport || is_away_level(current_location.z) || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
if(!current_location || (current_area.area_flags & NOTELEPORT) || is_away_level(current_location.z) || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
return
var/list/L = list( )
for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
if(com.target)
var/area/A = get_area(com.target)
if(!A || A.noteleport)
if(!A || (A.area_flags & NOTELEPORT))
continue
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
L["[get_area(com.target)] (Active)"] = com.target
@@ -159,7 +159,7 @@
if(T.y>world.maxy-8 || T.y<8)
continue
var/area/A = T.loc
if(A.noteleport)
if(A.area_flags & NOTELEPORT)
continue
turfs += T
if(turfs.len)
@@ -172,12 +172,12 @@
return
var/atom/T = L[t1]
var/area/A = get_area(T)
if(A.noteleport)
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
if (A.area_flags & NOTELEPORT)
to_chat(user, "<span class='notice'>[src] is malfunctioning.</span>")
return
current_location = get_turf(user) //Recheck.
current_area = current_location.loc
if(!current_location || current_area.noteleport || is_away_level(current_location.z) || !isturf(user.loc))//If turf was not found or they're on z level 2 or >7 which does not currently exist. or if user is not located on a turf
if (!current_location || (current_area.area_flags & NOTELEPORT) || is_away_level(current_location.z) || !isturf(user.loc))
to_chat(user, "<span class='notice'>\The [src] is malfunctioning.</span>")
return
user.show_message("<span class='notice'>Locked In.</span>", MSG_AUDIBLE)
+1 -1
View File
@@ -50,7 +50,7 @@
return FALSE
var/turf/T = get_turf(src)
var/area/A = get_area(src)
if(!A.blob_allowed)
if(!(A.area_flags & BLOBS_ALLOWED))
return FALSE
if(!A.powered(EQUIP))
return FALSE
+7 -7
View File
@@ -3,7 +3,7 @@
#define STAIR_TERMINATOR_YES 2
// dir determines the direction of travel to go upwards (due to lack of sprites, currently only 1 and 2 make sense)
// stairs require /turf/open/transparent/openspace as the tile above them to work
// stairs require /turf/open/openspace as the tile above them to work
// multiple stair objects can be chained together; the Z level transition will happen on the final stair object in the chain
/obj/structure/stairs
@@ -12,7 +12,7 @@
icon_state = "stairs"
anchored = TRUE
var/force_open_above = FALSE // replaces the turf above this stair obj with /turf/open/transparent/openspace
var/force_open_above = FALSE // replaces the turf above this stair obj with /turf/open/openspace
var/terminator_mode = STAIR_TERMINATOR_AUTOMATIC
var/turf/listeningTo
@@ -107,23 +107,23 @@
/obj/structure/stairs/proc/build_signal_listener()
if(listeningTo)
UnregisterSignal(listeningTo, COMSIG_TURF_MULTIZ_NEW)
var/turf/open/transparent/openspace/T = get_step_multiz(get_turf(src), UP)
var/turf/open/openspace/T = get_step_multiz(get_turf(src), UP)
RegisterSignal(T, COMSIG_TURF_MULTIZ_NEW, .proc/on_multiz_new)
listeningTo = T
/obj/structure/stairs/proc/force_open_above()
var/turf/open/transparent/openspace/T = get_step_multiz(get_turf(src), UP)
var/turf/open/openspace/T = get_step_multiz(get_turf(src), UP)
if(T && !istype(T))
T.ChangeTurf(/turf/open/transparent/openspace, flags = CHANGETURF_INHERIT_AIR)
T.ChangeTurf(/turf/open/openspace, flags = CHANGETURF_INHERIT_AIR)
/obj/structure/stairs/proc/on_multiz_new(turf/source, dir)
//SIGNAL_HANDLER
SHOULD_NOT_SLEEP(TRUE) //the same thing.
if(dir == UP)
var/turf/open/transparent/openspace/T = get_step_multiz(get_turf(src), UP)
var/turf/open/openspace/T = get_step_multiz(get_turf(src), UP)
if(T && !istype(T))
T.ChangeTurf(/turf/open/transparent/openspace, flags = CHANGETURF_INHERIT_AIR)
T.ChangeTurf(/turf/open/openspace, flags = CHANGETURF_INHERIT_AIR)
/obj/structure/stairs/intercept_zImpact(atom/movable/AM, levels = 1)
. = ..()
-100
View File
@@ -1,100 +0,0 @@
/turf/open/transparent
baseturfs = /turf/open/transparent/openspace
intact = FALSE //this means wires go on top
/turf/open/transparent/Initialize() // handle plane and layer here so that they don't cover other obs/turfs in Dream Maker
. = ..()
plane = OPENSPACE_PLANE
layer = OPENSPACE_LAYER
return INITIALIZE_HINT_LATELOAD
/turf/open/transparent/LateInitialize()
update_multiz(TRUE, TRUE)
/turf/open/transparent/Destroy()
vis_contents.len = 0
return ..()
/turf/open/transparent/update_multiz(prune_on_fail = FALSE, init = FALSE)
. = ..()
var/turf/T = below()
if(!T)
vis_contents.len = 0
if(!show_bottom_level() && prune_on_fail) //If we cant show whats below, and we prune on fail, change the turf to plating as a fallback
ChangeTurf(/turf/open/floor/plating, flags = CHANGETURF_INHERIT_AIR)
return FALSE
if(init)
vis_contents += T
return TRUE
/turf/open/transparent/multiz_turf_del(turf/T, dir)
if(dir != DOWN)
return
update_multiz()
/turf/open/transparent/multiz_turf_new(turf/T, dir)
if(dir != DOWN)
return
update_multiz()
///Called when there is no real turf below this turf
/turf/open/transparent/proc/show_bottom_level()
var/turf/path = SSmapping.level_trait(z, ZTRAIT_BASETURF) || /turf/open/space
if(!ispath(path))
path = text2path(path)
if(!ispath(path))
warning("Z-level [z] has invalid baseturf '[SSmapping.level_trait(z, ZTRAIT_BASETURF)]'")
path = /turf/open/space
var/mutable_appearance/underlay_appearance = mutable_appearance(initial(path.icon), initial(path.icon_state), layer = TURF_LAYER, plane = PLANE_SPACE)
underlays += underlay_appearance
return TRUE
/turf/open/transparent/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"
smooth = SMOOTH_MORE
var/floor_tile = /obj/item/stack/sheet/glass
canSmoothWith = list(/turf/open/transparent/glass, /turf/open/transparent/glass/reinforced)
footstep = FOOTSTEP_PLATING
barefootstep = FOOTSTEP_HARD_BAREFOOT
clawfootstep = FOOTSTEP_HARD_CLAW
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
/turf/open/transparent/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)
/turf/open/transparent/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/transparent/glass))
return TRUE
if(floor_tile)
new floor_tile(src, 2)
ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
return TRUE
/turf/open/transparent/glass/reinforced
name = "Reinforced glass floor"
desc = "Do jump on it, it can take it."
icon = 'icons/turf/floors/reinf_glass.dmi'
floor_tile = /obj/item/stack/sheet/rglass
/turf/open/transparent/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/transparent/glass/reinforced))
return TRUE
if(floor_tile)
new floor_tile(src, 2)
ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
return TRUE
+21 -19
View File
@@ -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
+1 -1
View File
@@ -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)
+4 -4
View File
@@ -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
+61
View File
@@ -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
+186 -417
View File
@@ -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
@@ -1,39 +1,40 @@
GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdrop, new)
/atom/movable/openspace_backdrop
name = "openspace_backdrop"
name = "openspace_backdrop"
anchored = TRUE
anchored = TRUE
icon = 'icons/turf/floors.dmi'
icon_state = "grey"
plane = OPENSPACE_BACKDROP_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
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
vis_flags = VIS_INHERIT_ID
/turf/open/transparent/openspace
/turf/open/openspace
name = "open space"
desc = "Watch your step!"
icon_state = "transparent"
baseturfs = /turf/open/transparent/openspace
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
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
var/can_cover_up = TRUE
var/can_build_on = TRUE
/turf/open/transparent/openspace/airless
/turf/open/openspace/airless
initial_gas_mix = AIRLESS_ATMOS
/turf/open/transparent/openspace/debug/update_multiz()
..()
return TRUE
// /turf/open/transparent/openspace/debug/update_multiz()
// ..()
// return TRUE
///No bottom level for openspace.
/turf/open/transparent/openspace/show_bottom_level()
return FALSE
// ///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
. = ..()
@@ -42,20 +43,20 @@ GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdr
/turf/open/openspace/LateInitialize()
. = ..()
// AddElement(/datum/element/turf_z_transparency, FALSE)
AddElement(/datum/element/turf_z_transparency, FALSE)
/turf/open/transparent/openspace/can_have_cabling()
/turf/open/openspace/can_have_cabling()
if(locate(/obj/structure/lattice/catwalk, src))
return TRUE
return FALSE
/turf/open/transparent/openspace/zAirIn()
/turf/open/openspace/zAirIn()
return TRUE
/turf/open/transparent/openspace/zAirOut()
/turf/open/openspace/zAirOut()
return TRUE
/turf/open/transparent/openspace/zPassIn(atom/movable/A, direction, turf/source)
/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)
@@ -68,7 +69,7 @@ GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdr
return TRUE
return FALSE
/turf/open/transparent/openspace/zPassOut(atom/movable/A, direction, turf/destination)
/turf/open/openspace/zPassOut(atom/movable/A, direction, turf/destination)
if(A.anchored)
return FALSE
if(direction == DOWN)
@@ -83,13 +84,13 @@ GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdr
return TRUE
return FALSE
/turf/open/transparent/openspace/proc/CanCoverUp()
/turf/open/openspace/proc/CanCoverUp()
return can_cover_up
/turf/open/transparent/openspace/proc/CanBuildHere()
/turf/open/openspace/proc/CanBuildHere()
return can_build_on
/turf/open/transparent/openspace/attackby(obj/item/C, mob/user, params)
/turf/open/openspace/attackby(obj/item/C, mob/user, params)
..()
if(!CanBuildHere())
return
@@ -130,9 +131,9 @@ GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdr
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 metal rods first.</span>")
to_chat(user, "<span class='warning'>The plating is going to need some support! Place iron rods first.</span>")
/turf/open/transparent/openspace/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
/turf/open/openspace/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd)
if(!CanBuildHere())
return FALSE
@@ -145,7 +146,7 @@ GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdr
return list("mode" = RCD_FLOORWALL, "delay" = 0, "cost" = 3)
return FALSE
/turf/open/transparent/openspace/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
/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>")
@@ -153,25 +154,33 @@ GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdr
return TRUE
return FALSE
/turf/open/transparent/openspace/icemoon
/turf/open/openspace/icemoon
name = "ice chasm"
baseturfs = /turf/open/transparent/openspace/icemoon
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/transparent/openspace/icemoon/Initialize()
/turf/open/openspace/icemoon/Initialize()
. = ..()
var/turf/T = below()
// if(T.flags_1 & NO_RUINS_1)
// ChangeTurf(replacement_turf, null, CHANGETURF_IGNORE_AIR)
// return
// if(!ismineralturf(T))
// return
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/transparent/openspace/icemoon //This is to ensure that IF random turf generation produces a openturf, there won't be other turfs assigned other than openspace.
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/transparent/openspace/icemoon/can_zFall(atom/movable/A, levels = 1, turf/target)
return TRUE
/turf/open/openspace/icemoon/keep_below
drill_below = FALSE
/turf/open/openspace/icemoon/ruins
protect_ruin = FALSE
drill_below = FALSE
+1 -1
View File
@@ -131,7 +131,7 @@ GLOBAL_LIST_EMPTY(station_turfs)
user.Move_Pulled(src)
/turf/proc/multiz_turf_del(turf/T, dir)
// SEND_SIGNAL(src, COMSIG_TURF_MULTIZ_DEL, T, dir)
SEND_SIGNAL(src, COMSIG_TURF_MULTIZ_DEL, T, dir)
/turf/proc/multiz_turf_new(turf/T, dir)
SEND_SIGNAL(src, COMSIG_TURF_MULTIZ_NEW, T, dir)