mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-25 04:57:47 +01:00
Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into 6/5/2015_bay_merge
Conflicts: .travis.yml code/controllers/configuration.dm code/datums/supplypacks.dm code/game/machinery/bluespacerelay.dm code/game/machinery/hologram.dm code/game/objects/items/weapons/RCD.dm code/game/objects/items/weapons/circuitboards/machinery/commsantenna.dm code/game/turfs/simulated/floor.dm code/game/turfs/simulated/floor_types.dm code/game/turfs/simulated/walls.dm code/global.dm code/modules/clothing/spacesuits/rig/suits/ert.dm code/modules/mob/living/silicon/ai/ai.dm code/modules/research/designs.dm config/example/config.txt icons/mob/feet.dmi icons/mob/head.dmi icons/mob/suit.dmi icons/obj/clothing/hats.dmi icons/obj/clothing/shoes.dmi icons/obj/clothing/suits.dmi icons/obj/rig_modules.dmi interface/interface.dm maps/exodus-3.dmm polaris.dme
This commit is contained in:
@@ -109,7 +109,7 @@
|
||||
if(91)
|
||||
new/obj/item/device/soulstone(src)
|
||||
if(92)
|
||||
new/obj/item/weapon/katana(src)
|
||||
new/obj/item/weapon/material/sword/katana(src)
|
||||
if(93)
|
||||
new/obj/item/weapon/dnainjector/xraymut(src) // Probably the least OP
|
||||
if(94) // Why the hell not
|
||||
|
||||
@@ -16,12 +16,12 @@
|
||||
"hematite" = 2
|
||||
)
|
||||
product_mod = 0.3
|
||||
product = /obj/item/stack/sheet/plasteel
|
||||
product = /obj/item/stack/material/plasteel
|
||||
|
||||
/datum/alloy/steel
|
||||
metaltag = "steel"
|
||||
metaltag = DEFAULT_WALL_MATERIAL
|
||||
requires = list(
|
||||
"coal" = 1,
|
||||
"hematite" = 1
|
||||
)
|
||||
product = /obj/item/stack/sheet/metal
|
||||
product = /obj/item/stack/material/steel
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
//Dig out the tasty ores.
|
||||
if(resource_field.len)
|
||||
var/turf/harvesting = pick(resource_field)
|
||||
var/turf/simulated/harvesting = pick(resource_field)
|
||||
|
||||
while(resource_field.len && !harvesting.resources)
|
||||
harvesting.has_resources = 0
|
||||
@@ -253,7 +253,7 @@
|
||||
|
||||
var/tx = T.x - 2
|
||||
var/ty = T.y - 2
|
||||
var/turf/mine_turf
|
||||
var/turf/simulated/mine_turf
|
||||
for(var/iy = 0,iy < 5, iy++)
|
||||
for(var/ix = 0, ix < 5, ix++)
|
||||
mine_turf = locate(tx + ix, ty + iy, T.z)
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "forensic0-old" //GET A BETTER SPRITE.
|
||||
item_state = "electronic"
|
||||
matter = list("metal" = 150)
|
||||
origin_tech = "magnets=1;engineering=1"
|
||||
origin_tech = list(TECH_MAGNET = 1, TECH_ENGINERING = 1)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 150)
|
||||
|
||||
/obj/item/weapon/mining_scanner/attack_self(mob/user as mob)
|
||||
user << "You begin sweeping \the [src] about, scanning for metal deposits."
|
||||
@@ -20,7 +20,7 @@
|
||||
"exotic matter" = 0
|
||||
)
|
||||
|
||||
for(var/turf/T in range(2, get_turf(user)))
|
||||
for(var/turf/simulated/T in range(2, get_turf(user)))
|
||||
|
||||
if(!T.has_resources)
|
||||
continue
|
||||
|
||||
@@ -42,8 +42,9 @@
|
||||
for(var/ore in machine.ores_processing)
|
||||
|
||||
if(!machine.ores_stored[ore] && !show_all_ores) continue
|
||||
|
||||
dat += "<tr><td width = 40><b>[capitalize(ore)]</b></td><td width = 30>[machine.ores_stored[ore]]</td><td width = 100><font color='"
|
||||
var/ore/O = ore_data[ore]
|
||||
if(!O) continue
|
||||
dat += "<tr><td width = 40><b>[capitalize(O.display_name)]</b></td><td width = 30>[machine.ores_stored[ore]]</td><td width = 100><font color='"
|
||||
if(machine.ores_processing[ore])
|
||||
switch(machine.ores_processing[ore])
|
||||
if(0)
|
||||
@@ -104,14 +105,13 @@
|
||||
icon_state = "furnace"
|
||||
density = 1
|
||||
anchored = 1
|
||||
luminosity = 3
|
||||
light_range = 3
|
||||
var/obj/machinery/mineral/input = null
|
||||
var/obj/machinery/mineral/output = null
|
||||
var/obj/machinery/mineral/console = null
|
||||
var/sheets_per_tick = 10
|
||||
var/list/ores_processing[0]
|
||||
var/list/ores_stored[0]
|
||||
var/list/ore_data[0]
|
||||
var/list/alloy_data[0]
|
||||
var/active = 0
|
||||
|
||||
@@ -123,11 +123,12 @@
|
||||
for(var/alloytype in typesof(/datum/alloy)-/datum/alloy)
|
||||
alloy_data += new alloytype()
|
||||
|
||||
for(var/oretype in typesof(/datum/ore)-/datum/ore)
|
||||
var/datum/ore/OD = new oretype()
|
||||
ore_data[OD.oretag] = OD
|
||||
ores_processing[OD.oretag] = 0
|
||||
ores_stored[OD.oretag] = 0
|
||||
if(!ore_data || !ore_data.len)
|
||||
for(var/oretype in typesof(/ore)-/ore)
|
||||
var/ore/OD = new oretype()
|
||||
ore_data[OD.name] = OD
|
||||
ores_processing[OD.name] = 0
|
||||
ores_stored[OD.name] = 0
|
||||
|
||||
//Locate our output and input machinery.
|
||||
spawn(5)
|
||||
@@ -150,8 +151,10 @@
|
||||
for(var/i = 0,i<sheets_per_tick,i++)
|
||||
var/obj/item/weapon/ore/O = locate() in input.loc
|
||||
if(!O) break
|
||||
if(!isnull(ores_stored[O.oretag])) ores_stored[O.oretag]++
|
||||
O.loc = null
|
||||
if(!isnull(ores_stored[O.material]))
|
||||
ores_stored[O.material]++
|
||||
|
||||
qdel(O)
|
||||
|
||||
if(!active)
|
||||
return
|
||||
@@ -164,7 +167,7 @@
|
||||
|
||||
if(ores_stored[metal] > 0 && ores_processing[metal] != 0)
|
||||
|
||||
var/datum/ore/O = ore_data[metal]
|
||||
var/ore/O = ore_data[metal]
|
||||
|
||||
if(!O) continue
|
||||
|
||||
@@ -206,24 +209,28 @@
|
||||
var/can_make = Clamp(ores_stored[metal],0,sheets_per_tick-sheets)
|
||||
if(can_make%2>0) can_make--
|
||||
|
||||
if(!can_make || ores_stored[metal] < 1)
|
||||
var/material/M = name_to_material[O.compresses_to]
|
||||
|
||||
if(!istype(M) || !can_make || ores_stored[metal] < 1)
|
||||
continue
|
||||
|
||||
for(var/i=0,i<can_make,i+=2)
|
||||
ores_stored[metal]-=2
|
||||
sheets+=2
|
||||
new O.compresses_to(output.loc)
|
||||
new M.stack_type(output.loc)
|
||||
|
||||
else if(ores_processing[metal] == 1 && O.smelts_to) //Smelting.
|
||||
|
||||
var/can_make = Clamp(ores_stored[metal],0,sheets_per_tick-sheets)
|
||||
if(!can_make || ores_stored[metal] < 1)
|
||||
|
||||
var/material/M = name_to_material[O.smelts_to]
|
||||
if(!istype(M) || !can_make || ores_stored[metal] < 1)
|
||||
continue
|
||||
|
||||
for(var/i=0,i<can_make,i++)
|
||||
ores_stored[metal]--
|
||||
sheets++
|
||||
new O.smelts_to(output.loc)
|
||||
new M.stack_type(output.loc)
|
||||
else
|
||||
ores_stored[metal]--
|
||||
sheets++
|
||||
@@ -231,4 +238,4 @@
|
||||
else
|
||||
continue
|
||||
|
||||
console.updateUsrDialog()
|
||||
console.updateUsrDialog()
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
if(href_list["release_stack"])
|
||||
if(machine.stack_storage[href_list["release_stack"]] > 0)
|
||||
var/stacktype = machine.stack_paths[href_list["release_stack"]]
|
||||
var/obj/item/stack/sheet/S = new stacktype (get_turf(machine.output))
|
||||
var/obj/item/stack/material/S = new stacktype (get_turf(machine.output))
|
||||
S.amount = machine.stack_storage[href_list["release_stack"]]
|
||||
machine.stack_storage[href_list["release_stack"]] = 0
|
||||
|
||||
@@ -81,18 +81,18 @@
|
||||
/obj/machinery/mineral/stacking_machine/New()
|
||||
..()
|
||||
|
||||
for(var/stacktype in typesof(/obj/item/stack/sheet/mineral)-/obj/item/stack/sheet/mineral)
|
||||
for(var/stacktype in typesof(/obj/item/stack/material)-/obj/item/stack/material)
|
||||
var/obj/item/stack/S = new stacktype(src)
|
||||
stack_storage[S.name] = 0
|
||||
stack_paths[S.name] = stacktype
|
||||
qdel(S)
|
||||
|
||||
stack_storage["glass"] = 0
|
||||
stack_paths["glass"] = /obj/item/stack/sheet/glass
|
||||
stack_storage["metal"] = 0
|
||||
stack_paths["metal"] = /obj/item/stack/sheet/metal
|
||||
stack_paths["glass"] = /obj/item/stack/material/glass
|
||||
stack_storage[DEFAULT_WALL_MATERIAL] = 0
|
||||
stack_paths[DEFAULT_WALL_MATERIAL] = /obj/item/stack/material/steel
|
||||
stack_storage["plasteel"] = 0
|
||||
stack_paths["plasteel"] = /obj/item/stack/sheet/plasteel
|
||||
stack_paths["plasteel"] = /obj/item/stack/material/plasteel
|
||||
|
||||
spawn( 5 )
|
||||
for (var/dir in cardinal)
|
||||
@@ -122,7 +122,7 @@
|
||||
for(var/sheet in stack_storage)
|
||||
if(stack_storage[sheet] >= stack_amt)
|
||||
var/stacktype = stack_paths[sheet]
|
||||
var/obj/item/stack/sheet/S = new stacktype (get_turf(output))
|
||||
var/obj/item/stack/material/S = new stacktype (get_turf(output))
|
||||
S.amount = stack_amt
|
||||
stack_storage[sheet] -= stack_amt
|
||||
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
/**********************Light************************/
|
||||
|
||||
//this item is intended to give the effect of entering the mine, so that light gradually fades
|
||||
/obj/effect/light_emitter
|
||||
name = "Light-emtter"
|
||||
anchored = 1
|
||||
unacidable = 1
|
||||
luminosity = 8
|
||||
|
||||
/**********************Miner Lockers**************************/
|
||||
|
||||
/obj/structure/closet/secure_closet/miner
|
||||
@@ -35,8 +26,7 @@
|
||||
new /obj/item/device/flashlight/lantern(src)
|
||||
new /obj/item/weapon/shovel(src)
|
||||
new /obj/item/weapon/pickaxe(src)
|
||||
new /obj/item/clothing/glasses/meson(src)
|
||||
|
||||
new /obj/item/clothing/glasses/material(src)
|
||||
|
||||
/******************************Lantern*******************************/
|
||||
|
||||
@@ -59,9 +49,9 @@
|
||||
icon_state = "pickaxe"
|
||||
item_state = "jackhammer"
|
||||
w_class = 4.0
|
||||
matter = list("metal" = 3750)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 3750)
|
||||
var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINERING = 1)
|
||||
attack_verb = list("hit", "pierced", "sliced", "attacked")
|
||||
var/drill_sound = 'sound/weapons/Genhit.ogg'
|
||||
var/drill_verb = "drilling"
|
||||
@@ -79,7 +69,7 @@
|
||||
icon_state = "spickaxe"
|
||||
item_state = "spickaxe"
|
||||
digspeed = 30
|
||||
origin_tech = "materials=3"
|
||||
origin_tech = list(TECH_MATERIAL = 3)
|
||||
desc = "This makes no metallurgic sense."
|
||||
|
||||
/obj/item/weapon/pickaxe/drill
|
||||
@@ -87,7 +77,7 @@
|
||||
icon_state = "handdrill"
|
||||
item_state = "jackhammer"
|
||||
digspeed = 30
|
||||
origin_tech = "materials=2;powerstorage=3;engineering=2"
|
||||
origin_tech = list(TECH_MATERIAL = 2, TECH_POWER = 3, TECH_ENGINERING = 2)
|
||||
desc = "Yours is the drill that will pierce through the rock walls."
|
||||
drill_verb = "drilling"
|
||||
|
||||
@@ -96,7 +86,7 @@
|
||||
icon_state = "jackhammer"
|
||||
item_state = "jackhammer"
|
||||
digspeed = 20 //faster than drill, but cannot dig
|
||||
origin_tech = "materials=3;powerstorage=2;engineering=2"
|
||||
origin_tech = list(TECH_MATERIAL = 3, TECH_POWER = 2, TECH_ENGINERING = 2)
|
||||
desc = "Cracks rocks with sonic blasts, perfect for killing cave lizards."
|
||||
drill_verb = "hammering"
|
||||
|
||||
@@ -105,7 +95,7 @@
|
||||
icon_state = "gpickaxe"
|
||||
item_state = "gpickaxe"
|
||||
digspeed = 20
|
||||
origin_tech = "materials=4"
|
||||
origin_tech = list(TECH_MATERIAL = 4)
|
||||
desc = "This makes no metallurgic sense."
|
||||
drill_verb = "picking"
|
||||
|
||||
@@ -116,9 +106,10 @@
|
||||
w_class = 3.0 //it is smaller than the pickaxe
|
||||
damtype = "fire"
|
||||
digspeed = 20 //Can slice though normal walls, all girders, or be used in reinforced wall deconstruction/ light thermite on fire
|
||||
origin_tech = "materials=4;phorontech=3;engineering=3"
|
||||
origin_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 3, TECH_ENGINERING = 3)
|
||||
desc = "A rock cutter that uses bursts of hot plasma. You could use it to cut limbs off of xenos! Or, you know, mine stuff."
|
||||
drill_verb = "cutting"
|
||||
drill_sound = 'sound/items/Welder.ogg'
|
||||
sharp = 1
|
||||
edge = 1
|
||||
|
||||
@@ -127,7 +118,7 @@
|
||||
icon_state = "dpickaxe"
|
||||
item_state = "dpickaxe"
|
||||
digspeed = 10
|
||||
origin_tech = "materials=6;engineering=4"
|
||||
origin_tech = list(TECH_MATERIAL = 6, TECH_ENGINERING = 4)
|
||||
desc = "A pickaxe with a diamond pick head."
|
||||
drill_verb = "picking"
|
||||
|
||||
@@ -136,7 +127,7 @@
|
||||
icon_state = "diamonddrill"
|
||||
item_state = "jackhammer"
|
||||
digspeed = 5 //Digs through walls, girders, and can dig up sand
|
||||
origin_tech = "materials=6;powerstorage=4;engineering=5"
|
||||
origin_tech = list(TECH_MATERIAL = 6, TECH_POWER = 4, TECH_ENGINERING = 5)
|
||||
desc = "Yours is the drill that will pierce the heavens!"
|
||||
drill_verb = "drilling"
|
||||
|
||||
@@ -161,8 +152,8 @@
|
||||
throwforce = 4.0
|
||||
item_state = "shovel"
|
||||
w_class = 3.0
|
||||
matter = list("metal" = 50)
|
||||
origin_tech = "materials=1;engineering=1"
|
||||
origin_tech = list(TECH_MATERIAL = 1, TECH_ENGINERING = 1)
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 50)
|
||||
attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked")
|
||||
sharp = 0
|
||||
edge = 1
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
/**********************Mineral deposits**************************/
|
||||
|
||||
/turf/unsimulated/mineral
|
||||
name = "impassable rock"
|
||||
icon = 'icons/turf/walls.dmi'
|
||||
icon_state = "rock-dark"
|
||||
|
||||
/turf/simulated/mineral //wall piece
|
||||
name = "Rock"
|
||||
@@ -11,7 +14,8 @@
|
||||
density = 1
|
||||
blocks_air = 1
|
||||
temperature = T0C
|
||||
var/mineral/mineral
|
||||
var/mined_turf = /turf/simulated/floor/plating/airless/asteroid
|
||||
var/ore/mineral
|
||||
var/mined_ore = 0
|
||||
var/last_act = 0
|
||||
var/emitter_blasts_taken = 0 // EMITTER MINING! Muhehe.
|
||||
@@ -28,21 +32,20 @@
|
||||
has_resources = 1
|
||||
|
||||
/turf/simulated/mineral/New()
|
||||
|
||||
spawn(0)
|
||||
MineralSpread()
|
||||
|
||||
spawn(2)
|
||||
var/list/step_overlays = list("s" = NORTH, "n" = SOUTH, "w" = EAST, "e" = WEST)
|
||||
for(var/direction in step_overlays)
|
||||
var/turf/turf_to_check = get_step(src,step_overlays[direction])
|
||||
updateMineralOverlays(1)
|
||||
|
||||
if(istype(turf_to_check,/turf/simulated/floor/plating/airless/asteroid))
|
||||
var/turf/simulated/floor/plating/airless/asteroid/T = turf_to_check
|
||||
T.updateMineralOverlays()
|
||||
|
||||
else if(istype(turf_to_check,/turf/space) || istype(turf_to_check,/turf/simulated/floor))
|
||||
turf_to_check.overlays += image('icons/turf/walls.dmi', "rock_side_[direction]")
|
||||
/turf/simulated/mineral/proc/updateMineralOverlays(var/update_neighbors)
|
||||
var/list/step_overlays = list("s" = NORTH, "n" = SOUTH, "w" = EAST, "e" = WEST)
|
||||
for(var/direction in step_overlays)
|
||||
var/turf/turf_to_check = get_step(src,step_overlays[direction])
|
||||
if(update_neighbors && istype(turf_to_check,/turf/simulated/floor/plating/airless/asteroid))
|
||||
var/turf/simulated/floor/plating/airless/asteroid/T = turf_to_check
|
||||
T.updateMineralOverlays()
|
||||
else if(istype(turf_to_check,/turf/space) || istype(turf_to_check,/turf/simulated/floor))
|
||||
turf_to_check.overlays += image('icons/turf/walls.dmi', "rock_side_[direction]")
|
||||
|
||||
/turf/simulated/mineral/ex_act(severity)
|
||||
switch(severity)
|
||||
@@ -95,13 +98,13 @@
|
||||
|
||||
|
||||
/turf/simulated/mineral/proc/UpdateMineral()
|
||||
clear_ore_effects()
|
||||
if(!mineral)
|
||||
name = "\improper Rock"
|
||||
icon_state = "rock"
|
||||
return
|
||||
name = "\improper [mineral.display_name] deposit"
|
||||
overlays.Cut()
|
||||
overlays += "rock_[mineral.name]"
|
||||
new /obj/effect/mineral(src, mineral)
|
||||
|
||||
//Not even going to touch this pile of spaghetti
|
||||
/turf/simulated/mineral/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
@@ -234,10 +237,15 @@
|
||||
else
|
||||
return attack_hand(user)
|
||||
|
||||
/turf/simulated/mineral/proc/clear_ore_effects()
|
||||
for(var/obj/effect/mineral/M in contents)
|
||||
qdel(M)
|
||||
|
||||
/turf/simulated/mineral/proc/DropMineral()
|
||||
if(!mineral)
|
||||
return
|
||||
|
||||
clear_ore_effects()
|
||||
var/obj/item/weapon/ore/O = new mineral.ore (src)
|
||||
if(istype(O))
|
||||
geologic_data.UpdateNearbyArtifactInfo(src)
|
||||
@@ -274,8 +282,8 @@
|
||||
var/list/step_overlays = list("n" = NORTH, "s" = SOUTH, "e" = EAST, "w" = WEST)
|
||||
|
||||
//Add some rubble, you did just clear out a big chunk of rock.
|
||||
var/turf/simulated/floor/plating/airless/asteroid/N = ChangeTurf(/turf/simulated/floor/plating/airless/asteroid)
|
||||
N.overlay_detail = "asteroid[rand(0,9)]"
|
||||
|
||||
var/turf/simulated/floor/plating/airless/asteroid/N = ChangeTurf(mined_turf)
|
||||
|
||||
// Kill and update the space overlays around us.
|
||||
for(var/direction in step_overlays)
|
||||
@@ -286,13 +294,9 @@
|
||||
if(istype(get_step(T, step_overlays[next_direction]),/turf/simulated/mineral))
|
||||
T.overlays += image('icons/turf/walls.dmi', "rock_side_[next_direction]")
|
||||
|
||||
// Update the
|
||||
N.updateMineralOverlays(1)
|
||||
|
||||
if(rand(1,500) == 1)
|
||||
visible_message("<span class='notice'>An old dusty crate was buried within!</span>")
|
||||
new /obj/structure/closet/crate/secure/loot(src)
|
||||
|
||||
if(istype(N))
|
||||
N.overlay_detail = "asteroid[rand(0,9)]"
|
||||
N.updateMineralOverlays(1)
|
||||
|
||||
/turf/simulated/mineral/proc/excavate_find(var/prob_clean = 0, var/datum/find/F)
|
||||
//with skill and luck, players can cleanly extract finds
|
||||
@@ -340,25 +344,25 @@
|
||||
R.amount = rand(1,5)
|
||||
|
||||
if(3)
|
||||
var/obj/item/stack/sheet/metal/R = new(src)
|
||||
var/obj/item/stack/material/steel/R = new(src)
|
||||
R.amount = rand(5,25)
|
||||
|
||||
if(4)
|
||||
var/obj/item/stack/sheet/plasteel/R = new(src)
|
||||
var/obj/item/stack/material/plasteel/R = new(src)
|
||||
R.amount = rand(5,25)
|
||||
|
||||
if(5)
|
||||
var/quantity = rand(1,3)
|
||||
for(var/i=0, i<quantity, i++)
|
||||
new /obj/item/weapon/shard(src)
|
||||
new /obj/item/weapon/material/shard(src)
|
||||
|
||||
if(6)
|
||||
var/quantity = rand(1,3)
|
||||
for(var/i=0, i<quantity, i++)
|
||||
new /obj/item/weapon/shard/phoron(src)
|
||||
new /obj/item/weapon/material/shard/phoron(src)
|
||||
|
||||
if(7)
|
||||
var/obj/item/stack/sheet/mineral/uranium/R = new(src)
|
||||
var/obj/item/stack/material/uranium/R = new(src)
|
||||
R.amount = rand(5,25)
|
||||
|
||||
/turf/simulated/mineral/random
|
||||
@@ -369,12 +373,9 @@
|
||||
/turf/simulated/mineral/random/New()
|
||||
if (prob(mineralChance) && !mineral)
|
||||
var/mineral_name = pickweight(mineralSpawnChanceList) //temp mineral name
|
||||
|
||||
if(!name_to_mineral)
|
||||
SetupMinerals()
|
||||
|
||||
if (mineral_name && mineral_name in name_to_mineral)
|
||||
mineral = name_to_mineral[mineral_name]
|
||||
mineral_name = lowertext(mineral_name)
|
||||
if (mineral_name && (mineral_name in ore_data))
|
||||
mineral = ore_data[mineral_name]
|
||||
UpdateMineral()
|
||||
|
||||
. = ..()
|
||||
@@ -388,7 +389,7 @@
|
||||
|
||||
|
||||
/turf/simulated/floor/plating/airless/asteroid //floor piece
|
||||
name = "asteroid"
|
||||
name = "sand"
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "asteroid"
|
||||
oxygen = 0
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/obj/effect/mineral
|
||||
name = "mineral vein"
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
desc = "Shiny."
|
||||
mouse_opacity = 0
|
||||
density = 0
|
||||
anchored = 1
|
||||
var/ore_key
|
||||
var/image/scanner_image
|
||||
|
||||
/obj/effect/mineral/New(var/newloc, var/ore/M)
|
||||
..(newloc)
|
||||
name = "[M.display_name] deposit"
|
||||
ore_key = M.name
|
||||
icon_state = "rock_[ore_key]"
|
||||
var/turf/T = get_turf(src)
|
||||
layer = T.layer+0.1
|
||||
|
||||
/obj/effect/mineral/proc/get_scan_overlay()
|
||||
if(!scanner_image)
|
||||
var/ore/O = ore_data[ore_key]
|
||||
if(O)
|
||||
scanner_image = image(icon, loc = get_turf(src), icon_state = (O.scan_icon ? O.scan_icon : icon_state))
|
||||
else
|
||||
world << "No ore data for [src]!"
|
||||
return scanner_image
|
||||
@@ -1,72 +0,0 @@
|
||||
var/list/name_to_mineral
|
||||
|
||||
/proc/SetupMinerals()
|
||||
name_to_mineral = list()
|
||||
for(var/type in typesof(/mineral) - /mineral)
|
||||
var/mineral/new_mineral = new type
|
||||
if(!new_mineral.name)
|
||||
continue
|
||||
name_to_mineral[new_mineral.name] = new_mineral
|
||||
return 1
|
||||
|
||||
/mineral
|
||||
var/name // Tag for use in overlay generation/list population .
|
||||
var/display_name // What am I called?
|
||||
var/result_amount // How much ore?
|
||||
var/spread = 1 // Does this type of deposit spread?
|
||||
var/spread_chance // Chance of spreading in any direction
|
||||
var/ore // Path to the ore produced when tile is mined.
|
||||
|
||||
|
||||
/mineral/New()
|
||||
. = ..()
|
||||
if(!display_name)
|
||||
display_name = name
|
||||
|
||||
/mineral/uranium
|
||||
name = "Uranium"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/uranium
|
||||
|
||||
/mineral/platinum
|
||||
name = "Platinum"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/osmium
|
||||
|
||||
/mineral/iron
|
||||
name = "Iron"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/iron
|
||||
|
||||
/mineral/coal
|
||||
name = "Coal"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/coal
|
||||
|
||||
/mineral/diamond
|
||||
name = "Diamond"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/diamond
|
||||
|
||||
/mineral/gold
|
||||
name = "Gold"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/gold
|
||||
|
||||
/mineral/silver
|
||||
name = "Silver"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/silver
|
||||
|
||||
/mineral/phoron
|
||||
name = "Phoron"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/phoron
|
||||
+11
-11
@@ -17,7 +17,7 @@
|
||||
var/amt_uranium = 0
|
||||
var/newCoins = 0 //how many coins the machine made in it's last load
|
||||
var/processing = 0
|
||||
var/chosen = "metal" //which material will be used to make coins
|
||||
var/chosen = DEFAULT_WALL_MATERIAL //which material will be used to make coins
|
||||
var/coinsToProduce = 10
|
||||
|
||||
|
||||
@@ -37,25 +37,25 @@
|
||||
|
||||
/obj/machinery/mineral/mint/process()
|
||||
if ( src.input)
|
||||
var/obj/item/stack/sheet/O
|
||||
O = locate(/obj/item/stack/sheet, input.loc)
|
||||
var/obj/item/stack/material/O
|
||||
O = locate(/obj/item/stack/material, input.loc)
|
||||
if(O)
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/gold))
|
||||
if (istype(O,/obj/item/stack/material/gold))
|
||||
amt_gold += 100 * O.get_amount()
|
||||
qdel(O)
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/silver))
|
||||
if (istype(O,/obj/item/stack/material/silver))
|
||||
amt_silver += 100 * O.get_amount()
|
||||
qdel(O)
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/diamond))
|
||||
if (istype(O,/obj/item/stack/material/diamond))
|
||||
amt_diamond += 100 * O.get_amount()
|
||||
qdel(O)
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/phoron))
|
||||
if (istype(O,/obj/item/stack/material/phoron))
|
||||
amt_phoron += 100 * O.get_amount()
|
||||
qdel(O)
|
||||
if (istype(O,/obj/item/stack/sheet/mineral/uranium))
|
||||
if (istype(O,/obj/item/stack/material/uranium))
|
||||
amt_uranium += 100 * O.get_amount()
|
||||
qdel(O)
|
||||
if (istype(O,/obj/item/stack/sheet/metal))
|
||||
if (istype(O,/obj/item/stack/material/steel))
|
||||
amt_iron += 100 * O.get_amount()
|
||||
qdel(O)
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];choose=silver'>Choose</A>")
|
||||
dat += text("<br><font color='#555555'><b>Iron inserted: </b>[amt_iron]</font> ")
|
||||
if (chosen == "metal")
|
||||
if (chosen == DEFAULT_WALL_MATERIAL)
|
||||
dat += text("chosen")
|
||||
else
|
||||
dat += text("<A href='?src=\ref[src];choose=metal'>Choose</A>")
|
||||
@@ -133,7 +133,7 @@
|
||||
icon_state = "coinpress1"
|
||||
var/obj/item/weapon/moneybag/M
|
||||
switch(chosen)
|
||||
if("metal")
|
||||
if(DEFAULT_WALL_MATERIAL)
|
||||
while(amt_iron > 0 && coinsToProduce > 0)
|
||||
if (locate(/obj/item/weapon/moneybag,output.loc))
|
||||
M = locate(/obj/item/weapon/moneybag,output.loc)
|
||||
|
||||
+32
-32
@@ -4,71 +4,71 @@
|
||||
icon_state = "ore2"
|
||||
w_class = 2
|
||||
var/datum/geosample/geologic_data
|
||||
var/oretag
|
||||
var/material
|
||||
|
||||
/obj/item/weapon/ore/uranium
|
||||
name = "pitchblende"
|
||||
icon_state = "Uranium ore"
|
||||
origin_tech = "materials=5"
|
||||
oretag = "uranium"
|
||||
icon_state = "ore_uranium"
|
||||
origin_tech = list(TECH_MATERIAL = 5)
|
||||
material = "uranium"
|
||||
|
||||
/obj/item/weapon/ore/iron
|
||||
name = "hematite"
|
||||
icon_state = "Iron ore"
|
||||
origin_tech = "materials=1"
|
||||
oretag = "hematite"
|
||||
icon_state = "ore_iron"
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
material = "hematite"
|
||||
|
||||
/obj/item/weapon/ore/coal
|
||||
name = "carbonaceous rock"
|
||||
icon_state = "Coal ore"
|
||||
origin_tech = "materials=1"
|
||||
oretag = "coal"
|
||||
name = "raw carbon"
|
||||
icon_state = "ore_coal"
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
material = "carbon"
|
||||
|
||||
/obj/item/weapon/ore/glass
|
||||
name = "impure silicates"
|
||||
icon_state = "Glass ore"
|
||||
origin_tech = "materials=1"
|
||||
oretag = "sand"
|
||||
icon_state = "ore_glass"
|
||||
origin_tech = list(TECH_MATERIAL = 1)
|
||||
material = "sand"
|
||||
|
||||
/obj/item/weapon/ore/phoron
|
||||
name = "phoron crystals"
|
||||
icon_state = "Phoron ore"
|
||||
origin_tech = "materials=2"
|
||||
oretag = "phoron"
|
||||
icon_state = "ore_phoron"
|
||||
origin_tech = list(TECH_MATERIAL = 2)
|
||||
material = "phoron"
|
||||
|
||||
/obj/item/weapon/ore/silver
|
||||
name = "native silver ore"
|
||||
icon_state = "Silver ore"
|
||||
origin_tech = "materials=3"
|
||||
oretag = "silver"
|
||||
icon_state = "ore_silver"
|
||||
origin_tech = list(TECH_MATERIAL = 3)
|
||||
material = "silver"
|
||||
|
||||
/obj/item/weapon/ore/gold
|
||||
name = "native gold ore"
|
||||
icon_state = "Gold ore"
|
||||
origin_tech = "materials=4"
|
||||
oretag = "gold"
|
||||
icon_state = "ore_gold"
|
||||
origin_tech = list(TECH_MATERIAL = 4)
|
||||
material = "gold"
|
||||
|
||||
/obj/item/weapon/ore/diamond
|
||||
name = "diamonds"
|
||||
icon_state = "Diamond ore"
|
||||
origin_tech = "materials=6"
|
||||
oretag = "diamond"
|
||||
icon_state = "ore_diamond"
|
||||
origin_tech = list(TECH_MATERIAL = 6)
|
||||
material = "diamond"
|
||||
|
||||
/obj/item/weapon/ore/osmium
|
||||
name = "raw platinum"
|
||||
icon_state = "Platinum ore"
|
||||
oretag = "platinum"
|
||||
icon_state = "ore_platinum"
|
||||
material = "platinum"
|
||||
|
||||
/obj/item/weapon/ore/hydrogen
|
||||
name = "raw hydrogen"
|
||||
icon_state = "Phazon"
|
||||
oretag = "hydrogen"
|
||||
icon_state = "ore_hydrogen"
|
||||
material = "mhydrogen"
|
||||
|
||||
/obj/item/weapon/ore/slag
|
||||
name = "Slag"
|
||||
desc = "Completely useless"
|
||||
desc = "Someone screwed up..."
|
||||
icon_state = "slag"
|
||||
oretag = "slag"
|
||||
material = null
|
||||
|
||||
/obj/item/weapon/ore/New()
|
||||
pixel_x = rand(0,16)-8
|
||||
|
||||
@@ -1,52 +1,133 @@
|
||||
/datum/ore
|
||||
var/oretag
|
||||
var/global/list/ore_data = list()
|
||||
|
||||
/ore
|
||||
var/name
|
||||
var/display_name
|
||||
var/alloy
|
||||
var/smelts_to
|
||||
var/compresses_to
|
||||
var/result_amount // How much ore?
|
||||
var/spread = 1 // Does this type of deposit spread?
|
||||
var/spread_chance // Chance of spreading in any direction
|
||||
var/ore // Path to the ore produced when tile is mined.
|
||||
var/scan_icon // Overlay for ore scanners.
|
||||
// Xenoarch stuff. No idea what it's for, just refactored it to be less awful.
|
||||
var/list/xarch_ages = list(
|
||||
"thousand" = 999,
|
||||
"million" = 999
|
||||
)
|
||||
var/xarch_source_mineral = "iron"
|
||||
|
||||
/datum/ore/uranium
|
||||
smelts_to = /obj/item/stack/sheet/mineral/uranium
|
||||
oretag = "uranium"
|
||||
/ore/New()
|
||||
. = ..()
|
||||
if(!display_name)
|
||||
display_name = name
|
||||
|
||||
/datum/ore/iron
|
||||
smelts_to = /obj/item/stack/sheet/mineral/iron
|
||||
/ore/uranium
|
||||
name = "uranium"
|
||||
display_name = "pitchblende"
|
||||
smelts_to = "uranium"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/uranium
|
||||
scan_icon = "mineral_uncommon"
|
||||
xarch_ages = list(
|
||||
"thousand" = 999,
|
||||
"million" = 704
|
||||
)
|
||||
xarch_source_mineral = "potassium"
|
||||
|
||||
/ore/hematite
|
||||
name = "hematite"
|
||||
display_name = "hematite"
|
||||
smelts_to = "iron"
|
||||
alloy = 1
|
||||
oretag = "hematite"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/iron
|
||||
scan_icon = "mineral_common"
|
||||
|
||||
/datum/ore/coal
|
||||
smelts_to = /obj/item/stack/sheet/mineral/plastic
|
||||
/ore/coal
|
||||
name = "carbon"
|
||||
display_name = "raw carbon"
|
||||
smelts_to = "plastic"
|
||||
alloy = 1
|
||||
oretag = "coal"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/coal
|
||||
scan_icon = "mineral_common"
|
||||
|
||||
/datum/ore/glass
|
||||
smelts_to = /obj/item/stack/sheet/glass
|
||||
compresses_to = /obj/item/stack/sheet/mineral/sandstone
|
||||
oretag = "sand"
|
||||
/ore/glass
|
||||
name = "sand"
|
||||
display_name = "impure silicates"
|
||||
smelts_to = "glass"
|
||||
compresses_to = "sandstone"
|
||||
|
||||
/datum/ore/phoron
|
||||
/ore/phoron
|
||||
name = "phoron"
|
||||
display_name = "phoron crystals"
|
||||
compresses_to = "phoron"
|
||||
//smelts_to = something that explodes violently on the conveyor, huhuhuhu
|
||||
compresses_to = /obj/item/stack/sheet/mineral/phoron
|
||||
oretag = "phoron"
|
||||
result_amount = 5
|
||||
spread_chance = 25
|
||||
ore = /obj/item/weapon/ore/phoron
|
||||
scan_icon = "mineral_uncommon"
|
||||
xarch_ages = list(
|
||||
"thousand" = 999,
|
||||
"million" = 999,
|
||||
"billion" = 13,
|
||||
"billion_lower" = 10
|
||||
)
|
||||
xarch_source_mineral = "phoron"
|
||||
|
||||
/datum/ore/silver
|
||||
smelts_to = /obj/item/stack/sheet/mineral/silver
|
||||
oretag = "silver"
|
||||
/ore/silver
|
||||
name = "silver"
|
||||
display_name = "native silver"
|
||||
smelts_to = "silver"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/silver
|
||||
scan_icon = "mineral_uncommon"
|
||||
|
||||
/datum/ore/gold
|
||||
smelts_to = /obj/item/stack/sheet/mineral/gold
|
||||
oretag = "gold"
|
||||
/ore/gold
|
||||
smelts_to = "gold"
|
||||
name = "gold"
|
||||
display_name = "native gold"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/gold
|
||||
scan_icon = "mineral_uncommon"
|
||||
xarch_ages = list(
|
||||
"thousand" = 999,
|
||||
"million" = 999,
|
||||
"billion" = 4,
|
||||
"billion_lower" = 3
|
||||
)
|
||||
|
||||
/datum/ore/diamond
|
||||
compresses_to = /obj/item/stack/sheet/mineral/diamond
|
||||
oretag = "diamond"
|
||||
/ore/diamond
|
||||
name = "diamond"
|
||||
display_name = "diamond"
|
||||
compresses_to = "diamond"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/diamond
|
||||
scan_icon = "mineral_rare"
|
||||
xarch_source_mineral = "nitrogen"
|
||||
|
||||
/datum/ore/osmium
|
||||
smelts_to = /obj/item/stack/sheet/mineral/platinum
|
||||
compresses_to = /obj/item/stack/sheet/mineral/osmium
|
||||
/ore/platinum
|
||||
name = "platinum"
|
||||
display_name = "raw platinum"
|
||||
smelts_to = "platinum"
|
||||
compresses_to = "osmium"
|
||||
alloy = 1
|
||||
oretag = "platinum"
|
||||
result_amount = 5
|
||||
spread_chance = 10
|
||||
ore = /obj/item/weapon/ore/osmium
|
||||
scan_icon = "mineral_rare"
|
||||
|
||||
/datum/ore/hydrogen
|
||||
smelts_to = /obj/item/stack/sheet/mineral/tritium
|
||||
compresses_to = /obj/item/stack/sheet/mineral/mhydrogen
|
||||
oretag = "hydrogen"
|
||||
/ore/hydrogen
|
||||
name = "mhydrogen"
|
||||
display_name = "metallic hydrogen"
|
||||
smelts_to = "tritium"
|
||||
compresses_to = "mhydrogen"
|
||||
scan_icon = "mineral_rare"
|
||||
Reference in New Issue
Block a user