mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Finalized wall refactor.
This commit is contained in:
@@ -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)
|
||||
@@ -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.name])) ores_stored[O.name]++
|
||||
O.loc = null
|
||||
if(!isnull(ores_stored[O.material]))
|
||||
ores_stored[O.material]++
|
||||
|
||||
del(O)
|
||||
|
||||
if(!active)
|
||||
return
|
||||
@@ -206,7 +209,7 @@
|
||||
var/can_make = Clamp(ores_stored[metal],0,sheets_per_tick-sheets)
|
||||
if(can_make%2>0) can_make--
|
||||
|
||||
var/material/M = name_to_mineral[O.compresses_to]
|
||||
var/material/M = name_to_material[O.compresses_to]
|
||||
|
||||
if(!istype(M) || !can_make || ores_stored[metal] < 1)
|
||||
continue
|
||||
@@ -220,7 +223,7 @@
|
||||
|
||||
var/can_make = Clamp(ores_stored[metal],0,sheets_per_tick-sheets)
|
||||
|
||||
var/material/M = name_to_mineral[O.smelts_to]
|
||||
var/material/M = name_to_material[O.smelts_to]
|
||||
if(!istype(M) || !can_make || ores_stored[metal] < 1)
|
||||
continue
|
||||
|
||||
|
||||
@@ -26,7 +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/minerals(src)
|
||||
new /obj/item/clothing/glasses/material(src)
|
||||
|
||||
/******************************Lantern*******************************/
|
||||
|
||||
|
||||
@@ -5,15 +5,22 @@
|
||||
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"
|
||||
icon_state = "rock_[M.name]"
|
||||
ore_key = M.name
|
||||
icon_state = "rock_[ore_key]"
|
||||
var/turf/T = get_turf(src)
|
||||
layer = T.layer+0.1
|
||||
|
||||
var/ore/O = ore_data[M.name]
|
||||
if(O)
|
||||
scanner_image = image(icon, loc = get_turf(src), icon_state = (O.scan_icon ? O.scan_icon : icon_state))
|
||||
/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,96 +0,0 @@
|
||||
var/list/name_to_mineral
|
||||
|
||||
/proc/SetupMinerals()
|
||||
name_to_mineral = list()
|
||||
for(var/type in typesof(/material) - /material)
|
||||
var/material/new_mineral = new type
|
||||
if(!new_mineral.name)
|
||||
continue
|
||||
name_to_mineral[lowertext(new_mineral.name)] = new_mineral
|
||||
return 1
|
||||
|
||||
/material
|
||||
var/name // Tag for use in overlay generation/list population .
|
||||
var/walltype_solid
|
||||
var/walltype_false
|
||||
var/doortype
|
||||
var/stack_type
|
||||
var/unmeltable
|
||||
var/cut_delay
|
||||
|
||||
/material/uranium
|
||||
name = "uranium"
|
||||
walltype_solid = /turf/simulated/wall/mineral/uranium
|
||||
walltype_false = /obj/structure/falsewall/uranium
|
||||
doortype = /obj/machinery/door/airlock/uranium
|
||||
stack_type = /obj/item/stack/sheet/mineral/uranium
|
||||
|
||||
/material/diamond
|
||||
name = "diamond"
|
||||
walltype_solid = /turf/simulated/wall/mineral/diamond
|
||||
walltype_false = /obj/structure/falsewall/diamond
|
||||
doortype = /obj/machinery/door/airlock/diamond
|
||||
stack_type = /obj/item/stack/sheet/mineral/diamond
|
||||
unmeltable = 1
|
||||
cut_delay = 60
|
||||
|
||||
/material/gold
|
||||
name = "gold"
|
||||
walltype_solid = /turf/simulated/wall/mineral/gold
|
||||
walltype_false = /obj/structure/falsewall/gold
|
||||
doortype = /obj/machinery/door/airlock/gold
|
||||
stack_type = /obj/item/stack/sheet/mineral/gold
|
||||
|
||||
/material/silver
|
||||
name = "silver"
|
||||
walltype_solid = /turf/simulated/wall/mineral/silver
|
||||
walltype_false = /obj/structure/falsewall/silver
|
||||
doortype = /obj/machinery/door/airlock/silver
|
||||
stack_type = /obj/item/stack/sheet/mineral/silver
|
||||
|
||||
/material/phoron
|
||||
name = "phoron"
|
||||
walltype_solid = /turf/simulated/wall/mineral/phoron
|
||||
walltype_false = /obj/structure/falsewall/phoron
|
||||
doortype = /obj/machinery/door/airlock/phoron
|
||||
stack_type = /obj/item/stack/sheet/mineral/phoron
|
||||
|
||||
/material/sandstone
|
||||
name = "sandstone"
|
||||
walltype_solid = /turf/simulated/wall/mineral/sandstone
|
||||
walltype_false = /obj/structure/falsewall/sandstone
|
||||
stack_type = /obj/item/stack/sheet/mineral/sandstone
|
||||
|
||||
/material/steel
|
||||
name = "steel"
|
||||
stack_type = /obj/item/stack/sheet/metal
|
||||
walltype_solid = /turf/simulated/wall
|
||||
walltype_false = /obj/structure/falsewall
|
||||
|
||||
/material/glass
|
||||
name = "glass"
|
||||
stack_type = /obj/item/stack/sheet/glass
|
||||
|
||||
/material/plastic
|
||||
name = "plastic"
|
||||
stack_type = /obj/item/stack/sheet/mineral/plastic
|
||||
|
||||
/material/osmium
|
||||
name = "osmium"
|
||||
stack_type = /obj/item/stack/sheet/mineral/osmium
|
||||
|
||||
/material/tritium
|
||||
name = "tritium"
|
||||
stack_type = /obj/item/stack/sheet/mineral/tritium
|
||||
|
||||
/material/mhydrogen
|
||||
name = "mhydrogen"
|
||||
stack_type = /obj/item/stack/sheet/mineral/mhydrogen
|
||||
|
||||
/material/platinum
|
||||
name = "platinum"
|
||||
stack_type = /obj/item/stack/sheet/mineral/platinum
|
||||
|
||||
/material/iron
|
||||
name = "iron"
|
||||
stack_type = /obj/item/stack/sheet/mineral/iron
|
||||
@@ -4,71 +4,71 @@
|
||||
icon_state = "ore2"
|
||||
w_class = 2
|
||||
var/datum/geosample/geologic_data
|
||||
var/mineral
|
||||
var/material
|
||||
|
||||
/obj/item/weapon/ore/uranium
|
||||
name = "pitchblende"
|
||||
icon_state = "ore_uranium"
|
||||
origin_tech = "materials=5"
|
||||
mineral = "uranium"
|
||||
material = "uranium"
|
||||
|
||||
/obj/item/weapon/ore/iron
|
||||
name = "hematite"
|
||||
icon_state = "ore_iron"
|
||||
origin_tech = "materials=1"
|
||||
mineral = "hematite"
|
||||
material = "hematite"
|
||||
|
||||
/obj/item/weapon/ore/coal
|
||||
name = "carbonaceous rock"
|
||||
name = "raw carbon"
|
||||
icon_state = "ore_coal"
|
||||
origin_tech = "materials=1"
|
||||
mineral = "coal"
|
||||
material = "carbon"
|
||||
|
||||
/obj/item/weapon/ore/glass
|
||||
name = "impure silicates"
|
||||
icon_state = "ore_glass"
|
||||
origin_tech = "materials=1"
|
||||
mineral = "sand"
|
||||
material = "sand"
|
||||
|
||||
/obj/item/weapon/ore/phoron
|
||||
name = "phoron crystals"
|
||||
icon_state = "ore_phoron"
|
||||
origin_tech = "materials=2"
|
||||
mineral = "phoron"
|
||||
material = "phoron"
|
||||
|
||||
/obj/item/weapon/ore/silver
|
||||
name = "native silver ore"
|
||||
icon_state = "ore_silver"
|
||||
origin_tech = "materials=3"
|
||||
mineral = "silver"
|
||||
material = "silver"
|
||||
|
||||
/obj/item/weapon/ore/gold
|
||||
name = "native gold ore"
|
||||
icon_state = "ore_gold"
|
||||
origin_tech = "materials=4"
|
||||
mineral = "gold"
|
||||
material = "gold"
|
||||
|
||||
/obj/item/weapon/ore/diamond
|
||||
name = "diamonds"
|
||||
icon_state = "ore_diamond"
|
||||
origin_tech = "materials=6"
|
||||
mineral = "diamond"
|
||||
material = "diamond"
|
||||
|
||||
/obj/item/weapon/ore/osmium
|
||||
name = "raw platinum"
|
||||
icon_state = "ore_platinum"
|
||||
mineral = "platinum"
|
||||
material = "platinum"
|
||||
|
||||
/obj/item/weapon/ore/hydrogen
|
||||
name = "raw hydrogen"
|
||||
icon_state = "ore_hydrogen"
|
||||
mineral = "mhydrogen"
|
||||
material = "mhydrogen"
|
||||
|
||||
/obj/item/weapon/ore/slag
|
||||
name = "Slag"
|
||||
desc = "Someone screwed up..."
|
||||
icon_state = "slag"
|
||||
mineral = "slag"
|
||||
material = null
|
||||
|
||||
/obj/item/weapon/ore/New()
|
||||
pixel_x = rand(0,16)-8
|
||||
|
||||
@@ -38,7 +38,7 @@ var/global/list/ore_data = list()
|
||||
xarch_source_mineral = "potassium"
|
||||
|
||||
/ore/hematite
|
||||
name = "iron"
|
||||
name = "hematite"
|
||||
display_name = "hematite"
|
||||
smelts_to = "iron"
|
||||
alloy = 1
|
||||
@@ -48,8 +48,8 @@ var/global/list/ore_data = list()
|
||||
scan_icon = "mineral_common"
|
||||
|
||||
/ore/coal
|
||||
name = "coal"
|
||||
display_name = "carbonaceous rock"
|
||||
name = "carbon"
|
||||
display_name = "raw carbon"
|
||||
smelts_to = "plastic"
|
||||
alloy = 1
|
||||
result_amount = 5
|
||||
@@ -105,7 +105,7 @@ var/global/list/ore_data = list()
|
||||
)
|
||||
|
||||
/ore/diamond
|
||||
name = "diamonds"
|
||||
name = "diamond"
|
||||
display_name = "diamond"
|
||||
compresses_to = "diamond"
|
||||
result_amount = 5
|
||||
|
||||
Reference in New Issue
Block a user