Event / Future PoI / Other weaponry & tools.

This commit is contained in:
Mechoid
2018-12-15 20:11:10 -08:00
committed by Novacat
parent 4839b4bfa7
commit c8006a6e84
15 changed files with 665 additions and 7 deletions

View File

@@ -8,6 +8,7 @@
var/obj/item/weapon/cell/power_supply //What type of power cell this uses
var/charge_cost = 240 //How much energy is needed to fire.
var/accept_cell_type = /obj/item/weapon/cell/device
var/cell_type = /obj/item/weapon/cell/device/weapon
projectile_type = /obj/item/projectile/beam/practice
@@ -89,13 +90,13 @@
if(self_recharge || battery_lock)
user << "<span class='notice'>[src] does not have a battery port.</span>"
return
if(istype(C, /obj/item/weapon/cell/device))
var/obj/item/weapon/cell/device/P = C
if(istype(C, accept_cell_type))
var/obj/item/weapon/cell/P = C
if(power_supply)
user << "<span class='notice'>[src] already has a power cell.</span>"
else
user.visible_message("[user] is reloading [src].", "<span class='notice'>You start to insert [P] into [src].</span>")
if(do_after(user, 10))
if(do_after(user, 5 * P.w_class))
user.remove_from_mob(P)
power_supply = P
P.loc = src
@@ -175,6 +176,13 @@
icon_state = "[modifystate][ratio]"
else
icon_state = "[initial(icon_state)][ratio]"
else if(power_supply)
if(modifystate)
icon_state = "[modifystate]"
else
icon_state = "[initial(icon_state)]"
if(!ignore_inhands) update_held_icon()
/obj/item/weapon/gun/energy/proc/start_recharge()

View File

@@ -0,0 +1,40 @@
/*
* Contains weapons primarily using the 'grappling hook' projectiles.
*/
/obj/item/weapon/gun/energy/hooklauncher
name = "gravity whip"
desc = "A large, strange gauntlet."
icon_state = "gravwhip"
item_state = "gravwhip"
fire_sound = 'sound/effects/zzzt.ogg'
fire_sound_text = "laser blast"
fire_delay = 15
charge_cost = 300
cell_type = /obj/item/weapon/cell/device/weapon
projectile_type = /obj/item/projectile/energy/hook
// An easily concealable not-ripoff version. It would be silenced, if it didn't make it blatant you're the one using it.
/obj/item/weapon/gun/energy/hooklauncher/ring
name = "ominous ring"
desc = "A small ring with strange symbols engraved upon it."
icon = 'icons/obj/clothing/rings.dmi'
icon_state = "seal-signet"
item_state = "concealed"
w_class = ITEMSIZE_TINY
cell_type = /obj/item/weapon/cell/device/weapon/recharge/alien
battery_lock = TRUE
charge_cost = 400
charge_meter = FALSE
projectile_type = /obj/item/projectile/energy/hook/ring
firemodes = list(
list(mode_name="manipulate", fire_delay=15, projectile_type=/obj/item/projectile/energy/hook/ring, charge_cost = 400),
list(mode_name="battle", fire_delay=8, projectile_type=/obj/item/projectile/beam/xray, charge_cost = 260),
)

View File

@@ -151,6 +151,42 @@
toggle_scope(2.0)
/obj/item/weapon/gun/energy/monorifle
name = "antique mono-rifle"
desc = "An old laser rifle. This one can only fire once before requiring recharging."
description_fluff = "Modeled after ancient hunting rifles, this rifle was dubbed the 'Rainy Day Special' by some, due to its use as some barmens' fight-stopper of choice. One shot is all it takes, or so they say."
icon_state = "eshotgun"
item_state = "shotgun"
fire_sound = 'sound/weapons/gauss_shoot.ogg'
origin_tech = list(TECH_COMBAT = 6, TECH_MATERIAL = 4, TECH_POWER = 3)
projectile_type = /obj/item/projectile/beam/sniper
slot_flags = SLOT_BACK
charge_cost = 1300
fire_delay = 20
force = 8
w_class = ITEMSIZE_LARGE
accuracy = 10
scoped_accuracy = 15
var/scope_multiplier = 1.5
/obj/item/weapon/gun/energy/monorifle/verb/sights()
set category = "Object"
set name = "Aim Down Sights"
set popup_menu = 1
toggle_scope(scope_multiplier)
/obj/item/weapon/gun/energy/monorifle/combat
name = "combat mono-rifle"
desc = "A modernized version of the mono-rifle. This one can fire twice before requiring recharging."
description_fluff = "A modern design produced by a company once working from Saint Columbia, based on the antique mono-rifle 'Rainy Day Special' design."
icon_state = "ecshotgun"
item_state = "cshotgun"
charge_cost = 1000
force = 12
accuracy = 0
scoped_accuracy = 20
////////Laser Tag////////////////////
/obj/item/weapon/gun/energy/lasertag

View File

@@ -186,6 +186,7 @@ obj/item/weapon/gun/energy/staff/focus
desc = "A massive weapon designed to pressure the opposition by raining down a torrent of energy pellets."
icon_state = "dakkalaser"
item_state = "dakkalaser"
wielded_item_state = "dakkalaser-wielded"
fire_sound = 'sound/weapons/Laser.ogg'
w_class = ITEMSIZE_HUGE
charge_cost = 24 // 100 shots, it's a spray and pray (to RNGesus) weapon.
@@ -200,4 +201,94 @@ obj/item/weapon/gun/energy/staff/focus
list(mode_name="single shot", burst = 1, burst_accuracy = list(75), dispersion = list(0), charge_cost = 24),
list(mode_name="five shot burst", burst = 5, burst_accuracy = list(75,75,75,75,75), dispersion = list(1,1,1,1,1)),
list(mode_name="ten shot burst", burst = 10, burst_accuracy = list(75,75,75,75,75,75,75,75,75,75), dispersion = list(2,2,2,2,2,2,2,2,2,2)),
)
)
/obj/item/weapon/gun/energy/maghowitzer
name = "portable MHD howitzer"
desc = "A massive weapon designed to destroy fortifications with a stream of molten tungsten."
description_fluff = "A weapon designed by joint cooperation of NanoTrasen, Hephaestus, and SCG scientists. Everything else is red tape and black highlighters."
description_info = "This weapon requires a wind-up period before being able to fire. Clicking on a target will create a beam between you and its turf, starting the timer. Upon completion, it will fire at the designated location."
icon_state = "mhdhowitzer"
item_state = "mhdhowitzer"
wielded_item_state = "mhdhowitzer-wielded"
fire_sound = 'sound/weapons/emitter2.ogg'
w_class = ITEMSIZE_HUGE
charge_cost = 10000 // Uses large cells, can at max have 3 shots.
projectile_type = /obj/item/projectile/beam/tungsten
cell_type = /obj/item/weapon/cell/high
accept_cell_type = /obj/item/weapon/cell
accuracy = 75
charge_meter = 0
one_handed_penalty = 30
var/power_cycle = FALSE
/obj/item/weapon/gun/energy/maghowitzer/proc/pick_random_target(var/turf/T)
var/foundmob = FALSE
var/foundmobs = list()
for(var/mob/living/L in T.contents)
foundmob = TRUE
foundmobs += L
if(foundmob)
var/return_target = pick(foundmobs)
return return_target
return FALSE
/obj/item/weapon/gun/energy/maghowitzer/attack(atom/A, mob/living/user, def_zone)
if(power_cycle)
to_chat(user, "<span class='notice'>\The [src] is already powering up!</span>")
return 0
var/turf/target_turf = get_turf(A)
var/beameffect = user.Beam(target_turf,icon_state="sat_beam",icon='icons/effects/beam.dmi',time=31, maxdistance=10,beam_type=/obj/effect/ebeam,beam_sleep_time=3)
if(beameffect)
user.visible_message("<span class='cult'>[user] aims \the [src] at \the [A].</span>")
if(power_supply && power_supply.charge >= charge_cost) //Do a delay for pointblanking too.
power_cycle = TRUE
if(do_after(user, 30))
if(A.loc == target_turf)
..(A, user, def_zone)
else
var/rand_target = pick_random_target(target_turf)
if(rand_target)
..(rand_target, user, def_zone)
else
..(target_turf, user, def_zone)
else
if(beameffect)
qdel(beameffect)
power_cycle = FALSE
else
..(A, user, def_zone) //If it can't fire, just bash with no delay.
/obj/item/weapon/gun/energy/maghowitzer/afterattack(atom/A, mob/living/user, adjacent, params)
if(power_cycle)
to_chat(user, "<span class='notice'>\The [src] is already powering up!</span>")
return 0
var/turf/target_turf = get_turf(A)
var/beameffect = user.Beam(target_turf,icon_state="sat_beam",icon='icons/effects/beam.dmi',time=31, maxdistance=10,beam_type=/obj/effect/ebeam,beam_sleep_time=3)
if(beameffect)
user.visible_message("<span class='cult'>[user] aims \the [src] at \the [A].</span>")
if(!power_cycle)
power_cycle = TRUE
if(do_after(user, 30))
if(A.loc == target_turf)
..(A, user, adjacent, params)
else
var/rand_target = pick_random_target(target_turf)
if(rand_target)
..(rand_target, user, adjacent, params)
else
..(target_turf, user, adjacent, params)
else
if(beameffect)
qdel(beameffect)
handle_click_empty(user)
power_cycle = FALSE
else
to_chat(user, "<span class='notice'>\The [src] is already powering up!</span>")

View File

@@ -0,0 +1,141 @@
/obj/item/weapon/gun/magnetic/matfed
name = "portable phoron bore"
desc = "A large man-portable tunnel bore, using phorogenic plasma blasts. Point away from user."
description_fluff = "An aging Grayson Manufactories mining tool used for rapidly digging through rock. Mass production was discontinued when many of the devices were stolen and used to break into a high security facility by Boiling Point drones."
description_antag = "This device is exceptional at breaking down walls, though it is incredibly loud when doing so."
description_info = "The projectile of this tool will travel six tiles before dissipating, excavating mineral walls as it does so. It can be reloaded with phoron sheets."
icon_state = "bore"
item_state = "bore"
wielded_item_state = "bore-wielded"
one_handed_penalty = 5
projectile_type = /obj/item/projectile/bullet/magnetic/bore
gun_unreliable = 0
power_cost = 750
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 = 8000 // How much material can be stored inside?
var/mat_cost = 500 // How much material is used per-shot?
var/ammo_material = MAT_PHORON
var/loading = FALSE
/obj/item/weapon/gun/magnetic/matfed/examine(mob/user)
. = ..()
show_ammo(user)
/obj/item/weapon/gun/magnetic/matfed/update_icon()
var/list/overlays_to_add = list()
if(removable_components)
if(cell)
overlays_to_add += image(icon, "[icon_state]_cell")
if(capacitor)
overlays_to_add += image(icon, "[icon_state]_capacitor")
if(!cell || !capacitor)
overlays_to_add += image(icon, "[icon_state]_red")
else if(capacitor.charge < power_cost)
overlays_to_add += image(icon, "[icon_state]_amber")
else
overlays_to_add += image(icon, "[icon_state]_green")
if(mat_storage)
overlays_to_add += image(icon, "[icon_state]_loaded")
overlays = overlays_to_add
..()
/obj/item/weapon/gun/magnetic/matfed/attack_hand(var/mob/user) // It doesn't keep a loaded item inside.
if(user.get_inactive_hand() == src)
var/obj/item/removing
if(cell && removable_components)
removing = cell
cell = null
if(removing)
removing.forceMove(get_turf(src))
user.put_in_hands(removing)
user.visible_message("<span class='notice'>\The [user] removes \the [removing] from \the [src].</span>")
playsound(loc, 'sound/machines/click.ogg', 10, 1)
update_icon()
return
. = ..()
/obj/item/weapon/gun/magnetic/matfed/check_ammo()
if(mat_storage - mat_cost >= 0)
return TRUE
return FALSE
/obj/item/weapon/gun/magnetic/matfed/use_ammo()
mat_storage -= mat_cost
/obj/item/weapon/gun/magnetic/matfed/show_ammo(var/mob/user)
if(mat_storage)
to_chat(user, "<span class='notice'>It has [mat_storage] out of [max_mat_storage] units of [ammo_material] loaded.</span>")
/obj/item/weapon/gun/magnetic/matfed/attackby(var/obj/item/thing, var/mob/user)
if(removable_components)
if(istype(thing, /obj/item/weapon/cell))
if(cell)
to_chat(user, "<span class='warning'>\The [src] already has \a [cell] installed.</span>")
return
cell = thing
user.drop_from_inventory(cell)
cell.forceMove(src)
playsound(loc, 'sound/machines/click.ogg', 10, 1)
user.visible_message("<span class='notice'>\The [user] slots \the [cell] into \the [src].</span>")
update_icon()
return
if(thing.is_screwdriver())
if(!capacitor)
to_chat(user, "<span class='warning'>\The [src] has no capacitor installed.</span>")
return
capacitor.forceMove(get_turf(src))
user.put_in_hands(capacitor)
user.visible_message("<span class='notice'>\The [user] unscrews \the [capacitor] from \the [src].</span>")
playsound(loc, 'sound/items/Screwdriver.ogg', 50, 1)
capacitor = null
update_icon()
return
if(istype(thing, /obj/item/weapon/stock_parts/capacitor))
if(capacitor)
to_chat(user, "<span class='warning'>\The [src] already has \a [capacitor] installed.</span>")
return
capacitor = thing
user.drop_from_inventory(capacitor)
capacitor.forceMove(src)
playsound(loc, 'sound/machines/click.ogg', 10, 1)
power_per_tick = (power_cost*0.15) * capacitor.rating
user.visible_message("<span class='notice'>\The [user] slots \the [capacitor] into \the [src].</span>")
update_icon()
return
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
. = ..()