mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-20 15:56:38 +01:00
- all cells in the game are now small, medium, large - super, hyper capacity cells, device, and weapon cells are all removed - cells now have standardized variants, some of which are printable by R&D - energy weapons rebalanced - **advanced energy guns and stun revolvers removed** - use the new modular weapon system and microfission cells. --------- Co-authored-by: silicons <silicons@silicons.dev>
78 lines
3.1 KiB
Plaintext
78 lines
3.1 KiB
Plaintext
/obj/item/vertibore
|
|
name = "portable shaft excavation device"
|
|
desc = "A heavily modified shaft bore utilizing phorogenic blasts to tunnel vertically through rock. Much faster than a large industrial drill unit, but is very resource- and power-intensive."
|
|
description_fluff = "A phoron bore used for rapidly digging through rock that has been modified to allow it to fire straight down at a much higher power. However, this has resulted in a loss of power and resource efficiency, compactness, and modularity as the proprietary capacitor and manipulator cannot be swapped."
|
|
w_class = WEIGHT_CLASS_HUGE
|
|
icon = 'icons/obj/mining.dmi'
|
|
icon_state = "vertibore"
|
|
item_state = "vertibore"
|
|
|
|
var/cell_type
|
|
var/cell_accept = CELL_TYPE_SMALL | CELL_TYPE_WEAPON | CELL_TYPE_MEDIUM
|
|
|
|
var/power_cost = 1000 //10 shots off a highcap
|
|
var/load_type = /obj/item/stack/material
|
|
var/mat_storage = 0 // How much material is stored inside? Input in multiples of 2000 as per auto/protolathe.
|
|
var/max_mat_storage = 50000 // 25 sheets
|
|
var/mat_cost = 1000 // 100 shots off of a full stack.
|
|
var/ammo_material = MAT_PHORON
|
|
var/loading = FALSE
|
|
|
|
/obj/item/vertibore/Initialize(mapload)
|
|
. = ..()
|
|
init_cell_slot_easy_tool(cell_type, cell_accept)
|
|
|
|
/obj/item/vertibore/examine(mob/user, dist)
|
|
. = ..()
|
|
var/obj/item/cell/cell = get_cell()
|
|
. += "<span class='notice'>The shaft excavator has [mat_storage]cm^3 of phoron inside, and can hold a maximum of [max_mat_storage].</span>"
|
|
if(cell)
|
|
. += "<span class='notice'>The installed [cell.name] has a charge level of [round((cell.charge/cell.max_charge)*100)]%.</span>"
|
|
|
|
/obj/item/vertibore/attackby(var/obj/item/thing, var/mob/user)
|
|
if(istype(thing, load_type))
|
|
loading = TRUE
|
|
var/obj/item/stack/material/M = thing
|
|
if(!M.material || M.material.name != ammo_material)
|
|
return
|
|
if(mat_storage + 2000 > max_mat_storage)
|
|
to_chat(user, "<span class='warning'>\The [src] cannot hold more [ammo_material].</span>")
|
|
return
|
|
var/can_hold_val = 0
|
|
while(can_hold_val < round(max_mat_storage / 2000))
|
|
if(mat_storage + 2000 <= max_mat_storage && do_after(user,1.5 SECONDS))
|
|
can_hold_val ++
|
|
mat_storage += 2000
|
|
playsound(loc, 'sound/effects/phasein.ogg', 15, 1)
|
|
else
|
|
loading = FALSE
|
|
break
|
|
M.use(can_hold_val)
|
|
user.visible_message("<span class='notice'>\The [user] loads \the [src] with \the [M].</span>")
|
|
playsound(loc, 'sound/weapons/flipblade.ogg', 50, 1)
|
|
update_icon()
|
|
return
|
|
. = ..()
|
|
|
|
/obj/item/vertibore/attack_self(mob/user, datum/event_args/actor/actor)
|
|
. = ..()
|
|
if(.)
|
|
return
|
|
if(mat_cost > mat_storage)
|
|
to_chat(user, "<span class='notice'>The [src] shudders, the phoron feeding mechanism attempting to move things that aren't there.</span>")
|
|
return
|
|
var/obj/item/cell/cell = get_cell()
|
|
if(power_cost > cell.charge)
|
|
to_chat(user, "<span class='notice'>The [src] flashes a warning light, it doesn't have enough charge to dig.</span>")
|
|
return
|
|
if(do_after(user, 2.5 SECONDS) && cell.use(power_cost))
|
|
var/turf/T = get_turf(user)
|
|
LEGACY_EX_ACT(T, 1, null)
|
|
|
|
/obj/item/vertibore/update_icon()
|
|
cut_overlays()
|
|
var/obj/item/cell/cell = get_cell()
|
|
if(cell)
|
|
add_overlay("[icon_state]_cell")
|
|
return ..()
|