[MIRROR] Return of ore stacking, various changes to lavaland bombs to facilitate reduced lag (#5327)

* Return of ore stacking, various changes to lavaland bombs to facilitate reduced lag

* really? Like, a dozen fucking map conflicts. this map was fucked entirely
This commit is contained in:
CitadelStationBot
2018-02-06 19:06:31 -06:00
committed by Poojawa
parent b6c4bd6e01
commit 7126b61205
56 changed files with 348 additions and 311 deletions
@@ -28,7 +28,7 @@
to_chat(user, "<span class='[message_span]'>[cultist_message]</span>")
if(user.mind && user.mind.isholy)
to_chat(user, "<span class='boldannounce'>The power of your faith melts away [src]!</span>")
var/obj/item/ore/slag/wrath = new /obj/item/ore/slag
var/obj/item/stack/ore/slag/wrath = new /obj/item/stack/ore/slag
qdel(src)
user.put_in_active_hand(wrath)
if(is_servant_of_ratvar(user) && prob(20))
+1 -1
View File
@@ -90,7 +90,7 @@
projectiletype = /obj/item/projectile/beam/disabler
ranged_cooldown_time = 20
projectilesound = 'sound/weapons/taser2.ogg'
loot = list(/obj/effect/decal/cleanable/robot_debris, /obj/item/ore/bluespace_crystal)
loot = list(/obj/effect/decal/cleanable/robot_debris, /obj/item/stack/ore/bluespace_crystal)
del_on_death = 1
deathmessage = "explodes with a sharp pop!"
light_color = LIGHT_COLOR_CYAN
@@ -23,7 +23,7 @@
name = "Safecode hint spawner"
/obj/effect/landmark/sc_bible_spawner/New()
var/obj/item/storage/book/bible/B = new /obj/item/storage/book/bible/booze(src.loc)
var/obj/item/storage/book/bible/B = new /obj/item/storage/book/bible/booze(loc)
B.name = "The Holy book of the Geometer"
B.deity_name = "Narsie"
B.icon_state = "melted"
@@ -131,7 +131,7 @@ GLOBAL_VAR_INIT(sc_safecode5, "[rand(0,9)]")
new /obj/item/device/soulstone(src)
new /obj/item/clothing/suit/space/hardsuit/cult(src)
//new /obj/item/teleportation_scroll(src)
new /obj/item/ore/diamond(src)
new /obj/item/stack/ore/diamond(src)
/*
* Modified Nar-Sie
+5 -5
View File
@@ -4,7 +4,7 @@
var/material_id = null
export_types = list(
/obj/item/stack/sheet/mineral, /obj/item/stack/tile/mineral,
/obj/item/ore, /obj/item/coin)
/obj/item/stack/ore, /obj/item/coin)
// Yes, it's a base type containing export_types.
// But it has no material_id, so any applies_to check will return false, and these types reduce amount of copypasta a lot
@@ -22,8 +22,8 @@
if(istype(I, /obj/item/stack))
var/obj/item/stack/S = I
amount *= S.amount
else if(istype(I, /obj/item/ore))
amount *= 0.8 // Station's ore redemption equipment is really goddamn good.
if(istype(I, /obj/item/stack/ore))
amount *= 0.8 // Station's ore redemption equipment is really goddamn good.
return round(amount/MINERAL_MATERIAL_AMOUNT)
@@ -84,11 +84,11 @@
material_id = MAT_METAL
export_types = list(
/obj/item/stack/sheet/metal, /obj/item/stack/tile/plasteel,
/obj/item/stack/rods, /obj/item/ore, /obj/item/coin)
/obj/item/stack/rods, /obj/item/stack/ore, /obj/item/coin)
// Glass. Common building material.
/datum/export/material/glass
message = "cm3 of glass"
material_id = MAT_GLASS
export_types = list(/obj/item/stack/sheet/glass, /obj/item/ore,
export_types = list(/obj/item/stack/sheet/glass, /obj/item/stack/ore,
/obj/item/shard)
+1 -1
View File
@@ -80,7 +80,7 @@
reqs = list(/obj/item/restraints/handcuffs/cable = 1,
/obj/item/stack/rods = 1,
/obj/item/device/assembly/igniter = 1,
/obj/item/ore/bluespace_crystal = 1)
/obj/item/stack/ore/bluespace_crystal = 1)
time = 40
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
@@ -140,7 +140,7 @@
/datum/reagent/water = 10,
/obj/item/reagent_containers/glass/bowl = 1,
/obj/item/reagent_containers/food/snacks/grown/banana = 1,
/obj/item/ore/bananium = 1
/obj/item/stack/ore/bananium = 1
)
result = /obj/item/reagent_containers/food/snacks/soup/clownstears
subcategory = CAT_SOUP
+3 -5
View File
@@ -38,8 +38,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)
@@ -86,8 +85,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)
@@ -196,7 +194,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/list/guess = list()
var/list/answer = list()
+2 -2
View File
@@ -83,10 +83,10 @@
return ..()
/obj/machinery/mineral/processing_unit/HasProximity(atom/movable/AM)
if(istype(AM, /obj/item/ore) && AM.loc == get_step(src, input_dir))
if(istype(AM, /obj/item/stack/ore) && AM.loc == get_step(src, input_dir))
process_ore(AM)
/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))
+4 -4
View File
@@ -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/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)
@@ -61,7 +61,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
@@ -133,7 +133,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
+1 -1
View File
@@ -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++
+7 -13
View File
@@ -36,9 +36,9 @@
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/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/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(src.loc)
new /obj/effect/decal/cleanable/robot_debris(loc)
DropOre(0)
qdel(src)
return
@@ -124,20 +124,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
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 GLOB.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)
@@ -146,7 +140,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(drop_location())
return
+74 -80
View File
@@ -3,16 +3,43 @@
#define GIBTONITE_QUALITY_MEDIUM 2
#define GIBTONITE_QUALITY_LOW 1
#define ORESTACK_OVERLAYS_MAX 10
/**********************Mineral ores**************************/
/obj/item/ore
/obj/item/stack/ore
name = "rock"
icon = 'icons/obj/mining.dmi'
icon_state = "ore"
full_w_class = WEIGHT_CLASS_BULKY
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
novariants = FALSE // Ore stacks handle their icon updates themselves to keep the illusion that there's more going
var/list/stack_overlays
/obj/item/ore/attackby(obj/item/I, mob/user, params)
/obj/item/stack/ore/add(amount)
var/amount_added = 0
while (amount_added < amount && LAZYLEN(stack_overlays) < ORESTACK_OVERLAYS_MAX)
var/mutable_appearance/newore = mutable_appearance(icon, icon_state)
newore.pixel_x = rand(-8,8)
newore.pixel_y = rand(-8,8)
LAZYADD(stack_overlays, newore)
amount_added++
return ..()
/obj/item/stack/ore/use(amount)
var/newamount = src.amount - amount
if (newamount <= ORESTACK_OVERLAYS_MAX)
if (LAZYLEN(stack_overlays))
stack_overlays.len = newamount-1
return ..()
/obj/item/stack/ore/update_icon()
. = ..()
add_overlay(stack_overlays)
/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)
@@ -22,91 +49,40 @@
to_chat(user, "<span class='info'>Not enough fuel to smelt [src].</span>")
..()
/obj/item/ore/Crossed(atom/movable/AM)
set waitfor = FALSE
var/show_message = TRUE
for(var/obj/item/ore/O in loc)
if(O != src)
show_message = FALSE
break
var/obj/item/storage/bag/ore/OB
if(ishuman(AM))
var/mob/living/carbon/human/H = AM
OB = locate(/obj/item/storage/bag/ore) in H.get_storage_slots()
if(!OB)
OB = locate(/obj/item/storage/bag/ore) in H.held_items
else if(iscyborg(AM))
var/mob/living/silicon/robot/R = AM
OB = locate(/obj/item/storage/bag/ore) in R.held_items
if(OB)
var/obj/structure/ore_box/box
if(!OB.can_be_inserted(src, TRUE, AM))
if(!OB.spam_protection)
to_chat(AM, "<span class='warning'>Your [OB.name] is full and can't hold any more ore!</span>")
OB.spam_protection = TRUE
sleep(1)
OB.spam_protection = FALSE
else
OB.handle_item_insertion(src, TRUE, AM)
// Then, if the user is dragging an ore box, empty the satchel
// into the box.
var/mob/living/L = AM
if(istype(L.pulling, /obj/structure/ore_box))
box = L.pulling
for(var/obj/item/ore/O in OB)
OB.remove_from_storage(src, box)
if(show_message)
playsound(L, "rustle", 50, TRUE)
if(box)
L.visible_message("<span class='notice'>[L] offloads the ores into [box].</span>", \
"<span class='notice'>You offload the ores beneath you into your [box.name].</span>")
else
L.visible_message("<span class='notice'>[L] scoops up the ores beneath them.</span>", \
"<span class='notice'>You scoop up the ores beneath you with your [OB.name].</span>")
return ..()
/obj/item/ore/uranium
/obj/item/stack/ore/uranium
name = "uranium ore"
icon_state = "Uranium ore"
singular_name = "uranium ore chunk"
points = 30
materials = list(MAT_URANIUM=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/uranium
/obj/item/ore/iron
/obj/item/stack/ore/iron
name = "iron ore"
icon_state = "Iron ore"
singular_name = "iron ore chunk"
points = 1
materials = list(MAT_METAL=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/metal
/obj/item/ore/glass
/obj/item/stack/ore/glass
name = "sand pile"
icon_state = "Glass ore"
singular_name = "sand pile"
points = 1
materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/glass
w_class = WEIGHT_CLASS_TINY
/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/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
GLOBAL_LIST_INIT(sand_recipes, list(\
new /datum/stack_recipe("sandstone", /obj/item/stack/sheet/mineral/sandstone, 1, 1, 50)\
))
/obj/item/ore/glass/throw_impact(atom/hit_atom)
/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
@@ -125,18 +101,20 @@
to_chat(C, "<span class='userdanger'>\The [src] gets into your eyes! The pain, it burns!</span>")
qdel(src)
/obj/item/ore/glass/basalt
/obj/item/stack/ore/glass/basalt
name = "volcanic ash"
icon_state = "volcanic_sand"
singular_name = "volcanic ash pile"
/obj/item/ore/plasma
/obj/item/stack/ore/plasma
name = "plasma ore"
icon_state = "Plasma ore"
singular_name = "plasma ore chunk"
points = 15
materials = list(MAT_PLASMA=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/plasma
/obj/item/ore/plasma/attackby(obj/item/I, mob/user, params)
/obj/item/stack/ore/plasma/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weldingtool))
var/obj/item/weldingtool/W = I
if(W.welding)
@@ -145,45 +123,51 @@
..()
/obj/item/ore/silver
/obj/item/stack/ore/silver
name = "silver ore"
icon_state = "Silver ore"
singular_name = "silver ore chunk"
points = 16
materials = list(MAT_SILVER=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/silver
/obj/item/ore/gold
/obj/item/stack/ore/gold
name = "gold ore"
icon_state = "Gold ore"
singular_name = "gold ore chunk"
points = 18
materials = list(MAT_GOLD=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/gold
/obj/item/ore/diamond
/obj/item/stack/ore/diamond
name = "diamond ore"
icon_state = "Diamond ore"
singular_name = "diamond ore chunk"
points = 50
materials = list(MAT_DIAMOND=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/diamond
/obj/item/ore/bananium
/obj/item/stack/ore/bananium
name = "bananium ore"
icon_state = "Bananium ore"
singular_name = "bananium ore chunk"
points = 60
materials = list(MAT_BANANIUM=MINERAL_MATERIAL_AMOUNT)
refined_type = /obj/item/stack/sheet/mineral/bananium
/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"
@@ -285,13 +269,20 @@
explosion(src,0,1,3,adminlog = notify_admins)
qdel(src)
/obj/item/ore/Initialize()
/obj/item/stack/ore/Initialize()
. = ..()
pixel_x = rand(0,16)-8
pixel_y = rand(0,8)-8
/obj/item/ore/ex_act()
return
/obj/item/stack/ore/ex_act(severity, target)
if (!severity || severity >= 2)
return
qdel(src)
/obj/item/ore/stack/glass/ex_act(severity, target)
if (severity == EXPLODE_NONE)
return
qdel(src)
/*****************************Coin********************************/
@@ -463,4 +454,7 @@
user.visible_message("[user] has flipped [src]. It lands on [coinflip].", \
"<span class='notice'>You flip [src]. It lands on [coinflip].</span>", \
"<span class='italics'>You hear the clattering of loose change.</span>")
return TRUE//did the coin flip? useful for suicide_act
return TRUE//did the coin flip? useful for suicide_act
#undef ORESTACK_OVERLAYS_MAX
+11 -11
View File
@@ -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/ore))
if (istype(W, /obj/item/stack/ore))
user.transferItemToLoc(W, src)
else if (istype(W, /obj/item/storage))
var/obj/item/storage/S = W
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
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/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>"
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=[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/ore/O in src)
for(var/obj/item/stack/ore/O in src)
if(QDELETED(O))
continue
if(QDELETED(src))
@@ -69,7 +69,7 @@
return
usr.set_machine(src)
src.add_fingerprint(usr)
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>")
@@ -83,4 +83,4 @@
qdel(src)
/obj/structure/ore_box/onTransitZ()
return
return
@@ -74,7 +74,7 @@
name = "Plasma Golem"
id = "plasma golem"
fixed_mut_color = "a3d"
meat = /obj/item/ore/plasma
meat = /obj/item/stack/ore/plasma
//Can burn and takes damage from heat
species_traits = list(SPECIES_INORGANIC,NOBREATH,RESISTCOLD,RESISTPRESSURE,NOGUNS,NOBLOOD,RADIMMUNE,PIERCEIMMUNE,NODISMEMBER,MUTCOLORS,NO_UNDERWEAR)
info_text = "As a <span class='danger'>Plasma Golem</span>, you burn easily. Be careful, if you get hot enough while burning, you'll blow up!"
@@ -134,7 +134,7 @@
id = "diamond golem"
fixed_mut_color = "0ff"
armor = 70 //up from 55
meat = /obj/item/ore/diamond
meat = /obj/item/stack/ore/diamond
info_text = "As a <span class='danger'>Diamond Golem</span>, you are more resistant than the average golem."
prefix = "Diamond"
special_names = list("Back")
@@ -146,7 +146,7 @@
fixed_mut_color = "cc0"
speedmod = 1
armor = 25 //down from 55
meat = /obj/item/ore/gold
meat = /obj/item/stack/ore/gold
info_text = "As a <span class='danger'>Gold Golem</span>, you are faster but less resistant than the average golem."
prefix = "Golden"
@@ -156,7 +156,7 @@
id = "silver golem"
fixed_mut_color = "ddd"
punchstunthreshold = 9 //60% chance, from 40%
meat = /obj/item/ore/silver
meat = /obj/item/stack/ore/silver
info_text = "As a <span class='danger'>Silver Golem</span>, your attacks are heavier and have a higher chance of stunning."
prefix = "Silver"
special_names = list("Surfer", "Chariot", "Lining")
@@ -171,7 +171,7 @@
punchdamagehigh = 21
punchstunthreshold = 18 //still 40% stun chance
speedmod = 4 //pretty fucking slow
meat = /obj/item/ore/iron
meat = /obj/item/stack/ore/iron
info_text = "As a <span class='danger'>Plasteel Golem</span>, you are slower, but harder to stun, and hit very hard when punching."
attack_verb = "smash"
attack_sound = 'sound/effects/meteorimpact.ogg' //hits pretty hard
@@ -182,7 +182,7 @@
name = "Titanium Golem"
id = "titanium golem"
fixed_mut_color = "fff"
meat = /obj/item/ore/titanium
meat = /obj/item/stack/ore/titanium
info_text = "As a <span class='danger'>Titanium Golem</span>, you are immune to ash storms, and slightly more resistant to burn damage."
burnmod = 0.9
prefix = "Titanium"
@@ -200,7 +200,7 @@
name = "Plastitanium Golem"
id = "plastitanium golem"
fixed_mut_color = "888"
meat = /obj/item/ore/titanium
meat = /obj/item/stack/ore/titanium
info_text = "As a <span class='danger'>Plastitanium Golem</span>, you are immune to both ash storms and lava, and slightly more resistant to burn damage."
burnmod = 0.8
prefix = "Plastitanium"
@@ -291,7 +291,7 @@
name = "Uranium Golem"
id = "uranium golem"
fixed_mut_color = "7f0"
meat = /obj/item/ore/uranium
meat = /obj/item/stack/ore/uranium
info_text = "As an <span class='danger'>Uranium Golem</span>, you emit radiation pulses every once in a while. It won't harm fellow golems, but organic lifeforms will be affected."
var/last_event = 0
@@ -312,7 +312,7 @@
name = "Sand Golem"
id = "sand golem"
fixed_mut_color = "ffdc8f"
meat = /obj/item/ore/glass //this is sand
meat = /obj/item/stack/ore/glass //this is sand
armor = 0
burnmod = 3 //melts easily
brutemod = 0.25
@@ -325,7 +325,7 @@
for(var/obj/item/W in H)
H.dropItemToGround(W)
for(var/i=1, i <= rand(3,5), i++)
new /obj/item/ore/glass(get_turf(H))
new /obj/item/stack/ore/glass(get_turf(H))
qdel(H)
/datum/species/golem/sand/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H)
@@ -378,7 +378,7 @@
name = "Bluespace Golem"
id = "bluespace golem"
fixed_mut_color = "33f"
meat = /obj/item/ore/bluespace_crystal
meat = /obj/item/stack/ore/bluespace_crystal
info_text = "As a <span class='danger'>Bluespace Golem</span>, are spatially unstable: you will teleport when hit, and you can teleport manually at a long distance."
attack_verb = "bluespace punch"
attack_sound = 'sound/effects/phasein.ogg'
@@ -475,7 +475,7 @@
punchdamagelow = 0
punchdamagehigh = 1
punchstunthreshold = 2 //Harmless and can't stun
meat = /obj/item/ore/bananium
meat = /obj/item/stack/ore/bananium
info_text = "As a <span class='danger'>Bananium Golem</span>, you are made for pranking. Your body emits natural honks, and you cannot hurt people when punching them. Your skin also emits bananas when damaged."
attack_verb = "honk"
attack_sound = 'sound/items/airhorn2.ogg'
@@ -48,7 +48,7 @@ Difficulty: Very Hard
score_type = COLOSSUS_SCORE
crusher_loot = list(/obj/structure/closet/crate/necropolis/colossus/crusher)
loot = list(/obj/structure/closet/crate/necropolis/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/magic/demon_dies.ogg'
@@ -113,7 +113,7 @@ Difficulty: Very Hard
/mob/living/simple_animal/hostile/megafauna/colossus/bullet_act(obj/item/projectile/P)
if(!stat)
var/obj/effect/temp_visual/at_shield/AT = new /obj/effect/temp_visual/at_shield(src.loc, src)
var/obj/effect/temp_visual/at_shield/AT = new /obj/effect/temp_visual/at_shield(loc, src)
var/random_x = rand(-32, 32)
AT.pixel_x += random_x
@@ -54,7 +54,7 @@ Difficulty: Medium
pixel_x = -16
crusher_loot = list(/obj/structure/closet/crate/necropolis/dragon/crusher)
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 = NONE
var/swoop_cooldown = 0
medal_type = MEDAL_PREFIX
@@ -238,7 +238,7 @@ Difficulty: Medium
swooping &= ~SWOOP_INVULNERABLE
mouse_opacity = initial(mouse_opacity)
icon_state = "dragon"
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 200, 1)
playsound(loc, 'sound/effects/meteorimpact.ogg', 200, 1)
for(var/mob/living/L in orange(1, src))
if(L.stat)
visible_message("<span class='warning'>[src] slams down on [L], crushing them!</span>")
@@ -383,7 +383,7 @@ Difficulty: Medium
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1)
loot = list()
crusher_loot = list()
butcher_results = list(/obj/item/ore/diamond = 5, /obj/item/stack/sheet/sinew = 5, /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/bone = 30)
/mob/living/simple_animal/hostile/megafauna/dragon/lesser/grant_achievement(medaltype,scoretype)
return
@@ -31,8 +31,8 @@
idle_vision_range = 2
turns_per_move = 5
gold_core_spawnable = HOSTILE_SPAWN
loot = list(/obj/item/ore/diamond{layer = ABOVE_MOB_LAYER},
/obj/item/ore/diamond{layer = ABOVE_MOB_LAYER})
loot = list(/obj/item/stack/ore/diamond{layer = ABOVE_MOB_LAYER},
/obj/item/stack/ore/diamond{layer = ABOVE_MOB_LAYER})
/obj/item/projectile/temp/basilisk
name = "freezing blast"
@@ -79,7 +79,7 @@
robust_searching = 1
crusher_loot = /obj/item/crusher_trophy/watcher_wing
loot = list()
butcher_results = list(/obj/item/ore/diamond = 2, /obj/item/stack/sheet/sinew = 2, /obj/item/stack/sheet/bone = 1)
butcher_results = list(/obj/item/stack/ore/diamond = 2, /obj/item/stack/sheet/sinew = 2, /obj/item/stack/sheet/bone = 1)
/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/random/Initialize()
. = ..()
@@ -116,7 +116,7 @@
maxHealth = 170
health = 170
projectiletype = /obj/item/projectile/temp/basilisk/icewing
butcher_results = list(/obj/item/ore/diamond = 5, /obj/item/stack/sheet/bone = 1) //No sinew; the wings are too fragile to be usable
butcher_results = list(/obj/item/stack/ore/diamond = 5, /obj/item/stack/sheet/bone = 1) //No sinew; the wings are too fragile to be usable
crusher_loot = /obj/item/crusher_trophy/watcher_wing/ice_wing
crusher_drop_mod = 30
@@ -26,8 +26,8 @@
deathmessage = "spits up the contents of its stomach before dying!"
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
@@ -36,42 +36,44 @@
. = ..()
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)
addtimer(CALLBACK(src, .proc/Burrow), chase_time)
/mob/living/simple_animal/hostile/asteroid/goldgrub/AttackingTarget()
if(istype(target, /obj/item/ore))
if(istype(target, /obj/item/stack/ore))
EatOre(target)
return
return ..()
/mob/living/simple_animal/hostile/asteroid/goldgrub/proc/EatOre(atom/targeted_ore)
for(var/obj/item/ore/O in targeted_ore.loc)
if(loot.len < 10)
loot += O.type
qdel(O)
for(var/obj/item/stack/ore/O in get_turf(targeted_ore))
if(length(loot) < 10)
var/using = min(10 - length(loot), 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>")
visible_message("<span class='danger'>The [name] buries into the ground, vanishing from sight!</span>")
qdel(src)
/mob/living/simple_animal/hostile/asteroid/goldgrub/bullet_act(obj/item/projectile/P)
visible_message("<span class='danger'>The [P.name] was repelled by [src.name]'s girth!</span>")
visible_message("<span class='danger'>The [P.name] was repelled by [name]'s girth!</span>")
return
/mob/living/simple_animal/hostile/asteroid/goldgrub/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
@@ -142,8 +142,9 @@
S.use(1)
cell.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)
cell.give(500)
to_chat(user, "<span class='notice'>You insert [A] in [src], recharging it.</span>")
else
@@ -168,7 +168,7 @@
var/datum/browser/popup = new(user, "reagentgrinder", "All-In-One Grinder")
popup.set_content(dat)
popup.set_title_image(user.browse_rsc_icon(src.icon, src.icon_state))
popup.set_title_image(user.browse_rsc_icon(icon, icon_state))
popup.open(1)
return
@@ -1100,7 +1100,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/fetching_fizz/on_mob_life(mob/living/M)
for(var/obj/item/ore/O in orange(3, M))
for(var/obj/item/stack/ore/O in orange(3, M))
step_towards(O, get_turf(M))
return ..()
@@ -501,7 +501,7 @@
required_other = 1
/datum/chemical_reaction/slime/slimecrystal/on_reaction(datum/reagents/holder, created_volume)
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>")
..()
+1 -1
View File
@@ -31,7 +31,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis).
/obj/machinery/rnd/circuit_imprinter/Initialize()
materials = AddComponent(/datum/component/material_container, list(MAT_GLASS, MAT_GOLD, MAT_DIAMOND, MAT_METAL, MAT_BLUESPACE), 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
create_reagents(0)
RefreshParts()
@@ -30,7 +30,7 @@
id = "bluespace_crystal"
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 Designs")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE
+2 -2
View File
@@ -35,7 +35,7 @@ Note: Must be placed west/left of and R&D console to function.
create_reagents(0)
materials = AddComponent(/datum/component/material_container,
list(MAT_METAL, MAT_GLASS, MAT_SILVER, MAT_GOLD, MAT_DIAMOND, MAT_PLASMA, MAT_URANIUM, MAT_BANANIUM, MAT_TITANIUM, MAT_BLUESPACE), 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
RefreshParts()
return ..()
@@ -129,6 +129,6 @@ Note: Must be placed west/left of and R&D console to function.
message_admins("[ADMIN_LOOKUPFLW(usr)] has built [amount] of [path] at a protolathe")
for(var/i in 1 to amount)
var/obj/item/I = new path(get_turf(src))
if(!istype(I, /obj/item/stack/sheet) && !istype(I, /obj/item/ore/bluespace_crystal))
if(!istype(I, /obj/item/stack/sheet) && !istype(I, /obj/item/stack/ore/bluespace_crystal))
I.materials = matlist.Copy()
SSblackbox.record_feedback("nested tally", "item_printed", amount, list("[type]", "[path]"))
+1 -1
View File
@@ -108,7 +108,7 @@
/obj/machinery/rnd/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"
use_power(MINERAL_MATERIAL_AMOUNT / 10)
else