mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 20:15:47 +01:00
Merge pull request #33165 from MrStonedOne/revert-33062-ore_stacking
Revert "Ore Stacking"
This commit is contained in:
@@ -38,7 +38,8 @@
|
||||
if(11 to 15)
|
||||
new /obj/item/reagent_containers/glass/beaker/bluespace(src)
|
||||
if(16 to 20)
|
||||
new /obj/item/stack/ore/diamond(src, 10)
|
||||
for(var/i in 1 to 10)
|
||||
new /obj/item/ore/diamond(src)
|
||||
if(21 to 25)
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/poster/random_contraband(src)
|
||||
@@ -85,7 +86,8 @@
|
||||
var/newitem = pick(subtypesof(/obj/item/stock_parts) - /obj/item/stock_parts/subspace)
|
||||
new newitem(src)
|
||||
if(69 to 70)
|
||||
new /obj/item/stack/ore/bluespace_crystal(src, 5)
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/ore/bluespace_crystal(src)
|
||||
if(71 to 72)
|
||||
new /obj/item/pickaxe/drill(src)
|
||||
if(73 to 74)
|
||||
@@ -194,7 +196,7 @@
|
||||
if(attempts == 1)
|
||||
to_chat(user, "<span class='warning'>* Anti-Tamper Bomb will activate on next failed access attempt.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>* Anti-Tamper Bomb will activate after [attempts] failed access attempts.</span>")
|
||||
to_chat(user, "<span class='notice'>* Anti-Tamper Bomb will activate after [src.attempts] failed access attempts.</span>")
|
||||
if(lastattempt != null)
|
||||
var/list/guess = list()
|
||||
var/list/answer = list()
|
||||
|
||||
@@ -83,10 +83,10 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/mineral/processing_unit/HasProximity(atom/movable/AM)
|
||||
if(istype(AM, /obj/item/stack/ore) && AM.loc == get_step(src, input_dir))
|
||||
if(istype(AM, /obj/item/ore) && AM.loc == get_step(src, input_dir))
|
||||
process_ore(AM)
|
||||
|
||||
/obj/machinery/mineral/processing_unit/proc/process_ore(obj/item/stack/ore/O)
|
||||
/obj/machinery/mineral/processing_unit/proc/process_ore(obj/item/ore/O)
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
var/material_amount = materials.get_item_material_amount(O)
|
||||
if(!materials.has_space(material_amount))
|
||||
|
||||
@@ -48,12 +48,12 @@
|
||||
point_upgrade = point_upgrade_temp
|
||||
sheet_per_ore = sheet_per_ore_temp
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/proc/smelt_ore(obj/item/stack/ore/O)
|
||||
/obj/machinery/mineral/ore_redemption/proc/smelt_ore(obj/item/ore/O)
|
||||
|
||||
ore_buffer -= O
|
||||
|
||||
if(O && O.refined_type)
|
||||
points += O.points * point_upgrade * O.amount
|
||||
points += O.points * point_upgrade
|
||||
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
var/material_amount = materials.get_item_material_amount(O)
|
||||
@@ -61,7 +61,7 @@
|
||||
if(!material_amount)
|
||||
qdel(O) //no materials, incinerate it
|
||||
|
||||
else if(!materials.has_space(material_amount * sheet_per_ore * O.amount)) //if there is no space, eject it
|
||||
else if(!materials.has_space(material_amount * sheet_per_ore)) //if there is no space, eject it
|
||||
unload_mineral(O)
|
||||
|
||||
else
|
||||
@@ -133,7 +133,7 @@
|
||||
if(OB)
|
||||
input = OB
|
||||
|
||||
for(var/obj/item/stack/ore/O in input)
|
||||
for(var/obj/item/ore/O in input)
|
||||
if(QDELETED(O))
|
||||
continue
|
||||
ore_buffer |= O
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
if(T)
|
||||
var/limit
|
||||
for(var/obj/structure/ore_box/B in T)
|
||||
for (var/obj/item/stack/ore/O in B)
|
||||
for (var/obj/item/ore/O in B)
|
||||
B.contents -= O
|
||||
unload_mineral(O)
|
||||
limit++
|
||||
|
||||
@@ -36,9 +36,9 @@
|
||||
projectiletype = /obj/item/projectile/kinetic
|
||||
projectilesound = 'sound/weapons/gunshot4.ogg'
|
||||
speak_emote = list("states")
|
||||
wanted_objects = list(/obj/item/stack/ore/diamond, /obj/item/stack/ore/gold, /obj/item/stack/ore/silver,
|
||||
/obj/item/stack/ore/plasma, /obj/item/stack/ore/uranium, /obj/item/stack/ore/iron,
|
||||
/obj/item/stack/ore/bananium, /obj/item/stack/ore/titanium)
|
||||
wanted_objects = list(/obj/item/ore/diamond, /obj/item/ore/gold, /obj/item/ore/silver,
|
||||
/obj/item/ore/plasma, /obj/item/ore/uranium, /obj/item/ore/iron,
|
||||
/obj/item/ore/bananium, /obj/item/ore/titanium)
|
||||
healable = 0
|
||||
var/mode = MINEDRONE_COLLECT
|
||||
var/light_on = 0
|
||||
@@ -85,7 +85,7 @@
|
||||
/mob/living/simple_animal/hostile/mining_drone/death()
|
||||
..()
|
||||
visible_message("<span class='danger'>[src] is destroyed!</span>")
|
||||
new /obj/effect/decal/cleanable/robot_debris(loc)
|
||||
new /obj/effect/decal/cleanable/robot_debris(src.loc)
|
||||
DropOre(0)
|
||||
qdel(src)
|
||||
return
|
||||
@@ -124,14 +124,20 @@
|
||||
to_chat(src, "<span class='info'>You are set to attack mode. You can now attack from range.</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/AttackingTarget()
|
||||
if(istype(target, /obj/item/stack/ore) && mode == MINEDRONE_COLLECT)
|
||||
if(istype(target, /obj/item/ore) && mode == MINEDRONE_COLLECT)
|
||||
CollectOre()
|
||||
return
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/proc/CollectOre()
|
||||
for(var/obj/item/stack/ore/O in range(1, src))
|
||||
O.forceMove(src)
|
||||
var/obj/item/ore/O
|
||||
for(O in src.loc)
|
||||
O.loc = src
|
||||
for(var/dir in GLOB.alldirs)
|
||||
var/turf/T = get_step(src,dir)
|
||||
for(O in T)
|
||||
O.loc = src
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/proc/DropOre(message = 1)
|
||||
if(!contents.len)
|
||||
@@ -140,9 +146,9 @@
|
||||
return
|
||||
if(message)
|
||||
to_chat(src, "<span class='notice'>You dump your stored ore.</span>")
|
||||
for(var/obj/item/stack/ore/O in contents)
|
||||
for(var/obj/item/ore/O in contents)
|
||||
contents -= O
|
||||
O.loc = loc
|
||||
O.loc = src.loc
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/adjustHealth(amount)
|
||||
|
||||
@@ -5,16 +5,14 @@
|
||||
|
||||
/**********************Mineral ores**************************/
|
||||
|
||||
/obj/item/stack/ore
|
||||
/obj/item/ore
|
||||
name = "rock"
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "ore"
|
||||
full_w_class = WEIGHT_CLASS_BULKY
|
||||
var/points = 0 //How many points this ore gets you from the ore redemption machine
|
||||
var/refined_type = null //What this ore defaults to being refined into
|
||||
novariants = FALSE
|
||||
|
||||
/obj/item/stack/ore/attackby(obj/item/I, mob/user, params)
|
||||
/obj/item/ore/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/W = I
|
||||
if(W.remove_fuel(15) && refined_type)
|
||||
@@ -24,10 +22,10 @@
|
||||
to_chat(user, "<span class='info'>Not enough fuel to smelt [src].</span>")
|
||||
..()
|
||||
|
||||
/obj/item/stack/ore/Crossed(atom/movable/AM)
|
||||
/obj/item/ore/Crossed(atom/movable/AM)
|
||||
set waitfor = FALSE
|
||||
var/show_message = TRUE
|
||||
for(var/obj/item/stack/ore/O in loc)
|
||||
for(var/obj/item/ore/O in loc)
|
||||
if(O != src)
|
||||
show_message = FALSE
|
||||
break
|
||||
@@ -55,7 +53,7 @@
|
||||
var/mob/living/L = AM
|
||||
if(istype(L.pulling, /obj/structure/ore_box))
|
||||
box = L.pulling
|
||||
for(var/obj/item/stack/ore/O in OB)
|
||||
for(var/obj/item/ore/O in OB)
|
||||
OB.remove_from_storage(src, box)
|
||||
if(show_message)
|
||||
playsound(L, "rustle", 50, TRUE)
|
||||
@@ -67,32 +65,32 @@
|
||||
"<span class='notice'>You scoop up the ores beneath you with your [OB.name].</span>")
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/ore/uranium
|
||||
/obj/item/ore/uranium
|
||||
name = "uranium ore"
|
||||
icon_state = "ore_uranium"
|
||||
icon_state = "Uranium ore"
|
||||
points = 30
|
||||
materials = list(MAT_URANIUM=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/uranium
|
||||
|
||||
/obj/item/stack/ore/iron
|
||||
/obj/item/ore/iron
|
||||
name = "iron ore"
|
||||
icon_state = "ore_iron"
|
||||
icon_state = "Iron ore"
|
||||
points = 1
|
||||
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/metal
|
||||
|
||||
/obj/item/stack/ore/glass
|
||||
/obj/item/ore/glass
|
||||
name = "sand pile"
|
||||
icon_state = "ore_glass"
|
||||
icon_state = "Glass ore"
|
||||
points = 1
|
||||
materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/glass
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
/obj/item/stack/ore/glass/attack_self(mob/living/user)
|
||||
/obj/item/ore/glass/attack_self(mob/living/user)
|
||||
to_chat(user, "<span class='notice'>You use the sand to make sandstone.</span>")
|
||||
var/sandAmt = 1
|
||||
for(var/obj/item/stack/ore/glass/G in user.loc) // The sand on the floor
|
||||
for(var/obj/item/ore/glass/G in user.loc) // The sand on the floor
|
||||
sandAmt += 1
|
||||
qdel(G)
|
||||
while(sandAmt > 0)
|
||||
@@ -108,7 +106,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/stack/ore/glass/throw_impact(atom/hit_atom)
|
||||
/obj/item/ore/glass/throw_impact(atom/hit_atom)
|
||||
if(..() || !ishuman(hit_atom))
|
||||
return
|
||||
var/mob/living/carbon/human/C = hit_atom
|
||||
@@ -127,18 +125,18 @@
|
||||
to_chat(C, "<span class='userdanger'>\The [src] gets into your eyes! The pain, it burns!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/ore/glass/basalt
|
||||
/obj/item/ore/glass/basalt
|
||||
name = "volcanic ash"
|
||||
icon_state = "volcanic_sand"
|
||||
|
||||
/obj/item/stack/ore/plasma
|
||||
/obj/item/ore/plasma
|
||||
name = "plasma ore"
|
||||
icon_state = "ore_plasma"
|
||||
icon_state = "Plasma ore"
|
||||
points = 15
|
||||
materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/plasma
|
||||
|
||||
/obj/item/stack/ore/plasma/attackby(obj/item/I, mob/user, params)
|
||||
/obj/item/ore/plasma/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/W = I
|
||||
if(W.welding)
|
||||
@@ -147,42 +145,42 @@
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/stack/ore/silver
|
||||
/obj/item/ore/silver
|
||||
name = "silver ore"
|
||||
icon_state = "ore_silver"
|
||||
icon_state = "Silver ore"
|
||||
points = 16
|
||||
materials = list(MAT_SILVER=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/silver
|
||||
|
||||
/obj/item/stack/ore/gold
|
||||
/obj/item/ore/gold
|
||||
name = "gold ore"
|
||||
icon_state = "ore_gold"
|
||||
icon_state = "Gold ore"
|
||||
points = 18
|
||||
materials = list(MAT_GOLD=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/gold
|
||||
|
||||
/obj/item/stack/ore/diamond
|
||||
/obj/item/ore/diamond
|
||||
name = "diamond ore"
|
||||
icon_state = "ore_diamond"
|
||||
icon_state = "Diamond ore"
|
||||
points = 50
|
||||
materials = list(MAT_DIAMOND=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/diamond
|
||||
|
||||
/obj/item/stack/ore/bananium
|
||||
/obj/item/ore/bananium
|
||||
name = "bananium ore"
|
||||
icon_state = "ore_clown"
|
||||
icon_state = "Clown ore"
|
||||
points = 60
|
||||
materials = list(MAT_BANANIUM=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/bananium
|
||||
|
||||
/obj/item/stack/ore/titanium
|
||||
/obj/item/ore/titanium
|
||||
name = "titanium ore"
|
||||
icon_state = "ore_titanium"
|
||||
icon_state = "Titanium ore"
|
||||
points = 50
|
||||
materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/titanium
|
||||
|
||||
/obj/item/stack/ore/slag
|
||||
/obj/item/ore/slag
|
||||
name = "slag"
|
||||
desc = "Completely useless."
|
||||
icon_state = "slag"
|
||||
@@ -287,12 +285,12 @@
|
||||
explosion(src,0,1,3,adminlog = notify_admins)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/ore/Initialize()
|
||||
/obj/item/ore/Initialize()
|
||||
. = ..()
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
|
||||
/obj/item/stack/ore/ex_act()
|
||||
/obj/item/ore/ex_act()
|
||||
return
|
||||
|
||||
/*****************************Coin********************************/
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
pressure_resistance = 5*ONE_ATMOSPHERE
|
||||
|
||||
/obj/structure/ore_box/attackby(obj/item/W, mob/user, params)
|
||||
if (istype(W, /obj/item/stack/ore))
|
||||
if (istype(W, /obj/item/ore))
|
||||
user.transferItemToLoc(W, src)
|
||||
else if (istype(W, /obj/item/storage))
|
||||
var/obj/item/storage/S = W
|
||||
for(var/obj/item/stack/ore/O in S.contents)
|
||||
for(var/obj/item/ore/O in S.contents)
|
||||
S.remove_from_storage(O, src) //This will move the item to this item's contents
|
||||
to_chat(user, "<span class='notice'>You empty the ore in [S] into \the [src].</span>")
|
||||
else if(istype(W, /obj/item/crowbar))
|
||||
@@ -41,18 +41,18 @@
|
||||
|
||||
/obj/structure/ore_box/proc/show_contents(mob/user)
|
||||
var/dat = text("<b>The contents of the ore box reveal...</b><br>")
|
||||
var/list/assembled = list()
|
||||
for(var/obj/item/stack/ore/O in src)
|
||||
assembled[O.type] += O.amount
|
||||
for(var/type in assembled)
|
||||
var/obj/item/stack/ore/O = type
|
||||
dat += "[initial(O.name)] - [assembled[type]]"
|
||||
var/list/oretypes = list()
|
||||
for(var/obj/item/ore/O in contents)
|
||||
oretypes |= O.type
|
||||
for(var/i in oretypes)
|
||||
var/obj/item/ore/T = locate(i) in contents
|
||||
dat += "[capitalize(T.name)]: [count_by_type(contents, T.type)]<br>"
|
||||
dat += text("<br><br><A href='?src=[REF(src)];removeall=1'>Empty box</A>")
|
||||
user << browse(dat, "window=orebox")
|
||||
|
||||
/obj/structure/ore_box/proc/dump_box_contents()
|
||||
var/drop = drop_location()
|
||||
for(var/obj/item/stack/ore/O in src)
|
||||
for(var/obj/item/ore/O in src)
|
||||
if(QDELETED(O))
|
||||
continue
|
||||
if(QDELETED(src))
|
||||
@@ -69,7 +69,7 @@
|
||||
return
|
||||
|
||||
usr.set_machine(src)
|
||||
add_fingerprint(usr)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["removeall"])
|
||||
dump_box_contents()
|
||||
to_chat(usr, "<span class='notice'>You open the release hatch on the box..</span>")
|
||||
|
||||
Reference in New Issue
Block a user