mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 03:26:37 +01:00
Adds ore chunks
This commit is contained in:
@@ -243,6 +243,16 @@
|
||||
points += (ore_values[ore]*points_mult*ore_amount) // Give Points! VOREStation Edit - or give lots of points! or less points! or no points!
|
||||
OB.stored_ore[ore] = 0 // Set the value of the ore in the box to 0.
|
||||
|
||||
|
||||
for(var/obj/item/ore_chunk/ore_chunk in input.loc) //Special ore chunk item. For conveyor belt. Completely unneeded but keeps asthetics.
|
||||
for(var/ore in ore_chunk.stored_ore)
|
||||
if(ore_chunk.stored_ore[ore] > 0)
|
||||
var/ore_amount = ore_chunk.stored_ore[ore]
|
||||
ores_stored[ore] += ore_amount
|
||||
points += (ore_values[ore]*points_mult*ore_amount)
|
||||
ore_chunk.stored_ore[ore] = 0
|
||||
qdel(ore_chunk)
|
||||
|
||||
if(!active)
|
||||
return
|
||||
|
||||
|
||||
@@ -39,12 +39,14 @@
|
||||
if (locate(/obj/structure/ore_box, input.loc))
|
||||
var/obj/structure/ore_box/BOX = locate(/obj/structure/ore_box, input.loc)
|
||||
var/i = 0
|
||||
for (var/obj/item/weapon/ore/O in BOX.contents)
|
||||
BOX.contents -= O
|
||||
O.loc = output.loc
|
||||
i++
|
||||
if (i>=10)
|
||||
return
|
||||
for (var/ore in BOX.stored_ore)
|
||||
if(BOX.stored_ore[ore] > 0)
|
||||
var/obj/item/ore_chunk/ore_chunk = new /obj/item/ore_chunk(src.output.loc)
|
||||
var/ore_amount = BOX.stored_ore[ore]
|
||||
ore_chunk.stored_ore[ore] += ore_amount
|
||||
BOX.stored_ore[ore] = 0
|
||||
if (i>=3) //Let's make it staggered so it looks like a lot is happening.
|
||||
return
|
||||
if (locate(/obj/item, input.loc))
|
||||
var/obj/item/O
|
||||
var/i
|
||||
|
||||
@@ -170,3 +170,49 @@
|
||||
return
|
||||
..()
|
||||
//VOREStation Add End
|
||||
|
||||
/obj/item/ore_chunk
|
||||
name = "ore chunk"
|
||||
desc = "A conglomerate of ore."
|
||||
icon = 'icons/obj/xenoarchaeology.dmi'
|
||||
icon_state = "strange"
|
||||
randpixel = 8
|
||||
w_class = ITEMSIZE_SMALL
|
||||
var/list/stored_ore = list(
|
||||
"sand" = 0,
|
||||
"hematite" = 0,
|
||||
"carbon" = 0,
|
||||
"raw copper" = 0,
|
||||
"raw tin" = 0,
|
||||
"void opal" = 0,
|
||||
"painite" = 0,
|
||||
"quartz" = 0,
|
||||
"raw bauxite" = 0,
|
||||
"phoron" = 0,
|
||||
"silver" = 0,
|
||||
"gold" = 0,
|
||||
"marble" = 0,
|
||||
"uranium" = 0,
|
||||
"diamond" = 0,
|
||||
"platinum" = 0,
|
||||
"lead" = 0,
|
||||
"mhydrogen" = 0,
|
||||
"verdantium" = 0,
|
||||
"rutile" = 0)
|
||||
|
||||
/obj/item/ore_chunk/examine(mob/user)
|
||||
. = ..()
|
||||
|
||||
if(!Adjacent(user)) //Can only check the contents of ore boxes if you can physically reach them.
|
||||
return .
|
||||
|
||||
add_fingerprint(user) //You pick it up to look at it.
|
||||
|
||||
. += "It is composed of:"
|
||||
var/has_ore = 0
|
||||
for(var/ore in stored_ore)
|
||||
if(stored_ore[ore] > 0)
|
||||
. += "- [stored_ore[ore]] [ore]"
|
||||
has_ore = 1
|
||||
if(!has_ore)
|
||||
. += "Nothing. You should contact a developer."
|
||||
Reference in New Issue
Block a user