Simpler lighting process, bug fixes, & modular computer tweaks (#1809)

Fixes #1806
Fixes #1730
Fixes #1747
Partially addresses #1763
Addresses #1283
Fixes #1799
Fixes #1816
Fixes #1813
This commit is contained in:
Lohikar
2017-02-24 20:24:31 +02:00
committed by skull132
parent a52092b294
commit 65e0f3de97
63 changed files with 270 additions and 146 deletions
+10 -10
View File
@@ -11,25 +11,25 @@
/datum/alloy/plasteel
metaltag = "plasteel"
requires = list(
"platinum" = 1,
"carbon" = 2,
"hematite" = 2
)
ORE_PLATINUM = 1,
ORE_COAL = 2,
ORE_IRON = 2
)
product_mod = 0.3
product = /obj/item/stack/material/plasteel
/datum/alloy/steel
metaltag = DEFAULT_WALL_MATERIAL
requires = list(
"carbon" = 1,
"hematite" = 1
)
ORE_COAL = 1,
ORE_IRON = 1
)
product = /obj/item/stack/material/steel
/datum/alloy/borosilicate
metaltag = "borosilicate glass"
requires = list(
"platinum" = 1,
"sand" = 2
)
ORE_PLATINUM = 1,
ORE_SAND = 2
)
product = /obj/item/stack/material/glass/phoronglass
+33 -9
View File
@@ -302,7 +302,7 @@
new /obj/structure/closet/crate/secure/loot(src)
if(istype(N))
N.overlay_detail = "asteroid[rand(0,9)]"
N.overlay_detail = rand(0,9)
N.updateMineralOverlays(1)
/turf/simulated/mineral/proc/excavate_find(var/prob_clean = 0, var/datum/find/F)
@@ -374,13 +374,21 @@
/turf/simulated/mineral/random
name = "Mineral deposit"
var/mineralSpawnChanceList = list("Uranium" = 5, "Platinum" = 5, "Iron" = 35, "Coal" = 35, "Diamond" = 1, "Gold" = 5, "Silver" = 5, "Phoron" = 10)
var/mineralChance = 100 //10 //means 10% chance of this plot changing to a mineral deposit
var/mineralSpawnChanceList = list(
ORE_URANIUM = 5,
ORE_PLATINUM = 5,
ORE_IRON = 35,
ORE_COAL = 35,
ORE_DIAMOND = 1,
ORE_GOLD = 5,
ORE_SILVER = 5,
ORE_PHORON = 10
)
var/mineralChance = 10 //means 10% chance of this plot changing to a mineral deposit
/turf/simulated/mineral/random/New()
if (prob(mineralChance) && !mineral)
var/mineral_name = pickweight(mineralSpawnChanceList) //temp mineral name
mineral_name = lowertext(mineral_name)
if (mineral_name && (mineral_name in ore_data))
mineral = ore_data[mineral_name]
UpdateMineral()
@@ -388,8 +396,17 @@
. = ..()
/turf/simulated/mineral/random/high_chance
mineralChance = 100 //25
mineralSpawnChanceList = list("Uranium" = 10, "Platinum" = 10, "Iron" = 20, "Coal" = 20, "Diamond" = 2, "Gold" = 10, "Silver" = 10, "Phoron" = 20)
mineralChance = 25
mineralSpawnChanceList = list(
ORE_URANIUM = 10,
ORE_PLATINUM = 10,
ORE_IRON = 20,
ORE_COAL = 20,
ORE_DIAMOND = 2,
ORE_GOLD = 10,
ORE_SILVER = 10,
ORE_PHORON = 20
)
/**********************Asteroid**************************/
@@ -411,13 +428,14 @@
temperature = TCMB
var/dug = 0 //0 = has not yet been dug, 1 = has already been dug
var/overlay_detail
var/static/list/overlay_cache
has_resources = 1
footstep_sound = "gravelstep"
/turf/simulated/floor/asteroid/New()
if(prob(20))
overlay_detail = "asteroid[rand(0,9)]"
overlay_detail = rand(0,9)
/turf/simulated/floor/asteroid/ex_act(severity)
switch(severity)
@@ -536,8 +554,14 @@
if(istype(get_step(src, step_overlays[direction]), /turf/simulated/mineral))
overlays += image('icons/turf/walls.dmi', "rock_side", dir = step_overlays[direction])
//todo cache
if(overlay_detail) overlays |= image(icon = 'icons/turf/flooring/decals.dmi', icon_state = overlay_detail)
if (!overlay_cache)
overlay_cache = list()
overlay_cache.len = 10
for (var/i = 1; i <= overlay_cache.len; i++)
overlay_cache[i] = image('icons/turf/flooring/decals.dmi', "asteroid[i - 1]")
if(overlay_detail)
overlays += overlay_cache[overlay_detail + 1]
if(update_neighbors)
var/list/all_step_directions = list(NORTH,NORTHEAST,EAST,SOUTHEAST,SOUTH,SOUTHWEST,WEST,NORTHWEST)
+11 -11
View File
@@ -24,7 +24,7 @@ var/global/list/ore_data = list()
display_name = name
/ore/uranium
name = "uranium"
name = ORE_URANIUM
display_name = "pitchblende"
smelts_to = "uranium"
result_amount = 5
@@ -38,7 +38,7 @@ var/global/list/ore_data = list()
xarch_source_mineral = "potassium"
/ore/hematite
name = "hematite"
name = ORE_IRON
display_name = "hematite"
smelts_to = "iron"
alloy = 1
@@ -48,7 +48,7 @@ var/global/list/ore_data = list()
scan_icon = "mineral_common"
/ore/coal
name = "carbon"
name = ORE_COAL
display_name = "raw carbon"
smelts_to = "plastic"
alloy = 1
@@ -58,13 +58,13 @@ var/global/list/ore_data = list()
scan_icon = "mineral_common"
/ore/glass
name = "sand"
name = ORE_SAND
display_name = "sand"
smelts_to = "glass"
compresses_to = "sandstone"
/ore/phoron
name = "phoron"
name = ORE_PHORON
display_name = "phoron crystals"
compresses_to = "phoron"
//smelts_to = something that explodes violently on the conveyor, huhuhuhu
@@ -81,7 +81,7 @@ var/global/list/ore_data = list()
xarch_source_mineral = "phoron"
/ore/silver
name = "silver"
name = ORE_SILVER
display_name = "native silver"
smelts_to = "silver"
result_amount = 5
@@ -90,7 +90,7 @@ var/global/list/ore_data = list()
scan_icon = "mineral_uncommon"
/ore/gold
smelts_to = "gold"
smelts_to = ORE_GOLD
name = "gold"
display_name = "native gold"
result_amount = 5
@@ -105,7 +105,7 @@ var/global/list/ore_data = list()
)
/ore/diamond
name = "diamond"
name = ORE_DIAMOND
display_name = "diamond"
compresses_to = "diamond"
result_amount = 5
@@ -115,7 +115,7 @@ var/global/list/ore_data = list()
xarch_source_mineral = "nitrogen"
/ore/platinum
name = "platinum"
name = ORE_PLATINUM
display_name = "raw platinum"
smelts_to = "platinum"
compresses_to = "osmium"
@@ -126,8 +126,8 @@ var/global/list/ore_data = list()
scan_icon = "mineral_rare"
/ore/hydrogen
name = "mhydrogen"
name = ORE_HYDROGEN
display_name = "metallic hydrogen"
smelts_to = "tritium"
compresses_to = "mhydrogen"
scan_icon = "mineral_rare"
scan_icon = "mineral_rare"