mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 15:45:25 +01:00
Merge pull request #9343 from variableundefined/OreTGPort
Port over tg ore stack and stack merging
This commit is contained in:
@@ -152,7 +152,7 @@ var/sc_safecode5 = "[rand(0,9)]"
|
||||
new /obj/item/clothing/head/helmet/space/cult(src)
|
||||
new /obj/item/clothing/suit/space/cult(src)
|
||||
//new /obj/item/teleportation_scroll(src)
|
||||
new /obj/item/ore/diamond(src)
|
||||
new /obj/item/stack/ore/diamond(src)
|
||||
|
||||
/*
|
||||
* Modified Nar-Sie
|
||||
|
||||
@@ -70,7 +70,7 @@ There is no excuse to do this wrong now that there is an example for you. --Fals
|
||||
/datum/bottler_recipe/Meteor_Malt
|
||||
name = "Meteor Malt"
|
||||
description = "Soft drinks have been detected on collision course with your tastebuds."
|
||||
ingredients = list(/obj/item/ore,
|
||||
ingredients = list(/obj/item/stack/ore,
|
||||
/obj/item/reagent_containers/food/snacks/grown/wheat,
|
||||
/obj/item/ore)
|
||||
/obj/item/stack/ore)
|
||||
result = "meteor_malt"
|
||||
|
||||
@@ -471,7 +471,7 @@ datum/recipe/microwave/slimesandwich
|
||||
/datum/recipe/microwave/clownstears
|
||||
reagents = list("water" = 10)
|
||||
items = list(
|
||||
/obj/item/ore/bananium,
|
||||
/obj/item/stack/ore/bananium,
|
||||
/obj/item/reagent_containers/food/snacks/grown/banana
|
||||
)
|
||||
result = /obj/item/reagent_containers/food/snacks/clownstears
|
||||
|
||||
@@ -36,8 +36,7 @@
|
||||
if(11 to 15)
|
||||
new /obj/item/reagent_containers/glass/beaker/bluespace(src)
|
||||
if(16 to 20)
|
||||
for(var/i in 1 to 10)
|
||||
new /obj/item/ore/diamond(src)
|
||||
new /obj/item/stack/ore/diamond(src, 10)
|
||||
if(21 to 25)
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/poster/random_contraband(src)
|
||||
@@ -83,8 +82,7 @@
|
||||
var /newitem = pick(subtypesof(/obj/item/stock_parts) - /obj/item/stock_parts/subspace)
|
||||
new newitem(src)
|
||||
if(69 to 70)
|
||||
for(var/i in 1 to 5)
|
||||
new /obj/item/ore/bluespace_crystal(src)
|
||||
new /obj/item/stack/ore/bluespace_crystal(src, 5)
|
||||
if(71 to 72)
|
||||
new /obj/item/pickaxe/drill(src)
|
||||
if(73 to 74)
|
||||
@@ -184,7 +182,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 [src.attempts] failed access attempts.</span>")
|
||||
to_chat(user, "<span class='notice'>* Anti-Tamper Bomb will activate after [attempts] failed access attempts.</span>")
|
||||
if(lastattempt != null)
|
||||
var/bulls = 0
|
||||
var/cows = 0
|
||||
|
||||
@@ -70,12 +70,12 @@
|
||||
point_upgrade = point_upgrade_temp
|
||||
sheet_per_ore = sheet_per_ore_temp
|
||||
|
||||
/obj/machinery/mineral/ore_redemption/proc/smelt_ore(obj/item/ore/O)
|
||||
/obj/machinery/mineral/ore_redemption/proc/smelt_ore(obj/item/stack/ore/O)
|
||||
|
||||
ore_buffer -= O
|
||||
|
||||
if(O && O.refined_type)
|
||||
points += O.points * point_upgrade
|
||||
points += O.points * point_upgrade * O.amount
|
||||
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
var/material_amount = materials.get_item_material_amount(O)
|
||||
@@ -83,7 +83,7 @@
|
||||
if(!material_amount)
|
||||
qdel(O) //no materials, incinerate it
|
||||
|
||||
else if(!materials.has_space(material_amount * sheet_per_ore)) //if there is no space, eject it
|
||||
else if(!materials.has_space(material_amount * sheet_per_ore * O.amount)) //if there is no space, eject it
|
||||
unload_mineral(O)
|
||||
|
||||
else
|
||||
@@ -157,7 +157,7 @@
|
||||
if(OB)
|
||||
input = OB
|
||||
|
||||
for(var/obj/item/ore/O in input)
|
||||
for(var/obj/item/stack/ore/O in input)
|
||||
if(QDELETED(O))
|
||||
continue
|
||||
ore_buffer |= O
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
/obj/machinery/mineral/processing_unit/process()
|
||||
var/turf/T = get_step(src, input_dir)
|
||||
if(T)
|
||||
for(var/obj/item/ore/O in T)
|
||||
for(var/obj/item/stack/ore/O in T)
|
||||
process_ore(O)
|
||||
CHECK_TICK
|
||||
if(on)
|
||||
@@ -111,7 +111,7 @@
|
||||
CONSOLE.updateUsrDialog()
|
||||
|
||||
|
||||
/obj/machinery/mineral/processing_unit/proc/process_ore(obj/item/ore/O)
|
||||
/obj/machinery/mineral/processing_unit/proc/process_ore(obj/item/stack/ore/O)
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
var/material_amount = materials.get_item_material_amount(O)
|
||||
if(!materials.has_space(material_amount))
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
if(T)
|
||||
var/limit
|
||||
for(var/obj/structure/ore_box/B in T)
|
||||
for(var/obj/item/ore/O in B)
|
||||
for(var/obj/item/stack/ore/O in B)
|
||||
B.contents -= O
|
||||
unload_mineral(O)
|
||||
limit++
|
||||
|
||||
@@ -187,7 +187,7 @@ var/global/list/rockTurfEdgeCache = list(
|
||||
/turf/simulated/mineral/iron
|
||||
name = "iron deposit"
|
||||
icon_state = "rock_Iron"
|
||||
mineralType = /obj/item/ore/iron
|
||||
mineralType = /obj/item/stack/ore/iron
|
||||
mineralName = "Iron"
|
||||
spreadChance = 20
|
||||
spread = 1
|
||||
@@ -195,7 +195,7 @@ var/global/list/rockTurfEdgeCache = list(
|
||||
|
||||
/turf/simulated/mineral/uranium
|
||||
name = "uranium deposit"
|
||||
mineralType = /obj/item/ore/uranium
|
||||
mineralType = /obj/item/stack/ore/uranium
|
||||
mineralName = "Uranium"
|
||||
spreadChance = 5
|
||||
spread = 1
|
||||
@@ -204,7 +204,7 @@ var/global/list/rockTurfEdgeCache = list(
|
||||
|
||||
/turf/simulated/mineral/diamond
|
||||
name = "diamond deposit"
|
||||
mineralType = /obj/item/ore/diamond
|
||||
mineralType = /obj/item/stack/ore/diamond
|
||||
mineralName = "Diamond"
|
||||
spreadChance = 0
|
||||
spread = 1
|
||||
@@ -213,7 +213,7 @@ var/global/list/rockTurfEdgeCache = list(
|
||||
|
||||
/turf/simulated/mineral/gold
|
||||
name = "gold deposit"
|
||||
mineralType = /obj/item/ore/gold
|
||||
mineralType = /obj/item/stack/ore/gold
|
||||
mineralName = "Gold"
|
||||
spreadChance = 5
|
||||
spread = 1
|
||||
@@ -222,7 +222,7 @@ var/global/list/rockTurfEdgeCache = list(
|
||||
|
||||
/turf/simulated/mineral/silver
|
||||
name = "silver deposit"
|
||||
mineralType = /obj/item/ore/silver
|
||||
mineralType = /obj/item/stack/ore/silver
|
||||
mineralName = "Silver"
|
||||
spreadChance = 5
|
||||
spread = 1
|
||||
@@ -231,7 +231,7 @@ var/global/list/rockTurfEdgeCache = list(
|
||||
|
||||
/turf/simulated/mineral/titanium
|
||||
name = "titanium deposit"
|
||||
mineralType = /obj/item/ore/titanium
|
||||
mineralType = /obj/item/stack/ore/titanium
|
||||
spreadChance = 5
|
||||
spread = 1
|
||||
hidden = 1
|
||||
@@ -240,7 +240,7 @@ var/global/list/rockTurfEdgeCache = list(
|
||||
/turf/simulated/mineral/plasma
|
||||
name = "plasma deposit"
|
||||
icon_state = "rock_Plasma"
|
||||
mineralType = /obj/item/ore/plasma
|
||||
mineralType = /obj/item/stack/ore/plasma
|
||||
mineralName = "Plasma"
|
||||
spreadChance = 8
|
||||
spread = 1
|
||||
@@ -250,7 +250,7 @@ var/global/list/rockTurfEdgeCache = list(
|
||||
/turf/simulated/mineral/clown
|
||||
name = "bananium deposit"
|
||||
icon_state = "rock_Clown"
|
||||
mineralType = /obj/item/ore/bananium
|
||||
mineralType = /obj/item/stack/ore/bananium
|
||||
mineralName = "Bananium"
|
||||
mineralAmt = 3
|
||||
spreadChance = 0
|
||||
@@ -260,7 +260,7 @@ var/global/list/rockTurfEdgeCache = list(
|
||||
/turf/simulated/mineral/mime
|
||||
name = "tranquillite deposit"
|
||||
icon_state = "rock_Mime"
|
||||
mineralType = /obj/item/ore/tranquillite
|
||||
mineralType = /obj/item/stack/ore/tranquillite
|
||||
mineralAmt = 3
|
||||
spreadChance = 0
|
||||
spread = 0
|
||||
@@ -269,7 +269,7 @@ var/global/list/rockTurfEdgeCache = list(
|
||||
/turf/simulated/mineral/bscrystal
|
||||
name = "bluespace crystal deposit"
|
||||
icon_state = "rock_BScrystal"
|
||||
mineralType = /obj/item/ore/bluespace_crystal
|
||||
mineralType = /obj/item/stack/ore/bluespace_crystal
|
||||
mineralName = "Bluespace crystal"
|
||||
mineralAmt = 1
|
||||
spreadChance = 0
|
||||
@@ -518,7 +518,7 @@ var/global/list/rockTurfEdgeCache = list(
|
||||
if(istype(W,/obj/item/storage/bag/ore))
|
||||
var/obj/item/storage/bag/ore/S = W
|
||||
if(S.collection_mode == 1)
|
||||
for(var/obj/item/ore/O in src.contents)
|
||||
for(var/obj/item/stack/ore/O in src.contents)
|
||||
O.attackby(W,user)
|
||||
return
|
||||
|
||||
@@ -531,11 +531,7 @@ var/global/list/rockTurfEdgeCache = list(
|
||||
/turf/simulated/floor/plating/airless/asteroid/proc/gets_dug()
|
||||
if(dug)
|
||||
return
|
||||
new/obj/item/ore/glass(src)
|
||||
new/obj/item/ore/glass(src)
|
||||
new/obj/item/ore/glass(src)
|
||||
new/obj/item/ore/glass(src)
|
||||
new/obj/item/ore/glass(src)
|
||||
new/obj/item/stack/ore/glass(src, 5)
|
||||
dug = 1
|
||||
playsound(src, 'sound/effects/shovel_dig.ogg', 50, 1) //FUCK YO RUSTLE I GOT'S THE DIGS SOUND HERE
|
||||
icon_plating = "asteroid_dug"
|
||||
|
||||
@@ -36,10 +36,10 @@
|
||||
projectiletype = /obj/item/projectile/kinetic
|
||||
projectilesound = 'sound/weapons/Gunshot4.ogg'
|
||||
speak_emote = list("states")
|
||||
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/tranquillite, /obj/item/ore/glass,
|
||||
/obj/item/ore/titanium)
|
||||
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/tranquillite, /obj/item/stack/ore/glass,
|
||||
/obj/item/stack/ore/titanium)
|
||||
healable = 0
|
||||
var/mode = MINEDRONE_COLLECT
|
||||
var/light_on = 0
|
||||
@@ -97,7 +97,7 @@
|
||||
if(!.)
|
||||
return FALSE
|
||||
visible_message("<span class='danger'>[src] is destroyed!</span>")
|
||||
new /obj/effect/decal/cleanable/blood/gibs/robot(src.loc)
|
||||
new /obj/effect/decal/cleanable/blood/gibs/robot(loc)
|
||||
DropOre(0)
|
||||
qdel(src)
|
||||
|
||||
@@ -135,20 +135,14 @@
|
||||
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/ore) && mode == MINEDRONE_COLLECT)
|
||||
if(istype(target, /obj/item/stack/ore) && mode == MINEDRONE_COLLECT)
|
||||
CollectOre()
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/proc/CollectOre()
|
||||
var/obj/item/ore/O
|
||||
for(O in src.loc)
|
||||
for(var/obj/item/stack/ore/O in range(1, src))
|
||||
O.forceMove(src)
|
||||
for(var/dir in alldirs)
|
||||
var/turf/T = get_step(src,dir)
|
||||
for(O in T)
|
||||
O.forceMove(src)
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/hostile/mining_drone/proc/DropOre(message = 1)
|
||||
if(!contents.len)
|
||||
@@ -157,7 +151,7 @@
|
||||
return
|
||||
if(message)
|
||||
to_chat(src, "<span class='notice'>You dump your stored ore.</span>")
|
||||
for(var/obj/item/ore/O in contents)
|
||||
for(var/obj/item/stack/ore/O in contents)
|
||||
contents -= O
|
||||
O.forceMove(loc)
|
||||
return
|
||||
|
||||
+104
-58
@@ -1,22 +1,37 @@
|
||||
/obj/item/ore
|
||||
#define GIBTONITE_QUALITY_LOW 1
|
||||
#define GIBTONITE_QUALITY_MEDIUM 2
|
||||
#define GIBTONITE_QUALITY_HIGH 3
|
||||
#define PROBABILITY_REFINE_BY_FIRE 50
|
||||
#define ORESTACK_OVERLAYS_MAX 10
|
||||
/**********************Mineral ores**************************/
|
||||
|
||||
/obj/item/stack/ore
|
||||
name = "rock"
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "ore"
|
||||
max_amount = 50
|
||||
singular_name = "ore chunk"
|
||||
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
|
||||
var/datum/geosample/geologic_data
|
||||
|
||||
/obj/item/ore/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
/obj/item/stack/ore/New()
|
||||
..()
|
||||
pixel_x = rand(0, 16) - 8
|
||||
pixel_y = rand(0, 8) - 8
|
||||
if(is_mining_level(z))
|
||||
score_oremined++ //When ore spawns, increment score. Only include ore spawned on mining asteroid (No Clown Planet)
|
||||
|
||||
/obj/item/stack/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)
|
||||
new refined_type(get_turf(src.loc))
|
||||
new refined_type(get_turf(src.loc), amount)
|
||||
qdel(src)
|
||||
else if(W.isOn())
|
||||
to_chat(user, "<span class='info'>Not enough fuel to smelt [src].</span>")
|
||||
..()
|
||||
|
||||
/obj/item/ore/Crossed(AM as mob|obj)
|
||||
/obj/item/stack/ore/Crossed(atom/movable/AM)
|
||||
var/obj/item/storage/bag/ore/OB
|
||||
var/turf/simulated/floor/F = get_turf(src)
|
||||
if(loc != F)
|
||||
@@ -37,64 +52,88 @@
|
||||
F.attackby(OB, AM)
|
||||
return ..()
|
||||
|
||||
/obj/item/stack/ore/fire_act()
|
||||
..()
|
||||
if(isnull(refined_type))
|
||||
return
|
||||
else
|
||||
var/amountrefined = round((PROBABILITY_REFINE_BY_FIRE / 100) * amount, 1)
|
||||
if(amountrefined < 1)
|
||||
qdel(src)
|
||||
else
|
||||
new refined_type(get_turf(loc), amountrefined)
|
||||
qdel(src)
|
||||
|
||||
|
||||
/obj/item/ore/uranium
|
||||
/obj/item/stack/ore/uranium
|
||||
name = "uranium ore"
|
||||
icon_state = "Uranium ore"
|
||||
origin_tech = "materials=5"
|
||||
singular_name = "uranium ore chunk"
|
||||
points = 30
|
||||
refined_type = /obj/item/stack/sheet/mineral/uranium
|
||||
materials = list(MAT_URANIUM=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
/obj/item/ore/iron
|
||||
/obj/item/stack/ore/iron
|
||||
name = "iron ore"
|
||||
icon_state = "Iron ore"
|
||||
origin_tech = "materials=1"
|
||||
singular_name = "iron ore chunk"
|
||||
points = 1
|
||||
refined_type = /obj/item/stack/sheet/metal
|
||||
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
/obj/item/ore/glass
|
||||
/obj/item/stack/ore/glass
|
||||
name = "sand pile"
|
||||
icon_state = "Glass ore"
|
||||
origin_tech = "materials=1"
|
||||
singular_name = "sand pile"
|
||||
points = 1
|
||||
refined_type = /obj/item/stack/sheet/glass
|
||||
materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
/obj/item/ore/glass/basalt
|
||||
GLOBAL_LIST_INIT(sand_recipes, list(\
|
||||
new /datum/stack_recipe("sandstone", /obj/item/stack/sheet/mineral/sandstone, 1, 1, 50)\
|
||||
))
|
||||
|
||||
/obj/item/stack/ore/glass/Initialize(mapload, new_amount, merge = TRUE)
|
||||
recipes = GLOB.sand_recipes
|
||||
. = ..()
|
||||
|
||||
/obj/item/stack/ore/glass/throw_impact(atom/hit_atom)
|
||||
if(..() || !ishuman(hit_atom))
|
||||
return
|
||||
var/mob/living/carbon/human/C = hit_atom
|
||||
if(C.head && C.head.flags_cover & HEADCOVERSEYES)
|
||||
visible_message("<span class='danger'>[C]'s headgear blocks the sand!</span>")
|
||||
return
|
||||
if(C.wear_mask && C.wear_mask.flags_cover & MASKCOVERSEYES)
|
||||
visible_message("<span class='danger'>[C]'s mask blocks the sand!</span>")
|
||||
return
|
||||
if(C.glasses && C.glasses.flags_cover & GLASSESCOVERSEYES)
|
||||
visible_message("<span class='danger'>[C]'s glasses block the sand!</span>")
|
||||
return
|
||||
C.EyeBlurry(6)
|
||||
C.adjustStaminaLoss(15)//the pain from your eyes burning does stamina damage
|
||||
C.AdjustConfused(5)
|
||||
to_chat(C, "<span class='userdanger'>[src] gets into your eyes! The pain, it burns!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/stack/ore/glass/basalt
|
||||
name = "volcanic ash"
|
||||
icon_state = "volcanic_sand"
|
||||
icon_state = "volcanic_sand"
|
||||
singular_name = "volcanic ash pile"
|
||||
|
||||
/obj/item/ore/glass/attack_self(mob/living/user as mob)
|
||||
to_chat(user, "<span class='notice'>You use the sand to make sandstone.</span>")
|
||||
var/sandAmt = 1
|
||||
for(var/obj/item/ore/glass/G in user.loc) // The sand on the floor
|
||||
sandAmt += 1
|
||||
qdel(G)
|
||||
while(sandAmt > 0)
|
||||
var/obj/item/stack/sheet/mineral/sandstone/SS = new /obj/item/stack/sheet/mineral/sandstone(user.loc)
|
||||
if(sandAmt >= SS.max_amount)
|
||||
SS.amount = SS.max_amount
|
||||
else
|
||||
SS.amount = sandAmt
|
||||
for(var/obj/item/stack/sheet/mineral/sandstone/SA in user.loc)
|
||||
if(SA != SS && SA.amount < SA.max_amount)
|
||||
SA.attackby(SS, user) //we try to transfer all old unfinished stacks to the new stack we created.
|
||||
sandAmt -= SS.max_amount
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/ore/plasma
|
||||
/obj/item/stack/ore/plasma
|
||||
name = "plasma ore"
|
||||
icon_state = "Plasma ore"
|
||||
origin_tech = "plasmatech=2;materials=2"
|
||||
singular_name = "plasma ore chunk"
|
||||
points = 15
|
||||
refined_type = /obj/item/stack/sheet/mineral/plasma
|
||||
materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
/obj/item/ore/plasma/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
/obj/item/stack/ore/plasma/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/weldingtool))
|
||||
var/obj/item/weldingtool/W = I
|
||||
if(W.welding)
|
||||
@@ -102,57 +141,64 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/ore/silver
|
||||
/obj/item/stack/ore/silver
|
||||
name = "silver ore"
|
||||
icon_state = "Silver ore"
|
||||
origin_tech = "materials=3"
|
||||
singular_name = "silver ore chunk"
|
||||
points = 16
|
||||
refined_type = /obj/item/stack/sheet/mineral/silver
|
||||
materials = list(MAT_SILVER=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
/obj/item/ore/gold
|
||||
/obj/item/stack/ore/gold
|
||||
name = "gold ore"
|
||||
icon_state = "Gold ore"
|
||||
origin_tech = "materials=4"
|
||||
singular_name = "gold ore chunk"
|
||||
points = 18
|
||||
refined_type = /obj/item/stack/sheet/mineral/gold
|
||||
materials = list(MAT_GOLD=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
/obj/item/ore/diamond
|
||||
/obj/item/stack/ore/diamond
|
||||
name = "diamond ore"
|
||||
icon_state = "Diamond ore"
|
||||
origin_tech = "materials=6"
|
||||
singular_name = "diamond ore chunk"
|
||||
points = 50
|
||||
refined_type = /obj/item/stack/sheet/mineral/diamond
|
||||
materials = list(MAT_DIAMOND=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
/obj/item/ore/bananium
|
||||
/obj/item/stack/ore/bananium
|
||||
name = "bananium ore"
|
||||
icon_state = "Clown ore"
|
||||
origin_tech = "materials=4"
|
||||
singular_name = "bananium ore chunk"
|
||||
points = 60
|
||||
refined_type = /obj/item/stack/sheet/mineral/bananium
|
||||
materials = list(MAT_BANANIUM=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
/obj/item/ore/tranquillite
|
||||
/obj/item/stack/ore/tranquillite
|
||||
name = "tranquillite ore"
|
||||
icon_state = "Mime ore"
|
||||
origin_tech = "materials=4"
|
||||
singular_name = "transquillite ore chunk"
|
||||
points = 60
|
||||
refined_type = /obj/item/stack/sheet/mineral/tranquillite
|
||||
materials = list(MAT_TRANQUILLITE=MINERAL_MATERIAL_AMOUNT)
|
||||
|
||||
/obj/item/ore/titanium
|
||||
/obj/item/stack/ore/titanium
|
||||
name = "titanium ore"
|
||||
icon_state = "Titanium ore"
|
||||
singular_name = "titanium ore chunk"
|
||||
points = 50
|
||||
materials = list(MAT_TITANIUM=MINERAL_MATERIAL_AMOUNT)
|
||||
refined_type = /obj/item/stack/sheet/mineral/titanium
|
||||
|
||||
/obj/item/ore/slag
|
||||
/obj/item/stack/ore/slag
|
||||
name = "slag"
|
||||
desc = "Completely useless"
|
||||
icon_state = "slag"
|
||||
singular_name = "slag chunk"
|
||||
|
||||
/obj/item/twohanded/required/gibtonite
|
||||
name = "gibtonite ore"
|
||||
@@ -165,7 +211,7 @@
|
||||
anchored = 1 //Forces people to carry it by hand, no pulling!
|
||||
var/primed = 0
|
||||
var/det_time = 100
|
||||
var/quality = 1 //How pure this gibtonite is, determines the explosion produced by it and is derived from the det_time of the rock wall it was taken from, higher value = better
|
||||
var/quality = GIBTONITE_QUALITY_LOW //How pure this gibtonite is, determines the explosion produced by it and is derived from the det_time of the rock wall it was taken from, higher value = better
|
||||
var/attacher = "UNKNOWN"
|
||||
var/datum/wires/explosive/gibtonite/wires
|
||||
|
||||
@@ -195,7 +241,7 @@
|
||||
primed = 0
|
||||
user.visible_message("The chain reaction was stopped! ...The ore's quality looks diminished.", "<span class='notice'>You stopped the chain reaction. ...The ore's quality looks diminished.</span>")
|
||||
icon_state = "Gibtonite ore"
|
||||
quality = 1
|
||||
quality = GIBTONITE_QUALITY_LOW
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -222,40 +268,40 @@
|
||||
primed = 1
|
||||
icon_state = "Gibtonite active"
|
||||
var/turf/bombturf = get_turf(src)
|
||||
var/area/A = get_area(bombturf)
|
||||
var/notify_admins = 0
|
||||
if(z != 5)//Only annoy the admins ingame if we're triggered off the mining zlevel
|
||||
notify_admins = 1
|
||||
|
||||
if(notify_admins)
|
||||
if(triggered_by == 1)
|
||||
message_admins("An explosion has triggered a [name] to detonate at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
|
||||
message_admins("An explosion has triggered a [name] to detonate at [ADMIN_COORDJMP(bombturf)].")
|
||||
else if(triggered_by == 2)
|
||||
message_admins("A signal has triggered a [name] to detonate at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>. Igniter attacher: [key_name_admin(attacher)]")
|
||||
message_admins("A signal has triggered a [name] to detonate at [ADMIN_COORDJMP(bombturf)]. Igniter attacher: [key_name_admin(attacher)]")
|
||||
else
|
||||
message_admins("[key_name_admin(user)] has triggered a [name] to detonate at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[bombturf.x];Y=[bombturf.y];Z=[bombturf.z]'>[A.name] (JMP)</a>.")
|
||||
message_admins("[key_name_admin(user)] has triggered a [name] to detonate at [ADMIN_COORDJMP(bombturf)].")
|
||||
if(triggered_by == 1)
|
||||
log_game("An explosion has primed a [name] for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])")
|
||||
log_game("An explosion has primed a [name] for detonation at [AREACOORD(bombturf)]")
|
||||
else if(triggered_by == 2)
|
||||
log_game("A signal has primed a [name] for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z]). Igniter attacher: [key_name(attacher)].")
|
||||
log_game("A signal has primed a [name] for detonation at [AREACOORD(bombturf)]). Igniter attacher: [key_name(attacher)].")
|
||||
else
|
||||
user.visible_message("<span class='warning'>[user] strikes \the [src], causing a chain reaction!</span>", "<span class='danger'>You strike \the [src], causing a chain reaction.</span>")
|
||||
log_game("[key_name(user)] has primed a [name] for detonation at [A.name]([bombturf.x],[bombturf.y],[bombturf.z])")
|
||||
log_game("[key_name(user)] has primed a [name] for detonation at [AREACOORD(bombturf)])")
|
||||
spawn(det_time)
|
||||
if(primed)
|
||||
if(quality == 3)
|
||||
if(quality == GIBTONITE_QUALITY_HIGH)
|
||||
explosion(src.loc,2,4,9,adminlog = notify_admins)
|
||||
if(quality == 2)
|
||||
if(quality == GIBTONITE_QUALITY_MEDIUM)
|
||||
explosion(src.loc,1,2,5,adminlog = notify_admins)
|
||||
if(quality == 1)
|
||||
if(quality == GIBTONITE_QUALITY_LOW)
|
||||
explosion(src.loc,-1,1,3,adminlog = notify_admins)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/ore/New()
|
||||
pixel_x = rand(0,16)-8
|
||||
pixel_y = rand(0,8)-8
|
||||
if(is_mining_level(src.z))
|
||||
score_oremined++ //When ore spawns, increment score. Only include ore spawned on mining asteroid (No Clown Planet)
|
||||
|
||||
/obj/item/ore/ex_act()
|
||||
return
|
||||
/obj/item/stack/ore/ex_act()
|
||||
return
|
||||
|
||||
#undef GIBTONITE_QUALITY_LOW
|
||||
#undef GIBTONITE_QUALITY_MEDIUM
|
||||
#undef GIBTONITE_QUALITY_HIGH
|
||||
#undef PROBABILITY_REFINE_BY_FIRE
|
||||
#undef ORESTACK_OVERLAYS_MAX
|
||||
|
||||
@@ -13,78 +13,40 @@
|
||||
if(istype(W, /obj/item/t_scanner/adv_mining_scanner))
|
||||
attack_hand(user)
|
||||
return
|
||||
if(istype(W, /obj/item/ore))
|
||||
else if(istype(W, /obj/item/stack/ore))
|
||||
if(!user.drop_item())
|
||||
return
|
||||
W.forceMove(src)
|
||||
if(istype(W, /obj/item/storage))
|
||||
else if(istype(W, /obj/item/storage))
|
||||
var/obj/item/storage/S = W
|
||||
S.hide_from(usr)
|
||||
for(var/obj/item/ore/O in S.contents)
|
||||
for(var/obj/item/stack/ore/O in S.contents)
|
||||
S.remove_from_storage(O, src) //This will move the item to this item's contents
|
||||
CHECK_TICK
|
||||
to_chat(user, "<span class='notice'>You empty the satchel into the box.</span>")
|
||||
else if(istype(W, /obj/item/crowbar))
|
||||
playsound(src, W.usesound, 50, 1)
|
||||
var/obj/item/crowbar/C = W
|
||||
if(do_after(user, 50 * C.toolspeed, target = src))
|
||||
user.visible_message("<span class='notice'>[user] pries [src] apart.</span>", "<span class='notice'>You pry apart [src].</span>", "<span class='italics'>You hear splitting wood.</span>")
|
||||
deconstruct(TRUE, user)
|
||||
|
||||
/obj/structure/ore_box/attack_hand(mob/user)
|
||||
var/amt_gold = 0
|
||||
var/amt_silver = 0
|
||||
var/amt_diamond = 0
|
||||
var/amt_glass = 0
|
||||
var/amt_iron = 0
|
||||
var/amt_plasma = 0
|
||||
var/amt_uranium = 0
|
||||
var/amt_titanium = 0
|
||||
var/amt_clown = 0
|
||||
var/amt_mime = 0
|
||||
var/amt_bluespace = 0
|
||||
if(Adjacent(user))
|
||||
show_contents(user)
|
||||
|
||||
for(var/obj/item/ore/C in contents)
|
||||
if(istype(C,/obj/item/ore/diamond))
|
||||
amt_diamond++
|
||||
if(istype(C,/obj/item/ore/glass))
|
||||
amt_glass++
|
||||
if(istype(C,/obj/item/ore/plasma))
|
||||
amt_plasma++
|
||||
if(istype(C,/obj/item/ore/iron))
|
||||
amt_iron++
|
||||
if(istype(C,/obj/item/ore/silver))
|
||||
amt_silver++
|
||||
if(istype(C,/obj/item/ore/gold))
|
||||
amt_gold++
|
||||
if(istype(C,/obj/item/ore/uranium))
|
||||
amt_uranium++
|
||||
if(istype(C,/obj/item/ore/bananium))
|
||||
amt_clown++
|
||||
if(istype(C,/obj/item/ore/tranquillite))
|
||||
amt_mime++
|
||||
if(istype(C, /obj/item/ore/titanium))
|
||||
amt_titanium++
|
||||
if(istype(C,/obj/item/ore/bluespace_crystal))
|
||||
amt_bluespace++
|
||||
/obj/structure/ore_box/attack_robot(mob/user)
|
||||
if(Adjacent(user))
|
||||
show_contents(user)
|
||||
|
||||
/obj/structure/ore_box/proc/show_contents(mob/user)
|
||||
var/dat = text("<b>The contents of the ore box reveal...</b><br>")
|
||||
if(amt_gold)
|
||||
dat += text("Gold ore: [amt_gold]<br>")
|
||||
if(amt_silver)
|
||||
dat += text("Silver ore: [amt_silver]<br>")
|
||||
if(amt_iron)
|
||||
dat += text("Metal ore: [amt_iron]<br>")
|
||||
if(amt_glass)
|
||||
dat += text("Sand: [amt_glass]<br>")
|
||||
if(amt_diamond)
|
||||
dat += text("Diamond ore: [amt_diamond]<br>")
|
||||
if(amt_plasma)
|
||||
dat += text("Plasma ore: [amt_plasma]<br>")
|
||||
if(amt_uranium)
|
||||
dat += text("Uranium ore: [amt_uranium]<br>")
|
||||
if(amt_titanium)
|
||||
dat += text("Titanium ore: [amt_titanium]<br>")
|
||||
if(amt_clown)
|
||||
dat += text("Bananium ore: [amt_clown]<br>")
|
||||
if(amt_mime)
|
||||
dat += text("Tranquillite ore: [amt_mime]<br>")
|
||||
if(amt_bluespace)
|
||||
dat += text("Bluespace crystals: [amt_bluespace]<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]]<br>"
|
||||
|
||||
dat += text("<br><br><A href='?src=[UID()];removeall=1'>Empty box</A>")
|
||||
var/datum/browser/popup = new(user, "orebox", name, 400, 400)
|
||||
@@ -97,10 +59,7 @@
|
||||
usr.set_machine(src)
|
||||
add_fingerprint(usr)
|
||||
if(href_list["removeall"])
|
||||
for(var/obj/item/ore/O in contents)
|
||||
contents -= O
|
||||
O.forceMove(loc)
|
||||
CHECK_TICK
|
||||
dump_box_contents()
|
||||
to_chat(usr, "<span class='notice'>You empty the box.</span>")
|
||||
updateUsrDialog()
|
||||
|
||||
@@ -108,20 +67,31 @@ obj/structure/ore_box/ex_act(severity, target)
|
||||
if(prob(100 / severity) && severity < 3)
|
||||
qdel(src) //nothing but ores can get inside unless its a bug and ores just return nothing on ex_act, not point in calling it on them
|
||||
|
||||
/obj/structure/ore_box/deconstruct(disassembled = TRUE, mob/user)
|
||||
var/obj/item/stack/sheet/wood/W = new (loc, 4)
|
||||
if(user)
|
||||
W.add_fingerprint(user)
|
||||
dump_box_contents()
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/ore_box/proc/dump_box_contents()
|
||||
for(var/obj/item/stack/ore/O in src)
|
||||
if(QDELETED(O))
|
||||
continue
|
||||
if(QDELETED(src))
|
||||
break
|
||||
O.forceMove(loc)
|
||||
CHECK_TICK
|
||||
|
||||
/obj/structure/ore_box/verb/empty_box()
|
||||
set name = "Empty Ore Box"
|
||||
set category = "Object"
|
||||
set src in view(1)
|
||||
|
||||
if(!ishuman(usr)) //Only living, intelligent creatures with hands can empty ore boxes.
|
||||
to_chat(usr, "<span class='warning'>You are physically incapable of emptying the ore box.</span>")
|
||||
return
|
||||
|
||||
if(usr.incapacitated())
|
||||
return
|
||||
|
||||
if(!Adjacent(usr)) //You can only empty the box if you can physically reach it
|
||||
if(!Adjacent(usr))
|
||||
to_chat(usr, "You cannot reach the ore box.")
|
||||
return
|
||||
|
||||
@@ -131,8 +101,5 @@ obj/structure/ore_box/ex_act(severity, target)
|
||||
to_chat(usr, "<span class='warning'>The ore box is empty.</span>")
|
||||
return
|
||||
|
||||
for(var/obj/item/ore/O in contents)
|
||||
contents -= O
|
||||
O.forceMove(loc)
|
||||
CHECK_TICK
|
||||
to_chat(usr, "<span class='notice'>You empty the ore box.</span>")
|
||||
dump_box_contents()
|
||||
to_chat(usr, "<span class='notice'>You empty the ore box.</span>")
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
/obj/item/tank,
|
||||
/obj/item/circuitboard,
|
||||
/obj/item/stack/tile/light,
|
||||
/obj/item/ore/bluespace_crystal
|
||||
/obj/item/stack/ore/bluespace_crystal
|
||||
)
|
||||
|
||||
//Item currently being held.
|
||||
|
||||
@@ -47,7 +47,7 @@ Difficulty: Very Hard
|
||||
medal_type = MEDAL_PREFIX
|
||||
score_type = COLOSSUS_SCORE
|
||||
loot = list(/obj/machinery/anomalous_crystal/random, /obj/item/organ/internal/vocal_cords/colossus)
|
||||
butcher_results = list(/obj/item/ore/diamond = 5, /obj/item/stack/sheet/sinew = 5, /obj/item/stack/sheet/animalhide/ashdrake = 10, /obj/item/stack/sheet/bone = 30)
|
||||
butcher_results = list(/obj/item/stack/ore/diamond = 5, /obj/item/stack/sheet/sinew = 5, /obj/item/stack/sheet/animalhide/ashdrake = 10, /obj/item/stack/sheet/bone = 30)
|
||||
deathmessage = "disintegrates, leaving a glowing core in its wake."
|
||||
death_sound = 'sound/misc/demon_dies.ogg'
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ Difficulty: Medium
|
||||
ranged = 1
|
||||
pixel_x = -16
|
||||
loot = list(/obj/structure/closet/crate/necropolis/dragon)
|
||||
butcher_results = list(/obj/item/ore/diamond = 5, /obj/item/stack/sheet/sinew = 5, /obj/item/stack/sheet/animalhide/ashdrake = 10, /obj/item/stack/sheet/bone = 30)
|
||||
butcher_results = list(/obj/item/stack/ore/diamond = 5, /obj/item/stack/sheet/sinew = 5, /obj/item/stack/sheet/animalhide/ashdrake = 10, /obj/item/stack/sheet/bone = 30)
|
||||
var/swooping = 0
|
||||
var/swoop_cooldown = 0
|
||||
medal_type = MEDAL_PREFIX
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
throw_message = "sinks in slowly, before being pushed out of "
|
||||
status_flags = CANPUSH
|
||||
search_objects = 1
|
||||
wanted_objects = list(/obj/item/ore/diamond, /obj/item/ore/gold, /obj/item/ore/silver,
|
||||
/obj/item/ore/uranium)
|
||||
wanted_objects = list(/obj/item/stack/ore/diamond, /obj/item/stack/ore/gold, /obj/item/stack/ore/silver,
|
||||
/obj/item/stack/ore/uranium)
|
||||
|
||||
var/chase_time = 100
|
||||
var/will_burrow = TRUE
|
||||
@@ -34,17 +34,17 @@
|
||||
..()
|
||||
var/i = rand(1,3)
|
||||
while(i)
|
||||
loot += pick(/obj/item/ore/silver, /obj/item/ore/gold, /obj/item/ore/uranium, /obj/item/ore/diamond)
|
||||
loot += pick(/obj/item/stack/ore/silver, /obj/item/stack/ore/gold, /obj/item/stack/ore/uranium, /obj/item/stack/ore/diamond)
|
||||
i--
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goldgrub/GiveTarget(new_target)
|
||||
target = new_target
|
||||
if(target != null)
|
||||
if(istype(target, /obj/item/ore) && loot.len < 10)
|
||||
visible_message("<span class='notice'>The [src.name] looks at [target.name] with hungry eyes.</span>")
|
||||
if(istype(target, /obj/item/stack/ore) && loot.len < 10)
|
||||
visible_message("<span class='notice'>The [name] looks at [target.name] with hungry eyes.</span>")
|
||||
else if(isliving(target))
|
||||
Aggro()
|
||||
visible_message("<span class='danger'>The [src.name] tries to flee from [target.name]!</span>")
|
||||
visible_message("<span class='danger'>The [name] tries to flee from [target.name]!</span>")
|
||||
retreat_distance = 10
|
||||
minimum_distance = 10
|
||||
if(will_burrow)
|
||||
@@ -52,18 +52,21 @@
|
||||
Burrow()
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goldgrub/AttackingTarget()
|
||||
if(istype(target, /obj/item/ore))
|
||||
if(istype(target, /obj/item/stack/ore))
|
||||
EatOre(target)
|
||||
return
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goldgrub/proc/EatOre(var/atom/targeted_ore)
|
||||
for(var/obj/item/ore/O in targeted_ore.loc)
|
||||
for(var/obj/item/stack/ore/O in get_turf(targeted_ore))
|
||||
if(loot.len < 10)
|
||||
loot += O.type
|
||||
qdel(O)
|
||||
var/using = min(10 - loot.len, O.amount)
|
||||
for(var/i in 1 to using)
|
||||
loot += O.type
|
||||
O.use(using)
|
||||
visible_message("<span class='notice'>The ore was swallowed whole!</span>")
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goldgrub/proc/Burrow()//Begin the chase to kill the goldgrub in time
|
||||
if(!stat)
|
||||
visible_message("<span class='danger'>The [src.name] buries into the ground, vanishing from sight!</span>")
|
||||
@@ -75,4 +78,4 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/asteroid/goldgrub/adjustHealth(damage)
|
||||
idle_vision_range = 9
|
||||
. = ..()
|
||||
. = ..()
|
||||
|
||||
@@ -77,8 +77,8 @@
|
||||
aggro_vision_range = 9
|
||||
idle_vision_range = 2
|
||||
turns_per_move = 5
|
||||
loot = list(/obj/item/ore/diamond{layer = 4.1},
|
||||
/obj/item/ore/diamond{layer = 4.1})
|
||||
loot = list(/obj/item/stack/ore/diamond{layer = 4.1},
|
||||
/obj/item/stack/ore/diamond{layer = 4.1})
|
||||
|
||||
/obj/item/projectile/temp/basilisk
|
||||
name = "freezing blast"
|
||||
|
||||
@@ -134,9 +134,9 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
return
|
||||
|
||||
if(src.d1) // 0-X cables are 1 unit, X-X cables are 2 units long
|
||||
new/obj/item/stack/cable_coil(T, 2, color)
|
||||
new/obj/item/stack/cable_coil(T, 2, paramcolor = color)
|
||||
else
|
||||
new/obj/item/stack/cable_coil(T, 1, color)
|
||||
new/obj/item/stack/cable_coil(T, 1, paramcolor = color)
|
||||
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message("<span class='warning'>[user] cuts the cable.</span>", 1)
|
||||
@@ -209,12 +209,12 @@ By design, d1 is the smallest direction and d2 is the highest
|
||||
qdel(src) // qdel
|
||||
if(2.0)
|
||||
if(prob(50))
|
||||
new/obj/item/stack/cable_coil(get_turf(src), src.d1 ? 2 : 1, color)
|
||||
new/obj/item/stack/cable_coil(get_turf(src), src.d1 ? 2 : 1, paramcolor = color)
|
||||
qdel(src) // qdel
|
||||
|
||||
if(3.0)
|
||||
if(prob(25))
|
||||
new/obj/item/stack/cable_coil(get_turf(src), src.d1 ? 2 : 1, color)
|
||||
new/obj/item/stack/cable_coil(get_turf(src), src.d1 ? 2 : 1, paramcolor = color)
|
||||
qdel(src) // qdel
|
||||
return
|
||||
|
||||
@@ -508,7 +508,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
user.visible_message("<span class='suicide'>[user] is strangling [user.p_them()]self with the [name]! It looks like [user.p_theyre()] trying to commit suicide.</span>")
|
||||
return(OXYLOSS)
|
||||
|
||||
/obj/item/stack/cable_coil/New(loc, length = MAXCOIL, var/paramcolor = null)
|
||||
/obj/item/stack/cable_coil/New(loc, length = MAXCOIL, paramcolor = null)
|
||||
..()
|
||||
amount = length
|
||||
if(paramcolor)
|
||||
@@ -694,7 +694,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
|
||||
if(C.shock(user, 50))
|
||||
if(prob(50)) //fail
|
||||
new /obj/item/stack/cable_coil(get_turf(C), 1, C.color)
|
||||
new /obj/item/stack/cable_coil(get_turf(C), 1, paramcolor = C.color)
|
||||
qdel(C) // qdel
|
||||
|
||||
return C
|
||||
@@ -777,7 +777,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list(
|
||||
|
||||
if(C.shock(user, 50))
|
||||
if(prob(50)) //fail
|
||||
new/obj/item/stack/cable_coil(get_turf(C), 2, C.color)
|
||||
new/obj/item/stack/cable_coil(get_turf(C), 2, paramcolor = C.color)
|
||||
qdel(C) // qdel
|
||||
return
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
src.icon_state = "tube-construct-stage1"
|
||||
if("bulb")
|
||||
src.icon_state = "bulb-construct-stage1"
|
||||
new /obj/item/stack/cable_coil(get_turf(src.loc), 1, COLOR_RED)
|
||||
new /obj/item/stack/cable_coil(get_turf(src.loc), 1, paramcolor = COLOR_RED)
|
||||
user.visible_message("[user.name] removes the wiring from [src].", \
|
||||
"You remove the wiring from [src].", "You hear a noise.")
|
||||
playsound(loc, W.usesound, 100, 1)
|
||||
|
||||
@@ -160,8 +160,9 @@
|
||||
S.use(1)
|
||||
power_supply.give(1000)
|
||||
to_chat(user, "<span class='notice'>You insert [A] in [src], recharging it.</span>")
|
||||
else if(istype(A, /obj/item/ore/plasma))
|
||||
qdel(A)
|
||||
else if(istype(A, /obj/item/stack/ore/plasma))
|
||||
var/obj/item/stack/ore/S = A
|
||||
S.use(1)
|
||||
power_supply.give(500)
|
||||
to_chat(user, "<span class='notice'>You insert [A] in [src], recharging it.</span>")
|
||||
else
|
||||
|
||||
@@ -564,7 +564,7 @@
|
||||
/datum/chemical_reaction/slimecrystal/on_reaction(datum/reagents/holder, created_volume)
|
||||
feedback_add_details("slime_cores_used","[type]")
|
||||
if(holder.my_atom)
|
||||
var/obj/item/ore/bluespace_crystal/BC = new(get_turf(holder.my_atom))
|
||||
var/obj/item/stack/ore/bluespace_crystal/BC = new(get_turf(holder.my_atom))
|
||||
BC.visible_message("<span class='notice'>The [BC.name] appears out of thin air!</span>")
|
||||
|
||||
//Cerulean
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
req_tech = list("bluespace" = 3, "materials" = 6, "plasmatech" = 4)
|
||||
build_type = PROTOLATHE
|
||||
materials = list(MAT_DIAMOND = 1500, MAT_PLASMA = 1500)
|
||||
build_path = /obj/item/ore/bluespace_crystal/artificial
|
||||
build_path = /obj/item/stack/ore/bluespace_crystal/artificial
|
||||
category = list("Bluespace")
|
||||
|
||||
/datum/design/bag_holding
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/obj/machinery/r_n_d/New()
|
||||
materials = AddComponent(/datum/component/material_container,
|
||||
list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TRANQUILLITE, MAT_TITANIUM, MAT_BLUESPACE, MAT_PLASTIC), 0,
|
||||
FALSE, list(/obj/item/stack, /obj/item/ore/bluespace_crystal), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert))
|
||||
FALSE, list(/obj/item/stack, /obj/item/stack/ore/bluespace_crystal), CALLBACK(src, .proc/is_insertion_ready), CALLBACK(src, .proc/AfterMaterialInsert))
|
||||
materials.precise_insertion = TRUE
|
||||
..()
|
||||
wires["Red"] = 0
|
||||
@@ -121,7 +121,7 @@
|
||||
|
||||
/obj/machinery/r_n_d/proc/AfterMaterialInsert(type_inserted, id_inserted, amount_inserted)
|
||||
var/stack_name
|
||||
if(ispath(type_inserted, /obj/item/ore/bluespace_crystal))
|
||||
if(ispath(type_inserted, /obj/item/stack/ore/bluespace_crystal))
|
||||
stack_name = "bluespace polycrystal"
|
||||
use_power(MINERAL_MATERIAL_AMOUNT / 10)
|
||||
else
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
icon_state = "cargo_ore"
|
||||
|
||||
/obj/item/spacepod_equipment/cargo/ore/passover(var/obj/item/I)
|
||||
if(storage && istype(I,/obj/item/ore))
|
||||
if(storage && istype(I,/obj/item/stack/ore))
|
||||
I.forceMove(storage)
|
||||
|
||||
// Crate System
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
build_path = /obj/machinery/bsa/middle
|
||||
origin_tech = "engineering=2;combat=2;bluespace=2"
|
||||
req_components = list(
|
||||
/obj/item/ore/bluespace_crystal = 20,
|
||||
/obj/item/stack/ore/bluespace_crystal = 20,
|
||||
/obj/item/stack/cable_coil = 2)
|
||||
|
||||
/obj/item/circuitboard/machine/bsa/front
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Bluespace crystals, used in telescience and when crushed it will blink you to a random turf.
|
||||
/obj/item/ore/bluespace_crystal
|
||||
/obj/item/stack/ore/bluespace_crystal
|
||||
name = "bluespace crystal"
|
||||
desc = "A glowing bluespace crystal, not much is known about how they work. It looks very delicate."
|
||||
icon = 'icons/obj/telescience.dmi'
|
||||
@@ -13,38 +13,38 @@
|
||||
toolspeed = 1
|
||||
usesound = 'sound/items/Deconstruct.ogg'
|
||||
|
||||
/obj/item/ore/bluespace_crystal/New()
|
||||
/obj/item/stack/ore/bluespace_crystal/New()
|
||||
..()
|
||||
pixel_x = rand(-5, 5)
|
||||
pixel_y = rand(-5, 5)
|
||||
|
||||
/obj/item/ore/bluespace_crystal/attack_self(var/mob/user)
|
||||
/obj/item/stack/ore/bluespace_crystal/attack_self(var/mob/user)
|
||||
blink_mob(user)
|
||||
user.drop_item()
|
||||
user.visible_message("<span class='notice'>[user] crushes the [src]!</span>")
|
||||
qdel(src)
|
||||
|
||||
/obj/item/ore/bluespace_crystal/proc/blink_mob(var/mob/living/L)
|
||||
/obj/item/stack/ore/bluespace_crystal/proc/blink_mob(var/mob/living/L)
|
||||
if(!is_teleport_allowed(L.z))
|
||||
src.visible_message("<span class='warning'>[src]'s fragments begin rapidly vibrating and blink out of existence.</span>")
|
||||
qdel(src)
|
||||
return
|
||||
do_teleport(L, get_turf(L), blink_range, asoundin = 'sound/effects/phasein.ogg')
|
||||
|
||||
/obj/item/ore/bluespace_crystal/throw_impact(atom/hit_atom)
|
||||
/obj/item/stack/ore/bluespace_crystal/throw_impact(atom/hit_atom)
|
||||
..()
|
||||
if(isliving(hit_atom))
|
||||
blink_mob(hit_atom)
|
||||
qdel(src)
|
||||
|
||||
// Blueapce crystal fragments (stops point farming)
|
||||
/obj/item/ore/bluespace_crystal/refined
|
||||
// Bluespace crystal fragments (stops point farming)
|
||||
/obj/item/stack/ore/bluespace_crystal/refined
|
||||
name = "refined bluespace crystal"
|
||||
points = 0
|
||||
refined_type = null
|
||||
|
||||
// Artifical bluespace crystal, doesn't give you much research.
|
||||
/obj/item/ore/bluespace_crystal/artificial
|
||||
/obj/item/stack/ore/bluespace_crystal/artificial
|
||||
name = "artificial bluespace crystal"
|
||||
desc = "An artificially made bluespace crystal, it looks delicate."
|
||||
origin_tech = "bluespace=3;plasmatech=4"
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
// Polycrystals, aka stacks
|
||||
|
||||
var/global/list/datum/stack_recipe/bluespace_crystal_recipes = list(new/datum/stack_recipe("Breakdown into bluespace crystal", /obj/item/ore/bluespace_crystal/refined, 1))
|
||||
var/global/list/datum/stack_recipe/bluespace_crystal_recipes = list(new/datum/stack_recipe("Breakdown into bluespace crystal", /obj/item/stack/ore/bluespace_crystal/refined, 1))
|
||||
|
||||
/obj/item/stack/sheet/bluespace_crystal
|
||||
name = "bluespace polycrystal"
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/telesci_pad(null)
|
||||
component_parts += new /obj/item/ore/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/ore/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 2)
|
||||
component_parts += new /obj/item/stock_parts/capacitor(null)
|
||||
component_parts += new /obj/item/stock_parts/console_screen(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
@@ -25,8 +24,7 @@
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/circuitboard/telesci_pad(null)
|
||||
component_parts += new /obj/item/ore/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/ore/bluespace_crystal/artificial(null)
|
||||
component_parts += new /obj/item/stack/ore/bluespace_crystal/artificial(null, 2)
|
||||
component_parts += new /obj/item/stock_parts/capacitor/super(null)
|
||||
component_parts += new /obj/item/stock_parts/console_screen(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 1)
|
||||
|
||||
@@ -26,9 +26,8 @@
|
||||
var/teleport_cooldown = 0 // every index requires a bluespace crystal
|
||||
var/list/power_options = list(5, 10, 20, 25, 30, 40, 50, 80)
|
||||
var/teleporting = 0
|
||||
var/starting_crystals = 0
|
||||
var/crystals = 0
|
||||
var/max_crystals = 4
|
||||
var/list/crystals = list()
|
||||
var/obj/item/gps/inserted_gps
|
||||
|
||||
/obj/machinery/computer/telescience/New()
|
||||
@@ -44,29 +43,27 @@
|
||||
|
||||
/obj/machinery/computer/telescience/examine(mob/user)
|
||||
..(user)
|
||||
to_chat(user, "There are [crystals.len ? crystals.len : "no"] bluespace crystal\s in the crystal slots.")
|
||||
to_chat(user, "There are [crystals ? crystals : "no"] bluespace crystal\s in the crystal slots.")
|
||||
|
||||
/obj/machinery/computer/telescience/Initialize()
|
||||
..()
|
||||
for(var/i = 1; i <= starting_crystals; i++)
|
||||
crystals += new /obj/item/ore/bluespace_crystal/artificial(null) // starting crystals
|
||||
|
||||
/obj/machinery/computer/telescience/attackby(obj/item/W, mob/user, params)
|
||||
if(istype(W, /obj/item/ore/bluespace_crystal))
|
||||
if(crystals.len >= max_crystals)
|
||||
if(istype(W, /obj/item/stack/ore/bluespace_crystal))
|
||||
var/obj/item/stack/ore/bluespace_crystal/B = W
|
||||
if(crystals >= max_crystals)
|
||||
to_chat(user, "<span class='warning'>There are not enough crystal slots.</span>")
|
||||
return
|
||||
user.drop_item()
|
||||
crystals += W
|
||||
W.loc = null
|
||||
user.visible_message("<span class='notice'>[user] inserts [W] into \the [src]'s crystal slot.</span>")
|
||||
crystals += 1
|
||||
user.visible_message("<span class='notice'>[user] inserts a [B.singular_name] into [src]'s crystal slot.</span>")
|
||||
B.use(1)
|
||||
updateUsrDialog()
|
||||
else if(istype(W, /obj/item/gps))
|
||||
if(!inserted_gps)
|
||||
inserted_gps = W
|
||||
user.unEquip(W)
|
||||
W.loc = src
|
||||
user.visible_message("<span class='notice'>[user] inserts [W] into \the [src]'s GPS device slot.</span>")
|
||||
user.visible_message("<span class='notice'>[user] inserts [W] into [src]'s GPS device slot.</span>")
|
||||
updateUsrDialog()
|
||||
else if(istype(W, /obj/item/multitool))
|
||||
var/obj/item/multitool/M = W
|
||||
@@ -115,7 +112,7 @@
|
||||
t += "<div class='statusDisplay'>"
|
||||
|
||||
for(var/i = 1; i <= power_options.len; i++)
|
||||
if(crystals.len + telepad.efficiency < i)
|
||||
if(crystals + telepad.efficiency < i)
|
||||
t += "<span class='linkOff'>[power_options[i]]</span>"
|
||||
continue
|
||||
if(power == power_options[i])
|
||||
@@ -322,11 +319,11 @@
|
||||
return
|
||||
|
||||
/obj/machinery/computer/telescience/proc/eject()
|
||||
|
||||
for(var/obj/item/I in crystals)
|
||||
I.loc = loc
|
||||
I.pixel_y = -9
|
||||
crystals -= I
|
||||
var/to_eject
|
||||
for(var/i in 1 to crystals)
|
||||
to_eject += 1
|
||||
crystals -= 1
|
||||
new /obj/item/stack/ore/bluespace_crystal/artificial(drop_location(), to_eject)
|
||||
power = 0
|
||||
|
||||
/obj/machinery/computer/telescience/Topic(href, href_list)
|
||||
@@ -355,7 +352,7 @@
|
||||
var/index = href_list["setpower"]
|
||||
index = text2num(index)
|
||||
if(index != null && power_options[index])
|
||||
if(crystals.len + telepad.efficiency >= index)
|
||||
if(crystals + telepad.efficiency >= index)
|
||||
power = power_options[index]
|
||||
|
||||
if(href_list["setz"])
|
||||
|
||||
Reference in New Issue
Block a user