mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 05:23:22 +01:00
Custom Kinetic Accelerators (#4802)
This is honestly one of my biggest and most ambitious projects. I hope people are happy with this. Custom kinetic accelerators are special, customizable mining weapons that are meant to give a sense of progression, and a sense of pride and accomplishment while mining. Each custom KA is made up of 3 or 4 parts: The Frame (5 to choose from) The Cell (5 to choose from, +1 traitor) The Barrel (5 to choose from, +1 traitor) The Upgrade Chip (7 to choose from, +1 traitor) The sprites change with each addon, they are truly dynamic and there are so many combinations of parts that a miner can have. You can have several different builds for each desired mining style, it's quite a robust system. You can have a KA that shoots slowly, but delivers high-penetrating shots that go through several walls of rock. You can have a KA that shoots REALLY fast, but precisely destroys 1 rock at a time. You can have an absolute canon of a beast, that destroys rocks in a 3 tile radius around it. The parts can be obtained via research, via abandoned crates, or via RNG in the cargo warehouse. There are some custom KAs that spawn on the raider's ship, on the mercs ship, and a laser one on the merc's headquarters. That laser one can also be bought from the traitor uplink as well. ERT get a class 4 KA for use in special operations, if they choose to use it.
This commit is contained in:
@@ -225,6 +225,7 @@ var/list/global/random_stock_rare = list(
|
||||
"humanhide" = 0.5,
|
||||
"modkit" = 1,
|
||||
"contraband" = 0.8,
|
||||
"custom_ka" = 0.5,
|
||||
"nothing" = 0)
|
||||
|
||||
var/list/global/random_stock_large = list(
|
||||
@@ -1396,6 +1397,8 @@ var/list/global/random_stock_large = list(
|
||||
//=============================================================
|
||||
//=============================================================
|
||||
//=============================================================
|
||||
if("custom_ka")
|
||||
new /obj/random/custom_ka(L)
|
||||
if("gold")
|
||||
new /obj/item/stack/material/gold(L, rand(2,15))
|
||||
if("diamond")
|
||||
|
||||
@@ -232,15 +232,6 @@
|
||||
|
||||
gun_type = /obj/item/weapon/gun/energy/plasmacutter/mounted
|
||||
|
||||
/obj/item/rig_module/mounted/kinetic_accelerator
|
||||
name = "hardsuit kinetic accelerator"
|
||||
desc = "A lethal-looking industrial cutter."
|
||||
icon_state = "kineticgun"
|
||||
interface_name = "kinetic accelerator"
|
||||
interface_desc = "A ranged mining tool that does increased damage in low pressure."
|
||||
|
||||
gun_type = /obj/item/weapon/gun/energy/kinetic_accelerator/cyborg
|
||||
|
||||
/obj/item/rig_module/mounted/thermalldrill
|
||||
name = "hardsuit thermal drill"
|
||||
desc = "An incredibly lethal looking thermal drill."
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
/obj/item/custom_ka_upgrade/barrels/barrel01
|
||||
name = "standard core KA power converter"
|
||||
build_name = "'Standard'"
|
||||
desc = "A very standard kinetic accelerator energy converter and barrel assembly. Has poor range, but gets the job done."
|
||||
icon_state = "barrel01"
|
||||
damage_increase = 10
|
||||
firedelay_increase = 0.75 SECONDS
|
||||
range_increase = 2
|
||||
recoil_increase = 2
|
||||
cost_increase = 1
|
||||
cell_increase = 0
|
||||
capacity_increase = -1
|
||||
fire_sound = 'sound/weapons/Kenetic_accel.ogg'
|
||||
projectile_type = /obj/item/projectile/kinetic
|
||||
origin_tech = list(TECH_MATERIAL = 2,TECH_ENGINEERING = 2,TECH_MAGNET = 2)
|
||||
|
||||
/obj/item/custom_ka_upgrade/barrels/barrel02
|
||||
name = "professional core KA power converter"
|
||||
build_name = "'Professional'"
|
||||
desc = "A more advanced kinetic accelerator energy converter and barrel assembly intended for professional miners out on the rock."
|
||||
icon_state = "barrel02"
|
||||
damage_increase = 15
|
||||
firedelay_increase = 0.75 SECONDS
|
||||
range_increase = 3
|
||||
recoil_increase = 3
|
||||
cost_increase = 1
|
||||
cell_increase = 0
|
||||
capacity_increase = -2
|
||||
fire_sound = 'sound/weapons/Kenetic_accel.ogg'
|
||||
projectile_type = /obj/item/projectile/kinetic
|
||||
origin_tech = list(TECH_MATERIAL = 3,TECH_ENGINEERING = 3,TECH_MAGNET = 3)
|
||||
|
||||
/obj/item/custom_ka_upgrade/barrels/barrel03
|
||||
name = "meteor core KA power converter"
|
||||
build_name = "'Meteor'"
|
||||
desc = "A very robust kinetic accelerator energy converter used by professional mining contractors intended for the use in mining soft metals such as gold on asteroids."
|
||||
icon_state = "barrel03"
|
||||
damage_increase = 20
|
||||
firedelay_increase = 0.75 SECONDS
|
||||
range_increase = 4
|
||||
recoil_increase = 4
|
||||
cost_increase = 2
|
||||
cell_increase = 0
|
||||
capacity_increase = -3
|
||||
fire_sound = 'sound/weapons/resonator_fire.ogg'
|
||||
projectile_type = /obj/item/projectile/kinetic
|
||||
origin_tech = list(TECH_MATERIAL = 4,TECH_ENGINEERING = 4,TECH_MAGNET = 4)
|
||||
|
||||
|
||||
/obj/item/custom_ka_upgrade/barrels/barrel04
|
||||
name = "planet core KA power converter"
|
||||
build_name = "'Planet'"
|
||||
desc = "An incredibly powerful and efficient kinetic accelerator energy converter intended for the use in atmospheric areas such as planets and gas giants."
|
||||
icon_state = "barrel04"
|
||||
damage_increase = 25
|
||||
firedelay_increase = 1 SECONDS
|
||||
range_increase = 5
|
||||
recoil_increase = 6
|
||||
cost_increase = 5
|
||||
cell_increase = 0
|
||||
capacity_increase = -4
|
||||
fire_sound = 'sound/weapons/pulse.ogg'
|
||||
projectile_type = /obj/item/projectile/kinetic
|
||||
origin_tech = list(TECH_MATERIAL = 5,TECH_ENGINEERING = 5,TECH_MAGNET = 5)
|
||||
|
||||
/obj/item/custom_ka_upgrade/barrels/barrel05
|
||||
name = "experimental core KA power converter"
|
||||
build_name = "'Experimental'"
|
||||
desc = "A very experimental kinetic accelerator energy converter. Not much is known about this thing, other than it kicks like a mule and stings like an e-sword."
|
||||
icon_state = "barrel05"
|
||||
damage_increase = 30
|
||||
firedelay_increase = 1 SECONDS
|
||||
range_increase = 6
|
||||
recoil_increase = 10
|
||||
cost_increase = 10
|
||||
cell_increase = 0
|
||||
capacity_increase = -5
|
||||
fire_sound = 'sound/weapons/resonator_blast.ogg'
|
||||
projectile_type = /obj/item/projectile/kinetic
|
||||
origin_tech = list(TECH_MATERIAL = 6,TECH_ENGINEERING = 6,TECH_MAGNET = 6)
|
||||
|
||||
/obj/item/custom_ka_upgrade/barrels/illegal
|
||||
name = "laser KA power converter"
|
||||
build_name = "'Syndicate''"
|
||||
desc = "A laser crystal ripped from a laser rifle and repurposed for kinetic accelerator assemblies."
|
||||
icon_state = "barrel_laser"
|
||||
damage_increase = 15
|
||||
firedelay_increase = 1.5 SECONDS
|
||||
range_increase = 64
|
||||
recoil_increase = 6
|
||||
cost_increase = 4
|
||||
cell_increase = 0
|
||||
capacity_increase = 0
|
||||
fire_sound = 'sound/weapons/lasercannonfire.ogg'
|
||||
projectile_type = /obj/item/projectile/beam/midlaser
|
||||
origin_tech = list(TECH_MATERIAL = 4,TECH_ENGINEERING = 4,TECH_MAGNET = 4,TECH_COMBAT = 5,TECH_ILLEGAL = 5)
|
||||
@@ -0,0 +1,136 @@
|
||||
/obj/item/custom_ka_upgrade/cells/attack_self(mob/user as mob)
|
||||
|
||||
if(is_pumping)
|
||||
return
|
||||
|
||||
if(pump_restore)
|
||||
is_pumping = TRUE
|
||||
if(stored_charge >= cell_increase)
|
||||
to_chat(user,"The pump on the [src] refuses to move.")
|
||||
else
|
||||
if(!pump_delay || do_after(user,pump_delay,use_user_turf = -1))
|
||||
if(isturf(src.loc))
|
||||
to_chat(user,"You pump \the [src].")
|
||||
else
|
||||
to_chat(user,"You pump \the [src.loc].")
|
||||
stored_charge = min(stored_charge + pump_restore,cell_increase)
|
||||
playsound(src,'sound/weapons/kenetic_reload.ogg', 50, 0)
|
||||
|
||||
is_pumping = FALSE
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
|
||||
/obj/item/custom_ka_upgrade/cells/cell01
|
||||
//Pump Action
|
||||
name = "pump action KA cell"
|
||||
build_name = "pump-action"
|
||||
desc = "A very basic power cell and pump action combo that stores a single charge. A pump is required after each shot, however it deals increased damage and has increased range."
|
||||
icon_state = "cell01"
|
||||
damage_increase = 5
|
||||
firedelay_increase = 0.25 SECONDS
|
||||
range_increase = 3
|
||||
recoil_increase = -1
|
||||
cost_increase = -100 //Always have a single charge
|
||||
cell_increase = 1
|
||||
capacity_increase = -1
|
||||
mod_limit_increase = 0
|
||||
|
||||
pump_restore = 1
|
||||
pump_delay = 0.4 SECONDS
|
||||
|
||||
origin_tech = list(TECH_MATERIAL = 2,TECH_ENGINEERING = 2,TECH_MAGNET = 2,TECH_POWER = 2)
|
||||
|
||||
/obj/item/custom_ka_upgrade/cells/cell02
|
||||
//Pump Action
|
||||
name = "pump recharging KA cell"
|
||||
build_name = "pump-recharging"
|
||||
desc = "A somewhat more advanced, standard issue pump and cell assembly that allows the user to 'pre-pump' their charges, up to a capacity of 12. Can fire quite quickly."
|
||||
icon_state = "cell02"
|
||||
firedelay_increase = 0
|
||||
recoil_increase = 1
|
||||
cell_increase = 12
|
||||
capacity_increase = -2
|
||||
mod_limit_increase = 0
|
||||
|
||||
pump_restore = 1
|
||||
pump_delay = 0.5 SECONDS
|
||||
|
||||
origin_tech = list(TECH_MATERIAL = 3,TECH_ENGINEERING = 3,TECH_MAGNET = 3,TECH_POWER = 3)
|
||||
|
||||
/obj/item/custom_ka_upgrade/cells/cell03
|
||||
name = "kinetic charging KA cell"
|
||||
build_name = "kinetic-reloading"
|
||||
desc = "A complex pump and cell assembly that uses the kinetic energy of an initial pump to significantly charge the cell. Deals increased damage at the cost of severely increased recoil and reduced firerate."
|
||||
icon_state = "cell03"
|
||||
damage_increase = 10
|
||||
firedelay_increase = 0.5 SECONDS
|
||||
recoil_increase = 4
|
||||
cost_increase = -1
|
||||
cell_increase = 40
|
||||
capacity_increase = -3
|
||||
mod_limit_increase = 0
|
||||
|
||||
pump_restore = 40
|
||||
pump_delay = 1 SECONDS
|
||||
|
||||
origin_tech = list(TECH_MATERIAL = 4,TECH_ENGINEERING = 4,TECH_MAGNET = 4,TECH_POWER = 4)
|
||||
|
||||
/obj/item/custom_ka_upgrade/cells/cell04
|
||||
name = "uranium charging KA cell"
|
||||
build_name = "recharging"
|
||||
desc = "A pumpless cell assembly that containes a miniaturized nuclear reactor housed safely inside the assembly. Recharges the cell shortly over time, however deals slightly reduced damage."
|
||||
icon_state = "cell04"
|
||||
damage_increase = -5
|
||||
recoil_increase = 0
|
||||
cost_increase = -2
|
||||
cell_increase = 60
|
||||
capacity_increase = -4
|
||||
mod_limit_increase = 0
|
||||
|
||||
pump_restore = 0
|
||||
pump_delay = 0
|
||||
|
||||
origin_tech = list(TECH_MATERIAL = 5,TECH_ENGINEERING = 5,TECH_MAGNET = 5,TECH_POWER = 5)
|
||||
|
||||
/obj/item/custom_ka_upgrade/cells/cell04/on_update(var/obj/item/weapon/gun/custom_ka/the_gun)
|
||||
stored_charge = min(stored_charge + 4,cell_increase)
|
||||
|
||||
/obj/item/custom_ka_upgrade/cells/cell05
|
||||
name = "recoil reloader KA cell"
|
||||
build_name = "recoil-reloading"
|
||||
desc = "A very experimental and well designed cell and pump assembly that converts some of the kinetic energy from the weapon's recoil into usable energy. Only works if the recoil is high enough. Contains a basic top-mounted pump just in case."
|
||||
icon_state = "cell05"
|
||||
firedelay_increase = 0.4 SECONDS
|
||||
damage_increase = 0
|
||||
recoil_increase = -5
|
||||
cost_increase = -3
|
||||
cell_increase = 80
|
||||
capacity_increase = -5
|
||||
mod_limit_increase = 0
|
||||
|
||||
pump_restore = 5
|
||||
pump_delay = 0.5 SECONDS
|
||||
|
||||
origin_tech = list(TECH_MATERIAL = 6,TECH_ENGINEERING = 6,TECH_MAGNET = 6,TECH_POWER = 6)
|
||||
|
||||
/obj/item/custom_ka_upgrade/cells/cell05/on_fire(var/obj/item/weapon/gun/custom_ka/the_gun)
|
||||
if(the_gun.recoil_increase > 0)
|
||||
stored_charge = min(stored_charge + min(the_gun.recoil_increase*2,the_gun.cost_increase*0.5),cell_increase)
|
||||
|
||||
/obj/item/custom_ka_upgrade/cells/illegal
|
||||
//Pump Action
|
||||
name = "pump action KA cell"
|
||||
build_name = "static"
|
||||
desc = "A clusterfuck of circuitry and battery parts all snuggly fit inside a solid, static plastisteel frame."
|
||||
icon_state = "cell_illegal"
|
||||
firedelay_increase = 0
|
||||
recoil_increase = 0
|
||||
cost_increase = 0
|
||||
stored_charge = 20
|
||||
cell_increase = 20
|
||||
capacity_increase = 0
|
||||
mod_limit_increase = 0
|
||||
|
||||
pump_restore = 20
|
||||
pump_delay = 0.5 SECONDS
|
||||
|
||||
origin_tech = list(TECH_MATERIAL = 3,TECH_ENGINEERING = 3,TECH_MAGNET = 3,TECH_POWER = 3, TECH_ILLEGAL = 4)
|
||||
@@ -0,0 +1,495 @@
|
||||
/obj/item/weapon/gun/custom_ka
|
||||
name = null // Abstract
|
||||
var/official_name
|
||||
var/custom_name
|
||||
desc = "A kinetic accelerator assembly."
|
||||
icon = 'icons/obj/kinetic_accelerators.dmi'
|
||||
icon_state = ""
|
||||
item_state = "kineticgun"
|
||||
contained_sprite = 1
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BELT|SLOT_HOLSTER
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 2000)
|
||||
w_class = 3
|
||||
origin_tech = list(TECH_MATERIAL = 2,TECH_ENGINEERING = 2)
|
||||
|
||||
burst = 1
|
||||
fire_delay = 0 //delay after shooting before the gun can be used again
|
||||
burst_delay = 2 //delay between shots, if firing in bursts
|
||||
move_delay = 1
|
||||
fire_sound = 'sound/weapons/Kenetic_accel.ogg'
|
||||
fire_sound_text = "blast"
|
||||
recoil = 0
|
||||
silenced = 0
|
||||
muzzle_flash = 3
|
||||
accuracy = 0 //accuracy is measured in tiles. +1 accuracy means that everything is effectively one tile closer for the purpose of miss chance, -1 means the opposite. launchers are not supported, at the moment.
|
||||
scoped_accuracy = null
|
||||
burst_accuracy = list(0) //allows for different accuracies for each shot in a burst. Applied on top of accuracy
|
||||
dispersion = list(0)
|
||||
reliability = 100
|
||||
|
||||
var/obj/item/projectile/projectile_type = /obj/item/projectile/kinetic
|
||||
|
||||
pin = /obj/item/device/firing_pin
|
||||
|
||||
sel_mode = 1 //index of the currently selected mode
|
||||
firemodes = list()
|
||||
|
||||
//wielding information
|
||||
fire_delay_wielded = 0
|
||||
recoil_wielded = 0
|
||||
accuracy_wielded = 0
|
||||
wielded = 0
|
||||
needspin = TRUE
|
||||
|
||||
var/build_name = ""
|
||||
|
||||
//Custom stuff
|
||||
var/obj/item/custom_ka_upgrade/cells/installed_cell
|
||||
var/obj/item/custom_ka_upgrade/barrels/installed_barrel
|
||||
var/obj/item/custom_ka_upgrade/upgrade_chips/installed_upgrade_chip
|
||||
|
||||
var/damage_increase = 0 //The amount of damage this weapon does, in total.
|
||||
var/firedelay_increase = 0 //How long it takes for the weapon to fire, in deciseconds.
|
||||
var/range_increase = 0
|
||||
var/recoil_increase = 0 //The amount of recoil this weapon has, in total.
|
||||
var/cost_increase = 0 //How much energy to take per shot, in total.
|
||||
var/cell_increase = 0 //The total increase in battery. This actually doesn't do anything and is just a display variable. Power is handled in their own parts.
|
||||
var/capacity_increase = 0 //How much/big this frame can hold a mod.
|
||||
var/mod_limit_increase = 0 //Maximum size of a mod this frame can take.
|
||||
var/aoe_increase = 0
|
||||
|
||||
var/current_highest_mod = 0
|
||||
|
||||
var/is_emagged = 0
|
||||
var/is_emped = 0
|
||||
|
||||
var/can_disassemble_cell = TRUE
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/examine(var/mob/user)
|
||||
. = ..()
|
||||
if(installed_upgrade_chip)
|
||||
to_chat(user,"It is equipped with \the [installed_barrel], \the [installed_cell], and \the [installed_upgrade_chip].")
|
||||
else if(installed_barrel)
|
||||
to_chat(user,"It is equipped with \the [installed_barrel] and \the [installed_cell]. It has space for an upgrade chip.")
|
||||
else if(installed_cell)
|
||||
to_chat(user,"It is equipped with \the [installed_cell]. The assembly lacks a barrel installation.")
|
||||
|
||||
if(installed_barrel)
|
||||
if(custom_name)
|
||||
to_chat(user,"[custom_name] is written crudely in pen across the side, covering up the offical designation.")
|
||||
else
|
||||
to_chat(user,"The offical designation \"[official_name]\" is etched neatly on the side.")
|
||||
|
||||
if(installed_cell)
|
||||
to_chat(user,"It has [round(installed_cell.stored_charge / cost_increase)] shots remaining.")
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/emag_act(var/remaining_charges, var/mob/user, var/emag_source)
|
||||
to_chat(user,"<span class='warning'>You override the safeties on the [src]...</span>")
|
||||
is_emagged = 1
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/emp_act(severity)
|
||||
is_emped = 1
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/Fire(atom/target, mob/living/user, clickparams, pointblank=0, reflex=0)
|
||||
|
||||
if(!fire_checks(target,user,clickparams,pointblank,reflex))
|
||||
return
|
||||
|
||||
//Custom fire checks
|
||||
var/warning_message
|
||||
var/disaster
|
||||
|
||||
if(is_emped && prob(10))
|
||||
var/list/warning_messages = list(
|
||||
"ERROR CODE: ERROR CODE",
|
||||
"ERROR CODE: PLEASE REPORT THIS",
|
||||
"ERROR CODE: OH GOD HELP",
|
||||
"ERROR CODE: 404 NOT FOUND",
|
||||
"ERROR CODE: KEYBOARD NOT FOUND, PRESS F11 TO CONTINUE",
|
||||
"ERROR CODE: CLICK OKAY TO CONTINUE",
|
||||
"ERROR CODE: AN ERROR HAS OCCURED TRYING TO DISPLAY AN ERROR CODE",
|
||||
"ERROR CODE: NO ERROR CODE FOUND",
|
||||
"ERROR CODE: LOADING.."
|
||||
)
|
||||
warning_message = pick(warning_messages)
|
||||
spark(src.loc, 3, alldirs)
|
||||
else if(!installed_cell || !installed_barrel)
|
||||
if(!is_emagged || (is_emped && prob(5)) )
|
||||
warning_message = "ERROR CODE: 0"
|
||||
else
|
||||
disaster = "spark"
|
||||
else if (damage_increase <= 0)
|
||||
if(!is_emagged || (is_emped && prob(5)) )
|
||||
warning_message = "ERROR CODE: 100"
|
||||
else
|
||||
disaster = "overheat"
|
||||
else if (range_increase < 2)
|
||||
if(!is_emagged || (is_emped && prob(5)) )
|
||||
warning_message = "ERROR CODE: 101"
|
||||
else
|
||||
disaster = "explode"
|
||||
else if (cost_increase > cell_increase)
|
||||
if(!is_emagged || (is_emped && prob(5)) )
|
||||
warning_message = "ERROR CODE: 102"
|
||||
else
|
||||
disaster = "overheat"
|
||||
else if (capacity_increase < 0)
|
||||
if(!is_emagged || (is_emped && prob(5)) )
|
||||
warning_message = "ERROR CODE: 201"
|
||||
else
|
||||
disaster = "overheat"
|
||||
else if (mod_limit_increase < current_highest_mod)
|
||||
if(is_emagged || (is_emped && prob(5)) )
|
||||
warning_message = "ERROR CODE: 202"
|
||||
else
|
||||
disaster = "overheat"
|
||||
|
||||
if(warning_message)
|
||||
to_chat(user,"<b>\The [src]</b> flashes, \"[warning_message].\"")
|
||||
playsound(src,'sound/machines/buzz-two.ogg', 50, 0)
|
||||
handle_click_empty(user)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN*4)
|
||||
return
|
||||
else
|
||||
switch(disaster)
|
||||
if("spark")
|
||||
to_chat(user,"<span class='danger'>\The [src] sparks!</span>")
|
||||
spark(src.loc, 3, alldirs)
|
||||
if("overheat")
|
||||
to_chat(user,"<span class='danger'>\The [src] turns red hot!</span>")
|
||||
user.IgniteMob()
|
||||
if("explode")
|
||||
to_chat(user,"<span class='danger'>\The [src] violently explodes!</span>")
|
||||
explosion(get_turf(src.loc), 0, 1, 2, 4)
|
||||
qdel(src)
|
||||
|
||||
//actually attempt to shoot
|
||||
var/turf/targloc = get_turf(target) //cache this in case target gets deleted during shooting, e.g. if it was a securitron that got destroyed.
|
||||
for(var/i in 1 to burst)
|
||||
var/obj/projectile = consume_next_projectile(user)
|
||||
if(!projectile)
|
||||
handle_click_empty(user)
|
||||
break
|
||||
|
||||
var/acc = burst_accuracy[min(i, burst_accuracy.len)]
|
||||
var/disp = dispersion[min(i, dispersion.len)]
|
||||
process_accuracy(projectile, user, target, acc, disp)
|
||||
|
||||
if(pointblank)
|
||||
process_point_blank(projectile, user, target)
|
||||
|
||||
if(process_projectile(projectile, user, target, user.zone_sel.selecting, clickparams))
|
||||
handle_post_fire(user, target, pointblank, reflex, i == burst)
|
||||
update_icon()
|
||||
|
||||
if(i < burst)
|
||||
sleep(burst_delay)
|
||||
|
||||
if(!(target && target.loc))
|
||||
target = targloc
|
||||
pointblank = 0
|
||||
|
||||
update_held_icon()
|
||||
//update timing
|
||||
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
|
||||
user.setMoveCooldown(move_delay)
|
||||
next_fire_time = world.time + fire_delay
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/consume_next_projectile()
|
||||
if(!installed_cell || installed_cell.stored_charge < cost_increase)
|
||||
return null
|
||||
|
||||
installed_cell.stored_charge -= cost_increase
|
||||
|
||||
var/obj/item/projectile/shot_projectile
|
||||
//Send fire events
|
||||
if(installed_cell)
|
||||
installed_cell.on_fire(src)
|
||||
if(installed_barrel)
|
||||
installed_barrel.on_fire(src)
|
||||
shot_projectile = new installed_barrel.projectile_type(src.loc)
|
||||
if(installed_upgrade_chip)
|
||||
installed_upgrade_chip.on_fire(src)
|
||||
|
||||
shot_projectile.damage = damage_increase
|
||||
shot_projectile.range = range_increase
|
||||
shot_projectile.aoe = aoe_increase
|
||||
return shot_projectile
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
if(installed_cell)
|
||||
installed_cell = new installed_cell(src)
|
||||
if(installed_barrel)
|
||||
installed_barrel = new installed_barrel(src)
|
||||
if(installed_upgrade_chip)
|
||||
installed_upgrade_chip = new installed_upgrade_chip(src)
|
||||
|
||||
update_stats()
|
||||
queue_icon_update()
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/Destroy()
|
||||
. = ..()
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/process()
|
||||
if(installed_cell)
|
||||
installed_cell.on_update(src)
|
||||
if(installed_barrel)
|
||||
installed_barrel.on_update(src)
|
||||
if(installed_upgrade_chip)
|
||||
installed_upgrade_chip.on_update(src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/update_icon()
|
||||
. = ..()
|
||||
cut_overlays()
|
||||
var/name_list = list("","","","")
|
||||
|
||||
name_list[3] = src.build_name
|
||||
|
||||
if(installed_upgrade_chip)
|
||||
add_overlay(installed_upgrade_chip.icon_state)
|
||||
name_list[4] = installed_upgrade_chip.build_name
|
||||
|
||||
if(installed_cell)
|
||||
add_overlay(installed_cell.icon_state)
|
||||
name_list[1] = installed_cell.build_name
|
||||
|
||||
if(installed_barrel)
|
||||
add_overlay(installed_barrel.icon_state)
|
||||
name_list[2] = installed_barrel.build_name
|
||||
|
||||
official_name = sanitize(jointext(name_list," "))
|
||||
|
||||
if(installed_barrel)
|
||||
if(custom_name)
|
||||
name = custom_name
|
||||
else
|
||||
name = official_name
|
||||
else
|
||||
name = initial(name)
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/proc/update_stats()
|
||||
//pls don't bully me for this code
|
||||
damage_increase = initial(damage_increase)
|
||||
firedelay_increase = initial(firedelay_increase)
|
||||
range_increase = initial(range_increase)
|
||||
recoil_increase = initial(recoil_increase)
|
||||
cost_increase = initial(cost_increase)
|
||||
cell_increase = initial(cell_increase)
|
||||
capacity_increase = initial(capacity_increase)
|
||||
mod_limit_increase = initial(mod_limit_increase)
|
||||
aoe_increase = initial(aoe_increase)
|
||||
|
||||
if(installed_cell)
|
||||
damage_increase += installed_cell.damage_increase
|
||||
firedelay_increase += installed_cell.firedelay_increase
|
||||
range_increase += installed_cell.range_increase
|
||||
recoil_increase += installed_cell.recoil_increase
|
||||
cost_increase += installed_cell.cost_increase
|
||||
cell_increase += installed_cell.cell_increase
|
||||
capacity_increase += installed_cell.capacity_increase
|
||||
mod_limit_increase += installed_cell.mod_limit_increase
|
||||
aoe_increase += installed_cell.aoe_increase
|
||||
current_highest_mod = max(-installed_cell.capacity_increase,current_highest_mod)
|
||||
|
||||
if(installed_barrel)
|
||||
fire_sound = installed_barrel.fire_sound
|
||||
damage_increase += installed_barrel.damage_increase
|
||||
firedelay_increase += installed_barrel.firedelay_increase
|
||||
range_increase += installed_barrel.range_increase
|
||||
recoil_increase += installed_barrel.recoil_increase
|
||||
cost_increase += installed_barrel.cost_increase
|
||||
cell_increase += installed_barrel.cell_increase
|
||||
capacity_increase += installed_barrel.capacity_increase
|
||||
mod_limit_increase += installed_barrel.mod_limit_increase
|
||||
aoe_increase += installed_barrel.aoe_increase
|
||||
current_highest_mod = max(-installed_barrel.capacity_increase,current_highest_mod)
|
||||
|
||||
if(installed_upgrade_chip)
|
||||
damage_increase += installed_upgrade_chip.damage_increase
|
||||
firedelay_increase += installed_upgrade_chip.firedelay_increase
|
||||
range_increase += installed_upgrade_chip.range_increase
|
||||
recoil_increase += installed_upgrade_chip.recoil_increase
|
||||
cost_increase += installed_upgrade_chip.cost_increase
|
||||
cell_increase += installed_upgrade_chip.cell_increase
|
||||
capacity_increase += installed_upgrade_chip.capacity_increase
|
||||
mod_limit_increase += installed_upgrade_chip.mod_limit_increase
|
||||
aoe_increase += installed_upgrade_chip.aoe_increase
|
||||
current_highest_mod = max(-installed_upgrade_chip.capacity_increase,current_highest_mod)
|
||||
|
||||
//Explot fixing
|
||||
cell_increase = max(cell_increase,0)
|
||||
cost_increase = max(cost_increase,1)
|
||||
recoil_increase = max(recoil_increase,1)
|
||||
firedelay_increase = max(firedelay_increase,0.125 SECONDS)
|
||||
|
||||
aoe_increase += round(damage_increase/30)
|
||||
aoe_increase = max(0,aoe_increase)
|
||||
|
||||
//Gun stats
|
||||
recoil = recoil_increase*0.25
|
||||
fire_delay = firedelay_increase
|
||||
accuracy = round(recoil_increase*0.25)
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/attack_self(mob/user as mob)
|
||||
. = ..()
|
||||
if(installed_cell)
|
||||
installed_cell.attack_self(user)
|
||||
if(installed_barrel)
|
||||
installed_barrel.attack_self(user)
|
||||
if(installed_upgrade_chip)
|
||||
installed_upgrade_chip.attack_self(user)
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/attackby(var/obj/item/I as obj, var/mob/user as mob)
|
||||
|
||||
. = ..()
|
||||
|
||||
if(istype(I,/obj/item/weapon/pen))
|
||||
custom_name = sanitize(input("Enter a custom name for your [name]", "Set Name") as text|null)
|
||||
to_chat(user,"You label \the [name] as \"[custom_name]\"")
|
||||
update_icon()
|
||||
else if(istype(I,/obj/item/weapon/wrench))
|
||||
if(installed_upgrade_chip)
|
||||
playsound(src,'sound/items/Screwdriver.ogg', 50, 0)
|
||||
to_chat(user,"You remove \the [installed_upgrade_chip].")
|
||||
installed_upgrade_chip.forceMove(user.loc)
|
||||
installed_upgrade_chip.update_icon()
|
||||
installed_upgrade_chip = null
|
||||
update_stats()
|
||||
update_icon()
|
||||
else if(installed_barrel)
|
||||
playsound(src,'sound/items/Ratchet.ogg', 50, 0)
|
||||
to_chat(user,"You remove \the [installed_barrel].")
|
||||
installed_barrel.forceMove(user.loc)
|
||||
installed_barrel.update_icon()
|
||||
installed_barrel = null
|
||||
update_stats()
|
||||
update_icon()
|
||||
else if(installed_cell && can_disassemble_cell)
|
||||
playsound(src,'sound/items/Ratchet.ogg', 50, 0)
|
||||
to_chat(user,"You remove \the [installed_cell].")
|
||||
installed_cell.forceMove(user.loc)
|
||||
installed_cell.update_icon()
|
||||
installed_cell = null
|
||||
update_stats()
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user,"There is nothing to remove from \the [src].")
|
||||
else if(istype(I,/obj/item/custom_ka_upgrade/cells))
|
||||
if(installed_cell)
|
||||
to_chat(user,"There is already \an [installed_cell] installed.")
|
||||
else
|
||||
var/obj/item/custom_ka_upgrade/cells/tempvar = I
|
||||
installed_cell = tempvar
|
||||
user.remove_from_mob(installed_cell)
|
||||
installed_cell.loc = src
|
||||
update_stats()
|
||||
update_icon()
|
||||
playsound(src,'sound/items/Wirecutter.ogg', 50, 0)
|
||||
else if(istype(I,/obj/item/custom_ka_upgrade/barrels))
|
||||
if(!installed_cell)
|
||||
to_chat(user,"You must install a power cell before installing \the [I].")
|
||||
else if(installed_barrel)
|
||||
to_chat(user,"There is already \an [installed_barrel] installed.")
|
||||
else
|
||||
var/obj/item/custom_ka_upgrade/barrels/tempvar = I
|
||||
installed_barrel = tempvar
|
||||
user.remove_from_mob(installed_barrel)
|
||||
installed_barrel.loc = src
|
||||
update_stats()
|
||||
update_icon()
|
||||
playsound(src,'sound/items/Wirecutter.ogg', 50, 0)
|
||||
else if(istype(I,/obj/item/custom_ka_upgrade/upgrade_chips))
|
||||
if(!installed_cell || !installed_barrel)
|
||||
to_chat(user,"A barrel and a cell need to be installed before you install \the [I].")
|
||||
else if(installed_upgrade_chip)
|
||||
to_chat(user,"There is already \an [installed_upgrade_chip] installed.")
|
||||
else
|
||||
var/obj/item/custom_ka_upgrade/upgrade_chips/tempvar = I
|
||||
installed_upgrade_chip = tempvar
|
||||
user.remove_from_mob(installed_upgrade_chip)
|
||||
installed_upgrade_chip.loc = src
|
||||
update_stats()
|
||||
update_icon()
|
||||
playsound(src,'sound/items/Wirecutter.ogg', 50, 0)
|
||||
|
||||
/obj/item/custom_ka_upgrade //base item
|
||||
name = null //abstract
|
||||
icon = 'icons/obj/kinetic_accelerators.dmi'
|
||||
icon_state = ""
|
||||
var/build_name = ""
|
||||
var/damage_increase = 0
|
||||
var/firedelay_increase = 0
|
||||
var/range_increase = 0
|
||||
var/recoil_increase = 0
|
||||
var/cost_increase = 0
|
||||
var/cell_increase = 0
|
||||
var/capacity_increase = 0
|
||||
var/mod_limit_increase = 0
|
||||
var/aoe_increase = 0
|
||||
|
||||
var/is_emagged = 0
|
||||
var/is_emped = 0
|
||||
|
||||
/obj/item/custom_ka_upgrade/proc/on_update(var/obj/item/weapon/gun/custom_ka)
|
||||
//Do update related things here
|
||||
return
|
||||
|
||||
/obj/item/custom_ka_upgrade/proc/on_fire(var/obj/item/weapon/gun/custom_ka)
|
||||
//Do fire related things here
|
||||
return
|
||||
|
||||
/obj/item/custom_ka_upgrade/cells
|
||||
name = null //Abstract
|
||||
icon = 'icons/obj/kinetic_accelerators.dmi'
|
||||
icon_state = ""
|
||||
damage_increase = 0
|
||||
firedelay_increase = 0
|
||||
range_increase = 0
|
||||
recoil_increase = 0
|
||||
cost_increase = 0
|
||||
cell_increase = 0
|
||||
capacity_increase = 0
|
||||
mod_limit_increase = 0
|
||||
var/stored_charge = 0
|
||||
var/pump_restore = 0
|
||||
var/pump_delay = 0
|
||||
var/is_pumping = FALSE //Prevents from pumping stupidly fast do to a do_after exploit
|
||||
origin_tech = list(TECH_MATERIAL = 2,TECH_ENGINEERING = 2,TECH_MAGNET = 2,TECH_POWER=2)
|
||||
|
||||
/obj/item/custom_ka_upgrade/barrels
|
||||
name = null //Abstract
|
||||
icon = 'icons/obj/kinetic_accelerators.dmi'
|
||||
icon_state = ""
|
||||
damage_increase = 0
|
||||
firedelay_increase = 0
|
||||
range_increase = 0
|
||||
recoil_increase = 0
|
||||
cost_increase = 0
|
||||
cell_increase = 0
|
||||
capacity_increase = 0
|
||||
mod_limit_increase = 0
|
||||
var/fire_sound = 'sound/weapons/Kenetic_accel.ogg'
|
||||
var/projectile_type = /obj/item/projectile/kinetic
|
||||
origin_tech = list(TECH_MATERIAL = 2,TECH_ENGINEERING = 2,TECH_MAGNET = 2)
|
||||
|
||||
/obj/item/custom_ka_upgrade/upgrade_chips
|
||||
name = null
|
||||
icon = 'icons/obj/kinetic_accelerators.dmi'
|
||||
damage_increase = 0
|
||||
firedelay_increase = 0
|
||||
range_increase = 0
|
||||
recoil_increase = 0
|
||||
cost_increase = 0
|
||||
cell_increase = 0
|
||||
capacity_increase = 0
|
||||
mod_limit_increase = 0
|
||||
|
||||
origin_tech = list(TECH_POWER = 4,TECH_MAGNET = 4, TECH_DATA = 4)
|
||||
@@ -0,0 +1,88 @@
|
||||
/obj/item/weapon/gun/custom_ka/frame01
|
||||
name = "compact kinetic accelerator frame"
|
||||
build_name = "compact"
|
||||
icon_state = "frame01"
|
||||
w_class = 3
|
||||
capacity_increase = 3
|
||||
mod_limit_increase = 2
|
||||
origin_tech = list(TECH_MATERIAL = 2,TECH_ENGINEERING = 2)
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/frame02
|
||||
name = "light kinetic accelerator frame"
|
||||
build_name = "light"
|
||||
icon_state = "frame02"
|
||||
w_class = 3
|
||||
recoil_increase = -1
|
||||
capacity_increase = 5
|
||||
mod_limit_increase = 3
|
||||
origin_tech = list(TECH_MATERIAL = 3,TECH_ENGINEERING = 3)
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/frame03
|
||||
name = "medium kinetic accelerator frame"
|
||||
build_name = "medium"
|
||||
icon_state = "frame03"
|
||||
w_class = 4
|
||||
recoil_increase = -2
|
||||
capacity_increase = 7
|
||||
mod_limit_increase = 4
|
||||
origin_tech = list(TECH_MATERIAL = 4,TECH_ENGINEERING = 4)
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/frame04
|
||||
name = "heavy kinetic accelerator frame"
|
||||
build_name = "heavy"
|
||||
icon_state = "frame04"
|
||||
w_class = 5
|
||||
recoil_increase = -5
|
||||
capacity_increase = 9
|
||||
mod_limit_increase = 5
|
||||
origin_tech = list(TECH_MATERIAL = 5,TECH_ENGINEERING = 5)
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/frame05
|
||||
name = "tactical kinetic accelerator frame"
|
||||
build_name = "tactical"
|
||||
icon_state = "frame05"
|
||||
w_class = 5
|
||||
recoil_increase = -6
|
||||
capacity_increase = 10
|
||||
mod_limit_increase = 5
|
||||
origin_tech = list(TECH_MATERIAL = 6,TECH_ENGINEERING = 6)
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/frame01/prebuilt
|
||||
installed_cell = /obj/item/custom_ka_upgrade/cells/cell01
|
||||
installed_barrel = /obj/item/custom_ka_upgrade/barrels/barrel01
|
||||
installed_upgrade_chip = /obj/item/custom_ka_upgrade/upgrade_chips/focusing
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/frame02/prebuilt
|
||||
installed_cell = /obj/item/custom_ka_upgrade/cells/cell02
|
||||
installed_barrel = /obj/item/custom_ka_upgrade/barrels/barrel02
|
||||
installed_upgrade_chip = /obj/item/custom_ka_upgrade/upgrade_chips/firerate
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/frame03/prebuilt
|
||||
installed_cell = /obj/item/custom_ka_upgrade/cells/cell03
|
||||
installed_barrel = /obj/item/custom_ka_upgrade/barrels/barrel03
|
||||
installed_upgrade_chip = /obj/item/custom_ka_upgrade/upgrade_chips/focusing
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/frame04/prebuilt
|
||||
installed_cell = /obj/item/custom_ka_upgrade/cells/cell04
|
||||
installed_barrel = /obj/item/custom_ka_upgrade/barrels/barrel04
|
||||
installed_upgrade_chip = /obj/item/custom_ka_upgrade/upgrade_chips/effeciency
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/frame04/illegal
|
||||
installed_cell = /obj/item/custom_ka_upgrade/cells/illegal
|
||||
installed_barrel = /obj/item/custom_ka_upgrade/barrels/illegal
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/frame05/prebuilt
|
||||
installed_cell = /obj/item/custom_ka_upgrade/cells/cell05
|
||||
installed_barrel = /obj/item/custom_ka_upgrade/barrels/barrel05
|
||||
installed_upgrade_chip = /obj/item/custom_ka_upgrade/upgrade_chips/damage
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/frame01/illegal
|
||||
installed_cell = /obj/item/custom_ka_upgrade/cells/illegal
|
||||
installed_barrel = /obj/item/custom_ka_upgrade/barrels/illegal
|
||||
installed_upgrade_chip = /obj/item/custom_ka_upgrade/upgrade_chips/illegal
|
||||
|
||||
/obj/item/weapon/gun/custom_ka/frame05/cyborg
|
||||
can_disassemble_cell = FALSE
|
||||
installed_cell = /obj/item/custom_ka_upgrade/cells/cell04
|
||||
installed_barrel = /obj/item/custom_ka_upgrade/barrels/barrel02
|
||||
@@ -0,0 +1,43 @@
|
||||
//Projectiles
|
||||
/obj/item/projectile/kinetic
|
||||
name = "kinetic force"
|
||||
icon_state = null
|
||||
damage = 0 //Base damage handled elsewhere.
|
||||
damage_type = BRUTE
|
||||
check_armour = "bomb"
|
||||
range = 5
|
||||
var/pressure_decrease = 0.25
|
||||
|
||||
/obj/item/projectile/kinetic/on_impact(var/atom/A,var/aoe_scale = 1, var/damage_scale = 1)
|
||||
|
||||
|
||||
var/turf/target_turf = get_turf(A)
|
||||
if(!target_turf)
|
||||
target_turf = get_turf(src)
|
||||
var/datum/gas_mixture/environment = target_turf.return_air()
|
||||
|
||||
damage *= max(1 - (environment.return_pressure()/100)*0.75,0)
|
||||
|
||||
if(isliving(A)) //Never do more than 15 damage to a living being per shot.
|
||||
damage = min(damage,15)
|
||||
|
||||
|
||||
strike_thing(A,aoe*aoe_scale,damage)
|
||||
|
||||
. = ..()
|
||||
|
||||
/obj/item/projectile/kinetic/proc/strike_thing(atom/target,var/new_aoe,var/damage_scale)
|
||||
|
||||
var/turf/target_turf = get_turf(target)
|
||||
if(istype(target_turf, /turf/simulated/mineral))
|
||||
var/turf/simulated/mineral/M = target_turf
|
||||
M.kinetic_hit(damage,dir)
|
||||
else if(istype(target_turf, /turf/simulated/floor/asteroid))
|
||||
var/turf/simulated/floor/asteroid/A = target_turf
|
||||
A.gets_dug()
|
||||
|
||||
new /obj/effect/overlay/temp/kinetic_blast(target_turf)
|
||||
|
||||
if(new_aoe > 0)
|
||||
for(var/new_target in orange(new_aoe, target_turf))
|
||||
src.on_impact(new_target,0,0.5)
|
||||
@@ -0,0 +1,64 @@
|
||||
/obj/item/custom_ka_upgrade/upgrade_chips/damage
|
||||
name = "upgrade chip - damage increase"
|
||||
desc = "Increases damage and recoil."
|
||||
icon_state = "upgrade_chip"
|
||||
damage_increase = 10
|
||||
recoil_increase = 3
|
||||
|
||||
/obj/item/custom_ka_upgrade/upgrade_chips/firerate
|
||||
name = "upgrade chip - firedelay increase"
|
||||
desc = "Increases the rate of fire, reduces damage."
|
||||
icon_state = "upgrade_chip"
|
||||
damage_increase = -5
|
||||
firedelay_increase = -0.5 SECONDS
|
||||
|
||||
/obj/item/custom_ka_upgrade/upgrade_chips/effeciency
|
||||
name = "upgrade chip - effeciency increase"
|
||||
desc = "Reduces the cost of shots by 1, reduces damage."
|
||||
icon_state = "upgrade_chip"
|
||||
damage_increase = -5
|
||||
cost_increase = -1
|
||||
|
||||
/obj/item/custom_ka_upgrade/upgrade_chips/recoil
|
||||
name = "upgrade chip - recoil reduction"
|
||||
desc = "Reduces recoil, increases accuracy, reduces rate of fire"
|
||||
icon_state = "upgrade_chip"
|
||||
recoil_increase = -5
|
||||
firedelay_increase = 0.25 SECONDS
|
||||
|
||||
/obj/item/custom_ka_upgrade/upgrade_chips/focusing
|
||||
name = "upgrade chip - focusing"
|
||||
desc = "Increases damage and accuracy, however reduces the range and explosion size, if any."
|
||||
icon_state = "upgrade_chip"
|
||||
damage_increase = 10
|
||||
recoil_increase = -4
|
||||
range_increase = -2
|
||||
aoe_increase = -100
|
||||
|
||||
/obj/item/custom_ka_upgrade/upgrade_chips/capacity
|
||||
name = "upgrade chip - capacity increase"
|
||||
desc = "Increases the maximum capacity of the assembly at the cost of more power drain per shot."
|
||||
icon_state = "upgrade_chip"
|
||||
cost_increase = 3
|
||||
capacity_increase = 5
|
||||
mod_limit_increase = 1
|
||||
|
||||
/obj/item/custom_ka_upgrade/upgrade_chips/explosive
|
||||
name = "upgrade chip - aoe explosion MKI"
|
||||
desc = "Kinetic blasts explode in an increased AoE radius at significantly increased power drain per shot."
|
||||
icon_state = "upgrade_chip"
|
||||
cost_increase = 5
|
||||
aoe_increase = 2
|
||||
|
||||
/obj/item/custom_ka_upgrade/upgrade_chips/illegal
|
||||
name = "illegal custom KA upgrade chip"
|
||||
desc = "Overrides safety settings for a custom kinetic accelerator. What's the worst that could happen?"
|
||||
icon_state = "upgrade_chip_illegal"
|
||||
damage_increase = 10
|
||||
firedelay_increase = -0.5 SECONDS
|
||||
recoil_increase = 4
|
||||
cost_increase = 1
|
||||
range_increase = 4
|
||||
capacity_increase = 100
|
||||
mod_limit_increase = 5
|
||||
origin_tech = list(TECH_POWER = 6,TECH_MAGNET = 6, TECH_DATA = 6, TECH_ILLEGAL = 4)
|
||||
@@ -63,8 +63,12 @@ var/list/worths = list(
|
||||
/obj/item/weapon/gun/energy/crossbow = 750,
|
||||
/obj/item/weapon/gun/energy/temperature = 3000,
|
||||
/obj/item/weapon/gun/energy/lawgiver = 7000,
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator = 2500,
|
||||
/obj/item/weapon/gun/energy/plasmacutter = 4000,
|
||||
/obj/item/weapon/gun/custom_ka/frame01/prebuilt = 2500,
|
||||
/obj/item/weapon/gun/custom_ka/frame02/prebuilt = 3500,
|
||||
/obj/item/weapon/gun/custom_ka/frame03/prebuilt = 4500,
|
||||
/obj/item/weapon/gun/custom_ka/frame04/prebuilt = 5500,
|
||||
/obj/item/weapon/gun/custom_ka/frame05/prebuilt = 6500,
|
||||
/obj/item/weapon/gun/energy/plasmacutter = 6000,
|
||||
/obj/item/weapon/gun/energy/stunrevolver = 650,
|
||||
/obj/item/weapon/gun/energy/tesla = 7000,
|
||||
/obj/item/weapon/gun/energy/gravity_gun = 4500,
|
||||
@@ -683,7 +687,6 @@ var/list/worths = list(
|
||||
/obj/item/rig_module/grenade_launcher = 1500,
|
||||
/obj/item/rig_module/mounted/energy_blade = 5000,
|
||||
/obj/item/rig_module/mounted/thermalldrill = 2500,
|
||||
/obj/item/rig_module/mounted/kinetic_accelerator = 1500,
|
||||
/obj/item/rig_module/mounted/plasmacutter = 2500,
|
||||
/obj/item/rig_module/mounted/ion = 2000,
|
||||
/obj/item/rig_module/mounted/xray = 3500,
|
||||
|
||||
@@ -95,7 +95,11 @@
|
||||
new/obj/item/weapon/pickaxe/gold(src)
|
||||
if(81 to 82)
|
||||
new/obj/item/weapon/gun/energy/plasmacutter(src)
|
||||
if(83 to 84)
|
||||
if(83)
|
||||
new/obj/random/custom_ka(src)
|
||||
new/obj/random/custom_ka(src)
|
||||
new/obj/random/custom_ka(src)
|
||||
if(84)
|
||||
new/obj/item/toy/katana(src)
|
||||
if(85)
|
||||
new/obj/item/seeds/random(src)
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
/obj/machinery/mineral/rigpress/attackby(obj/item/W, mob/user)
|
||||
if(!pressing)
|
||||
var/outcome_path
|
||||
var/list/kinetic_mods = list()
|
||||
var/kineticaccelerator
|
||||
|
||||
if(istype(W, /obj/item/clothing/glasses/material))
|
||||
outcome_path = /obj/item/rig_module/vision/meson
|
||||
|
||||
@@ -33,13 +32,6 @@
|
||||
if(istype(W, /obj/item/weapon/pickaxe/drill))
|
||||
outcome_path = /obj/item/rig_module/device/basicdrill
|
||||
|
||||
if(istype(W, /obj/item/weapon/gun/energy/kinetic_accelerator))
|
||||
outcome_path = /obj/item/rig_module/mounted/kinetic_accelerator
|
||||
var/obj/item/weapon/gun/energy/kinetic_accelerator/KA = W
|
||||
kineticaccelerator = 1
|
||||
for(var/obj/item/borg/upgrade/modkit/kmod in KA.modkits)
|
||||
kinetic_mods += kmod
|
||||
|
||||
if(istype(W, /obj/item/weapon/gun/energy/plasmacutter))
|
||||
outcome_path = /obj/item/rig_module/mounted/plasmacutter
|
||||
|
||||
@@ -61,13 +53,9 @@
|
||||
qdel(W)
|
||||
spawn(300)
|
||||
ping( "\The [src] pings, \"Module successfuly produced!\"" )
|
||||
if(kineticaccelerator)
|
||||
var/obj/item/rig_module/mounted/kinetic_accelerator/KA = new /obj/item/rig_module/mounted/kinetic_accelerator(src.loc)
|
||||
var/obj/item/weapon/gun/energy/kinetic_accelerator/cyborg/KGUN = KA.gun
|
||||
for(var/obj/item/borg/upgrade/modkit/kmod in kinetic_mods)
|
||||
KGUN.modkits += kmod
|
||||
else
|
||||
new outcome_path(src.loc)
|
||||
|
||||
new outcome_path(src.loc)
|
||||
|
||||
use_power(500)
|
||||
pressing = 0
|
||||
update_icon()
|
||||
|
||||
@@ -17,12 +17,11 @@ var/global/list/minevendor_list = list( //keep in order of price
|
||||
new /datum/data/mining_equipment("Lantern", /obj/item/device/flashlight/lantern, 10, 75),
|
||||
new /datum/data/mining_equipment("Shovel", /obj/item/weapon/shovel, 15, 100),
|
||||
new /datum/data/mining_equipment("Pickaxe", /obj/item/weapon/pickaxe, 10, 100),
|
||||
new /datum/data/mining_equipment("KA White Tracer Rounds", /obj/item/borg/upgrade/modkit/tracer, 40, 100),
|
||||
new /datum/data/mining_equipment("Compressed rail cartridge", /obj/item/weapon/rrf_ammo, 50, 100),
|
||||
new /datum/data/mining_equipment("Class E Kinetic Accelerator", /obj/item/weapon/gun/custom_ka/frame01/prebuilt, 12, 200),
|
||||
new /datum/data/mining_equipment("Ore Box", /obj/structure/ore_box, -1, 150, 1),
|
||||
new /datum/data/mining_equipment("Emergency Floodlight", /obj/item/weapon/floodlight_diy, -1, 150, 1),
|
||||
new /datum/data/mining_equipment("Premium Cigar", /obj/item/clothing/mask/smokable/cigarette/cigar/havana, 30, 150),
|
||||
new /datum/data/mining_equipment("KA Adjustable Tracer Rounds", /obj/item/borg/upgrade/modkit/tracer/adjustable, 30, 150),
|
||||
new /datum/data/mining_equipment("Seismic Charge", /obj/item/weapon/plastique/seismic, 25, 150),
|
||||
new /datum/data/mining_equipment("Lottery Chip", /obj/item/weapon/spacecash/ewallet/lotto, 50, 200),
|
||||
new /datum/data/mining_equipment("Ripley Paint Kit", /obj/item/device/kit/paint/ripley/random, 15, 200),
|
||||
@@ -30,6 +29,7 @@ var/global/list/minevendor_list = list( //keep in order of price
|
||||
new /datum/data/mining_equipment("Mining Drill", /obj/item/weapon/pickaxe/drill, 10, 200),
|
||||
new /datum/data/mining_equipment("Deep Ore Scanner", /obj/item/weapon/mining_scanner, 10, 250),
|
||||
new /datum/data/mining_equipment("Magboots", /obj/item/clothing/shoes/magboots, 10, 300),
|
||||
new /datum/data/mining_equipment("Class D Kinetic Accelerator", /obj/item/weapon/gun/custom_ka/frame02/prebuilt, 12, 400),
|
||||
new /datum/data/mining_equipment("Autochisel", /obj/item/weapon/autochisel, 10, 400),
|
||||
new /datum/data/mining_equipment("Jetpack", /obj/item/weapon/tank/jetpack, 10, 400),
|
||||
new /datum/data/mining_equipment("Drone Drill Upgrade", /obj/item/device/mine_bot_ugprade, 10, 400),
|
||||
@@ -45,20 +45,16 @@ var/global/list/minevendor_list = list( //keep in order of price
|
||||
new /datum/data/mining_equipment("Minecart", /obj/vehicle/train/cargo/trolley/mining, -1, 600, 1),
|
||||
new /datum/data/mining_equipment("Resonator", /obj/item/weapon/resonator, 10, 700),
|
||||
new /datum/data/mining_equipment("Mining RIG", /obj/item/weapon/rig/industrial, 5, 750),
|
||||
new /datum/data/mining_equipment("KA Range Increase", /obj/item/borg/upgrade/modkit/range, 10, 750),
|
||||
new /datum/data/mining_equipment("Jaunter", /obj/item/device/wormhole_jaunter, 20, 750),
|
||||
new /datum/data/mining_equipment("Kinetic Accelerator", /obj/item/weapon/gun/energy/kinetic_accelerator, 10, 750),
|
||||
new /datum/data/mining_equipment("100 credits", /obj/item/weapon/spacecash/c100, -1, 1000),
|
||||
new /datum/data/mining_equipment("Mass Driver", /obj/item/weapon/mass_driver_diy, 5, 800),
|
||||
new /datum/data/mining_equipment("Mining Drone", /mob/living/silicon/robot/drone/mining, 15, 800),
|
||||
new /datum/data/mining_equipment("Minecart Engine", /obj/vehicle/train/cargo/engine/mining, -1, 800, 1),
|
||||
new /datum/data/mining_equipment("Drone Kinetic Accelerator Upgrade", /obj/item/device/mine_bot_ugprade/ka, 10, 800),
|
||||
new /datum/data/mining_equipment("Drone KA Upgrade", /obj/item/device/mine_bot_ugprade/ka, 10, 800),
|
||||
new /datum/data/mining_equipment("Ore Summoner", /obj/item/weapon/oreportal, 35, 800),
|
||||
new /datum/data/mining_equipment("KA Cooldown Decrease", /obj/item/borg/upgrade/modkit/cooldown, 15, 1000),
|
||||
new /datum/data/mining_equipment("Lazarus Injector", /obj/item/weapon/lazarus_injector, 25, 1000),
|
||||
new /datum/data/mining_equipment("Industrial Drill Head", /obj/machinery/mining/drill, -1, 1000, 1),
|
||||
new /datum/data/mining_equipment("Super Resonator", /obj/item/weapon/resonator/upgraded, 10, 1250),
|
||||
new /datum/data/mining_equipment("KA AoE Damage", /obj/item/borg/upgrade/modkit/aoe/turfs, 15, 1500),
|
||||
new /datum/data/mining_equipment("Diamond Pickaxe", /obj/item/weapon/pickaxe/diamond, 10, 1500),
|
||||
new /datum/data/mining_equipment("Thermal Drill", /obj/item/weapon/gun/energy/vaurca/thermaldrill, 5, 3750)
|
||||
)
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
new /obj/item/weapon/ore_radar(src)
|
||||
new /obj/item/weapon/key/minecarts(src)
|
||||
new /obj/item/device/gps/mining(src)
|
||||
new /obj/item/weapon/book/manual/ka_custom(src)
|
||||
|
||||
/******************************Lantern*******************************/
|
||||
|
||||
|
||||
@@ -53,8 +53,21 @@ var/list/mineral_can_smooth_with = list(
|
||||
|
||||
var/obj/effect/mineral/my_mineral
|
||||
|
||||
var/rock_health = 20 //10 to 20, in initialize
|
||||
|
||||
has_resources = 1
|
||||
|
||||
/turf/simulated/mineral/proc/kinetic_hit(var/damage,var/direction)
|
||||
|
||||
rock_health -= damage
|
||||
|
||||
if(rock_health <= 0)
|
||||
var/turf/simulated/mineral/next_rock = get_step(src,direction)
|
||||
if(istype(next_rock))
|
||||
new /obj/effect/overlay/temp/kinetic_blast(next_rock)
|
||||
next_rock.kinetic_hit(-rock_health,direction)
|
||||
GetDrilled(1)
|
||||
|
||||
// Copypaste parent call for performance.
|
||||
/turf/simulated/mineral/Initialize(mapload)
|
||||
if (initialized)
|
||||
@@ -83,6 +96,8 @@ var/list/mineral_can_smooth_with = list(
|
||||
if (!mapload)
|
||||
queue_smooth_neighbors(src)
|
||||
|
||||
rock_health = rand(10,20)
|
||||
|
||||
return INITIALIZE_HINT_NORMAL
|
||||
|
||||
/turf/simulated/mineral/examine(mob/user)
|
||||
|
||||
@@ -183,15 +183,16 @@
|
||||
//Definitions of gripper subtypes
|
||||
*/
|
||||
|
||||
// VEEEEERY limited version for mining borgs. Basically only for swapping cells and upgrading the drills.
|
||||
// VEEEEERY limited version for mining borgs. Basically only for swapping cells, upgrading the drills, and upgrading custom KAs.
|
||||
/obj/item/weapon/gripper/miner
|
||||
name = "drill maintenance gripper"
|
||||
desc = "A simple grasping tool for the maintenance of heavy drilling machines."
|
||||
icon_state = "gripper-mining"
|
||||
|
||||
can_hold = list(
|
||||
/obj/item/weapon/cell,
|
||||
/obj/item/weapon/stock_parts
|
||||
/obj/item/weapon/cell,
|
||||
/obj/item/weapon/stock_parts,
|
||||
/obj/item/custom_ka_upgrade
|
||||
)
|
||||
|
||||
/obj/item/weapon/gripper/paperwork
|
||||
|
||||
@@ -712,6 +712,7 @@ var/global/list/robot_modules = list(
|
||||
src.modules += new /obj/item/weapon/pickaxe/borgdrill(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/sheetsnatcher/borg(src)
|
||||
src.modules += new /obj/item/weapon/gripper/miner(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src)
|
||||
src.modules += new /obj/item/weapon/mining_scanner(src)
|
||||
src.modules += new /obj/item/device/gps/mining(src) // for locating itself in the deep space
|
||||
src.emag = new /obj/item/weapon/gun/energy/plasmacutter/mounted(src)
|
||||
@@ -924,6 +925,7 @@ var/global/list/robot_modules = list(
|
||||
src.modules += new /obj/item/weapon/pickaxe/drill(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/sheetsnatcher/borg(src)
|
||||
src.modules += new /obj/item/weapon/gripper/miner(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src)
|
||||
src.modules += new /obj/item/weapon/mining_scanner(src)
|
||||
|
||||
src.emag = new /obj/item/weapon/gun/energy/plasmacutter/mounted(src)
|
||||
@@ -937,6 +939,7 @@ var/global/list/robot_modules = list(
|
||||
src.modules += new /obj/item/weapon/pickaxe/jackhammer(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/sheetsnatcher/borg(src)
|
||||
src.modules += new /obj/item/weapon/gripper/miner(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src)
|
||||
src.modules += new /obj/item/weapon/mining_scanner(src)
|
||||
|
||||
src.emag = new /obj/item/weapon/gun/energy/plasmacutter/mounted(src)
|
||||
@@ -947,9 +950,10 @@ var/global/list/robot_modules = list(
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/borg/sight/material(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/ore/drone(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/kinetic_accelerator/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/gun/custom_ka/frame05/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/sheetsnatcher/borg(src)
|
||||
src.modules += new /obj/item/weapon/gripper/miner(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src)
|
||||
src.modules += new /obj/item/weapon/mining_scanner(src)
|
||||
|
||||
src.emag = new /obj/item/weapon/gun/energy/plasmacutter/mounted(src)
|
||||
@@ -960,10 +964,11 @@ var/global/list/robot_modules = list(
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/borg/sight/material(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/ore/drone(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/kinetic_accelerator/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/gun/custom_ka/frame05/cyborg(src)
|
||||
src.modules += new /obj/item/weapon/pickaxe/jackhammer(src)
|
||||
src.modules += new /obj/item/weapon/storage/bag/sheetsnatcher/borg(src)
|
||||
src.modules += new /obj/item/weapon/gripper/miner(src)
|
||||
src.modules += new /obj/item/weapon/wrench(src)
|
||||
src.modules += new /obj/item/weapon/mining_scanner(src)
|
||||
|
||||
src.emag = new /obj/item/weapon/gun/energy/plasmacutter/mounted(src)
|
||||
|
||||
@@ -198,32 +198,39 @@
|
||||
else
|
||||
return ..() //Pistolwhippin'
|
||||
|
||||
/obj/item/weapon/gun/proc/Fire(atom/target, mob/living/user, clickparams, pointblank=0, reflex=0)
|
||||
if(!user || !target) return
|
||||
/obj/item/weapon/gun/proc/fire_checks(atom/target, mob/living/user, clickparams, pointblank=0, reflex=0)
|
||||
if(!user || !target)
|
||||
return 0
|
||||
|
||||
add_fingerprint(user)
|
||||
if(user.client && (user.client.prefs.toggles_secondary & SAFETY_CHECK) && user.a_intent != I_HURT) //Check this first to save time.
|
||||
user << "You refrain from firing, as you aren't on harm intent."
|
||||
return
|
||||
return 0
|
||||
|
||||
if(!special_check(user))
|
||||
return
|
||||
return 0
|
||||
|
||||
var/failure_chance = 100 - reliability
|
||||
if(failure_chance && prob(failure_chance))
|
||||
handle_reliability_fail(user)
|
||||
return
|
||||
return 0
|
||||
|
||||
if(world.time < next_fire_time)
|
||||
if (world.time % 3) //to prevent spam
|
||||
user << "<span class='warning'>[src] is not ready to fire again!</span>"
|
||||
return
|
||||
return 0
|
||||
|
||||
var/shoot_time = (burst - 1)* burst_delay
|
||||
user.setClickCooldown(shoot_time) //no clicking on things while shooting
|
||||
user.setMoveCooldown(shoot_time) //no moving while shooting either
|
||||
user.setClickCooldown(shoot_time)
|
||||
user.setMoveCooldown(shoot_time)
|
||||
next_fire_time = world.time + shoot_time
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/proc/Fire(atom/target, mob/living/user, clickparams, pointblank=0, reflex=0)
|
||||
if(!fire_checks(target,user,clickparams,pointblank,reflex))
|
||||
return
|
||||
|
||||
//actually attempt to shoot
|
||||
var/turf/targloc = get_turf(target) //cache this in case target gets deleted during shooting, e.g. if it was a securitron that got destroyed.
|
||||
for(var/i in 1 to burst)
|
||||
|
||||
@@ -1,286 +1,3 @@
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/cyborg
|
||||
name = "mounted proto-kinetic accelerator"
|
||||
self_recharge = 1
|
||||
use_external_power = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator
|
||||
name = "proto-kinetic accelerator"
|
||||
desc = "A reloadable, ranged mining tool that does increased damage in low pressure. Capable of holding up to six slots worth of mod kits."
|
||||
icon = 'icons/obj/mining_contained.dmi'
|
||||
icon_state = "kineticgun"
|
||||
item_state = "kineticgun"
|
||||
contained_sprite = 1
|
||||
charge_meter = 0
|
||||
fire_delay = 16
|
||||
slot_flags = SLOT_BELT|SLOT_BACK
|
||||
origin_tech = list(TECH_COMBAT = 2, TECH_MAGNET = 4, TECH_POWER = 4)
|
||||
projectile_type = /obj/item/projectile/kinetic
|
||||
fire_sound = 'sound/weapons/Kenetic_accel.ogg'
|
||||
var/max_mod_capacity = 100
|
||||
var/list/modkits = list()
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/attack_self(mob/living/user as mob)
|
||||
if(power_supply.charge < power_supply.maxcharge)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user << "<span class='notice'>You begin charging \the [src]...</span>"
|
||||
if(do_after(user,20))
|
||||
playsound(src.loc, 'sound/weapons/kenetic_reload.ogg', 60, 1)
|
||||
user.visible_message(
|
||||
"<span class='warning'>\The [user] pumps \the [src]!</span>",
|
||||
"<span class='warning'>You pump \the [src]!</span>"
|
||||
)
|
||||
power_supply.charge = power_supply.maxcharge
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/examine(mob/user)
|
||||
..()
|
||||
if(max_mod_capacity)
|
||||
user << "<b>[get_remaining_mod_capacity()]%</b> mod capacity remaining."
|
||||
for(var/A in get_modkits())
|
||||
var/obj/item/borg/upgrade/modkit/M = A
|
||||
user << "<span class='notice'>There is a [M.name] mod installed, using <b>[M.cost]%</b> capacity.</span>"
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/attackby(obj/item/A, mob/user)
|
||||
if(iscrowbar(A))
|
||||
if(modkits.len)
|
||||
user << "<span class='notice'>You pry the modifications out.</span>"
|
||||
playsound(loc, 100, 1)
|
||||
for(var/obj/item/borg/upgrade/modkit/M in modkits)
|
||||
M.uninstall(src)
|
||||
else
|
||||
user << "<span class='notice'>There are no modifications currently installed.</span>"
|
||||
else if(istype(A, /obj/item/borg/upgrade/modkit))
|
||||
var/obj/item/borg/upgrade/modkit/MK = A
|
||||
MK.install(src, user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/proc/get_remaining_mod_capacity()
|
||||
var/current_capacity_used = 0
|
||||
for(var/A in get_modkits())
|
||||
var/obj/item/borg/upgrade/modkit/M = A
|
||||
current_capacity_used += M.cost
|
||||
return max_mod_capacity - current_capacity_used
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/proc/get_modkits()
|
||||
. = list()
|
||||
for(var/A in modkits)
|
||||
. += A
|
||||
|
||||
//Projectiles
|
||||
/obj/item/projectile/kinetic
|
||||
name = "kinetic force"
|
||||
icon_state = null
|
||||
damage = 15
|
||||
damage_type = BRUTE
|
||||
check_armour = "bomb"
|
||||
range = 5
|
||||
|
||||
var/pressure_decrease = 0.25
|
||||
var/turf_aoe = FALSE
|
||||
var/mob_aoe = 0
|
||||
var/list/hit_overlays = list()
|
||||
|
||||
/obj/item/projectile/kinetic/launch_from_gun(atom/target, target_zone, mob/user, params, angle_override, forced_spread, obj/item/weapon/gun/launcher)
|
||||
if(istype(launcher, /obj/item/weapon/gun/energy/kinetic_accelerator))
|
||||
var/obj/item/weapon/gun/energy/kinetic_accelerator/KA = launcher
|
||||
for(var/A in KA.get_modkits())
|
||||
var/obj/item/borg/upgrade/modkit/M = A
|
||||
M.modify_projectile(src)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/kinetic/on_impact(var/atom/A)
|
||||
strike_thing(A)
|
||||
. = ..()
|
||||
|
||||
/obj/item/projectile/kinetic/proc/strike_thing(atom/target)
|
||||
var/turf/target_turf = get_turf(target)
|
||||
if(!target_turf)
|
||||
target_turf = get_turf(src)
|
||||
var/datum/gas_mixture/environment = target_turf.return_air()
|
||||
var/pressure = environment.return_pressure()
|
||||
if(pressure > 50)
|
||||
name = "weakened [name]"
|
||||
damage *= pressure_decrease
|
||||
if(istype(target_turf, /turf/simulated/mineral))
|
||||
var/turf/simulated/mineral/M = target_turf
|
||||
M.GetDrilled(1)
|
||||
var/obj/effect/overlay/temp/kinetic_blast/K = new /obj/effect/overlay/temp/kinetic_blast(target_turf)
|
||||
K.color = color
|
||||
for(var/type in hit_overlays)
|
||||
new type(target_turf)
|
||||
if(turf_aoe)
|
||||
for(var/T in orange(1, target_turf))
|
||||
if(istype(T, /turf/simulated/mineral))
|
||||
var/turf/simulated/mineral/M = T
|
||||
M.GetDrilled(1)
|
||||
if(mob_aoe)
|
||||
for(var/mob/living/L in range(1, target_turf) - firer - target)
|
||||
L.apply_damage(damage*mob_aoe, damage_type, def_zone, armor)
|
||||
L << "<span class='danger'>You're struck by a [name]!</span>"
|
||||
|
||||
|
||||
//Modkits
|
||||
/obj/item/borg/upgrade/modkit
|
||||
name = "modification kit"
|
||||
desc = "An upgrade for kinetic accelerators."
|
||||
icon = 'icons/obj/mining.dmi'
|
||||
icon_state = "modkit"
|
||||
origin_tech = "programming=2;materials=2;magnets=4"
|
||||
var/denied_type = null
|
||||
var/maximum_of_type = 1
|
||||
var/cost = 30
|
||||
var/modifier = 1 //For use in any mod kit that has numerical modifiers
|
||||
|
||||
/obj/item/borg/upgrade/modkit/examine(mob/user)
|
||||
..()
|
||||
user << "<span class='notice'>Occupies <b>[cost]%</b> of mod capacity.</span>"
|
||||
|
||||
/obj/item/borg/upgrade/modkit/attackby(obj/item/A, mob/user)
|
||||
if(istype(A, /obj/item/weapon/gun/energy/kinetic_accelerator) && !issilicon(user))
|
||||
install(A, user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/borg/upgrade/modkit/action(mob/living/silicon/robot/R)
|
||||
if(..())
|
||||
return
|
||||
|
||||
for(var/obj/item/weapon/gun/energy/kinetic_accelerator/cyborg/H in R.module.modules)
|
||||
return install(H, usr)
|
||||
|
||||
/obj/item/borg/upgrade/modkit/proc/install(obj/item/weapon/gun/energy/kinetic_accelerator/KA, mob/user)
|
||||
. = TRUE
|
||||
if(denied_type)
|
||||
var/number_of_denied = 0
|
||||
for(var/A in KA.get_modkits())
|
||||
var/obj/item/borg/upgrade/modkit/M = A
|
||||
if(istype(M, denied_type))
|
||||
number_of_denied++
|
||||
if(number_of_denied >= maximum_of_type)
|
||||
. = FALSE
|
||||
break
|
||||
if(KA.get_remaining_mod_capacity() >= cost)
|
||||
if(.)
|
||||
user << "<span class='notice'>You install the modkit.</span>"
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user.unEquip(src)
|
||||
forceMove(KA)
|
||||
KA.modkits += src
|
||||
else
|
||||
user << "<span class='notice'>The modkit you're trying to install would conflict with an already installed modkit. Use a crowbar to remove existing modkits.</span>"
|
||||
else
|
||||
user << "<span class='notice'>You don't have room(<b>[KA.get_remaining_mod_capacity()]%</b> remaining, [cost]% needed) to install this modkit. Use a crowbar to remove existing modkits.</span>"
|
||||
. = FALSE
|
||||
|
||||
|
||||
|
||||
/obj/item/borg/upgrade/modkit/proc/uninstall(obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
forceMove(get_turf(KA))
|
||||
KA.modkits -= src
|
||||
|
||||
/obj/item/borg/upgrade/modkit/proc/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
|
||||
|
||||
//Range
|
||||
/obj/item/borg/upgrade/modkit/range
|
||||
name = "range increase"
|
||||
desc = "Increases the range of a kinetic accelerator when installed."
|
||||
modifier = 20
|
||||
cost = 24 //so you can fit four plus a tracer cosmetic
|
||||
|
||||
/obj/item/borg/upgrade/modkit/range/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
K.range += modifier
|
||||
|
||||
|
||||
//Damage
|
||||
/obj/item/borg/upgrade/modkit/damage
|
||||
name = "damage increase"
|
||||
desc = "Increases the damage of kinetic accelerator when installed."
|
||||
modifier = 10
|
||||
|
||||
/obj/item/borg/upgrade/modkit/damage/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
K.damage += modifier
|
||||
|
||||
|
||||
//Cooldown
|
||||
/obj/item/borg/upgrade/modkit/cooldown
|
||||
name = "cooldown decrease"
|
||||
desc = "Decreases the cooldown of a kinetic accelerator and increases the recharge rate."
|
||||
modifier = 2
|
||||
|
||||
/obj/item/borg/upgrade/modkit/cooldown/install(obj/item/weapon/gun/energy/kinetic_accelerator/KA, mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
KA.fire_delay -= modifier
|
||||
KA.recharge_time -= modifier
|
||||
|
||||
/obj/item/borg/upgrade/modkit/cooldown/uninstall(obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
KA.fire_delay += modifier
|
||||
KA.recharge_time += modifier
|
||||
..()
|
||||
|
||||
|
||||
//AoE blasts
|
||||
/obj/item/borg/upgrade/modkit/aoe
|
||||
modifier = 0
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
K.name = "kinetic explosion"
|
||||
if(!K.turf_aoe && !K.mob_aoe)
|
||||
K.hit_overlays += /obj/effect/overlay/temp/explosion/fast
|
||||
K.mob_aoe += modifier
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/turfs
|
||||
name = "mining explosion"
|
||||
desc = "Causes the kinetic accelerator to destroy rock in an AoE."
|
||||
denied_type = /obj/item/borg/upgrade/modkit/aoe/turfs
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/turfs/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
..()
|
||||
K.turf_aoe = TRUE
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/turfs/andmobs
|
||||
name = "offensive mining explosion"
|
||||
desc = "Causes the kinetic accelerator to destroy rock and damage mobs in an AoE."
|
||||
maximum_of_type = 3
|
||||
modifier = 0.25
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/mobs
|
||||
name = "offensive explosion"
|
||||
desc = "Causes the kinetic accelerator to damage mobs in an AoE."
|
||||
modifier = 0.2
|
||||
|
||||
|
||||
//Indoors
|
||||
/obj/item/borg/upgrade/modkit/indoors
|
||||
name = "decrease pressure penalty"
|
||||
desc = "Increases the damage a kinetic accelerator does in a high pressure environment."
|
||||
modifier = 2
|
||||
denied_type = /obj/item/borg/upgrade/modkit/indoors
|
||||
maximum_of_type = 2
|
||||
cost = 40
|
||||
|
||||
/obj/item/borg/upgrade/modkit/indoors/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
K.pressure_decrease *= modifier
|
||||
|
||||
/obj/item/borg/upgrade/modkit/tracer
|
||||
name = "white tracer bolts"
|
||||
desc = "Causes kinetic accelerator bolts to have a white tracer trail and explosion."
|
||||
cost = 4
|
||||
denied_type = /obj/item/borg/upgrade/modkit/tracer
|
||||
var/bolt_color = "#FFFFFF"
|
||||
|
||||
/obj/item/borg/upgrade/modkit/tracer/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
K.icon_state = "ka_tracer"
|
||||
K.color = bolt_color
|
||||
|
||||
/obj/item/borg/upgrade/modkit/tracer/adjustable
|
||||
name = "adjustable tracer bolts"
|
||||
desc = "Causes kinetic accelerator bolts to have a adjustably-colored tracer trail and explosion. Use in-hand to change color."
|
||||
|
||||
/obj/item/borg/upgrade/modkit/tracer/adjustable/attack_self(mob/user)
|
||||
bolt_color = input(user,"Choose Color") as color
|
||||
|
||||
/*******************PLASMA CUTTER*******************/
|
||||
|
||||
/obj/item/weapon/gun/energy/plasmacutter/mounted
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
var/datum/point/vector/trajectory
|
||||
var/trajectory_ignore_forcemove = FALSE //instructs forceMove to NOT reset our trajectory to the new location!
|
||||
var/range = 50 //This will de-increment every step. When 0, it will deletze the projectile.
|
||||
var/aoe = 0 //For KAs, really
|
||||
|
||||
//Hitscan
|
||||
var/hitscan = FALSE //Whether this is hitscan. If it is, speed is basically ignored.
|
||||
|
||||
@@ -437,4 +437,162 @@
|
||||
req_tech = list(TECH_COMBAT = 2, TECH_MATERIAL = 3, TECH_POWER = 3)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 750, "glass" = 500, "phoron" = 1000)
|
||||
build_path = /obj/item/laser_components/modulator
|
||||
sort_string = "TZZEN"
|
||||
sort_string = "TZZEN"
|
||||
|
||||
//Frames
|
||||
/datum/design/item/weapon/ka_frame01
|
||||
id = "ka_frame01"
|
||||
req_tech = list(TECH_MATERIAL = 2,TECH_ENGINEERING = 2)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 3000)
|
||||
build_path = /obj/item/weapon/gun/custom_ka/frame01
|
||||
sort_string = "TZZFA"
|
||||
|
||||
/datum/design/item/weapon/ka_frame02
|
||||
id = "ka_frame02"
|
||||
req_tech = list(TECH_MATERIAL = 3,TECH_ENGINEERING = 3)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 4000, "silver" = 1000)
|
||||
build_path = /obj/item/weapon/gun/custom_ka/frame02
|
||||
sort_string = "TZZFB"
|
||||
|
||||
/datum/design/item/weapon/ka_frame03
|
||||
id = "ka_frame03"
|
||||
req_tech = list(TECH_MATERIAL = 4,TECH_ENGINEERING = 4)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 5000, "silver" = 2000)
|
||||
build_path = /obj/item/weapon/gun/custom_ka/frame03
|
||||
sort_string = "TZZFC"
|
||||
|
||||
/datum/design/item/weapon/ka_frame04
|
||||
id = "ka_frame04"
|
||||
req_tech = list(TECH_MATERIAL = 5,TECH_ENGINEERING = 5)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 5000, "silver" = 2000, "diamond" = 1000)
|
||||
build_path = /obj/item/weapon/gun/custom_ka/frame04
|
||||
sort_string = "TZZFD"
|
||||
|
||||
/datum/design/item/weapon/ka_frame05
|
||||
id = "ka_frame05"
|
||||
req_tech = list(TECH_MATERIAL = 6,TECH_ENGINEERING = 6)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 6000, "silver" = 4000, "diamond" = 2000)
|
||||
build_path = /obj/item/weapon/gun/custom_ka/frame05
|
||||
sort_string = "TZZFE"
|
||||
|
||||
//Cells
|
||||
/datum/design/item/weapon/ka_cell01
|
||||
id = "ka_cell01"
|
||||
req_tech = list(TECH_MATERIAL = 2,TECH_ENGINEERING = 2,TECH_MAGNET = 2,TECH_POWER = 2)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 1000)
|
||||
build_path = /obj/item/custom_ka_upgrade/cells/cell01
|
||||
sort_string = "TZZGA"
|
||||
|
||||
/datum/design/item/weapon/ka_cell02
|
||||
id = "ka_cell02"
|
||||
req_tech = list(TECH_MATERIAL = 3,TECH_ENGINEERING = 3,TECH_MAGNET = 3,TECH_POWER = 3)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 2000, "glass" = 1000, "silver" = 1000, "gold" = 1000)
|
||||
build_path = /obj/item/custom_ka_upgrade/cells/cell02
|
||||
sort_string = "TZZGB"
|
||||
|
||||
/datum/design/item/weapon/ka_cell03
|
||||
id = "ka_cell03"
|
||||
req_tech = list(TECH_MATERIAL = 4,TECH_ENGINEERING = 4,TECH_MAGNET = 4,TECH_POWER = 4)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 3000, "glass" = 3000, "silver" = 3000, "gold" = 1000)
|
||||
build_path = /obj/item/custom_ka_upgrade/cells/cell03
|
||||
sort_string = "TZZGC"
|
||||
|
||||
/datum/design/item/weapon/ka_cell04
|
||||
id = "ka_cell04"
|
||||
req_tech = list(TECH_MATERIAL = 5,TECH_ENGINEERING = 5,TECH_MAGNET = 5,TECH_POWER = 5)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 4000, "glass" = 3000, "silver" = 3000, "gold" = 1000, "uranium" = 5000)
|
||||
build_path = /obj/item/custom_ka_upgrade/cells/cell04
|
||||
sort_string = "TZZGD"
|
||||
|
||||
/datum/design/item/weapon/ka_cell05
|
||||
id = "ka_cell05"
|
||||
req_tech = list(TECH_MATERIAL = 6,TECH_ENGINEERING = 6,TECH_MAGNET = 6,TECH_POWER = 6)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 5000, "glass" = 3000, "silver" = 3000, "gold" = 1000, "phoron" = 5000)
|
||||
build_path = /obj/item/custom_ka_upgrade/cells/cell05
|
||||
sort_string = "TZZGE"
|
||||
|
||||
//Barrels
|
||||
/datum/design/item/weapon/ka_barrel01
|
||||
id = "ka_barrel01"
|
||||
req_tech = list(TECH_MATERIAL = 2,TECH_ENGINEERING = 2,TECH_MAGNET = 2)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 2000, "glass" = 2000, "gold" = 1000, "phoron" = 500)
|
||||
build_path = /obj/item/custom_ka_upgrade/barrels/barrel01
|
||||
sort_string = "TZZHA"
|
||||
|
||||
/datum/design/item/weapon/ka_barrel02
|
||||
id = "ka_barrel02"
|
||||
req_tech = list(TECH_MATERIAL = 3,TECH_ENGINEERING = 3,TECH_MAGNET = 3)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 3000, "glass" = 2000, "gold" = 1000, "phoron" = 500)
|
||||
build_path = /obj/item/custom_ka_upgrade/barrels/barrel02
|
||||
sort_string = "TZZHB"
|
||||
|
||||
/datum/design/item/weapon/ka_barrel03
|
||||
id = "ka_barrel03"
|
||||
req_tech = list(TECH_MATERIAL = 4,TECH_ENGINEERING = 4,TECH_MAGNET = 4)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 4000, "glass" = 2000, "gold" = 2000, "phoron" = 1000)
|
||||
build_path = /obj/item/custom_ka_upgrade/barrels/barrel03
|
||||
sort_string = "TZZHC"
|
||||
|
||||
/datum/design/item/weapon/ka_barrel04
|
||||
id = "ka_barrel04"
|
||||
req_tech = list(TECH_MATERIAL = 5,TECH_ENGINEERING = 5,TECH_MAGNET = 5)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 5000, "glass" = 3000, "gold" = 3000, "phoron" = 3000, "diamond" = 1000)
|
||||
build_path = /obj/item/custom_ka_upgrade/barrels/barrel04
|
||||
sort_string = "TZZHD"
|
||||
|
||||
/datum/design/item/weapon/ka_barrel05
|
||||
id = "ka_barrel05"
|
||||
req_tech = list(TECH_MATERIAL = 6,TECH_ENGINEERING = 6,TECH_MAGNET = 6)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 6000, "glass" = 4000, "gold" = 4000, "phoron" = 4000, "diamond" = 2000)
|
||||
build_path = /obj/item/custom_ka_upgrade/barrels/barrel05
|
||||
sort_string = "TZZHE"
|
||||
|
||||
//Upgrades
|
||||
/datum/design/item/weapon/ka_upgrade01
|
||||
id = "ka_upgrade01"
|
||||
req_tech = list(TECH_POWER = 4,TECH_MAGNET = 4, TECH_DATA = 4)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 2000, "gold" = 1000, "diamond" = 1000)
|
||||
build_path = /obj/item/custom_ka_upgrade/upgrade_chips/damage
|
||||
sort_string = "TZZIA"
|
||||
|
||||
/datum/design/item/weapon/ka_upgrade02
|
||||
id = "ka_upgrade02"
|
||||
req_tech = list(TECH_POWER = 4,TECH_MAGNET = 4, TECH_DATA = 4)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 2000, "gold" = 1000, "diamond" = 1000)
|
||||
build_path = /obj/item/custom_ka_upgrade/upgrade_chips/firerate
|
||||
sort_string = "TZZIB"
|
||||
|
||||
/datum/design/item/weapon/ka_upgrade03
|
||||
id = "ka_upgrade03"
|
||||
req_tech = list(TECH_POWER = 4,TECH_MAGNET = 4, TECH_DATA = 4)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 2000, "gold" = 1000, "diamond" = 1000)
|
||||
build_path = /obj/item/custom_ka_upgrade/upgrade_chips/effeciency
|
||||
sort_string = "TZZIC"
|
||||
|
||||
/datum/design/item/weapon/ka_upgrade04
|
||||
id = "ka_upgrade04"
|
||||
req_tech = list(TECH_POWER = 4,TECH_MAGNET = 4, TECH_DATA = 4)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 2000, "gold" = 1000, "diamond" = 1000)
|
||||
build_path = /obj/item/custom_ka_upgrade/upgrade_chips/recoil
|
||||
sort_string = "TZZID"
|
||||
|
||||
/datum/design/item/weapon/ka_upgrade05
|
||||
id = "ka_upgrade05"
|
||||
req_tech = list(TECH_POWER = 4,TECH_MAGNET = 4, TECH_DATA = 4)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 2000, "gold" = 1000, "diamond" = 1000)
|
||||
build_path = /obj/item/custom_ka_upgrade/upgrade_chips/focusing
|
||||
sort_string = "TZZIE"
|
||||
|
||||
/datum/design/item/weapon/ka_upgrade06
|
||||
id = "ka_upgrade06"
|
||||
req_tech = list(TECH_POWER = 4,TECH_MAGNET = 4, TECH_DATA = 4)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 2000, "gold" = 1000, "diamond" = 1000)
|
||||
build_path = /obj/item/custom_ka_upgrade/upgrade_chips/capacity
|
||||
sort_string = "TZZIF"
|
||||
|
||||
/datum/design/item/weapon/ka_upgrade07
|
||||
id = "ka_upgrade07"
|
||||
req_tech = list(TECH_POWER = 4,TECH_MAGNET = 4, TECH_DATA = 4)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1000, "glass" = 2000, "gold" = 1000, "diamond" = 1000)
|
||||
build_path = /obj/item/custom_ka_upgrade/upgrade_chips/explosive
|
||||
sort_string = "TZZIF"
|
||||
Reference in New Issue
Block a user