Vore Updates and merges

This commit is contained in:
Hawk_v3
2018-10-03 18:25:39 +01:00
1386 changed files with 634283 additions and 89661 deletions

View File

@@ -57,7 +57,7 @@
else
user << "<span class='notice'>This cable coil appears to be empty.</span>"
return
else if(istype(W,/obj/item/weapon/wirecutters))
else if(W.is_wirecutter())
if(!string_attached)
..()
return

View File

@@ -158,13 +158,13 @@
if(istype(O, /obj/item/weapon/cell))
if(cell)
user << "The drill already has a cell installed."
to_chat(user, "The drill already has a cell installed.")
else
user.drop_item()
O.loc = src
cell = O
component_parts += O
user << "You install \the [O]."
to_chat(user, "You install \the [O].")
return
..()
@@ -172,13 +172,13 @@
check_supports()
if (panel_open && cell && user.Adjacent(src))
user << "You take out \the [cell]."
to_chat(user, "You take out \the [cell].")
cell.loc = get_turf(user)
component_parts -= cell
cell = null
return
else if(need_player_check)
user << "You hit the manual override and reset the drill's error checking."
to_chat(user, "You hit the manual override and reset the drill's error checking.")
need_player_check = 0
if(anchored)
get_resource_field()
@@ -193,9 +193,9 @@
else
visible_message("<span class='notice'>\The [src] shudders to a grinding halt.</span>")
else
user << "<span class='notice'>The drill is unpowered.</span>"
to_chat(user, "<span class='notice'>The drill is unpowered.</span>")
else
user << "<span class='notice'>Turning on a piece of industrial machinery without sufficient bracing or wires exposed is a bad idea.</span>"
to_chat(user, "<span class='notice'>Turning on a piece of industrial machinery without sufficient bracing or wires exposed is a bad idea.</span>")
update_icon()
@@ -289,9 +289,9 @@
if(B)
for(var/obj/item/weapon/ore/O in contents)
O.loc = B
usr << "<span class='notice'>You unload the drill's storage cache into the ore box.</span>"
to_chat(usr, "<span class='notice'>You unload the drill's storage cache into the ore box.</span>")
else
usr << "<span class='notice'>You must move an ore box up to the drill before you can unload it.</span>"
to_chat(usr, "<span class='notice'>You must move an ore box up to the drill before you can unload it.</span>")
/obj/machinery/mining/brace
@@ -308,7 +308,7 @@
/obj/machinery/mining/brace/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(connected && connected.active)
user << "<span class='notice'>You can't work with the brace of a running drill!</span>"
to_chat(user, "<span class='notice'>You can't work with the brace of a running drill!</span>")
return
if(default_deconstruction_screwdriver(user, W))
@@ -316,14 +316,14 @@
if(default_deconstruction_crowbar(user, W))
return
if(istype(W,/obj/item/weapon/wrench))
if(W.is_wrench())
if(istype(get_turf(src), /turf/space))
user << "<span class='notice'>You can't anchor something to empty space. Idiot.</span>"
to_chat(user, "<span class='notice'>You can't anchor something to empty space. Idiot.</span>")
return
playsound(src, W.usesound, 100, 1)
user << "<span class='notice'>You [anchored ? "un" : ""]anchor the brace.</span>"
to_chat(user, "<span class='notice'>You [anchored ? "un" : ""]anchor the brace.</span>")
anchored = !anchored
if(anchored)
@@ -371,7 +371,7 @@
if(usr.stat) return
if (src.anchored)
usr << "It is anchored in place!"
to_chat(usr, "It is anchored in place!")
return 0
src.set_dir(turn(src.dir, 90))

View File

@@ -11,7 +11,8 @@
density = TRUE
anchored = TRUE
var/obj/item/weapon/card/id/inserted_id // VOREStation Edit - Inserted Id card
var/obj/item/weapon/card/id/inserted_id // Inserted ID card, for points
var/obj/machinery/mineral/processing_unit/machine = null
var/show_all_ores = FALSE
@@ -24,13 +25,17 @@
log_debug("Ore processing machine console at [src.x], [src.y], [src.z] could not find its machine!")
qdel(src)
// VOREStation Add Start
/obj/machinery/mineral/processing_unit_console/Destroy()
if(inserted_id)
inserted_id.forceMove(loc) //Prevents deconstructing from deleting whatever ID was inside it.
. = ..()
/obj/machinery/mineral/processing_unit_console/attackby(var/obj/item/I, var/mob/user)
/obj/machinery/mineral/processing_unit_console/attack_hand(mob/user)
if(..())
return
interact(user)
/obj/machinery/mineral/processing_unit_console/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/weapon/card/id))
if(!powered())
return
@@ -40,12 +45,6 @@
interact(user)
return
..()
// VOREStation Add End
/obj/machinery/mineral/processing_unit_console/attack_hand(mob/user)
if(..())
return
interact(user)
/obj/machinery/mineral/processing_unit_console/interact(mob/user)
if(..())
@@ -58,14 +57,13 @@
user.set_machine(src)
var/dat = "<h1>Ore processor console</h1>"
// VOREStation Add Start
dat += "Current unclaimed points: [machine.points]<br>"
if(istype(inserted_id))
dat += "You have [inserted_id.mining_points] mining points collected. <A href='?src=\ref[src];choice=eject'>Eject ID.</A><br>"
dat += "<A href='?src=\ref[src];choice=claim'>Claim points.</A><br>"
else
dat += "No ID inserted. <A href='?src=\ref[src];choice=insert'>Insert ID.</A><br>"
// VOREStation Add End
dat += "<hr><table>"
@@ -123,7 +121,6 @@
show_all_ores = !show_all_ores
// VOREStation Add Start
if(href_list["choice"])
if(istype(inserted_id))
if(href_list["choice"] == "eject")
@@ -138,13 +135,11 @@
else if(href_list["choice"] == "insert")
var/obj/item/weapon/card/id/I = usr.get_active_hand()
if(istype(I))
if(!usr.drop_item())
return 1
usr.drop_item()
I.forceMove(src)
inserted_id = I
else
to_chat(usr, "<span class='warning'>No valid ID.</span>")
// VOREStation Add End
src.updateUsrDialog()
return
@@ -167,20 +162,19 @@
var/list/ores_stored[0]
var/static/list/alloy_data
var/active = FALSE
// VOREStation Add Start
var/points = 0
var/static/list/ore_values = list(
"sand" = 1,
"hematite" = 1,
"carbon" = 1,
"phoron" = 15,
"silver" = 16,
"gold" = 18,
"phoron" = 15,
"silver" = 16,
"gold" = 18,
"uranium" = 30,
"diamond" = 50,
"platinum" = 40,
"mhydrogen" = 40)
// VOREStation Add End
/obj/machinery/mineral/processing_unit/New()
..()
@@ -211,8 +205,12 @@
return
/obj/machinery/mineral/processing_unit/process()
if(!src.output || !src.input) return
if(panel_open || !powered()) return // VOREStation Edit - Don't work when unpowered
if (!src.output || !src.input)
return
if(panel_open || !powered())
return
var/list/tick_alloys = list()
@@ -222,8 +220,7 @@
if(!O) break
if(!isnull(ores_stored[O.material]))
ores_stored[O.material]++
points += ore_values[O.material] // VOREStation Edit - Give Points!
points += ore_values[O.material] // Give Points!
qdel(O)
if(!active)

View File

@@ -26,6 +26,8 @@ var/list/mining_overlay_cache = list()
blocks_air = 1
temperature = T0C
can_dirty = FALSE
var/ore/mineral
var/sand_dug
var/mined_ore = 0
@@ -214,7 +216,7 @@ var/list/mining_overlay_cache = list()
/turf/simulated/mineral/bullet_act(var/obj/item/projectile/Proj)
// Emitter blasts
if(istype(Proj, /obj/item/projectile/beam/emitter))
if(istype(Proj, /obj/item/projectile/beam/emitter) || istype(Proj, /obj/item/projectile/beam/heavylaser/fakeemitter))
emitter_blasts_taken++
if(emitter_blasts_taken > 2) // 3 blasts per tile
mined_ore = 1

View File

@@ -3,13 +3,14 @@
/obj/machinery/mineral/equipment_vendor
name = "mining equipment vendor"
desc = "An equipment vendor for miners, points collected at an ore redemption machine can be spent here."
icon = 'icons/obj/machines/mining_machines_vr.dmi'
icon = 'icons/obj/machines/mining_machines.dmi'
icon_state = "mining"
density = TRUE
anchored = TRUE
circuit = /obj/item/weapon/circuitboard/mining_equipment_vendor
var/icon_deny = "mining-deny"
var/obj/item/weapon/card/id/inserted_id
//VOREStation Edit - Heavily modified list
var/list/prize_list = list(
new /datum/data/mining_equipment("1 Marker Beacon", /obj/item/stack/marker_beacon, 10),
new /datum/data/mining_equipment("10 Marker Beacons", /obj/item/stack/marker_beacon/ten, 100),
@@ -53,6 +54,7 @@
new /datum/data/mining_equipment("KA Efficiency Increase", /obj/item/borg/upgrade/modkit/efficiency, 1200),
new /datum/data/mining_equipment("KA AoE Damage", /obj/item/borg/upgrade/modkit/aoe/mobs, 2000)
)
//VOREStation Edit End
/datum/data/mining_equipment
var/equipment_name = "generic"
@@ -183,12 +185,14 @@
var/selection = input(redeemer, "Pick your equipment", "Mining Voucher Redemption") as null|anything in list("Kinetic Accelerator", "Resonator", "Mining Drone", "Advanced Scanner", "Crusher")
if(!selection || !Adjacent(redeemer) || voucher.loc != redeemer)
return
//VOREStation Edit Start - Uncommented these
var/drop_location = drop_location()
switch(selection)
if("Kinetic Accelerator")
new /obj/item/weapon/gun/energy/kinetic_accelerator(drop_location)
if("Resonator")
new /obj/item/resonator(drop_location)
//VOREStation Edit End
// if("Mining Drone")
// new /obj/item/storage/box/drone_kit(drop_location)
// if("Advanced Scanner")
@@ -197,6 +201,15 @@
// new /obj/item/twohanded/required/mining_hammer(drop_location)
qdel(voucher)
/obj/machinery/mineral/equipment_vendor/proc/new_prize(var/name, var/path, var/cost) // Generic proc for adding new entries. Good for abusing for FUN and PROFIT.
if(!cost)
cost = 100
if(!path)
path = /obj/item/stack/marker_beacon
if(!name)
name = "Generic Entry"
prize_list += new /datum/data/mining_equipment(name, path, cost)
/obj/machinery/mineral/equipment_vendor/ex_act(severity, target)
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)

View File

@@ -5,7 +5,7 @@
/obj/item/mining_voucher
name = "mining voucher"
desc = "A token to redeem a piece of equipment. Use it on a mining equipment vendor."
icon = 'icons/obj/mining_vr.dmi'
icon = 'icons/obj/mining.dmi'
icon_state = "mining_voucher"
w_class = ITEMSIZE_TINY

View File

@@ -0,0 +1,107 @@
/**********************Resonator**********************/
/obj/item/resonator
name = "resonator"
icon = 'icons/obj/mining.dmi'
icon_state = "resonator"
item_state = "resonator"
origin_tech = list(TECH_MAGNET = 3, TECH_ENGINEERING = 3)
desc = "A handheld device that creates small fields of energy that resonate until they detonate, crushing rock. It can also be activated without a target to create a field at the user's location, to act as a delayed time trap. It's more effective in low temperature."
w_class = ITEMSIZE_NORMAL
force = 8
throwforce = 10
var/cooldown = 0
var/fieldsactive = 0
var/burst_time = 50
var/fieldlimit = 3
/obj/item/resonator/upgraded
name = "upgraded resonator"
desc = "An upgraded version of the resonator that can produce more fields at once."
icon_state = "resonator_u"
origin_tech = list(TECH_MATERIAL = 4, TECH_POWER = 3, TECH_MAGNET = 3, TECH_ENGINEERING = 3)
fieldlimit = 5
/obj/item/resonator/proc/CreateResonance(var/target, var/creator)
var/turf/T = get_turf(target)
if(locate(/obj/effect/resonance) in T)
return
if(fieldsactive < fieldlimit)
playsound(src,'sound/weapons/resonator_fire.ogg',50,1)
new /obj/effect/resonance(T, creator, burst_time)
fieldsactive++
spawn(burst_time)
fieldsactive--
/obj/item/resonator/attack_self(mob/user)
if(burst_time == 50)
burst_time = 30
to_chat(user, "<span class='info'>You set the resonator's fields to detonate after 3 seconds.</span>")
else
burst_time = 50
to_chat(user, "<span class='info'>You set the resonator's fields to detonate after 5 seconds.</span>")
/obj/item/resonator/afterattack(atom/target, mob/user, proximity_flag)
if(proximity_flag)
if(!check_allowed_items(target, 1))
return
CreateResonance(target, user)
/obj/effect/resonance
name = "resonance field"
desc = "A resonating field that significantly damages anything inside of it when the field eventually ruptures."
icon = 'icons/effects/effects.dmi'
icon_state = "shield1"
plane = MOB_PLANE
layer = ABOVE_MOB_LAYER
mouse_opacity = 0
var/resonance_damage = 20
/obj/effect/resonance/initialize(mapload, var/creator = null, var/timetoburst)
. = ..()
// Start small and grow to big size as we are about to burst
transform = matrix()*0.75
animate(src, transform = matrix()*1.5, time = timetoburst)
// Queue the actual bursting
spawn(timetoburst)
if(!QDELETED(src))
burst(creator)
/obj/effect/resonance/proc/burst(var/creator = null)
var/turf/T = get_turf(src)
if(!T)
return
playsound(src, 'sound/weapons/resonator_blast.ogg', 50, 1)
// Make the collapsing effect
new /obj/effect/temp_visual/resonance_crush(T)
// Mineral turfs get drilled!
if(istype(T, /turf/simulated/mineral))
var/turf/simulated/mineral/M = T
M.GetDrilled()
qdel(src)
return
// Otherwise we damage mobs! Boost damage if low tempreature
var/datum/gas_mixture/environment = T.return_air()
if(environment.temperature < 250)
name = "strong resonance field"
resonance_damage = 50
for(var/mob/living/L in src.loc)
if(creator)
add_attack_logs(creator, L, "used a resonator field on")
to_chat(L, "<span class='danger'>\The [src] ruptured with you in it!</span>")
L.apply_damage(resonance_damage, BRUTE)
qdel(src)
/obj/effect/temp_visual/resonance_crush
icon_state = "shield1"
plane = MOB_PLANE
layer = ABOVE_MOB_LAYER
duration = 4
/obj/effect/temp_visual/resonance_crush/initialize()
. = ..()
transform = matrix()*1.5
animate(src, transform = matrix()*0.1, alpha = 50, time = 4)

View File

@@ -51,12 +51,12 @@
var/turf/above_location = GetAbove(deploy_location)
if(above_location && status == SHELTER_DEPLOY_ALLOWED)
status = template.check_deploy(above_location)
switch(status)
//Not allowed due to /area technical reasons
if(SHELTER_DEPLOY_BAD_AREA)
src.loc.visible_message("<span class='warning'>\The [src] will not function in this area.</span>")
//Anchored objects or no space
if(SHELTER_DEPLOY_BAD_TURFS, SHELTER_DEPLOY_ANCHORED_OBJECTS)
var/width = template.width
@@ -179,7 +179,7 @@
pixel_y = -32
/obj/item/device/gps/computer/attackby(obj/item/I, mob/living/user)
if(istype(I, /obj/item/weapon/wrench))
if(I.is_wrench())
user.visible_message("<span class='warning'>[user] disassembles [src].</span>",
"<span class='notice'>You start to disassemble [src]...</span>", "You hear clanking and banging noises.")
if(do_after(user,4 SECONDS,src))
@@ -226,7 +226,7 @@
var/obj/item/weapon/storage/pill_bottle/dice/D = new(src)
stock(D)
else
var/obj/item/device/violin/V = new(src)
var/obj/item/device/instrument/violin/V = new(src)
stock(V)
/obj/machinery/smartfridge/survival_pod/accept_check(obj/item/O)
@@ -258,7 +258,7 @@
qdel(src)
/obj/structure/fans/attackby(obj/item/I, mob/living/user)
if(istype(I, /obj/item/weapon/wrench))
if(I.is_wrench())
user.visible_message("<span class='warning'>[user] disassembles [src].</span>",
"<span class='notice'>You start to disassemble [src]...</span>", "You hear clanking and banging noises.")
if(do_after(user,4 SECONDS,src))